Processing method of video coding and electronic device
Patent Information
- Application Number
- CN202310089745.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-01
- Filing Date
- 2023-02-08
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-02-08
AI Technical Summary
由于越高解析度的输入图像,将会产生更多的数据区块与编码单元,使得决策树的生成负载也随之增加
[0010]本揭露的视频编码的处理方法与电子装置,对输入图像的多个画格进行编码预测,以产生输出串流信息。视频编码的处理方法透过编码树的预先划分,并产生两组不同的编码树。不同的编码树采用对应的比特率失真值的处理,藉以降低编码树的运算负载。根据第一编码树与第二编码树的构成节点产生输出决策树。视频编码的处理方法降低硬件编码器的运算复杂度,并且能维持相同的编码品质。
Smart Images

Figure CN117156161B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to a digital signal encoding processing and apparatus, and more particularly to a video encoding processing method and electronic device. Background Technology
[0002] The rapid development of the Internet has also spurred the rise of video streaming. To reduce data transmission volume, video encoding is required for the input digital images. In video encoding, the input image is divided into multiple data blocks, and a corresponding coding tree is generated based on the coding units within each data block to predict the momentum of other frames. Higher resolution input images generate more data blocks and coding units, thus increasing the workload of decision tree generation. Summary of the Invention
[0003] In view of this, this disclosure provides a video coding processing method that performs encoding prediction on multiple frames of an input image to generate output stream information. This video coding processing method maintains the same coding quality and reduces the computational complexity of the hardware encoder.
[0004] The video encoding processing method disclosed herein includes the following steps: acquiring a target block in a frame; dividing the target block into at least one encoding unit; loading the target block into an encoding tree generation module to output a first encoding tree and a second encoding tree; calculating the bit rate distortion (BPD) value of each encoding unit by the integer dynamic prediction unit of the encoding tree generation module, selecting the minimum BPD value and the second minimum BPD value from the BPD values, wherein the minimum BPD value is the first integer pixel prediction result, and the second minimum BPD value is the second integer pixel prediction result; generating an output decision tree based on the first encoding tree and the second encoding tree; and generating output stream information based on the output decision tree and the frame. Different encoding trees employ corresponding BPD value processing to reduce the computational load of the encoding tree. The output decision tree is generated based on the constituent nodes of the first encoding tree and the second encoding tree.
[0005] The first integer pixel prediction result is loaded into the pixel sub-pixel motion prediction unit of the coding tree generation module to obtain the first pixel sub-pixel prediction result; the first pixel sub-pixel prediction result is loaded into the coding mode decision unit of the coding tree generation module to obtain the first coding tree; the second integer pixel prediction result is loaded into the pixel sub-pixel motion prediction unit to obtain the second pixel sub-pixel prediction result; and the second pixel sub-pixel prediction result is loaded into the coding mode decision unit to obtain the second coding tree.
[0006] The steps of loading the target block into the coding tree generation module to output the first coding tree and the second coding tree include: selecting a first reference frame; loading the first integer pixel prediction result into the sub-pixel motion prediction unit in low-latency P-frame mode according to the first reference frame, the first coding block, and the second coding block to obtain the first coding tree; loading the second integer pixel prediction result into the sub-pixel motion prediction unit in low-latency P-frame mode according to the first reference frame, the first coding block, and the second coding block to obtain the second coding tree; selecting a first node unit and a second node unit from the first coding tree and the second coding tree respectively according to the first coding block, wherein the node position of the second node unit in the second coding tree corresponds to the position of the first node unit. At the node position of the first coding tree; based on the first coding block, select a first node unit and a second node unit from the first coding tree and the second coding tree respectively, the node position of the second node unit in the second coding tree corresponds to the node position of the first node unit in the first coding tree; based on the coding units of the first node unit and the second node unit, select one of the first node unit or the second node unit as an output unit; based on the coding units of the third node unit and the fourth node unit, select one of the third node unit or the fourth node unit as the other output unit; traverse the first coding tree and the second coding tree and obtain the corresponding output units, and generate an output decision tree based on the selected output units.
[0007] The steps of loading the target block into the coding tree generation module to output the first coding tree and the second coding tree include: selecting a first reference frame and a second reference frame; loading the first integer pixel prediction result into the sub-pixel motion prediction unit in low-latency P-frame mode according to the first reference frame, the second reference frame, and the first coding block to obtain the first coding tree; loading the second integer pixel prediction result into the sub-pixel motion prediction unit in random frame access mode according to the first reference frame, the second reference frame, and the second coding block to obtain the second coding tree; selecting a first node unit and a second node unit from the first coding tree and the second coding tree respectively according to the first coding block, wherein the node position of the second node unit in the second coding tree corresponds to the first section. The node unit is located at the node position of the first coding tree; according to the second coding block, a third node unit and a fourth node unit are selected from the first coding tree and the second coding tree respectively, and the node position of the fourth node unit in the second coding tree corresponds to the node position of the third node unit in the first coding tree; according to the coding units of the first node unit and the second node unit, one of the first node unit or the second node unit is selected as the output unit; according to the coding units of the third node unit and the fourth node unit, one of the third node unit or the fourth node unit is selected as the other output unit; the first coding tree and the second coding tree are traversed and the corresponding output units are obtained, and an output decision tree is generated according to the selected output units.
[0008] The electronic device for processing video encoding includes a storage unit, an encoding tree generation module, and a decision tree module. The storage unit stores the input image, which has multiple frames. The encoding tree generation module obtains a target block from any frame and generates a first encoding tree and a second encoding tree based on the target block. The decision tree module receives the first and second encoding trees and generates an output decision tree based on multiple bit rate distortion values from the first and second encoding trees.
[0009] The coding tree generation module also includes an integer dynamic prediction unit, a pixel-level motion estimation unit, and a coding mode decision unit. The integer dynamic prediction unit generates a first integer pixel prediction result and a second integer pixel prediction result based on the target block. The pixel-level motion estimation unit generates a first pixel-level prediction result based on the first integer pixel prediction result and a second pixel-level prediction result based on the second integer pixel prediction result. The coding mode decision unit generates a first coding tree and a second coding tree based on the first and second pixel-level prediction results; wherein, the integer dynamic prediction unit selects the minimum bit rate distortion value as the first integer pixel prediction result and the second smallest bit rate distortion value as the second integer pixel prediction result.
[0010] The disclosed video coding processing method and electronic device perform encoding prediction on multiple frames of an input image to generate output stream information. The video coding processing method pre-divides the coding tree and generates two different coding trees. Different coding trees are processed with corresponding bit rate distortion values to reduce the computational load of the coding trees. An output decision tree is generated based on the constituent nodes of the first and second coding trees. The video coding processing method reduces the computational complexity of the hardware encoder while maintaining the same coding quality. Attached Figure Description
[0011] [ Figure 1 This is a schematic diagram of the hardware architecture of an electronic device for processing video encoding according to an embodiment of this disclosure.
[0012] [ Figure 2 This is a schematic diagram of the target block and encoding unit of an embodiment of this disclosure.
[0013] [ Figure 3A This is a schematic diagram of the video encoding processing flow according to an embodiment of the present disclosure.
[0014] [ Figure 3B This is a schematic diagram illustrating the generation process of the first and second coding trees according to an embodiment of this disclosure.
[0015] [ Figure 4A This is a schematic diagram of the processing flow for generating each coding tree in a low-latency P-grid mode according to an embodiment of the present disclosure.
[0016] [ Figure 4B This is a schematic diagram of the first coding tree and each node unit of an embodiment of this disclosure.
[0017] [ Figure 4C This is a schematic diagram of the second coding tree and each node unit of an embodiment of this disclosure.
[0018] [ Figure 4D This is a schematic diagram of the output decision tree of an embodiment of this disclosure.
[0019] [ Figure 4E This is a schematic diagram of another output decision tree according to an embodiment of the present disclosure.
[0020] [ Figure 5 This is a schematic diagram of the process for generating an output decision tree according to an embodiment of the present disclosure.
[0021] [ Figure 6A This is a schematic diagram of the processing flow for generating each coding tree in a low-latency P-grid mode according to an embodiment of the present disclosure.
[0022] [ Figure 6B This is a schematic diagram of the first coding tree and each node unit of an embodiment of this disclosure.
[0023] [ Figure 6C This is a schematic diagram of the second coding tree and each node unit of an embodiment of this disclosure.
[0024] [ Figure 6D This is a schematic diagram of the output decision tree of an embodiment of this disclosure.
[0025] [ Figure 7 This is a schematic diagram of the process for generating an output decision tree according to an embodiment of the present disclosure.
[0026] [ Figure 8A This is a schematic diagram of the operation flow of the selection output unit according to an embodiment of the present disclosure.
[0027] [ Figure 8B This is a schematic diagram of the operation flow of the selection output unit according to an embodiment of the present disclosure. Detailed Implementation
[0028] Please refer to Figure 1The diagram shown is a hardware architecture schematic of an electronic device for processing video encoding according to an embodiment of this disclosure. The electronic device 1 for processing video encoding (hereinafter referred to as electronic device 1 in the diagram) includes a storage unit 100, an encoding tree generation module 200, and a decision tree module 300. Electronic device 1 is suitable for image encoding processing of digital images, including AOMedia Video 1 (AV1) or High Efficiency Video Coding (HEVC), etc. The encoding tree generation module 200 and the decision tree module 300 can be run by independent chips, or their related functions can be implemented by the same central processing unit.
[0029] Storage unit 100 stores the input image 400 or temporary data during image encoding processing. The input image 400 has multiple frames 410. Generally, each frame 410 can be divided into at least one superblock 420. The superblock 420 can be selected from luminance samples of the YUV mode of the input image 400. Each superblock 420 can also be divided into at least one encoding block; please refer to [reference needed]. Figure 2 As shown. For ease of explanation, the selected superblock 420 will be referred to as target block 430 below. Figure 2 The circular dashed box in the image indicates the selected target block 430. The size of the target block 430 is, for example, but not limited to, 64*64 pixels, and can also be an array size of 128*128 pixels, depending on the computing power of the electronic device 1. The target block 430 has at least one coding unit 431. The coding units 431 included in the target block 430 form a corresponding coding unit tree structure.
[0030] The target block 430 can be segmented in four ways: "direct segmentation (SPILT)," "no segmentation (NONE SPILT)," "horz segmentation (HORZ SPILT)," and "vertical segmentation (VERT SPILT)." As mentioned earlier, the maximum size of the target block 430 can be 64*64 pixels. The segmentation representation of the encoding unit 431 of the target block 430 can be any one of 32*32 pixels, 16*16 pixels, 8*8 pixels, 16*8 pixels, or 8*16 pixels, such as... Figure 2 As shown. In Figure 2 To facilitate the display of target blocks 430 of different sizes, the target blocks 430 of different sizes are arranged in an alternating manner, rather than limiting the target blocks 430 to that position. Figure 2The tiles in the diagram are represented by different fill lines to represent coding units 431 of different sizes in the target block 430.
[0031] The encoding tree generation module 200 reads the input image 400 from the storage unit 100. The encoding tree generation module 200 selects any frame 410 from the input image 400, and then selects a target block 430 from the selected frame 410. The encoding tree generation module 200 (e.g., ...) Figure 3B The device (shown) may include an Integer Motion Estimation (IME) unit 210, a Fractional Motion Estimation (FME) unit 220, and a Block Mode Decision (BDM) unit 230. The coding tree generation module 200 generates a first coding tree 310 and a second coding tree 320 based on the target block 430. The detailed generation of the first coding tree 310 and the second coding tree 320 will be described later. The decision tree module 300 receives the first coding tree 310 and the second coding tree 320, and generates a corresponding output decision tree 330 based on the bit rate distortion (RDC) values of the first coding tree 310 and the second coding tree 320. The electronic device 1 generates an output stream information based on the output decision tree 330 and other frames 410.
[0032] For further explanation of the generation process of the first coding tree 310 and the second coding tree 320, please refer to [link / reference]. Figure 3A and Figure 3B The figures shown are schematic diagrams of a video encoding processing flow and a generation flow of a first encoding tree and a second encoding tree, respectively, according to an embodiment of this disclosure. The video encoding processing method includes the following steps:
[0033] Step S310: Obtain the target block in the frame;
[0034] Step S320: Divide the target block into at least one coding unit;
[0035] Step S330: Load the target block into the coding tree generation module to output the first coding tree and the second coding tree;
[0036] Step S340: The integer dynamic prediction unit of the coding tree generation module calculates the bit rate distortion value of each coding unit;
[0037] Step S350: Generate an output decision tree based on the first coding tree and the second coding tree; and
[0038] Step S360: Generate output stream information based on the output decision tree and the grid.
[0039] First, the encoding tree generation module 200 reads the input image 400 from the storage unit 100, and selects the grid 410 and the target block 430 (e.g., ...) from the input image 400. Figure 2 (As shown). The coding tree generation module 200 drives the integer dynamic prediction unit 210 and loads the target block 430 into the integer dynamic prediction unit 210. The integer dynamic prediction unit 210 calculates the bit rate distortion value of the target block 430. The bit rate distortion value can be obtained by Equation 1 below.
[0040] RD cost=λR+D,D∈{SAD,SATD} (Formula 1)
[0041] SAD=∑ i,j |Diff(i,j)|,
[0042] Diff(i,j)=Predictor(i,j)-Source(i,j)
[0043] Wherein, Source refers to the grid; Predictor refers to the grid predicted by the integer dynamic prediction unit 210; (i,j) refers to the pixel position in the aforementioned two types of grids.
[0044] When calculating bit rate distortion (BPD) values, the integer dynamic prediction unit 210 can choose either the Sum of Absolute Difference (SAD) or the Hadamard transformed (SATD) method to perform the BPD calculation. The integer dynamic prediction unit 210 calculates multiple BPD values for the target block 430. The integer dynamic prediction unit 210 selects the minimum and second smallest BPD values from all the BPD values. The minimum BPD value is referred to as the first integer pixel prediction result 441. The second smallest BPD value is referred to as the second integer pixel prediction result 442.
[0045] The integer dynamic prediction unit 210 outputs the first integer pixel prediction result 441 and the second integer pixel prediction result 442 to the sub-pixel motion prediction unit 220. Figure 3BTo facilitate the explanation of the generation paths of different coding trees, different pixel-level motion estimation units 220 are connected after the integer dynamic prediction unit 210. However, in practice, the same pixel-level motion estimation unit 220 can be used to calculate the first integer pixel prediction result 441 and the second integer pixel prediction result 442. The pixel-level motion estimation unit 220 generates a first pixel-level prediction result 451 based on the loaded first integer pixel prediction result 441. The pixel-level motion estimation unit 220 generates a second pixel-level prediction result 452 based on the loaded second pixel prediction result. The pixel-level motion estimation unit 220 uses the sum of absolute differences as the bit rate distortion value in its calculation.
[0046] Next, the pixel-level motion estimation unit 220 outputs the first pixel-level estimation result 451 and the second pixel-level estimation result 452 to the coding mode decision unit 230. The coding mode decision unit 230 can choose either the sum of absolute differences (SAD) or the Hadamard transform (SATD) for bit rate distortion calculation. The coding mode decision unit 230 obtains the first coding tree 310 based on the first pixel-level estimation result 451. The coding mode decision unit 230 obtains the second coding tree 320 based on the second pixel-level estimation result 452. The coding mode decision unit 230 outputs the first coding tree 310 and the second coding tree 320 to the decision tree module 300.
[0047] The decision tree module 300 calculates bit rate distortion (BPD) and pixel reconstruction (Recon) values based on the first coding tree 310 and the second coding tree 320. The BPD can be calculated using the sum of squared errors (SSE), as shown in Equation 2 below. The decision tree module 300 obtains the optimal segmentation method for the coding unit 431 based on the BPD, and the segmentation system for the coding unit 431 is the output decision tree 330.
[0048] RD cost = λR + D(SSE)
[0049] (Equation 2)
[0050] SSE=∑ i,j Diff(i,2) 2 ,Diff(i,j)=Recon(i,j)-Source(i,j)
[0051] In one embodiment, the generation process of the first coding tree 310 and the second coding tree 320 can be based on the division of the coding tree according to a reference frame. This embodiment also includes the following processing steps, please refer to... Figure 4A As shown. Figure 4A This is a schematic diagram of the processing flow for generating each coding tree in a low-latency P-frame mode, as disclosed in this embodiment.
[0052] Step S410: Select the first reference frame;
[0053] Step S420: The first integer pixel prediction result is loaded into the sub-pixel motion prediction unit in low-latency P-frame mode according to the first reference frame, the first coding block, and the second coding block to obtain the first coding tree; and
[0054] Step S430: The second integer pixel prediction result is loaded into the sub-pixel motion prediction unit in low-latency P-frame mode according to the first reference frame, the first coding block and the second coding block to obtain the second coding tree.
[0055] First, the electronic device 1 can select any one of the frames 410 other than the target block 430 as the first reference frame. Generally, the electronic device 1 can select any one of the frames 410 that are close to the target block 430, such as the P frame (Predicted Frame), I frame (Intra frame), or B frame (Bi-directional frame) as the first reference frame.
[0056] Next, the integer dynamic prediction unit 210 uses the first coding block 351 and the second coding block 352 (e.g.) Figure 4B , Figure 4C As shown, the first reference frame, the first integer pixel prediction result 441, and the second integer pixel prediction result 442 are processed using low-delay P-frame (LDP) mode, and the first coding tree 310 and the second coding tree 320 are obtained. In other words, the integer dynamic prediction unit 210 applies the first integer pixel prediction result 441 to the first reference frame and performs prediction processing of the first coding block 351, the second coding block 352, and LDP mode. The second integer pixel prediction result 442 is also referenced to the first reference frame and performs prediction processing of the first coding block 351, the second coding block 352, and LDP mode.
[0057] The first coding block 351 is 16*16 pixels in size, while the second coding block 352 is 32*32 pixels in size. The first coding block 351 can be encoded by multiple smaller coding units 431 (e.g., ...). Figure 2 As shown in the diagram. For example, the first coding block 351 can be a square array composed of four 8*8 pixel coding units 431, or composed of two 8*16 pixel coding units 431, or may only include a single 16*16 pixel coding unit 431. The second coding block 352 is composed of only 32*32 pixel coding units 431.
[0058] The integer dynamic prediction unit 210 performs corresponding prediction processing on the target block 430 and outputs a first integer pixel prediction result 441 and a second integer pixel prediction result 442. For ease of explanation, please refer to... Figure 4B , Figure 4C , Figure 4D and Figure 4E The diagram shows a first coding tree and its node units, a second coding tree and its node units, an output decision tree, and another output decision tree, respectively, according to one embodiment of this disclosure. Next, the pixel-level motion prediction unit 220 and the coding mode decision unit 230 perform coding unit 431 prediction and division on the first integer pixel prediction result 441 and the second integer pixel prediction result 442 based on the first coding block 351, to generate the first coding tree 310 and the second coding tree 320. Figure 4B and Figure 4C In the Chinese system, blocks filled with backslashes "\" represent the coding units 431 after being divided by the first coding block 351 and their combination methods. Figure 4B and Figure 4C The blocks filled with slashes " / " in the middle represent the coding units 431 after the second coding block 352 is divided and their combination.
[0059] Finally, the coding tree generation module 200 outputs the first coding tree 310 and the second coding tree 320 to the decision tree module 300. The coding tree generation module 200 generates the output decision tree 330 based on the coding units 431 at different positions in the first coding tree 310 and the second coding tree 320. Please refer to [reference needed]. Figure 5 As shown, it is a flowchart illustrating the process of generating an output decision tree in one embodiment.
[0060] Step S510: Select a first node unit and a second node unit from the first coding tree and the second coding tree respectively according to the first coding block. The node position of the second node unit in the second coding tree corresponds to the node position of the first node unit in the first coding tree.
[0061] Step S520: Select a third node unit and a fourth node unit from the first coding tree and the second coding tree respectively according to the second coding block. The node position of the fourth node unit in the second coding tree corresponds to the node position of the third node unit in the first coding tree.
[0062] Step S530: Select either the first node unit or the second node unit as the output unit based on the encoding units in the first node unit and the second node unit;
[0063] Step S540: Based on the encoding units in the third node unit and the fourth node unit, select either the third node unit or the fourth node unit as the other output unit; and
[0064] Step S550: Traverse the first coding tree and the second coding tree and obtain the corresponding output units, and generate an output decision tree based on the selected output units.
[0065] from Figure 4B and Figure 4C The tree structure relationship between each coding unit 431 of the first coding tree 310 and the second coding tree 320 can be obtained. The decision tree module 300 selects coding units 431 in the first coding tree 310 using the first coding block 351, and takes the selected coding units 431 (or the set of coding units 431) as the first node unit 341.
[0066] Next, the decision tree module 300 selects a second node unit 342 from the second coding tree 320. The node position of the second node unit 342 in the second coding tree 320 corresponds to the node position of the first node unit 341 in the first coding tree 310. In other words, the decision tree module 300 selects the corresponding coding unit 431 from the first coding tree 310 and the second coding tree 320 based on the first coding block 351. For ease of explanation, the first node unit 341 represents the first coding block 351, and the second node unit 342 represents the second coding block 352. The decision tree module 300 further selects the coding unit 431 of the target block 430 based on the segmentation and combination (see reference). Figure 2 As shown, either the first node unit 341 or the second node unit 342 is selected as the output node 345. The output node 345 is a structure that includes the encoding unit 431 in the aforementioned node units.
[0067] Similarly, the decision tree module 300 selects the third node unit 343 and the fourth node unit 344 from the first coding tree 310 and the second coding tree 320 respectively, based on the second coding block 352. Furthermore, the decision tree module 300 selects either the third node unit 343 or the fourth node unit 344 as another output node 345 based on the composition structure of the coding units 431 of the third node unit 343 and the fourth node unit 344. The decision tree module 300 traverses the first coding tree 310 and the second coding tree 320 and obtains all output nodes 345. Generally, the decision tree module 300 can traverse the coding tree in a zigzag pattern, such as... Figure 4B As shown by the arrow. After traversing within the same encoded block, the decision tree module 300 still traverses each node unit between different encoded blocks using a zigzag method, as... Figure 4C As shown. The decision tree module 300 builds an output decision tree 330 based on the output node 345, as follows. Figure 4D As shown. Figure 4E System Figure 4D A schematic diagram of the tree structure of the output decision tree. For example, Figure 4E The root node of the output decision tree 330 has four child nodes, each corresponding to an encoding unit 431 of the output decision tree 330. For example, Figure 4E The left subtree corresponds to the upper left coding unit 431 of the output decision tree 330 (i.e., the area within the dashed box). Similarly, the second subtree from the left is the upper right coding unit 431 of the output decision tree 330, thus this subtree has only a single node. The remaining subtrees can be deduced in the same way.
[0068] In one embodiment, the generation process of the first coding tree 310 and the second coding tree 320 can divide the coding tree according to different numbers of reference frames. This embodiment also includes the following processing steps, please refer to... Figure 6A As shown. Figure 6A This is a schematic diagram of the processing flow for generating each coding tree in a low-latency P-frame mode, as disclosed in this embodiment.
[0069] Step S610: Select the first reference frame and the second reference frame;
[0070] Step S620: The first integer pixel prediction result is loaded into the sub-pixel motion prediction unit in low-latency P-frame mode according to the first reference frame, the second reference frame, and the first coding block to obtain the first coding tree; and
[0071] Step S630: The second integer pixel prediction result is loaded into the sub-pixel motion prediction unit in random grid access mode according to the first reference grid, the second reference grid and the second coding block to obtain the second coding tree.
[0072] Electronic device 1 selects any two frames 410 from the frames 410 outside the target block 430, namely the first reference frame and the second reference frame. Integer dynamic prediction unit 210 applies the first integer pixel prediction result 441 to the first reference frame and the second reference frame, and performs prediction processing for the first coding block 351, the second coding block 352, and the LDP mode. Integer dynamic prediction unit 210 applies the second integer pixel prediction result 442 to the first reference frame and the second reference frame, and performs prediction processing for the first coding block 351, the second coding block 352, and the random access (RA) mode for the random frame 410.
[0073] In some embodiments, the size of the first coding block 351 is 16*16 pixels, and the size of the second coding block 352 is 32*32 pixels. The integer dynamic prediction unit 210 performs the aforementioned prediction processing on the target block 430, outputting a first integer pixel prediction result 441 and a second integer pixel prediction result 442. Both the pixel-level motion prediction unit 220 and the coding mode decision unit 230 divide the coding unit 431 based on the first integer pixel prediction result 441 and the second integer pixel prediction result 442 from the first coding block 351. Please refer to [reference needed]. Figure 6B and Figure 6C As shown.
[0074] Figure 6B The first integer pixel prediction result 441 is applied to the first reference frame and the second reference frame, and in a manner similar to... Figure 4B , Figure 4C The first coding block 351 and the second coding block 352 are output in LDP mode. Figure 6B The first coding block 351 (meaning the first node unit 341) is represented by a straight-line filled area. Figure 6C The area filled with horizontal lines is represented as the second coding block 352 (i.e., the second node unit 342). In this embodiment, the integer dynamic prediction unit 210 further includes the following steps during the processing of the first coding region and the second coding region, please refer to... Figure 7 As shown:
[0075] Step S710: Select a first node unit and a second node unit from the first coding tree and the second coding tree respectively according to the first coding block. The node position of the second node unit in the second coding tree corresponds to the node position of the first node unit in the first coding tree.
[0076] Step S720: Select a third node unit and a fourth node unit from the first coding tree and the second coding tree respectively according to the second coding block. The node position of the fourth node unit in the second coding tree corresponds to the node position of the third node unit in the first coding tree.
[0077] Step S730: Select either the first node unit or the second node unit as the output unit based on the encoding units in the first node unit and the second node unit;
[0078] Step S740: Based on the encoding units in the third node unit and the fourth node unit, select either the third node unit or the fourth node unit as the other output unit; and
[0079] Step S750: Traverse the first coding tree and the second coding tree and obtain the corresponding output units, and generate an output decision tree based on the selected output units.
[0080] The decision tree module 300 selects coding units 431 from the first coding block 351 in the first coding tree 310, and the selected coding units 431 (or a set of coding units 431) serve as the first node unit 341. The decision tree module 300 selects a second node unit 342 from the second coding tree 320. The node position of the second node unit 342 corresponds to the node position of the first node unit 341. Based on the composition structure of the coding units 431 of the first node unit 341 and the second node unit 342, the decision tree module 300 selects either the first node unit 341 or the second node unit 342 as the output node 345.
[0081] The decision tree module 300 further selects the third node unit 343 and the fourth node unit 344 from the first coding tree 310 and the second coding tree 320 respectively, based on the second coding block 352. Please refer to [reference needed]. Figure 6B and Figure 6C Furthermore, the decision tree module 300 selects either the third node unit 343 or the fourth node unit 344 as another output node 345 based on the composition structure of the encoding units 431 of the third node unit 343 and the fourth node unit 344. Figure 6B and Figure 6C In this process, since the third node unit 343 and the fourth node unit 344 correspond to the same composition structure of the coding unit 431, the decision tree module 300 directly selects the third node unit 343. Subsequently, the decision tree module 300 traverses the first coding tree 310 and the second coding tree 320, and obtains all output nodes 345. The decision tree module 300 generates an output decision tree 330 based on the obtained output nodes 345, such as... Figure 6D As shown.
[0082] In one embodiment, after the integer dynamic prediction unit 210 generates the first integer pixel prediction result 441 and the second integer pixel prediction result 442, the sub-pixel motion prediction unit 220 further determines whether each node unit has a leaf node. It should be understood that a node unit can be composed of a single coding unit 431 or multiple coding units 431; therefore, multiple coding units 431 will form a tree structure. Please refer to... Figure 8A and Figure 8B The diagram shown illustrates the operation flow of the selection output unit according to one embodiment of this disclosure. The processing flow of the integer dynamic prediction unit 210 in determining the first node and the second node is as follows:
[0083] Step S811: Determine whether the first node element and the second node element have leaf nodes;
[0084] Step S812: If neither the first node unit nor the second node unit has a leaf node, a new first node unit is selected from the remaining coding units of the first coding tree, and a new second node unit is selected from the remaining coding units of the second coding tree; and
[0085] Step S813: If either the first node unit or the second node unit has a leaf node, select one of them as the output unit based on the bit rate distortion value of the first node unit and the bit rate distortion value of the second node unit.
[0086] The pixel-level motion prediction unit 220 determines whether the first node unit 341 and the second node unit 342 each have leaf nodes. Since the first node unit 341 (or the second node unit 342) may contain more than two coding units 431, the first node unit 341 (or the second node unit 342) will form a tree structure. Figure 6B For example, Figure 6B The first node unit 341 contains two encoding units 431. If neither the first node unit 341 nor the second node unit 342 has a leaf node, the pixel-level motion prediction unit 220 reselects a new first node unit 341 from the remaining encoding units 431 of the first encoding tree 310. Simultaneously, the pixel-level motion prediction unit 220 also selects a new second node unit 342 from the second encoding tree 320 based on the node position of the new first node unit 341.
[0087] If either the first node unit 341 or the second node unit 342 has a leaf node, the pixel-level motion prediction unit 220 will compare the difference between the bit rate distortion value of the first node unit 341 and the bit rate distortion value of the second node unit 342 to see if it exceeds a threshold value. If the difference between the two bit rate distortion values exceeds the threshold value, the pixel-level motion prediction unit 220 selects the first node unit 341 as the output unit, and its structure is as follows: Figure 6B The encoded blocks are filled with straight lines. Conversely, when the difference between two bit rate distortion values does not exceed a threshold value, the pixel motion prediction unit 220 will select the second node unit 342 as the output unit, and its structure is as follows: Figure 6C The encoded blocks are filled with horizontal lines. The encoding tree generation module 200 will use the first encoding tree 310 to perform momentum prediction processing on the first reference frame and the second reference frame.
[0088] The processing flow for determining the third node unit 343 and the fourth node unit 344 by the pixel-level motion estimation unit 220 is as follows:
[0089] Step S821: Determine whether the third node element and the fourth node element have leaf nodes;
[0090] Step S822: If neither the third node unit nor the fourth node unit has a leaf node, a new third node unit is selected from the remaining coding units of the first coding tree, and a new fourth node unit is selected from the remaining coding units of the second coding tree; and
[0091] Step S823: If either the third node unit or the fourth node unit has a leaf node, select one of them as the output unit based on the bit rate distortion value of the third node unit and the bit rate distortion value of the fourth node unit.
[0092] The pixel-level motion prediction unit 220 determines whether the third node unit 343 and the fourth node unit 344 each have leaf nodes. The pixel-level motion prediction unit 220 obtains the corresponding output node 345 according to the processing described above, and establishes a first coding tree 310 and a second coding tree 320. The decision tree module 300 performs momentum prediction processing on the first reference frame based on the first coding tree 310 and the second coding tree 320. Figure 6B In this case, since both the third node unit 343 and the fourth node unit 344 are leafless nodes (their structure has only one combination), the decision tree module 300 will directly select the third node unit 343 as the output node 345. Finally, based on the output node 345 obtained from the first node unit 341, the second node unit 342, the third node unit 343, and the fourth node unit 344, the decision tree module 300 generates the corresponding output decision tree 330, as follows: Figure 6D As shown.
[0093] The video encoding processing method and electronic device 1 perform encoding prediction on multiple frames 410 of the input image 400 to generate output stream information. The video encoding processing method pre-divides the encoding tree and generates two different encoding trees. Different encoding trees are processed with corresponding bit rate distortion values to reduce the computational load of the encoding trees. An output decision tree 330 is generated based on the constituent nodes of the first encoding tree 310 and the second encoding tree 320. The video encoding processing method can reduce the computational complexity of the hardware encoder while maintaining the same encoding quality.
[0094] [Symbol Explanation]
[0095] 1: Electronic devices
[0096] 100: Storage Unit
[0097] 200: Coding Tree Generation Module
[0098] 210: Integer Dynamic Prediction Unit
[0099] 220: Pixel-level motion prediction unit
[0100] 230: Coding Pattern Decision Unit
[0101] 300: Decision Tree Module
[0102] 310: First coding tree
[0103] 320: Second coding tree
[0104] 330: Output Decision Tree
[0105] 341: First node unit
[0106] 342: Second node element
[0107] 343: Third node element
[0108] 344: Fourth node element
[0109] 345: Output Node
[0110] 351: First coded block
[0111] 352: Second coding block
[0112] 400: Input image
[0113] 410: Drawing Frame
[0114] 420: Super Block
[0115] 430: Target Block
[0116] 431: Coding Unit
[0117] 441: First integer pixel prediction result
[0118] 442: Second integer pixel prediction result
[0119] 451: First pixel prediction result
[0120] 452: Second pixel prediction result
[0121] S310~S360, S410~S430, S510~S550, S610~S630, S710~S750, S811~S813, S821~S823: Steps.
Claims
1. A video coding processing method for encoding prediction of one of a plurality of frames in an input image, the video coding processing method comprising: Retrieve a target block within this frame; The target block is divided into at least one coding unit; The target block is loaded into a coding tree generation module to output a first coding tree and a second coding tree; The coding tree generation module calculates a bit rate distortion value for each coding unit by an integer dynamic prediction unit, and selects the minimum bit rate distortion value and the second smallest bit rate distortion value from a plurality of bit rate distortion values. The minimum bit rate distortion value is a first integer pixel prediction result, and the second smallest bit rate distortion value is a second integer pixel prediction result. An output decision tree is generated based on the first coding tree and the second coding tree, including: A first node unit and a second node unit are selected from the first coding tree and the second coding tree respectively, and the node position of the second node unit in the second coding tree corresponds to the node position of the first node unit in the first coding tree. Determine whether the first node element and the second node element have a leaf node; If neither the first node unit nor the second node unit has the leaf node, a new first node unit is selected from the remaining plurality of coding units in the first coding tree, and a new second node unit is selected from the remaining plurality of coding units in the second coding tree; and If either the first node unit or the second node unit has the leaf node, compare whether the difference between the bit rate distortion value of the first node unit and the bit rate distortion value of the second node unit exceeds a threshold value. If the difference exceeds the threshold value, the first node unit is selected as the output unit; if the difference does not exceed the threshold value, the second node unit is selected as the output unit. Traverse the first coding tree and the second coding tree and obtain the corresponding output unit, and generate the output decision tree based on the selected plurality of output units; and An output stream of information is generated based on the output decision tree and the multiple grids.
2. The video encoding processing method according to claim 1, wherein the step of selecting the minimum bit rate distortion value and the second minimum bit rate distortion value from the plurality of bit rate distortion values includes: The first integer pixel prediction result is loaded into the pixel motion prediction unit of the coding tree generation module to obtain a first pixel prediction result; The first pixel prediction result is loaded into a coding mode decision unit of the coding tree generation module to obtain the first coding tree; The second integer pixel prediction result is loaded into the pixel motion prediction unit to obtain a second pixel prediction result; as well as The second pixel prediction result is loaded into the coding mode decision unit to obtain the second coding tree.
3. The video encoding processing method according to claim 1, wherein the step of loading the target block into the encoding tree generation module to output the first encoding tree and the second encoding tree includes: Select a first reference frame; The first integer pixel prediction result is loaded into a sub-pixel motion prediction unit in a low-latency P-frame mode based on the first reference frame, a first coding block and a second coding block to obtain the first coding tree; The second integer pixel prediction result is loaded into the subpixel motion prediction unit in the low-latency P-frame mode according to the first reference frame, the first coding block and the second coding block to obtain the second coding tree; The first node unit and the second node unit are selected from the first coding tree and the second coding tree respectively according to the first coding block; According to the second coding block, a third node unit and a fourth node unit are selected from the first coding tree and the second coding tree respectively. The fourth node unit is located at a node position in the second coding tree, which corresponds to the third node unit being located at the same node position in the first coding tree.
4. The video encoding processing method according to claim 1, wherein the step of loading the target block into the encoding tree generation module to output the first encoding tree and the second encoding tree includes: Select a first reference frame and a second reference frame; The first integer pixel prediction result is loaded into a subpixel motion prediction unit in a low-latency P-frame mode based on the first reference frame, the second reference frame, and a first coding block to obtain the first coding tree; The second integer pixel prediction result is loaded into the sub-pixel motion prediction unit in a random grid access mode according to the first reference grid, the second reference grid and a second coding block to obtain the second coding tree; The first node unit and the second node unit are selected from the first coding tree and the second coding tree respectively according to the first coding block; According to the second coding block, a third node unit and a fourth node unit are selected from the first coding tree and the second coding tree respectively. The node position of the fourth node unit in the second coding tree corresponds to the node position of the third node unit in the first coding tree.
5. The video encoding processing method according to claim 4, wherein the step of traversing the first encoding tree and the second encoding tree and obtaining the corresponding output unit, and generating the output decision tree based on the selected plurality of said output units includes: Determine whether the third node element and the fourth node element have a leaf node; If neither the third node unit nor the fourth node unit has the leaf node, a new third node unit is selected from the remaining plurality of coding units in the first coding tree, and a new fourth node unit is selected from the remaining plurality of coding units in the second coding tree. as well as If either the third node unit or the fourth node unit has the leaf node, compare whether the difference between the bit rate distortion value of the third node unit and the bit rate distortion value of the fourth node unit exceeds a threshold value. If the difference exceeds the threshold value, the third node unit is selected as the output unit; if the difference does not exceed the threshold value, the fourth node unit is selected as the output unit.
6. An electronic device for processing video encoding, comprising: A storage unit stores an input image, which has multiple frames; A coding tree generation module obtains a target block from any of the frames and divides the target block into at least one coding unit. An integer dynamic prediction unit of the coding tree generation module calculates a bit rate distortion value for each coding unit and selects the minimum value from a plurality of bit rate distortion values as a first integer pixel prediction result and the second minimum value as a second integer pixel prediction result to generate a first coding tree and a second coding tree. as well as A decision tree module receives the first encoded tree and the second encoded tree. This decision tree module: A first node unit and a second node unit are selected from the first coding tree and the second coding tree respectively, and the node position of the second node unit in the second coding tree corresponds to the node position of the first node unit in the first coding tree. Determine whether the first node element and the second node element have a leaf node; If neither the first node unit nor the second node unit has the leaf node, a new first node unit is selected from the remaining plurality of coding units in the first coding tree, and a new second node unit is selected from the remaining plurality of coding units in the second coding tree. as well as If either the first node unit or the second node unit has the leaf node, compare whether the difference between the bit rate distortion value of the first node unit and the bit rate distortion value of the second node unit exceeds a threshold value. If the difference exceeds the threshold value, the first node unit is selected as the output unit; if the difference does not exceed the threshold value, the second node unit is selected as the output unit. as well as Traverse the first coding tree and the second coding tree and obtain the corresponding output unit, and generate an output decision tree based on the selected output units.
7. The electronic device for processing video encoding according to claim 6, wherein the encoding tree generation module further includes a pixel motion prediction unit and an encoding mode decision unit, the pixel motion prediction unit generates a first pixel prediction result based on the first integer pixel prediction result, the pixel motion prediction unit generates a second pixel prediction result based on the second integer pixel prediction result, and the encoding mode decision unit generates the first encoding tree and the second encoding tree based on the first pixel prediction result and the second pixel prediction result.
8. The electronic device for processing video encoding according to claim 6, wherein the encoding tree generation module obtains the target block of a first reference frame; the target block is loaded into a subpixel motion estimation unit in a low-latency P-frame mode according to the first reference frame and a first encoding block to obtain the first encoding tree; The target block is loaded into the subpixel motion estimation unit in the low-latency P-frame mode according to the first reference frame and a second coding block to obtain the second coding tree; The decision tree module selects the first node unit and the second node unit from the first coding tree and the second coding tree respectively according to the first coding block; and selects a third node unit and a fourth node unit from the first coding tree and the second coding tree respectively according to the second coding block, wherein the node position of the fourth node unit in the second coding tree corresponds to the node position of the third node unit in the first coding tree.
9. The electronic device for processing video encoding according to claim 6, wherein the encoding tree generation module: acquires a first target block of a first reference frame; acquires a second target block of a second reference frame, the position of the second target block corresponding to the first target block; the first target block is loaded into a subpixel motion estimation unit in a low-latency P-frame mode according to the first reference frame, the second reference frame, and a first encoding block to acquire the first encoding tree; the second target block is loaded into the subpixel motion estimation unit in a random frame access mode according to the first reference frame, the second reference frame, and a second encoding block to acquire the second encoding tree.
Citation Information
Patent Citations
Video coding method and device, medium and electronic equipment
CN113315967A
Encoding mode deciding apparatus, image encoding apparatus, encoding mode deciding method, and encoding mode deciding program
US20070002948A1