WO2022110131A1 - 帧间预测方法、装置、编码器、解码器和存储介质 - Google Patents

帧间预测方法、装置、编码器、解码器和存储介质 Download PDF

Info

Publication number
WO2022110131A1
WO2022110131A1 PCT/CN2020/132727 CN2020132727W WO2022110131A1 WO 2022110131 A1 WO2022110131 A1 WO 2022110131A1 CN 2020132727 W CN2020132727 W CN 2020132727W WO 2022110131 A1 WO2022110131 A1 WO 2022110131A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
area
motion vector
region
sub
Prior art date
Application number
PCT/CN2020/132727
Other languages
English (en)
French (fr)
Inventor
郑萧桢
周焰
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2020/132727 priority Critical patent/WO2022110131A1/zh
Publication of WO2022110131A1 publication Critical patent/WO2022110131A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Definitions

  • the present invention relates to the technical field of video coding and decoding, and in particular, to an inter-frame prediction method, device, encoder, decoder and storage medium.
  • the inter-frame prediction mainly involves motion estimation.
  • the direction and distance of the offset of any image block included in the original image relative to the corresponding image block in the reference image can be determined.
  • the reference image is generally stored in the memory.
  • Embodiments of the present invention provide an inter-frame prediction method, device, encoder, decoder, and storage medium, so as to solve the problem of bandwidth limitation and utilize reference images efficiently.
  • an embodiment of the present invention provides an inter-frame prediction method, which is applied to an encoder, and the method includes:
  • the first motion vector determine the first reference area corresponding to the target encoding area in the image to be encoded; wherein, the first reference area is located in the reference image, and the reference image is stored in the first memory;
  • the image blocks in the first reference area are read to perform inter-frame prediction on the target coding area; wherein, a second access speed of data is accessed through the second memory
  • the first access speed is faster than accessing data through the first memory.
  • an embodiment of the present invention provides an inter-frame prediction method, which is applied to an encoder, and the method includes:
  • the reference image Based on the global motion vector, in the reference image, determine a first reference area corresponding to the target coding area, and store the first reference area in a second memory;
  • motion estimation is performed on the image blocks in the target coding area
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • an embodiment of the present invention provides an inter-frame prediction method, which is applied to a decoding end, and the method includes:
  • the second access speed for accessing data through the second memory is faster than the first access speed for accessing data in the first memory.
  • an embodiment of the present invention provides an inter-frame prediction method, which is applied to a decoding end, and the method includes:
  • the reference image Based on the global motion vector, in the reference image, determine a first reference region corresponding to the target decoding region, and store the first reference region in a second memory;
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • an embodiment of the present invention provides an inter-frame prediction apparatus, including a memory and a processor; wherein, executable codes are stored in the memory, and when the executable codes are executed by the processor, all The processor implementation described above:
  • the first motion vector determine the first reference area corresponding to the target encoding area in the image to be encoded; wherein, the first reference area is located in the reference image, and the reference image is stored in the first memory;
  • the image blocks in the first reference area are read to perform inter-frame prediction on the target coding area; wherein, a second access speed of data is accessed through the second memory
  • the first access speed is faster than accessing data through the first memory.
  • an embodiment of the present invention provides an inter-frame prediction apparatus, including a memory and a processor; wherein the memory stores executable codes, and when the executable codes are executed by the processor, all The processor implementation described above:
  • the reference image Based on the global motion vector, in the reference image, determine a first reference area corresponding to the target coding area, and store the first reference area in a second memory;
  • motion estimation is performed on the image blocks in the target coding area
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • an embodiment of the present invention provides an inter-frame prediction apparatus, including a memory and a processor; wherein the memory stores executable codes, and when the executable codes are executed by the processor, all The processor implementation described above:
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • an embodiment of the present invention provides an inter-frame prediction apparatus, including a memory and a processor; wherein, executable codes are stored in the memory, and when the executable codes are executed by the processor, all The processor implementation described above:
  • the global motion vector corresponding to the image to be decoded reflects the direction and distance that the object in the image to be decoded as a whole is offset in the reference image; wherein, the reference image is stored in the first memory;
  • the reference image Based on the global motion vector, in the reference image, determine a first reference region corresponding to the target decoding region, and store the first reference region in a second memory;
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • an embodiment of the present invention provides an encoder, including the inter-frame prediction apparatus in the fifth aspect or the sixth aspect.
  • an embodiment of the present invention provides a computer-readable storage medium, where the storage medium is a computer-readable storage medium, and program instructions are stored in the computer-readable storage medium, and the program instructions can at least implement the first Aspect or the inter prediction method of the second aspect.
  • an embodiment of the present invention provides a decoder, including the inter-frame prediction apparatus in the seventh aspect or the eighth aspect.
  • an embodiment of the present invention provides a computer-readable storage medium, where the storage medium is a computer-readable storage medium, and program instructions are stored in the computer-readable storage medium, and the program instructions can at least implement the first The inter-frame prediction method of the third aspect or the fourth aspect.
  • the first reference area for inter-frame prediction can be determined based on the global motion vector, and the inter-frame prediction is performed based on the image blocks in the first reference area, which avoids copying all the data from the first memory.
  • FIG. 1 is a schematic diagram of an encoding and decoding framework provided by an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of an inter-frame prediction method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of an encoding process provided by an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of determining a first reference area according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of determining a second reference area according to an embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of another inter-frame prediction method provided by an embodiment of the present invention.
  • FIG. 7 is a schematic flowchart of an inter-frame prediction method according to an embodiment of the present invention.
  • FIG. 8 is a schematic flowchart of another inter-frame prediction method provided by an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of an inter-frame prediction apparatus according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of an inter-frame prediction apparatus according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of an inter-frame prediction apparatus according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of an apparatus for inter-frame prediction according to an embodiment of the present invention.
  • the words “if”, “if” as used herein may be interpreted as “at” or “when” or “in response to determining” or “in response to detecting”.
  • the phrases “if determined” or “if detected (the stated condition or event)” can be interpreted as “when determined” or “in response to determining” or “when detected (the stated condition or event),” depending on the context )” or “in response to detection (a stated condition or event)”.
  • the method provided by the embodiment of the present invention may be implemented in the codec end.
  • the structure of the encoding end is briefly introduced below.
  • the original video frames are subjected to the following processing: prediction, transformation, quantization, entropy coding, inverse quantization, inverse transformation, reconstruction, filtering, etc.
  • the encoding end may include an encoding intra-frame prediction module, an encoding inter-frame prediction module, a transformation module, a quantization module, an entropy encoding module, an inverse quantization module, an inverse transformation module, a reconstruction module, and a filtering module. , refer to the image cache module.
  • the encoding intra prediction module and the encoding inter prediction module may respectively determine intra prediction data, intra prediction related information, inter prediction data, and inter prediction related information based on the reconstructed frame.
  • the switch connected to the coded intra prediction module and the coded inter prediction module is used to select whether to use the coded intra prediction module or the coded inter prediction module, and the selected module provides the adder with the intra prediction data or the inter prediction data.
  • a residual is obtained.
  • the residual is transformed and quantized to obtain quantized coefficients.
  • the quantized coefficients, intra-frame prediction related information, inter-frame prediction related information, etc. are input into the entropy encoder for entropy encoding, and finally encoded data for sending to the decoding end is obtained.
  • the dedistorted video frames can be stored in the reference image cache module, and can be read from the reference image cache module when used.
  • Dedistorted video frames can be obtained by inverse quantizing and inverse transforming the quantized coefficients to recover the residuals.
  • the reconstruction module the residuals are added back to the corresponding intra-frame prediction data and inter-frame prediction data to obtain a reconstructed frame.
  • the reconstructed frame is a distorted video frame.
  • some information of the original video frame is lost, such as the high-frequency component information in the original video frame, resulting in the existence of a gap between the reconstructed frame and the original video frame. Distortion phenomenon.
  • the specific method may be to perform filtering processing on the reconstructed frame, and the filtering processing may include deblocking filtering processing, compensation processing, and the like.
  • FIG. 2 is a flowchart of an inter-frame prediction method provided by an embodiment of the present invention, and the method is applied to an encoding end. As shown in Figure 2, the method includes the following steps:
  • the reference image is stored in the first memory.
  • the reference image Based on the global motion vector, in the reference image, determine a first reference area corresponding to the target coding area, and store the first reference area in the second memory. In one embodiment, the first reference area in the reference image stored in the first memory is read and the first reference area is stored in the second memory. The first reference area is a partial image of the reference image.
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • the reference image can be used to perform inter-frame prediction on the image to be encoded.
  • a reference picture is a picture that has been encoded before encoding the picture to be encoded.
  • Reference images corresponding to different images to be encoded may be the same or different, and these reference images may all be stored in the first memory.
  • the first memory may be a double-rate synchronous dynamic random access memory (Double Data Rate Synchronous Dynamic Random Access Memory, DDR SDRAM).
  • the entire to-be-encoded image may be divided to obtain a plurality of Coding Tree Units (CTUs), and then each CTU is encoded separately.
  • the size of the CTU may be 64 ⁇ 64.
  • the encoding operation can actually include several processes such as intra-frame prediction, inter-frame prediction, transform processing, quantization processing, and entropy coding.
  • the CTU can continue to be divided into smaller division units. Carry out the above process.
  • the CTU may be divided according to the quadtree division method to obtain multiple coding blocks (Coding Unit, CU), and the size of the CU may be 8x8, 16x16, 32x32, 64x64, etc.
  • the CU may be divided to obtain multiple prediction blocks (Prediction Unit, PU), and intra-frame prediction or inter-frame prediction is performed for each PU respectively.
  • Prediction Unit Prediction Unit
  • the CU When transform processing or quantization processing is performed, the CU may be divided to obtain multiple transform blocks (Transform Unit, TU), and transform processing or quantization processing is performed on each TU respectively. It can be seen from the above description that when performing different processes of the encoding operation, the CTU can continue to be divided, and the intra-frame prediction, inter-frame prediction, transformation processing, quantization processing, entropy coding, etc. can be performed through smaller and different division units. process.
  • Transform Unit Transform Unit
  • a global motion vector (Global Motion Vector, GMV) corresponding to the to-be-coded image may be determined.
  • the process of determining the global motion vector can be implemented as: calculating the global motion vector corresponding to the image to be encoded by an image signal processor (Image Signal Processor, ISP), and encoding the global motion vector corresponding to the image to be encoded.
  • the encoding end may also automatically calculate the global motion vector corresponding to the image to be encoded.
  • a global motion vector corresponding to the to-be-coded image may be calculated based on the to-be-coded image and N frames of images preceding the to-be-coded image, where N may be 1 or 2.
  • the calculated global motion vector will be large, which may lead to the subsequent calculation of the reference area based on the global motion vector. If it is not in the reference image or the reference area is inaccurate, the encoding effect will be affected.
  • the embodiment of the present invention provides two judgment conditions for judging whether the global motion vector needs to be modified, and corresponding modification methods respectively.
  • the global motion vector may include a horizontal motion component and a vertical motion component.
  • the horizontal motion component reflects the distance that the entire object in the image to be encoded is shifted in the horizontal direction in the reference image.
  • the vertical motion component reflects the distance that the object in the image to be encoded is shifted in the vertical direction in the reference image as a whole
  • the process of revising the global motion vector can be implemented as follows: if the horizontal motion component or the vertical motion component is greater than the preset threshold, then the horizontal motion component and the vertical motion component are compared. The value of the motion component is adjusted to the first value.
  • the above preset thresholds can be configured according to requirements. In one embodiment, the above-mentioned preset threshold may be set to 100. When any one of the horizontal motion component and the vertical motion component is greater than the preset threshold, the values of both the horizontal motion component and the vertical motion component may be directly adjusted to the first value. In another embodiment the first value may be zero.
  • the process of correcting the global motion vector can also be implemented as: determining the width and height of the image to be encoded; multiplying the width by the preset ratio to obtain the first Two values; multiply the height by the preset ratio to obtain the third value; if the horizontal motion component is greater than the second value, adjust the value of the horizontal motion component to the second value; if the vertical motion component is greater than the third value, then The value of the vertical motion component is adjusted to a third value.
  • the width of the image to be encoded is W and the height is H
  • the width can be multiplied by the preset ratio to calculate the second value
  • the height can be multiplied by the preset ratio to calculate the third value.
  • the preset ratio can be, for example, Then the second value can be The third value may then be If the horizontal motion component is greater than the second value, the value of the horizontal motion component may be directly adjusted to the second value. If the vertical motion component is greater than the third value, the value of the vertical motion component may be directly adjusted to the third value.
  • the global motion vector is corrected, and the following steps are performed using the corrected global motion vector.
  • a target coding region may be determined in the to-be-coded image.
  • the image to be coded can be divided, and multiple CTUs can be obtained through division, and these CTUs are arranged in the horizontal direction and the vertical direction.
  • the image to be coded may include a left square (Tile) and a right square, which can be understood as a left half image and a right half image, and the CTUs arranged in the same row in the horizontal direction in the left square or the right square can be called coding tree block rows (hereinafter. referred to as the CTU row).
  • the target coding region in this embodiment of the present invention may be a CTU row.
  • the box marked with the letter “A” in FIG. 4 can represent a CTU line in the left box, and the CTU line can be used as the target coding area.
  • an image to be coded includes multiple CTU lines, and each CTU line can be used as a target coding region, and inter-frame prediction can be performed in the manner provided by the embodiment of the present invention.
  • the embodiment of the present invention only uses one CTU row as an example to describe the process of inter-frame prediction, and the process of performing inter-frame prediction for other CTU rows is the same, and will not be repeated one by one.
  • a first reference region corresponding to the target coding region may be determined in the reference image based on the global motion vector, and the first reference region may be stored in the second memory.
  • FIG. 4 is taken as an example to illustrate the process of determining the first reference area corresponding to the target coding area (the first reference area may also be referred to as a line buffer range).
  • the left image represents the image to be encoded
  • the right image represents the reference image.
  • the CTU row in the reference image co-located with the CTU row denoted by the box denoted by the letter "A” is shown by the box denoted by the letter "B".
  • the other CTU row represented by the box marked with the letter “C” can be determined. Then, the upper and lower boundaries of the CTU row marked with the letter “C” are respectively extended outward by a distance m along the vertical direction of the reference image, and the left and right boundaries of the CTU row marked with the letter “C” are respectively extended outward along the horizontal direction of the reference image.
  • the distance n By extending the distance n, the first reference area corresponding to the target coding area can be obtained.
  • the present invention is not limited to this.
  • the length or width of the first reference region may be an integer multiple of the length or width of the CTU row, respectively.
  • the length of the first reference area is further extended by n rows of pixels on the basis of an integer multiple of the length of the CTU row. That is, the length of the first reference area is an integer multiple of the length of the CTU row plus n rows of pixels.
  • the width of the first reference area is further extended by m rows of pixels on the basis of an integer multiple of the width of the CTU row. That is, the width of the first reference area is an integer that is the width of the CTU row plus m rows of pixels.
  • m and n may be configured according to requirements, and specifically may be configured according to the size of the search range in which motion search needs to be performed in the inter-frame prediction process.
  • m may be set to 48 and n may be set to 32, for example.
  • the first reference area is a part of the reference image
  • the reference image is stored in the first memory
  • the image block of the first reference area can be obtained from the first memory
  • the image block of the first reference area can be dumped. into the second memory.
  • the second memory may be a random access memory (Random Access Memory, RAM).
  • RAM Random Access Memory
  • the image blocks of the first reference area used in the inter-frame prediction process need to be stored in the second memory, so that the target coding area can be normally processed based on the image blocks of the first reference area stored in the second memory. Image blocks are inter-predicted.
  • the second access speed for accessing data through the second memory is faster than the first access speed for accessing data in the first memory.
  • motion estimation may be performed on the image blocks in the target coding area based on the read image blocks in the first reference area.
  • the inter-frame prediction mainly includes the step of motion estimation.
  • Motion estimation is to find a prediction block in the reference image, and the prediction block is a relatively matched PU with the current PU in the target coding area in the image to be coded.
  • multiple candidate PUs may be determined in the reference image in a preset manner, and then a prediction block with the smallest residual difference with the current PU is determined from the multiple candidate PUs. Since the image blocks in the target coding area can be divided into multiple PUs, a motion estimation process can be performed for each PU to find a prediction block matching the current PU.
  • the process of filling the image data in the first reference area can also be understood as a process of copying the image data in the first reference area from the first memory to the second memory.
  • the inter-frame prediction can be started after all the image data in the first reference area are filled, which can greatly improve the speed of inter-frame prediction.
  • the target coding region can be further divided into multiple sub-regions, then in the process of storing the first reference region in the second memory, for any sub-region in the target coding region, based on the global motion vector, In the reference image, a second reference area corresponding to any sub-area is determined, and the second reference area belongs to the first reference area.
  • a second reference area can be determined within the first reference area, and the second reference area can be filled in a short time under the condition of the read and write data bandwidth between the current memories and the performance limitations of the memory.
  • the target coding region includes multiple coding tree blocks, and the multiple coding tree blocks are located in the same row of the image to be coded, and any sub-region can be any one of the multiple coding tree blocks.
  • a tree block, that is to say, any sub-region can also be a CTU.
  • the above-mentioned process of determining the second reference region corresponding to any sub-region in the reference image based on the global motion vector may be implemented as follows: based on the global motion vector, in the reference image, determining the second reference region corresponding to any sub-region in the reference image.
  • the target area corresponding to the position in the image to be encoded, and the target area is a rectangle; it is determined that the first distance extends outward from the upper and lower boundaries of the target area along the vertical direction of the reference image, and the left and right boundaries of the target area are extended along the horizontal direction of the reference image.
  • the directions respectively extend outward to the second reference area enclosed by the second distance.
  • an image area located at the same position as the target encoding area in the image to be encoded may be determined in the reference image.
  • the size of the image to be encoded is 128 ⁇ 128, the size of the target encoding area is 64 ⁇ 64, the position of the pixel at the upper left corner of the target encoding area in the image to be encoded is assumed to be (24, 24), and the size of the reference image is also 128 ⁇ 128, in the reference image, the pixel at the (24,24) position is the pixel at the upper left corner to determine an image area with a size of 64 ⁇ 64, which can be used as the reference image and the target coding area. Image area at the same location.
  • the target region can be determined based on the global motion vector. For example, assuming that the global motion vector is (20,20), the pixel coordinates of the upper left corner of the image area located at the same position are (24,24), and the pixel coordinates of the upper left corner are added to the global motion vector (20,20), Obtain the pixel coordinates (44, 44) of the upper left corner of the target area, and then use the pixel at the (44, 44) position as the pixel at the upper left corner in the reference image to determine a target area with a size of 64 ⁇ 64.
  • FIG. 5 the left image represents the image to be encoded, and the right image represents the reference image.
  • the CTUs in the reference image co-located with the CTUs represented by the boxes marked with the letter "A" are shown by the boxes marked with the letter "B".
  • the pixel X at the upper left corner of the CTU indicated by the box marked with the letter "B” and offset by the direction and distance indicated by the global motion vector, another pixel Y can be found.
  • pixel Y as the pixel in the upper left corner of the other CTU, the other CTU represented by the box marked with the letter "C" can be determined.
  • the first distance m is respectively extended outward along the vertical direction of the reference image, and from the left and right boundaries of the CTU row marked with the letter "C” along the horizontal direction of the reference image, respectively.
  • the second reference area can be obtained.
  • the present invention is not limited to this.
  • the length or width of the second reference region may be an integer multiple of the length or width of the CTU, respectively.
  • the length of the first reference region is further extended by n rows of pixels on the basis of an integer multiple of the length of the CTU.
  • the length of the first reference area is an integer multiple of the length of the CTU plus n rows of pixels.
  • the width of the first reference area is further extended by m rows of pixels on the basis of an integer multiple of the width of the CTU. That is, the width of the first reference area is an integer that is the width of the CTU plus m lines of pixels. It is worth noting that the size of the second reference area is smaller than that of the first reference area.
  • the distance extending outward along the vertical direction of the reference image in the first reference area and the distance extending outward along the vertical direction of the reference image in the second reference area may be set to the same value.
  • the second distance x extending outward along the horizontal direction of the reference image in the second reference area can be configured according to requirements.
  • the specific implementation manner of configuring the second distance may be: determining the reading speed for reading the image blocks in the first reference area; determining the second distance according to the reading speed, and the difference between the reading speed and the second distance is a proportional relationship.
  • the second distance need not be determined according to the reading speed.
  • the second distance or the second reference area may be set according to the requirements of image codec quality or resource consumption in hardware implementation.
  • the second distance may be determined according to the speed of copying part of the reference image from the first memory to the second memory. When the reading speed is smaller, the second distance is smaller, and conversely, when the reading speed is larger, the second distance is larger.
  • the second distance can be configured according to the reading speed
  • the second distance can also be configured according to the size of the search range that needs to perform motion search in the inter-frame prediction process.
  • the second distance can be configured in combination with the reading speed and the size of the search range.
  • the second distance may be set to 256.
  • the image to be encoded may also be externally filled (padding) (an image extension method) for multiple rows and multiple columns, for example, 16 rows and 16 columns may be filled out.
  • padding an image extension method
  • the size of the image to be encoded can be enlarged, so that the result of inter-frame prediction is more accurate.
  • motion estimation may be performed on the image blocks in any sub-region based on the image blocks in the second reference region stored in the second memory.
  • Any subregion can be a CTU.
  • any sub-region can be divided to obtain multiple PUs, and for any PU X in the multiple PUs, based on the image blocks in the second reference region stored in the second memory, any A PUX for motion estimation.
  • the process of performing motion estimation on any PUX may be implemented as follows: determining a candidate motion vector corresponding to any PUX, and the candidate motion vector reflects The direction and distance of the offset of the object in any PU X compared to the reference image; based on the candidate motion vector, in the reference image, determine the candidate block corresponding to any PU X; based on the image block in the second reference area and candidate blocks, perform motion estimation on any PUX.
  • the image area A located at the same position as the target coding area can be determined in the reference image, and then for any PU X, the upper left corner pixel of the image area A determined above can be used.
  • the candidate motion vector is superimposed on the position to obtain the moving pixel position, and then an image area B whose size is the same as the size of any of the above-mentioned PU X is delineated with the moving pixel position as the starting position, and the image area B is any of the above-mentioned PU X. the corresponding candidate block.
  • the process of determining the candidate motion vector corresponding to any PUX may be implemented as: obtaining the candidate motion vector corresponding to any PUX through an integer pixel search method.
  • the process of performing motion estimation on any PUX may be implemented as: for the first candidate block in the candidate block that is not in the second reference area, determine the first The relative position of the candidate block and the second reference area, based on the relative position, the first candidate block is moved; in the moved first candidate block and the second candidate block in the second reference area in the candidate block, determine the The target block with the smallest residual between any prediction block; determine the motion vector of the target block relative to any PUX.
  • first candidate blocks that are not in the second reference area can be determined, and then the relative positions of the first candidate blocks and the second reference area are determined, and the first candidate blocks are moved based on the relative positions.
  • the number of rows and/or columns to move the first candidate block is determined according to the number of rows and/or columns of the first candidate block located outside the second reference area. For example, if only one row of the first candidate block is located above the second reference area, the first candidate block may be moved down by one row to ensure that the moved first candidate block is completely within the range of the second reference area.
  • a target block with the smallest residual difference with any prediction block may be determined.
  • the target direction and target distance offset of the target block relative to any PU X can be determined, and the offset target direction and target distance can be used as the target motion vector corresponding to any PU X .
  • the global motion vector can be encoded and then sent to the decoding end.
  • the global motion vector is included in the user extension data of the header information of the picture layer or the header information of the slice layer, or the global motion vector is included in the supplementary enhancement information, or the global motion vector is included in the metadata (Metadata).
  • the global motion vector can be included in the user extension data (extension data) of the header information of the picture layer or the header information of the slice layer, or the global motion vector can be included in the supplemental enhancement information (Supplemental Enhancement Information). , SEI), or the global motion vector is included in the metadata (Metadata).
  • SEI Supplemental Enhancement Information
  • the global motion vector is written into the code stream as user extension data (extension data) of the coding header information.
  • the global motion vector is included in the user extension data of the header information of the picture layer or the header information of the slice layer, so as to be further written into the code stream.
  • the global motion vector may be written into the code stream as supplementary enhancement information.
  • the global motion vector is included in the supplementary enhancement information and written into the code stream.
  • the global motion vector may be written into the code stream as metadata. In this way, a high degree of coupling of the entire reference data management method at the codec side can be achieved.
  • the global motion vector when encoding the header information, can be written into the code stream by means of extension data.
  • the extension data of the image parameter set or the extension data of the slice header can be used to convert the global motion vector
  • the horizontal motion component and vertical motion component of the motion vector are written into the code stream respectively.
  • the header information can be decoded first to obtain a global motion vector. If the extended data of the image parameter set is used to write the global motion vector in the encoding process, the global motion vector can be obtained by decoding the extended data of the image parameter set. If in the encoding process, the extended data of the slice header is written into the global motion vector, the global motion vector can be obtained by decoding the extended data of the slice header.
  • the method provided by the embodiment of the present invention it is possible to avoid storing the entire reference image from the first memory into the second memory. Obviously, storing the entire reference image from the first memory into the second memory will take up a lot of space. High data read and write bandwidth.
  • a first reference area corresponding to the target area can be determined, the image blocks in the first reference area are stored in the second memory, and the image blocks in the first reference area can be stored in the second memory.
  • the image blocks in the first reference area are read, and the image blocks in the target area are predicted and reconstructed based on the read image blocks in the first reference area. It can be ensured that the image blocks in the first reference area are image blocks that must be used for the prediction and reconstruction of the target area, so as to avoid reading the entire reference image and save data read and write bandwidth.
  • the process of encoding and decoding can be implemented in a codec.
  • a highly integrated codec can realize the multiplexing of some common modules at the codec side and the sharing of storage resources, which is beneficial to saving implementation costs and usage costs. If the codecs are coupled together and designed to be highly integrated, the completely consistent processes of these codecs can be shared without repeated design, which can save circuit resources.
  • the first reference area for inter-frame prediction can be determined based on the global motion vector, and the inter-frame prediction is performed based on the image blocks in the first reference area, which avoids copying all the data from the first memory.
  • FIG. 6 is a flowchart of another inter-frame prediction method provided by an embodiment of the present invention, and the method may be applied to an encoding end. As shown in Figure 6, the method includes the following steps:
  • the second memory read the image blocks in the first reference area to perform inter-frame prediction on the target coding area.
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • the above-mentioned first motion vector may be the global motion vector in the foregoing embodiment, and the relevant description may refer to the foregoing embodiment, which will not be repeated here.
  • the target coding region includes a plurality of sub-regions
  • the method further includes: for any sub-region in the target coding region, based on the first motion vector, In the reference image, a second reference area corresponding to any sub-area is determined, and the second reference area belongs to the first reference area.
  • the process of determining the second reference area corresponding to any sub-area may be implemented as follows: based on the first motion vector, in the reference image, determine the image corresponding to the image to be encoded. The target area corresponding to the position of any sub-area in the The horizontal direction of the image extends outward respectively to the second reference area surrounded by the second distance.
  • the method further includes: determining a reading speed for reading the image blocks in the first reference area; and determining a second distance according to the reading speed, wherein the reading speed and the second distance are in a proportional relationship.
  • the target coding region includes multiple coding tree blocks, the multiple coding tree blocks are located in the same row of the image to be coded, and any sub-region is any coding tree block among the multiple coding tree blocks.
  • the method further includes: encoding the first motion vector; wherein the first motion vector is included in the header information of the picture layer or the user extension data of the header information of the slice layer, or the first motion vector is included in In the supplementary enhancement information, or the first motion vector is contained in the metadata.
  • FIG. 7 is a flowchart of an inter-frame prediction method provided by an embodiment of the present invention, and the method can be applied to a decoding end. As shown in Figure 7, the method includes the following steps:
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • the above-mentioned global motion vector may be carried in the user extension data of the header information of the picture layer, the user extension data of the header information of the slice layer, supplementary enhancement information or metadata.
  • the header information can be decoded first to obtain a global motion vector.
  • the global motion vector can be obtained by decoding the extended data of the image parameter set.
  • the global motion vector can be obtained by decoding the extended data of the slice header.
  • decoding the metadata can obtain the global motion vector.
  • the reference image can be used to decode the image to be decoded.
  • a reference picture is a picture that has been decoded before the picture to be decoded is decoded.
  • Reference pictures corresponding to different pictures to be decoded may be the same or different, and these reference pictures may be stored in the first memory.
  • the first memory may be a double rate synchronous dynamic random access memory.
  • the entire to-be-decoded image may be divided to obtain multiple decoding areas, wherein the target decoding area may be any decoding area in the multiple decoding areas, and the target decoding area may be any decoding area.
  • a region can be a CTU row.
  • the image to be decoded may include a left tile (Tile) and a right tile.
  • CTUs arranged in the same row in the horizontal direction in the left block or the right block may be referred to as a CTU row.
  • the box marked with the letter “A” in FIG. 4 can represent a CTU line in the left box, and the CTU line can be used as the target decoding area.
  • a first reference region corresponding to the target coding region may be determined in the reference image based on the global motion vector, and the first reference region may be stored in the second memory.
  • FIG. 4 is used as an example to illustrate the process of determining the first reference region corresponding to the target decoding region (the first reference region may also be referred to as a line buffer range).
  • the left image represents the image to be decoded
  • the right image represents the reference image.
  • the CTU row in the reference image co-located with the CTU row denoted by the box denoted by the letter "A” is shown by the box denoted by the letter "B".
  • the other CTU row represented by the box marked with the letter “C” can be determined. Then, the upper and lower boundaries of the CTU row marked with the letter “C” are respectively extended outward by a distance m along the vertical direction of the reference image, and the left and right boundaries of the CTU row marked with the letter “C” are respectively extended outward along the horizontal direction of the reference image.
  • the distance n By extending the distance n, the first reference area corresponding to the target decoding area can be obtained.
  • the present invention is not limited to this.
  • the length or width of the first reference region may be an integer multiple of the length or width of the CTU row, respectively.
  • the length of the first reference area is further extended by n rows of pixels on the basis of an integer multiple of the length of the CTU row. That is, the length of the first reference area is an integer multiple of the length of the CTU row plus n rows of pixels.
  • the width of the first reference area is further extended by m rows of pixels on the basis of an integer multiple of the width of the CTU row. That is, the width of the first reference area is an integer that is the width of the CTU row plus m rows of pixels.
  • m and n may be configured according to requirements, and specifically may be configured according to the size of the search range in which motion search needs to be performed in the inter-frame prediction process.
  • m may be set to 48 and n may be set to 32, for example.
  • the first reference area is a part of the reference image
  • the reference image is stored in the first memory
  • the image block of the first reference area can be obtained from the first memory
  • the image block of the first reference area can be dumped. into the second memory.
  • the second memory may be a random access memory.
  • the target decoding area may include multiple sub-areas, and based on the read image blocks in the first reference area, the process of decoding the target decoding area may be implemented as follows: for any sub-area in the target decoding area, The motion vector residual corresponding to any sub-region is obtained from the code stream sent by the encoder; based on the motion vector residual, in the first reference region, the prediction block corresponding to any sub-region is determined; the code stream sent from the encoder Obtain the residual corresponding to any sub-area in ; superimpose the residual into the prediction block to obtain the image data in any sub-area.
  • the encoding end can encode the motion vector residual corresponding to any sub-region X and send it to the decoding end, and the decoding end can obtain the motion vector residual corresponding to the sub-region X. Then, the decoding end determines the motion vector corresponding to the sub-region X based on the motion vector residual corresponding to the sub-region X and the motion vectors corresponding to the adjacent sub-regions of the sub-region X. Next, a prediction block corresponding to the sub-region X may be determined in the first reference region based on the motion vector corresponding to the sub-region X.
  • the process of determining the prediction block corresponding to the sub-region X can be implemented as: Image block Y in the same position. Starting from the location of the image block Y, by offsetting the direction and distance indicated by the motion vector corresponding to the sub-region X, the prediction block corresponding to the sub-region X can be determined.
  • the residual corresponding to any sub-region can be obtained from the code stream sent by the encoder, and the residual error can be added back to the prediction block to obtain the data in any sub-region.
  • Image data that is to say, the sub-region X can be solved successfully.
  • the process of filling the image data in the first reference area can also be understood as a process of copying the image data in the first reference area from the first memory to the second memory.
  • the inter-frame prediction can be started after all the image data in the first reference area are filled, which can greatly improve the speed of inter-frame prediction.
  • the target coding area can be further divided into multiple sub-areas, then the target decoding area may include multiple sub-areas.
  • the embodiment of the present invention provides The method may further include: for any sub-region in the target decoding region, based on the global motion vector, in the reference image, determining a second reference region corresponding to any sub-region, and the second reference region belongs to the first reference region.
  • the process of decoding the target decoding area can be implemented as: for any sub-area, based on the image in the second reference area stored in the second memory. block, which decodes the image data in any sub-region.
  • the target decoding area includes multiple decoding tree blocks, and the multiple decoding tree blocks are located in the same row of the image to be decoded, and any sub-area can be any of the multiple decoding tree blocks.
  • Decoding tree blocks, that is, any sub-region can also be a CTU in the CTU row.
  • the process of determining the second reference area corresponding to any sub-area may be implemented as follows: based on the global motion vector, in the reference image, determine the second reference area corresponding to the image to be decoded.
  • the target area corresponding to the position of any sub-area the target area is a rectangle; it is determined that the first distance extends outward from the upper and lower boundaries of the target area along the vertical direction of the reference image, and the left and right boundaries of the target area along the reference image
  • the second reference regions surrounded by the second distances are respectively extended outward in the horizontal direction.
  • an image area located at the same position as the target decoding area in the to-be-decoded image may be determined in the reference image.
  • the size of the image to be decoded is 128 ⁇ 128, the size of the target decoding area is 64 ⁇ 64, the position of the pixel at the upper left corner of the target decoding area in the image to be decoded is assumed to be (24, 24), and the size of the reference image is also 128 ⁇ 128, in the reference image, the pixel with (24,24) as the upper left corner position can determine an image area with a size of 64 ⁇ 64, which can be used as the target decoding area in the above reference image. image area.
  • the target region can be determined based on the global motion vector. For example, assuming that the global motion vector is (20,20), the pixel coordinates of the upper left corner of the image area located at the same position are (24,24), and the pixel coordinates of the upper left corner are added to the global motion vector (20,20), Obtain the pixel coordinates (44, 44) of the upper left corner of the target area, and then use (44, 44) as the upper left corner pixel in the reference image to determine a target area with a size of 64 ⁇ 64.
  • FIG. 5 the left image represents the image to be decoded, and the right image represents the reference image.
  • the CTUs in the reference image co-located with the CTUs represented by the boxes marked with the letter "A" are shown by the boxes marked with the letter "B".
  • the pixel X at the upper left corner of the CTU indicated by the box marked with the letter "B” and offset by the direction and distance indicated by the global motion vector, another pixel Y can be found.
  • pixel Y as the pixel in the upper left corner of the other CTU, the other CTU represented by the box marked with the letter "C" can be determined.
  • the first distance m is respectively extended outward along the vertical direction of the reference image, and from the left and right boundaries of the CTU row marked with the letter "C” along the horizontal direction of the reference image, respectively.
  • the second reference area can be obtained.
  • the present invention is not limited to this.
  • the length or width of the second reference region may be an integer multiple of the length or width of the CTU, respectively.
  • the length of the first reference region is further extended by n rows of pixels on the basis of an integer multiple of the length of the CTU.
  • the length of the first reference area is an integer multiple of the length of the CTU plus n rows of pixels.
  • the width of the first reference area is further extended by m rows of pixels on the basis of an integer multiple of the width of the CTU. That is, the width of the first reference area is an integer that is the width of the CTU plus m lines of pixels. It is worth noting that the size of the second reference area is smaller than that of the first reference area.
  • the distance extending outward along the vertical direction of the reference image in the first reference area and the distance extending outward along the vertical direction of the reference image in the second reference area may be set to the same value.
  • the second distance x extending outward along the horizontal direction of the reference image in the second reference area can be configured according to requirements.
  • FIG. 8 is a flowchart of another inter-frame prediction method provided by an embodiment of the present invention, and the method can be applied to a decoding end. As shown in Figure 8, the method includes the following steps:
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • the target decoding area includes multiple sub-areas, and in the process of storing the first reference area in the second memory, the method further includes:
  • a second reference region corresponding to any sub-region is determined, and the second reference region belongs to the first reference region.
  • a second reference area corresponding to any sub-area including:
  • the reference image Based on the first motion vector, in the reference image, determine a target area corresponding to the position of any sub-area in the image to be encoded, and the target area is a rectangle;
  • the first motion vector is carried in the user extension data of the header information of the picture layer, the user extension data of the header information of the slice layer, supplementary enhancement information or metadata.
  • the target decoding area includes multiple sub-areas, and decoding processing is performed on the target decoding area, including:
  • the residuals are superimposed into the prediction block to obtain image data in any sub-region.
  • Yet another exemplary embodiment of the present invention provides an inter-frame prediction apparatus, as shown in FIG. 9 , the apparatus includes:
  • memory 1910 for storing computer programs
  • the processor 1920 is used for running the computer program stored in the memory 1910 to realize:
  • the reference image Based on the global motion vector, in the reference image, determine a first reference area corresponding to the target coding area, and store the first reference area in a second memory;
  • motion estimation is performed on the image blocks in the target coding area
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • the target coding area includes multiple sub-areas, and in the process of storing the first reference area in the second memory, the processor 1920 is further configured to:
  • any sub-region in the target coding region based on the global motion vector, in the reference image, determine a second reference region corresponding to the any sub-region, where the second reference region belongs to the the first reference area;
  • the performing motion estimation on the image blocks in the target coding area based on the image blocks in the first reference area includes:
  • motion estimation is performed on the image blocks in the any sub-region based on the image blocks in the second reference region stored in the second memory.
  • the processor 1920 is configured to:
  • the reference image Based on the global motion vector, in the reference image, determine a target area corresponding to the position of any sub-area in the to-be-coded image, and the target area is a rectangle;
  • processor 1920 is further configured to:
  • the second distance is determined according to the reading speed, and there is a proportional relationship between the reading speed and the second distance.
  • any sub-region includes multiple prediction blocks, and the processor 1920 is configured to:
  • a candidate motion vector corresponding to the any prediction block is determined, and the candidate motion vector reflects that the object in the any prediction block is compared with that in the reference The direction and distance of the offset in the image;
  • Motion estimation is performed on any of the prediction blocks based on the image blocks in the second reference area and the candidate blocks.
  • the processor 1920 is configured to:
  • a motion vector of the target block relative to any of the predicted blocks is determined.
  • the target coding region includes multiple coding tree blocks, the multiple coding tree blocks are located in the same row of the to-be-coded image, and the any sub-region is any of the multiple coding tree blocks.
  • a coding tree block is
  • processor 1920 is further configured to:
  • the global motion vector is encoded; wherein the global motion vector is included in the user extension data of the header information of the picture layer or the header information of the slice layer, or the global motion vector is included in the supplementary enhancement information, or all
  • the global motion vector described above is included in the metadata.
  • processor 1920 is further configured to:
  • the global motion vector is corrected.
  • the global motion vector includes a horizontal motion component and a vertical motion component
  • the processor 1920 is configured to:
  • the values of the horizontal motion component and the vertical motion component are adjusted to a first value.
  • the global motion vector includes a horizontal motion component and a vertical motion component
  • the processor 1920 is configured to:
  • the value of the vertical motion component is adjusted to the third value.
  • the inter-frame prediction apparatus shown in FIG. 9 may perform the methods of the embodiments shown in FIGS. 1 to 5 .
  • FIGS. 1 to 5 For parts not described in detail in this embodiment, reference may be made to the related descriptions of the embodiments shown in FIGS. 1 to 5 .
  • the execution process and technical effects of the technical solution refer to the descriptions in the embodiments shown in FIG. 1 to FIG. 5 , which will not be repeated here.
  • FIG. 10 Another exemplary embodiment of the present invention provides an inter-frame prediction apparatus, as shown in Figure 10, the apparatus includes:
  • memory 1810 for storing computer programs
  • a processor 1820 for running a computer program stored in the memory to achieve:
  • the first motion vector determine the first reference area corresponding to the target encoding area in the image to be encoded; wherein, the first reference area is located in the reference image, and the reference image is stored in the first memory 1810;
  • the image blocks in the first reference area are read to perform inter-frame prediction on the target coding area; wherein, a second access speed of data is accessed through the second memory
  • the first access speed is faster than accessing data through the first memory.
  • the target coding area includes multiple sub-areas, and in the process of storing the first reference area in the second memory, the processor 1820 is further configured to:
  • any sub-region in the target coding region based on the first motion vector, in the reference image, determine a second reference region corresponding to the any sub-region, where the second reference region belongs to the first reference area.
  • the processor 1820 is configured to:
  • the reference image Based on the first motion vector, in the reference image, determine a target area corresponding to the position of the any sub-area in the to-be-coded image, and the target area is a rectangle;
  • processor 1820 is further configured to:
  • the second distance is determined according to the reading speed, wherein there is a proportional relationship between the reading speed and the second distance.
  • the target coding region includes multiple coding tree blocks, the multiple coding tree blocks are located in the same row of the to-be-coded image, and the any sub-region is any of the multiple coding tree blocks.
  • a coding tree block is
  • processor 1820 is further configured to:
  • the first motion vector is included in the user extension data of the header information of the picture layer or the header information of the slice layer, or the first motion vector is included in the supplementary enhancement information , or the first motion vector is included in the metadata.
  • the inter-frame prediction apparatus shown in FIG. 10 may execute the method of the embodiment shown in FIG. 6 .
  • the inter-frame prediction apparatus shown in FIG. 10 may execute the method of the embodiment shown in FIG. 6 .
  • parts not described in detail in this embodiment reference may be made to the related description of the embodiment shown in FIG. 6 .
  • FIG. 11 Another exemplary embodiment of the present invention provides an inter-frame prediction apparatus, as shown in FIG. 11 , the apparatus includes:
  • memory 1710 for storing computer programs
  • the processor 1720 is used for running the computer program stored in the memory 1710 to realize:
  • the reference image Based on the global motion vector, in the reference image, determine a first reference region corresponding to the target decoding region, and store the first reference region in a second memory;
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • the target decoding area includes multiple sub-areas, and in the process of storing the first reference area in the second memory, the processor 1720 is further configured to:
  • any sub-region in the target decoding region based on the global motion vector, in the reference image, determine a second reference region corresponding to the any sub-region, and the second reference region belongs to the the first reference area;
  • decoding processing is performed on the image data in the any sub-region based on the image blocks in the second reference region stored in the second memory.
  • the processor 1720 is configured to:
  • the reference image Based on the global motion vector, in the reference image, determine a target area corresponding to the position of the any sub-area in the to-be-decoded image, and the target area is a rectangle;
  • the global motion vector is carried in the user extension data of the header information of the picture layer, the user extension data of the header information of the slice layer, supplementary enhancement information or metadata.
  • the target decoding area includes multiple sub-areas
  • the processor 1720 is configured to:
  • the residuals are superimposed into the prediction block to obtain image data in any of the sub-regions.
  • the inter-frame prediction apparatus shown in FIG. 11 may execute the method of the embodiment shown in FIG. 7 .
  • the inter-frame prediction apparatus shown in FIG. 11 may execute the method of the embodiment shown in FIG. 7 .
  • parts not described in detail in this embodiment reference may be made to the related description of the embodiment shown in FIG. 7 .
  • Yet another exemplary embodiment of the present invention provides an inter-frame prediction apparatus, as shown in FIG. 12 , the apparatus includes:
  • memory 1610 for storing computer programs
  • the processor 1620 is used for running the computer program stored in the memory 1610 to realize:
  • the first motion vector determine the first reference area corresponding to the target decoding area in the image to be decoded, the first reference area is located in the reference image, and the reference image is stored in the first memory;
  • the second access speed of accessing data through the second memory is faster than the first access speed of accessing data through the first memory.
  • the target decoding area includes multiple sub-areas, and in the process of storing the first reference area in the second memory, the processor 1620 is further configured to:
  • any sub-region in the target decoding region based on the first motion vector, in the reference image, determine a second reference region corresponding to the any sub-region, and the second reference region belongs to the first reference area.
  • the processor 1620 is configured to:
  • the reference image Based on the first motion vector, in the reference image, determine a target area corresponding to the position of the any sub-area in the to-be-coded image, and the target area is a rectangle;
  • the first motion vector is carried in the user extension data of the header information of the picture layer, the user extension data of the header information of the slice layer, supplementary enhancement information or metadata.
  • the target decoding area includes multiple sub-areas
  • the processor 1620 is configured to:
  • the residuals are superimposed into the prediction block to obtain image data in any of the sub-regions.
  • the inter-frame prediction apparatus shown in FIG. 12 may execute the method of the embodiment shown in FIG. 8 .
  • the inter-frame prediction apparatus shown in FIG. 12 may execute the method of the embodiment shown in FIG. 8 .
  • An embodiment of the present invention further provides an encoder, and the encoder may include the inter-frame prediction apparatus of the embodiment shown in FIG. 9 or FIG. 10 .
  • An embodiment of the present invention further provides a decoder, where the decoder may include the inter-frame prediction apparatus of the embodiment shown in FIG. 11 or FIG. 12 .
  • an embodiment of the present invention further provides a computer-readable storage medium, where executable codes are stored in the computer-readable storage medium, and the executable codes are used to implement the inter-frame prediction methods provided by the foregoing embodiments.

Abstract

一种帧间预测方法、装置、编码器、解码器和存储介质,该方法包括:获取待编码图像对应的全局运动矢量,全局运动矢量反映待编码图像中的物体整体在参考图像中偏移的方向与距离;其中,参考图像存储于第一存储器中(101);在待编码图像中确定目标编码区域(102);基于全局运动矢量,在参考图像中,确定与目标编码区域对应的第一参考区域,并将第一参考区域存储于第二存储器中(103);在第二存储器中,读取第一参考区域内的图像块(104);基于读取的第一参考区域内的图像块,对目标编码区域内的图像块进行运动估计(105);其中,通过第二存储器存取数据的第二存取速度比通过第一存储器中存取数据的第一存取速度快。通过上述方式可以解决带宽限制问题。

Description

帧间预测方法、装置、编码器、解码器和存储介质 技术领域
本发明涉及视频编解码技术领域,尤其涉及一种帧间预测方法、装置、编码器、解码器和存储介质。
背景技术
通过对原始图像进行编码,可以实现对原始图像的压缩,以便于传输压缩后的图像。
在对原始图像进行编码的过程中,需要基于原始图像对应的参考图像,对原始图像进行帧间预测,帧间预测主要涉及运动估计。通过运动估计的结果,能够确定原始图像中包含的任一图像块相对于参考图像中对应的图像块偏移的方向和距离。这样,在解码的过程中,基于参考图像和上述运动估计的结果,就能恢复出原始图像。其中,参考图像一般是存在存储器中的。在使用某一参考图像进行帧间预测时,就需要利用存储器中存储的参考图像来进行帧间预测。由于存取带宽的限制,如何高效的利用参考图像成为帧间预测技术中期望解决的问题。
发明内容
本发明实施例提供一种帧间预测方法、装置、编码器、解码器和存储介质,用以实现解决带宽限制问题,高效地利用参考图像。
第一方面,本发明实施例提供一种帧间预测方法,应用于编码端,该方法包括:
根据第一运动矢量,确定与待编码图像中的目标编码区域对应的第一参考区域;其中,所述第一参考区域位于参考图像中,以及所述参考图像存储于第一存储器中;
将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块,以对所述目标编码区域进行帧间预测;其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
第二方面,本发明实施例提供一种帧间预测方法,应用于编码端,该方法包括:
获取待编码图像对应的全局运动矢量,所述全局运动矢量反映所述待编码图像中的物体整体在参考图像中偏移的方向与距离;其中,所述参考图像存储于第一存储器中;
在所述待编码图像中确定目标编码区域;
基于所述全局运动矢量,在所述参考图像中,确定与所述目标编码区域对应的第一参考区域,并将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块;
基于读取的所述第一参考区域内的图像块,对所述目标编码区域内的图像块进行运动估计;
其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
第三方面,本发明实施例提供一种帧间预测方法,应用于解码端,该方法包括:
获取待解码图像对应的第一运动矢量;
根据所述第一运动矢量,确定与待解码图像中的目标解码区域对应的第一参考区域,所述第一参考区域位于参考图像中,所述参考图像存储于第一存储器中;
将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块,以对所述目标解码区域进行解码处理;
其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储 器中存取数据的第一存取速度快。
第四方面,本发明实施例提供一种帧间预测方法,应用于解码端,该方法包括:
获取待解码图像对应的全局运动矢量,所述全局运动矢量反映所述待解码图像中的物体整体在参考图像中偏移的方向与距离;其中,所述参考图像存储于第一存储器中;
在所述待解码图像中确定目标解码区域;
基于所述全局运动矢量,在所述参考图像中,确定与所述目标解码区域对应的第一参考区域,并将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块;
基于读取的所述第一参考区域内的图像块,对所述目标解码区域进行解码处理;
其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
第五方面,本发明实施例提供一种帧间预测装置,包括存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器实现:
根据第一运动矢量,确定与待编码图像中的目标编码区域对应的第一参考区域;其中,所述第一参考区域位于参考图像中,以及所述参考图像存储于第一存储器中;
将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块,以对所述目标编码区域进行帧间预测;其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
第六方面,本发明实施例提供一种帧间预测装置,包括存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器实现:
获取待编码图像对应的全局运动矢量,所述全局运动矢量反映所述待编码图像中的物体整体在参考图像中偏移的方向与距离;其中,所述参考图像存储于第一存储器中;
在所述待编码图像中确定目标编码区域;
基于所述全局运动矢量,在所述参考图像中,确定与所述目标编码区域对应的第一参考区域,并将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块;
基于读取的所述第一参考区域内的图像块,对所述目标编码区域内的图像块进行运动估计;
其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
第七方面,本发明实施例提供一种帧间预测装置,包括存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器实现:
获取待解码图像对应的第一运动矢量;
根据所述第一运动矢量,确定与待解码图像中的目标解码区域对应的第一参考区域,所述第一参考区域位于参考图像中,所述参考图像存储于第一存储器中;
将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块,以对所述目标解码区域进行解码处理;
其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
第八方面,本发明实施例提供一种帧间预测装置,包括存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器实现:
获取待解码图像对应的全局运动矢量,所述全局运动矢量反映所述待解码 图像中的物体整体在参考图像中偏移的方向与距离;其中,所述参考图像存储于第一存储器中;
在所述待解码图像中确定目标解码区域;
基于所述全局运动矢量,在所述参考图像中,确定与所述目标解码区域对应的第一参考区域,并将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块;
基于读取的所述第一参考区域内的图像块,对所述目标解码区域进行解码处理;
其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
第九方面,本发明实施例提供一种编码器,包括第五方面或者第六方面中的帧间预测装置。
第十方面,本发明实施例提供了一种计算机可读存储介质,所述存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令至少可以实现第一方面或者第二方面中的帧间预测方法。
第十一方面,本发明实施例提供一种解码器,包括第七方面或者第八方面中的帧间预测装置。
第十二方面,本发明实施例提供了一种计算机可读存储介质,所述存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令至少可以实现第三方面或者第四方面中的帧间预测方法。
通过本发明实施例提供的方法,可以基于全局运动矢量确定进行帧间预测的第一参考区域,基于第一参考区域内的图像块进行帧间预测,这样避免了从第一存储器中拷贝全部的参考图像到第二存储器中以基于参考图像进行帧间预测。由于需要拷贝读取的数据量减低,因此对读取带宽的消耗也随之降低,可以高效地利用参考图像进行帧间预测。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种编解码框架示意图;
图2为本发明实施例提供的一种帧间预测方法的流程示意图;
图3为本发明实施例提供的一种编码流程示意图;
图4为本发明实施例提供的一种确定第一参考区域的示意图;
图5为本发明实施例提供的一种确定第二参考区域的示意图;
图6为本发明实施例提供的另一种帧间预测方法的流程示意图;
图7为本发明实施例提供的一种帧间预测方法的流程示意图;
图8为本发明实施例提供的另一种帧间预测方法的流程示意图;
图9为本发明实施例提供的一种帧间预测装置的结构示意图;
图10为本发明实施例提供的一种帧间预测装置的结构示意图;
图11为本发明实施例提供的一种帧间预测装置的结构示意图;
图12为本发明实施例提供的一种帧间预测装置的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种。
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。
另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。
本发明实施例提供的方法可以在编解码端中实现。下面对编码端的结构进行简单的介绍。在编码端中,原始的视频帧会被进行以下处理:预测、变换、量化、熵编码、反量化、反变换、重建、滤波等。对应这些处理过程,如图1所示,编码端可以包括编码帧内预测模块、编码帧间预测模块、变换模块、量化模块、熵编码模块、反量化模块、反变换模块、重建模块、滤波模块、参考图像缓存模块。
在图1中,编码帧内预测模块、编码帧间预测模块可以基于重建帧分别确定帧内预测数据、帧内预测相关信息、帧间预测数据、帧间预测相关信息。与编码帧内预测模块和编码帧间预测模块相连的开关用于选择使用编码帧内预测模块还是编码帧间预测模块,由被选择的模块向加法器提供帧内预测数据或者帧间预测数据。帧内预测数据或者帧间预测数据经过加法器之后,得到残差。残差经过变换、量化处理,得到量化系数。量化系数、帧内预测相关信息、帧间预测相关信息等被输入到熵编码器中进行熵编码,最终得到用于向解码端发送的编码数据。
在确定帧内预测数据、帧间预测数据时,需要获取去失真的视频帧,去失真的视频帧可以被存储在参考图像缓存模块中,在使用时可以从参考图像缓存模块中读取出。去失真的视频帧可以通过以下方式获得:将量化系数进行反量化、反变换,以恢复残差。在重建模块,残差被加回到相应的帧内预测数据、帧间预测数据上,得到重建帧。重建帧是失真的视频帧,在变换以及量化的过程中,丢失了原始的视频帧的某些信息,如原始的视频帧中的高频分量信息,导致重建帧与原始的视频帧之间存在失真现象。因此,需要对重建帧进行相应 的处理,以减小重建帧和原始的视频帧之间的失真现象。具体做法可以是对重建帧进行滤波处理,滤波处理可以包括去块滤波处理、补偿处理等。
图2为本发明实施例提供的一种帧间预测方法的流程图,该方法应用于编码端。如图2所示,该方法包括如下步骤:
101、获取待编码图像对应的全局运动矢量,全局运动矢量反映待编码图像中的物体整体在参考图像中偏移的方向与距离。其中,参考图像存储于第一存储器中。
102、在待编码图像中确定目标编码区域。
103、基于全局运动矢量,在参考图像中,确定与目标编码区域对应的第一参考区域,并将第一参考区域存储于第二存储器中。在一个实施方式中,读取存储于第一存储器中的参考图像中的第一参考区域,并将第一参考区域存储于第二存储器中。第一参考区域为所述参考图像的部分图像。
104、在第二存储器中,读取第一参考区域内的图像块。
105、基于读取的第一参考区域内的图像块,对目标编码区域内的图像块进行运动估计。
其中,通过第二存储器存取数据的第二存取速度比通过第一存储器中存取数据的第一存取速度快。
在实际应用中,在视频编码过程中,可以使用参考图像对待编码图像进行帧间预测。参考图像是在对待编码图像编码之前已经经过编码的图像。不同待编码图像对应的参考图像可以相同也可以不同,这些参考图像都可以存储于第一存储器中。该第一存储器可以是双倍速率同步动态随机存储器(Double Data Rate Synchronous Dynamic Random Access Memory,DDR SDRAM)。
需要说明的是,在对待编码图像进行编码之前,可以先对整个的待编码图像进行划分,得到多个编码树块(Coding Tree Unit,CTU),然后分别对每个CTU进行编码。其中,CTU的大小可以是64×64。
如图3所示,编码操作实际可以包括帧内预测、帧间预测、变换处理、量化处理、熵编码等几个过程,在不同过程中还可以继续对CTU进行划分,以更 小的划分单位进行上述过程。例如,可以按照四叉树划分方式对CTU进行划分,得到多个编码块(Coding Unit,CU),CU的大小可以是8x8、16x16、32x32、64x64等。在进行帧内预测或者帧间预测时,可以对CU进行划分,得到多个预测块(Prediction Unit,PU),分别对每个PU进行帧内预测或者帧间预测。在进行变换处理或者量化处理时,又可以对CU进行划分,得到多个变换块(Transform Unit,TU),分别对每个TU进行变换处理或者量化处理。通过上述描述内容可见,在进行编码操作的不同过程时,可以继续对CTU进行划分,通过更小的不同的划分单位进行帧内预测、帧间预测、变换处理、量化处理、熵编码等几个过程。
在对待编码图像进行帧间预测时,可以确定该待编码图像对应的全局运动矢量(Global Motion Vector,GMV)。确定全局运动矢量的过程可以实现为:通过图像信号处理器(Image Signal Processor,ISP)计算出待编码图像对应的全局运动矢量,将待编码图像对应的全局运动矢量进行编码。或者,编码端也可以自动计算待编码图像对应的全局运动矢量。可以基于待编码图像以及待编码图像之前N帧图像计算待编码图像对应的全局运动矢量,其中,N可以是1或者2。
如果待编码图像是场景切换过程中录制的图像,或者是场景亮度变化较大时录制的图像,则计算出的全局运动矢量较大,这可能会导致后续根据该全局运动矢量计算出的参考区域不在参考图像内或者参考区域不准确,进行会影响编码效果。在本发明实施例中,为了消除这种影响,可以在获取待编码图像对应的全局运动矢量之后,确定全局运动矢量是否满足预设条件,若全局运动矢量不满足预设条件,则对全局运动矢量进行修正。
本发明实施例提供两种判断是否需要修正全局运动矢量的判断条件,以及分别对应的修改方式。
可选地,全局运动矢量可以包括水平运动分量与竖直运动分量。
水平运动分量反映待编码图像中的物体整体在参考图像中沿水平方向偏移的距离。竖直运动分量反映待编码图像中的物体整体在参考图像中沿竖直方向 偏移的距离
可选地,上述若全局运动矢量不满足预设条件,则对全局运动矢量进行修正的过程可以实现为:若水平运动分量或者竖直运动分量大于预设阈值,则将水平运动分量和竖直运动分量的值调整为第一数值。
上述预设阈值可以根据需求进行配置。在一实施方式中,上述预设阈值可以设置成100。在水平运动分量以及竖直运动分量中的任一运动分量大于预设阈值的情况下,可以直接将水平运动分量和竖直运动分量两个运动分量的值全部调整为第一数值。在另一实施方式中该第一数值可以是0。
此外,可选地,上述若全局运动矢量不满足预设条件,则对全局运动矢量进行修正的过程也可以实现为:确定待编码图像的宽度和高度;将宽度乘以预设比例,得到第二数值;将高度乘以预设比例,得到第三数值;若水平运动分量大于第二数值,则将水平运动分量的值调整为第二数值;若竖直运动分量大于第三数值,则将竖直运动分量的值调整为第三数值。
在实际应用中,假设待编码图像的宽为W、高为H,那么可以将该宽度乘以预设比例计算第二数值,将该高度乘以预设比例计算第三数值。在一种可能的应用场景中该预设比例例如可以是
Figure PCTCN2020132727-appb-000001
那么该第二数值可以是
Figure PCTCN2020132727-appb-000002
该第三数值则可以是
Figure PCTCN2020132727-appb-000003
若水平运动分量大于第二数值,则可以将水平运动分量的值直接调整为第二数值。若竖直运动分量大于第三数值,则可以将竖直运动分量的值直接调整为第三数值。
如果全局运动矢量不满足预设条件,则对全局运动矢量进行修正,使用修正后的全局运动矢量进行后续的步骤。
在确定待编码图像对应的全局运动矢量之后,可以在待编码图像中确定目标编码区域。前面提到过可以对待编码图像进行划分,通过划分能够得到多个CTU,这些CTU沿水平方向和竖直方向排列。待编码图像可以包括左方块(Tile)和右方块,可以理解为左半边图像和右半边图像,在左方块或者右方块中沿水平方向排列在同一行的CTU可以称为编码树块行(以下简称为CTU行)。
在一种可能的实现方式中本发明实施例中的目标编码区域可以是一个CTU行。如图4所示,图4中用字母“A”标注的方框就可以表示在左方块中的一个CTU行,该CTU行可以作为目标编码区域。
可理解的是,待编码图像中包括多个CTU行,每个CTU行都可以作为目标编码区域,都可以通过本发明实施例提供的方式进行帧间预测。为了方便说明,本发明实施例仅以对一个CTU行为例说明帧间预测的过程,其他CTU行进行帧间预测的过程相同,不再一一赘述。
在找到目标编码区域之后,可以基于全局运动矢量,在参考图像中,确定与目标编码区域对应的第一参考区域,并将第一参考区域存储于第二存储器中。
为了便于理解,以图4为例说明确定与目标编码区域对应的第一参考区域(也可以将第一参考区域称为是行缓冲器(line buffer)范围)的过程。图4中左图表示待编码图像,右图表示参考图像。参考图像中与字母“A”标注的方框所表示的CTU行位于相同位置的CTU行已通过字母“B”标注的方框示出。从字母“B”标注的方框所表示的CTU行左上角位置上的像素X起始,偏移全局运动矢量所指示的方向与距离,能够找到另外一个像素Y。以像素Y作为另一个CTU行左上角位置上的像素,可以确定出通过字母“C”标注的方框所表示的另一个CTU行。然后,从字母“C”标注的CTU行的上下边界沿参考图像的竖直方向分别向外扩展距离m,且从字母“C”标注的CTU行的左右边界沿参考图像的水平方向分别向外扩展距离n,就可以得到与目标编码区域对应的第一参考区域。然而,本发明并非限于此。在另一实施方式中,当同时对多个CTU做帧间预测时,第一参考区域的长或者宽可以分别为CTU行的长或者宽的整数倍。在又一实施方式中,第一参考区域的长在CTU行的长的整数倍的基础上再向外扩展n行像素。也就是说,第一参考区域的长为CTU行的长的整数倍加上n行像素。第一参考区域的宽在CTU行的宽的整数倍的基础上再向外扩展m行像素。也就是说,第一参考区域的宽为CTU行的宽的整数被加上m行像素。
上述m和n的值可以根据需求进行配置,具体可以根据帧间预测过程中需要进行运动搜索的搜索范围大小进行配置。在一种可能的实现方式中,例如可 以将m设置为48,可以将n设置为32。
可以理解的是该第一参考区域是参考图像中的一部分,参考图像存储于第一存储器中,可以从第一存储器中获取第一参考区域的图像块,将第一参考区域的图像块转存到第二存储器中。其中,该第二存储器可以是随机存取存储器(Random Access Memory,RAM)。需要说明的是,需要将帧间预测过程中使用的第一参考区域的图像块存储到第二存储器中,以便于正常基于第二存储器中存储的第一参考区域的图像块对目标编码区域的图像块进行帧间预测。通过第二存储器存取数据的第二存取速度比通过第一存储器中存取数据的第一存取速度快。
在读取第一参考区域内的图像块的过程中,可以基于读取的第一参考区域内的图像块,对目标编码区域内的图像块进行运动估计。
可以理解的是,帧间预测主要包括运动估计的步骤。运动估计为在参考图像中找到一个预测块,该预测块与待编码图像中的目标编码区域中当前的PU为较为匹配的PU。在运动估计的过程中,可以通过预设方式在参考图像中确定多个候选PU,然后再从多个候选PU中确定出与当前的PU之间的残差最小的预测块。由于目标编码区域内的图像块可以划分为多个PU,对于每个PU都可以进行一次运动估计的过程,以找到与当前的PU匹配的预测块。
由于存在存储器之间读写数据带宽以及存储器的性能的限制因素,填充完第一参考区域中的图像数据可能需要消耗一定的时间。填充第一参考区域中的图像数据的过程也可以理解为从第一存储器中将第一参考区域中的图像数据拷贝到第二存储器的过程。在实际应用中,为了提高帧间预测的速度,在不等所有的第一参考区域中的图像数据都填充完毕之后,就可以开始进行帧间预测,这样可以大大提高帧间预测的速度。基于此,假设可以继续将目标编码区域划分为多个子区域,那么在将第一参考区域存储于第二存储器的过程中,对于目标编码区域中的任一子区域,还可以基于全局运动矢量,在参考图像中,确定与任一子区域对应的第二参考区域,第二参考区域属于第一参考区域。
可以理解的是,可以在第一参考区域内再确定出第二参考区域,该第二参 考区域是在当前存储器之间读写数据带宽以及存储器的性能限制的情况下,能够在短时间内填充完的图像数据所属区域。
假设上述目标编码区域是CTU行,那么目标编码区域包括多个编码树块,多个编码树块位于待编码图像的同一行,且任一子区域可以是多个编码树块中的任一编码树块,也就是说任一子区域也可以是一个CTU。
可选地,上述基于全局运动矢量,在参考图像中,确定与任一子区域对应的第二参考区域的过程可以实现为:基于全局运动矢量,在参考图像中,确定与任一子区域在待编码图像中位置相对应的目标区域,目标区域为矩形;确定从目标区域的上下边界沿参考图像的竖直方向分别向外扩展第一距离,且从目标区域的左右边界沿参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
需要说明的是,在上述过程中,可以在参考图像中确定与待编码图像中的目标编码区域位于相同位置的图像区域。例如,待编码图像的尺寸为128×128,目标编码区域的尺寸为64×64,目标编码区域左上角位置的像素在待编码图像中的位置假设为(24,24),参考图像的尺寸也是128×128,在参考图像中以(24,24)位置上的像素为左上角位置的像素可以确定出一块尺寸为64×64的图像区域,该图像区域可以作为上述参考图像中与目标编码区域位于相同位置的图像区域。
在确定出位于相同位置的图像区域之后,可以基于全局运动矢量,确定目标区域。例如,假设全局运动矢量为(20,20),位于相同位置的图像区域左上角位置的像素坐标为(24,24),用左上角位置的像素坐标加上全局运动矢量(20,20),得到目标区域左上角位置的像素坐标(44,44),然后在参考图像中以(44,44)位置上的像素为左上角位置的像素可以确定出一块尺寸为64×64的目标区域。
为了便于理解,以图5为例说明确定第二参考区域的过程。图5中左图表示待编码图像,右图表示参考图像。参考图像中与字母“A”标注的方框所表示的CTU位于相同位置的CTU已通过字母“B”标注的方框示出。从字母“B”标 注的方框所表示的CTU左上角位置上的像素X起始,偏移全局运动矢量所指示的方向与距离,能够找到另外一个像素Y。以像素Y作为另一个CTU左上角位置上的像素,可以确定出通过字母“C”标注的方框所表示的另一个CTU。然后,从字母“C”标注的CTU的上下边界沿参考图像的竖直方向分别向外扩展第一距离m,且从字母“C”标注的CTU行的左右边界沿参考图像的水平方向分别向外扩展第二距离x,就可以得到第二参考区域。然而,本发明并非限于此。在另一实施方式中,当同时对多个CTU做帧间预测时,第二参考区域的长或者宽可以分别为CTU的长或者宽的整数倍。在又一实施方式中,第一参考区域的长在CTU的长的整数倍的基础上再向外扩展n行像素。也就是说,第一参考区域的长为CTU的长的整数倍加上n行像素。第一参考区域的宽在CTU的宽的整数倍的基础上再向外扩展m行像素。也就是说,第一参考区域的宽为CTU的宽的整数被加上m行像素。值得注意的是,第二参考区域的尺寸小于第一参考区域的尺寸。
需要说明的是,可以将第一参考区域中沿参考图像的竖直方向向外扩展的距离与第二参考区域中沿参考图像的竖直方向向外扩展的距离设置为相同数值。第二参考区域中沿参考图像的水平方向向外扩展的第二距离x可以根据需求进行配置。可选地,配置第二距离的具体实现方式可以是:确定读取第一参考区域内的图像块的读取速度;根据读取速度,确定第二距离,读取速度与第二距离之间呈正比关系。需要说明的是,在其他实施方式中,也可以不需要根据读取速度来确定第二距离。在一实施方式中,可以根据图像编解码质量的要求或者硬件实现中的资源消耗的情况设置第二距离或者设置第二参考区域。
在实际应用中,可以根据从第一存储器中将参考图像中的部分图像拷贝到第二存储器的速度来确定第二距离。当读取速度越小时,第二距离越小,反之,当读取速度越大时,第二距离越大。
除了可以根据读取速度来配置第二距离之外,还可以根据帧间预测过程中需要进行运动搜索的搜索范围大小配置第二距离。当然,可以结合读取速度以及搜索范围大小配置第二距离。
在一种可能的实现的方式中,例如可以将第二距离设置为256。
可选地,在确定第二参考区域之前,还可以将待编码图像向外进行填充(Padding)(一种图像的扩展方式)多行多列,例如可以向外填充16行16列。通过向外填充的方式,可以扩大待编码图像的大小,使得帧间预测的结果更加准确。
可以理解的是,在从第一参考区域中限制了进行运动搜索的搜索范围为第二参考区域之后,如果候选运动矢量不在第二参考区域内或者搜索点对应的预测块不在第二参考区域内,则需要对候选运动矢量进行修正。对于目标编码区域中的任一子区域,可以基于存储于第二存储器中的第二参考区域内的图像块,对任一子区域内的图像块进行运动估计。任一子区域可以是一个CTU。
在实际应用中,可以对任一子区域进行划分,得到多个PU,对于多个PU中的任一PU X,可以基于存储于第二存储器中的第二参考区域内的图像块,对任一PU X进行运动估计。
可选地,基于存储于第二存储器中的第二参考区域内的图像块,对任一PU X进行运动估计的过程可以实现为:确定任一PU X对应的候选运动矢量,候选运动矢量反映了物体在任一PU X中相较于在参考图像中偏移的方向和距离;基于候选运动矢量,在参考图像中,确定任一PU X对应的候选块;基于第二参考区域内的图像块和候选块,对任一PU X进行运动估计。
需要说明的是,在上述过程中,可以在参考图像中确定与目标编码区域位于相同位置的图像区域A,然后对于任一PU X来说,可以用上述确定出的图像区域A的左上角像素位置叠加上候选运动矢量,得到移动像素位置,接着以该移动像素位置作为起始位置圈定一个尺寸与上述任一PU X的尺寸相同的图像区域B,该图像区域B即为上述任一PU X对应的候选块。
可选地,确定任一PU X对应的候选运动矢量的过程可以实现为:通过整像素搜索方式,获得任一PU X对应的候选运动矢量。
可选地,基于第二参考区域内的图像块和候选块,对任一PU X进行运动估计的过程可以实现为:对于候选块中不在第二参考区域内的第一候选块,确定第一候选块与第二参考区域的相对位置,基于相对位置,对第一候选块进行移 动;在移动后的第一候选块以及候选块中在第二参考区域内的第二候选块中,确定与任一预测块之间的残差最小的目标块;确定目标块相对于任一PU X的运动矢量。
在实际应用中,由于计算出的候选运动矢量所指示的候选块不一定位于第二参考区域内,需要对超出第二参考区域范围的候选块进行修正。在修正过程中,首先可以确定出不在第二参考区域内的第一候选块,然后确定第一候选块与第二参考区域的相对位置,基于相对位置,对第一候选块进行移动。在一个实施方式中,根据第一候选块中位于第二参考区域之外的行数和/或列数,确定对第一候选块进行移动的行数和/或列数。例如,如果第一候选块中仅有一行位于第二参考区域的上方,则可以将第一候选块下移一行以保证移动后的第一候选块完全在第二参考区域范围内。对于那些已经在第二参考区域范围内的第二候选块,保持它们不动。然后,可以在移动后的第一候选块以及候选块中在第二参考区域内的第二候选块中,确定与任一预测块之间的残差最小的目标块。最后,在确定了目标块之后,可以确定该目标块相对于任一PU X偏移的目标方向和目标距离,该偏移的目标方向和目标距离即可作为任一PU X对应的目标运动矢量。
可以理解的是,由于解码是编码的逆过程,编码过程中使用到的一些编码信息解码过程中也需要知道,这样才可以正确进行解码。由于编码时使用到了全局运动矢量,因此可以将全局运动矢量进行编码然后向解码端发送。其中,全局运动矢量包含于图像层的头信息或者条带层的头信息的用户扩展数据中,或者全局运动矢量包含于补充增强信息中,或者全局运动矢量包含于元数据(Metadata)中。
根据本发明的实施方式,可以将全局运动矢量包含于图像层的头信息或者条带层的头信息的用户扩展数据(extension data)中,或者将全局运动矢量包含于补充增强信息(Supplemental Enhancement Information,SEI)中,或者将全局运动矢量包含于元数据(Metadata)中。在一个实施方式中,将所述全局运动矢量作为编码头信息的用户扩展数据(extension data),写入至码流 中。例如,将所述全局运动矢量包含于图像层的头信息或者条带层的头信息的用户扩展数据中,从而进一步写入码流中。在另一实施方式中,可以将所述全局运动矢量作为补充增强信息,写入至码流中。例如,将所述全局运动矢量包含于补充增强信息中写入至码流中。在又一实施方式中,可以将所述全局运动矢量作为元数据,写入至码流中。如此一来,可以实现编解码端的整个参考数据管理方式的高度耦合。
在实际应用中,在进行头信息的编码时,可以采用扩展数据(extension data)的方式将全局运动矢量写到码流中,具体可以采用图像参数集的扩展数据或者切片头的扩展数据将全局运动矢量的水平运动分量和竖直运动分量分别写到码流中。
在解码过程中,首先可以对头信息进行解码,得到全局运动矢量。如果在编码过程中,采用图像参数集的扩展数据写入全局运动矢量,则对图像参数集的扩展数据解码可以得到全局运动矢量。如果在编码过程中,采用的切片头的扩展数据写入全局运动矢量,则对切片头的扩展数据解码可以得到全局运动矢量。
通过本发明实施例提供的方法,可以避免从第一存储器中将整个的参考图像存储到第二存储器中,显然,如果从第一存储器中将整个的参考图像存储到第二存储器中会占用很高的数据读写带宽。而采用本发明实施例提供的方法,可以基于全局运动矢量,在参考图像中,确定与目标区域对应的第一参考区域,将第一参考区域内的图像块存储到第二存储器中,在第二存储器中,读取第一参考区域内的图像块,基于读取的第一参考区域内的图像块,对目标区域内的图像块进行预测重建。可以保障第一参考区域内的图像块是目标区域预测重建必须要使用的图像块,避免读取整个参考图像,节约了数据读写带宽。
需要说明的是,编解码的过程可以在编解码器中实现。高集成度的编解码器能够实现编解码端一些共用模块的复用以及存储资源上的共享,有利于节约实现成本和使用成本。如果编解码器耦合在一起,设计成高度集成的,这些编解码端完全一致的过程就可以共用,不用进行重复设计,可以节省电路资源。
通过本发明实施例提供的方法,可以基于全局运动矢量确定进行帧间预测的第一参考区域,基于第一参考区域内的图像块进行帧间预测,这样避免了从第一存储器中拷贝全部的参考图像到第二存储器中以基于参考图像进行帧间预测。由于需要拷贝读取的数据量减低,因此对读取带宽的消耗也随之降低,可以高效地利用参考图像进行帧间预测。
图6为本发明实施例提供的另一种帧间预测方法的流程图,该方法可以应用于编码端。如图6所示,该方法包括如下步骤:
601、根据第一运动矢量,确定与待编码图像中的目标编码区域对应的第一参考区域。其中,第一参考区域位于参考图像中,以及参考图像存储于第一存储器中。
602、将第一参考区域存储于第二存储器中。
603、在第二存储器中,读取第一参考区域内的图像块,以对目标编码区域进行帧间预测。其中,通过第二存储器存取数据的第二存取速度比通过第一存储器中存取数据的第一存取速度快。
上述第一运动矢量可以是前述实施例中的全局运动矢量,有关描述可以参考前述实施例,在此不再赘述。
可选地,目标编码区域包括多个子区域,在将第一参考区域存储于第二存储器的过程中,该方法还包括:对于目标编码区域中的任一子区域,基于第一运动矢量,在参考图像中,确定与任一子区域对应的第二参考区域,第二参考区域属于第一参考区域。
可选地,基于第一运动矢量,在参考图像中,确定与任一子区域对应的第二参考区域的过程可以实现为:基于第一运动矢量,在参考图像中,确定与在待编码图像中的任一子区域的位置相对应的目标区域,目标区域为矩形;确定从目标区域的上下边界沿参考图像的竖直方向分别向外扩展第一距离,且从目标区域的左右边界沿参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
可选地,该方法还包括:确定读取第一参考区域内的图像块的读取速度; 根据读取速度,确定第二距离,其中,读取速度与第二距离之间呈正比关系。
可选地,目标编码区域包括多个编码树块,多个编码树块位于待编码图像的同一行,任一子区域为多个编码树块中的任一编码树块。
可选地,该方法还包括:将第一运动矢量进行编码;其中,第一运动矢量包含于图像层的头信息或者条带层的头信息的用户扩展数据中,或者第一运动矢量包含于补充增强信息中,或者第一运动矢量包含于元数据中。
图6所示实施例中具体实现过程可以参考前述实施例中的相关说明,在此暂不赘述。
相应地,图7为本发明实施例提供的一种帧间预测方法的流程图,该方法可以应用于解码端。如图7所示,该方法包括如下步骤:
701、获取待解码图像对应的全局运动矢量,全局运动矢量反映待解码图像中的物体整体在参考图像中偏移的方向与距离。其中,参考图像存储于第一存储器中。
702、在待解码图像中确定目标解码区域。
703、基于全局运动矢量,在参考图像中,确定与目标解码区域对应的第一参考区域,并将第一参考区域存储于第二存储器中。
704、在第二存储器中,读取第一参考区域内的图像块。
705、基于读取的第一参考区域内的图像块,对目标解码区域进行解码处理。
其中,通过第二存储器存取数据的第二存取速度比通过第一存储器中存取数据的第一存取速度快。
可选地,上述全局运动矢量可以携带于图像层的头信息的用户扩展数据、条带层的头信息的用户扩展数据、补充增强信息或者元数据中。
在解码过程中,首先可以对头信息进行解码,得到全局运动矢量。在一个实施方式中,如果在编码过程中,在图像参数集的扩展数据中写入全局运动矢量,则对图像参数集的扩展数据解码可以得到全局运动矢量。在另一个实施方式中,如果在编码过程中,在切片头的扩展数据中写入全局运动矢量,则对切片头的扩展数据解码可以得到全局运动矢量。在又一个实施方式中,如果在编 码过程中,在元数据中写入全局运动矢量,则对元数据解码可以得到全局运动矢量。
在解码过程中,可以使用参考图像对待解码图像进行解码处理。参考图像是在对待解码图像进行解码之前已经经过解码的图像。不同待解码图像对应的参考图像可以相同也可以不同,这些参考图像都可以存储于第一存储器中。该第一存储器可以是双倍速率同步动态随机存储器。
需要说明的是,在对待解码图像进行解码之前,可以先对整个的待解码图像进行划分,得到多个解码区域,其中目标解码区域就可以是多个解码区域中的任一解码区域,目标解码区域可以是一个CTU行。
待解码图像可以包括左方块(Tile)和右方块。在左方块或者右方块中沿水平方向排列在同一行的CTU可以称为一个CTU行。如图4所示,图4中用字母“A”标注的方框就可以表示在左方块中的一个CTU行,该CTU行可以作为目标解码区域。
在找到目标编码区域之后,可以基于全局运动矢量,在参考图像中,确定与目标编码区域对应的第一参考区域,并将第一参考区域存储于第二存储器中。
为了便于理解,以图4为例说明确定与目标解码区域对应的第一参考区域(也可以将第一参考区域称为是行缓冲器(line buffer)范围)的过程。图4中左图表示待解码图像,右图表示参考图像。参考图像中与字母“A”标注的方框所表示的CTU行位于相同位置的CTU行已通过字母“B”标注的方框示出。从字母“B”标注的方框所表示的CTU行左上角位置上的像素X起始,偏移全局运动矢量所指示的方向与距离,能够找到另外一个像素Y。以像素Y作为另一个CTU行左上角位置上的像素,可以确定出通过字母“C”标注的方框所表示的另一个CTU行。然后,从字母“C”标注的CTU行的上下边界沿参考图像的竖直方向分别向外扩展距离m,且从字母“C”标注的CTU行的左右边界沿参考图像的水平方向分别向外扩展距离n,就可以得到与目标解码区域对应的第一参考区域。然而,本发明并非限于此。在另一实施方式中,当同时对多个CTU做帧间预测时,第一参考区域的长或者宽可以分别为CTU行的长或者宽的整数倍。在 又一实施方式中,第一参考区域的长在CTU行的长的整数倍的基础上再向外扩展n行像素。也就是说,第一参考区域的长为CTU行的长的整数倍加上n行像素。第一参考区域的宽在CTU行的宽的整数倍的基础上再向外扩展m行像素。也就是说,第一参考区域的宽为CTU行的宽的整数被加上m行像素。
上述m和n的值可以根据需求进行配置,具体可以根据帧间预测过程中需要进行运动搜索的搜索范围大小进行配置。在一种可能的实现方式中,例如可以将m设置为48,可以将n设置为32。
可以理解的是该第一参考区域是参考图像中的一部分,参考图像存储于第一存储器中,可以从第一存储器中获取第一参考区域的图像块,将第一参考区域的图像块转存到第二存储器中。其中,该第二存储器可以是随机存取存储器。
可选地,目标解码区域可以包括多个子区域,基于读取的第一参考区域内的图像块,对目标解码区域进行解码处理的过程可以实现为:对于目标解码区域中的任一子区域,从编码端发送的码流中获取任一子区域对应的运动矢量残差;基于运动矢量残差,在第一参考区域中,确定任一子区域对应的预测块;从编码端发送的码流中获取任一子区域对应的残差;将残差叠加到预测块中,得到任一子区域内的图像数据。
编码端可以将任一子区域X对应的运动矢量残差进行编码发送到解码端,解码端可以获取到子区域X对应的运动矢量残差。然后,解码端再基于子区域X对应的运动矢量残差、以及子区域X的相邻子区域对应的运动矢量,确定出子区域X对应的运动矢量。接着,可以基于子区域X对应的运动矢量,在第一参考区域中,确定子区域X对应的预测块。
上述基于子区域X对应的运动矢量,在在第一参考区域中,确定子区域X对应的预测块的过程可以实现为:在第一参考区域中,确定与子区域X在待解码图像中的位置相同的图像块Y。从图像块Y所在位置出发偏移子区域X对应的运动矢量指示的方向与距离,可以确定子区域X对应的预测块。
在确定出子区域X对应的预测块之后,可以从编码端发送的码流中获取任一子区域对应的残差,将残差加回到预测块中,就可以得到任一子区域内的图 像数据,也就是说可以将子区域X成功进行解出。
在另一方面,在本发明实施例中,由于存在存储器之间读写数据带宽以及存储器的性能的限制因素,填充完第一参考区域中的图像数据可能需要消耗一定的时间。填充第一参考区域中的图像数据的过程也可以理解为从第一存储器中将第一参考区域中的图像数据拷贝到第二存储器的过程。
在实际应用中,为了提高帧间预测的速度,在不等所有的第一参考区域中的图像数据都填充完毕之后,就可以开始进行帧间预测,这样可以大大提高帧间预测的速度。基于此,可选地,假设可以继续将目标编码区域划分为多个子区域,那么目标解码区域可以包括多个子区域,在将第一参考区域存储于第二存储器的过程中,本发明实施例提供的方法还可以包括:对于目标解码区域中的任一子区域,基于全局运动矢量,在参考图像中,确定与任一子区域对应的第二参考区域,第二参考区域属于第一参考区域。相应地,基于读取的第一参考区域内的图像块,对目标解码区域进行解码处理的过程可以实现为:对于任一子区域,基于存储于第二存储器中的第二参考区域内的图像块,对任一子区域内的图像数据进行解码处理。
假设上述目标解码区域是一个CTU行,那么目标解码区域包括多个解码树块,多个解码树块位于待解码图像的同一行,且任一子区域可以是多个解码树块中的任一解码树块,也就是说任一子区域也可以是CTU行中的一个CTU。
可选地,基于全局运动矢量,在参考图像中,确定与任一子区域对应的第二参考区域的过程可以实现为:基于全局运动矢量,在参考图像中,确定与在待解码图像中的任一子区域的位置相对应的目标区域,目标区域为矩形;确定从目标区域的上下边界沿参考图像的竖直方向分别向外扩展第一距离,且从目标区域的左右边界沿参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
需要说明的是,在上述过程中,可以在参考图像中确定与待解码图像中的目标解码区域位于相同位置的图像区域。例如,待解码图像的尺寸为128×128,目标解码区域的尺寸为64×64,目标解码区域左上角位置的像素在待解码图像 中的位置假设为(24,24),参考图像的尺寸也是128×128,在参考图像中以(24,24)为左上角位置的像素可以确定出一块尺寸为64×64的图像区域,该图像区域可以作为上述参考图像中与目标解码区域位于相同位置的图像区域。
在确定出位于相同位置的图像区域之后,可以基于全局运动矢量,确定目标区域。例如,假设全局运动矢量为(20,20),位于相同位置的图像区域左上角位置的像素坐标为(24,24),用左上角位置的像素坐标加上全局运动矢量(20,20),得到目标区域左上角位置的像素坐标(44,44),然后在参考图像中以(44,44)为左上角位置的像素可以确定出一块尺寸为64×64的目标区域。
为了便于理解,以图5为例说明确定第二参考区域的过程。图5中左图表示待解码图像,右图表示参考图像。参考图像中与字母“A”标注的方框所表示的CTU位于相同位置的CTU已通过字母“B”标注的方框示出。从字母“B”标注的方框所表示的CTU左上角位置上的像素X起始,偏移全局运动矢量所指示的方向与距离,能够找到另外一个像素Y。以像素Y作为另一个CTU左上角位置上的像素,可以确定出通过字母“C”标注的方框所表示的另一个CTU。然后,从字母“C”标注的CTU的上下边界沿参考图像的竖直方向分别向外扩展第一距离m,且从字母“C”标注的CTU行的左右边界沿参考图像的水平方向分别向外扩展第二距离x,就可以得到第二参考区域。然而,本发明并非限于此。在另一实施方式中,当同时对多个CTU做帧间预测时,第二参考区域的长或者宽可以分别为CTU的长或者宽的整数倍。在又一实施方式中,第一参考区域的长在CTU的长的整数倍的基础上再向外扩展n行像素。也就是说,第一参考区域的长为CTU的长的整数倍加上n行像素。第一参考区域的宽在CTU的宽的整数倍的基础上再向外扩展m行像素。也就是说,第一参考区域的宽为CTU的宽的整数被加上m行像素。值得注意的是,第二参考区域的尺寸小于第一参考区域的尺寸。
需要说明的是,可以将第一参考区域中沿参考图像的竖直方向向外扩展的距离与第二参考区域中沿参考图像的竖直方向向外扩展的距离设置为相同数值。第二参考区域中沿参考图像的水平方向向外扩展的第二距离x可以根据需求进行配置。
图8为本发明实施例提供的另一种帧间预测方法的流程图,该方法可以应用于解码端。如图8所示,该方法包括如下步骤:
801、获取待解码图像对应的第一运动矢量。
802、根据第一运动矢量,确定与待解码图像中的目标解码区域对应的第一参考区域,第一参考区域位于参考图像中,参考图像存储于第一存储器中。
803、将第一参考区域存储于第二存储器中。
804、在第二存储器中,读取第一参考区域内的图像块,以对目标解码区域进行解码处理。
其中,通过第二存储器存取数据的第二存取速度比通过第一存储器中存取数据的第一存取速度快。
可选地,目标解码区域包括多个子区域,在将第一参考区域存储于第二存储器的过程中,方法还包括:
对于目标解码区域中的任一子区域,基于第一运动矢量,在参考图像中,确定与任一子区域对应的第二参考区域,第二参考区域属于第一参考区域。
可选地,基于第一运动矢量,在参考图像中,确定与任一子区域对应的第二参考区域,包括:
基于第一运动矢量,在参考图像中,确定与在待编码图像中的任一子区域的位置相对应的目标区域,目标区域为矩形;
确定从目标区域的上下边界沿参考图像的竖直方向分别向外扩展第一距离,且从目标区域的左右边界沿参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
可选地,第一运动矢量携带于图像层的头信息的用户扩展数据、条带层的头信息的用户扩展数据、补充增强信息或者元数据中。
可选地,目标解码区域包括多个子区域,对目标解码区域进行解码处理,包括:
对于目标解码区域中的任一子区域,从编码端发送的码流中获取任一子区域对应的第二运动矢量;
基于第二运动矢量,在第一参考区域中,确定任一子区域对应的预测块;
从编码端发送的码流中获取任一子区域对应的残差;
将残差叠加到预测块中,得到任一子区域内的图像数据。
图8所示实施例中具体实现过程可以参考图7对应的实施例中的相关说明,在此暂不赘述。
本发明又一示例性实施例提供了一种帧间预测装置,如图9所示,该装置包括:
存储器1910,用于存储计算机程序;
处理器1920,用于运行存储器1910中存储的计算机程序以实现:
获取待编码图像对应的全局运动矢量,所述全局运动矢量反映所述待编码图像中的物体整体在参考图像中偏移的方向与距离;其中,所述参考图像存储于第一存储器中;
在所述待编码图像中确定目标编码区域;
基于所述全局运动矢量,在所述参考图像中,确定与所述目标编码区域对应的第一参考区域,并将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块;
基于读取的所述第一参考区域内的图像块,对所述目标编码区域内的图像块进行运动估计;
其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
可选地,所述目标编码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述处理器1920,还用于:
对于所述目标编码区域中的任一子区域,基于所述全局运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域;
所述基于所述第一参考区域内的图像块,对所述目标编码区域内的图像块进行运动估计,包括:
对于所述任一子区域,基于存储于所述第二存储器中的所述第二参考区域内的图像块,对所述任一子区域内的图像块进行运动估计。
可选地,所述处理器1920,用于:
基于所述全局运动矢量,在所述参考图像中,确定与所述任一子区域在所述待编码图像中位置相对应的目标区域,所述目标区域为矩形;
确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
可选地,所述处理器1920,还用于:
确定读取所述第一参考区域内的图像块的读取速度;
根据所述读取速度,确定所述第二距离,所述读取速度与所述第二距离之间呈正比关系。
可选地,所述任一子区域包括多个预测块,所述处理器1920,用于:
对于所述任一子区域中的任一预测块,确定所述任一预测块对应的候选运动矢量,所述候选运动矢量反映了物体在所述任一预测块中相较于在所述参考图像中偏移的方向和距离;
基于所述候选运动矢量,在所述参考图像中,确定所述任一预测块对应的候选块;
基于所述第二参考区域内的图像块和所述候选块,对所述任一预测块进行运动估计。
可选地,所述处理器1920,用于:
对于所述候选块中不在所述第二参考区域内的第一候选块,确定所述第一候选块与所述第二参考区域的相对位置,基于所述相对位置,对所述第一候选块进行移动;
在移动后的第一候选块以及所述候选块中在所述第二参考区域内的第二候选块中,确定与所述任一预测块之间的残差最小的目标块;
确定所述目标块相对于所述任一预测块的运动矢量。
可选地,所述目标编码区域包括多个编码树块,所述多个编码树块位于所述待编码图像的同一行,所述任一子区域为所述多个编码树块中的任一编码树块。
可选地,所述处理器1920,还用于:
将所述全局运动矢量进行编码;其中所述全局运动矢量包含于图像层的头信息或者条带层的头信息的用户扩展数据中,或者所述全局运动矢量包含于补充增强信息中,或者所述全局运动矢量包含于元数据中。
可选地,所述处理器1920,还用于:
确定所述全局运动矢量是否满足预设条件;
若所述全局运动矢量不满足预设条件,则对所述全局运动矢量进行修正。
可选地,所述全局运动矢量包括水平运动分量与竖直运动分量,所述处理器1920,用于:
若所述水平运动分量或者竖直运动分量大于预设阈值,则将所述水平运动分量和所述竖直运动分量的值调整为第一数值。
可选地,所述全局运动矢量包括水平运动分量与竖直运动分量,所述处理器1920,用于:
确定所述待编码图像的宽度和高度;
将所述宽度乘以预设比例,得到第二数值;
将所述高度乘以所述预设比例,得到第三数值;
若所述水平运动分量大于所述第二数值,则将所述水平运动分量的值调整为所述第二数值;
若所述竖直运动分量大于所述第三数值,则将所述竖直运动分量的值调整为所述第三数值。
图9所示的帧间预测装置可以执行图1-图5所示实施例的方法,本实施例未详细描述的部分,可参考对图1-图5所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1-图5所示实施例中的描述,在此不再赘述。
本发明又一示例性实施例提供了一种帧间预测装置,如图10所示,该装置 包括:
存储器1810,用于存储计算机程序;
处理器1820,用于运行存储器中存储的计算机程序以实现:
根据第一运动矢量,确定与待编码图像中的目标编码区域对应的第一参考区域;其中,所述第一参考区域位于参考图像中,以及所述参考图像存储于第一存储器1810中;
将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块,以对所述目标编码区域进行帧间预测;其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
可选地,所述目标编码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述处理器1820,还用于:
对于所述目标编码区域中的任一子区域,基于所述第一运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域。
可选地,所述处理器1820,用于:
基于所述第一运动矢量,在所述参考图像中,确定与在所述待编码图像中的所述任一子区域的位置相对应的目标区域,所述目标区域为矩形;
确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
可选地,所述处理器1820,还用于:
确定读取所述第一参考区域内的图像块的读取速度;
根据所述读取速度,确定所述第二距离,其中,所述读取速度与所述第二距离之间呈正比关系。
可选地,所述目标编码区域包括多个编码树块,所述多个编码树块位于所述待编码图像的同一行,所述任一子区域为所述多个编码树块中的任一编码树 块。
可选地,所述处理器1820,还用于:
将所述第一运动矢量进行编码;其中,所述第一运动矢量包含于图像层的头信息或者条带层的头信息的用户扩展数据中,或者所述第一运动矢量包含于补充增强信息中,或者所述第一运动矢量包含于元数据中。
图10所示的帧间预测装置可以执行图6所示实施例的方法,本实施例未详细描述的部分,可参考对图6所示实施例的相关说明。该技术方案的执行过程和技术效果参见图6所示实施例中的描述,在此不再赘述。
本发明又一示例性实施例提供了一种帧间预测装置,如图11所示,该装置包括:
存储器1710,用于存储计算机程序;
处理器1720,用于运行存储器1710中存储的计算机程序以实现:
获取待解码图像对应的全局运动矢量,所述全局运动矢量反映所述待解码图像中的物体整体在参考图像中偏移的方向与距离;其中,所述参考图像存储于第一存储器中;
在所述待解码图像中确定目标解码区域;
基于所述全局运动矢量,在所述参考图像中,确定与所述目标解码区域对应的第一参考区域,并将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块;
基于读取的所述第一参考区域内的图像块,对所述目标解码区域进行解码处理;
其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
可选地,所述目标解码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述处理器1720,还用于:
对于所述目标解码区域中的任一子区域,基于所述全局运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域 属于所述第一参考区域;
对于所述任一子区域,基于存储于所述第二存储器中的所述第二参考区域内的图像块,对所述任一子区域内的图像数据进行解码处理。
可选地,所述处理器1720,用于:
基于所述全局运动矢量,在所述参考图像中,确定与在所述待解码图像中的所述任一子区域的位置相对应的目标区域,所述目标区域为矩形;
确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
可选地,所述全局运动矢量携带于图像层的头信息的用户扩展数据、条带层的头信息的用户扩展数据、补充增强信息或者元数据中。
可选地,所述目标解码区域包括多个子区域,所述处理器1720,用于:
对于所述目标解码区域中的任一子区域,从编码端发送的码流中获取所述任一子区域对应的运动矢量残差;
基于所述运动矢量残差,在所述第一参考区域中,确定所述任一子区域对应的预测块;
从所述编码端发送的码流中获取所述任一子区域对应的残差;
将所述残差叠加到所述预测块中,得到所述任一子区域内的图像数据。
图11所示的帧间预测装置可以执行图7所示实施例的方法,本实施例未详细描述的部分,可参考对图7所示实施例的相关说明。该技术方案的执行过程和技术效果参见图7所示实施例中的描述,在此不再赘述。
本发明又一示例性实施例提供了一种帧间预测装置,如图12所示,该装置包括:
存储器1610,用于存储计算机程序;
处理器1620,用于运行存储器1610中存储的计算机程序以实现:
获取待解码图像对应的第一运动矢量;
根据所述第一运动矢量,确定与待解码图像中的目标解码区域对应的第一 参考区域,所述第一参考区域位于参考图像中,所述参考图像存储于第一存储器中;
将所述第一参考区域存储于第二存储器中;
在所述第二存储器中,读取所述第一参考区域内的图像块,以对所述目标解码区域进行解码处理;
其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
可选地,所述目标解码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述处理器1620,还用于:
对于所述目标解码区域中的任一子区域,基于所述第一运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域。
可选地,所述处理器1620,用于:
基于所述第一运动矢量,在所述参考图像中,确定与在所述待编码图像中的所述任一子区域的位置相对应的目标区域,所述目标区域为矩形;
确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
可选地,所述第一运动矢量携带于图像层的头信息的用户扩展数据、条带层的头信息的用户扩展数据、补充增强信息或者元数据中。
可选地,所述目标解码区域包括多个子区域,所述处理器1620,用于:
对于所述目标解码区域中的任一子区域,从编码端发送的码流中获取所述任一子区域对应的第二运动矢量;
基于所述第二运动矢量,在所述第一参考区域中,确定所述任一子区域对应的预测块;
从所述编码端发送的码流中获取所述任一子区域对应的残差;
将所述残差叠加到所述预测块中,得到所述任一子区域内的图像数据。
图12所示的帧间预测装置可以执行图8所示实施例的方法,本实施例未详细描述的部分,可参考对图8所示实施例的相关说明。该技术方案的执行过程和技术效果参见图8所示实施例中的描述,在此不再赘述。
本发明实施例还提供了一种编码器,该编码器可以包括图9或者图10所示实施例的帧间预测装置。
本发明实施例还提供了一种解码器,该解码器可以包括图11或者图12所示实施例的帧间预测装置。
另外,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有可执行代码,所述可执行代码用于实现如前述各实施例提供的帧间预测方法。
以上各个实施例中的技术方案、技术特征在不相冲突的情况下均可以单独,或者进行组合,只要未超出本领域技术人员的认知范围,均属于本发明保护范围内的等同实施例。
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (58)

  1. 一种帧间预测方法,应用于编码端,其特征在于,包括:
    根据第一运动矢量,确定与待编码图像中的目标编码区域对应的第一参考区域;其中,所述第一参考区域位于参考图像中,以及所述参考图像存储于第一存储器中;
    将所述第一参考区域存储于第二存储器中;
    在所述第二存储器中,读取所述第一参考区域内的图像块,以对所述目标编码区域进行帧间预测;其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
  2. 根据权利要求1所述的方法,其特征在于,所述目标编码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述方法还包括:
    对于所述目标编码区域中的任一子区域,基于所述第一运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域。
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述第一运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,包括:
    基于所述第一运动矢量,在所述参考图像中,确定与在所述待编码图像中的所述任一子区域的位置相对应的目标区域,所述目标区域为矩形;
    确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    确定读取所述第一参考区域内的图像块的读取速度;
    根据所述读取速度,确定所述第二距离,其中,所述读取速度与所述第二距离之间呈正比关系。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述目标编码区 域包括多个编码树块,所述多个编码树块位于所述待编码图像的同一行,所述任一子区域为所述多个编码树块中的任一编码树块。
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    将所述第一运动矢量进行编码;其中,所述第一运动矢量包含于图像层的头信息或者条带层的头信息的用户扩展数据中,或者所述第一运动矢量包含于补充增强信息中,或者所述第一运动矢量包含于元数据中。
  7. 一种帧间预测方法,应用于编码端,其特征在于,包括:
    获取待编码图像对应的全局运动矢量,所述全局运动矢量反映所述待编码图像中的物体整体在参考图像中偏移的方向与距离;其中,所述参考图像存储于第一存储器中;
    在所述待编码图像中确定目标编码区域;
    基于所述全局运动矢量,在所述参考图像中,确定与所述目标编码区域对应的第一参考区域,并将所述第一参考区域存储于第二存储器中;
    在所述第二存储器中,读取所述第一参考区域内的图像块;
    基于读取的所述第一参考区域内的图像块,对所述目标编码区域内的图像块进行运动估计;
    其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
  8. 根据权利要求7所述的方法,其特征在于,所述目标编码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述方法还包括:
    对于所述目标编码区域中的任一子区域,基于所述全局运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域;
    所述基于所述第一参考区域内的图像块,对所述目标编码区域内的图像块进行运动估计,包括:
    对于所述任一子区域,基于存储于所述第二存储器中的所述第二参考区域内的图像块,对所述任一子区域内的图像块进行运动估计。
  9. 根据权利要求8所述的方法,其特征在于,所述基于所述全局运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,包括:
    基于所述全局运动矢量,在所述参考图像中,确定与在所述待编码图像中的所述任一子区域的位置相对应的目标区域,所述目标区域为矩形;
    确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:
    确定读取所述第一参考区域内的图像块的读取速度;
    根据所述读取速度,确定所述第二距离,其中,所述读取速度与所述第二距离之间呈正比关系。
  11. 根据权利要求8所述的方法,其特征在于,所述任一子区域包括多个预测块,所述基于所述第二参考区域内的图像块,对所述任一子区域内的图像块进行运动估计,包括:
    对于所述任一子区域中的任一预测块,确定所述任一预测块对应的候选运动矢量,所述候选运动矢量反映了物体在所述任一预测块中相较于在所述参考图像中偏移的方向和距离;
    基于所述候选运动矢量,在所述参考图像中,确定所述任一预测块对应的候选块;
    基于所述第二参考区域内的图像块和所述候选块,对所述任一预测块进行运动估计。
  12. 根据权利要求11所述的方法,其特征在于,所述基于所述第二参考区域内的图像块和所述候选块,对所述任一预测块进行运动估计,包括:
    对于所述候选块中不在所述第二参考区域内的第一候选块,确定所述第一候选块与所述第二参考区域的相对位置,基于所述相对位置,对所述第一候选块进行移动;
    在移动后的第一候选块以及所述候选块中在所述第二参考区域内的第二候 选块中,确定与所述任一预测块之间的残差最小的目标块;
    确定所述目标块相对于所述任一预测块的运动矢量。
  13. 根据权利要求8-12中任一项所述的方法,其特征在于,所述目标编码区域包括多个编码树块,所述多个编码树块位于所述待编码图像的同一行,所述任一子区域为所述多个编码树块中的任一编码树块。
  14. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    将所述全局运动矢量进行编码;其中,所述全局运动矢量包含于图像层的头信息或者条带层的头信息的用户扩展数据中,或者所述全局运动矢量包含于补充增强信息中,或者所述全局运动矢量包含于元数据中。
  15. 根据权利要求7所述的方法,其特征在于,在获取待编码图像对应的全局运动矢量之后,所述方法还包括:
    确定所述全局运动矢量是否满足预设条件;
    若所述全局运动矢量不满足预设条件,则对所述全局运动矢量进行修正。
  16. 根据权利要求15所述的方法,其特征在于,所述全局运动矢量包括水平运动分量与竖直运动分量,所述若所述全局运动矢量不满足预设条件,则对所述全局运动矢量进行修正,包括:
    若所述水平运动分量或者竖直运动分量大于预设阈值,则将所述水平运动分量和所述竖直运动分量的值调整为第一数值。
  17. 根据权利要求15所述的方法,其特征在于,所述全局运动矢量包括水平运动分量与竖直运动分量,所述若所述全局运动矢量不满足预设条件,则对所述全局运动矢量进行修正,包括:
    确定所述待编码图像的宽度和高度;
    将所述宽度乘以预设比例,得到第二数值;
    将所述高度乘以所述预设比例,得到第三数值;
    若所述水平运动分量大于所述第二数值,则将所述水平运动分量的值调整为所述第二数值;
    若所述竖直运动分量大于所述第三数值,则将所述竖直运动分量的值调整 为所述第三数值。
  18. 一种帧间预测方法,应用于解码端,其特征在于,包括:
    获取待解码图像对应的第一运动矢量;
    根据所述第一运动矢量,确定与待解码图像中的目标解码区域对应的第一参考区域,所述第一参考区域位于参考图像中,所述参考图像存储于第一存储器中;
    将所述第一参考区域存储于第二存储器中;
    在所述第二存储器中,读取所述第一参考区域内的图像块,以对所述目标解码区域进行解码处理;
    其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
  19. 根据权利要求18所述的方法,其特征在于,所述目标解码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述方法还包括:
    对于所述目标解码区域中的任一子区域,基于所述第一运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域。
  20. 根据权利要求19所述的方法,其特征在于,所述基于所述第一运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,包括:
    基于所述第一运动矢量,在所述参考图像中,确定与在所述待编码图像中的所述任一子区域的位置相对应的目标区域,所述目标区域为矩形;
    确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
  21. 根据权利要求18所述的方法,其特征在于,所述第一运动矢量携带于图像层的头信息的用户扩展数据、条带层的头信息的用户扩展数据、补充增强信息或者元数据中。
  22. 根据权利要求18所述的方法,其特征在于,所述目标解码区域包括多个子区域,所述对所述目标解码区域进行解码处理,包括:
    对于所述目标解码区域中的任一子区域,从编码端发送的码流中获取所述任一子区域对应的第二运动矢量;
    基于所述第二运动矢量,在所述第一参考区域中,确定所述任一子区域对应的预测块;
    从所述编码端发送的码流中获取所述任一子区域对应的残差;
    将所述残差叠加到所述预测块中,得到所述任一子区域内的图像数据。
  23. 一种帧间预测方法,应用于解码端,其特征在于,包括:
    获取待解码图像对应的全局运动矢量,所述全局运动矢量反映所述待解码图像中的物体整体在参考图像中偏移的方向与距离;其中,所述参考图像存储于第一存储器中;
    在所述待解码图像中确定目标解码区域;
    基于所述全局运动矢量,在所述参考图像中,确定与所述目标解码区域对应的第一参考区域,并将所述第一参考区域存储于第二存储器中;
    在所述第二存储器中,读取所述第一参考区域内的图像块;
    基于读取的所述第一参考区域内的图像块,对所述目标解码区域进行解码处理;
    其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
  24. 根据权利要求23所述的方法,其特征在于,所述目标解码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述方法还包括:
    对于所述目标解码区域中的任一子区域,基于所述全局运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域;
    所述基于读取的所述第一参考区域内的图像块,对所述目标解码区域进行 解码处理,包括:
    对于所述任一子区域,基于存储于所述第二存储器中的所述第二参考区域内的图像块,对所述任一子区域内的图像数据进行解码处理。
  25. 根据权利要求24所述的方法,其特征在于,所述基于所述全局运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,包括:
    基于所述全局运动矢量,在所述参考图像中,确定与在所述待解码图像中的所述任一子区域的位置相对应的目标区域,所述目标区域为矩形;
    确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
  26. 根据权利要求23所述的方法,其特征在于,所述全局运动矢量携带于图像层的头信息的用户扩展数据、条带层的头信息的用户扩展数据、补充增强信息或者元数据中。
  27. 根据权利要求23所述的方法,其特征在于,所述目标解码区域包括多个子区域,所述基于读取的所述第一参考区域内的图像块,对所述目标解码区域进行解码处理,包括:
    对于所述目标解码区域中的任一子区域,从编码端发送的码流中获取所述任一子区域对应的运动矢量残差;
    基于所述运动矢量残差,在所述第一参考区域中,确定所述任一子区域对应的预测块;
    从所述编码端发送的码流中获取所述任一子区域对应的残差;
    将所述残差叠加到所述预测块中,得到所述任一子区域内的图像数据。
  28. 一种帧间预测装置,其特征在于,包括存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器实现:
    根据第一运动矢量,确定与待编码图像中的目标编码区域对应的第一参考区域;其中,所述第一参考区域位于参考图像中,以及所述参考图像存储于第 一存储器中;
    将所述第一参考区域存储于第二存储器中;
    在所述第二存储器中,读取所述第一参考区域内的图像块,以对所述目标编码区域进行帧间预测;其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
  29. 根据权利要求28所述的装置,其特征在于,所述目标编码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述处理器,还用于:
    对于所述目标编码区域中的任一子区域,基于所述第一运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域。
  30. 根据权利要求29所述的装置,其特征在于,所述处理器,用于:
    基于所述第一运动矢量,在所述参考图像中,确定与在所述待编码图像中的所述任一子区域的位置相对应的目标区域,所述目标区域为矩形;
    确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
  31. 根据权利要求30所述的装置,其特征在于,所述处理器,还用于:
    确定读取所述第一参考区域内的图像块的读取速度;
    根据所述读取速度,确定所述第二距离,其中,所述读取速度与所述第二距离之间呈正比关系。
  32. 根据权利要求28-31中任一项所述的装置,其特征在于,所述目标编码区域包括多个编码树块,所述多个编码树块位于所述待编码图像的同一行,所述任一子区域为所述多个编码树块中的任一编码树块。
  33. 根据权利要求28所述的装置,其特征在于,所述处理器,还用于:
    将所述第一运动矢量进行编码;其中,所述第一运动矢量包含于图像层的头信息或者条带层的头信息的用户扩展数据中,或者所述第一运动矢量包含于 补充增强信息中,或者所述第一运动矢量包含于元数据中。
  34. 一种帧间预测装置,其特征在于,包括存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器实现:
    获取待编码图像对应的全局运动矢量,所述全局运动矢量反映所述待编码图像中的物体整体在参考图像中偏移的方向与距离;其中,所述参考图像存储于第一存储器中;
    在所述待编码图像中确定目标编码区域;
    基于所述全局运动矢量,在所述参考图像中,确定与所述目标编码区域对应的第一参考区域,并将所述第一参考区域存储于第二存储器中;
    在所述第二存储器中,读取所述第一参考区域内的图像块;
    基于读取的所述第一参考区域内的图像块,对所述目标编码区域内的图像块进行运动估计;
    其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
  35. 根据权利要求34所述的装置,其特征在于,所述目标编码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述处理器,还用于:
    对于所述目标编码区域中的任一子区域,基于所述全局运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域;
    所述基于所述第一参考区域内的图像块,对所述目标编码区域内的图像块进行运动估计,包括:
    对于所述任一子区域,基于存储于所述第二存储器中的所述第二参考区域内的图像块,对所述任一子区域内的图像块进行运动估计。
  36. 根据权利要求35所述的装置,其特征在于,所述处理器,用于:
    基于所述全局运动矢量,在所述参考图像中,确定与所述任一子区域在所 述待编码图像中位置相对应的目标区域;
    确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
  37. 根据权利要求36所述的装置,其特征在于,所述处理器,还用于:
    确定读取所述第一参考区域内的图像块的读取速度;
    根据所述读取速度,确定所述第二距离,所述读取速度与所述第二距离之间呈正比关系。
  38. 根据权利要求35所述的装置,其特征在于,所述任一子区域包括多个预测块,所述处理器,用于:
    对于所述任一子区域中的任一预测块,确定所述任一预测块对应的候选运动矢量,所述候选运动矢量反映了物体在所述任一预测块中相较于在所述参考图像中偏移的方向和距离;
    基于所述候选运动矢量,在所述参考图像中,确定所述任一预测块对应的候选块;
    基于所述第二参考区域内的图像块和所述候选块,对所述任一预测块进行运动估计。
  39. 根据权利要求38所述的装置,其特征在于,所述处理器,用于:
    对于所述候选块中不在所述第二参考区域内的第一候选块,确定所述第一候选块与所述第二参考区域的相对位置,基于所述相对位置,对所述第一候选块进行移动;
    在移动后的第一候选块以及所述候选块中在所述第二参考区域内的第二候选块中,确定与所述任一预测块之间的残差最小的目标块;
    确定所述目标块相对于所述任一预测块的运动矢量。
  40. 根据权利要求35-39中任一项所述的装置,其特征在于,所述目标编码区域包括多个编码树块,所述多个编码树块位于所述待编码图像的同一行,所述任一子区域为所述多个编码树块中的任一编码树块。
  41. 根据权利要求34所述的装置,其特征在于,所述处理器,还用于:
    将所述全局运动矢量进行编码;其中,所述全局运动矢量包含于图像层的头信息或者条带层的头信息的用户扩展数据中,或者所述全局运动矢量包含于补充增强信息中,或者所述全局运动矢量包含于元数据中。
  42. 根据权利要求34所述的装置,其特征在于,所述处理器,还用于:
    确定所述全局运动矢量是否满足预设条件;
    若所述全局运动矢量不满足预设条件,则对所述全局运动矢量进行修正。
  43. 根据权利要求42所述的装置,其特征在于,所述全局运动矢量包括水平运动分量与竖直运动分量,所述处理器,用于:
    若所述水平运动分量或者竖直运动分量大于预设阈值,则将所述水平运动分量和所述竖直运动分量的值调整为第一数值。
  44. 根据权利要求42所述的装置,其特征在于,所述全局运动矢量包括水平运动分量与竖直运动分量,所述处理器,用于:
    确定所述待编码图像的宽度和高度;
    将所述宽度乘以预设比例,得到第二数值;
    将所述高度乘以所述预设比例,得到第三数值;
    若所述水平运动分量大于所述第二数值,则将所述水平运动分量的值调整为所述第二数值;
    若所述竖直运动分量大于所述第三数值,则将所述竖直运动分量的值调整为所述第三数值。
  45. 一种帧间预测装置,其特征在于,包括存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器实现:
    获取待解码图像对应的第一运动矢量;
    根据所述第一运动矢量,确定与待解码图像中的目标解码区域对应的第一参考区域,所述第一参考区域位于参考图像中,所述参考图像存储于第一存储器中;
    将所述第一参考区域存储于第二存储器中;
    在所述第二存储器中,读取所述第一参考区域内的图像块,以对所述目标解码区域进行解码处理;
    其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
  46. 根据权利要求45所述的装置,其特征在于,所述目标解码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述处理器,还用于:
    对于所述目标解码区域中的任一子区域,基于所述第一运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域。
  47. 根据权利要求46所述的装置,其特征在于,所述处理器,用于:
    基于所述第一运动矢量,在所述参考图像中,确定与在所述待编码图像中的所述任一子区域的位置相对应的目标区域,所述目标区域为矩形;
    确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
  48. 根据权利要求45所述的装置,其特征在于,所述第一运动矢量携带于图像层的头信息的用户扩展数据、条带层的头信息的用户扩展数据、补充增强信息或者元数据中。
  49. 根据权利要求45所述的装置,其特征在于,所述目标解码区域包括多个子区域,所述处理器,用于:
    对于所述目标解码区域中的任一子区域,从编码端发送的码流中获取所述任一子区域对应的第二运动矢量;
    基于所述第二运动矢量,在所述第一参考区域中,确定所述任一子区域对应的预测块;
    从所述编码端发送的码流中获取所述任一子区域对应的残差;
    将所述残差叠加到所述预测块中,得到所述任一子区域内的图像数据。
  50. 一种帧间预测装置,其特征在于,包括存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器实现:
    获取待解码图像对应的全局运动矢量,所述全局运动矢量反映所述待解码图像中的物体整体在参考图像中偏移的方向与距离;其中,所述参考图像存储于第一存储器中;
    在所述待解码图像中确定目标解码区域;
    基于所述全局运动矢量,在所述参考图像中,确定与所述目标解码区域对应的第一参考区域,并将所述第一参考区域存储于第二存储器中;
    在所述第二存储器中,读取所述第一参考区域内的图像块;
    基于读取的所述第一参考区域内的图像块,对所述目标解码区域进行解码处理;
    其中,通过所述第二存储器存取数据的第二存取速度比通过所述第一存储器中存取数据的第一存取速度快。
  51. 根据权利要求50所述的装置,其特征在于,所述目标解码区域包括多个子区域,在将所述第一参考区域存储于第二存储器的过程中,所述处理器,还用于:
    对于所述目标解码区域中的任一子区域,基于所述全局运动矢量,在所述参考图像中,确定与所述任一子区域对应的第二参考区域,所述第二参考区域属于所述第一参考区域;
    对于所述任一子区域,基于存储于所述第二存储器中的所述第二参考区域内的图像块,对所述任一子区域内的图像数据进行解码处理。
  52. 根据权利要求51所述的装置,其特征在于,所述处理器,用于:
    基于所述全局运动矢量,在所述参考图像中,确定与在所述待解码图像中的所述任一子区域的位置相对应的目标区域,所述目标区域为矩形;
    确定从所述目标区域的上下边界沿所述参考图像的竖直方向分别向外扩展 第一距离,且从所述目标区域的左右边界沿所述参考图像的水平方向分别向外扩展第二距离所围成的第二参考区域。
  53. 根据权利要求50所述的装置,其特征在于,所述全局运动矢量携带于图像层的头信息的用户扩展数据、条带层的头信息的用户扩展数据、补充增强信息或者元数据中。
  54. 根据权利要求50所述的装置,其特征在于,所述目标解码区域包括多个子区域,所述处理器,用于:
    对于所述目标解码区域中的任一子区域,从编码端发送的码流中获取所述任一子区域对应的运动矢量残差;
    基于所述运动矢量残差,在所述第一参考区域中,确定所述任一子区域对应的预测块;
    从所述编码端发送的码流中获取所述任一子区域对应的残差;
    将所述残差叠加到所述预测块中,得到所述任一子区域内的图像数据。
  55. 一种编码器,其特征在于,包括权利要求28-44中任意一项所述的帧间预测装置。
  56. 一种计算机可读存储介质,其特征在于,所述存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令用于实现权利要求1-17中任一项所述的帧间预测方法。
  57. 一种解码器,其特征在于,包括权利要求45-54中任意一项所述的帧间预测装置。
  58. 一种计算机可读存储介质,其特征在于,所述存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令用于实现权利要求18-27中任一项所述的帧间预测方法。
PCT/CN2020/132727 2020-11-30 2020-11-30 帧间预测方法、装置、编码器、解码器和存储介质 WO2022110131A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/132727 WO2022110131A1 (zh) 2020-11-30 2020-11-30 帧间预测方法、装置、编码器、解码器和存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/132727 WO2022110131A1 (zh) 2020-11-30 2020-11-30 帧间预测方法、装置、编码器、解码器和存储介质

Publications (1)

Publication Number Publication Date
WO2022110131A1 true WO2022110131A1 (zh) 2022-06-02

Family

ID=81753890

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/132727 WO2022110131A1 (zh) 2020-11-30 2020-11-30 帧间预测方法、装置、编码器、解码器和存储介质

Country Status (1)

Country Link
WO (1) WO2022110131A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1589019A (zh) * 2004-08-05 2005-03-02 联合信源数字音视频技术(北京)有限公司 帧场视频解码中运动矢量存取的控制装置及其方法
CN101540911A (zh) * 2008-03-18 2009-09-23 汤姆森许可贸易公司 产生图像数据流的方法和设备及重建图像的方法和设备
CN102197652A (zh) * 2009-10-19 2011-09-21 松下电器产业株式会社 解码装置、解码方法、程序以及集成电路
US20140010303A1 (en) * 2012-07-03 2014-01-09 Mstar Semiconductor, Inc. Motion compensation image processing method and associated apparatus
US20140169472A1 (en) * 2012-12-19 2014-06-19 Mikhail Fludkov Motion estimation engine for video encoding
CN110719485A (zh) * 2018-07-13 2020-01-21 腾讯美国有限责任公司 视频解码方法、装置及存储介质
CN111343456A (zh) * 2018-12-18 2020-06-26 瑞萨电子株式会社 视频编码设备及其操作方法以及配备有视频编码设备的车辆

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1589019A (zh) * 2004-08-05 2005-03-02 联合信源数字音视频技术(北京)有限公司 帧场视频解码中运动矢量存取的控制装置及其方法
CN101540911A (zh) * 2008-03-18 2009-09-23 汤姆森许可贸易公司 产生图像数据流的方法和设备及重建图像的方法和设备
CN102197652A (zh) * 2009-10-19 2011-09-21 松下电器产业株式会社 解码装置、解码方法、程序以及集成电路
US20140010303A1 (en) * 2012-07-03 2014-01-09 Mstar Semiconductor, Inc. Motion compensation image processing method and associated apparatus
US20140169472A1 (en) * 2012-12-19 2014-06-19 Mikhail Fludkov Motion estimation engine for video encoding
CN110719485A (zh) * 2018-07-13 2020-01-21 腾讯美国有限责任公司 视频解码方法、装置及存储介质
CN111343456A (zh) * 2018-12-18 2020-06-26 瑞萨电子株式会社 视频编码设备及其操作方法以及配备有视频编码设备的车辆

Similar Documents

Publication Publication Date Title
US11496732B2 (en) Video image encoding and decoding method, apparatus, and device
US11297324B2 (en) Interpolation filter for an inter prediction apparatus and method for video coding
KR101390620B1 (ko) 비디오 인코딩을 위한 전력 효율적인 움직임 추정 기법
CN113196774B (zh) 基于散列的运动搜索的早期确定
CN116456101A (zh) 图像编码方法、图像解码方法及相关装置
KR100694050B1 (ko) 움직임 예측 방법 및 그 장치
US10659800B2 (en) Inter prediction method and device
WO2022104678A1 (zh) 视频编解码方法、装置、可移动平台和存储介质
CN113068026A (zh) 解码预测方法、装置及计算机存储介质
TWI832449B (zh) 視訊編解碼方法及裝置
WO2022110131A1 (zh) 帧间预测方法、装置、编码器、解码器和存储介质
WO2022022299A1 (zh) 视频编解码中的运动信息列表构建方法、装置及设备
CN114071161B (zh) 图像编码方法、图像解码方法及相关装置
CN114727116A (zh) 编码方法及装置
CN113395520B (zh) 解码预测方法、装置及计算机存储介质
CN116250240A (zh) 图像编码方法、图像解码方法及相关装置
TWI702836B (zh) 約束的序列資料頭的方法及裝置
JP2014230031A (ja) 画像符号化装置、及び画像符号化プログラム
US20240155137A1 (en) Multimedia data processing method and apparatus, computer device, computer-readable storage medium, and computer program product
US20230080180A1 (en) Coding a pixel string vector based on attribute information of the pixel string
RU2771955C2 (ru) Устройство, оборудование, способ кодирования и декодирования видеоизображений
WO2022037458A1 (zh) 视频编解码中的运动信息列表构建方法、装置及设备
US11228780B2 (en) Inter prediction apparatus and method for video coding
WO2023193260A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
RU2815738C2 (ru) Определение режима кодирования цветности на основе внутрикадрового предсказания на основе матрицы

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20963019

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20963019

Country of ref document: EP

Kind code of ref document: A1