CN112511834A - Encoding method, apparatus and storage medium - Google Patents
Encoding method, apparatus and storage medium Download PDFInfo
- Publication number
- CN112511834A CN112511834A CN202011329850.8A CN202011329850A CN112511834A CN 112511834 A CN112511834 A CN 112511834A CN 202011329850 A CN202011329850 A CN 202011329850A CN 112511834 A CN112511834 A CN 112511834A
- Authority
- CN
- China
- Prior art keywords
- target
- window
- application program
- encoding
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 230000009466 transformation Effects 0.000 claims description 14
- 238000005070 sampling Methods 0.000 claims description 10
- 238000005516 engineering process Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 13
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- GOLXNESZZPUPJE-UHFFFAOYSA-N spiromesifen Chemical compound CC1=CC(C)=CC(C)=C1C(C(O1)=O)=C(OC(=O)CC(C)(C)C)C11CCCC1 GOLXNESZZPUPJE-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/167—Position within a video image, e.g. region of interest [ROI]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/115—Selection of the code volume for a coding unit prior to coding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present disclosure provides an encoding method, apparatus and storage medium, relating to the field of image technology, the method includes obtaining target operation information; the target operation information comprises identification information of at least one target application program; identifying a target window corresponding to each target application program on a current display desktop; determining a first target area and a second target area according to the target window; the first target area is a display area of the target window, and the second target area is an area except the display area of the target window in the current display desktop; coding a first target image in a first target area according to a first code rate coding mode; coding a second target image in a second target area according to a second code rate coding mode; the coding rate of the second code rate coding mode is smaller than that of the first code rate coding mode. The method and the device can ensure that the picture in the window concerned by the user can be normally displayed, so that the user experience is improved.
Description
Technical Field
The present disclosure relates to the field of image technologies, and in particular, to an encoding method, an encoding apparatus, and a storage medium.
Background
The image transmission system comprises an encoding end and a receiving end, wherein the encoding end encodes an image collected from image source equipment and then transmits the encoded image to the receiving end, and the receiving end decodes the received encoded data and then displays the decoded encoded data through a display, so that the image transmission is realized; the encoding end generally encodes each frame of image according to a preset relatively fixed encoding mode, so that the definition of one frame of image is uniform; however, when the network speed is poor, if the coding method is adopted, the code stream is too large, and the image of the receiving end is blocked or displayed, so that the coding method needs to be adjusted.
In the related art, the encoding scheme can be adaptively adjusted according to the network speed, for example, when the network speed is poor, the image definition is reduced to reduce the code stream; however, when the code stream is reduced, the definition of one frame of image is still uniform, so that when the network speed is poor, the whole frame of image becomes blurred, and thus the picture in the window concerned by the user also becomes blurred, and the user experience is reduced.
Disclosure of Invention
The embodiment of the disclosure provides an encoding method, an encoding device and a storage medium, which can solve the problems that in the prior art, pictures in a window concerned by a user become blurred, and user experience is reduced. The technical scheme is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided an encoding method, the method including:
acquiring target operation information; the target operation information comprises identification information of at least one target application program;
identifying a target window corresponding to each target application program on a current display desktop according to the identification information of the target application program;
determining a first target area and a second target area according to the target window; the first target area is a display area of the target window, and the second target area is an area except the display area of the target window in the current display desktop;
coding a first target image in the first target area according to a first code rate coding mode;
coding a second target image in the second target area according to a second code rate coding mode; and the coding rate of the second code rate coding mode is smaller than that of the first code rate coding mode.
The embodiment of the disclosure provides an encoding method, which includes identifying a target window corresponding to each target application program on a current display desktop when target operation information including at least one target application program is acquired, further determining a display area of the target window as a first target area, determining an area except the display area of the target window in the current display desktop as a second target area, then encoding a first target image in the first target area according to a first code rate encoding mode with a high encoding code rate, and simultaneously encoding a second target image in the second target area according to a second code rate encoding mode with a low encoding code rate. Therefore, the picture in the window concerned by the user can be ensured to be normally displayed, and the user experience is improved.
In one embodiment, before the obtaining the target operation information, the method further includes:
displaying the application program list; the application program list comprises all application programs running on the current display desktop; the target operation information is information obtained by operating the application program list.
In one embodiment, the presenting the list of applications comprises:
when the current bandwidth is determined to be smaller than the preset bandwidth, displaying the application program list; or,
when the current bandwidth is determined to be smaller than the preset bandwidth and a target selection instruction is obtained, displaying the application program list; the target selection instruction is used for indicating a display application program list; or,
when a target operation instruction is obtained, displaying the application program list; the target operation instruction is used for indicating a display application program list.
In one embodiment, the presenting the list of applications comprises:
acquiring all application programs running on the current display desktop;
generating the application program list according to the identifications of all the application programs;
and displaying the application program list.
In one embodiment, the determining a first target region from the target window comprises:
acquiring window information on the current display desktop; the window information comprises a window identifier of each window and position information of each window;
searching the corresponding position information of the target window according to the window identifier of the target window;
and determining the first target area according to the position information of the target window.
In one embodiment, the encoding the second target image in the second target region according to the second code rate encoding manner includes:
discarding a preset bit character from the pixel value of each pixel point in the second target image to obtain a first target pixel value;
encoding each of the first target pixel values; or,
performing frequency domain transformation on each pixel point in the second target image;
discarding the high-frequency component after the frequency domain transformation, and encoding the low-frequency component after the frequency domain transformation; or,
performing down-sampling processing on all pixel points in the second target image;
and coding the pixel points subjected to the down-sampling treatment.
In one embodiment, said encoding each of said first target pixel values comprises:
rounding the ratio of the first target pixel value to a preset stepping value to obtain a second target pixel value;
encoding the second target pixel value.
In one embodiment, the down-sampling all the pixel points in the second target image includes:
dividing all pixel points in the second target image into at least one target group according to a preset rule; the preset rule is that adjacent preset number of pixel points are divided into a group;
determining pixel points at preset positions in the target group as reference pixel points;
modifying the pixel values of all the pixel points in the target group into the pixel values of the reference pixel points;
and coding all the modified pixel points.
According to a second aspect of the embodiments of the present disclosure, there is provided an encoding apparatus, the apparatus including:
the acquisition module is used for acquiring target operation information; the target operation information comprises identification information of at least one target application program;
the identification module is used for identifying a target window corresponding to each target application program on a current display desktop according to the identification information of the target application program;
the determining module is used for determining a first target area and a second target area according to the target window; the first target area is a display area of the target window, and the second target area is an area except the display area of the target window in the current display desktop;
the first coding module is used for coding a first target image in the first target area according to a first code rate coding mode;
the second coding module is used for coding a second target image in the second target area according to a second code rate coding mode; and the coding rate of the second code rate coding mode is smaller than that of the first code rate coding mode.
The embodiment of the disclosure provides an encoding device, which identifies a target window corresponding to each target application program on a current display desktop when target operation information including at least one target application program is acquired, further determines a display area of the target window as a first target area, determines an area except the display area of the target window in the current display desktop as a second target area, then encodes a first target image in the first target area according to a first code rate encoding mode with a high encoding code rate, and encodes a second target image in the second target area according to a second code rate encoding mode with a low encoding code rate. Therefore, the picture in the window concerned by the user can be ensured to be normally displayed, and the user experience is improved.
In one embodiment, the apparatus further comprises a display module;
the display module is used for displaying the application program list; the application program list comprises all application programs running on the current display desktop; the target operation information is information obtained by operating the application program list.
In one embodiment, the display module comprises a first display submodule, a second display submodule, and a third display submodule;
the first display submodule is used for displaying the application program list when the current bandwidth is determined to be smaller than the preset bandwidth; or,
the second display submodule is used for displaying the application program list when the current bandwidth is determined to be smaller than the preset bandwidth and a target selection instruction is obtained; the target selection instruction is used for indicating a display application program list; or,
the third display sub-module is used for displaying the application program list when a target operation instruction is obtained; the target operation instruction is used for indicating a display application program list.
In one embodiment, the display module comprises a first obtaining submodule, a generating submodule and a fourth displaying submodule;
the first obtaining submodule is used for obtaining all application programs running on the current display desktop;
the generation submodule is used for generating the application program list according to the identifications of all the application programs;
and the fourth display submodule is used for displaying the application program list.
In one embodiment, the determining module includes a second obtaining sub-module, a searching sub-module and a determining sub-module;
the second obtaining submodule is used for obtaining window information on the current display desktop; the window information comprises a window identifier of each window and position information of each window;
the searching submodule is used for searching the corresponding position information of the target window according to the window identification of the target window;
the determining submodule is configured to determine the first target area according to the position information of the target window.
In one embodiment, the second encoding module includes a discard submodule, a first encoding submodule, a transform submodule, a second encoding submodule, a processing submodule, and a third encoding submodule;
the discarding submodule is used for discarding the pixel value of each pixel point in the second target image to preset bit characters to obtain a first target pixel value;
the first encoding submodule is used for encoding each first target pixel value; or,
the transformation submodule is used for carrying out frequency domain transformation on each pixel point in the second target image;
the second coding submodule is used for abandoning the high-frequency component after the frequency domain transformation and coding the low-frequency component after the frequency domain transformation; or,
the processing submodule is used for performing down-sampling processing on all pixel points in the second target image;
and the third coding submodule is used for coding the pixel points subjected to the down-sampling processing.
In one embodiment, the first encoding submodule comprises a rounding unit and a first encoding unit;
the rounding unit is used for rounding the ratio of the first target pixel value to a preset stepping value to obtain a second target pixel value;
the first encoding unit is configured to encode the second target pixel value.
In one embodiment, the processing submodule includes a dividing unit, a determining unit, a modifying unit and a second encoding unit;
the dividing unit is used for dividing all pixel points in the second target image into at least one target group according to a preset rule; the preset rule is that adjacent preset number of pixel points are divided into a group;
the determining unit is used for determining pixel points at preset positions in the coding mark group of all the modified pixel points of the target pair as reference pixel points;
the modifying unit is used for modifying the pixel values of all the pixel points in the target group into the pixel values of the reference pixel points;
and the second coding unit is used for coding all the modified pixel points.
According to a third aspect of the embodiments of the present disclosure, there is provided an encoding apparatus including: a processor and a memory, the memory having stored therein at least one computer instruction, the instruction being loaded and executed by the processor to implement the steps performed in the encoding method described in the first aspect and any embodiment of the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, having at least one computer instruction stored therein, the instruction being loaded and executed by a processor to implement the steps performed in the encoding method described in the first aspect and any of the embodiments of the first aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of an encoding method provided by an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an application window provided in an embodiment of the present disclosure
Fig. 3 is a schematic diagram of a pixel provided in the embodiment of the present disclosure;
fig. 4 is a flowchart of an encoding method provided by the embodiment of the present disclosure;
fig. 5a is a structural diagram of an encoding apparatus provided in an embodiment of the present disclosure;
fig. 5b is a structural diagram of an encoding apparatus provided in an embodiment of the present disclosure;
fig. 5c is a structural diagram of an encoding apparatus provided in an embodiment of the present disclosure;
fig. 5d is a structural diagram of an encoding apparatus provided in an embodiment of the present disclosure;
fig. 5e is a structural diagram of an encoding apparatus provided in an embodiment of the present disclosure;
fig. 5f is a structural diagram of an encoding apparatus provided in an embodiment of the present disclosure;
fig. 5g is a structural diagram of an encoding apparatus provided in an embodiment of the present disclosure;
fig. 5h is a structural diagram of an encoding apparatus provided in an embodiment of the present disclosure;
fig. 5i is a structural diagram of an encoding apparatus provided in an embodiment of the present disclosure;
fig. 5j is a structural diagram of an encoding apparatus provided in an embodiment of the present disclosure;
fig. 6 is a block diagram of an encoding apparatus according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
An embodiment of the present disclosure provides an encoding method, as shown in fig. 1, the method including the following steps:
and step 101, acquiring target operation information.
Wherein the target operation information includes identification information of at least one target application.
For example, the user may click on at least one target application program that needs to be preferentially displayed through the application program list displayed on the currently displayed desktop, so that the device acquires target operation information based on the click action, that is, acquires target operation information including identification information of the at least one target application program.
It should be noted that, the user may call the application program list through a preset shortcut key at any time, and then reselect at least one target application program that needs to be preferentially displayed; the preset shortcut key is stored corresponding to the identifier of the application program list, so that the device can display the application program list as long as the user presses the preset shortcut key.
And 102, identifying a target window corresponding to each target application program on the current display desktop according to the identification information of the target application program.
For example, when target operation information including identification information of at least one target application program is acquired, a window corresponding to each target application program is identified on a current display desktop according to the identification information of the target application program, and the identified window corresponding to each target application program is determined as a target window.
And 103, determining a first target area and a second target area according to the target window.
The first target area is a display area of the target window, and the second target area is an area of the current display desktop except the display area of the target window.
Optionally, determining the first target area according to the target window may be implemented by:
acquiring window information on the current display desktop; searching the corresponding position information of the target window according to the window identifier of the target window; and determining the first target area according to the position information of the target window.
The window information includes a window identifier of each window and position information of each window, and the window identifier is a window handle.
For example, after the target window is determined, taking a Windows operating system as an example, the window information of the currently displayed desktop is obtained through a Windows API (Application Programming Interface) function, that is, the window identifier of each window and the position information of each window are obtained, the identifier information of the target window is searched in the window information, the position information of the corresponding target window is searched according to the identifier information of the target window, and then the display area of the target window can be determined according to the position information of the target window, so that the display area of the target window is determined as the first target area.
In addition, after the first target area is determined, the first target area is subtracted from all areas of the currently displayed desktop, so that a second target area, namely an area except the first target area, can be obtained.
For example, as shown in fig. 2, assume that the currently displayed desktop contains 5 running application windows, which are X1, X2, X3, X4 and X5 in sequence from the top layer; assuming that windows corresponding to the priority display application selected by the user are X2 and X4, determining a black-filled area and a white-filled area as priority display areas, namely a first target area; similarly, if the windows corresponding to the priority display application selected by the user are X5 and X1, the area filled with oblique lines and the area filled with vertical lines are determined as the priority display area, i.e., the first target area.
And 104, coding the first target image in the first target area according to a first code rate coding mode.
Illustratively, when the first target area is determined, the first target image in the first target area is divided into at least one first macro block, and the first macro block is encoded according to the first code rate encoding mode.
Optionally, the first code rate encoding manner may be a fixed code rate preset by a preset value, and then the first macro block is encoded by using the fixed code rate.
It should be noted that, each macro block in the at least one first macro block may be encoded by using a first code rate encoding method; the first coding rate coding mode may also be used to perform coding processing on a part of the macroblocks in the at least one first macroblock, which is not limited in this disclosure.
And 105, coding the second target image in the second target area according to a second code rate coding mode.
And the coding rate of the second code rate coding mode is smaller than that of the first code rate coding mode.
Illustratively, when the second target area is determined, dividing the second target image in the second target area into at least one second macro block, and encoding the second macro block according to a second code rate encoding mode; specifically, encoding the second target image in the second target region according to the second code rate encoding mode can be implemented by the following methods:
the first method is that a preset bit character is abandoned from the pixel value of each pixel point in the second target image, and a first target pixel value is obtained; encoding each of the first target pixel values.
For example, assuming that the pixel value range of each pixel point in the second macroblock is [0, 255], when the pixel value is represented as binary, an 8-bit character may be used for representation, and therefore, four lower-order characters may be discarded, and only four upper-order characters may be retained; for example, if the pixel values of two pixel points are 01011101 and 11010111 respectively, after four lower-order characters are discarded, two first target pixel values obtained are 0101 and 1101 respectively, and then each 0101 and each 1101 are encoded and compressed; the specific preset bit characters can be set according to requirements, and the method is not limited by the disclosure.
Further, rounding the ratio of the first target pixel value to a preset stepping value to obtain a second target pixel value; encoding the second target pixel value.
For example, when the first target pixel value is obtained, the first target pixel value may be divided by a preset step value, the obtained ratio is rounded, and finally, the rounded second target pixel value is compressed; for example, two points having pixel values of 240 and 180, assuming that the preset step value is 16, after processing in this manner, the pixel values become 15 and 12.
Through the two modes, the value range of the pixel points is changed from original [0, 255] to [0, 15], so that the pixel points are compressed, and the compression rate is improved.
The second method is that each pixel point in the second target image is subjected to frequency domain transformation; and discarding the high-frequency component after the frequency domain transformation, and encoding the low-frequency component after the frequency domain transformation.
Exemplarily, frequency domain transformation is performed on each pixel point in each second macro block in the second target image, and for a transformed result, only low-frequency components are retained, and high-frequency components are discarded, so that coding compression is performed on the low-frequency components; for example, in JPEG (Joint Photographic Experts Group), DCT (Discrete Cosine Transform) is performed on each pixel, and then only DC (direct current) components are encoded and transmitted, thereby improving the compression rate.
In the third method, all pixel points in the second target image are subjected to down-sampling processing; and coding the pixel points subjected to the down-sampling treatment.
Specifically, all pixel points in the second target image are divided into at least one target group according to a preset rule; determining pixel points at preset positions in the target group as reference pixel points; modifying the pixel values of all the pixel points in the target group into the pixel values of the reference pixel points; and coding all the modified pixel points.
The preset rule is that adjacent preset number of pixel points are divided into a group.
For example, as shown in fig. 3, it is assumed that there are 16 pixel points in the second target image, where the 16 pixel points are a1, a2, A3, a4, B1, B2, B3, B4, C1, C2, C3, C4, D1, D2, D3, and D4, the preset rule is to divide four adjacent pixel points into one group, and the preset position is the position of the first pixel point at the upper left corner of each group; for example, a1, a2, A3 and a4 are divided into a first group, B1, B2, B3 and B4 are divided into a second group, C1, C2, C3 and C4 are divided into a third group, and D1, D2, D3 and D4 are divided into a fourth group; then, taking a1 as a reference pixel point of the first group, B1 as a reference pixel point of the second group, C1 as a reference pixel point of the third group, and D1 as a reference pixel point of the fourth group, setting the pixel values of all the pixel points in the first group to be the pixel value of a1, setting the pixel values of all the pixel points in the second group to be the pixel value of B1, setting the pixel values of all the pixel points in the third group to be the pixel value of C1, setting the pixel values of all the pixel points in the fourth group to be the pixel value of D1, and finally, coding and compressing each modified pixel point.
It should be noted that the number of the pixel points in each group may be set according to actual needs, and the preset position of the reference pixel point in each group may also be set according to actual needs, which is not limited by the present disclosure.
Further, as shown in fig. 4, before executing step 101, the following step 106 is further included:
and 106, displaying the application program list.
The application program list comprises all application programs running on the current display desktop; the target operation information is information obtained by operating the application program list.
For example, in an office scene, a user may open many application programs at the same time, but for the user, only one or more application windows that are most concerned currently are provided, so that the definition of the application window that the user is concerned with may be increased, and the definition of the application window that the other user is not concerned with may be decreased.
Specifically, the intelligent coding mode can be actively entered through intelligent detection of bandwidth, and the application program list can be automatically displayed when the intelligent coding mode is entered; the application program list may be specifically displayed in the following cases:
in the first case, the application list is presented when it is determined that the current bandwidth is less than the preset bandwidth.
For example, the current bandwidth is obtained in real time, the current bandwidth is compared with the preset bandwidth, and when the current bandwidth is determined to be smaller than the preset bandwidth, the current network speed is poor, and at this time, the application program list can be actively displayed, so that a user can conveniently select the application program needing to be preferentially displayed in the application program list.
And in the second situation, when the current bandwidth is determined to be smaller than the preset bandwidth and a target selection instruction is obtained, displaying an application program list.
Wherein the target selection instruction is used for indicating to show the application program list.
For example, when it is determined that the current bandwidth is smaller than the preset bandwidth, an option of whether to enter the intelligent coding mode may be displayed to the user, a specific display mode may be displayed on a display screen or output in a voice mode, the user may select the option according to a requirement, and when the user selects to enter the intelligent coding mode, the application program list is displayed; and when the user selects to forbid entering the intelligent coding mode, the application program list is not displayed.
And in the third situation, when the target operation instruction is obtained, displaying the application program list.
Wherein, the target operation instruction is used for indicating to show the application program list.
For example, when the user feels that the picture is slightly blocked or the display effect is not good according to the current picture display condition, the user actively enters the intelligent coding mode through a preset shortcut key, that is, the user presses the preset shortcut key, so that the device acquires a target operation instruction for the shortcut key, and then displays the application program list in response to the target operation instruction.
It should be noted that, when the intelligent encoding mode is determined to be entered, an application selection window may be generated, and an application list is displayed in the application selection window; the application program selection window can be displayed at the preset position of the uppermost layer of the current display desktop, so that a user can conveniently perform reverse control operation on the application program selection window when seeing the application program selection window, namely, the application program needing to be preferentially displayed is selected.
Optionally, the displaying the application program list may be implemented by:
acquiring all application programs running on the current display desktop; generating the application program list according to the identifications of all the application programs; and displaying the application program list.
For example, when it is determined that the smart encoding mode is entered, identifiers of all application programs running on the currently displayed desktop may be acquired, and then a corresponding relationship is established between the identifiers of the application programs and names of the application programs, so that an application program list is established, and the application program list is displayed.
The embodiment of the disclosure provides an encoding method, which includes identifying a target window corresponding to each target application program on a current display desktop when target operation information including at least one target application program is acquired, further determining a display area of the target window as a first target area, determining an area except the display area of the target window in the current display desktop as a second target area, then encoding a first target image in the first target area according to a first code rate encoding mode with a high encoding code rate, and simultaneously encoding a second target image in the second target area according to a second code rate encoding mode with a low encoding code rate. Namely, the window image concerned by the user is coded by adopting a first code rate coding mode with higher code rate, and meanwhile, the window image not concerned by the user is coded by adopting a second code rate coding mode with lower code rate. Therefore, the picture in the window concerned by the user can be ensured to be normally displayed, and the user experience is improved; meanwhile, the whole code stream is reduced, and the bandwidth is saved.
Based on the encoding methods described in the above embodiments, the following are embodiments of the apparatus of the present disclosure, which may be used to perform embodiments of the method of the present disclosure.
The embodiment of the present disclosure provides an encoding apparatus, as shown in fig. 5a, the encoding apparatus 50 includes: an acquisition module 501, a recognition module 502, a determination module 503, a first encoding module 504, and a second encoding module 505.
The acquiring module 501 is configured to acquire target operation information; the target operation information includes identification information of at least one target application.
The identifying module 502 is configured to identify a target window corresponding to each target application program on a currently displayed desktop according to the identification information of the target application program.
A determining module 503, configured to determine a first target area and a second target area according to the target window; the first target area is a display area of the target window, and the second target area is an area except the display area of the target window in the current display desktop.
A first encoding module 504, configured to encode a first target image in the first target region according to a first code rate encoding manner.
A second encoding module 505, configured to encode a second target image in the second target region according to a second code rate encoding manner; and the coding rate of the second code rate coding mode is smaller than that of the first code rate coding mode.
In one embodiment, as shown in FIG. 5b, the encoding device 50 further comprises a display module 506.
The display module 506 is configured to display an application list; the application program list comprises all application programs running on the current display desktop; the target operation information is information obtained by operating the application program list.
In one embodiment, as shown in FIG. 5c, the presentation module 506 includes a first presentation sub-module 5061, a second presentation sub-module 5062, and a third presentation sub-module 5062.
The first displaying sub-module 5061 is configured to display the application program list when it is determined that the current bandwidth is smaller than a preset bandwidth; or,
the second displaying sub-module 5062 is configured to display the application program list when it is determined that the current bandwidth is smaller than the preset bandwidth and a target selection instruction is obtained; the target selection instruction is used for indicating a display application program list; or,
the third display sub-module 5063 is configured to display the application program list when a target operation instruction is obtained; the target operation instruction is used for indicating a display application program list.
In one embodiment, as shown in fig. 5d, presentation module 506 includes a first acquisition sub-module 5064, a generation sub-module 5065, and a fourth presentation sub-module 5066.
The first obtaining sub-module 5064 is configured to obtain all the applications running on the currently displayed desktop.
The generating sub-module 5065 is configured to generate the application program list according to the identifiers of all the application programs.
The fourth display sub-module 5066 is configured to display the application list.
In one embodiment, as shown in fig. 5e, the determining module 503 comprises a second obtaining sub-module 5031, a finding sub-module 5032 and a determining sub-module 5033.
The second obtaining sub-module 5031 is configured to obtain window information on the currently displayed desktop; the window information includes a window identification of each window and position information of each window.
The searching sub-module 5032 is configured to search the corresponding position information of the target window according to the window identifier of the target window.
The determining sub-module 5033 is configured to determine the first target area according to the position information of the target window.
In one embodiment, as shown in fig. 5f, the second encoding module 505 includes a discard submodule 5051 and a first encoding submodule 5052.
The discarding submodule 5051 is configured to discard preset bit characters from the pixel value of each pixel in the second target image, so as to obtain a first target pixel value.
The first encoding sub-module 5052 is configured to encode each of the first target pixel values.
In one embodiment, as shown in fig. 5g, the first coding sub-module 5052 includes a rounding unit 50521 and a first coding unit 50522.
The rounding unit 50521 is configured to round a ratio of the first target pixel value to a preset step value to obtain a second target pixel value.
The first encoding unit 50522 is configured to encode the second target pixel value.
In one embodiment, as shown in fig. 5h, the second encoding module 505 includes a transform sub-module 5053 and a second encoding sub-module 5054.
The transform submodule 5053 is configured to perform frequency domain transform on each pixel point in the second target image.
The second encoding sub-module 5054 is configured to discard the high-frequency component after the frequency domain transform, and encode the low-frequency component after the frequency domain transform.
In one embodiment, as shown in fig. 5i, the second encoding module 505 includes a processing sub-module 5055 and a third encoding sub-module 5056.
The processing submodule 5055 is configured to perform downsampling processing on all pixel points in the second target image.
The third encoding submodule 5056 is configured to encode the pixel point after the downsampling processing.
In one embodiment, as shown in fig. 5j, the processing submodule 5055 includes a partition unit 50551, a determination unit 50552, a modification unit 50553, and a second coding unit 50554.
The dividing unit 50551 is configured to divide all pixel points in the second target image into at least one target group according to a preset rule; the preset rule is that adjacent preset number of pixel points are divided into a group.
The determining unit 50552 is configured to determine, as a reference pixel, a pixel in a preset position in the coding mark group of all the pixels modified by the target pair.
The modifying unit 50553 is configured to modify the pixel values of all the pixels in the target group to the pixel value of the reference pixel.
The second encoding unit 50554 is configured to encode all modified pixels.
The embodiment of the disclosure provides an encoding device, which identifies a target window corresponding to each target application program on a current display desktop when target operation information including at least one target application program is acquired, further determines a display area of the target window as a first target area, determines an area except the display area of the target window in the current display desktop as a second target area, then encodes a first target image in the first target area according to a first code rate encoding mode with a high encoding code rate, and encodes a second target image in the second target area according to a second code rate encoding mode with a low encoding code rate. Namely, the window image concerned by the user is coded by adopting a first code rate coding mode with higher code rate, and meanwhile, the window image not concerned by the user is coded by adopting a second code rate coding mode with lower code rate. Therefore, the picture in the window concerned by the user can be ensured to be normally displayed, and the user experience is improved; meanwhile, the whole code stream is reduced, and the bandwidth is saved.
Referring to fig. 6, an encoding apparatus is further provided in an embodiment of the present disclosure, the encoding apparatus includes a receiver 601, a transmitter 602, a memory 603, and a processor 604, the transmitter 602 and the memory 603 are respectively connected to the processor 604, at least one computer instruction is stored in the memory 603, and the processor 604 is configured to load and execute the at least one computer instruction to implement the encoding method described in the corresponding embodiment of fig. 1.
Based on the encoding method described in the embodiment corresponding to fig. 1, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the encoding method described in the embodiment corresponding to fig. 1, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Claims (11)
1. A method of encoding, the method comprising:
acquiring target operation information; the target operation information comprises identification information of at least one target application program;
identifying a target window corresponding to each target application program on a current display desktop according to the identification information of the target application program;
determining a first target area and a second target area according to the target window; the first target area is a display area of the target window, and the second target area is an area except the display area of the target window in the current display desktop;
coding a first target image in the first target area according to a first code rate coding mode;
coding a second target image in the second target area according to a second code rate coding mode; and the coding rate of the second code rate coding mode is smaller than that of the first code rate coding mode.
2. The method of claim 1, prior to the obtaining target operation information, further comprising:
displaying the application program list; the application program list comprises all application programs running on the current display desktop; the target operation information is information obtained by operating the application program list.
3. The method of claim 2, wherein exposing the list of applications comprises:
when the current bandwidth is determined to be smaller than the preset bandwidth, displaying the application program list; or,
when the current bandwidth is determined to be smaller than the preset bandwidth and a target selection instruction is obtained, displaying the application program list; the target selection instruction is used for indicating a display application program list; or,
when a target operation instruction is obtained, displaying the application program list; the target operation instruction is used for indicating a display application program list.
4. The method of claim 2, wherein exposing the list of applications comprises:
acquiring all application programs running on the current display desktop;
generating the application program list according to the identifications of all the application programs;
and displaying the application program list.
5. The method of claim 1, wherein determining the first target region from the target window comprises:
acquiring window information on the current display desktop; the window information comprises a window identifier of each window and position information of each window;
searching the corresponding position information of the target window according to the window identifier of the target window;
and determining the first target area according to the position information of the target window.
6. The method of claim 1, wherein encoding the second target image in the second target region according to the second code rate encoding scheme comprises:
discarding a preset bit character from the pixel value of each pixel point in the second target image to obtain a first target pixel value;
encoding each of the first target pixel values; or,
performing frequency domain transformation on each pixel point in the second target image;
discarding the high-frequency component after the frequency domain transformation, and encoding the low-frequency component after the frequency domain transformation; or,
performing down-sampling processing on all pixel points in the second target image;
and coding the pixel points subjected to the down-sampling treatment.
7. The method of claim 6, wherein said encoding each of said first target pixel values comprises:
rounding the ratio of the first target pixel value to a preset stepping value to obtain a second target pixel value;
encoding the second target pixel value.
8. The method of claim 6, wherein the down-sampling all the pixel points in the second target image comprises:
dividing all pixel points in the second target image into at least one target group according to a preset rule; the preset rule is that adjacent preset number of pixel points are divided into a group;
determining pixel points at preset positions in the target group as reference pixel points;
modifying the pixel values of all the pixel points in the target group into the pixel values of the reference pixel points;
and coding all the modified pixel points.
9. An encoding apparatus, comprising:
the acquisition module is used for acquiring target operation information; the target operation information comprises identification information of at least one target application program;
the identification module is used for identifying a target window corresponding to each target application program on a current display desktop according to the identification information of the target application program;
the determining module is used for determining a first target area and a second target area according to the target window; the first target area is a display area of the target window, and the second target area is an area except the display area of the target window in the current display desktop;
the first coding module is used for coding a first target image in the first target area according to a first code rate coding mode;
the second coding module is used for coding a second target image in the second target area according to a second code rate coding mode; and the coding rate of the second code rate coding mode is smaller than that of the first code rate coding mode.
10. An encoding apparatus, comprising: a processor and a memory, the memory having stored therein at least one computer instruction, the instruction being loaded and executed by the processor to implement the steps performed in the encoding method of any one of claims 1 to 8.
11. A computer-readable storage medium having stored thereon at least one computer instruction, which is loaded and executed by a processor to perform the steps performed in the encoding method of any one of claims 1 through 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011329850.8A CN112511834A (en) | 2020-11-23 | 2020-11-23 | Encoding method, apparatus and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011329850.8A CN112511834A (en) | 2020-11-23 | 2020-11-23 | Encoding method, apparatus and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112511834A true CN112511834A (en) | 2021-03-16 |
Family
ID=74959746
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011329850.8A Pending CN112511834A (en) | 2020-11-23 | 2020-11-23 | Encoding method, apparatus and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112511834A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114217758A (en) * | 2021-12-01 | 2022-03-22 | 深圳Tcl新技术有限公司 | Image display method, image display device, electronic equipment and computer readable storage medium |
-
2020
- 2020-11-23 CN CN202011329850.8A patent/CN112511834A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114217758A (en) * | 2021-12-01 | 2022-03-22 | 深圳Tcl新技术有限公司 | Image display method, image display device, electronic equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110049324B (en) | Video encoding method, system, device, and computer-readable storage medium | |
JP6334006B2 (en) | System and method for high content adaptive quality restoration filtering for video coding | |
CN110149555B (en) | Video processing method and video receiving device | |
CN111131831B (en) | Data transmission method and device | |
CN110740316A (en) | Data coding method and device | |
CN111263243B (en) | Video coding method and device, computer readable medium and electronic equipment | |
CN109587491A (en) | A kind of intra-frame prediction method, device and storage medium | |
US8630500B2 (en) | Method for the encoding by segmentation of a picture | |
CN109361927B (en) | Image processing method and device | |
JP5950605B2 (en) | Image processing system and image processing method | |
CN113452996B (en) | Video coding and decoding method and device | |
CN112511834A (en) | Encoding method, apparatus and storage medium | |
KR20220093052A (en) | Method and apparatus for employing dynamic range mapping data for hdr video decoder considering backward compatibility | |
CN109120979B (en) | Video enhancement control method and device and electronic equipment | |
CN112637595A (en) | Encoding method, apparatus and storage medium | |
CN112948046A (en) | Screen capturing method, device, equipment and storage medium | |
CN114466228A (en) | Method, equipment and storage medium for improving screen projection display fluency | |
CN112672162A (en) | Encoding method, apparatus and storage medium | |
JPH10229558A (en) | Coder for moving image information | |
CN112114760A (en) | Image processing method and device | |
CN108810537B (en) | Picture transcoding method and device and image processing equipment | |
CN110602500A (en) | Data updating method and system | |
CN112954346A (en) | Encoding and decoding method, device and system | |
CN111885104B (en) | Method, device, storage medium and system for controlling server | |
CN110662060B (en) | Video encoding method and apparatus, video decoding method and apparatus, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |