Multi-format coding reference frame unified management method, device, equipment and medium
By generating reference frame sets and assigning them to reference frame queues according to HEVC specifications, combined with syntax element operations, the complex problem of reference frame management in multi-format composite coding systems is solved, unified management and simplified processes are achieved, and it is suitable for the expansion of multi-format coding systems. .
Patent Information
- Application Number
- CN202210216368.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-07
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-03-07
AI Technical Summary
In the existing technology, multi-format composite coding systems have complex and redundant problems in reference frame management. It is too complicated for each coding standard to independently manage reference frames.
By generating a reference frame set, assigning it to the reference frame queue according to the HEVC specification, and operating the reference frame queue of the next current frame through syntax elements to make it consistent with the reference frame set, unified reference frame management is achieved.
It realizes unified management of reference frames in a multi-format composite coding system with one system, simplifies the management process, is easy to expand, and avoids redundant independent management.
Smart Images

Figure CN114513672B
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital video compression technology, and more particularly to a method, device, equipment and medium for unified management of multi-format coding reference frames. Background Art
[0002] Reference frame management is a key technology in video coding. It is mainly responsible for managing the decoded picture buffer (DPB), selecting the best reference scheme from it, and creating a reference picture queue. The reference picture management method is a high-level structure of the codec framework, which provides a basis for inter-frame prediction. At present, each coding standard has its own set of reference frame management schemes. It is too complicated and redundant to manage reference frames independently for each coding standard in a multi-format composite coding system. Summary of the invention
[0003] In view of the above-mentioned shortcomings of the prior art, the purpose of the present application is to provide a method, device, equipment and medium for unified management of multi-format coding reference frames, so as to solve the problems of complexity and redundancy in reference frame management of multi-format composite coding in the prior art.
[0004] To achieve the above-mentioned purpose and other related purposes, the present application provides a method for unified management of multi-format coding reference frames, the method comprising: generating a reference frame set based on the relationship of the input current frame; allocating the reference frame set to a reference frame queue according to the HEVC specification; calling a corresponding function according to the video format with the reference frame set as input to generate syntax elements; and operating the reference frame queue of the next current frame according to the syntax elements to ensure that it is consistent with the reference frame set.
[0005] In one embodiment of the present application, the generation of a reference frame set based on the relationship of the input current frame includes: determining the number of reference frames of the current frame; determining whether each reference frame is a long-term reference frame or a short-term reference frame; wherein, determining whether it is a short-term reference frame based on the POC difference of the current frame; and / or, designating a reference frame as a long-term reference frame and specifying an id; and determining whether each reference frame is referenced by the current frame.
[0006] In one embodiment of the present application, allocating the reference frame set to the reference frame queue according to the HEVC specification includes: predefining a plurality of reference frame queues; and allocating each reference frame in the reference frame set to a corresponding reference frame queue according to reference frame information.
[0007] In one embodiment of the present application, the reference frame queue includes any one or more of the following: a first queue, used to collect forward short-term reference frames referenced by the current frame; a second queue, used to collect backward short-term reference frames referenced by the current frame; a third queue, used to collect short-term reference frames that are not referenced by the current frame but need to be retained; a fourth queue, used to collect long-term reference frames referenced by the current frame; and a fifth queue, used to collect long-term reference frames that are not currently referenced but need to be retained.
[0008] In one embodiment of the present application, the syntax elements include: determining the key frames in the reference frame queue that need to be updated by the next current frame; generating update instructions for the reference frame queue of the next current frame based on the reference frame set; and specifying a mapping relationship from the reference frame set to the reference frame of the next current frame.
[0009] In one embodiment of the present application, the operation of the reference frame queue of the next current frame according to the syntax element to ensure consistency with the reference frame set includes: marking the reference frame queue of the next current frame to mark frames that do not belong to the reference frame set; generating update instructions for all marked frames to enable the next current frame to update all marked frames; selecting a reference frame for each reference frame queue in the next current frame, and mapping all reference frame queues to reference frames in the reference frame set used by the next current frame.
[0010] To achieve the above-mentioned purpose and other related purposes, the present application provides a unified management device for multi-format coding reference frames, the device comprising: a queue module, used to generate a reference frame set based on the relationship of the input current frame; assigning the reference frame set to the reference frame queue according to the HEVC specification; a processing module, used to call the corresponding function according to the video format with the reference frame set as input to generate syntax elements; and operating the reference frame queue of the next current frame according to the syntax elements to ensure that it is consistent with the reference frame set.
[0011] To achieve the above-mentioned purpose and other related purposes, the present application provides a computer device, which includes: a memory and a processor; the memory stores a computer program, and the processor executes the computer program to implement the method as described above.
[0012] To achieve the above-mentioned purpose and other related purposes, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned method when executed by a processor.
[0013] As described above, the present application provides a method, apparatus, device and medium for unified management of multi-format encoded reference frames, which generates a reference frame set based on the relationship between the input current frame; allocates the reference frame set to a reference frame queue according to the HEVC specification; uses the reference frame set as input and calls the corresponding function according to the video format to generate syntax elements; and operates the reference frame queue of the next current frame according to the syntax elements to ensure consistency with the reference frame set.
[0014] It has the following beneficial effects:
[0015] The present application realizes the use of a unified reference frame management scheme to manage various coding formats, and converts and generates reference frame-related syntax elements required by each format, thereby realizing convenient management and easy expansion by using a system to uniformly manage reference frames in a multi-format composite coding system. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 Shown is a flowchart of a method for unified management of multi-format coding reference frames in an embodiment of the present application.
[0017] Figure 2 Shown is a schematic diagram of updating the AV1 bottom layer reference frame queue in one embodiment of the present application.
[0018] Figures 3A-3C FIG. 4 is a schematic diagram of AV1 reference frame mapping in an embodiment of the present application.
[0019] Figure 4 It is a module diagram of a unified management device for multi-format coding reference frames in one embodiment of the present application.
[0020] Figure 5 Shown is a schematic diagram of the structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0021] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0022] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0023] To solve the above problems, this application proposes a method, device, equipment and medium for unified management of multi-format coding reference frames, which realizes the use of a unified reference frame management scheme to manage various coding formats, and converts and generates the reference frame-related syntax elements required by each format, thereby realizing convenient management and easy expansion of reference frames in a multi-format composite coding system using a system to uniformly manage reference frames. At the same time, a specific implementation plan for unified management of HEVC / AV1 reference frames is proposed. Among them, HEVC (High Efficiency Video Coding) is high-efficiency video coding, and AV1 is a coding format.
[0024] like Figure 1 As shown, a schematic diagram of a flow chart of a method for unified management of multi-format coding reference frames in an embodiment of the present application is shown. As shown in the figure, the method includes:
[0025] Step S101: Generate a reference frame set (RPS) according to the relationship of the input current frame.
[0026] In short, after acquiring the video image, the reference frame information is extracted according to the inter-frame relationship of the input current frame to form a reference frame set (RPS).
[0027] In one embodiment of the present application, the step of generating a reference frame set based on the relationship of the input current frame includes:
[0028] A. Determine the number of reference frames for the current frame;
[0029] B. Determine whether each reference frame is a long-term reference frame or a short-term reference frame; wherein, determine whether it is a short-term reference frame based on the POC difference of the current frame; and / or, designate a reference frame as a long-term reference frame and designate an id;
[0030] Among them, GOP is a number of small groups of pictures (Group Of Pictures, GOP), POC is the display order of images in GOP in video encoding, and the value range is usually 1-GOPSize.
[0031] C. Determine whether each reference frame is referenced by the current frame.
[0032] For example, the reference frame set (RPS) may include the following information: the number of reference frames of the current frame; whether each reference frame is a long-term reference frame; (short-term reference frame) the POC difference of the reference frame relative to the current frame; (long-term reference frame) long-term reference frame id / POC; whether each reference frame is referenced by the current frame, etc.
[0033] Step S102: Allocate a reference frame set to a reference frame queue according to the HEVC specification.
[0034] In simple terms, HEVC uses reference frame sets (RPS) to uniformly manage reference frames, and manages reference frame management information required by various encoding formats in a plug-in manner. This includes: frame-level reference frame queue selection uses HEVC reference frame level for update and maintenance; frame-level reference frame syntax element generation, with the input being the reference frame set (RPS) of the current frame, and each format plug-in generates the corresponding frame header / slice header. Syntax elements based on RPS.
[0035] HEVC (High Efficiency Video Coding) uses the reference frame set (RPS) technology to manage decoded frames and use them as reference frames for subsequent encoding. RPS is a set of parameter information that includes building a reference image queue for the current encoded and decoded image and managing DPB. The encoder configures RPS for the encoded image so that each image contains a mark for image management in the DPB, thereby achieving the purpose of reference image management. HEVC's reference frame set (RPS) displays all reference frames used by the current frame and reference frames that need to be retained. Therefore, it can concisely show changes in the reference frame queue and is suitable as the basic logic for reference frame queue management.
[0036] In one embodiment of the present application, allocating the reference frame set to the reference frame queue according to the HEVC specification includes: predefining a plurality of reference frame queues; and allocating each reference frame in the reference frame set to a corresponding reference frame queue according to reference frame information.
[0037] In one embodiment of the present application, the reference frame queue includes any one or more of the following:
[0038] The first queue is used to collect forward short-term reference frames referenced by the current frame;
[0039] The second queue is used to collect the backward short-term reference frames referenced by the current frame;
[0040] The third queue is used to collect short-term reference frames that are not referenced by the current frame but need to be retained;
[0041] The fourth queue is used to collect long-term reference frames referenced by the current frame;
[0042] The fifth queue is used to collect long-term reference frames that are not currently referenced but need to be retained.
[0043] For example, according to the HEVC specification, reference frame queue management is performed and reference frames in RPS are divided into five queues:
[0044] before: the forward short-term reference frame referenced by the current frame;
[0045] after: the backward short-term reference frame referenced by the current frame;
[0046] follow: short-term reference frames that are not currently referenced but need to be retained;
[0047] lt_current: short-term reference frame referenced by the current frame;
[0048] lt_follow: long-term reference frame that is not currently referenced but needs to be retained;
[0049] It should be noted that the queues described in the present application are not limited to the examples given above, and the present application can also adjust or add different queues according to different format encoding needs.
[0050] Step S103: taking the reference frame set as input and calling the corresponding function according to the video format to generate syntax elements.
[0051] In one embodiment of the present application, the syntax elements include:
[0052] A. Determine the key frame in the reference frame queue that needs to be updated by the next current frame;
[0053] B. The reference frame queue of the next current frame generates an update instruction based on the reference frame set;
[0054] C. Specify the mapping relationship from the reference frame set to the reference frame of the next current frame.
[0055] For example, refresh_frame_flag selects which frames in FrameStore are updated by the current frame; enable_order_hint=1 explicitly specifies the reference frame mapping relationship; ref_order_hint[] selects the reference frame for each slot. It should be noted that the syntax elements described in this application are not limited to the above examples, and this application can also adjust or add relevant syntax elements according to different format encoding needs.
[0056] Step S104: operating the reference frame queue of the next current frame according to the syntax element to ensure consistency with the reference frame set.
[0057] In an embodiment of the present application, operating the reference frame queue of the next current frame according to the syntax element to ensure consistency with the reference frame set includes:
[0058] A. Mark the reference frame queue of the next current frame and mark the frames that do not belong to the reference frame set;
[0059] B. Generate update instructions for all marked frames to make the next current frame update all marked frames;
[0060] C. Select a reference frame for each reference frame queue in the next current frame, and map all reference frame queues to the reference frames in the reference frame set used by the next current frame.
[0061] For example, when managing AV1 reference frames, the underlying reference frame queue generates maintenance update instructions based on the reference frame set (RPS); a fixed mapping logic is used to map from the reference frame set (RPS) to the currently used reference frame.
[0062] In one or more embodiments, the present application takes the generation of AV1 reference frame syntax by a reference frame set (RPS) as an example for detailed explanation.
[0063] Reference frame management for AV1 consists of two parts:
[0064] The entire reference frame queue is managed by FrameStore, where each entry corresponds to a reference frame retained in the queue.
[0065] The reference frames used by the current frame are mapped to 7 Slots (reference frame queues):
[0066] LAST_FRAME / LAST2_FRAME / LAST3_FRAME / GOLDEN_FRAME / BWDREF_FRAME / ALTREF2_FRAME / ALTREF_FRAME; each block can select 1 (single_reference) or 2 (compond_reference) reference frames.
[0067] The relevant syntax elements are:
[0068] refresh_frame_flag selects which frames in FrameStore are updated by the current frame;
[0069] enable_order_hint = 1 explicitly specifies the reference frame mapping relationship
[0070] ref_order_hint[] selects the reference frame for each slot.
[0071] Step 1): Mark the reference frame queue FrameStore of the next current frame, and the frames that are no longer in the reference frame set (RPS) are marked as unused;
[0072] Step 2): Generate refresh_frame_flag containing all items marked as unused, that is, update all unused items with the current frame, such as Figure 2 shown.
[0073] Step 3): Select a reference frame for each slot.
[0074] Here we choose to map all slots to the reference frame used by the current frame in RPS. There are three common cases:
[0075] 1) 1 forward reference frame F0: All 7 slots are mapped to F0, such as Figure 3A As shown, the mapping relationship of 1 reference frame is illustrated.
[0076] 2) 2 reference frames (forward reference frame F0 + backward reference frame F1, or 2 forward reference frames F0, F1):
[0077] LAST_FRAME / LAST2_FRAME / LAST3_FRAME / GOLDEN_FRAME is mapped to F0; BWDREF_FRAME / ALTREF2_FRAME / ALTREF_FRAME is mapped to F1. Figure 3B As shown, the mapping relationship of 1 reference frame is illustrated.
[0078] 3) 3 reference frames (forward reference frame F0 + backward reference frame F1 + long-term reference frame F2):
[0079] LAST_FRAME / LAST2_FRAME / LAST3_FRAME are mapped to F0; BWDREF_FRAME / ALTREF2_FRAME / ALTREF_FRAME are mapped to F1; GOLDEN_FRAME is mapped to F2. Figure 3C The mapping relationship among the three reference frames is illustrated.
[0080] To summarize, the method for unified management of multi-format coding reference frames described in the present application mainly provides an effective reference frame management solution for a multi-format composite coding system, so as to manage various coding formats with a unified reference frame management solution, and convert and generate reference frame-related syntax elements required for each format, thereby realizing convenient management and easy expansion of reference frames in a multi-format composite coding system with a unified system.
[0081] like Figure 4FIG. 4 is a block diagram showing a device for unified management of multi-format coded reference frames in an embodiment of the present application. As shown in the figure, the device for unified management of multi-format coded reference frames 400 includes:
[0082] The queue module 401 is used to generate a reference frame set according to the relationship of the input current frame; and allocate the reference frame set to the reference frame queue according to the HEVC specification;
[0083] The processing module 402 is used to call a corresponding function according to the video format to generate syntax elements with the reference frame set as input; and operate the reference frame queue of the next current frame according to the syntax elements to ensure that it is consistent with the reference frame set.
[0084] It is understandable that the device 200 can achieve the following through the operation of each module: Figure 1 The method for unified management of multi-format coding reference frames.
[0085] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the processing module 402 can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above processing module 402. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0086] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0087] like Figure 5 As shown in the figure, a schematic diagram of the structure of a computer device in an embodiment of the present application is shown. As shown in the figure, the computer device 500 includes: a memory 501 and a processor 502. The memory 501 stores a computer program, and the processor 502 executes the computer program to implement the following Figure 1 The method for unified management of multi-format coding reference frames.
[0088] The memory 501 may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0089] The processor 502 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0090] In one embodiment of the present application, a computer-readable storage medium stores a data transmission program, which is executed by a processor to implement the following Figure 1 The method for unified management of multi-format coding reference frames.
[0091] The computer-readable storage medium, as can be understood by ordinary technicians in this field, can be implemented by hardware related to the computer program. The aforementioned image processing program can be stored in a computer-readable storage medium. When the program is executed, the steps of the aforementioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0092] These computer programs can also be loaded onto a computer or other programmable data processing device to cause a series of operational steps to be executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0093] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0094] In summary, the present application provides a method, device, equipment and medium for unified management of multi-format coding reference frames, which effectively overcomes various shortcomings in the prior art and has high industrial utilization value.
[0095] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A method for unified management of multi-format coding reference frames, characterized in that: The method comprises: Generate a reference frame set based on the relationship of the input current frame; Assign reference frame sets to reference frame queues according to the HEVC specification; Taking the reference frame set as input, calling the corresponding function according to the video coding format to generate syntax elements; Operating the reference frame queue of the next current frame according to the syntax element to ensure consistency with the reference frame set; The allocating the reference frame set to the reference frame queue according to the HEVC specification includes: predefining a plurality of reference frame queues; allocating each reference frame in the reference frame set to a corresponding reference frame queue according to the reference frame information; The reference frame queue includes any one or more of the following: a first queue, used to collect forward short-term reference frames referenced by the current frame; a second queue, used to collect backward short-term reference frames referenced by the current frame; a third queue, used to collect short-term reference frames that are not referenced by the current frame but need to be retained; a fourth queue, used to collect long-term reference frames referenced by the current frame; and a fifth queue, used to collect long-term reference frames that are not currently referenced but need to be retained.
2. The method for unified management of multi-format coding reference frames according to claim 1, characterized in that: The step of generating a reference frame set based on the relationship of the input current frame includes: Determine the number of reference frames of the current frame; Determine whether each reference frame is a long-term reference frame or a short-term reference frame; wherein, whether it is a short-term reference frame is determined based on the POC difference of the current frame; and / or, designate a reference frame as a long-term reference frame and designate an id; Determine whether each reference frame is referenced by the current frame.
3. The method for unified management of multi-format coding reference frames according to claim 1, characterized in that: The syntax elements include: Determine the key frame in the reference frame queue that needs to be updated by the next current frame; The reference frame queue of the next current frame generates an update instruction according to the reference frame set; Specifies the mapping relationship from the reference frame set to the reference frame of the next current frame.
4. The method for unified management of multi-format coding reference frames according to claim 3, characterized in that: The operating the reference frame queue of the next current frame according to the syntax element to ensure consistency with the reference frame set includes: Mark the reference frame queue of the next current frame and mark the frames that do not belong to the reference frame set; Generate update instructions for all marked frames to make the next current frame update all marked frames; A reference frame is selected for each reference frame queue in the next current frame, and all reference frame queues are mapped to the reference frames in the reference frame set used by the next current frame.
5. A unified management device for multi-format coding reference frames, characterized in that: The device comprises: A queue module is used to generate a reference frame set according to the relationship of the input current frame; and allocate the reference frame set to the reference frame queue according to the HEVC specification; A processing module, configured to take a reference frame set as input and call a corresponding function according to a video coding format to generate a syntax element; and operate a reference frame queue of a next current frame according to the syntax element to ensure that the reference frame queue is consistent with the reference frame set; The allocating the reference frame set to the reference frame queue according to the HEVC specification includes: predefining a plurality of reference frame queues; Allocating each reference frame in the reference frame set to a corresponding reference frame queue according to the reference frame information; The reference frame queue includes any one or more of the following: a first queue, used to collect forward short-term reference frames referenced by the current frame; a second queue, used to collect backward short-term reference frames referenced by the current frame; a third queue, used to collect short-term reference frames that are not referenced by the current frame but need to be retained; a fourth queue, used to collect long-term reference frames referenced by the current frame; and a fifth queue, used to collect long-term reference frames that are not currently referenced but need to be retained.
6. A computer device, characterized in that: The device comprises: a memory, a processor, and a communicator; the memory stores a computing program, and the processor executes the computing program to implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
