Interframe prediction based write and read method, interframe prediction method and apparatus

By employing the method of bottom-right corner address mapping of prediction blocks and remapping of coding tree unit indexes in inter-frame prediction, the problem of low memory address management efficiency in inter-frame prediction is solved, thereby improving hardware processing efficiency and performance.

CN118474348BActive Publication Date: 2025-11-04FUZHOU ROCKCHIP SEMICON
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410487156.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2025-11-04
Estimated Expiration
2044-04-22

AI Technical Summary

Technical Problem

Existing inter-frame prediction read/write methods affect hardware processing efficiency and performance, especially in the storage and read/write of motion vector information, where they suffer from low efficiency and poor hardware area utilization.

Method used

The motion information is updated to memory by using a set angle address mapping method (such as 45 degrees) based on the lower right corner of the prediction block, and memory address management is optimized by remapping the index value of the coding tree unit, thereby reducing frequent memory address updates and data transfer operations.

Benefits of technology

It improves hardware execution efficiency, reduces memory read/write time, optimizes hardware resource overhead, reduces power consumption, and improves hardware processing performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118474348B_ABST
    Figure CN118474348B_ABST
Patent Text Reader

Abstract

The present disclosure provides inter-prediction-based writing and reading methods, and inter-prediction methods and devices. The inter-prediction-based writing method comprises: obtaining motion information of a prediction block; the motion information comprises motion vector data, a size of the prediction block, and a position of the prediction block; based on the size and the position of the prediction block and a set angular address mapping mode, a storage address for the motion information of the prediction block is calculated and obtained; and the motion information of the prediction block is written into a memory based on the storage address. In the present disclosure, the update of the motion information of the prediction block is updated in the memory through the value mapped by the lower right corner of the prediction block in the set angular address mapping mode, which ensures that the motion information of the current prediction block is not covered before other prediction blocks use it, and also saves the frequent update of the memory address space for each prediction block in the inter-prediction process, thereby improving the hardware execution efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure belongs to the field of video encoding and decoding technology, and relates to writing and reading methods, inter-frame prediction methods and apparatus based on inter-frame prediction. Background Technology

[0002] Video codec protocols specify that encoding and decoding within an image or tile are performed according to the raster order of the coding tree unit (CTU). For inter-frame prediction, motion vector calculation is performed with reference to the motion vectors of spatial neighbors. Therefore, the motion vectors already calculated for the left or top neighboring block are used as input parameters for the current block's inter-frame prediction to parse the motion vector of the currently decoded prediction block.

[0003] Therefore, based on the principle that inter-frame prediction uses motion vector information from spatial neighbors, this information needs to be saved after each encoding / decoding unit completes inter-frame motion vector prediction for use in subsequent encoding / decoding prediction blocks. Neighbor motion vector information within a CTU line is generally stored in memory or registers. Using memory for data reading and writing, enabling the reading and writing of neighbor information at the same location simultaneously (i.e., using a serial read / write method), will affect hardware processing efficiency and ultimately impact processing performance. Using registers for direct maintenance supports simultaneous acquisition of neighbor information, improving hardware execution speed; however, register maintenance has complex logic, causing significant congestion in the final hardware circuit layout and routing, ultimately increasing the hardware area. Summary of the Invention

[0004] This disclosure provides a write and read method, an inter-frame prediction method and apparatus based on inter-frame prediction, to solve the problem that existing inter-frame prediction read and write methods affect the processing efficiency and performance of hardware.

[0005] In a first aspect, this disclosure provides a writing method based on inter-frame prediction. The writing method includes: acquiring motion information of a prediction block, the motion information including motion vector data, the size of the prediction block, and the position of the prediction block; calculating a storage address for the motion information of the prediction block based on the size and position of the prediction block and a set angle address mapping method; and writing the motion information of the prediction block into a memory based on the storage address.

[0006] In this disclosure, the motion vector information of the prediction block is updated in memory by mapping the value of the lower right corner of the prediction block to a set angle address (45-degree address). This ensures that the motion information of the current prediction block is not overwritten before it is used by other prediction blocks, and also eliminates the need for each prediction block to frequently update the memory address space multiple times during the inter-frame prediction process, thereby improving hardware execution efficiency.

[0007] In one implementation of the first aspect, calculating the storage address for motion information of the prediction block based on the size and position of the prediction block and a set angle address mapping method includes: obtaining the block position coordinates of the lower right corner of the prediction block based on the size and position of the prediction block; and calculating the storage address based on the block position coordinates of the lower right corner of the prediction block and the set angle address mapping method, wherein the set angle address mapping method indicates that the address is mapped from the block position coordinates of the lower right corner of the prediction block toward the upper left direction by a set angle.

[0008] In one implementation of the first aspect, the writing method further includes: assigning a value of 0 to the index value of the starting coding tree unit before the starting coding tree unit of the current frame image is started, wherein the current frame image includes a plurality of coding tree units and the coding tree unit includes a plurality of prediction blocks; assigning a value of 1 to the index value of the next coding tree unit from the end of the inter-frame prediction of the starting coding tree unit to the start of the inter-frame prediction of the next coding tree unit; and iteratively assigning values ​​to the index values ​​of the remaining coding tree units in sequence.

[0009] In one implementation of the first aspect, the memory includes a row storage address and an adjacent storage address, wherein the row storage address corresponds to the storage address of the row storage position of the coding tree unit, and the adjacent storage address corresponds to the storage address of the left adjacent storage position of the coding tree unit.

[0010] In one implementation of the first aspect, the writing method further includes: from the end of inter-frame prediction of the previous coding tree unit to the start of the current coding tree unit, updating the row storage position of the previous coding tree unit to the left neighbor storage position of the current coding tree unit based on the index value; and updating the left neighbor storage position of the previous coding tree unit to the row storage position of the current coding tree unit.

[0011] In one implementation of the first aspect, the writing method further includes: when updating the row storage position of the current coding tree unit, obtaining the motion information of the upper right corner block of the row storage position of the previous coding tree unit; and backing up the motion information of the upper right corner position to the upper left corner storage position of the current coding tree unit's row storage position.

[0012] In one implementation of the first aspect, the writing method further includes: after the inter-frame prediction of the current coding tree unit is completed, the motion information of the rightmost prediction block of each row of the current coding tree unit is stored in the row storage location of the memory.

[0013] Secondly, this application provides a reading method based on inter-frame prediction. The reading method includes: obtaining a read instruction for motion information required by a prediction block before inter-frame prediction is initiated; and reading the temporal motion information and spatial neighbor motion information of the prediction block from a motion information candidate list based on the read instruction, wherein the spatial neighbor motion information includes motion information of the neighbor positions of the prediction block, and the motion information candidate list stores the temporal motion information and neighbor position motion information of the prediction block.

[0014] In one implementation of the second aspect, the reading method further includes obtaining the motion information candidate list, comprising: obtaining the neighboring edge position information of the prediction block based on the position and size of the prediction block, wherein the neighboring edge position information includes the upper neighboring edge position information, the left neighboring edge position information, and / or the upper left neighboring edge position information; calculating the motion information storage address of the neighboring edge position based on the neighboring edge position information and a set angle address mapping method; reading the motion information of the neighboring edge position from the memory based on the motion information storage address; and updating the motion information of the neighboring edge position to the motion information candidate list.

[0015] In one implementation of the second aspect, the reading method further includes: before the inter-frame prediction of the current coding tree unit is started, acquiring the upper neighbor motion information and index value of the current coding tree unit, wherein the coding tree unit includes several prediction blocks; and updating the upper neighbor motion information to the corresponding position in the memory based on the index value.

[0016] In one implementation of the second aspect, obtaining the motion information candidate list further includes: performing a pre-reading of temporal motion information when the current frame image is started, the current frame image including several coding tree units; after the pre-reading of the temporal motion information is completed, initiating a loading request for the temporal motion information based on the position and size of the current prediction block; and loading the temporal motion information into the motion information candidate list based on the loading request.

[0017] Thirdly, this application provides an inter-frame prediction method. The inter-frame prediction method includes: acquiring temporal motion information and spatial neighbor motion information of a prediction block; calculating a motion vector prediction value of the prediction block based on the temporal motion information and spatial neighbor motion information; adding the motion vector prediction value of the prediction block to the motion vector residual value input from entropy decoding to obtain the motion vector value of the prediction block, as motion vector data; and writing the motion vector data of the prediction block, the size of the prediction block, the position of the prediction block, and the validity of the prediction block as motion information of the prediction block to the corresponding memory address in a set angle address mapping manner.

[0018] Fourthly, this application provides an inter-frame prediction device. The inter-frame prediction device includes: a neighbor information maintenance module, configured to acquire temporal motion information and spatial neighbor motion information of a prediction block; and to write the motion information of the prediction block into a corresponding storage address of a memory using a set angle address mapping method, wherein the motion information of the prediction block includes motion vector data of the prediction block, the size of the prediction block, the position of the prediction block, and the validity of the prediction block.

[0019] In one implementation of the fourth aspect, the inter-frame prediction device further includes: an inter-frame prediction module configured to calculate a motion vector prediction value of the prediction block based on the temporal motion information and spatial neighbor motion information of the prediction block; and the inter-frame prediction module adding the motion vector prediction value of the prediction block to the motion vector residual value of the entropy decoding input to obtain the motion vector value of the prediction block as motion vector data.

[0020] In one implementation of the fourth aspect, the neighbor information maintenance module includes: an acquisition unit configured to acquire the temporal motion information and spatial neighbor motion information of the prediction block; and a writing unit configured to write the motion information of the prediction block into the corresponding storage address of the memory in a set angle address mapping manner, wherein the motion information of the prediction block includes the motion vector data of the prediction block, the size of the prediction block, the position of the prediction block, and the validity of the prediction block.

[0021] In one implementation of the fourth aspect, the neighbor information maintenance module further includes: a temporal motion information storage unit configured to store the temporal motion information of the prediction block; a row storage unit configured to store the row motion information of the prediction block; and a neighbor storage unit configured to store the neighbor motion information of the prediction block.

[0022] In one implementation of the fourth aspect, the inter-frame prediction module includes: a first calculation unit configured to calculate a motion vector prediction value of the prediction block based on the temporal motion information and spatial neighbor motion information of the prediction block; and a second calculation unit configured to add the motion vector prediction value of the prediction block to the motion vector residual value of the entropy decoding input to obtain the motion vector value of the prediction block as motion vector data.

[0023] Fifthly, this disclosure provides an electronic device. The electronic device includes: a memory configured to store a processor-executable program; and a controller configured to invoke the program to perform the writing method, the reading method, and the inter-frame prediction method described above.

[0024] Sixthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon. When executed by an electronic device, the program implements the writing method, the reading method, and the inter-frame prediction method described above.

[0025] According to the inter-frame prediction-based write and read method, inter-frame prediction method, and apparatus described in this disclosure, the update of the prediction block motion information is achieved by updating the memory with the value mapped to the lower right corner of the prediction block using a set angle address mapping method (45-degree address). This ensures that the motion information of the current prediction block is not overwritten before it is used by other prediction blocks, and also eliminates the need for frequent updates to the memory address space for each prediction block during inter-frame prediction, thus improving hardware execution efficiency. Furthermore, by using the indexes 0 and 1 of the coding tree units for labeling, remapping of neighboring edge information of the coding tree units can be achieved. During inter-frame prediction switching of coding tree units, there is no need to perform motion information transfer operations in memory, saving tens of cycles of memory read / write time for each coding tree unit. In addition, when loading the prediction block motion information, different protocols calculate the range of neighboring edge motion information to be used by the current prediction block and obtain the memory address value from the mapping table. They then determine whether the memory addresses in the mapping tables of multiple neighboring edge motion information are the same, eliminating the need to read neighboring edge motion information values ​​from the same address in memory multiple times, further improving hardware execution efficiency. Attached Figure Description

[0026] Figure 1 The diagram shown is a block diagram of the neighbor information maintenance device based on inter-frame prediction according to an embodiment of this disclosure.

[0027] Figure 2 The flowchart shown is a data writing method based on inter-frame prediction as described in an embodiment of this disclosure.

[0028] Figure 3 The flowchart shown is a process for obtaining the storage address of motion information of the prediction block as described in an embodiment of this disclosure.

[0029] Figure 4 The flowchart shown is a data writing method based on inter-frame prediction as described in an embodiment of this disclosure.

[0030] Figure 5 The flowchart shown is a data writing method based on inter-frame prediction as described in an embodiment of this disclosure.

[0031] Figure 6 The flowchart shown is a data writing method based on inter-frame prediction as described in an embodiment of this disclosure.

[0032] Figure 7A This diagram illustrates the memory update of the address mapping corresponding to the 4x4 adjacent edge motion vector information when ctu_idx is 0.

[0033] Figure 7B This diagram illustrates the memory update of the corresponding address mapping when ctu_idx is 1, showing the 4x4 adjacent edge motion vector information.

[0034] Figure 7C This diagram illustrates how a predicted block is written to memory at an address mapped at a 45-degree angle from the bottom right corner of the block.

[0035] Figure 7D This diagram illustrates the prediction of a 45-degree block mapping to obtain the motion vector data of adjacent edges.

[0036] Figure 7E This diagram illustrates the prediction of a 45-degree block mapping and the write-back update of the address mapping table.

[0037] Figure 7F This is a diagram illustrating the CTU_IDX update process.

[0038] Figure 8 The flowchart shown is a data reading method based on inter-frame prediction as described in an embodiment of this disclosure.

[0039] Figure 9 The flowchart shown is a method for obtaining the candidate list of motion information as described in an embodiment of this disclosure.

[0040] Figure 10 The flowchart shown is a method for obtaining the candidate list of motion information as described in an embodiment of this disclosure.

[0041] Figure 11 This diagram illustrates the method for obtaining the motion information candidate list as described in an embodiment of this disclosure.

[0042] Figure 12 The flowchart shown is an example of the inter-frame prediction method described in this disclosure.

[0043] Figure 13 The flowchart shown is a method for maintaining inter-frame predicted neighboring motion vectors according to an embodiment of this disclosure.

[0044] Figure 14 The flowchart shown is a process for updating the index and memory address based on the predicted block width, as described in an embodiment of this disclosure.

[0045] Figure 15 The diagram shown is a structural schematic of the inter-frame prediction device according to an embodiment of this disclosure.

[0046] Figure 16 The diagram shown is a structural schematic of the inter-frame prediction device according to an embodiment of this disclosure.

[0047] Figure 17The diagram shown is a structural schematic of the neighbor information maintenance module described in an embodiment of this disclosure.

[0048] Figure 18 The diagram shown is a structural schematic of the inter-frame prediction module according to an embodiment of this disclosure.

[0049] Figure 19 The diagram shown is a structural schematic of the electronic device described in an embodiment of this disclosure. Detailed Implementation

[0050] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. This disclosure can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0051] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. Therefore, the drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0052] TILE refers to the technique of segmenting an image into smaller rectangular regions that can be decoded independently without relying on other TILEs. In the context of video coding and image processing, TILE is a concept in the H.265 / HEVC (High Efficiency Video Coding) coding standard that allows a frame of an image to be divided into multiple independent rectangular regions, each of which is called a TILE.

[0053] A Coding Tree Unit (CTU) is a fundamental processing unit in video coding, used to efficiently organize and process image data. The CTU plays a crucial role in video coding standards; it's a concept introduced in the H.265 / HEVC standard to improve the efficiency and performance of video compression. A CTU can be further divided into smaller units, including Coding Units (CUs), Prediction Units (PUs), and Transform Units (TUs). These units each undertake different coding tasks, such as prediction, transform, and quantization, collectively completing the entire CTU coding process.

[0054] A Prediction Unit (PU), also known as a prediction block, is a fundamental processing block in video coding. The PU plays a crucial role in the H.265 / HEVC coding standard, serving as the unit responsible for prediction. Within a single CU (coding unit), the PU can be divided in different ways to accommodate various prediction requirements.

[0055] "Neighbor motion vector" is not a commonly used term in this field. There are similar terms. The term translated by the H.264 protocol is "Spatial motion vector neighbor".

[0056] The current CTU's spatial neighbor motion information includes the motion vector information of the row above the current CTU, i.e., the neighbor motion vector information of the CTU. The spatial neighbor motion information contains motion vector information and other information, with the motion vector information being the most important data.

[0057] The PU block neighbor motion vector information contains all the spatial neighbor motion vector information of the PU block.

[0058] For maintaining neighboring motion vector information in inter-frame prediction using existing hardware architectures, information maintenance mainly includes the storage and read / write management of motion information. The first approach uses memory for data reading and writing, enabling the reading and writing of neighboring information at the same location simultaneously, i.e., a serial read / write method, which impacts hardware processing efficiency and ultimately performance. The second approach uses registers for direct maintenance, supporting simultaneous acquisition of neighboring information and improving hardware execution speed. However, register maintenance is logically complex, causing significant congestion in the final hardware circuit layout and routing, ultimately increasing the hardware area. In the existing hardware area utilization distribution, poorly utilized areas may be surrounded by more utilized areas, affecting area efficiency.

[0059] This disclosure provides a writing and reading method, an inter-frame prediction method and apparatus based on inter-frame prediction, which solves the problem that the inter-frame prediction reading and writing method in the prior art affects the processing efficiency and performance of the hardware.

[0060] In some embodiments, an architecture design based on inter-frame prediction of neighboring motion vector information maintenance is provided, which can integrate hardware implementations of five video formats: HEVC / H264 / VP9 / AVS2 / AV1, which can greatly save the area overhead of hardware implementation and reduce power consumption to the greatest extent possible.

[0061] In some embodiments, this disclosure employs an architecture design based on inter-frame predicted neighboring motion vector information maintenance, using memory and address mapping management, and optimizing the number of memory reads and writes based on the current block size, ultimately improving hardware execution efficiency. Here, "memory" refers to the SRAM storage unit inside the chip; in this disclosure, "memory" is used to represent memory.

[0062] In some embodiments, this disclosure is based on an architecture design that maintains inter-frame predicted neighboring motion vector information. The address mapping uses a 45-degree mapping to iterate the motion vector information of the prediction unit (PU) of the CTU. The address is calculated based on the lower right corner position of the current prediction block and updated in the memory maintained by the neighboring motion vector, thereby reducing the depth of the memory and optimizing hardware resource overhead.

[0063] In some embodiments, this disclosure is based on an architecture design for maintaining neighboring motion vector information based on inter-frame prediction. The maintenance of neighboring motion vector information is achieved by remapping through CTU jump. The motion vector information of the block to the right of CTU is automatically mapped to the storage address above. The data stored in the memory does not need to be swapped to enable normal reading and writing of neighboring information, reducing the need for additional data movement in the memory and improving hardware computing efficiency.

[0064] Figure 1 The diagram shown is a block diagram of a neighbor information maintenance device based on inter-frame prediction provided in an embodiment of this disclosure. Figure 1 As shown, the neighbor information maintenance device based on inter-frame prediction includes an inter-frame prediction module and a neighbor information maintenance module.

[0065] Before entering the inter-frame prediction (MVP) calculation, the inter-frame prediction module needs to prepare temporal and spatial neighboring motion vector information. Spatial neighboring motion information includes the motion vector data of the row above the current frame unit (CTU), prepared before the current CTU starts, while the block neighboring motion vector data within the CTU is prepared before the current block starts. Spatial neighboring motion information actually includes motion vectors and other information, with motion vectors being the most important data. CTU neighboring motion vector information mainly refers to the spatial neighboring block motion vector data used when the vertical position (PU_Y) of the top-left point of the prediction block within the current CTU is 0. PU block neighboring motion vector information has a broader scope, encompassing all spatial neighboring motion vector information of the PU block.

[0066] The inter-frame prediction module updates the output motion vector data of the current block after the inter-frame prediction block is processed, and stores it in memory for use by the right or bottom neighboring block to perform spatial neighboring motion vector prediction.

[0067] The inter-frame prediction module iterates repeatedly during the process of loading and calculating the adjacent motion vector data of the inter-frame prediction block and writing and updating the current motion vector data until the entire TILE or image encoding and decoding is completed.

[0068] The main function of the inter-frame prediction module is to calculate the MV (motion vector) information of the current prediction block. It inputs the neighbor MV from the neighbor information maintenance module, calculates the MV information of the current block, and outputs it to the neighbor information maintenance module for use by the next PU block.

[0069] The inter-frame prediction module mainly initiates read and write MV commands, while the specific operation steps are handled by the neighbor information maintenance module.

[0070] like Figure 1 As shown, the calculation process of inter-frame prediction MV is mainly described, including the relevant content of the neighbor information maintenance module of the point of this invention within the dashed box.

[0071] Loading temporal motion information: Calculate the number of temporal motion information items and their corresponding addresses that the current PU block needs to use.

[0072] Loading motion information of neighboring edges on the spatial domain CTU: Obtain the motion information of all neighboring edges on the CTU that the current encoder / decoder needs to use from the motion information in the row storage, and calculate the number and corresponding address.

[0073] Loading motion information of the left neighbor of the spatial CTU: Read the motion information of the left neighbor of the CTU that the current coded CTU needs to use from the SRAM of the neighbor information maintenance, and determine the number and address based on the specific PU position, size and neighbor information predicted by the inter-frame prediction.

[0074] Loading of neighboring motion information within the spatial CTU: This includes loading motion information of the left and top neighboring edges of the inter-frame prediction PU block, and determining the number and address based on the PU position, size, and neighboring edge information.

[0075] Update to the time domain output control unit: The neighbor information maintenance module mainly outputs the current PU predicted MV value, PU size, PU coordinate position and validity to the COLMV compression and bitstream output unit through the time domain output control unit.

[0076] Update to the row storage control unit: The neighbor information maintenance module mainly outputs the current PU predicted MV value, PU size, PU coordinate position and validity to the row motion information compression and bitstream output unit through the row storage control unit.

[0077] Motion Vector Neighbor Information Maintenance Storage Control Unit: The neighbor information maintenance module mainly updates the current PU predicted MV value, PU size, PU coordinate position and validity output to the SRAM address and address mapping table through 45-degree address mapping and the corresponding CTU_IDX information value via the motion vector neighbor information maintenance storage control unit.

[0078] The technical solutions in the embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0079] It should be noted that the angle address mapping method in this disclosure is illustrated using a 45-degree angle mapping as an example, and this disclosure is not limited to a preset address mapping angle of 45 degrees.

[0080] Figure 2 The flowchart shown is a writing method based on inter-frame prediction provided in an embodiment of this disclosure. Figure 2 As shown, the writing method based on inter-frame prediction provided in this embodiment includes the following steps S11 to S13.

[0081] Step S11: Obtain motion information of the prediction block, including motion vector data, the size of the prediction block, and the position of the prediction block.

[0082] Step S12: Based on the size and position of the prediction block and the set angle address mapping method, calculate the storage address for the motion information of the prediction block. The set angle address mapping method in this disclosure is illustrated using a 45-degree angle mapping as an example.

[0083] Step S13: Write the motion information of the predicted block into the memory based on the storage address. In this disclosure, "memory" refers to the storage unit inside the chip (SRAM).

[0084] It should be noted that the labels S11 to S13 are only used to identify different steps, and not to restrict the execution order of these steps.

[0085] In one implementation, the maintenance of 4x4 block motion vector information for inter-frame prediction in various formats such as HEVC / H264 / VP9 / AVS2 / AV1 is achieved by using 4x4 as the smallest block for address mapping. When loading the inter-frame prediction neighbor motion vector, the neighbor motion vector information is read from memory using a 45-degree address mapping method based on the neighbor block position. When writing, the motion vector information calculated for the current block is written to memory using a 45-degree address mapping method.

[0086] Figure 3 This is a flowchart illustrating how, according to an embodiment of this disclosure, the storage address for calculating motion information of the prediction block is obtained based on the size and position of the prediction block and a set angle address mapping method. (See flowchart for example.) Figure 3 As shown, the method for calculating the storage address for motion information of the prediction block based on the size and position of the prediction block and the set angle address mapping method provided in this embodiment includes the following steps S121 to S122.

[0087] Step S121: Obtain the block position coordinates of the lower right corner of the prediction block based on the size and position of the prediction block.

[0088] Step S122: Calculate the storage address based on the block position coordinates of the lower right corner of the predicted block and the set angle address mapping method. The set angle address mapping method means mapping the address from the block position coordinates of the lower right corner of the predicted block towards the upper left direction at a set angle.

[0089] In one implementation, the motion vector calculation of the inter-frame prediction module is completed, and the motion vector information storage is written out regardless of whether the current prediction block is an inter-frame or intra-frame prediction block. Moreover, regardless of the size of the current prediction block, it only needs to write one location internally using the 4x4 block in the lower right corner through 45-degree address mapping. Therefore, the memory writing time can be reduced and the hardware execution efficiency can be improved.

[0090] In some implementations, motion vector information maintains a corresponding 45-degree angle mapping, and the derivation of the current predicted block update address calculation is as follows:

[0091] PU_W represents the prediction block width;

[0092] PU_H represents the predicted block height;

[0093] PU_X represents the horizontal position of the top-left point of the prediction block within the current CTU;

[0094] PU_Y represents the vertical position of the top-left point of the prediction block within the current CTU;

[0095] PU_X_EXT = PU_X + PU_W;

[0096] PU_Y_EXT = PU_Y + PU_H;

[0097] PU_WR_MEM_ADDR_TMP=16+PU_X_EXT-PU_Y_EXT;

[0098]

[0099]

[0100] Wherein, PU_X_EXT represents the horizontal position of the upper right point of the prediction block within the current CTU; PU_Y_EXT represents the vertical position of the lower left point of the prediction block within the current CTU; PU_WR_MEM_ADDR_TMP represents the intermediate value of the 45-degree mapping address written to the adjacent motion information storage for the current inter-frame prediction block update; and PU_WR_MEM_ADDR represents the 45-degree mapping address written to the adjacent motion information storage for the current inter-frame prediction block update.

[0101] Figure 4 The flowchart shown is a writing method based on inter-frame prediction provided in an embodiment of this disclosure. Figure 4 As shown, the writing method based on inter-frame prediction provided in this embodiment includes the following steps S21 to S23.

[0102] Step S21: Before starting the initial coding tree unit of the current frame image, assign the index value of the initial coding tree unit to 0. The current frame image includes several coding tree units, and the coding tree unit includes several prediction blocks.

[0103] Step S22: From the end of the inter-frame prediction of the starting coding tree unit to the start of the inter-frame prediction of the next coding tree unit, the index value of the next coding tree unit is assigned to 1.

[0104] Step S23: Iteratively assign values ​​to the index values ​​of the remaining coding tree units.

[0105] In one implementation, after the entire CTU process for inter-frame prediction is completed, the values ​​of CTU_IDX (0 and 1) are swapped. At the left boundary of the image or the left boundary of the tile, the CTU initially assigns a value of 0 to CTU_IDX. Before the next CTU begins after the current CTU ends, CTU_IDX is assigned a value of 1. Before the next CTU begins, CTU_IDX is again assigned a value of 0, and so on. CTU_IDX represents the CTU number; during image encoding and decoding, consecutive CTUs are numbered 0 and 1 respectively, and this cycle repeats.

[0106] In one embodiment of this application, the memory includes row storage address and adjacent storage address, wherein the row storage address corresponds to the storage address of the row storage position of the coding tree unit, and the adjacent storage address corresponds to the storage address of the left adjacent storage position of the coding tree unit.

[0107] Figure 5 The flowchart shown is a writing method based on inter-frame prediction provided in an embodiment of this disclosure. Figure 5 As shown, the writing method based on inter-frame prediction provided in this embodiment includes the following steps S31 to S32.

[0108] Step S31: From the end of the inter-frame prediction of the previous coding tree unit to the start of the current coding tree unit, update the row storage position of the previous coding tree unit to the left neighbor storage position of the current coding tree unit based on the index value.

[0109] Step S32: Update the left neighbor storage position of the previous coding tree unit to the row storage position of the current coding tree unit.

[0110] In one implementation, after the entire CTU process for inter-frame prediction is completed, all adjacent motion vector information in the right column of the CTU is written to the position where the motion vector of the previous row of the CTU is written after 45-degree address mapping. After the next CTU starts, the address mapping is swapped, that is, the row motion vector storage position of the previous CTU is updated to the left adjacent motion vector information storage position of the right CTU, and the left adjacent motion vector information storage position of the previous CTU is updated to the position where the motion vector of the previous row of the CTU is written. This eliminates the need for data transfer through memory, reduces memory writing time, and improves hardware execution efficiency.

[0111] Figure 6 The flowchart shown is a writing method based on inter-frame prediction provided in an embodiment of this disclosure. Figure 6 As shown, the writing method based on inter-frame prediction provided in this embodiment of the present disclosure further includes the following steps S33 to S34.

[0112] Step S33: When updating the row storage position of the current coding tree unit, obtain the motion information of the upper right corner block of the row storage position of the previous coding tree unit.

[0113] Step S34: Back up the motion information at the upper right corner to the upper left corner of the row storage position of the current coding tree unit.

[0114] In one implementation, during the writing of the previous row of motion vectors in the inter-frame prediction CTU, the position of the prediction block in the upper right corner will not be covered by the prediction block inside the current CTU. During the prediction process inside the CTU, it is backed up to the position in the upper left corner, so it does not need to be repeatedly moved from the row motion vector memory to the memory.

[0115] In one embodiment of this application, after the inter-frame prediction of the current coding tree unit is completed, the motion information of the rightmost prediction block of each row of the current coding tree unit is stored in the row storage location of the memory.

[0116] For example, Figure 7A This diagram illustrates the memory update of the address mapping corresponding to the 4x4 adjacent edge motion vector information when ctu_idx is 0. Figure 7B This diagram illustrates the memory update of the corresponding address mapping when ctu_idx is 1, showing the 4x4 adjacent edge motion vector information.

[0117] like Figures 7A to 7B As shown, after the CTU ends, the neighboring motion information is stored in SRAM through a 45-degree address mapping. It can be seen that the motion information to the right of the CTU is updated to the SRAM location of the upper neighboring edge. Before the left neighboring motion information of the inter-frame prediction space is loaded at the start of the right CTU, the address for reading data from SRAM is adjusted by updating CTU_IDX. This eliminates the need to move the neighboring motion information already stored in SRAM to a new address space, optimizes the number of SRAM reads and writes, and improves hardware execution efficiency.

[0118] In one implementation, during the writing of the previous row of motion vectors in the inter-frame prediction CTU, the position at the top right corner 32 / 33 will not be covered by the prediction block inside the current CTU. During the prediction process inside the CTU, it is backed up to the position at the top left corner when CTU_IDX is 0 (position 16 / 17) or when CTU_IDX is 1 (position 0 / 1), without needing to repeatedly move it from the row motion vector memory to the memory.

[0119] Figure 7C This diagram illustrates how a predicted block is written to memory at an address mapped at a 45-degree angle from the bottom right corner of the block. Figure 7D This diagram illustrates the prediction of a 45-degree block mapping to obtain the motion vector data of adjacent edges. Figure 7E This diagram illustrates the prediction of a 45-degree block mapping and the write-back update of the address mapping table.

[0120] like Figures 7C to 7EThe diagram illustrates the spatial neighboring blocks searched by each PU block, and the process and case analysis of updating the PU block output to maintain neighboring motion information. Before calculating the MV, the current inter-frame prediction PU block needs to access the range of spatial neighboring blocks. If the address information in the SRAM address mapping table all points to the same location, then only one SRAM read is needed to indicate that the values ​​within this spatial neighboring block range are the same motion information value; multiple neighboring block addresses do not need to be read repeatedly. After calculating the MV, when updating the SRAM via 45-degree address mapping, the current inter-frame prediction PU block only needs to calculate the coordinates of the lower right corner of the PU block to determine the 45-degree mapped address value and update it in the SRAM; multiple SRAM addresses do not need to be updated.

[0121] like Figure 7D As shown, for prediction block ① and PU16*4 block, by judging the left neighbor, top left neighbor, and top neighbor and the width and height dimensions, only two addresses, 20 and 25, are needed to obtain all neighbor information (6 were needed before the improvement); for prediction block ② and PU16*16 block, by judging the left neighbor, top left neighbor, and top neighbor and the width and height dimensions, only three addresses, 4, 8, and 12, are needed to obtain all neighbor information (9 were needed before the improvement).

[0122] like Figure 7E As shown, for predicted block ① and PU16*8 block, update address indices 17 to 21 and write memory address 20; for predicted block ② and PU8*8 block, update address indices 27 to 29 and write memory address 28; for predicted block ③ and PU8*16 block, update address indices 3 to 7 and write memory address 4.

[0123] Specifically, taking predicted block ① as an example, the following derivation is made using the current predicted block update address calculation method described above:

[0124] PU_W = 4;

[0125] PU_H = 2;

[0126] PU_X = 4;

[0127] PU_Y = 2;

[0128] PU_X_EXT=PU_X+PU_W=4+4=8;

[0129] PU_Y_EXT=PU_Y+PU_H=2+2=4;

[0130] PU_WR_MEM_ADDR_TMP=16+PU_X_EXT-PU_Y_EXT=16+8-4=20;

[0131] At this point, CTU_IDX == 0;

[0132] PU_WR_MEM_ADDR=PU_WR_MEM_ADDR_TMP=20;

[0133] Therefore, the memory address is set to 20; the address indexes 17-21 are updated.

[0134] It should be noted that the above-mentioned read and write operations of adjacent edge motion information optimize the number of SRAM read and write operations and improve hardware execution efficiency.

[0135] Figure 7F This is a diagram illustrating the CTU_IDX update process. (See diagram below.) Figure 7F As shown, after the entire CTU processing is completed, the values ​​of CTU_IDX (0 and 1) are swapped. At the left boundary of the image or the left boundary of the tile, the CTU initially assigns a value of 0 to CTU_IDX. Before the next CTU begins after the current CTU ends, CTU_IDX is assigned a value of 1. Before the next CTU begins, CTU_IDX is again assigned a value of 0, and so on. CTU_IDX represents the CTU number. During image encoding and decoding, consecutive CTUs are numbered 0 and 1 respectively, and this cycle repeats.

[0136] Figure 8 The flowchart shown is a presentation of a reading method based on inter-frame prediction provided in an embodiment of this disclosure. Figure 8 As shown, the reading method based on inter-frame prediction provided in this embodiment includes the following steps S41 to S42.

[0137] Step S41: Before inter-frame prediction starts, obtain the read command for the motion information required by the prediction block.

[0138] Step S42: Based on the read instruction, read the temporal motion information and spatial neighbor motion information of the prediction block from the motion information candidate list. The spatial neighbor motion information includes the motion information of the neighbor positions of the prediction block, and the motion information candidate list stores the temporal motion information and the motion information of the neighbor positions of the prediction block.

[0139] Specifically, the inter-frame prediction module mainly initiates instructions for reading and writing motion information, and how to operate is handled by the neighbor information maintenance.

[0140] In one implementation, before calculating the motion vector of the inter-frame prediction module, it is necessary to extract the motion vector information of the adjacent spatial domain. When acquiring the motion vector information of the adjacent block on the upper side of the prediction block, the width of the upper adjacent block is read in multiples of 4. When acquiring the motion vector information of the left adjacent block of the prediction block, the height of the upper adjacent block is read in multiples of 4. This reduces the number of consecutive memory reads and improves hardware execution efficiency.

[0141] In one embodiment, the reading method based on inter-frame prediction provided in this disclosure further includes: obtaining the motion information candidate list.

[0142] Figure 9 The flowchart shown is an embodiment of this disclosure for obtaining the candidate list of motion information. Figure 9 As shown, the method for obtaining the candidate list of motion information provided in this embodiment includes the following steps S51 to S54.

[0143] Step S51: Based on the position and size of the predicted block, obtain the neighboring edge position information of the predicted block. The neighboring edge position information includes the upper neighboring edge position information, the left neighboring edge position information, and / or the upper left neighboring edge position information.

[0144] Step S52: Based on the neighboring edge position information and the set angle address mapping method, calculate and obtain the motion information storage address of the neighboring edge position.

[0145] Step S53: Read the motion information of the adjacent position from the memory based on the motion information storage address.

[0146] Step S54: Update the motion information of the adjacent positions to the motion information candidate list.

[0147] In one implementation, before the motion vector calculation of the inter-frame prediction module, when acquiring the motion vector information of the upper neighbor block, the width of the upper neighbor block is read in multiples of 4, and when acquiring the motion vector information of the left neighbor block, the height of the upper neighbor block is read in multiples of 4, thereby reducing the number of consecutive memory reads and improving hardware execution efficiency.

[0148] Figure 10 The flowchart shown is a presentation of a reading method based on inter-frame prediction provided in an embodiment of this disclosure. Figure 10 As shown, the reading method based on inter-frame prediction provided in this embodiment includes the following steps S55 to S56.

[0149] Step S55: Before the inter-frame prediction of the current coding tree unit is started, obtain the motion information and index value of the upper neighbor of the current coding tree unit. The coding tree unit includes several prediction blocks.

[0150] Step S56: Update the upper neighbor movement information to the corresponding position in the memory based on the index value.

[0151] Figure 11 The flowchart shown is an embodiment of this disclosure for obtaining the candidate list of motion information. Figure 11 As shown, the method for obtaining the motion information candidate list provided in this embodiment includes the following steps S61 to S63.

[0152] Step S61: When the current frame image is started, perform a pre-read of temporal motion information. The current frame image includes several coding tree units.

[0153] Step S62: After the pre-reading of the temporal motion information is completed, a loading request for the temporal motion information is initiated based on the position and size of the current prediction block.

[0154] Step S63: Load the temporal motion information into the motion information candidate list based on the loading request.

[0155] Figure 12 The flowchart shown is an example of an inter-frame prediction method provided in an embodiment of this disclosure. Figure 12 As shown, the inter-frame prediction method provided in this embodiment includes the following steps S71 to S74.

[0156] Step S71: Obtain the temporal motion information and spatial neighbor motion information of the prediction block.

[0157] Step S72: Based on the temporal motion information and spatial neighbor motion information of the predicted block, calculate the predicted motion vector value of the predicted block.

[0158] Step 73: Add the predicted motion vector value of the predicted block to the motion vector residual value of the entropy decoding input to obtain the motion vector value of the predicted block, which is used as motion vector data.

[0159] Step S74: The motion vector data of the prediction block, the size of the prediction block, the position of the prediction block, and the validity of the prediction block are used as the motion information of the prediction block and written to the corresponding storage address of the memory in a set angle address mapping manner.

[0160] In one implementation method, Figure 13 The diagram shows a flowchart of the inter-frame prediction neighbor motion vector maintenance method described in an embodiment of this disclosure. Figure 13 As shown, the inter-frame prediction neighbor motion vector maintenance method includes the following steps S1 to S8.

[0161] Step S1, TILE / SLICE starts time domain information pre-reading: After receiving the completion of time domain motion information pre-reading, the adjacent edge motion information read and write control module will initiate a request to load time domain motion information based on the current position and size of the PU block.

[0162] Step S2: Reading the spatial information of adjacent edges on CTU and writing to SRAM: When the inter-frame prediction CTU starts, it loads motion information from the row adjacent edge information encoding and decoding module and updates the corresponding position in SRAM through the CTU_IDX value.

[0163] Step S3: Read the spatial motion information of the PU block's adjacent edges. Read SRAM: The process of loading the spatial motion information of the PU block's adjacent edges. When the current PU block is at the upper boundary of the CTU, i.e., PU_Y is 0, the motion information of the upper adjacent edge of the CTU will be used. When the current PU block is at the left boundary of the CTU, i.e., PU_X is 0, the motion information of the left adjacent edge of the CTU will be used.

[0164] Step S4: Motion Vector Candidate List Establishment and Update: The inter-frame prediction PU block prepares all temporal and spatial neighboring motion information, and inter-frame prediction starts calculating the motion vector prediction value of the current PU block and updating it to the candidate list.

[0165] Step S5, Motion Vector Calculation: The inter-frame prediction calculates the predicted motion vector value and adds it to the motion vector residual value input by entropy decoding to obtain the motion vector value of the current inter-frame prediction block.

[0166] Step S6: Back up the motion vector information of the upper right corner of the CTU to the upper left corner of the CTU: The inter-frame prediction PU block will use the neighboring motion information of the upper left and upper right corners of the CTU. When loading the neighboring information on the CTU, it is not necessary to reload the data of the lower right corner of the previous CTU. It is only necessary to back up the motion vector information of the original upper right corner of the CTU to the upper left corner of the CTU in the neighboring information maintenance module.

[0167] Step S7, Motion Information Write-back to SRAM Control: After the current inter-frame prediction PU block calculates the motion vector value, it updates motion information, including motion vector, block size, block coordinate position, validity, etc., to the SRAM maintained by the neighbor information. The information is written into the SRAM address space through 45-degree address mapping and SRAM write optimization strategy.

[0168] Step S8, Motion Information Writing Overall Control: After the current inter-frame prediction PU block calculates the motion vector value, it updates the COLMV compression and bitstream output unit, the line motion information compression and bitstream output unit, and the motion compensation calculation module according to the size and position of the PU block.

[0169] It should be noted that the specific implementation methods of steps S1 to S8 are described above and will not be repeated here.

[0170] For example, Figure 14 This diagram illustrates how row storage motion vectors update indexes and memory addresses based on predicted block widths, as described in an embodiment of this disclosure. Figure 14 As shown, when storing the row adjacent edge information control input, the larger the width of the PU block of the adjacent edge on the CTU, the higher the execution efficiency. For example, when the PU width is 64 pixels, only one piece of motion information of the adjacent edge on the CTU needs to be loaded and updated to the 32 SRAM address space to represent the SRAM address range of 17 to 32.

[0171] When writing out row adjacent edge information storage control, the larger the width of the PU block in the row below the CTU, the higher the execution efficiency. For example, when the PU width is 64 pixels, only the motion information of one PU block needs to be output to represent the motion information of all PU blocks below the current CTU.

[0172] In summary, the write and read method, inter-frame prediction method and apparatus based on inter-frame prediction described in this disclosure have the following beneficial effects.

[0173] 1. In this disclosure, the motion information of the PU block is updated by updating the value of the address mapped at the lower right corner of the PU to the SRAM. This ensures that the motion information of the current PU block is not overwritten before it is used by other PU blocks, and also saves the frequent updates of the SRAM address space by each PU block during the inter-frame prediction process, thereby improving hardware execution efficiency.

[0174] 2. In this disclosure, the PU block motion information is loaded. Different protocols obtain the SRAM address value from the mapping table by calculating the range of neighboring motion information to be used by the current PU block, and determine whether the SRAM addresses in the mapping tables of multiple neighboring motion information are the same, thus saving the need to read the neighboring motion information value from the same address in SRAM multiple times and improving hardware execution efficiency.

[0175] 3. This disclosure enables the remapping of CTU neighbor information through the 0 and 1 calibration of CTU IDX. During CTU switching, inter-frame prediction does not require the transfer of motion information from SRAM, saving tens of cycles of SRAM read and write time for each CTU.

[0176] The scope of protection of the inter-frame prediction method described in this disclosure is not limited to the execution order of the steps listed in this embodiment. Any scheme implemented by adding, subtracting, or replacing steps in the prior art based on the principles of this disclosure is included within the scope of protection of this disclosure.

[0177] This disclosure also provides an inter-frame prediction device that can implement the inter-frame prediction method described in this disclosure. However, the implementation device for the inter-frame prediction method described in this disclosure includes, but is not limited to, the structure of the inter-frame prediction device listed in this embodiment. Any structural modifications and substitutions of the prior art made based on the principles of this disclosure are included within the protection scope of this disclosure.

[0178] Figure 15 The diagram shown is a structural schematic of the inter-frame prediction apparatus according to an embodiment of this disclosure. Figure 15 As shown, the data read / write system 100 based on inter-frame prediction includes a neighbor information maintenance module 110. The neighbor information maintenance module 110 is configured to acquire temporal motion information and spatial neighbor motion information of the prediction block. The neighbor information maintenance module 110 is also configured to write the motion information of the prediction block into a corresponding storage address of the memory using a set angle address mapping method. The motion information of the prediction block includes the motion vector data of the prediction block, the size of the prediction block, the position of the prediction block, and the validity of the prediction block.

[0179] Figure 16 The diagram shown is a structural schematic of the inter-frame prediction apparatus according to an embodiment of this disclosure. Figure 16 As shown, the data read / write system 100 based on inter-frame prediction includes an inter-frame prediction module 120. The inter-frame prediction module 120 is configured to calculate the motion vector prediction value of the prediction block based on the temporal motion information and spatial neighboring motion information of the prediction block.

[0180] The inter-frame prediction module 120 is further configured to add the predicted motion vector value of the prediction block to the motion vector residual value of the entropy decoding input to obtain the motion vector value of the prediction block as motion vector data.

[0181] Figure 17 The diagram shown is a structural schematic of the neighbor information maintenance module described in an embodiment of this disclosure. Figure 17 As shown, the neighbor information maintenance module 110 includes an acquisition unit 111 and a writing unit 112. The acquisition unit 111 is configured to acquire the temporal motion information and spatial neighbor motion information of the prediction block. The writing unit 112 is configured to write the motion information of the prediction block to the corresponding storage address of the memory using a set angle address mapping method. The motion information of the prediction block includes the motion vector data of the prediction block, the size of the prediction block, the position of the prediction block, and the validity of the prediction block.

[0182] like Figure 17As shown, the neighbor information maintenance module 110 further includes a temporal motion information storage unit 113, a row storage unit 114, and a neighbor storage unit 115. The temporal motion information storage unit 113 is configured to store the temporal motion information of the prediction block. The row storage unit 114 is configured to store the row motion information of the prediction block. The neighbor storage unit 115 is configured to store the neighbor motion information of the prediction block.

[0183] Figure 18 The diagram shown is a structural schematic of the inter-frame prediction module described in an embodiment of this disclosure. Figure 18 As shown, the inter-frame prediction module 120 includes an acquisition unit, a first calculation unit 121, and a second calculation unit 122. The first calculation unit 121 is configured to calculate the predicted motion vector value of the prediction block based on its temporal motion information and spatial neighboring motion information. The second calculation unit 122 is configured to add the predicted motion vector value of the prediction block to the motion vector residual value input from entropy decoding to obtain the motion vector value of the prediction block, which serves as the motion vector data.

[0184] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or modules or units may be electrical, mechanical, or other forms.

[0185] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this disclosure, depending on actual needs. For example, the functional modules / units in the various embodiments of this disclosure may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0186] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0187] Figure 19 The diagram shown is a structural schematic of the electronic device described in an embodiment of this disclosure. Figure 19 As shown, the electronic device 200 includes a memory 210 and a controller 220. The memory 210 is configured to store a processor-executable program. The controller 220 is configured to invoke the program to execute the inter-frame prediction-based write method and / or the inter-frame prediction-based read method and / or the inter-frame prediction method described above.

[0188] This disclosure also provides a computer-readable storage medium. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state drive (SSD)).

[0189] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.

[0190] The above embodiments are merely illustrative of the principles and effects of this disclosure and are not intended to limit this disclosure. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this disclosure. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this disclosure should still be covered by the claims of this disclosure.

Claims

1. A writing method based on inter-frame prediction, characterized in that, include: Obtain motion information of the prediction block, including motion vector data, the size of the prediction block, and the position of the prediction block; Based on the size and position of the prediction block and the set angle address mapping method, the storage address for the motion information of the prediction block is calculated; as well as The motion information of the predicted block is written into the memory based on the storage address. The calculation of the storage address for motion information of the prediction block based on the size and position of the prediction block and the set angle address mapping method includes: obtaining the block position coordinates of the lower right corner of the prediction block based on the size and position of the prediction block; The storage address is calculated based on the block position coordinates of the lower right corner of the predicted block and the set angle address mapping method, wherein the set angle address mapping method means that the address is mapped from the block position coordinates of the lower right corner of the predicted block toward the upper left direction at a set angle.

2. The writing method according to claim 1, characterized in that, Also includes: Before the start of the starting coding tree unit of the current frame image is started, the index value of the starting coding tree unit is assigned to 0. The current frame image includes several coding tree units, and the coding tree unit includes several prediction blocks. From the end of inter-frame prediction of the starting coding tree unit until the start of inter-frame prediction of the next coding tree unit, the index value of the next coding tree unit is assigned to 1; and The index values ​​of the remaining coding tree units are iteratively assigned sequentially.

3. The writing method according to claim 2, characterized in that, The memory includes row storage addresses and adjacent storage addresses. The row storage address corresponds to the storage address of the row storage position of the coding tree unit, and the adjacent storage address corresponds to the storage address of the left adjacent storage position of the coding tree unit.

4. The writing method according to claim 3, characterized in that, Also includes: From the end of inter-frame prediction of the previous coding tree unit until the start of the current coding tree unit, the row storage position of the previous coding tree unit is updated to the left neighbor storage position of the current coding tree unit based on the index value; and Update the left neighbor storage location of the previous coding tree unit to the row storage location of the current coding tree unit.

5. The writing method according to claim 4, characterized in that, Also includes: When updating the row storage position of the current coding tree unit, the motion information of the upper right corner block of the row storage position of the previous coding tree unit is obtained; as well as The motion information of the upper right corner block is backed up to the upper left corner storage location of the current coding tree unit's row storage location.

6. The writing method according to claim 5, characterized in that, Also includes: After the inter-frame prediction of the current coding tree unit is completed, the motion information of the rightmost prediction block of each row of the current coding tree unit is stored in the row storage location of the memory.

7. A reading method based on inter-frame prediction, characterized in that, include: Before inter-frame prediction begins, a read command is given to obtain the motion information required for the prediction block. as well as Based on the read instruction, the temporal motion information and spatial neighbor motion information of the predicted block are read from the motion information candidate list. The spatial neighbor motion information includes the motion information of the neighbor positions of the predicted block, and the motion information candidate list stores the temporal motion information of the predicted block and the motion information of its neighbor positions. The method for obtaining the motion information of the adjacent positions of the predicted block includes: obtaining the block position coordinates of the lower right corner of the predicted block based on the size and position of the predicted block; Based on the block position coordinates of the lower right corner of the predicted block and a set angle address mapping method, the motion information storage address of the adjacent position of the predicted block is calculated and obtained. The set angle address mapping method means that the address is mapped from the block position coordinates of the lower right corner of the predicted block toward the upper left direction by a set angle. The motion information of the adjacent position of the predicted block is read from the memory based on the motion information storage address.

8. The reading method according to claim 7, characterized in that, It also includes obtaining the candidate list of motion information, including: Based on the position and size of the predicted block, the neighbor position information of the predicted block is obtained, including the top neighbor position information, the left neighbor position information and / or the top left neighbor position information; Based on the neighboring edge position information and the set angle address mapping method, the motion information storage address of the neighboring edge position is calculated and obtained. Based on the motion information storage address, read the motion information of the adjacent position from the memory; and Update the motion information of the adjacent positions to the motion information candidate list.

9. The reading method according to claim 8, characterized in that, Also includes: Before the inter-frame prediction of the current coding tree unit is started, the motion information and index value of the upper neighbor edge of the current coding tree unit are obtained. The coding tree unit includes several prediction blocks. as well as The movement information of the upper neighbor edge is updated to the corresponding position in the memory based on the index value.

10. The reading method according to claim 7, characterized in that, Obtaining the candidate list of motion information also includes: When the current frame image is started, temporal motion information is pre-read, and the current frame image includes several coding tree units; After the pre-reading of the temporal motion information is completed, a loading request for the temporal motion information is initiated based on the position and size of the current prediction block; and The temporal motion information is loaded into the motion information candidate list based on the loading request.

11. An inter-frame prediction method, characterized in that, include: Obtain temporal motion information and spatial neighbor motion information of the predicted block; Based on the temporal motion information and spatial neighbor motion information of the predicted block, the predicted motion vector value of the predicted block is calculated; The motion vector prediction value of the prediction block is added to the motion vector residual value of the entropy decoding input to obtain the motion vector value of the prediction block, which is used as motion vector data; The block position coordinates of the lower right corner of the prediction block are obtained based on the size and position of the prediction block; Based on the block position coordinates of the lower right corner of the predicted block and a set angle address mapping method, the corresponding storage address of the motion information of the predicted block in the memory is calculated. The set angle address mapping method indicates that the address is mapped from the lower right corner of the predicted block towards the upper left at a set angle; and The motion vector data of the predicted block, the size of the predicted block, the position of the predicted block, and the validity of the predicted block are used as the motion information of the predicted block and written to the corresponding storage address of the memory using the set angle address mapping method.

12. An inter-frame prediction device, characterized in that, include: The neighbor information maintenance module is configured as follows: Obtain temporal motion information and spatial neighbor motion information of the predicted block; The block position coordinates of the lower right corner of the prediction block are obtained based on the size and position of the prediction block; Based on the block position coordinates of the lower right corner of the predicted block and a set angle address mapping method, the corresponding storage address of the motion information of the predicted block in the memory is calculated. The set angle address mapping method indicates that the address is mapped from the lower right corner of the predicted block towards the upper left at a set angle; and The motion information of the prediction block is written to the corresponding storage address of the memory using the set angle address mapping method. The motion information of the prediction block includes the motion vector data of the prediction block, the size of the prediction block, the position of the prediction block, and the validity of the prediction block.

13. The inter-frame prediction apparatus according to claim 12, characterized in that, Also includes: The inter-frame prediction module is configured to calculate the predicted motion vector value of the prediction block based on the temporal motion information and spatial neighbor motion information of the prediction block. as well as The inter-frame prediction module adds the predicted motion vector value of the prediction block to the motion vector residual value of the entropy decoding input to obtain the motion vector value of the prediction block, which is used as motion vector data.

14. The inter-frame prediction apparatus according to claim 12, characterized in that, The neighbor information maintenance module includes: The acquisition unit is configured to acquire the temporal motion information and spatial neighbor motion information of the prediction block; and The writing unit is configured to write the motion information of the prediction block to the corresponding storage address of the memory in a set angle address mapping manner. The motion information of the prediction block includes the motion vector data of the prediction block, the size of the prediction block, the position of the prediction block, and the validity of the prediction block.

15. The inter-frame prediction apparatus according to claim 12, characterized in that, The neighbor information maintenance module also includes: A temporal motion information storage unit is configured to store the temporal motion information of the prediction block; Row storage units are configured to store row motion information of the prediction block; and The neighboring edge storage unit is configured to store the neighboring edge movement information of the predicted block.

16. The inter-frame prediction apparatus according to claim 13, characterized in that, The inter-frame prediction module includes: The first calculation unit is configured to calculate the predicted motion vector value of the predicted block based on its temporal motion information and spatial neighboring edge motion information; and The second calculation unit is configured to add the predicted motion vector value of the prediction block to the motion vector residual value of the entropy decoding input to obtain the motion vector value of the prediction block as motion vector data.

17. An electronic device, characterized in that, The electronic device includes: Memory, configured to store processor-executable programs; and The controller is configured to invoke the program to execute the write method according to any one of claims 1 to 6, the read method according to any one of claims 7 to 10, or the inter-frame prediction method according to claim 11.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by an electronic device, the program implements the writing method according to any one of claims 1 to 6, the reading method according to any one of claims 7 to 10, or the inter-frame prediction method according to claim 11.

Citation Information

Patent Citations

  • Intra-frame prediction method and device

    CN102420989A

  • Angle mode inter-frame prediction method, encoder and storage medium

    CN112004096A