Image decoding method and device, and computer readable storage medium

文档序号:1865026 发布日期:2021-11-19 浏览:20次 中文

阅读说明:本技术 图像解码方法及装置、计算机可读存储介质 (Image decoding method and device, and computer readable storage medium ) 是由 许龙龙 于 2021-07-06 设计创作,主要内容包括:本公开提供一种图像解码方法及装置、计算机可读存储介质,涉及图像处理技术领域,能够解决采集端的帧率和分辨率与解码端的解码能力不匹配而导致解码端无法解码或资源浪费的问题。具体技术方案为:识别采集端图像源当前的编码资源,该编码资源包括第一分辨率和第一帧率;获取接收端的解码资源池中当前未被使用的解码资源,该解码资源包括第二分辨率和第二帧率;判断当前未被使用的解码资源是否满足编码资源的需求;若满足,则根据编码资源从当前未被使用的解码资源中为采集端分配相应的解码资源,并建立采集端与接收端的传输链路。本公开用于图像的处理与传输。(The disclosure provides an image decoding method and device and a computer readable storage medium, relates to the technical field of image processing, and can solve the problem that a decoding end cannot decode or resources are wasted due to the fact that the frame rate and the resolution of an acquisition end are not matched with the decoding capability of the decoding end. The specific technical scheme is as follows: identifying current coding resources of an image source at an acquisition end, wherein the coding resources comprise a first resolution and a first frame rate; acquiring currently unused decoding resources in a decoding resource pool of a receiving end, wherein the decoding resources comprise a second resolution and a second frame rate; judging whether the decoding resources which are not used currently meet the requirements of the encoding resources; if yes, distributing corresponding decoding resources for the acquisition end from the decoding resources which are not used currently according to the coding resources, and establishing a transmission link between the acquisition end and the receiving end. The present disclosure is used for processing and transmitting images.)

1. An image decoding method, characterized in that the method comprises:

identifying current encoding resources of an image source at an acquisition end, wherein the encoding resources comprise a first resolution and a first frame rate;

acquiring currently unused decoding resources in a decoding resource pool of a receiving end, wherein the decoding resources comprise a second resolution and a second frame rate;

judging whether the decoding resources which are not used currently meet the requirements of the encoding resources;

and if so, distributing corresponding decoding resources for the acquisition end from the decoding resources which are not used currently according to the coding resources, and establishing a transmission link between the acquisition end and the receiving end.

2. The method of claim 1, wherein the determining whether the currently unused decoding resources meet the requirement of the encoding resources comprises:

judging whether the total number of the decoding resources which are not used currently is larger than the coding resources;

if yes, judging that the decoding resources which are not used currently meet the requirements of the encoding resources;

if not, the decoding resource which is not used currently is judged not to meet the requirement of the encoding resource.

3. The method according to claim 2, wherein said allocating the corresponding decoding resources for the acquisition end from the currently unused decoding resources according to the encoding resources comprises:

distributing resolution resources matched with the first resolution to the acquisition end from a second resolution which is not used currently;

and allocating frame rate resources matched with the first frame rate to the acquisition end from the second frame rate which is not used currently.

4. The method of claim 1, wherein the decoding resource pool comprises a plurality of fixed combinations of second resolutions and second frame rates; the determining whether the currently unused decoding resource meets the requirement of the encoding resource comprises:

judging whether a second resolution meets the fixed combination required by the first resolution in the coding resource or not in the plurality of fixed combinations;

if a fixed combination meeting the first resolution requirement in the coding resource exists, recording the fixed combination meeting the first resolution requirement in the coding resource as a first fixed combination set;

determining whether a second frame rate of the plurality of fixed combinations meets a first frame rate requirement of the coding resources;

if a second frame rate in the plurality of fixed combinations meets the fixed combination of the first frame rate requirement in the coding resources, recording the fixed combination meeting the first frame rate requirement in the coding resources as a second fixed combination set;

judging whether the first fixed combination set and the second fixed combination set have the same fixed combination or not;

and if so, judging that the decoding resources which are not used currently meet the requirement of the coding resources.

5. The method according to claim 4, wherein said allocating the corresponding decoding resources for the acquisition end from the currently unused decoding resources according to the encoding resources comprises:

acquiring the same fixed combination in the first fixed combination set and the second fixed combination set;

searching a fixed combination which is closest to the first resolution and the first frame rate from the same fixed combination;

and distributing the closest fixed combination to the collection end.

6. The method of claim 1, wherein after said determining whether the currently unused decoding resources meet the requirements of the encoding resources, the method further comprises:

and if the decoding resources which are not used currently are judged not to meet the requirements of the encoding resources, sending a notification message that the decoding resources of a receiving end are insufficient and a transmission link cannot be established to the acquisition end.

7. The method according to any one of claims 1 to 6, further comprising:

and when an operation instruction for releasing the transmission link is detected, releasing the decoding resources corresponding to the transmission link into the decoding resource pool.

8. An image decoding apparatus, comprising:

the identification module is used for identifying the current coding resource of an image source at an acquisition end, wherein the coding resource comprises a first resolution and a first frame rate;

an obtaining module, configured to obtain currently unused decoding resources in a decoding resource pool of a receiving end, where the decoding resources include a second resolution and a second frame rate;

the judging module is used for judging whether the decoding resources which are not used currently meet the requirements of the encoding resources;

and the resource allocation module is used for allocating corresponding decoding resources to the acquisition end from the decoding resources which are not used currently according to the coding resources and establishing a transmission link between the acquisition end and the receiving end when the judgment module judges that the decoding resources which are not used currently meet the requirements of the coding resources.

9. The apparatus of claim 8, further comprising:

and the resource releasing module is used for releasing the decoding resources corresponding to the transmission link to the decoding resource pool when the operation instruction for releasing the transmission link is detected.

10. A computer-readable storage medium, having stored therein at least one computer instruction, which is loaded and executed by a processor to implement the steps performed in the image decoding method of any one of claims 1 to 7.

Technical Field

The present disclosure relates to the field of image processing technologies, and in particular, to an image decoding method and apparatus, and a computer-readable storage medium.

Background

At present, in the process of encoding, transmitting and decoding an image, an acquisition end acquires a display picture of a service terminal, encodes the display picture, transmits the obtained image encoded data to a network through a transmitting end, and a receiving end acquires the image encoded data from the network and then decodes and displays the image encoded data.

However, in this process, when the frame rate and resolution of the image source are high and the capability of the decoding end is limited, the decoding end may not be able to decode the encoded data of the high frame rate and high resolution image; when the frame rate and resolution of the image source are low and the decoding end has sufficient decoding capability, the resource waste of the decoding end occurs.

Disclosure of Invention

The embodiment of the disclosure provides an image decoding method and device, and a computer-readable storage medium, which can solve the problem that a decoding end cannot decode or resources are wasted due to the fact that the frame rate and resolution of an acquisition end are not matched with the decoding capability of the decoding end. The technical scheme is as follows:

according to a first aspect of embodiments of the present disclosure, there is provided an image decoding method, including:

identifying current encoding resources of an image source at an acquisition end, wherein the encoding resources comprise a first resolution and a first frame rate;

acquiring currently unused decoding resources in a decoding resource pool of a receiving end, wherein the decoding resources comprise a second resolution and a second frame rate;

judging whether the decoding resources which are not used currently meet the requirements of the encoding resources;

and if so, distributing corresponding decoding resources for the acquisition end from the decoding resources which are not used currently according to the coding resources, and establishing a transmission link between the acquisition end and the receiving end.

In this embodiment, before the acquisition end sends the image encoded data, it is first determined whether the decoding resources that are not currently used in the decoding resource pool of the receiving end meet the requirements of the current encoding resources of the image source of the acquisition end, when the requirements are met, the acquisition end is allocated with the corresponding decoding resources and a transmission link between the acquisition end and the receiving end is established, and by matching the decoding resources of the decoding end with the current encoding resources of the image source of the acquisition end, it is ensured that the image encoded data received by the receiving end can be decoded normally, and meanwhile, the corresponding decoding resources can be dynamically allocated according to the real-time encoding resources, so that the decoding end can meet the use of more scenes, and the resource utilization rate of the decoding end is improved.

In one embodiment, the determining whether the currently unused decoding resources meet the requirement of the encoding resources comprises:

judging whether the total number of the decoding resources which are not used currently is larger than the coding resources;

if yes, judging that the decoding resources which are not used currently meet the requirements of the encoding resources;

if not, the decoding resource which is not used currently is judged not to meet the requirement of the encoding resource.

In one embodiment, the allocating, according to the encoding resource, a corresponding decoding resource from the currently unused decoding resources to the acquisition end includes:

distributing resolution resources matched with the first resolution to the acquisition end from a second resolution which is not used currently;

and allocating frame rate resources matched with the first frame rate to the acquisition end from the second frame rate which is not used currently.

In this embodiment, when the currently unused decoding resources in the decoding resource pool meet the requirement of the encoding resources, by allocating the resolution resources matched with the first resolution and the frame rate resources matched with the first frame rate to the acquisition end from the total unused decoding resources, only the required number of decoding resources can be allocated to the acquisition end for decoding, and the remaining unallocated decoding resources can also be allocated to other acquisition ends for use, so as to improve the utilization rate of the decoding resources.

In one embodiment, the decoding resource pool comprises a plurality of fixed combinations of the second resolution and the second frame rate; the determining whether the currently unused decoding resource meets the requirement of the encoding resource comprises:

judging whether a second resolution meets the fixed combination required by the first resolution in the coding resource or not in the plurality of fixed combinations;

if a fixed combination meeting the first resolution requirement in the coding resource exists, recording the fixed combination meeting the first resolution requirement in the coding resource as a first fixed combination set;

determining whether a second frame rate of the plurality of fixed combinations meets a first frame rate requirement of the coding resources;

if a second frame rate in the plurality of fixed combinations meets the fixed combination of the first frame rate requirement in the coding resources, recording the fixed combination meeting the first frame rate requirement in the coding resources as a second fixed combination set;

judging whether the first fixed combination set and the second fixed combination set have the same fixed combination or not;

and if so, judging that the decoding resources which are not used currently meet the requirement of the coding resources.

In this embodiment, the decoding resources in the decoding resource pool may be divided into a plurality of fixed combinations of the second resolution and the second frame rate in advance, and whether the decoding resources that are not currently used meet the requirements of the encoding resources may be determined by comparing the current encoding resources of the image source at the acquisition end with the fixed combinations.

In one embodiment, the allocating, according to the encoding resource, a corresponding decoding resource from the currently unused decoding resources to the acquisition end includes:

acquiring the same fixed combination in the first fixed combination set and the second fixed combination set;

searching a fixed combination which is closest to the first resolution and the first frame rate from the same fixed combination;

and distributing the closest fixed combination to the collection end.

In this embodiment, the decoding resources in the decoding resource pool may be divided into a plurality of fixed combinations of resolutions and frame rates in advance, and by comparing the current encoding resources of the image source at the acquisition end with the fixed combinations, the fixed combination closest to the encoding resources can be determined from the fixed combinations, that is, the encoding resources matched with the encoding resources are obtained, so that only the matched decoding resources are allocated to the acquisition end for decoding, and the remaining fixed combinations that are not allocated may also be allocated to other acquisition ends for use, thereby improving the utilization rate of the decoding resources.

In one embodiment, after the determining whether the currently unused decoding resource meets the requirement of the encoding resource, the method further comprises:

and if the decoding resources which are not used currently are judged not to meet the requirements of the encoding resources, sending a notification message that the decoding resources of a receiving end are insufficient and a transmission link cannot be established to the acquisition end.

In this embodiment, when the decoding capability of the decoding end is not enough to fulfill the current decoding requirement of the image source at the acquisition end, the acquisition end is notified that the decoding resources at the current receiving end are not enough and a transmission link cannot be established, so as to perform corresponding processing, thereby avoiding the situations of invalid transmission of image coded data and incapability of decoding at the decoding end.

In one embodiment, the method further comprises:

and when an operation instruction for releasing the transmission link is detected, releasing the decoding resources corresponding to the transmission link into the decoding resource pool.

In this embodiment, when the transmission link between the acquisition end and the receiving end is actively released, the decoding resource corresponding to the transmission link is released back to the decoding resource pool, so that the decoding resource is reused, dynamic application and release of the decoding resource are realized, and the utilization rate of the decoding resource is improved.

According to a second aspect of the embodiments of the present disclosure, there is provided an image decoding apparatus including:

the identification module is used for identifying the current coding resource of an image source at an acquisition end, wherein the coding resource comprises a first resolution and a first frame rate;

an obtaining module, configured to obtain currently unused decoding resources in a decoding resource pool of a receiving end, where the decoding resources include a second resolution and a second frame rate;

the judging module is used for judging whether the decoding resources which are not used currently meet the requirements of the encoding resources;

and the resource allocation module is used for allocating corresponding decoding resources to the acquisition end from the decoding resources which are not used currently according to the coding resources and establishing a transmission link between the acquisition end and the receiving end when the judgment module judges that the decoding resources which are not used currently meet the requirements of the coding resources.

In one embodiment, the image decoding apparatus further includes:

and the resource releasing module is used for releasing the decoding resources corresponding to the transmission link to the decoding resource pool when the operation instruction for releasing the transmission link is detected.

The image decoding device provided by the embodiment of the disclosure can judge whether the decoding resources which are not used currently in the decoding resource pool of the receiving end meet the requirements of the current encoding resources of the image source of the collecting end before the collecting end sends the image encoding data, allocate the corresponding decoding resources for the collecting end and establish the transmission link between the collecting end and the receiving end when the requirements are met, ensure that the image encoding data received by the receiving end can be decoded normally by matching the decoding resources of the decoding end with the current encoding resources of the image source of the collecting end, and simultaneously dynamically allocate the corresponding decoding resources according to the real-time encoding resources, so that the decoding end can meet the use of more scenes, and improve the resource utilization rate of the decoding end. When the transmission link between the acquisition end and the receiving end is actively released, the decoding resources corresponding to the transmission link can be released back to the decoding resource pool, so that the decoding resources can be reused, and dynamic application and release of the decoding resources are realized.

According to a third 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 computer instruction being loaded and executed by a processor to implement the steps performed in the image decoding method according to any of the above embodiments.

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 image decoding method provided by an embodiment of the present disclosure;

fig. 2 is a schematic structural diagram of an image transmission system provided in an embodiment of the present disclosure;

fig. 3 is a schematic structural diagram of an image decoding apparatus according to an embodiment of the present disclosure;

fig. 4 is a schematic structural diagram of an image decoding apparatus according to an embodiment of the present disclosure;

fig. 5 is a schematic structural diagram of an image decoding apparatus according to an embodiment of the present disclosure;

fig. 6 is a schematic structural diagram of an image decoding 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 numbering of the objects themselves, e.g., "first", "second", etc., in this disclosure is used merely to distinguish the objects being described, and does not have any sequential or technical meaning. 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 recited in the claims appended hereto.

In the embodiment of the present disclosure, under the condition that the capability of the decoding end is known, the decoding end is regarded as a pool and is recorded as a decoding resource pool, and after the receiving end receives the image encoded data sent by the acquisition end, decoding is performed through the decoding resources in the decoding resource pool. Before the acquisition end sends the image coded data, whether the decoding resources which are not used currently in the decoding resource pool meet the current coding resources of an image source of the acquisition end is judged, if so, corresponding decoding resources are distributed to the acquisition end from the decoding resources which are not used currently according to the coding resources, a transmission link between the acquisition end and a receiving end is established, the image coded data of the acquisition end are transmitted through the transmission link, and the image coded data are decoded by utilizing the distributed decoding resources.

The embodiments of the present disclosure are described in detail below with reference to specific examples.

An embodiment of the present disclosure provides an image decoding method, as shown in fig. 1, the image decoding method may include the following steps:

step 101: and identifying the current coding resource of an image source at the acquisition end.

The encoding resource comprises a first resolution and a first frame rate, when the current image of the image source is encoded at the acquisition end, the current first resolution and the first frame rate of the image source at the acquisition end can be determined, and the current image of the image source is encoded by using the first resolution and the first frame rate to obtain image encoding data. Before the acquisition end transmits the image coding data, the current first resolution and the first frame rate of an image source at the acquisition end are firstly identified.

Step 102: and acquiring currently unused decoding resources in a decoding resource pool of the receiving end.

Wherein the decoding resources include a second resolution and a second frame rate.

Specifically, under the condition that the capability of the decoding end is known, the decoding end is regarded as a pool and is recorded as a decoding resource pool. Before the acquisition end sends the image coded data, decoding resources which are not used currently in a decoding resource pool of the receiving end are obtained.

In one embodiment, the decoding resources in the decoding resource pool may be set in the form of the total second resolution and the second frame rate.

In another embodiment, the total second resolution and the second frame rate in the decoding resource pool may be pre-divided into a plurality of fixed combinations of the second resolution and the second frame rate. For example, it is assumed that the decoding resource pool can provide a Second resolution of 8K and a Second frame rate of 144fps (Frames Per Second). Illustratively, the total second resolution in the decoding resource pool may be divided into 8K, 4K, 2K, 1K, etc., and the total second frame rate may be divided into 144fps, 120fps, 60fps, 30fps, etc. Various combinations of different second resolutions and different second frame rates can result in fixed combinations as shown in table 1:

TABLE 1

Fixed combination Second resolution Second frame rate (fps)
R1 8K 144
R2 8K 120
R3 8K 60
R4 4K 144
R5 4K 120
…… …… ……
Rn 1K 30

It should be noted that, the above table 1 only shows some fixed combinations, and there may be other logical combinations in practical applications, such as fixed combinations of the second resolution 8K and the second frame rate 30fps, and fixed combinations of the second resolution 2K and the second frame rate 60 fps. This is by way of illustration only and is not intended to limit the disclosure.

Step 103: and judging whether the decoding resources which are not used currently in the decoding resource pool meet the requirements of the encoding resources.

And executing step 104 when judging that the decoding resources which are not currently used in the decoding resource pool meet the requirement of the coding resources, otherwise executing step 105.

Specifically, in combination with step 102, in an embodiment, when the decoding resources in the decoding resource pool are set in the form of the total second resolution and the second frame rate, this step may include steps S11 to S13 as follows:

step S11: judging whether the total number of decoding resources which are not used currently is larger than the coding resources; if so, go to step S12, otherwise go to step S13.

Step S12: judging that decoding resources which are not used currently in a decoding resource pool meet the requirements of coding resources;

step S13: and judging that the decoding resources which are not used currently in the decoding resource pool do not meet the requirement of the encoding resources.

In another embodiment, when the total second resolution and the second frame rate in the decoding resource pool are divided into a plurality of fixed combinations of the second resolution and the second frame rate in advance, the step may include the following steps S21 to S25:

step S21: judging whether a second resolution meets the fixed combination required by the first resolution in the coding resources or not in the plurality of fixed combinations; if so, executing step S22, otherwise, determining that the currently unused decoding resource in the decoding resource pool does not satisfy the requirement of the encoding resource.

Step S22: the fixed combinations that meet the first resolution requirement in the encoding resources are recorded as a first set of fixed combinations.

Step S23: judging whether a second frame rate in the plurality of fixed combinations meets the fixed combination of the first frame rate requirement in the coding resource; if so, executing step S24, otherwise, determining that the currently unused decoding resource in the decoding resource pool does not satisfy the requirement of the encoding resource.

Step S24: and recording the fixed combination meeting the first frame rate requirement in the coding resources as a second fixed combination set.

Step S25: judging whether the first fixed combination set and the second fixed combination set have the same fixed combination or not; if so, judging that the decoding resources which are not used currently in the decoding resource pool meet the requirements of the encoding resources; otherwise, judging that the decoding resources which are not used currently in the decoding resource pool do not meet the requirements of the encoding resources. That is, an intersection is taken for the first fixed combination set and the second fixed combination set, and if the obtained set is empty, it is determined that the decoding resources which are not used currently in the decoding resource pool do not meet the requirements of the encoding resources; and if the obtained set is not empty, judging that the decoding resources which are not used currently in the decoding resource pool meet the requirement of the encoding resources.

In the present embodiment, the order of step S21 and step S23 is not limited, and may be executed sequentially or simultaneously in practical applications.

In this embodiment, for each fixed combination, the second resolution may be completely the same as the first resolution, and the second frame rate may be completely the same as the first frame rate, and the fixed combination is considered to meet the requirement of the encoding resource; or when the error between the second resolution and the first resolution is within a preset resolution error range and the error between the second frame rate and the first frame rate is within a preset frame rate error range, the fixed combination is considered to meet the requirement of the encoding resource, and at this time, a plurality of fixed combinations meeting the requirement of the encoding resource may exist, and the fixed combination closest to the requirement is selected as the decoding resource allocated to the acquisition end.

In the embodiment, the method of determining the second resolution and the second frame rate to take intersection is adopted for determination, and in practical application, it may also be determined whether a fixed combination with the second resolution meeting the first resolution requirement in the encoding resource exists in the plurality of fixed combinations, if so, the fixed combination meeting the first resolution requirement in the encoding resource is recorded as a first fixed combination set, then it is determined whether a fixed combination with the second frame rate meeting the first frame rate requirement in the encoding resource exists in the first fixed combination set, if so, it is determined that the decoding resource which is not currently used in the decoding resource pool meets the requirement of the encoding resource, otherwise, it is determined that the decoding resource which is not currently used in the decoding resource pool does not meet the requirement of the encoding resource. Alternatively, the second frame rate may be determined first, and whether the second resolution meets the requirement may be determined in the second fixed combination set meeting the frame rate requirement.

Step 104: and distributing corresponding decoding resources for the acquisition end from the decoding resources which are not used currently according to the coding resources, and establishing a transmission link between the acquisition end and the receiving end.

And when judging that the decoding resources which are not used currently in the decoding resource pool meet the requirements of the coding resources, distributing the corresponding decoding resources for the acquisition end from the decoding resources which are not used currently according to the coding resources, and establishing a transmission link between the acquisition end and the receiving end. Correspondingly, the decoding resources which are not currently used in the decoding resource pool are updated as follows: the currently unused decoding resource is the decoding resource that was not used before allocation-the decoding resource allocated this time.

Specifically, if the method in step S11 to step S13 is adopted to determine whether the decoding resource currently not used in the decoding resource pool meets the requirement of the encoding resource, the step may include: distributing resolution resources matched with the first resolution to the acquisition end from the second resolution which is not used currently; and allocating frame rate resources matched with the first frame rate to the acquisition end from the second frame rate which is not used currently.

If the method of step S21 to step S25 is adopted to determine whether the decoding resources that are not currently used in the decoding resource pool meet the requirement of the encoding resources, the step may include: acquiring the same fixed combination in the first fixed combination set and the second fixed combination set; searching a fixed combination which is closest to the first resolution and the first frame rate from the same fixed combination; the closest fixed combination is assigned to the acquisition side.

Step 105: and sending a notification message that the decoding resources of the receiving end are insufficient and a transmission link cannot be established to the acquisition end.

When the decoding resources which are not used currently are judged to not meet the requirements of the encoding resources, the decoding capability of the decoding end is considered to be insufficient to finish the current decoding requirements of the image source of the acquisition end, and the acquisition end is informed that the decoding resources of the current receiving end are insufficient and a transmission link cannot be established so as to carry out corresponding processing, thereby avoiding the situations of invalid transmission of image encoding data and incapability of decoding of the decoding end.

In one embodiment, the image decoding method further includes: and when an operation instruction for releasing the transmission link is detected, releasing the decoding resources corresponding to the transmission link into the decoding resource pool.

Specifically, when the user actively releases the transmission link, the decoding resources corresponding to the transmission link are released back to the decoding resource pool, and after the recovery is completed, the decoding resources which are not currently used in the decoding resource pool are updated to: the decoding resources that are not currently used are the decoding resources that were not used before being recycled + the decoding resources released this time.

The image decoding method provided by the embodiment of the disclosure judges whether the decoding resources which are not used currently in the decoding resource pool of the receiving end meet the requirements of the current encoding resources of the image source of the collecting end before the collecting end sends the image encoding data, allocates the corresponding decoding resources for the collecting end and establishes the transmission link between the collecting end and the receiving end when the requirements are met, ensures that the image encoding data received by the receiving end can be decoded normally by matching the decoding resources of the decoding end with the current encoding resources of the image source of the collecting end, and simultaneously dynamically allocates the corresponding decoding resources according to the real-time encoding resources, so that the decoding end can meet the use of more scenes, and the resource utilization rate of the decoding end is improved.

To more clearly embody the purpose of the present disclosure, the scheme of the present disclosure is further exemplified on the basis of the image decoding method provided by the embodiment corresponding to fig. 1.

The image decoding method provided by the embodiment of the present disclosure can be applied to an image decoding device, and the image decoding device can be arranged in an image transmission system, and the structure of the image transmission system can be referred to fig. 2. As shown in fig. 2, the image transmission system includes N (N is a positive integer) acquisition ends, a decoding end, and an image decoding device 30, where each acquisition end corresponds to an image source and is used to acquire and encode an image corresponding to the image source to obtain image encoded data; the decoding end is regarded as a resource pool and marked as a decoding resource pool, the decoding resource pool can be in one-to-one correspondence with the N acquisition ends through the N receiving ends, each receiving end is used for receiving image coded data of one acquisition end corresponding to the receiving end, and the received image coded data is displayed after being decoded at the decoding end; the image decoding device 30 may be provided on the image encoding side or on the image decoding side.

Specifically, in an exemplary embodiment, it is assumed that the decoding resource pool can provide a resolution of 8K and a frame rate of 144fps at maximum, the currently unused decoding resources include a total resolution of 8K and a total frame rate of 144fps, the resolution when the image of the image source 1 is encoded by the acquisition end 1 is 4K, and the frame rate is 30 fps.

Before the acquisition end 1 sends the encoded image data 1 obtained by encoding the image of the image source 1, the image decoding device 30 first identifies that the current encoding resource of the image source 1 is 4K in resolution and 30fps in frame rate, and simultaneously acquires the total resolution of the currently unused decoding resource in the decoding resource pool as 8K and the total frame rate as 144fps, and as can be known by comparison, the total amount of the currently unused decoding resource in the decoding resource pool is greater than the current encoding resource of the image source 1, the acquisition end 1 is allocated with the resolution of 4K and the frame rate of 30fps from the resolution of 8K and the frame rate of 144fps, and a transmission link between the acquisition end 1 and the corresponding receiving end 1 is established, and the encoded image data 1 is transmitted to the receiving end 1 through the transmission link. After the receiving end 1 receives the image coded data 1, the decoding end decodes the image coded data 1 by adopting a resolution of 4K and a frame rate of 30fps, at this time, the total amount of currently unused decoding resources in the decoding resource pool is changed as follows: the unused resolution is 8K-4K, and the unused frame rate is 144fps-30 fps-114 fps.

The remaining decoding resources (4K resolution and 114fps frame rate) can also be used for decoding the image coding data transmitted by other acquisition ends. For example, at this time, the image source 2 also performs encoding transmission of an image, and the current encoding resource of the image source 2 is 1K of resolution and 60fps of frame rate, then, the same manner can be used to allocate decoding resources of 1K of resolution and 60fps of frame rate to the acquisition end 2, and establish a transmission link between the acquisition end 2 and the corresponding receiving end 2, and after the receiving end 2 receives the image encoding data 2 sent by the acquisition end 2 through the transmission link, the decoding end decodes the image encoding data 2 by using 1K of resolution and 60fps of frame rate. At this time, the total amount of currently unused decoding resources in the decoding resource pool is changed to: the unused resolution is 4K-1K-3K, and the unused frame rate is 114fps-60 fps-54 fps.

If the current encoding resource of the image source 2 is 8K of resolution and 60fps of frame rate, it can be known through comparison that the remaining decoding resources (4K of resolution and 114fps of frame rate) cannot satisfy the current encoding resource of the image source 2, and at this time, a notification message that the decoding resource of the receiving end is insufficient and a transmission link cannot be established is sent to the acquisition end 2.

In the above process, if an operation instruction for releasing the transmission link between the acquisition terminal 1 and the receiving terminal 1 is detected, the 4K resolution and the 30fps frame rate allocated to the acquisition terminal 1 are released into the decoding resource pool. At this time, the total amount of currently unused decoding resources in the decoding resource pool is changed to: the unused resolution is 3K +4K 7K, and the unused frame rate is 54fps +30fps 84 fps.

In another exemplary embodiment, assuming that the decoding resources in the decoding resource pool are divided into fixed combinations shown in table 1, the resolution when the image of the image source 1 is encoded by the acquisition end 1 is 4K, and the frame rate is 120 fps. Before the acquisition end 1 sends the encoded image data 1 obtained by encoding the current image of the image source 1, the image decoding apparatus 30 first identifies that the current encoding resource of the image source 1 is 4K in resolution and 120fps in frame rate, and meanwhile, acquires that the currently unused decoding resource in the decoding resource pool is the fixed combination shown in table 1. Comparing the current encoding resource of the image source 1 with the fixed combination in table 1 can determine that the fixed combination R5 in table 1 is completely matched with the current encoding resource of the image source 1, then allocating the fixed combination R5 to the corresponding acquisition end 1, establishing a transmission link between the acquisition end 1 and the corresponding receiving end 1, and transmitting the image encoding data 1 to the receiving end 1 through the transmission link. After receiving the image coded data 1, the receiving end 1 decodes the image coded data 1 by using the fixed combination R5, at this time, the decoding resources that are not currently used in the decoding resource pool are changed to other fixed combinations in table 1 except R5, and these fixed combinations can be further allocated to decode the image coded data transmitted by other acquiring ends.

Similarly, in the process, if a fixed combination completely matched with the current encoding resource of the image source 1 is not found in table 1, it is determined that the currently unused decoding resource in the decoding resource pool does not meet the requirement of the current encoding resource of the image source 1, and at this time, a notification message that the decoding resource at the receiving end is insufficient and a transmission link cannot be established is sent to the acquisition end 1.

Similarly, if an operation instruction for releasing the transmission link between the collector 1 and the receiver 1 is detected, the fixed combination R5 allocated to the collector 1 is released to the decoding resource pool, and at this time, the currently unused decoding resources in the decoding resource pool are updated to the currently unallocated fixed combination and R5 in table 1.

In the exemplary embodiment, a perfectly matched fixed combination is selected from the fixed combinations shown in table 1 according to the encoding resources and allocated to the acquisition end, and the image encoded data transmitted by the acquisition end is decoded by using the fixed combination. In practical applications, the fixed combination closest to the requirement may be selected from the fixed combinations shown in table 1 according to the encoding resources and allocated to the acquisition end, for example, when the acquisition end 1 encodes the image of the image source 1, the resolution is 8K, the frame rate is 65fps, but the fixed combination which is not completely matched with the fixed combination in table 1 (decoding resource pool) is found to be closest to the fixed combination R3, then R3 may be selected as the decoding resource meeting the requirement, and the encoded image data sent by the acquisition end may be decoded by R3. That is, a certain resource error range may be set, and as long as the fixed combination is within the resource error range, the fixed combination may be regarded as a fixed combination satisfying the requirement of the encoding resource, and then a combination closest to the encoding resource is selected as a matched decoding resource.

According to the above exemplary embodiments, by dynamically applying for decoding resources and releasing decoding resources, parallel decoding can be realized, decoding efficiency is improved, applications in more scenes can be satisfied, and utilization rate of decoding resources is improved.

Based on the image decoding method described in the embodiment corresponding to fig. 1, the following is an embodiment of the apparatus of the present disclosure, which can be used to execute the embodiment of the method of the present disclosure.

An embodiment of the present disclosure provides an image decoding apparatus, as shown in fig. 3, the image decoding apparatus 30 includes: an identification module 301, an acquisition module 302, a judgment module 303 and a resource allocation module 304;

the identification module 301 is configured to identify a current encoding resource of an image source at an acquisition end, where the encoding resource includes a first resolution and a first frame rate;

the obtaining module 302 is configured to obtain currently unused decoding resources in a decoding resource pool of a receiving end, where the decoding resources include a second resolution and a second frame rate;

the judging module 303 is configured to judge whether a currently unused decoding resource in the decoding resource pool meets a requirement of the encoding resource identified by the identifying module 301;

the resource allocation module 304 is configured to, when the determining module 303 determines that the currently unused decoding resource in the decoding resource pool meets the requirement of the encoding resource, allocate, according to the encoding resource, a corresponding decoding resource to the acquisition end from the currently unused decoding resource, and establish a transmission link between the acquisition end and the receiving end.

In an embodiment, the determining module 303 is specifically configured to determine whether the total number of currently unused decoding resources is greater than the coding resources; if yes, judging that the decoding resources which are not used currently meet the requirements of the encoding resources; otherwise, judging that the decoding resources which are not used currently do not meet the requirements of the encoding resources.

The resource allocation module 304 is specifically configured to allocate a resolution resource matched with the first resolution to the acquisition end from a second resolution that is not currently used; and allocating frame rate resources matched with the first frame rate to the acquisition end from the second frame rate which is not used currently.

In one embodiment, the decoding resource pool includes a plurality of fixed combinations of the second resolution and the second frame rate, as shown in fig. 4, the determining module 303 may include a first determining unit 3031, a second determining unit 3032 and a third determining unit 3033; the resource allocation module 304 may include an obtaining unit 3041, a searching unit 3042, and an allocating unit 3043;

the first determining unit 3031 is configured to determine whether a second resolution of the plurality of fixed combinations meets a first resolution requirement of the encoding resource; if a fixed combination meeting the first resolution requirement in the coding resources exists, recording the fixed combination meeting the first resolution requirement in the coding resources as a first fixed combination set;

the second determining unit 3032 is configured to determine whether a second frame rate in the plurality of fixed combinations meets a fixed combination required by the first frame rate in the coding resource; if a second frame rate in the plurality of fixed combinations meets the fixed combination of the first frame rate requirement in the coding resources, recording the fixed combination meeting the first frame rate requirement in the coding resources as a second fixed combination set;

the third determining unit 3033 is configured to determine whether the same fixed combination exists in the first fixed combination set and the second fixed combination set; and if so, judging that the decoding resources which are not used currently meet the requirement of the encoding resources.

The obtaining unit 3041 is configured to obtain the same fixed combination in the first fixed combination set and the second fixed combination set;

the searching unit 3042 is configured to search a fixed combination closest to the first resolution and the first frame rate from the same fixed combinations;

the assigning unit 3043 is configured to assign the closest fixed combination to the collecting end.

In one embodiment, as shown in fig. 5, image decoding device 30 further includes a notification module 305;

the notification module 305 is configured to send a notification message that the receiving end has insufficient decoding resources and cannot establish a transmission link to the acquisition end when the determination module 303 determines that the currently unused decoding resources do not meet the requirement of the encoding resources.

In one embodiment, as shown in fig. 6, the image decoding apparatus 30 further includes a resource release module 306;

the resource releasing module 306 is configured to release, when detecting an operation instruction for releasing the transmission link, the decoding resource corresponding to the transmission link to the decoding resource pool.

The image decoding device provided by the embodiment of the disclosure can judge whether the decoding resources which are not used currently in the decoding resource pool of the receiving end meet the requirements of the current encoding resources of the image source of the collecting end before the collecting end sends the image encoding data, allocate the corresponding decoding resources for the collecting end and establish the transmission link between the collecting end and the receiving end when the requirements are met, ensure that the image encoding data received by the receiving end can be decoded normally by matching the decoding resources of the decoding end with the current encoding resources of the image source of the collecting end, and simultaneously dynamically allocate the corresponding decoding resources according to the real-time encoding resources, so that the decoding end can meet the use of more scenes, and improve the resource utilization rate of the decoding end. When the transmission link between the acquisition end and the receiving end is actively released, the decoding resources corresponding to the transmission link can be released back to the decoding resource pool, so that the decoding resources can be reused, and dynamic application and release of the decoding resources are realized.

Based on the image decoding 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 image decoding method described in the embodiment corresponding to fig. 1, which is not described herein again.

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.

It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频解码方法、设备、存储介质及程序产品

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类