WO2022016535A1 - Video coding and decoding method and device - Google Patents

Video coding and decoding method and device Download PDF

Info

Publication number
WO2022016535A1
WO2022016535A1 PCT/CN2020/104529 CN2020104529W WO2022016535A1 WO 2022016535 A1 WO2022016535 A1 WO 2022016535A1 CN 2020104529 W CN2020104529 W CN 2020104529W WO 2022016535 A1 WO2022016535 A1 WO 2022016535A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction block
boundary value
region
value
boundary
Prior art date
Application number
PCT/CN2020/104529
Other languages
French (fr)
Chinese (zh)
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 CN202080005888.1A priority Critical patent/CN112970252A/en
Priority to PCT/CN2020/104529 priority patent/WO2022016535A1/en
Publication of WO2022016535A1 publication Critical patent/WO2022016535A1/en

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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • 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 application relates to the field of image processing, and more particularly, to a video coding and decoding method and apparatus.
  • a multi-core hardware encoder usually divides an image or video into multiple tiles, and each core is responsible for encoding and decoding one or more of the tiles.
  • loop_filter_across_tiles_enabled_flag can be set to 1, that is, filtering is performed on the Coding Tree Unit (CTU) of the tile boundary, but this method will be performed at the tile boundary because of the need.
  • CTU Coding Tree Unit
  • loop_filter_across_tiles_enabled_flag 0
  • the embodiments of the present application provide a video encoding and decoding method and apparatus, which can realize that not only the loop_filter_across_tiles_enabled_flag is set to 1, but tile boundary filtering is not performed at the encoding end to reduce the complexity of the encoder, and tile boundary filtering is performed at the decoding end so that the The subjective quality is relatively not reduced, which solves the defects and deficiencies existing in the simultaneous filtering of the encoding end and the decoding end in the prior art, and at the same time can ensure that the functions and effects of the reconstructed image at the encoding end and the decoded image at the decoding end are completely the same as the reference frame, and further Because the filtering operation is performed at the decoding end, the potential block effect of the boundary of the decoded image tile can be reduced, and the viewing experience of the user can be improved.
  • a video coding method comprising: if a prediction block pointed to by a motion vector of a current image block is located on a tile boundary of a reference frame, adjusting the position of the prediction block so that the prediction block is The block is located inside the tile of the reference frame, so that when tile boundary filtering is not performed at the encoding end and tile boundary filtering is performed at the decoding end, the pixel value of the prediction block referenced by the encoding end when encoding and The pixel values of the prediction block referenced by the decoding end during decoding can be kept consistent, and the current image block is located in the current frame; the current image block is encoded based on the adjusted prediction block.
  • the position of the prediction block can be adjusted to the inside of the tile, so that the prediction based on the adjusted prediction block encodes the current image block. Since the prediction block pointed to by the motion vector of the current image block is adjusted to the interior of the tile, all the pixels of the foregoing prediction block are not in the tile boundary filtering area that needs to be filtered, and the coding end can realize that the tile boundary filtering is not performed without the tile boundary filtering.
  • the decoding end performs tile boundary filtering, and does not introduce decoding errors caused by "the encoding end does not perform tile boundary filtering, but the decoding end performs tile boundary filtering", which makes the prediction block of the encoding end inconsistent with the prediction block of the decoding end. Reduce the complexity of the encoder.
  • a video encoding apparatus including a processor and a memory.
  • the memory is used for storing a computer program
  • the processor is used for calling and running the computer program stored in the memory to execute the method in the above-mentioned first aspect or each implementation manner thereof.
  • a chip including a processing circuit, for implementing the method of the above-mentioned first aspect.
  • Fig. 1 is the architecture diagram of applying the technical solution of the embodiment of the present application.
  • FIG. 2 is a schematic diagram of a video coding framework 2 provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of deblocking filtering provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of an encoding method provided by an embodiment of the present application.
  • Fig. 5a is a schematic diagram of video division to be encoded provided by an embodiment of the present application.
  • Fig. 5b is a schematic diagram of video division to be encoded provided by another embodiment of the present application.
  • Fig. 5c is a schematic diagram of video division to be encoded provided by another embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a decoding method provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a video coding framework 2 provided by another embodiment of the present application.
  • FIG. 8 is a schematic diagram of the information included after the video to be encoded is divided according to an embodiment of the present application.
  • 9a is a schematic diagram of an inter-frame prediction provided by an embodiment of the present application.
  • FIG. 9b is a schematic diagram of an inter-frame prediction provided by another embodiment of the present application.
  • 9c is a schematic diagram of an inter-frame prediction provided by another embodiment of the present application.
  • 10a is a schematic diagram of a partitioned area of a tile boundary affected by filtering according to an embodiment of the present application
  • FIG. 10b is a schematic diagram of a partitioned area of a tile boundary affected by filtering according to another embodiment of the present application.
  • FIG. 10c is a schematic diagram of a partitioned area of a tile boundary affected by filtering according to another embodiment of the present application.
  • 11a is a schematic diagram of the location of a prediction block provided by an embodiment of the present application.
  • 11b is a schematic diagram of the location of a prediction block provided by another embodiment of the present application.
  • 11c is a schematic diagram of the location of a prediction block provided by another embodiment of the present application.
  • 12a is a schematic diagram of adjusting the position of an original prediction block according to an embodiment of the present application.
  • 12b is a schematic diagram of adjusting the position of an original prediction block according to another embodiment of the present application.
  • 12c is a schematic diagram of adjusting the position of an original prediction block according to another embodiment of the present application.
  • FIG. 12d is a schematic diagram of adjusting the position of an original prediction block according to still another embodiment of the present application.
  • Fig. 12e is a kind of schematic diagram of adjusting the position of the original prediction block provided by another embodiment of the present application.
  • FIG. 13 is a schematic diagram of a video encoding apparatus provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a video decoding apparatus provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a video encoding and decoding apparatus provided by an embodiment of the present application.
  • FIG. 16 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • FIG. 1 is an architectural diagram of applying the technical solution of the embodiment of the present application.
  • the system 100 may receive data 102 to be processed, process the data 102 to be processed, and generate processed data 108 .
  • system 100 may receive data to be encoded and encode the data to be encoded to generate encoded data, or system 100 may receive data to be decoded and decode the data to be decoded to generate decoded data.
  • components in system 100 may be implemented by one or more processors, which may be processors in computing devices or processors in mobile devices (eg, drones).
  • the processor may be any type of processor, which is not limited in this embodiment of the present invention.
  • the processor may include an encoder, a decoder, or a codec, among others.
  • One or more memories may also be included in system 100 .
  • the memory may be used to store instructions and data, for example, computer-executable instructions, data to be processed 102 , processed data 108 , etc. that implement the technical solutions of the embodiments of the present invention.
  • the memory may be any type of memory, which is also not limited in this embodiment of the present invention.
  • the data to be encoded may include text, images, graphic objects, animation sequences, audio, video, or any other data that needs to be encoded.
  • the data to be encoded may include sensory data from sensors, which may be visual sensors (eg, cameras, infrared sensors), microphones, near-field sensors (eg, ultrasonic sensors, radar), position sensors, temperature sensor, touch sensor, etc.
  • the data to be encoded may include information from the user, eg, biometric information, which may include facial features, fingerprint scans, retinal scans, voice recordings, DNA sampling, and the like.
  • FIG. 2 is a schematic diagram of a video coding framework 2 according to an embodiment of the present application.
  • each frame of the video to be encoded is encoded in sequence.
  • the current coded frame mainly undergoes: prediction (Prediction), transformation (Transform), quantization (Quantization) and entropy coding (Entropy Coding), etc., and finally outputs the code stream of the current coded frame.
  • the decoding process usually decodes the received code stream according to the inverse process of the above process, so as to recover the video frame information before decoding.
  • the video coding framework 2 includes a coding control module 201 for performing decision control actions and parameter selection in the coding process.
  • the encoding control module 201 controls parameters used in transformation, quantization, inverse quantization, and inverse transformation, controls selection of intra-frame mode or inter-frame mode, and parameter control of motion estimation and filtering, And the control parameters of the encoding control module 201 will also be input into the entropy encoding module to be encoded to form a part of the encoded code stream.
  • the coded frame is divided 202, and specifically, the coded frame is divided into slices first, and then divided into blocks.
  • the coded frame is divided into a plurality of non-overlapping largest CTUs, and each CTU can also be iteratively divided into a series of smaller codes in a quad-tree, binary-tree, or ternary-tree manner.
  • a unit (Coding Unit, CU), in some examples, a CU may also include a prediction unit (Prediction Unit, PU) and a transform unit (Transform Unit, TU) associated with it, where PU is the basic unit of prediction, and TU is the transform and basic units of quantification.
  • Prediction Unit PU
  • Transform Unit Transform Unit
  • PUs and TUs are obtained by dividing into one or more blocks on the basis of CUs, wherein one PU includes multiple prediction blocks (Prediction Blocks, PBs) and related syntax elements.
  • the PU and the TU may be the same, or may be obtained by the CU through different partitioning methods.
  • at least two of the CUs, PUs, and TUs are the same, eg, CUs, PUs, and TUs are not distinguished, and all are predicted, quantized, and transformed in units of CUs.
  • the CTU, CU or other formed data units are referred to as coding blocks.
  • a data unit targeted for video coding may be a frame, a slice, a coding tree unit, a coding unit, a coding block, or a group of any of the above.
  • the size of the data unit may vary.
  • a prediction process is performed to remove redundant information in the spatial and temporal domains of the current coded frame.
  • the commonly used predictive coding methods include intra-frame prediction and inter-frame prediction. Intra-frame prediction only uses the reconstructed information in this frame to predict the current coding block, while inter-frame prediction uses the information in other frames (also called reference frames) that have been reconstructed before to predict the current coding block. Make predictions.
  • the encoding control module 201 is configured to decide whether to select intra-frame prediction or inter-frame prediction.
  • the process of intra-frame prediction 203 includes obtaining the reconstructed block of the coded adjacent blocks around the current coding block as a reference block, and using the prediction mode method to calculate the prediction value based on the pixel value of the reference block to generate the prediction block. , the corresponding pixel values of the current coding block and the prediction block are subtracted to obtain the residual of the current coding block.
  • the residual of the current coding block is transformed 204 , quantized 205 and entropy encoded 210 to form the code stream of the current coding block. Further, after all the coded blocks of the current coded frame are subjected to the above coding process, a part of the coded code stream of the coded frame is formed.
  • the control and reference data generated in the intra prediction 203 are also encoded by entropy encoding 210 to form part of the encoded code stream.
  • the transform 204 is used to de-correlate the residuals of image blocks in order to improve coding efficiency.
  • two-dimensional discrete cosine transform Discrete Cosine Transform, DCT
  • two-dimensional discrete sine transform Discrete Sine Transform, DST
  • quantization 205 is used to further improve the compression efficiency.
  • the transform coefficients can be quantized to obtain quantized coefficients, and then the quantized coefficients are entropy encoded 210 to obtain the residual code stream of the current encoding block.
  • the entropy encoding method includes: But not limited to content adaptive binary arithmetic coding (Context Adaptive Binary Arithmetic Coding, CABAC) entropy coding.
  • CABAC Context Adaptive Binary Arithmetic Coding
  • the bit stream obtained by entropy encoding and the encoded encoding mode information are stored or sent to the decoding end.
  • inverse quantization 206 is also performed on the quantized result, and inverse transformation 207 is performed on the inverse quantization result.
  • the reconstructed pixels are obtained using the inverse transformation result and the motion compensation result. Afterwards, the reconstructed pixels are filtered (ie loop filtered) 211. After 211, the filtered reconstructed image (belonging to the reconstructed video frame) is output. Subsequently, the reconstructed image can be used as a reference frame image of other frame images for inter-frame prediction. In this embodiment of the present application, the reconstructed image may also be referred to as a reconstructed image or a reconstructed image.
  • the coded adjacent blocks in the process of intra-frame prediction 203 are: adjacent blocks that have been coded before the current coded block is coded, and the residuals generated in the coding process of the adjacent blocks are transformed 204, quantized 205, After inverse quantization 206 and inverse transform 207, the reconstructed block is obtained by adding the prediction block of the adjacent block.
  • inverse quantization 206 and inverse transform 207 are inverse processes of quantization 206 and transform 204, and are used to restore residual data before quantization and transform.
  • the inter prediction process when the inter prediction mode is selected, the inter prediction process includes motion estimation (Motion Estimation, ME) 208 and motion compensation (Motion Compensation, MC) 209.
  • the encoder can perform motion estimation 208 according to the reference frame image in the reconstructed video frame, and search for the image block most similar to the current encoding block in one or more reference frame images as the prediction block according to certain matching criteria,
  • the relative displacement between the prediction block and the current coding block is the motion vector (Motion Vector, MV) of the current coding block.
  • the original value of the pixel of the coding block is subtracted from the pixel value of the corresponding prediction block to obtain the residual of the coding block.
  • the residual of the current coded block is transformed 204, quantized 205 and entropy coded 210 to form a part of the coded code stream of the coded frame.
  • motion compensation 209 may be performed based on the motion vector and prediction block determined above to obtain the current coding block.
  • the reconstructed video frame is a video frame obtained after filtering 211 .
  • the reconstructed video frame includes one or more reconstructed images.
  • Filtering 211 is used to reduce compression distortions such as blocking and ringing effects during the encoding process.
  • the reconstructed video frame is used to provide reference frames for inter-frame prediction during the encoding process.
  • the reconstructed video frame is post-processed and output. for the final decoded video.
  • the inter prediction mode may include an advanced motion vector prediction (Advanced Motion Vector Prediction, AMVP) mode, a merge (Merge) mode, or a skip (skip) mode.
  • AMVP Advanced Motion Vector Prediction
  • merge Merge
  • skip skip
  • the motion vector prediction can be determined first. After the MVP is obtained, the starting point of the motion estimation can be determined according to the MVP, and a motion search can be performed near the starting point. After the search is completed, the optimal MV, the position of the reference block in the reference image is determined by the MV, the reference block is subtracted from the current block to obtain the residual block, the MV is subtracted from the MVP to obtain the Motion Vector Difference (MVD), and the difference between the MVD and the MVP is obtained.
  • the index is transmitted to the decoder through the code stream.
  • the MVP can be determined first, and the MVP can be directly determined as the MV of the current block.
  • a MVP candidate list (merge candidate list) can be constructed first.
  • the MVP candidate list at least one candidate MVP can be included, and each candidate MVP can have an index corresponding to the MVP candidate list.
  • the MVP index can be written into the code stream, and the decoder can find the MVP corresponding to the index from the MVP candidate list according to the index, so as to decode the image block.
  • Skip mode is a special case of Merge mode. After the MV is obtained according to the Merge mode, if the encoder determines that the current block is basically the same as the reference block, it does not need to transmit the residual data, only the index of the MVP needs to be passed, and further a flag can be passed, which can indicate that the current block can be directly Obtained from the reference block.
  • the image block to be encoded can be divided into a plurality of sub-image blocks in the shape of a polygon, and a motion vector can be determined for each sub-image block from the motion information candidate list, and based on the The motion vector determines the prediction sub-block corresponding to each sub-image block, and constructs the prediction block of the current image block based on the prediction sub-block corresponding to each sub-image block, so as to realize the encoding of the current image block.
  • HEVC HEVC
  • DBF Deblocking Filter
  • the filtering sequence of the DBF in HEVC is based on the CTU as the basic unit.
  • the solid dots in the figure represent pixel points
  • the solid black line in the figure represents the boundary of the image block to be filtered
  • the thicker black dotted box part represents the 8x8 processing block for filtering operation.
  • Each processing block Both span 4 8x8 blocks to be filtered and contain a "+" shaped edge.
  • the goal of each processing block is to filter the boundary of the "+" shape, and contains all the filtering data required by itself, which allows the filtering operation to perform separate operations on each 8x8 processing block, which is beneficial to HEVC implements parallel filtering operations.
  • the pixel values of at most 3 pixels on the left and right sides of the image block boundary can be modified to realize the smooth image block boundary.
  • the decoding end perform operations corresponding to the encoding end.
  • the residual information is obtained by entropy decoding, inverse quantization and inverse transformation, and according to the decoded code stream, it is determined whether the current image block uses intra-frame prediction or inter-frame prediction. If it is intra-frame prediction, use the reconstructed image blocks in the current frame to construct prediction information according to the intra-frame prediction method; if it is inter-frame prediction, you need to parse out the motion information, and use the parsed motion information in the reconstructed image. Then, the prediction information and the residual information are superimposed, and the reconstruction information can be obtained through the filtering operation.
  • a multi-core hardware encoder usually divides an image or video into multiple tiles, and each core is responsible for encoding one or more of the tiles.
  • the first implementation mode it is possible to choose not to filter the tile boundary at the encoding end and the decoding end, but the decoded image may have obvious block boundary effects at the tile boundary, resulting in poor subjective quality;
  • the second implementation is that you can choose to perform tile boundary filtering on both the encoding end and the decoding end, which can solve the block boundary effect at the tile boundary, but it does not need to be displayed at the encoding end, and performing tile boundary filtering will bring additional
  • the amount of data exchange and calculation increases the complexity of the encoding process.
  • the present application provides a method for video encoding and video decoding, which can reduce the complexity of the encoder without performing tile boundary filtering at the encoding end, and perform tile boundary filtering at the decoding end so that the subjective quality is relatively not reduced, solving the problem of existing At the same time, it can ensure that the reconstructed image at the encoding end and the decoded image at the decoding end have the same function and effect as the reference frame. Further, because the filtering is performed at the decoding end. The operation can reduce the potential block effect of decoded image tile boundary and improve the user's viewing experience.
  • the video coding method 400 provided by this embodiment of the present application will be described in detail below with reference to FIG. 4 .
  • FIG. 4 shows a video coding method 400 provided by an embodiment of the present application.
  • the method may be executed by an encoder, and the method 400 may include steps 410-420.
  • the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, adjust the position of the prediction block, so that the prediction block is located inside the tile of the reference frame, thereby so that when tile boundary filtering is not performed at the encoding end and tile boundary filtering is performed at the decoding end, the pixel value of the prediction block referenced by the encoding end in encoding and the prediction block referenced by the decoding end in decoding The pixel values of , can be kept consistent, and the current image block is located in the current frame.
  • step 410 when tile boundary filtering is not performed at the encoding end, and tile boundary filtering is performed at the decoding end, when the prediction block is located on the tile boundary, the prediction block and When the decoding end performs decoding, the referenced prediction blocks will be inconsistent, which will lead to decoding errors.
  • the encoding end since the position-adjusted prediction block is located inside the tile of the reference frame, when tile boundary filtering is not performed at the encoding end and tile boundary filtering is performed at the decoding end, the encoding end performs the tile boundary filtering.
  • the referenced (position-adjusted) prediction block during encoding is located inside each tile of the reference frame, and because the position information of the prediction block during decoding is exactly the same as the position information of the prediction block at the encoding end, the decoding end uses the same information when decoding.
  • the reference prediction block is also located inside each tile of the reference frame and has nothing to do with the boundary, so as to ensure the consistency of the two, and avoid decoding errors caused by tile boundary filtering at the decoding end without performing tile boundary filtering at the encoding end.
  • it is not necessary to perform tile boundary filtering at the encoding end, thereby reducing the amount of data exchange and filtering at the encoding end.
  • tile boundary filtering is performed at the decoding end, which also prevents the image from generating blocks at the tile boundary. Deterioration of image quality due to boundary effects.
  • the fact that the prediction block is located inside the tile of the reference frame includes that the prediction block does not overlap with the region that needs to be filtered at the tile boundary of the reference frame.
  • the adjustment of the prediction block position can be achieved by adjusting the motion vector.
  • the prediction block in this embodiment of the present application may be one or more reference blocks among multiple reference blocks, and the reference block is located in a reference frame, where the reference frame may be the previous frame and/or the next frame of the current frame , or may be the first few frames and/or the next few frames of the current frame, or may be a fixed frame, which is not specifically limited in this application.
  • the size of the multiple tiles included in the divided reference frame may be the same, that is, when the reference frame is divided, vertical or horizontal division may be performed from the center of the reference frame; the divided reference frame includes The sizes of the plurality of tiles may also be different, that is, when the reference frame is divided, it may not be divided vertically or horizontally from the center of the reference frame.
  • an embodiment of the present application provides a schematic diagram of image division of a certain frame (which may be a reference frame in the present application) in the video to be encoded.
  • Two tiles can be obtained by horizontally dividing the reference frame, namely tile 1 and tile 2, and each tile is rectangular.
  • each tile may include an integer number of CTUs, and during encoding, different processors may be used to encode tile 1 and tile 2 respectively.
  • FIG. 5b it is a schematic diagram of image division of a certain frame (which may be a reference frame in this application) in a video to be encoded according to another embodiment of the present application.
  • Two tiles can be obtained by dividing the reference frame vertically, namely tile 3 and tile 4, and each tile is rectangular.
  • each tile may include an integer number of CTUs, and during encoding, tile 3 and tile 4 may be encoded separately by different processors.
  • FIG. 5c it is a schematic diagram of image division of a certain frame (which may be a reference frame in this application) in a video to be encoded according to another embodiment of the present application.
  • Four tiles can be obtained by dividing the reference frame vertically and horizontally, namely tile 5, tile 6, tile 7 and tile 8, and each tile is rectangular.
  • each tile may include an integer number of CTUs, and when encoding, tile 5, tile 6, tile 7, and tile 8 may be encoded by different processors, respectively.
  • the horizontal division in this embodiment of the present application may refer to the division of the image from the horizontal direction
  • the vertical division may refer to the division of the image from the vertical direction
  • the position of the predicted block can be adjusted, that is, the predicted block can be moved in a certain direction Offset so that the moved prediction block is inside the tile of the reference frame.
  • the position of the prediction block can be adjusted to the inside of the tile, so that the prediction based on the adjusted prediction block encodes the current image block. Since the prediction block pointed to by the motion vector of the current image block is adjusted to the interior of the tile, all the pixels of the foregoing prediction block are not in the tile boundary filtering area that needs to be filtered, and the coding end can realize that the tile boundary filtering is not performed without the tile boundary filtering.
  • the decoding end performs tile boundary filtering, and does not introduce decoding errors caused by "the encoding end does not perform tile boundary filtering, but the decoding end performs tile boundary filtering", which makes the prediction block of the encoding end inconsistent with the prediction block of the decoding end. Reduce the complexity of the encoder.
  • the method further includes enabling the tile boundary filtering during encoding of the current image block.
  • the enabling the tile boundary filtering includes: setting the tile boundary filtering enable flag in the bitstream data to 1; wherein the tile boundary filtering is enabled
  • the flag bit is located in the picture data set, sequence parameter set, slice header, image header or sequence header of the code stream data.
  • the tile boundary filtering is enabled, that is, the tile boundary filtering enable flag bit loop_filter_across_tiles_enabled_flag in the code stream data is set to 1.
  • the tile boundary filtering enable flag bit loop_filter_across_tiles_enabled_flag is located in the picture parameter set (Picture Parameter Set, PPS), sequence parameter set (Sequence Parameter Set, SPS), slice header, image header or sequence header in the code stream data or other header data.
  • the embodiment of the present invention can realize that not only the loop_filter_across_tiles_enabled_flag is set to 1, but tile boundary filtering is not performed at the encoding end to reduce the complexity of the encoder, and tile boundary filtering is performed at the decoding end so that the subjective quality is relatively not degraded.
  • the defects and deficiencies of simultaneous filtering at the encoding end and the decoding end can ensure that the reconstructed image at the encoding end and the decoded image at the decoding end have the same function and effect as the reference frame. Reduces potential decoded image tile boundary blocking to improve user viewing experience.
  • the decoding end may perform decoding based on the foregoing encoding process.
  • FIG. 6 shows a video coding method 600 provided by an embodiment of the present application, and the method 600 may include steps 610-620.
  • the encoding end adjusts the position of the prediction block pointed to by the motion vector of the current image block to the interior of the tile, and performs encoding based on the adjusted prediction block.
  • the prediction block pointed to by the motion vector of the current image block is the adjusted prediction block, that is, the prediction block is located inside the tile.
  • the fact that the prediction block is located inside the tile of the reference frame may mean that the prediction block is not located on the boundary of the tile, that is, not located in the first area mentioned below. In other words, if the prediction block is not located in the first area mentioned below, it can be understood that the prediction block is located inside the tile of the reference frame.
  • step 610 is an optional step, in other words, the decoding end may not determine that the prediction block pointed to by the motion vector of the current image block is located inside the tile of the reference frame, and may directly perform the current image block based on the prediction block. decoding.
  • the decoding end may determine that the prediction block pointed to by the motion vector of the current image block is located inside the tile of the reference frame, so as to decode the current image block based on the prediction block. Therefore, the encoder does not perform boundary filtering during encoding, and the decoder can perform tile boundary filtering during the decoding process, so that the subjective quality is relatively not degraded, and at the same time, it can ensure that the decoded image at the decoding end and the reconstructed image at the encoding end are completely consistent. , and further, the viewing experience of the user can be improved.
  • FIG. 7 a schematic diagram of a video coding framework 2 provided by another embodiment of the present application is shown.
  • a tile boundary information division 212 is added to the schematic diagram of the video coding framework.
  • the encoder can perform motion estimation 208 according to the reference frame image in the reconstructed video frame, and search for the image block most similar to the current encoding block in one or more reference frame images as the prediction block according to certain matching criteria,
  • the relative displacement between the prediction block and the current coding block is the motion vector of the current coding block.
  • the position of the predicted block can be adjusted to the inside of the tile, and the original value of the pixel of the encoding block can be subtracted from the corresponding pixel value of the predicted block to obtain Residuals of encoded blocks.
  • the residual of the current coded block is transformed 204, quantized 205 and entropy coded 210 to form a part of the coded code stream of the coded frame.
  • motion compensation 209 may be performed based on the above determined motion vector and the prediction block, so as to obtain the current block.
  • the dividing 202 processing on the encoded frame may refer to performing tile division processing on the encoded frame, and sending the divided tile boundary information to the inter-frame prediction module, so that the inter-frame prediction module can perform motion estimation 208 and When the motion compensation 209 is performed, a judgment is made and corresponding operations are performed.
  • the divided tile boundary information may include: tile i_x_start, tile i_x_end, tile i_y_start, and tile i_y_end.
  • tile i_x_start represents the start coordinate of the ith tile in the horizontal direction
  • tile i_x_end represents the end coordinate of the ith tile in the horizontal direction
  • tile i_y_start represents the ith tile The starting coordinate of the tile in the vertical direction
  • the end of tile i_y_ indicates the ending coordinate of the ith tile in the vertical direction.
  • FIG. 8 it is a schematic diagram of information included after the video to be encoded is divided according to an embodiment of the present application.
  • the reference frame is divided vertically to obtain two tiles, namely tile 0 and tile 1.
  • tile 1_x_start represents the start coordinate of tile 1 in the horizontal direction
  • tile 1_x_end represents the end coordinate of tile 1 in the horizontal direction
  • tile 1_y_start represents the tile 1 is the start coordinate in the vertical direction
  • tile 1_y_end indicates the end coordinate of tile 1 in the vertical direction.
  • the adjustment manner may include various manners, and details are detailed below.
  • the adjusting the position of the prediction block so that the prediction block is located inside the tile of the reference frame includes: adjusting the position of the prediction block based on a preset rule. The position is adjusted so that the prediction block is inside the tile of the reference frame.
  • the preset rule includes: adjusting the prediction block in at least one of the following manners:
  • the predicted block is moved towards the calculated closest area.
  • FIG. 9a it is a schematic diagram of an inter-frame prediction provided by the embodiment of the present application.
  • Two tiles can be obtained by horizontally dividing the reference frame, namely tile 1 and tile 2.
  • the prediction block of the current image block is located on the tile boundary of the reference frame, and the position of the prediction block can be moved upward to adjust the prediction block to the interior of tile 1, as shown in Figure 9a Shown in dashed line.
  • FIG. 9b it is a schematic diagram of an inter-frame prediction according to another embodiment of the present application.
  • Two tiles can be obtained by vertically dividing the reference frame, namely tile 3 and tile 4.
  • the prediction block of the current image block is located on the tile boundary of the reference frame, and the position of the prediction block can be moved to the left to adjust the prediction block to the interior of tile 3, as shown in the figure Shown in dashed line in 9b.
  • FIG. 9c it is a schematic diagram of an inter-frame prediction according to another embodiment of the present application.
  • Four tiles can be obtained by dividing the reference frame vertically and horizontally, namely tile 5, tile 6, tile 7 and tile 8.
  • the prediction block of the current image block is located on the tile boundary of the reference frame, and the position of the prediction block can be moved to the upper left to adjust the prediction block to the interior of tile 5, as shown in the figure Shown in dashed line in 9c.
  • moving the prediction block to the closest area calculated can be understood as moving the prediction block to the area where most of the prediction blocks are located.
  • the prediction block of the current image block is located on the tile boundary of the reference frame, and most of the blocks of the prediction block are located in tile 5. Therefore, the prediction block can be moved to the area of tile 5, so that the prediction block is The prediction block is adjusted into tile 5.
  • the position of the prediction block pointed to by the determined motion vector may be adjusted. More preferably, if the motion vector is a motion vector in the candidate list, the motion vector may be marked, and the marking is intended to identify that the motion vector is unavailable in the subsequent encoding process.
  • the candidate list may be a Skip candidate list or a Merge candidate list, and the candidate list may be generated according to adjacent information such as the left image block and the upper image block of each image block.
  • candidate list may also be shown in the form of a table or other forms without limitation.
  • the method further includes: based on the boundary value of the prediction block and the boundary value of the first region, judging whether the prediction block is located on the tile boundary of the reference frame, the The first area is an area of the tile boundary affected by filtering.
  • FIG. 10a it is a schematic diagram of a partitioned area of a tile boundary affected by filtering according to an embodiment of the present application.
  • two tiles can be obtained by horizontally dividing the reference frame, namely tile 1 and tile 2, wherein the thicker black solid line in the middle of the reference frame is the tile dividing boundary line, and the upper and lower two tiles are
  • the area formed by the dotted line and the left and right boundaries of the reference frame may be the first area in this embodiment of the present application.
  • adjusting the position of the prediction block includes: if the prediction block An arbitrary boundary of is located in the first area, and the position of the prediction block is adjusted.
  • the first region in this embodiment of the present application may be a region where the tile boundary is affected by filtering.
  • two tiles can be obtained by horizontally dividing the reference frame, namely tile 1 and tile 2, and the area formed by the upper and lower dashed lines and the left and right borders of the reference frame is the present application in the first area. Assuming that any boundary of the prediction block of the current image block is located in the first area, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be adjusted.
  • the lower boundary of the prediction block 1-1 is located in the first area
  • the upper boundary of the prediction block 1-2 is located in the first area
  • all the boundaries of the prediction block 2 are located in the first area. within an area. If the prediction block pointed to by the motion vector is located at the position of one of the above three prediction blocks, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be determined. adjust.
  • two tiles can be obtained by vertically dividing the reference frame, namely tile 3 and tile 4, and the area formed by the left and right dashed lines and the upper and lower boundaries of the reference frame is the present application in the first area. Assuming that any boundary of the prediction block of the current image block is located in the first area, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be adjusted.
  • the right boundary of the prediction block 3-1 is located in the first area
  • the left boundary of the prediction block 3-2 is located in the first area
  • all the boundaries of the prediction block 4 are located in the first area. within an area. If the prediction block pointed to by the motion vector is located at the position of one of the above three prediction blocks, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be determined. adjust.
  • tile 5 is the first area in this application. Assuming that any boundary of the prediction block of the current image block is located in the first area, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be adjusted.
  • boundary value of the prediction block in the embodiment of the present application may refer to the numerical value of the prediction block in the coordinate system, for example, the left boundary value and the right boundary value of the prediction block may refer to the x of the prediction block in the coordinate system value, the upper boundary value and the lower boundary value of the prediction block may refer to the y value of the prediction block in the coordinate system.
  • the position of the prediction block pointed to by the motion vector can be adjusted to the inside of the tile, so that the encoding end does not perform tile operation.
  • Slice boundary filtering which can further reduce the complexity of the encoder.
  • the adjusting the position of the prediction block if any boundary of the prediction block is located in the first area includes: if the prediction block is on the right side of the horizontal direction The boundary value is greater than or equal to the left boundary value of the first region in the horizontal direction, and the right boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the prediction and/or, if the left boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction The position of the prediction block is adjusted if it is greater than or equal to the left boundary value of the first region in the horizontal direction.
  • the coordinate system referenced by the right boundary and the left boundary in this embodiment of the present application may be a two-dimensional coordinate system.
  • the upper left corner of the prediction block may be located at the origin o of the coordinate system.
  • o is the starting point and the horizontal direction to the right may be the X direction in the application, and the vertical downward direction with the origin o as the starting point may be the Y direction in the application.
  • the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the right boundary value of the prediction block in the horizontal direction is less than or equal to the horizontal boundary value of the first region
  • the right boundary value is set, there are multiple possibilities for the location of the prediction block.
  • One possibility is that the right boundary of the prediction block is located in the first area and the left boundary of the prediction block is not located in the first area, such as the prediction block 3-1 in Figure 10b; another possibility is that the right boundary and the left boundary of the prediction block are not located in the first area.
  • the boundaries are all located in the first region, such as prediction block 4 in Fig. 10b.
  • the left boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction
  • there are multiple possibilities for the location of the prediction block One possibility is that the left boundary of the prediction block is located in the first area and the right boundary of the prediction block is not located in the first area, such as the prediction block 3-2 in Figure 10b; another possibility is that the left boundary and right boundary of the prediction block are not located in the first area. The boundaries are all located in the first region, such as prediction block 4 in Fig. 10b.
  • the position of the prediction block can be adjusted.
  • the adjusting the position of the prediction block if any boundary of the prediction block is located in the first area includes: if the prediction block is in the lower part of the vertical direction The boundary value is greater than or equal to the upper boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction is smaller than or equal to the lower boundary value of the first region in the vertical direction, for the The position of the prediction block is adjusted; and/or, if the upper boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, and the upper boundary value of the prediction block in the vertical direction If the value is greater than or equal to the upper boundary value of the first region in the vertical direction, the position of the prediction block is adjusted.
  • the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction is smaller than or equal to the vertical boundary value of the first region in the vertical direction
  • the lower boundary value of there are multiple possibilities for the location of the prediction block.
  • One possibility is that the lower boundary of the prediction block is located in the first area and the upper boundary of the prediction block is not located in the first area, such as prediction block 1-1 in Figure 10a; another possibility is that the lower boundary and upper boundary of the prediction block The boundaries are all located in the first region, such as prediction block 2 in Fig. 10a.
  • the upper boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, and the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction
  • One possibility is that the upper boundary of the prediction block is located in the first area and the lower boundary of the prediction block is not located in the first area, such as prediction blocks 1-2 in Figure 10a; another possibility is that the upper boundary and lower boundary of the prediction block are not located in the first area.
  • the boundaries are all located in the first region, such as prediction block 2 in Fig. 10a.
  • the reference frame is divided horizontally and vertically to obtain four tiles, namely tile 5, tile 6, tile 7 and tile 8, all the dotted lines in the figure and the reference
  • the area formed by the border of the frame is the first area in this application, and there are multiple possibilities for the position of the prediction block.
  • One possibility is that all the boundaries of the prediction block are located in the first area, such as prediction block 6 in Figure 10c; another possibility is that part of the boundaries of the prediction block are located in the first area, such as the prediction block in Figure 10c 5-1, prediction block 5-2 and prediction block 5-3.
  • the position of the prediction block is not limited to that shown in FIG. 10c, and may also be located at other positions without limitation.
  • adjusting the position of the prediction block includes: if the prediction block The boundary value of the first region and the boundary value of the first region do not meet the preset conditions, and the position of the prediction block is adjusted.
  • the preset condition is at least one of the following conditions: the right boundary value of the prediction block in the horizontal direction is less than or equal to the left boundary value of the first region in the horizontal direction; the left boundary value of the prediction block is in the horizontal direction.
  • the boundary value is greater than or equal to the right boundary value of the first region in the horizontal direction; the lower boundary value of the prediction block in the vertical direction is less than or equal to the upper boundary value of the first region in the vertical direction; and, the prediction The upper boundary value of the block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction.
  • the area formed by the upper and lower dashed lines and the left and right borders of the reference frame is this The first area in the application.
  • the position of the prediction block 1 in Fig. 11a can be expressed as: the lower boundary value of the prediction block in the vertical direction is less than or equal to the upper boundary value of the first region in the vertical direction; the position of the prediction block 2 in Fig. 11a can be expressed as : The upper boundary value of the prediction block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction.
  • the prediction block pointed to by the motion vector of the current image block is not the position of prediction block 1 or prediction block 2, that is, the prediction block pointed to by the motion vector of the current image block overlaps with the first area, then Adjust the position of the prediction block.
  • the area formed by the left and right dashed lines and the upper and lower boundaries of the reference frame is the original The first area in the application.
  • the position of the prediction block 3 in Fig. 11b can be expressed as: the right boundary value of the prediction block in the horizontal direction is less than or equal to the left boundary value of the first region in the horizontal direction; the position of the prediction block 4 in Fig. 11b can be expressed as : The left boundary value of the prediction block in the horizontal direction is greater than or equal to the right boundary value of the first region in the horizontal direction.
  • the prediction block pointed to by the motion vector of the current image block is not the position of prediction block 3 or prediction block 4, that is, the prediction block pointed to by the motion vector of the current image block overlaps with the first area, then Adjust the position of the prediction block.
  • the prediction block pointed to by the motion vector of the current image block is not the position of prediction block 5, prediction block 6, prediction block 7 and prediction block 8, that is, the prediction block pointed to by the motion vector of the current image block is the same as If the first area overlaps, the position of the prediction block can be adjusted.
  • the encoder can determine whether the prediction block is located on the tile boundary of the reference frame based on the boundary value of the prediction block and the boundary value of the first region, where the first region is the region affected by the filtering of the tile boundary.
  • the determination of the first region can be determined in the following manner, and details are detailed below.
  • the left boundary and the right boundary of the first region can be determined by formula (1) and formula (2), respectively.
  • fbd_zone_left (Tile_i_x_start-offset_left1-offset_left2)*4 (1)
  • fbd_zone_right (Tile_i_x_start+offset_right1+offset_right2)*4 (2)
  • fbd_zone_left represents the left boundary of the first area
  • fbd_zone_right represents the right boundary of the first area
  • Tile_i_x_start represents the starting coordinates of the ith tile in the horizontal direction
  • offset_left1, offset_left2, offset_right1, offset_right2 represent offset values
  • offset_left1 can be greater than or an integer equal to 3
  • offset_left2 can take an integer greater than or equal to 4
  • offset_right1 can take an integer greater than or equal to 4
  • offset_right2 can take an integer greater than or equal to 4.
  • the left boundary and the right boundary of the prediction block pointed to by the motion vector of the current image block can be determined by formula (3) and formula (4), respectively.
  • pred_block_right (block_x+block_width-1)*4+mv_x (4)
  • pred_block_left represents the left boundary of the prediction block
  • pred_block_right represents the right boundary of the prediction block
  • block_x represents the horizontal axis coordinate of the upper left corner of the current image block
  • mv_x represents the horizontal component of mv (identified with 1/4 pixel precision)
  • block_width represents the current The width of the image block.
  • the meaning expressed by the above formula (5) may be that if the right boundary of the predicted block and the left boundary of the first area do not satisfy pred_block_right ⁇ fbd_zone_left, or the left boundary of the predicted block and the right boundary of the first area do not satisfy If pred_block_left>fbd_zone_right is satisfied, it can be determined that the prediction block pointed to by the motion vector of the current image block overlaps with the first zone.
  • the reference frame is vertically divided to obtain two tiles, namely tile 3 and tile 4, if the coordinate value of the starting point of tile 4 in the horizontal direction is 20, Then according to the above formula (1) and formula (2), it can be obtained that the coordinate values of the left border and the right border of the first region in the horizontal direction are 52 and 112 respectively, that is, the region shown by the dotted line in FIG. 12a is the first region in the application.
  • the upper and lower boundaries of the first region can be determined by formula (6) and formula (7), respectively.
  • fbd_zone_top (Tile_i_y_start-offset_top1-offset_top2)*4 (6)
  • fbd_zone_bottom (Tile_i_y_start+offset_bottom1+offset_bottom2)*4 (7)
  • offset_top1 can take an integer greater than or equal to 3
  • offset_top2 can take an integer greater than or equal to 4
  • offset_bottom1 can take an integer greater than or equal to 4
  • offset_bottom2 can take an integer greater than or equal to 4.
  • the upper and lower boundaries of the prediction block pointed to by the motion vector of the current image block can be determined by formula (8) and formula (9), respectively.
  • pred_block_top block_y*4+mv_y (8)
  • pred_block_bottom (block_y+block_height-1)*4+mv_y (9)
  • block_y represents the vertical axis coordinate of the upper left corner of the current image block
  • mv_y represents the vertical component of mv
  • block_height represents the height of the current image block.
  • the meaning expressed by the above formula (10) may be that if the lower boundary of the prediction block and the upper boundary of the first zone do not satisfy pred_block_bottom ⁇ fbd_zone_top, or the upper boundary of the prediction block and the lower boundary of the first zone If the boundary does not satisfy pred_block_top>fbd_zone_bottom, it can be determined that the prediction block pointed to by the motion vector of the current image block overlaps with the first area.
  • the adjusting the position of the prediction block so that the prediction block is located inside the tile of the reference frame includes: based on the boundary value of the prediction block and the According to the boundary value of the first region, the position of the prediction block is adjusted so that the prediction block is located inside the tile of the reference frame.
  • the position of the prediction block may be adjusted by the boundary value of the prediction block and the boundary value of the first region, so that the prediction block is located inside the tile of the reference frame.
  • the position of the prediction block is adjusted based on the boundary value of the prediction block and the boundary value of the first area, so that the prediction block is located inside the tile of the reference frame, which can ensure that the prediction block is located in the reference frame The accuracy of the tile interior.
  • the encoder can adjust the position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region, and the specific adjustment method can be referred to below.
  • the adjusting the position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region includes: adjusting the position of the prediction block in a horizontal direction and/or, adding a second threshold value to the boundary value of the prediction block in the vertical direction, the second threshold value is based on the boundary value of the prediction block in the vertical direction and the boundary value of the first region in the vertical direction and a second preset value obtained.
  • the first threshold (represented by ⁇ mv_x below) and the second threshold (represented by ⁇ mv_y below) can be obtained by formula (11) and formula (12), or formula (13) and formula (14), respectively.
  • offsetX and offsetY may be 1.
  • the first preset value and/or the second preset value in the embodiment of the present application may be fixed or continuously adjusted, which is not specifically limited in the present application.
  • the first threshold value is a negative value; or, if the left boundary value of the prediction block in the horizontal direction is less than or equal to the first area in the horizontal direction and the right boundary value of the prediction block in the horizontal direction is greater than or equal to the right boundary value of the first region in the horizontal direction, and the first threshold value is a positive value.
  • the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction
  • the left boundary value of the prediction block in the horizontal direction is less than or equal to the horizontal direction value of the first region Left boundary value, ie the position of the original prediction block shown in Figure 12a.
  • a first threshold is added on the basis of the original prediction block, and the first threshold value is a negative value, that is, the original prediction block is moved to the left by the first threshold value, that is, the position of the moved prediction block shown in FIG. 12a.
  • the coordinate values of the left and right boundaries of the original prediction block in the horizontal direction are 40 and 64, respectively, and the coordinate values of the left and right boundaries of the first region in the horizontal direction are 52 and 112, respectively.
  • the first threshold ⁇ mv_x is -13, that is, the coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 27 and 51, respectively.
  • the position of the moved prediction block is If it is not located in the first area, the encoding end may encode the current image block based on the moved prediction block.
  • the coordinates of the left and right boundaries of the first region in the horizontal direction are 52 and 112, respectively, and the coordinates of the left and right boundaries of the original prediction block in the horizontal direction are 90 and 114, respectively , through the above formula (13), it can be obtained that the first threshold ⁇ mv_x is 23, that is, the coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 113 and 137 respectively.
  • the position of the moved prediction block is If it is not located in the first area, the encoding end may encode the current image block based on the moved prediction block.
  • different first thresholds are obtained according to the different positions of the prediction blocks in the first area, so that the positions of the prediction blocks can be adjusted purposefully, and further, the number of prediction blocks can be reduced. offset for ease of implementation.
  • the second threshold value is a negative value; or, if the upper boundary value of the prediction block in the vertical direction is less than or equal to the vertical upper boundary value of the first region and the lower boundary value of the prediction block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction, and the second threshold value is a positive value.
  • the left boundary value ie the position of the original prediction block shown in Figure 12b.
  • a second threshold is added on the basis of the original prediction block, and the second threshold value is a negative value, that is, the original prediction block is moved up by a second threshold value, that is, the position of the moved prediction block shown in FIG. 12b.
  • the coordinates of the upper and lower boundaries of the original prediction block in the vertical direction are 40 and 64, respectively, and the coordinates of the upper and lower boundaries of the first region in the vertical direction are 52 and 112, respectively.
  • the second threshold ⁇ my_x is -13, that is, the coordinate values of the upper and lower boundaries of the moved prediction block in the vertical direction are 27 and 51 respectively.
  • the position of the moved prediction block is If it is not located in the first area, the encoding end may encode the current image block based on the moved prediction block.
  • the second threshold ⁇ mv_y can be obtained as 23, that is, the coordinate values of the upper and lower boundaries of the moved prediction block in the vertical direction are 113 and 137 respectively.
  • the position of the moved prediction block is If it is not located in the first area, the encoding end may encode the current image block based on the moved prediction block.
  • different second thresholds are obtained according to the different positions of the predicted blocks in the first area, so that the positions of the predicted blocks can be adjusted purposefully, and further, the amount of the predicted blocks can be reduced. offset for ease of implementation.
  • the left border of the prediction block in the horizontal direction is greater than or equal to the left border value of the first region in the horizontal direction
  • the right border of the prediction block in the horizontal direction is less than or equal to The right boundary value of the first region in the horizontal direction
  • the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction
  • the lower boundary value of the prediction block in the vertical direction The value is less than or equal to the lower boundary value of the first region in the vertical direction
  • the first threshold value and/or the second threshold value is a positive value or a negative value.
  • the left boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction
  • the right boundary value of the prediction block in the horizontal direction is smaller than or equal to the right boundary value of the first region in the horizontal direction
  • the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction
  • the lower boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, that is, the prediction block is located in the first area, that is, the position of the original prediction block shown in Fig. 12e.
  • a first threshold and/or a second threshold is added on the basis of the original prediction block, and the first threshold and/or the second threshold are positive or negative, that is, the original prediction block is moved in any possible direction by the first threshold and/or The second threshold, the position of the moved prediction block shown in Figure 12e.
  • the coordinate values of the left and right boundaries of the original prediction block in the horizontal direction are 60 and 84, respectively, and the coordinate values of the upper and lower boundaries in the vertical direction are 60 and 84, respectively;
  • the coordinates of the left and right borders in the horizontal direction are 52 and 112, respectively, and the coordinates of the upper and lower borders in the vertical direction are 52 and 112, respectively.
  • the position of the original prediction block can be adjusted in the following ways, without limitation, please refer to the following for details.
  • the values of the first threshold ⁇ mv_x and the second threshold ⁇ mv_y can be obtained to be 53 and -33 respectively, that is, on the basis of the original prediction block, increase 53 in the horizontal direction, and in the vertical direction
  • Add -33 that is, the coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 113 and 137, respectively, and the coordinates of the upper and lower boundaries of the moved prediction block in the vertical direction are 27 and 27, respectively. 51.
  • the position of the moved prediction block is shown as the position of the moved prediction block 2 in FIG. 12e, and the encoding end may encode the current image block based on the moved prediction block 2.
  • the values of the first threshold ⁇ mv_x and the second threshold ⁇ mv_y can be obtained to be -33 and 53 respectively, that is, on the basis of the original prediction block, increase -33 in the horizontal direction, and in the vertical direction.
  • the direction increases by 53, that is, the coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 27 and 51, respectively, and the coordinates of the upper and lower boundaries of the moved prediction block in the vertical direction are 113 and 113 respectively. 137.
  • the position of the moved prediction block is shown as the position of the moved prediction block 3 in FIG. 12e, and the encoding end may encode the current image block based on the moved prediction block 3.
  • the values of the first threshold ⁇ mv_x and the second threshold ⁇ mv_y are both 53, that is, on the basis of the original prediction block, increase 53 in the horizontal direction and the vertical direction, then
  • the coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 113 and 137, respectively, and the coordinates of the upper and lower boundaries of the moved prediction block in the vertical direction are 113 and 137, respectively.
  • the position of the subsequent prediction block is shown as the position of the moved prediction block 4 in FIG. 12e , and the encoding end may encode the current image block based on the moved prediction block 4 .
  • the position of the prediction block is adjusted based on the boundary value of the prediction block and the boundary value of the first region, so that the prediction block is located inside the tile of the reference frame, which can ensure that the prediction block is located in the reference frame.
  • the accuracy of the tile interior is adjusted based on the boundary value of the prediction block and the boundary value of the first region, so that the prediction block is located inside the tile of the reference frame, which can ensure that the prediction block is located in the reference frame.
  • FIG. 13 is an encoding apparatus 1300 provided by an embodiment of the present application.
  • the encoding apparatus 1300 may include a processor 1310 .
  • the processor 1310 is configured to: if the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, adjust the position of the prediction block so that the prediction block is located at the tile boundary of the reference frame. Inside the tile of the reference frame, so that when tile boundary filtering is not performed at the encoding end and tile boundary filtering is performed at the decoding end, the pixel value of the prediction block referenced by the encoding end during encoding and the The pixel values of the prediction block referenced by the decoding end during decoding can be kept consistent, and the current image block is located in the current frame; the current image block is encoded based on the adjusted prediction block.
  • the processor 1310 is further configured to: enable the tile boundary filtering in the process of encoding the current image block.
  • the processor 1310 is further configured to: set the tile boundary filtering enable flag in the code stream data to 1; wherein the tile boundary filtering enable flag is located in the In the picture data set, sequence parameter set, slice header, picture header or sequence header of the code stream data.
  • the processor 1310 is further configured to: adjust the position of the prediction block based on a preset rule, so that the prediction block is located inside the tile of the reference frame.
  • the preset rule includes: adjusting the prediction block in at least one of the following manners:
  • the predicted block is moved towards the calculated closest area.
  • the processor 1310 is further configured to: based on the boundary value of the prediction block and the boundary value of the first region, determine whether the prediction block is located at the tile boundary of the reference frame Above, the first region is the region where the tile boundary is affected by filtering.
  • the processor 1310 is further configured to: if any boundary of the prediction block is located in the first area, adjust the position of the prediction block.
  • the processor 1310 is further configured to: if the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the The right boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the position of the prediction block is adjusted; and/or, if the prediction block is at the left boundary in the horizontal direction The value is less than or equal to the right boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction. position to adjust.
  • the processor 1310 is further configured to: if the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the The lower boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, and the position of the prediction block is adjusted; and/or, if the prediction block is above the vertical direction The boundary value is less than or equal to the lower boundary value of the first region in the vertical direction, and the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the prediction Adjust the position of the block.
  • the processor 1310 is further configured to: if the boundary value of the prediction block and the boundary value of the first region do not meet a preset condition, perform a calculation on the position of the prediction block. adjust;
  • the preset condition is at least one of the following conditions:
  • the right boundary value of the prediction block in the horizontal direction is less than or equal to the left boundary value of the first region in the horizontal direction;
  • the left boundary value of the prediction block in the horizontal direction is greater than or equal to the right boundary value of the first region in the horizontal direction;
  • the lower boundary value of the prediction block in the vertical direction is less than or equal to the upper boundary value of the first region in the vertical direction
  • the upper boundary value of the prediction block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction.
  • the processor 1310 is further configured to: adjust the position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region, so that all The prediction block is located inside a tile of the reference frame.
  • the processor 1310 is further configured to: add a first threshold to the boundary value of the prediction block in the horizontal direction, where the first threshold is based on the prediction block in the horizontal direction The boundary value and the boundary value of the first region in the horizontal direction and the first preset value are obtained; and/or, a second threshold is added to the boundary value of the prediction block in the vertical direction, and the second threshold is based on The boundary value of the prediction block in the vertical direction, the boundary value of the first region in the vertical direction, and the second preset value are obtained.
  • the first threshold value is a negative value; or, if the left boundary value of the prediction block in the horizontal direction is less than or equal to the first area in the horizontal direction and the right boundary value of the prediction block in the horizontal direction is greater than or equal to the right boundary value of the first region in the horizontal direction, and the first threshold value is a positive value.
  • the second threshold value is a negative value; or, if the upper boundary value of the prediction block in the vertical direction is less than or equal to the vertical upper boundary value of the first region and the lower boundary value of the prediction block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction, and the second threshold value is a positive value.
  • the left border of the prediction block in the horizontal direction is greater than or equal to the left border value of the first region in the horizontal direction
  • the right border of the prediction block in the horizontal direction is less than or equal to The right boundary value of the first region in the horizontal direction
  • the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction
  • the lower boundary value of the prediction block in the vertical direction The value is less than or equal to the lower boundary value of the first region in the vertical direction
  • the first threshold value and/or the second threshold value is a positive value or a negative value.
  • FIG. 14 is a decoding apparatus 1400 provided by an embodiment of the present application.
  • the decoding apparatus 1400 may include a processor 1410 .
  • the processor 1410 is configured to: determine that the prediction block pointed to by the motion vector of the current image block is located inside the tile of the reference frame, and the current image block is located in the current frame; The current image block is decoded.
  • An embodiment of the present invention also provides an encoding and decoding system, including:
  • an encoder configured to adjust the position of the prediction block if the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the first reference frame, so that the prediction block is located in the first reference frame Inside the tile of the frame; encode the current image block to be encoded based on the adjusted prediction block; during the encoding process, do not perform tile boundary filtering on the first reference frame; wherein the current The image block is located in the current frame;
  • the decoder is configured to decode the current image block based on the prediction block of the second reference frame obtained by decoding; in the decoding process, perform tile boundary filtering on the second reference frame.
  • disabling the tile boundary filtering function on the encoding side and enabling the tile boundary filtering function on the decoding side can not only achieve the picture quality when displayed on the encoding side, but also reduce the amount of data exchange and computation on the decoding side.
  • FIG. 15 is a schematic structural diagram of a video encoding and decoding apparatus provided by still another embodiment of the present application.
  • the video coding and decoding apparatus 1500 shown in FIG. 15 includes a processor 1510, and the processor 1510 can call and run a computer program from a memory, so as to implement the methods described in FIG. 4-FIG. 12 above.
  • the video coding and decoding apparatus 1500 may further include a memory 1520 .
  • the processor 1510 may call and run a computer program from the memory 1520 to implement the methods in the embodiments of the present application.
  • the memory 1520 may be a separate device independent of the processor 1510, or may be integrated in the processor 1510.
  • the video codec apparatus 1500 may further include a transceiver 1530, and the processor 1510 may control the transceiver 1530 to communicate with other apparatuses, specifically, may send information or data to other apparatuses, or Receive information or data sent by other devices.
  • the video encoding and decoding apparatus may be, for example, an encoder, a decoder, and a terminal (including but not limited to a mobile phone, a camera, a drone, etc.), and the encoding and decoding apparatus may implement the methods in the embodiments of the present application.
  • the encoding and decoding apparatus may implement the methods in the embodiments of the present application.
  • the corresponding process is not repeated here.
  • FIG. 16 is a schematic structural diagram of a chip according to an embodiment of the present application.
  • the chip 1600 shown in FIG. 16 includes a processor 1610, and the processor 1610 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
  • the chip 1600 may further include a memory 1620 .
  • the processor 1610 may call and run a computer program from the memory 1620 to implement the methods in the embodiments of the present application.
  • the memory 1620 may be a separate device independent of the processor 1610, or may be integrated in the processor 1610.
  • the chip 1600 may further include an input interface 1630 .
  • the processor 1610 can control the input interface 1630 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
  • the chip 1600 may further include an output interface 1640 .
  • the processor 1610 can control the output interface 1640 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-chip, or a system-on-a-chip, or the like.
  • An embodiment of the present invention further provides a chip, including a processing circuit, for implementing the above-mentioned encoding method and decoding method.
  • the processor in this embodiment of the present application may be an integrated circuit image processing system, which has signal processing capability.
  • each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Programming logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which acts as an external cache.
  • RAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDR SDRAM
  • enhanced SDRAM ESDRAM
  • synchronous link dynamic random access memory Synchlink DRAM, SLDRAM
  • Direct Rambus RAM Direct Rambus RAM
  • the memory in the embodiments of the present application may provide instructions and data to the processor.
  • a portion of the memory may also include non-volatile random access memory.
  • the memory may also store device type information.
  • the processor may be configured to execute the instruction stored in the memory, and when the processor executes the instruction, the processor may execute each step corresponding to the terminal device in the foregoing method embodiments.
  • each step of the above-mentioned method can be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the steps of the methods disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor executes the instructions in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, detailed description is omitted here.
  • the pixels in the image may be located in different rows and/or columns, wherein the length of A may correspond to the number of pixels located in the same row included in A, and the height of A may be Corresponds to the number of pixels in the same column included in A.
  • the length and height of A may also be referred to as the width and depth of A, respectively, which are not limited in this embodiment of the present application.
  • distributed at the boundary of A may refer to at least one pixel point away from the boundary of A, and may also be referred to as "not adjacent to the boundary of A” or “not located at the boundary of A”.
  • Embodiments of the present application further provide a computer-readable storage medium for storing a computer program.
  • the computer-readable storage medium can be applied to the encoding device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the encoding device in each method of the embodiments of the present application.
  • the computer program enables the computer to execute the corresponding processes implemented by the encoding device in each method of the embodiments of the present application.
  • the computer-readable storage medium can be applied to the decoding apparatus in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the decoding apparatus in each method of the embodiments of the present application.
  • the computer program enables the computer to execute the corresponding processes implemented by the decoding apparatus in each method of the embodiments of the present application.
  • Embodiments of the present application also provide a computer program product, including computer program instructions.
  • the computer program product can be applied to the encoding device in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the encoding device in the various methods of the embodiments of the present application. Repeat.
  • the computer program product can be applied to the decoding apparatus in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the decoding apparatus in each method of the embodiments of the present application. Repeat.
  • the embodiments of the present application also provide a computer program.
  • the computer program can be applied to the encoding device in the embodiments of the present application.
  • the computer program executes the corresponding processes implemented by the encoding device in each method of the embodiments of the present application. For the sake of brevity. , and will not be repeated here.
  • the computer program can be applied to the decoding device in the embodiments of the present application.
  • the computer program is run on the computer, the computer is made to execute the corresponding processes implemented by the decoding device in the various methods of the embodiments of the present application. For the sake of brevity. , and will not be repeated here.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present application.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application are essentially or part of contributions to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A video coding and decoding method and device. The video coding method comprises: if a prediction block pointed by a motion vector of the current image block is located on a tile boundary of a reference frame, adjusting the position of the prediction block so that the prediction block is located inside a tile of the reference frame, thus when tile boundary filtering is not performed at a coding end and tile boundary filtering is performed at a decoding end, a pixel value of a prediction block referenced by a coding end during coding and a pixel value of a prediction block referenced by a decoding end during decoding can be kept consistent, and the current image block is located at the current frame; and coding the current image block on the basis of the adjusted prediction block. According to the solution in the present application, the prediction block pointed by the motion vector of the current image block is adjusted to the interior of the tile, so that the complexity of an encoder can be further reduced, and the image quality deterioration caused by a block boundary effect generated by the image at the tile boundary can be avoided.

Description

视频编解码的方法和装置Method and device for video coding and decoding 技术领域technical field
本申请涉及图像处理领域,并且更为具体地,涉及一种视频编解码的方法和装置。The present application relates to the field of image processing, and more particularly, to a video coding and decoding method and apparatus.
背景技术Background technique
目前,在实际应用中,由于对于视频分辨率和帧率的需求不断上升,单核的硬件编码器已经不能满足需求,多核的硬件编码器可以提供更高的编码性能,从而可以满足更高的分辨率和帧率的需求。多核的硬件编码器通常会将图像或视频分为多个瓦片(Tile),每个核负责其中一个或多个瓦片的编解码。At present, in practical applications, due to the rising demand for video resolution and frame rate, the single-core hardware encoder can no longer meet the demand, and the multi-core hardware encoder can provide higher encoding performance, which can meet higher Resolution and frame rate requirements. A multi-core hardware encoder usually divides an image or video into multiple tiles, and each core is responsible for encoding and decoding one or more of the tiles.
由于图像被划分到多个核中进行编码,在图像被划分的边界处更可能会出现较为明显的边界块效应,从而导致图像显示质量较差,用户观看视频的体验降低。在高效率视频编码标准(High Efficiency Video Coding,HEVC)中,与图像分瓦片相关的信息和功能开关存储在图片参数集(Picture Parameter Set,PPS)中,在图片参数集中有是否在瓦片边界处进行滤波的开关loop_filter_across_tiles_enabled_flag。针对上述问题,在一种实现方式下,可以将loop_filter_across_tiles_enabled_flag置为1,即针对瓦片边界的编码树单元(Coding Tree Unit,CTU)进行滤波,但是这种方式会因为需要在瓦片边界处进行更多的数据交换,导致额外提高了编码器的实现复杂度;在另一种实现方式下,可以选择将loop_filter_across_tiles_enabled_flag置为0,即不对瓦片边界进行滤波,但是解码后的图像在瓦片边界处可能出现明显的块边界效应导致主观质量变差。因为码流是编码端与解码端完全一致的,当loop_filter_across_tiles_enabled_flag为1时,编码端与解码端都会进行瓦片边界滤波操作;当loop_filter_across_tiles_enabled_flag为0时,编码端与解码端都不会进行瓦片边界滤波操作。Since the image is divided into multiple cores for encoding, more obvious boundary block effects are likely to occur at the divided boundaries of the image, resulting in poor image display quality and reduced video viewing experience for users. In the High Efficiency Video Coding (HEVC) standard, the information and function switches related to image sub-tiles are stored in the Picture Parameter Set (PPS). Switch loop_filter_across_tiles_enabled_flag for filtering at boundaries. In response to the above problems, in an implementation manner, loop_filter_across_tiles_enabled_flag can be set to 1, that is, filtering is performed on the Coding Tree Unit (CTU) of the tile boundary, but this method will be performed at the tile boundary because of the need. More data exchange leads to an additional increase in the implementation complexity of the encoder; in another implementation, you can choose to set loop_filter_across_tiles_enabled_flag to 0, that is, no filtering is performed on the tile boundary, but the decoded image is at the tile boundary. There may be obvious block boundary effects where the subjective quality is degraded. Because the code stream is completely consistent with the encoder and the decoder, when loop_filter_across_tiles_enabled_flag is 1, both the encoder and decoder will perform tile boundary filtering operations; when loop_filter_across_tiles_enabled_flag is 0, neither the encoder nor the decoder will perform tile boundary filtering. filter operation.
因此,如何消除由于不同核编码同一视频中的不同图像而导致的边界块效应,且使得编码器复杂度降低,成为亟需解决的问题。Therefore, how to eliminate the boundary block effect caused by different kernels encoding different images in the same video and reduce the complexity of the encoder has become an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种视频编解码的方法和装置,可以实现既将loop_filter_across_tiles_enabled_flag置为1,但在编码端不进行瓦片边界滤波降低编码器复杂度,又在解码端进行瓦片边界滤波使得主观质量相对不降低,解决现有技术在编码端和解码端同时进行滤波存在的缺陷和不足,同时可以保证编码端重建图像与解码端解码图像用作参考帧时的作用与效果完全一致,进一步地,因为在解码端进行了滤波操作可以减少潜在的解码图像瓦片边界块效应提高用户的观看体验。The embodiments of the present application provide a video encoding and decoding method and apparatus, which can realize that not only the loop_filter_across_tiles_enabled_flag is set to 1, but tile boundary filtering is not performed at the encoding end to reduce the complexity of the encoder, and tile boundary filtering is performed at the decoding end so that the The subjective quality is relatively not reduced, which solves the defects and deficiencies existing in the simultaneous filtering of the encoding end and the decoding end in the prior art, and at the same time can ensure that the functions and effects of the reconstructed image at the encoding end and the decoded image at the decoding end are completely the same as the reference frame, and further Because the filtering operation is performed at the decoding end, the potential block effect of the boundary of the decoded image tile can be reduced, and the viewing experience of the user can be improved.
第一方面,提供一种视频编码的方法,包括:若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上,对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部,从而使得当在编码端不进行瓦片边界滤波而在解码端进行瓦片边界滤波时,所述编码端进行编码时所参考的预测块的像素值和所述解码端进行解码时所参考的预测块的像素值能够保持一致,所述当前图像块位于当前帧;基于调整后的所述预测块,对所述当前图像块进行编码。In a first aspect, a video coding method is provided, comprising: if a prediction block pointed to by a motion vector of a current image block is located on a tile boundary of a reference frame, adjusting the position of the prediction block so that the prediction block is The block is located inside the tile of the reference frame, so that when tile boundary filtering is not performed at the encoding end and tile boundary filtering is performed at the decoding end, the pixel value of the prediction block referenced by the encoding end when encoding and The pixel values of the prediction block referenced by the decoding end during decoding can be kept consistent, and the current image block is located in the current frame; the current image block is encoded based on the adjusted prediction block.
本申请实施例提供的视频编码的方法,若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界时,可以将预测块的位置调整至瓦片内部,从而基于调整后的预测块对当前图像块进行编码。由于通过将当前图像块的运动矢量所指向的预测块调整至瓦片内部,使得前述预测块的所有像素均不在需要滤波的瓦片边界滤波区域内,可以实现编码端不进行瓦片边界滤波而解码端进行瓦片边界滤波,且不引入由于“编码端不进行瓦片边界滤波而解码端进行瓦片边界滤波”使得编码端的预测块和解码端的预测块不一致进而导致的解码误差,从而可以进一步降低编码器的复杂度。In the video coding method provided by the embodiment of the present application, if the prediction block pointed to by the motion vector of the current image block is located at the tile boundary of the reference frame, the position of the prediction block can be adjusted to the inside of the tile, so that the prediction based on the adjusted prediction block encodes the current image block. Since the prediction block pointed to by the motion vector of the current image block is adjusted to the interior of the tile, all the pixels of the foregoing prediction block are not in the tile boundary filtering area that needs to be filtered, and the coding end can realize that the tile boundary filtering is not performed without the tile boundary filtering. The decoding end performs tile boundary filtering, and does not introduce decoding errors caused by "the encoding end does not perform tile boundary filtering, but the decoding end performs tile boundary filtering", which makes the prediction block of the encoding end inconsistent with the prediction block of the decoding end. Reduce the complexity of the encoder.
第二方面,提供了一种视频编码的装置,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述第一方面或其各实现方式中的方法。In a second aspect, a video encoding apparatus is provided, including a processor and a memory. The memory is used for storing a computer program, and the processor is used for calling and running the computer program stored in the memory to execute the method in the above-mentioned first aspect or each implementation manner thereof.
有益效果可以参见上述第一方面的描述,为了简洁,这里不再赘述。For the beneficial effects, reference may be made to the description of the above-mentioned first aspect, which is not repeated here for the sake of brevity.
第三方面,提供一种芯片,包括处理电路,用于实现上述第一方面的方法。In a third aspect, a chip is provided, including a processing circuit, for implementing the method of the above-mentioned first aspect.
附图说明Description of drawings
图1是应用本申请实施例的技术方案的架构图;Fig. 1 is the architecture diagram of applying the technical solution of the embodiment of the present application;
图2是本申请一实施例提供的一种视频编码框架2示意图;FIG. 2 is a schematic diagram of a video coding framework 2 provided by an embodiment of the present application;
图3是本申请实施例提供的去块滤波示意图;3 is a schematic diagram of deblocking filtering provided by an embodiment of the present application;
图4是本申请实施例提供的一种编码方法的示意性流程图;4 is a schematic flowchart of an encoding method provided by an embodiment of the present application;
图5a是本申请一实施例提供的对待编码视频划分的示意性图;Fig. 5a is a schematic diagram of video division to be encoded provided by an embodiment of the present application;
图5b是本申请另一实施例提供的对待编码视频划分的示意性图;Fig. 5b is a schematic diagram of video division to be encoded provided by another embodiment of the present application;
图5c是本申请又一实施例提供的对待编码视频划分的示意性图;Fig. 5c is a schematic diagram of video division to be encoded provided by another embodiment of the present application;
图6是本申请实施例提供的一种解码方法的示意性流程图;6 is a schematic flowchart of a decoding method provided by an embodiment of the present application;
图7是本申请另一实施例的提供的一种视频编码框架2示意图;7 is a schematic diagram of a video coding framework 2 provided by another embodiment of the present application;
图8是本申请实施例提供的对待编码视频划分后所包括的信息的示意性图;8 is a schematic diagram of the information included after the video to be encoded is divided according to an embodiment of the present application;
图9a是本申请一实施例提供的一种帧间预测的示意图;9a is a schematic diagram of an inter-frame prediction provided by an embodiment of the present application;
图9b是本申请另一实施例提供的一种帧间预测的示意图;FIG. 9b is a schematic diagram of an inter-frame prediction provided by another embodiment of the present application;
图9c是本申请又一实施例提供的一种帧间预测的示意图;9c is a schematic diagram of an inter-frame prediction provided by another embodiment of the present application;
图10a是本申请一实施例提供的一种划分的瓦片边界受滤波影响的区域的示意图;10a is a schematic diagram of a partitioned area of a tile boundary affected by filtering according to an embodiment of the present application;
图10b是本申请另一实施例提供的一种划分的瓦片边界受滤波影响的区域的示意图;FIG. 10b is a schematic diagram of a partitioned area of a tile boundary affected by filtering according to another embodiment of the present application;
图10c是本申请又一实施例提供的一种划分的瓦片边界受滤波影响的区域的示意图;FIG. 10c is a schematic diagram of a partitioned area of a tile boundary affected by filtering according to another embodiment of the present application;
图11a是本申请一实施例提供的一种预测块的位置的示意图;11a is a schematic diagram of the location of a prediction block provided by an embodiment of the present application;
图11b是本申请另一实施例提供的一种预测块的位置的示意图;11b is a schematic diagram of the location of a prediction block provided by another embodiment of the present application;
图11c是本申请又一实施例提供的一种预测块的位置的示意图;11c is a schematic diagram of the location of a prediction block provided by another embodiment of the present application;
图12a是本申请一实施例提供的一种对原预测块的位置进行调整的示意图;12a is a schematic diagram of adjusting the position of an original prediction block according to an embodiment of the present application;
图12b是本申请另一实施例提供的一种对原预测块的位置进行调整的示意图;12b is a schematic diagram of adjusting the position of an original prediction block according to another embodiment of the present application;
图12c是本申请又一实施例提供的一种对原预测块的位置进行调整的示意图;12c is a schematic diagram of adjusting the position of an original prediction block according to another embodiment of the present application;
图12d是本申请再一实施例提供的一种对原预测块的位置进行调整的示意图;FIG. 12d is a schematic diagram of adjusting the position of an original prediction block according to still another embodiment of the present application;
图12e是本申请再一实施例提供的一种对原预测块的位置进行调整的示 意图;Fig. 12e is a kind of schematic diagram of adjusting the position of the original prediction block provided by another embodiment of the present application;
图13是本申请实施例提供的视频编码装置的示意性图;13 is a schematic diagram of a video encoding apparatus provided by an embodiment of the present application;
图14是本申请实施例提供的视频解码装置的示意性图;14 is a schematic diagram of a video decoding apparatus provided by an embodiment of the present application;
图15是本申请实施例提供的视频编解码装置的示意性结构图;15 is a schematic structural diagram of a video encoding and decoding apparatus provided by an embodiment of the present application;
图16是本申请实施例提供的芯片的示意性结构图。FIG. 16 is a schematic structural diagram of a chip provided by an embodiment of the present application.
具体实施方式detailed description
下面对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application are described below.
除非另有说明,本申请实施例所使用的所有技术和科学术语与本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。Unless otherwise specified, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by those skilled in the technical field of the present application. The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the scope of the application.
图1是应用本申请实施例的技术方案的架构图。FIG. 1 is an architectural diagram of applying the technical solution of the embodiment of the present application.
如图1所示,系统100可以接收待处理数据102,对待处理数据102进行处理,产生处理后的数据108。例如,系统100可以接收待编码数据,对待编码数据进行编码以产生编码后的数据,或者,系统100可以接收待解码数据,对待解码数据进行解码以产生解码后的数据。在一些实施例中,系统100中的部件可以由一个或多个处理器实现,该处理器可以是计算设备中的处理器,也可以是移动设备(例如无人机)中的处理器。该处理器可以为任意种类的处理器,本发明实施例对此不做限定。在一些可能的设计中,该处理器可以包括编码器、解码器或编解码器等。系统100中还可以包括一个或多个存储器。该存储器可用于存储指令和数据,例如,实现本发明实施例的技术方案的计算机可执行指令、待处理数据102、处理后的数据108等。该存储器可以为任意种类的存储器,本发明实施例对此也不做限定。As shown in FIG. 1 , the system 100 may receive data 102 to be processed, process the data 102 to be processed, and generate processed data 108 . For example, system 100 may receive data to be encoded and encode the data to be encoded to generate encoded data, or system 100 may receive data to be decoded and decode the data to be decoded to generate decoded data. In some embodiments, components in system 100 may be implemented by one or more processors, which may be processors in computing devices or processors in mobile devices (eg, drones). The processor may be any type of processor, which is not limited in this embodiment of the present invention. In some possible designs, the processor may include an encoder, a decoder, or a codec, among others. One or more memories may also be included in system 100 . The memory may be used to store instructions and data, for example, computer-executable instructions, data to be processed 102 , processed data 108 , etc. that implement the technical solutions of the embodiments of the present invention. The memory may be any type of memory, which is also not limited in this embodiment of the present invention.
待编码数据可以包括文本、图像、图形对象、动画序列、音频、视频、或者任何需要编码的其他数据。在一些情况下,待编码数据可以包括来自传感器的传感数据,该传感器可以为视觉传感器(例如,相机、红外传感器),麦克风、近场传感器(例如,超声波传感器、雷达)、位置传感器、温度传感器、触摸传感器等。在一些情况下,待编码数据可以包括来自用户的信息,例如,生物信息,该生物信息可以包括面部特征、指纹扫描、视网膜扫描、嗓音记录、DNA采样等。The data to be encoded may include text, images, graphic objects, animation sequences, audio, video, or any other data that needs to be encoded. In some cases, the data to be encoded may include sensory data from sensors, which may be visual sensors (eg, cameras, infrared sensors), microphones, near-field sensors (eg, ultrasonic sensors, radar), position sensors, temperature sensor, touch sensor, etc. In some cases, the data to be encoded may include information from the user, eg, biometric information, which may include facial features, fingerprint scans, retinal scans, voice recordings, DNA sampling, and the like.
图2是根据本申请实施例的视频编码框架2示意图。如图2所示,在接 收待编码视频后,从待编码视频的第一帧开始,依次对待编码视频中的每一帧进行编码。其中,当前编码帧主要经过:预测(Prediction)、变换(Transform)、量化(Quantization)和熵编码(Entropy Coding)等处理,最终输出当前编码帧的码流。对应的,解码过程通常是按照上述过程的逆过程对接收到的码流进行解码,以恢复出解码前的视频帧信息。FIG. 2 is a schematic diagram of a video coding framework 2 according to an embodiment of the present application. As shown in Figure 2, after receiving the video to be encoded, starting from the first frame of the video to be encoded, each frame of the video to be encoded is encoded in sequence. Among them, the current coded frame mainly undergoes: prediction (Prediction), transformation (Transform), quantization (Quantization) and entropy coding (Entropy Coding), etc., and finally outputs the code stream of the current coded frame. Correspondingly, the decoding process usually decodes the received code stream according to the inverse process of the above process, so as to recover the video frame information before decoding.
具体地,如图2所示,所述视频编码框架2中包括一个编码控制模块201,用于进行编码过程中的决策控制动作,以及参数的选择。例如,如图2所示,编码控制模块201控制变换、量化、反量化、反变换的中用到的参数,控制进行帧内模式或者帧间模式的选择,以及运动估计和滤波的参数控制,且编码控制模块201的控制参数也将输入至熵编码模块中,进行编码形成编码码流中的一部分。Specifically, as shown in FIG. 2 , the video coding framework 2 includes a coding control module 201 for performing decision control actions and parameter selection in the coding process. For example, as shown in FIG. 2, the encoding control module 201 controls parameters used in transformation, quantization, inverse quantization, and inverse transformation, controls selection of intra-frame mode or inter-frame mode, and parameter control of motion estimation and filtering, And the control parameters of the encoding control module 201 will also be input into the entropy encoding module to be encoded to form a part of the encoded code stream.
对当前编码帧开始编码时,对编码帧进行划分202处理,具体地,首先对其进行条带(slice)划分,再进行块划分。可选地,在一个示例中,编码帧划分为多个互不重叠的最大的CTU,各CTU还可以分别按四叉树、或二叉树、或三叉树的方式迭代划分为一系列更小的编码单元(Coding Unit,CU),一些示例中,CU还可以包含与之相关联的预测单元(Prediction Unit,PU)和变换单元(Transform Unit,TU),其中PU为预测的基本单元,TU为变换和量化的基本单元。一些示例中,PU和TU分别是在CU的基础上划分成一个或多个块得到的,其中一个PU包含多个预测块(Prediction Block,PB)以及相关语法元素。一些示例中,PU和TU可以是相同的,或者,是由CU通过不同的划分方法得到的。一些示例中,CU、PU和TU中的至少两种是相同的,例如,不区分CU、PU和TU,全部是以CU为单位进行预测、量化和变换。为方便描述,下文中将CTU、CU或者其它形成的数据单元均称为编码块。When the coding of the current coded frame is started, the coded frame is divided 202, and specifically, the coded frame is divided into slices first, and then divided into blocks. Optionally, in an example, the coded frame is divided into a plurality of non-overlapping largest CTUs, and each CTU can also be iteratively divided into a series of smaller codes in a quad-tree, binary-tree, or ternary-tree manner. A unit (Coding Unit, CU), in some examples, a CU may also include a prediction unit (Prediction Unit, PU) and a transform unit (Transform Unit, TU) associated with it, where PU is the basic unit of prediction, and TU is the transform and basic units of quantification. In some examples, PUs and TUs are obtained by dividing into one or more blocks on the basis of CUs, wherein one PU includes multiple prediction blocks (Prediction Blocks, PBs) and related syntax elements. In some examples, the PU and the TU may be the same, or may be obtained by the CU through different partitioning methods. In some examples, at least two of the CUs, PUs, and TUs are the same, eg, CUs, PUs, and TUs are not distinguished, and all are predicted, quantized, and transformed in units of CUs. For the convenience of description, hereinafter, the CTU, CU or other formed data units are referred to as coding blocks.
应理解,在本申请实施例中,视频编码针对的数据单元可以为帧,条带,编码树单元,编码单元,编码块或以上任一种的组。在不同的实施例中,数据单元的大小可以变化。It should be understood that, in this embodiment of the present application, a data unit targeted for video coding may be a frame, a slice, a coding tree unit, a coding unit, a coding block, or a group of any of the above. In different embodiments, the size of the data unit may vary.
具体地,如图2所示,编码帧划分为多个编码块后,进行预测过程,用于去除当前编码帧的空域和时域冗余信息。当前比较常用的预测编码方法包括帧内预测和帧间预测两种方法。帧内预测仅利用本帧图像中己重建的信息对当前编码块进行预测,而帧间预测会利用到之前已经重建过的其它帧图像 (也被称作参考帧)中的信息对当前编码块进行预测。具体地,在本申请实施例中,编码控制模块201用于决策选择帧内预测或者帧间预测。Specifically, as shown in FIG. 2 , after the coded frame is divided into multiple coding blocks, a prediction process is performed to remove redundant information in the spatial and temporal domains of the current coded frame. Currently, the commonly used predictive coding methods include intra-frame prediction and inter-frame prediction. Intra-frame prediction only uses the reconstructed information in this frame to predict the current coding block, while inter-frame prediction uses the information in other frames (also called reference frames) that have been reconstructed before to predict the current coding block. Make predictions. Specifically, in this embodiment of the present application, the encoding control module 201 is configured to decide whether to select intra-frame prediction or inter-frame prediction.
当选择帧内预测模式时,帧内预测203的过程包括获取当前编码块周围已编码相邻块的重建块作为参考块,基于该参考块的像素值,采用预测模式方法计算预测值生成预测块,将当前编码块与预测块的相应像素值相减得到当前编码块的残差,当前编码块的残差经过变换204、量化205以及熵编码210后形成当前编码块的码流。进一步的,当前编码帧的全部编码块经过上述编码过程后,形成编码帧的编码码流中的一部分。此外,帧内预测203中产生的控制和参考数据也经过熵编码210编码,形成编码码流中的一部分。When the intra-frame prediction mode is selected, the process of intra-frame prediction 203 includes obtaining the reconstructed block of the coded adjacent blocks around the current coding block as a reference block, and using the prediction mode method to calculate the prediction value based on the pixel value of the reference block to generate the prediction block. , the corresponding pixel values of the current coding block and the prediction block are subtracted to obtain the residual of the current coding block. The residual of the current coding block is transformed 204 , quantized 205 and entropy encoded 210 to form the code stream of the current coding block. Further, after all the coded blocks of the current coded frame are subjected to the above coding process, a part of the coded code stream of the coded frame is formed. In addition, the control and reference data generated in the intra prediction 203 are also encoded by entropy encoding 210 to form part of the encoded code stream.
具体地,变换204用于去除图像块的残差的相关性,以便提高编码效率。对于当前编码块残差数据的变换通常采用二维离散余弦变换(Discrete Cosine Transform,DCT)变换和二维离散正弦变换(Discrete Sine Transform,DST)变换,例如在编码端将编码块的残差信息分别与一个N×M的变换矩阵及其转置矩阵相乘,相乘之后得到当前编码块的变换系数。Specifically, the transform 204 is used to de-correlate the residuals of image blocks in order to improve coding efficiency. For the transformation of the residual data of the current coding block, two-dimensional discrete cosine transform (Discrete Cosine Transform, DCT) transform and two-dimensional discrete sine transform (Discrete Sine Transform, DST) transform are usually used. Multiply with an N×M transformation matrix and its transposed matrix respectively, and obtain the transformation coefficient of the current coding block after multiplication.
在产生变换系数之后用量化205进一步提高压缩效率,变换系数经量化可以得到量化后的系数,然后将量化后的系数进行熵编码210得到当前编码块的残差码流,其中,熵编码方法包括但不限于内容自适应二进制算术编码(Context Adaptive Binary Arithmetic Coding,CABAC)熵编码。最后将熵编码得到的比特流及进行编码后的编码模式信息进行存储或发送到解码端。在编码端,还会对量化的结果进行反量化206,对反量化结果进行反变换207。在反变换207之后,利用反变换结果以及运动补偿结果,得到重建像素。之后,对重建像素进行滤波(即环路滤波)211。在211之后,输出滤波后的重建图像(属于重建视频帧)。后续,重建图像可以作为其他帧图像的参考帧图像进行帧间预测。本申请实施例中,重建图像又可称为重建后的图像或重构图像。After the transform coefficients are generated, quantization 205 is used to further improve the compression efficiency. The transform coefficients can be quantized to obtain quantized coefficients, and then the quantized coefficients are entropy encoded 210 to obtain the residual code stream of the current encoding block. The entropy encoding method includes: But not limited to content adaptive binary arithmetic coding (Context Adaptive Binary Arithmetic Coding, CABAC) entropy coding. Finally, the bit stream obtained by entropy encoding and the encoded encoding mode information are stored or sent to the decoding end. At the encoding end, inverse quantization 206 is also performed on the quantized result, and inverse transformation 207 is performed on the inverse quantization result. After the inverse transformation 207, the reconstructed pixels are obtained using the inverse transformation result and the motion compensation result. Afterwards, the reconstructed pixels are filtered (ie loop filtered) 211. After 211, the filtered reconstructed image (belonging to the reconstructed video frame) is output. Subsequently, the reconstructed image can be used as a reference frame image of other frame images for inter-frame prediction. In this embodiment of the present application, the reconstructed image may also be referred to as a reconstructed image or a reconstructed image.
具体地,帧内预测203过程中的已编码相邻块为:当前编码块编码之前,已进行编码的相邻块,该相邻块的编码过程中产生的残差经过变换204、量化205、反量化206、和反变换207后,与该相邻块的预测块相加得到的重建块。对应的,反量化206和反变换207为量化206和变换204的逆过程,用于恢复量化和变换前的残差数据。Specifically, the coded adjacent blocks in the process of intra-frame prediction 203 are: adjacent blocks that have been coded before the current coded block is coded, and the residuals generated in the coding process of the adjacent blocks are transformed 204, quantized 205, After inverse quantization 206 and inverse transform 207, the reconstructed block is obtained by adding the prediction block of the adjacent block. Correspondingly, inverse quantization 206 and inverse transform 207 are inverse processes of quantization 206 and transform 204, and are used to restore residual data before quantization and transform.
如图2所示,当选择帧间预测模式时,帧间预测过程包括运动估计 (Motion Estimation,ME)208和运动补偿(Motion Compensation,MC)209。具体地,编码端可以根据重建视频帧中的参考帧图像进行运动估计208,在一张或多张参考帧图像中根据一定的匹配准则搜索到与当前编码块最相似的图像块作为预测块,该预测块与当前编码块的相对位移即为当前编码块的运动矢量(Motion Vector,MV)。并将该编码块像素的原始值与对应的预测块像素值相减得到编码块的残差。当前编码块的残差经过变换204、量化205以及熵编码210后形成编码帧的编码码流中的一部分。对于解码端来说,可以基于上述确定的运动矢量和预测块进行运动补偿209,获得当前编码块。As shown in FIG. 2 , when the inter prediction mode is selected, the inter prediction process includes motion estimation (Motion Estimation, ME) 208 and motion compensation (Motion Compensation, MC) 209. Specifically, the encoder can perform motion estimation 208 according to the reference frame image in the reconstructed video frame, and search for the image block most similar to the current encoding block in one or more reference frame images as the prediction block according to certain matching criteria, The relative displacement between the prediction block and the current coding block is the motion vector (Motion Vector, MV) of the current coding block. The original value of the pixel of the coding block is subtracted from the pixel value of the corresponding prediction block to obtain the residual of the coding block. The residual of the current coded block is transformed 204, quantized 205 and entropy coded 210 to form a part of the coded code stream of the coded frame. For the decoding end, motion compensation 209 may be performed based on the motion vector and prediction block determined above to obtain the current coding block.
其中,如图2所示,重建视频帧为经过滤波211之后得到视频帧。重建视频帧包括一个或多个重建后的图像。滤波211用于减少编码过程中产生的块效应和振铃效应等压缩失真,重建视频帧在编码过程中用于为帧间预测提供参考帧,在解码过程中,重建视频帧经过后处理后输出为最终的解码视频。Wherein, as shown in FIG. 2 , the reconstructed video frame is a video frame obtained after filtering 211 . The reconstructed video frame includes one or more reconstructed images. Filtering 211 is used to reduce compression distortions such as blocking and ringing effects during the encoding process. The reconstructed video frame is used to provide reference frames for inter-frame prediction during the encoding process. During the decoding process, the reconstructed video frame is post-processed and output. for the final decoded video.
具体地,帧间预测模式可以包括高级运动矢量预测(Advanced Motion Vector Prediction,AMVP)模式、合并(Merge)模式或跳过(skip)模式。Specifically, the inter prediction mode may include an advanced motion vector prediction (Advanced Motion Vector Prediction, AMVP) mode, a merge (Merge) mode, or a skip (skip) mode.
对于AMVP模式而言,可以先确定运动矢量预测(Motion Vector Prediction,MVP),在得到MVP之后,可以根据MVP确定运动估计的起始点,在起始点附近,进行运动搜索,搜索完毕之后得到最优的MV,由MV确定参考块在参考图像中的位置,参考块减去当前块得到残差块,MV减去MVP得到运动矢量差值(Motion Vector Difference,MVD),并将该MVD和MVP的索引通过码流传输给解码端。For the AMVP mode, the motion vector prediction (MVP) can be determined first. After the MVP is obtained, the starting point of the motion estimation can be determined according to the MVP, and a motion search can be performed near the starting point. After the search is completed, the optimal MV, the position of the reference block in the reference image is determined by the MV, the reference block is subtracted from the current block to obtain the residual block, the MV is subtracted from the MVP to obtain the Motion Vector Difference (MVD), and the difference between the MVD and the MVP is obtained. The index is transmitted to the decoder through the code stream.
对于Merge模式而言,可以先确定MVP,并直接将MVP确定为当前块的MV。其中,为了得到MVP,可以先构建一个MVP候选列表(merge candidate list),在MVP候选列表中,可以包括至少一个候选MVP,每个候选MVP可以对应有一个索引,编码端在从MVP候选列表中选择MVP之后,可以将该MVP索引写入到码流中,则解码端可以按照该索引从MVP候选列表中找到该索引对应的MVP,以实现对图像块的解码。For the Merge mode, the MVP can be determined first, and the MVP can be directly determined as the MV of the current block. Among them, in order to obtain the MVP, a MVP candidate list (merge candidate list) can be constructed first. In the MVP candidate list, at least one candidate MVP can be included, and each candidate MVP can have an index corresponding to the MVP candidate list. After the MVP is selected, the MVP index can be written into the code stream, and the decoder can find the MVP corresponding to the index from the MVP candidate list according to the index, so as to decode the image block.
应理解,以上过程只是Merge模式的一种具体实现方式。Merge模式还可以具有其他的实现方式。It should be understood that the above process is only a specific implementation manner of the Merge mode. The Merge pattern can also have other implementations.
例如,Skip模式是Merge模式的一种特例。按照Merge模式得到MV之后,如果编码端确定当前块和参考块基本一样,那么不需要传输残差数据,只需要传递MVP的索引,以及进一步地可以传递一个标志,该标志可以表 明当前块可以直接从参考块得到。For example, Skip mode is a special case of Merge mode. After the MV is obtained according to the Merge mode, if the encoder determines that the current block is basically the same as the reference block, it does not need to transmit the residual data, only the index of the MVP needs to be passed, and further a flag can be passed, which can indicate that the current block can be directly Obtained from the reference block.
也就是说,Merge模式特点为:MV=MVP(MVD=0);而Skip模式还多一个特点,即:重构值rec=预测值pred(残差值resi=0)。That is to say, the Merge mode is characterized by: MV=MVP (MVD=0); and the Skip mode has one more feature, namely: the reconstruction value rec=prediction value pred (residual value resi=0).
Merge模式可以应用于几何预测技术中。在几何预测技术中,可以将待编码的图像块划分为多个形状为多边形的子图像块,可以从运动信息候选列表中,分别为每个子图像块确定运动矢量,并基于每个子图像块的运动矢量,确定每个子图像块对应的预测子块,基于每个子图像块对应的预测子块,构造当前图像块的预测块,从而实现对当前图像块的编码。Merge mode can be applied to geometric prediction techniques. In the geometric prediction technology, the image block to be encoded can be divided into a plurality of sub-image blocks in the shape of a polygon, and a motion vector can be determined for each sub-image block from the motion information candidate list, and based on the The motion vector determines the prediction sub-block corresponding to each sub-image block, and constructs the prediction block of the current image block based on the prediction sub-block corresponding to each sub-image block, so as to realize the encoding of the current image block.
由于分块进行预测和变换量化,相邻块之间由于编码参数的不同可能导致编码重建图像出现方块效应(Blocking Artifacts),为了去除编码重建图像的方块效应,高效率视频编码(High Efficiency Video Coding,HEVC)标准在编码环路中使用了去方块滤波(Deblocking Filter,DBF)技术用于提高视频的主观质量和重建帧的参考效率。DBF技术的作用是通过修正重建编码块的像素值,尤其是编码块边界附近的像素值,从而达到消除编解码算法带来的方块效应的目的。DBF主要有两个步骤,即对块边界滤波强度的判定和对块边界像素的滤波。Due to block prediction and transform quantization, the difference in coding parameters between adjacent blocks may lead to Blocking Artifacts in the encoded reconstructed image. , HEVC) standard uses the Deblocking Filter (DBF) technology in the coding loop to improve the subjective quality of the video and the reference efficiency of the reconstructed frame. The function of the DBF technology is to eliminate the block effect caused by the encoding and decoding algorithm by correcting the pixel values of the reconstructed coding block, especially the pixel values near the boundary of the coding block. There are two main steps in DBF, namely, the determination of the filter strength of the block boundary and the filtering of the block boundary pixels.
HEVC中的DBF的滤波顺序是以CTU为基本单位,按照光栅顺序进行滤波,先进行垂直边界滤波再进行水平边界滤波。如图3所示,图中实心圆点表示像素点,图中黑线实线表示待滤波的图像块边界,较粗黑色虚线框部分表示进行滤波操作的8x8大小的处理块,每个处理块都跨越4个8x8待滤波块,包含一个“+”字形的边缘。这样一来,每个处理块的目标就是对“+”字形的边界进行滤波,并且包含了自身所需要的所有滤波数据,这就使得滤波操作可以对每个8x8处理块进行单独操作,有利于HEVC实现并行滤波操作。其中,通过DBF技术处理可以修改图像块边界左右两侧至多3个像素点的像素值来实现平滑图像块的边界。The filtering sequence of the DBF in HEVC is based on the CTU as the basic unit. As shown in Figure 3, the solid dots in the figure represent pixel points, the solid black line in the figure represents the boundary of the image block to be filtered, and the thicker black dotted box part represents the 8x8 processing block for filtering operation. Each processing block Both span 4 8x8 blocks to be filtered and contain a "+" shaped edge. In this way, the goal of each processing block is to filter the boundary of the "+" shape, and contains all the filtering data required by itself, which allows the filtering operation to perform separate operations on each 8x8 processing block, which is beneficial to HEVC implements parallel filtering operations. Among them, through the DBF technology processing, the pixel values of at most 3 pixels on the left and right sides of the image block boundary can be modified to realize the smooth image block boundary.
对于解码端,则进行与编码端相对应的操作。首先利用熵解码以及反量化和反变换得到残差信息,并根据解码码流确定当前图像块使用帧内预测还是帧间预测。如果是帧内预测,则利用当前帧中已重建图像块按照帧内预测方法构建预测信息;如果是帧间预测,则需要解析出运动信息,并使用所解析出的运动信息在已重建的图像中确定参考块,得到预测信息;接下来,再将预测信息与残差信息进行叠加,并经过滤波操作便可以得到重建信息。For the decoding end, perform operations corresponding to the encoding end. Firstly, the residual information is obtained by entropy decoding, inverse quantization and inverse transformation, and according to the decoded code stream, it is determined whether the current image block uses intra-frame prediction or inter-frame prediction. If it is intra-frame prediction, use the reconstructed image blocks in the current frame to construct prediction information according to the intra-frame prediction method; if it is inter-frame prediction, you need to parse out the motion information, and use the parsed motion information in the reconstructed image. Then, the prediction information and the residual information are superimposed, and the reconstruction information can be obtained through the filtering operation.
在实际应用中,由于对于视频分辨率和帧率的需求不断上升,单核的硬件编码器已经不能满足需求,多核的硬件编码器可以提供更高的编码性能,从而可以满足更高的分辨率和帧率的需求。多核的硬件编码器通常会将图像或视频分为多个瓦片,每个核负责其中一个或多个瓦片的编码。In practical applications, due to the rising demand for video resolution and frame rate, the single-core hardware encoder can no longer meet the demand, and the multi-core hardware encoder can provide higher encoding performance, which can meet higher resolution and frame rate requirements. A multi-core hardware encoder usually divides an image or video into multiple tiles, and each core is responsible for encoding one or more of the tiles.
应理解,本申请实施例中,通过对图像或视频划分得到的多个瓦片也可以称为图像块,本申请对此不作具体限定。It should be understood that, in this embodiment of the present application, multiple tiles obtained by dividing an image or video may also be referred to as image blocks, which are not specifically limited in the present application.
由于图像被划分到多个核中进行编码,因此在图像被划分的边界处会出现较为明显的边界,从而导致用户的观看体验降低。Since the image is divided into multiple cores for encoding, a more obvious boundary will appear at the divided boundary of the image, thereby reducing the viewing experience of the user.
针对上述问题,第一种实现方式下,可以选择在编码端和解码端均不对瓦片边界进行滤波,但是解码后的图像在瓦片边界处可能出现明显的块边界效应导致主观质量变差;第二种实现方式为,可以选择在编码端和解码端均进行瓦片边界滤波,可解决瓦片边界处的块边界效应,但是在编码端无需显示,也进行瓦片边界滤波会带来额外的数据交换和计算量,提高了编码过程的实现复杂度。In view of the above problems, in the first implementation mode, it is possible to choose not to filter the tile boundary at the encoding end and the decoding end, but the decoded image may have obvious block boundary effects at the tile boundary, resulting in poor subjective quality; The second implementation is that you can choose to perform tile boundary filtering on both the encoding end and the decoding end, which can solve the block boundary effect at the tile boundary, but it does not need to be displayed at the encoding end, and performing tile boundary filtering will bring additional The amount of data exchange and calculation increases the complexity of the encoding process.
本申请提供一种视频编码和视频解码的方法,可以实现既在编码端不进行瓦片边界滤波降低编码器复杂度,又在解码端进行瓦片边界滤波使得主观质量相对不降低,解决现有技术在编码端和解码端同时进行滤波存在的缺陷和不足,同时可以保证编码端重建图像与解码端解码图像用作参考帧时的作用与效果完全一致,进一步地,因为在解码端进行了滤波操作可以减少潜在的解码图像瓦片边界块效应提高用户的观看体验。The present application provides a method for video encoding and video decoding, which can reduce the complexity of the encoder without performing tile boundary filtering at the encoding end, and perform tile boundary filtering at the decoding end so that the subjective quality is relatively not reduced, solving the problem of existing At the same time, it can ensure that the reconstructed image at the encoding end and the decoded image at the decoding end have the same function and effect as the reference frame. Further, because the filtering is performed at the decoding end. The operation can reduce the potential block effect of decoded image tile boundary and improve the user's viewing experience.
下面将结合图4详细描述本申请实施例提供的视频编码的方法400。The video coding method 400 provided by this embodiment of the present application will be described in detail below with reference to FIG. 4 .
如图4所示为本申请一实施例提供的视频编码的方法400,该方法可由编码端执行,该方法400可以包括步骤410-420。FIG. 4 shows a video coding method 400 provided by an embodiment of the present application. The method may be executed by an encoder, and the method 400 may include steps 410-420.
410,若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上,对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部,从而使得当在编码端不进行瓦片边界滤波而在解码端进行瓦片边界滤波时,所述编码端进行编码时所参考的预测块的像素值和所述解码端进行解码时所参考的预测块的像素值能够保持一致,所述当前图像块位于当前帧。410. If the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, adjust the position of the prediction block, so that the prediction block is located inside the tile of the reference frame, thereby so that when tile boundary filtering is not performed at the encoding end and tile boundary filtering is performed at the decoding end, the pixel value of the prediction block referenced by the encoding end in encoding and the prediction block referenced by the decoding end in decoding The pixel values of , can be kept consistent, and the current image block is located in the current frame.
若不执行步骤410,当在编码端不进行瓦片边界滤波,而在解码端进行瓦片边界滤波,在所述预测块位于瓦片边界上时,编码端进行编码时所参考 的预测块和解码端进行解码时所参考的预测块会不一致,从而会导致解码误差。If step 410 is not performed, when tile boundary filtering is not performed at the encoding end, and tile boundary filtering is performed at the decoding end, when the prediction block is located on the tile boundary, the prediction block and When the decoding end performs decoding, the referenced prediction blocks will be inconsistent, which will lead to decoding errors.
而在本发明实施例中,由于经过位置调整后的预测块位于所述参考帧的瓦片内部,则在编码端不进行瓦片边界滤波而在解码端进行瓦片边界滤波时,编码端进行编码时所参考的(经过位置调整后的)预测块位于参考帧各瓦片的内部,再者因为解码时的预测块位置信息与编码端预测块位置信息完全相同,所以解码端进行解码时所参考的预测块也位于参考帧各瓦片的内部,与边界无关,从而保证两者的一致性,避免编码端不进行瓦片边界滤波而在解码端进行瓦片边界滤波导致的解码误差。另外,在本发明实施例中,无需在编码端进行瓦片边界滤波,减少在编码端的数据交换以及滤波的计算量,同时在解码端进行瓦片边界滤波,也避免图像在瓦片边界产生块边界效应而导致画质变差。However, in the embodiment of the present invention, since the position-adjusted prediction block is located inside the tile of the reference frame, when tile boundary filtering is not performed at the encoding end and tile boundary filtering is performed at the decoding end, the encoding end performs the tile boundary filtering. The referenced (position-adjusted) prediction block during encoding is located inside each tile of the reference frame, and because the position information of the prediction block during decoding is exactly the same as the position information of the prediction block at the encoding end, the decoding end uses the same information when decoding. The reference prediction block is also located inside each tile of the reference frame and has nothing to do with the boundary, so as to ensure the consistency of the two, and avoid decoding errors caused by tile boundary filtering at the decoding end without performing tile boundary filtering at the encoding end. In addition, in this embodiment of the present invention, it is not necessary to perform tile boundary filtering at the encoding end, thereby reducing the amount of data exchange and filtering at the encoding end. At the same time, tile boundary filtering is performed at the decoding end, which also prevents the image from generating blocks at the tile boundary. Deterioration of image quality due to boundary effects.
需要说明的是,所述预测块位于所述参考帧的瓦片内部包括所述预测块与所述参考帧的瓦片边界需要滤波的区域不重合。另外,对预测块位置的调整可通过调整运动矢量来实现。It should be noted that the fact that the prediction block is located inside the tile of the reference frame includes that the prediction block does not overlap with the region that needs to be filtered at the tile boundary of the reference frame. In addition, the adjustment of the prediction block position can be achieved by adjusting the motion vector.
本申请实施例中的预测块可以是多个参考块中的其中一个或多个参考块,该参考块位于参考帧,其中,该参考帧可以是当前帧的前一帧和/或后一帧,也可以是当前帧的前几帧和/或后几帧,还可以是固定帧,本申请对此不作具体限制。The prediction block in this embodiment of the present application may be one or more reference blocks among multiple reference blocks, and the reference block is located in a reference frame, where the reference frame may be the previous frame and/or the next frame of the current frame , or may be the first few frames and/or the next few frames of the current frame, or may be a fixed frame, which is not specifically limited in this application.
本申请实施例中,划分后的参考帧包括的多个瓦片的大小可以相同,即在对参考帧进行划分的时候,可以从参考帧的中心进行垂直或水平划分;划分后的参考帧包括的多个瓦片的大小也可以不同,即在对参考帧进行划分的时候,可以不从参考帧的中心进行垂直或水平划分。In the embodiment of the present application, the size of the multiple tiles included in the divided reference frame may be the same, that is, when the reference frame is divided, vertical or horizontal division may be performed from the center of the reference frame; the divided reference frame includes The sizes of the plurality of tiles may also be different, that is, when the reference frame is divided, it may not be divided vertically or horizontally from the center of the reference frame.
例如,如图5a所示,为本申请一实施例提供的一种对待编码视频中的某一帧(可以为本申请中的参考帧)图像的划分的示意性图。可以通过对参考帧进行水平划分得到两个瓦片,分别为瓦片1和瓦片2,每一个瓦片呈矩形。For example, as shown in FIG. 5a, an embodiment of the present application provides a schematic diagram of image division of a certain frame (which may be a reference frame in the present application) in the video to be encoded. Two tiles can be obtained by horizontally dividing the reference frame, namely tile 1 and tile 2, and each tile is rectangular.
其中,每一个瓦片可以包括整数个CTU,在编码时,可以利用不同的处理器分别对瓦片1和瓦片2进行编码。Wherein, each tile may include an integer number of CTUs, and during encoding, different processors may be used to encode tile 1 and tile 2 respectively.
如图5b所示,为本申请另一实施例提供的一种对待编码视频中的某一帧(可以为本申请中的参考帧)图像的划分的示意性图。可以通过对参考帧 进行垂直划分得到两个瓦片,分别为瓦片3和瓦片4,每一个瓦片呈矩形。As shown in FIG. 5b , it is a schematic diagram of image division of a certain frame (which may be a reference frame in this application) in a video to be encoded according to another embodiment of the present application. Two tiles can be obtained by dividing the reference frame vertically, namely tile 3 and tile 4, and each tile is rectangular.
类似地,每一个瓦片可以包括整数个CTU,在编码时,可以利用不同的处理器分别对瓦片3和瓦片4进行编码。Similarly, each tile may include an integer number of CTUs, and during encoding, tile 3 and tile 4 may be encoded separately by different processors.
如图5c所示,为为本申请又一实施例提供的一种对待编码视频中的某一帧(可以为本申请中的参考帧)图像的划分的示意性图。可以通过对参考帧进行垂直和水平划分得到四个瓦片,分别为瓦片5、瓦片6、瓦片7和瓦片8,每一个瓦片呈矩形。As shown in FIG. 5c , it is a schematic diagram of image division of a certain frame (which may be a reference frame in this application) in a video to be encoded according to another embodiment of the present application. Four tiles can be obtained by dividing the reference frame vertically and horizontally, namely tile 5, tile 6, tile 7 and tile 8, and each tile is rectangular.
类似地,每一个瓦片可以包括整数个CTU,在编码时,可以利用不同的处理器分别对瓦片5、瓦片6、瓦片7和瓦片8进行编码。Similarly, each tile may include an integer number of CTUs, and when encoding, tile 5, tile 6, tile 7, and tile 8 may be encoded by different processors, respectively.
应理解,本申请实施例中的水平划分可以是指从水平方向对图像进行的划分,垂直划分可以是指从垂直方向对图像进行的划分。It should be understood that the horizontal division in this embodiment of the present application may refer to the division of the image from the horizontal direction, and the vertical division may refer to the division of the image from the vertical direction.
本申请实施例中,若确定的当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上,则可以对预测块的位置进行调整,即可以将所述预测块向某一个方向偏移,以使得移动后的预测块位于参考帧的瓦片内部。In the embodiment of the present application, if the predicted block pointed to by the determined motion vector of the current image block is located on the tile boundary of the reference frame, the position of the predicted block can be adjusted, that is, the predicted block can be moved in a certain direction Offset so that the moved prediction block is inside the tile of the reference frame.
420,基于调整后的所述预测块,对所述当前图像块进行编码。420. Based on the adjusted prediction block, encode the current image block.
本申请实施例提供的视频编码的方法,若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界时,可以将预测块的位置调整至瓦片内部,从而基于调整后的预测块对当前图像块进行编码。由于通过将当前图像块的运动矢量所指向的预测块调整至瓦片内部,使得前述预测块的所有像素均不在需要滤波的瓦片边界滤波区域内,可以实现编码端不进行瓦片边界滤波而解码端进行瓦片边界滤波,且不引入由于“编码端不进行瓦片边界滤波而解码端进行瓦片边界滤波”使得编码端的预测块和解码端的预测块不一致进而导致的解码误差,从而可以进一步降低编码器的复杂度。In the video coding method provided by the embodiment of the present application, if the prediction block pointed to by the motion vector of the current image block is located at the tile boundary of the reference frame, the position of the prediction block can be adjusted to the inside of the tile, so that the prediction based on the adjusted prediction block encodes the current image block. Since the prediction block pointed to by the motion vector of the current image block is adjusted to the interior of the tile, all the pixels of the foregoing prediction block are not in the tile boundary filtering area that needs to be filtered, and the coding end can realize that the tile boundary filtering is not performed without the tile boundary filtering. The decoding end performs tile boundary filtering, and does not introduce decoding errors caused by "the encoding end does not perform tile boundary filtering, but the decoding end performs tile boundary filtering", which makes the prediction block of the encoding end inconsistent with the prediction block of the decoding end. Reduce the complexity of the encoder.
可选地,在一些实施例中,所述方法还包括:在对所述当前图像块进行编码的过程中,使能所述瓦片边界滤波。Optionally, in some embodiments, the method further includes enabling the tile boundary filtering during encoding of the current image block.
可选地,在一些实施例中,所述使能所述瓦片边界滤波,包括:将码流数据中的瓦片边界滤波使能标志位置为1;其中,所述瓦片边界滤波使能标志位位于所述码流数据的图片数据集、序列参数集、条带头、图像头或序列头中。Optionally, in some embodiments, the enabling the tile boundary filtering includes: setting the tile boundary filtering enable flag in the bitstream data to 1; wherein the tile boundary filtering is enabled The flag bit is located in the picture data set, sequence parameter set, slice header, image header or sequence header of the code stream data.
在本实施例中,使能瓦片边界滤波,即将码流数据中的瓦片边界滤波使能标志位loop_filter_across_tiles_enabled_flag置为1。其中,所述瓦片边界滤 波使能标志位loop_filter_across_tiles_enabled_flag位于码流数据中的图片参数集(Picture Parameter Set,PPS)、序列参数集(Sequence Paramater Set,SPS)、条带头、图像头或序列头中或其他头部数据中。本发明实施例可以实现既将loop_filter_across_tiles_enabled_flag置为1,但在编码端不进行瓦片边界滤波降低编码器复杂度,又在解码端进行瓦片边界滤波使得主观质量相对不降低,解决现有技术在编码端和解码端同时进行滤波存在的缺陷和不足,同时可以保证编码端重建图像与解码端解码图像用作参考帧时的作用与效果完全一致,进一步地,因为在解码端进行了滤波操作可以减少潜在的解码图像瓦片边界块效应提高用户的观看体验。In this embodiment, the tile boundary filtering is enabled, that is, the tile boundary filtering enable flag bit loop_filter_across_tiles_enabled_flag in the code stream data is set to 1. Wherein, the tile boundary filtering enable flag bit loop_filter_across_tiles_enabled_flag is located in the picture parameter set (Picture Parameter Set, PPS), sequence parameter set (Sequence Parameter Set, SPS), slice header, image header or sequence header in the code stream data or other header data. The embodiment of the present invention can realize that not only the loop_filter_across_tiles_enabled_flag is set to 1, but tile boundary filtering is not performed at the encoding end to reduce the complexity of the encoder, and tile boundary filtering is performed at the decoding end so that the subjective quality is relatively not degraded. The defects and deficiencies of simultaneous filtering at the encoding end and the decoding end can ensure that the reconstructed image at the encoding end and the decoded image at the decoding end have the same function and effect as the reference frame. Reduces potential decoded image tile boundary blocking to improve user viewing experience.
相应的,对于解码端来说,解码端可以基于上述编码过程进行解码。Correspondingly, for the decoding end, the decoding end may perform decoding based on the foregoing encoding process.
如图6所示为本申请一实施例提供的视频编码的方法600,该方法600可以包括步骤610-620。FIG. 6 shows a video coding method 600 provided by an embodiment of the present application, and the method 600 may include steps 610-620.
610,确定当前图像块的运动矢量所指向的预测块位于参考帧的瓦片内部,所述当前图像块位于当前帧。610. Determine that the prediction block pointed to by the motion vector of the current image block is located inside the tile of the reference frame, and the current image block is located in the current frame.
可以理解的是,由于编码端在进行编码的过程中,将当前图像块的运动矢量所指向的预测块的位置调整至瓦片内部,基于调整后的预测块进行编码。相应的,解码端在进行解码的过程中,当前图像块的运动矢量所指向的预测块是调整后的预测块,即该预测块位于瓦片内部。It can be understood that, in the process of encoding, the encoding end adjusts the position of the prediction block pointed to by the motion vector of the current image block to the interior of the tile, and performs encoding based on the adjusted prediction block. Correspondingly, during the decoding process at the decoding end, the prediction block pointed to by the motion vector of the current image block is the adjusted prediction block, that is, the prediction block is located inside the tile.
需要说明的是,预测块位于参考帧的瓦片内部可以是指预测块不位于瓦片的边界上,即不位于下文中提到的第一区域。换句话说,预测块不位于下文中提到的第一区域即可理解为预测块位于参考帧的瓦片内部。It should be noted that the fact that the prediction block is located inside the tile of the reference frame may mean that the prediction block is not located on the boundary of the tile, that is, not located in the first area mentioned below. In other words, if the prediction block is not located in the first area mentioned below, it can be understood that the prediction block is located inside the tile of the reference frame.
620,基于所述预测块,对所述当前图像块进行解码。620. Based on the prediction block, decode the current image block.
应理解,上述步骤610是可选步骤,换句话说,解码端可以不用确定当前图像块的运动矢量所指向的预测块位于参考帧的瓦片内部,可以基于预测块,对当前图像块直接进行解码。It should be understood that the above step 610 is an optional step, in other words, the decoding end may not determine that the prediction block pointed to by the motion vector of the current image block is located inside the tile of the reference frame, and may directly perform the current image block based on the prediction block. decoding.
本申请实施例提供的视频解码的方法,解码端可以确定当前图像块的运动矢量所指向的预测块位于参考帧的瓦片内部,从而基于该预测块对当前图像块进行解码。从而使得编码端在编码时不进行边界滤波,解码端在进行解码的过程中,可以进行瓦片边界滤波,使得主观质量相对不降低,同时可以保证解码端解码图像和编码端重建图像保持完全一致,进一步地,可以提高用户的观看体验。In the video decoding method provided by the embodiment of the present application, the decoding end may determine that the prediction block pointed to by the motion vector of the current image block is located inside the tile of the reference frame, so as to decode the current image block based on the prediction block. Therefore, the encoder does not perform boundary filtering during encoding, and the decoder can perform tile boundary filtering during the decoding process, so that the subjective quality is relatively not degraded, and at the same time, it can ensure that the decoded image at the decoding end and the reconstructed image at the encoding end are completely consistent. , and further, the viewing experience of the user can be improved.
为了便于理解本申请的方案,下文将结合图7介绍本申请实施例提供的视频编码的方法。In order to facilitate the understanding of the solution of the present application, the video coding method provided by the embodiment of the present application will be described below with reference to FIG. 7 .
如图7所示,为本申请另一实施例提供的一种视频编码框架2示意图。其中,该视频编码框架示意图中增加了一个瓦片边界信息划分212。具体地,编码端可以根据重建视频帧中的参考帧图像进行运动估计208,在一张或多张参考帧图像中根据一定的匹配准则搜索到与当前编码块最相似的图像块作为预测块,该预测块与当前编码块的相对位移即为当前编码块的运动矢量。若根据瓦片边界信息划分判断获得的预测块位于瓦片边界上,可以将该预测块的位置调整至瓦片内部,并将该编码块像素的原始值与对应的预测块像素值相减得到编码块的残差。当前编码块的残差经过变换204、量化205以及熵编码210后形成编码帧的编码码流中的一部分。对于解码端来说,可以基于上述确定的运动矢量和预测块进行运动补偿209,从而获得当前块。As shown in FIG. 7 , a schematic diagram of a video coding framework 2 provided by another embodiment of the present application is shown. Wherein, a tile boundary information division 212 is added to the schematic diagram of the video coding framework. Specifically, the encoder can perform motion estimation 208 according to the reference frame image in the reconstructed video frame, and search for the image block most similar to the current encoding block in one or more reference frame images as the prediction block according to certain matching criteria, The relative displacement between the prediction block and the current coding block is the motion vector of the current coding block. If the predicted block obtained by dividing and judging according to the tile boundary information is located on the tile boundary, the position of the predicted block can be adjusted to the inside of the tile, and the original value of the pixel of the encoding block can be subtracted from the corresponding pixel value of the predicted block to obtain Residuals of encoded blocks. The residual of the current coded block is transformed 204, quantized 205 and entropy coded 210 to form a part of the coded code stream of the coded frame. For the decoding end, motion compensation 209 may be performed based on the above determined motion vector and the prediction block, so as to obtain the current block.
其中,对编码帧进行划分202处理,可以是指对编码帧进行瓦片划分处理,并将划分后的瓦片边界信息发送至帧间预测模块,以便于帧间预测模块在进行运动估计208和运动补偿209的时候进行判断并执行相应操作。The dividing 202 processing on the encoded frame may refer to performing tile division processing on the encoded frame, and sending the divided tile boundary information to the inter-frame prediction module, so that the inter-frame prediction module can perform motion estimation 208 and When the motion compensation 209 is performed, a judgment is made and corresponding operations are performed.
划分后的瓦片边界信息可以包括:瓦片i_x_起始、瓦片i_x_结束、瓦片i_y_起始、瓦片i_y_结束。其中,瓦片i_x_起始表示第i个瓦片在水平方向的起始坐标,瓦片i_x_结束表示第i个瓦片在水平方向的结束坐标,瓦片i_y_起始表示第i个瓦片在垂直方向的起始坐标,瓦片i_y_结束表示第i个瓦片在垂直方向的结束坐标。The divided tile boundary information may include: tile i_x_start, tile i_x_end, tile i_y_start, and tile i_y_end. Among them, tile i_x_start represents the start coordinate of the ith tile in the horizontal direction, tile i_x_end represents the end coordinate of the ith tile in the horizontal direction, and tile i_y_start represents the ith tile The starting coordinate of the tile in the vertical direction, and the end of tile i_y_ indicates the ending coordinate of the ith tile in the vertical direction.
如图8所示,为本申请实施例提供的对待编码视频划分后所包括的信息的示意性图。图8中所示的是对参考帧进行垂直划分得到两个瓦片,分别为瓦片0和瓦片1。以瓦片1为例,瓦片1_x_起始表示瓦片1在水平方向的起始坐标,瓦片1_x_结束表示瓦片1在水平方向的结束坐标,瓦片1_y_起始表示瓦片1在垂直方向的起始坐标,瓦片1_y_结束表示瓦片1在垂直方向的结束坐标。As shown in FIG. 8 , it is a schematic diagram of information included after the video to be encoded is divided according to an embodiment of the present application. As shown in FIG. 8, the reference frame is divided vertically to obtain two tiles, namely tile 0 and tile 1. Take tile 1 as an example, tile 1_x_start represents the start coordinate of tile 1 in the horizontal direction, tile 1_x_end represents the end coordinate of tile 1 in the horizontal direction, tile 1_y_start represents the tile 1 is the start coordinate in the vertical direction, and tile 1_y_end indicates the end coordinate of tile 1 in the vertical direction.
上文指出,在确定当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上时,可以对预测块的位置进行调整。其中,调整的方式可以包括多种方式,具体详见下文。It is pointed out above that when it is determined that the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, the position of the prediction block can be adjusted. Wherein, the adjustment manner may include various manners, and details are detailed below.
可选地,在一些实施例中,所述对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部,包括:基于预设规则对所述预测块 的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部。Optionally, in some embodiments, the adjusting the position of the prediction block so that the prediction block is located inside the tile of the reference frame includes: adjusting the position of the prediction block based on a preset rule. The position is adjusted so that the prediction block is inside the tile of the reference frame.
可选地,在一些实施例中,所述预设规则包括:将所述预测块按照以下方式中的至少一种方式进行调整:Optionally, in some embodiments, the preset rule includes: adjusting the prediction block in at least one of the following manners:
将所述预测块向左上方移动;moving the prediction block to the upper left;
将所述预测块向左侧移动;moving the prediction block to the left;
将所述预测块向下方移动;moving the prediction block downward;
将所述预测块向右下方移动;moving the prediction block to the lower right;
将所述预测块向右侧移动;moving the prediction block to the right;
将所述预测块向右上方移动;以及moving the prediction block to the upper right; and
将所述预测块向计算得到的最接近的区域移动。The predicted block is moved towards the calculated closest area.
本申请实施例中,如图9a所示,为本申请实施例提供的一种帧间预测的示意图。可以通过对参考帧进行水平划分得到两个瓦片,分别为瓦片1和瓦片2。从图9a中可以看出,当前图像块的预测块位于参考帧的瓦片边界上,可以将该预测块的位置向上方移动,以将该预测块调整至瓦片1的内部,如图9a中虚线所示。In the embodiment of the present application, as shown in FIG. 9a , it is a schematic diagram of an inter-frame prediction provided by the embodiment of the present application. Two tiles can be obtained by horizontally dividing the reference frame, namely tile 1 and tile 2. As can be seen from Figure 9a, the prediction block of the current image block is located on the tile boundary of the reference frame, and the position of the prediction block can be moved upward to adjust the prediction block to the interior of tile 1, as shown in Figure 9a Shown in dashed line.
如图9b所示,为本申请另一实施例提供的一种帧间预测的示意图。可以通过对参考帧进行垂直划分得到两个瓦片,分别为瓦片3和瓦片4。从图9b中可以看出,当前图像块的预测块位于参考帧的瓦片边界上,可以将该预测块的位置向左侧移动,以将该预测块调整至瓦片3的内部,如图9b中虚线所示。As shown in FIG. 9b , it is a schematic diagram of an inter-frame prediction according to another embodiment of the present application. Two tiles can be obtained by vertically dividing the reference frame, namely tile 3 and tile 4. As can be seen from Figure 9b, the prediction block of the current image block is located on the tile boundary of the reference frame, and the position of the prediction block can be moved to the left to adjust the prediction block to the interior of tile 3, as shown in the figure Shown in dashed line in 9b.
如图9c所示,为本申请另一实施例提供的一种帧间预测的示意图。可以通过对参考帧进行垂直和水平划分得到四个瓦片,分别为瓦片5、瓦片6、瓦片7和瓦片8。从图9c中可以看出,当前图像块的预测块位于参考帧的瓦片边界上,可以将该预测块的位置向左上方移动,以将该预测块调整至瓦片5的内部,如图9c中虚线所示。As shown in FIG. 9c , it is a schematic diagram of an inter-frame prediction according to another embodiment of the present application. Four tiles can be obtained by dividing the reference frame vertically and horizontally, namely tile 5, tile 6, tile 7 and tile 8. As can be seen from Figure 9c, the prediction block of the current image block is located on the tile boundary of the reference frame, and the position of the prediction block can be moved to the upper left to adjust the prediction block to the interior of tile 5, as shown in the figure Shown in dashed line in 9c.
类似地,对于其它可能的方式与上述类似,为了简洁,这里不再赘述。Similarly, other possible manners are similar to those described above, and are not repeated here for brevity.
需要特别说明的是,本申请实施中的将所述预测块向计算得到的最接近的区域移动可以理解为:将所述预测块向其中所述预测块的大部分块所位于的区域移动。参考图9c,当前图像块的预测块位于参考帧的瓦片边界上,该预测块的大部分块位于瓦片5中,因此,可以将该预测块向瓦片5的区域移动,以使得该预测块调整至瓦片5中。It should be noted that, in the implementation of this application, moving the prediction block to the closest area calculated can be understood as moving the prediction block to the area where most of the prediction blocks are located. Referring to Fig. 9c, the prediction block of the current image block is located on the tile boundary of the reference frame, and most of the blocks of the prediction block are located in tile 5. Therefore, the prediction block can be moved to the area of tile 5, so that the prediction block is The prediction block is adjusted into tile 5.
上文说明了若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上时,对预测块的位置进行调整的多种方式。下文将说明确定当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上的实现方式,具体请参见下文。The above describes various ways of adjusting the position of the prediction block if the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame. The implementation manner of determining that the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame will be described below. For details, please refer to the following.
本申请实施例中,可以对确定的运动矢量所指向的预测块的位置进行调整。更为优选地,若运动矢量为候选列表中的运动矢量,则可以对该运动矢量进行标记,该标记旨在标识该运动矢量在后续编码过程中不可用。In this embodiment of the present application, the position of the prediction block pointed to by the determined motion vector may be adjusted. More preferably, if the motion vector is a motion vector in the candidate list, the motion vector may be marked, and the marking is intended to identify that the motion vector is unavailable in the subsequent encoding process.
其中,候选列表可以为Skip候选列表或Merge候选列表,该候选列表可以根据每个图像块的左侧图像块、上方图像块等相邻信息生成。其中,该候选列表可以表示为:list={(mv_x1,mv_y1),(mv_x2,mv_y2)…(mv_x5,mv_y5)}。The candidate list may be a Skip candidate list or a Merge candidate list, and the candidate list may be generated according to adjacent information such as the left image block and the upper image block of each image block. Wherein, the candidate list can be expressed as: list={(mv_x1, mv_y1), (mv_x2, mv_y2)...(mv_x5, mv_y5)}.
应理解,候选列表也可以是以表格的形式或其它形式示出,不予限制。It should be understood that the candidate list may also be shown in the form of a table or other forms without limitation.
可选地,在一些实施例中,所述方法还包括:基于所述预测块的边界值与第一区域的边界值,判断所述预测块是否位于所述参考帧的瓦片边界上,所述第一区域为所述瓦片边界受滤波影响的区域。Optionally, in some embodiments, the method further includes: based on the boundary value of the prediction block and the boundary value of the first region, judging whether the prediction block is located on the tile boundary of the reference frame, the The first area is an area of the tile boundary affected by filtering.
如图10a所示,为本申请实施例提供的一种划分的瓦片边界受滤波影响的区域的示意图。参考图10a,通过对参考帧进行水平划分可以得到两个瓦片,分别为瓦片1和瓦片2,其中,参考帧的中间较粗的黑色实线为瓦片划分边界线,上下两条虚线与参考帧的左边界和右边界所形成的区域可以为本申请实施例中的第一区域。As shown in FIG. 10a, it is a schematic diagram of a partitioned area of a tile boundary affected by filtering according to an embodiment of the present application. Referring to Figure 10a, two tiles can be obtained by horizontally dividing the reference frame, namely tile 1 and tile 2, wherein the thicker black solid line in the middle of the reference frame is the tile dividing boundary line, and the upper and lower two tiles are The area formed by the dotted line and the left and right boundaries of the reference frame may be the first area in this embodiment of the present application.
本申请实施例提供的方案,通过预测块的边界值与第一区域的边界值,判断运动矢量所指向的预测块是否位于参考帧的瓦片边界上,有利于编码端确定是否对运动矢量所指向的预测块的位置进行调整。In the solution provided by the embodiment of the present application, it is judged whether the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame according to the boundary value of the prediction block and the boundary value of the first region, which is helpful for the encoder to determine whether the motion vector The position of the pointed prediction block is adjusted.
可选地,在一些实施例中,所述若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上,对所述预测块的位置进行调整,包括:若所述预测块的任意边界位于所述第一区域内,对所述预测块的位置进行调整。Optionally, in some embodiments, if the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, adjusting the position of the prediction block includes: if the prediction block An arbitrary boundary of is located in the first area, and the position of the prediction block is adjusted.
如上所述,本申请实施例中的第一区域可以为瓦片边界受滤波影响的区域。参考图10a,通过对参考帧进行水平划分可以得到两个瓦片,分别为瓦片1和瓦片2,由上下两条虚线与参考帧的左边界和右边界所形成的区域即为本申请中的的第一区域。假设当前图像块的预测块的任意边界位于第一区域内,则可以确定运动矢量所指向的预测块位于参考帧的瓦片边界上,从而 可以对预测块的位置进行调整。As described above, the first region in this embodiment of the present application may be a region where the tile boundary is affected by filtering. Referring to FIG. 10a, two tiles can be obtained by horizontally dividing the reference frame, namely tile 1 and tile 2, and the area formed by the upper and lower dashed lines and the left and right borders of the reference frame is the present application in the first area. Assuming that any boundary of the prediction block of the current image block is located in the first area, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be adjusted.
如图10a所示的,从图中可以看出,预测块1-1的下边界位于第一区域内,预测块1-2的上边界位于第一区域内,预测块2的所有边界位于第一区域内。若运动矢量所指向的预测块位于上述3个预测块中的其中一个预测块的位置,则可以确定运动矢量所指向的预测块位于参考帧的瓦片边界上,从而可以对预测块的位置进行调整。As shown in Figure 10a, it can be seen from the figure that the lower boundary of the prediction block 1-1 is located in the first area, the upper boundary of the prediction block 1-2 is located in the first area, and all the boundaries of the prediction block 2 are located in the first area. within an area. If the prediction block pointed to by the motion vector is located at the position of one of the above three prediction blocks, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be determined. adjust.
参考图10b,通过对参考帧进行垂直划分可以得到两个瓦片,分别为瓦片3和瓦片4,由左右两条虚线与参考帧的上边界和下边界所形成的区域即为本申请中的的第一区域。假设当前图像块的预测块的任意边界位于第一区域内,则可以确定运动矢量所指向的预测块位于参考帧的瓦片边界上,从而可以对预测块的位置进行调整。Referring to FIG. 10b, two tiles can be obtained by vertically dividing the reference frame, namely tile 3 and tile 4, and the area formed by the left and right dashed lines and the upper and lower boundaries of the reference frame is the present application in the first area. Assuming that any boundary of the prediction block of the current image block is located in the first area, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be adjusted.
如图10b所示的,从图中可以看出,预测块3-1的右边界位于第一区域内,预测块3-2的左边界位于第一区域内,预测块4的所有边界位于第一区域内。若运动矢量所指向的预测块位于上述3个预测块中的其中一个预测块的位置,则可以确定运动矢量所指向的预测块位于参考帧的瓦片边界上,从而可以对预测块的位置进行调整。As shown in Figure 10b, it can be seen from the figure that the right boundary of the prediction block 3-1 is located in the first area, the left boundary of the prediction block 3-2 is located in the first area, and all the boundaries of the prediction block 4 are located in the first area. within an area. If the prediction block pointed to by the motion vector is located at the position of one of the above three prediction blocks, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be determined. adjust.
参考图10c,通过对参考帧进行水平和垂直划分得到四个瓦片,分别为瓦片5、瓦片6、瓦片7和瓦片8,由图中所有的虚线与参考帧的边界形成的区域即为本申请中的第一区域。假设当前图像块的预测块的任意边界位于第一区域内,则可以确定运动矢量所指向的预测块位于参考帧的瓦片边界上,从而可以对预测块的位置进行调整。Referring to Figure 10c, four tiles are obtained by dividing the reference frame horizontally and vertically, namely tile 5, tile 6, tile 7 and tile 8, which are formed by all the dotted lines in the figure and the boundary of the reference frame. The area is the first area in this application. Assuming that any boundary of the prediction block of the current image block is located in the first area, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be adjusted.
如图10c所示的,从图中可以看出,预测块5-1的右边界和下边界位于第一区域内,预测块5-2的左边界和下边界位于第一区域内,预测块5-3的左边界位于第一区域内,预测块6的所有边界位于第一区域内。若运动矢量所指向的预测块位于上述4个预测块中的其中一个预测块的位置,则可以确定运动矢量所指向的预测块位于参考帧的瓦片边界上,从而可以对预测块的位置进行调整。As shown in Figure 10c, it can be seen from the figure that the right and lower boundaries of the prediction block 5-1 are located in the first area, the left and lower boundaries of the prediction block 5-2 are located in the first area, and the prediction block 5-2 is located in the first area. The left boundary of 5-3 is located in the first area, and all boundaries of prediction block 6 are located in the first area. If the prediction block pointed to by the motion vector is located at the position of one of the above four prediction blocks, it can be determined that the prediction block pointed to by the motion vector is located on the tile boundary of the reference frame, so that the position of the prediction block can be determined. adjust.
需要说明的是,上述预测块的位置仅为举例说明,只要预测块的任意边界位于第一区域内均可以应用本申请,不应对本申请造成特别限定。It should be noted that the positions of the above prediction blocks are only examples, and the present application can be applied as long as any boundary of the prediction blocks is located in the first area, and this application should not be particularly limited.
此外,本申请实施例中的预测块的边界值可以是指该预测块在坐标系中的数值,例如,预测块的左边界值和右边界值可以是指该预测块在坐标系中 的x值,预测块的上边界值和下边界值可以是指该预测块在坐标系中的y值。In addition, the boundary value of the prediction block in the embodiment of the present application may refer to the numerical value of the prediction block in the coordinate system, for example, the left boundary value and the right boundary value of the prediction block may refer to the x of the prediction block in the coordinate system value, the upper boundary value and the lower boundary value of the prediction block may refer to the y value of the prediction block in the coordinate system.
本申请实施例提供的方案,若运动矢量所指向的预测块的任意边界位于第一区域内,则可以将运动矢量所指向的预测块的位置调整至瓦片内部,可以实现编码端不进行瓦片边界滤波,从而可以进一步降低编码器的复杂度。In the solution provided by the embodiment of the present application, if any boundary of the prediction block pointed to by the motion vector is located in the first area, the position of the prediction block pointed to by the motion vector can be adjusted to the inside of the tile, so that the encoding end does not perform tile operation. Slice boundary filtering, which can further reduce the complexity of the encoder.
可选地,在一些实施例中,所述若所述预测块的任意边界位于所述第一区域内,对所述预测块的位置进行调整,包括:若所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的左边界值,且所述预测块在水平方向的右边界值小于或等于所述第一区域在水平方向的右边界值,对所述预测块的位置进行调整;和/或,若所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的右边界值,且所述预测块在水平方向的左边界值大于或等于所述第一区域在水平方向的左边界值,对所述预测块的位置进行调整。Optionally, in some embodiments, the adjusting the position of the prediction block if any boundary of the prediction block is located in the first area includes: if the prediction block is on the right side of the horizontal direction The boundary value is greater than or equal to the left boundary value of the first region in the horizontal direction, and the right boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the prediction and/or, if the left boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction The position of the prediction block is adjusted if it is greater than or equal to the left boundary value of the first region in the horizontal direction.
本申请实施例中的右边界和左边界所参考的坐标系可以是二维坐标系,例如,如上述图8所示出的,预测块的左上角可以位于坐标系的原点o处,以原点o为起点水平向右的方向可以为本申请中的X方向,以原点o为起点垂直向下的方向可以为本申请中的Y方向。The coordinate system referenced by the right boundary and the left boundary in this embodiment of the present application may be a two-dimensional coordinate system. For example, as shown in FIG. 8 above, the upper left corner of the prediction block may be located at the origin o of the coordinate system. o is the starting point and the horizontal direction to the right may be the X direction in the application, and the vertical downward direction with the origin o as the starting point may be the Y direction in the application.
本申请实施例中,若预测块在水平方向的右边界值大于或等于第一区域在水平方向的左边界值,且预测块在水平方向的右边界值小于或等于第一区域在水平方向的右边界值,则该预测块的位置有多种可能。一种可能是,预测块的右边界位于第一区域且预测块的左边界不位于第一区域,如图10b中的预测块3-1;另一种可能是,预测块的右边界和左边界均位于第一区域,如图10b中的预测块4。In this embodiment of the present application, if the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the right boundary value of the prediction block in the horizontal direction is less than or equal to the horizontal boundary value of the first region If the right boundary value is set, there are multiple possibilities for the location of the prediction block. One possibility is that the right boundary of the prediction block is located in the first area and the left boundary of the prediction block is not located in the first area, such as the prediction block 3-1 in Figure 10b; another possibility is that the right boundary and the left boundary of the prediction block are not located in the first area. The boundaries are all located in the first region, such as prediction block 4 in Fig. 10b.
基于上文中所描述的内容,可以理解为,若预测块在水平方向的右边界位于第一区域内,则可以对所述预测块的位置进行调整。Based on the content described above, it can be understood that if the right boundary of the prediction block in the horizontal direction is located in the first area, the position of the prediction block can be adjusted.
类似地,若预测块在水平方向的左边界值小于或等于第一区域在水平方向的右边界值,且预测块在水平方向的左边界值大于或等于第一区域在水平方向的左边界值,则该预测块的位置有多种可能。一种可能是,预测块的左边界位于第一区域且预测块的右边界不位于第一区域,如图10b中的预测块3-2;另一种可能是,预测块的左边界和右边界均位于第一区域,如图10b中的预测块4。Similarly, if the left boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction , there are multiple possibilities for the location of the prediction block. One possibility is that the left boundary of the prediction block is located in the first area and the right boundary of the prediction block is not located in the first area, such as the prediction block 3-2 in Figure 10b; another possibility is that the left boundary and right boundary of the prediction block are not located in the first area. The boundaries are all located in the first region, such as prediction block 4 in Fig. 10b.
基于上文中所描述的内容,可以理解为,若预测块在水平方向的左边界 位于第一区域内,则可以对所述预测块的位置进行调整。Based on the content described above, it can be understood that, if the left boundary of the prediction block in the horizontal direction is located in the first area, the position of the prediction block can be adjusted.
本申请实施例提供的方案,通过判断预测块的边界值与第一区域的边界值,可以确定对预测块的位置进行调整,以实现编码端不进行瓦片边界滤波,从而可以进一步降低编码器的复杂度。In the solution provided by this embodiment of the present application, by judging the boundary value of the prediction block and the boundary value of the first region, it can be determined to adjust the position of the prediction block, so that the encoding end does not perform tile boundary filtering, so that the encoder can be further reduced. complexity.
可选地,在一些实施例中,所述若所述预测块的任意边界位于所述第一区域内,对所述预测块的位置进行调整,包括:若所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的上边界值,且所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向上的下边界值,对所述预测块的位置进行调整;和/或,若所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的下边界值,且所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的上边界值,对所述预测块的位置进行调整。Optionally, in some embodiments, the adjusting the position of the prediction block if any boundary of the prediction block is located in the first area includes: if the prediction block is in the lower part of the vertical direction The boundary value is greater than or equal to the upper boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction is smaller than or equal to the lower boundary value of the first region in the vertical direction, for the The position of the prediction block is adjusted; and/or, if the upper boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, and the upper boundary value of the prediction block in the vertical direction If the value is greater than or equal to the upper boundary value of the first region in the vertical direction, the position of the prediction block is adjusted.
本申请实施例中,若预测块在垂直方向的下边界值大于或等于第一区域在垂直方向的上边界值,且预测块在垂直方向的下边界值小于或等于第一区域在垂直方向上的下边界值,则该预测块的位置有多种可能。一种可能是,预测块的下边界位于第一区域且预测块的上边界不位于第一区域,如图10a中的预测块1-1;另一种可能是,预测块的下边界和上边界均位于第一区域,如图10a中的预测块2。In this embodiment of the present application, if the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction is smaller than or equal to the vertical boundary value of the first region in the vertical direction The lower boundary value of , there are multiple possibilities for the location of the prediction block. One possibility is that the lower boundary of the prediction block is located in the first area and the upper boundary of the prediction block is not located in the first area, such as prediction block 1-1 in Figure 10a; another possibility is that the lower boundary and upper boundary of the prediction block The boundaries are all located in the first region, such as prediction block 2 in Fig. 10a.
基于上文中所描述的内容,可以理解为,若预测块在垂直方向的下边界位于第一区域内,则可以对所述预测块的位置进行调整。Based on the above description, it can be understood that if the lower boundary of the prediction block in the vertical direction is located in the first area, the position of the prediction block can be adjusted.
类似地,若预测块在垂直方向的上边界值小于或等于第一区域在垂直方向的下边界值,且预测块在垂直方向的上边界值大于或等于第一区域在垂直方向的上边界值,则该预测块的位置有多种可能。一种可能是,预测块的上边界位于第一区域且预测块的下边界不位于第一区域,如图10a中的预测块1-2;另一种可能是,预测块的上边界和下边界均位于第一区域,如图10a中的预测块2。Similarly, if the upper boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, and the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction , there are multiple possibilities for the location of the prediction block. One possibility is that the upper boundary of the prediction block is located in the first area and the lower boundary of the prediction block is not located in the first area, such as prediction blocks 1-2 in Figure 10a; another possibility is that the upper boundary and lower boundary of the prediction block are not located in the first area. The boundaries are all located in the first region, such as prediction block 2 in Fig. 10a.
基于上文中所描述的内容,可以理解为,若预测块在垂直方向的上边界位于第一区域内,则可以对所述预测块的位置进行调整。Based on the above description, it can be understood that if the upper boundary of the prediction block in the vertical direction is located in the first area, the position of the prediction block can be adjusted.
此外,如图10c所示,若对参考帧进行了水平和垂直划分得到四个瓦片,分别为瓦片5、瓦片6、瓦片7和瓦片8,由图中所有的虚线与参考帧的边界形成的区域即为本申请中的第一区域,则预测块的位置有多种可能。一种可 能是,预测块的所有边界均位于第一区域内,如图10c中的预测块6;另一种可能是,预测块的部分边界位于第一区域内,如图10c中的预测块5-1、预测块5-2和预测块5-3。In addition, as shown in Fig. 10c, if the reference frame is divided horizontally and vertically to obtain four tiles, namely tile 5, tile 6, tile 7 and tile 8, all the dotted lines in the figure and the reference The area formed by the border of the frame is the first area in this application, and there are multiple possibilities for the position of the prediction block. One possibility is that all the boundaries of the prediction block are located in the first area, such as prediction block 6 in Figure 10c; another possibility is that part of the boundaries of the prediction block are located in the first area, such as the prediction block in Figure 10c 5-1, prediction block 5-2 and prediction block 5-3.
可以理解的是,若预测块的部分边界位于第一区域内,预测块的位置不局限于图10c中示出的,还可以位于其它位置,不予限制。It can be understood that, if part of the boundary of the prediction block is located in the first area, the position of the prediction block is not limited to that shown in FIG. 10c, and may also be located at other positions without limitation.
本申请实施例提供的方案,通过判断预测块的边界值与第一区域的边界值,可以确定对预测块的位置进行调整,以实现编码端不进行瓦片边界滤波,从而可以进一步降低编码器的复杂度。In the solution provided by this embodiment of the present application, by judging the boundary value of the prediction block and the boundary value of the first region, it can be determined to adjust the position of the prediction block, so that the encoding end does not perform tile boundary filtering, so that the encoder can be further reduced. complexity.
可选地,在一些实施例中,所述若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上,对所述预测块的位置进行调整,包括:若所述预测块的边界值与所述第一区域的边界值不满足预设条件,对所述预测块的位置进行调整。Optionally, in some embodiments, if the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, adjusting the position of the prediction block includes: if the prediction block The boundary value of the first region and the boundary value of the first region do not meet the preset conditions, and the position of the prediction block is adjusted.
所述预设条件为以下条件中的至少一种:所述预测块在水平方向的右边界值小于或等于所述第一区域在水平方向的左边界值;所述预测块在水平方向的左边界值大于或等于所述第一区域在水平方向的右边界值;所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向的上边界值;以及,所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的下边界值。The preset condition is at least one of the following conditions: the right boundary value of the prediction block in the horizontal direction is less than or equal to the left boundary value of the first region in the horizontal direction; the left boundary value of the prediction block is in the horizontal direction. The boundary value is greater than or equal to the right boundary value of the first region in the horizontal direction; the lower boundary value of the prediction block in the vertical direction is less than or equal to the upper boundary value of the first region in the vertical direction; and, the prediction The upper boundary value of the block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction.
本申请实施例中,若对参考帧进行水平划分得到两个瓦片,分别为瓦片1和瓦片2,由上下两条虚线与参考帧的左边界和右边界所形成的区域即为本申请中的的第一区域。如图11a中的预测块1的位置可以表述为:预测块在垂直方向的下边界值小于或等于第一区域在垂直方向的上边界值;如图11a中的预测块2的位置可以表述为:预测块在垂直方向的上边界值大于或等于第一区域在垂直方向的下边界值。In the embodiment of the present application, if the reference frame is divided horizontally to obtain two tiles, namely tile 1 and tile 2, the area formed by the upper and lower dashed lines and the left and right borders of the reference frame is this The first area in the application. The position of the prediction block 1 in Fig. 11a can be expressed as: the lower boundary value of the prediction block in the vertical direction is less than or equal to the upper boundary value of the first region in the vertical direction; the position of the prediction block 2 in Fig. 11a can be expressed as : The upper boundary value of the prediction block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction.
本申请实施例中,若当前图像块的运动矢量所指向的预测块不是预测块1或预测块2的位置,即当前图像块的运动矢量所指向的预测块与第一区域有重叠,则可以对预测块的位置进行调整。In this embodiment of the present application, if the prediction block pointed to by the motion vector of the current image block is not the position of prediction block 1 or prediction block 2, that is, the prediction block pointed to by the motion vector of the current image block overlaps with the first area, then Adjust the position of the prediction block.
本申请实施例中,若对参考帧进行垂直划分得到两个瓦片,分别为瓦片3和瓦片4,由左右两条虚线与参考帧的上边界和下边界所形成的区域即为本申请中的的第一区域。如图11b中的预测块3的位置可以表述为:预测块在水平方向的右边界值小于或等于第一区域在水平方向的左边界值;如图 11b中的预测块4的位置可以表述为:预测块在水平方向的左边界值大于或等于第一区域在水平方向的右边界值。In the embodiment of the present application, if the reference frame is vertically divided to obtain two tiles, namely tile 3 and tile 4, the area formed by the left and right dashed lines and the upper and lower boundaries of the reference frame is the original The first area in the application. The position of the prediction block 3 in Fig. 11b can be expressed as: the right boundary value of the prediction block in the horizontal direction is less than or equal to the left boundary value of the first region in the horizontal direction; the position of the prediction block 4 in Fig. 11b can be expressed as : The left boundary value of the prediction block in the horizontal direction is greater than or equal to the right boundary value of the first region in the horizontal direction.
本申请实施例中,若当前图像块的运动矢量所指向的预测块不是预测块3或预测块4的位置,即当前图像块的运动矢量所指向的预测块与第一区域有重叠,则可以对预测块的位置进行调整。In the embodiment of the present application, if the prediction block pointed to by the motion vector of the current image block is not the position of prediction block 3 or prediction block 4, that is, the prediction block pointed to by the motion vector of the current image block overlaps with the first area, then Adjust the position of the prediction block.
此外,如图11c所示,若对参考帧进行了水平和垂直划分得到四个瓦片,分别为瓦片5、瓦片6、瓦片7和瓦片8,由图中所有的虚线与参考帧的边界形成的区域即为本申请中的第一区域。如图11c中的预测块5、预测块6、预测块7和预测块8的位置可以表述为预测块的所有边界均位于第一区域外。In addition, as shown in Figure 11c, if the reference frame is divided horizontally and vertically to obtain four tiles, namely tile 5, tile 6, tile 7 and tile 8, all the dotted lines in the figure and the reference The area formed by the border of the frame is the first area in this application. The positions of prediction block 5, prediction block 6, prediction block 7 and prediction block 8 as in Fig. 11c can be expressed as all the boundaries of the prediction blocks are located outside the first area.
本申请实施例中,若当前图像块的运动矢量所指向的预测块不是预测块5、预测块6、预测块7和预测块8的位置,即当前图像块的运动矢量所指向的预测块与第一区域有重叠,则可以对预测块的位置进行调整。In this embodiment of the present application, if the prediction block pointed to by the motion vector of the current image block is not the position of prediction block 5, prediction block 6, prediction block 7 and prediction block 8, that is, the prediction block pointed to by the motion vector of the current image block is the same as If the first area overlaps, the position of the prediction block can be adjusted.
本申请实施例提供的方案,通过判断预测块与第一区域有重叠,可以确定对预测块的位置进行调整,以实现编码端不进行瓦片边界滤波,从而可以进一步降低编码器的复杂度。In the solution provided by the embodiments of the present application, by judging that the prediction block overlaps with the first region, it can be determined to adjust the position of the prediction block, so that the encoding end does not perform tile boundary filtering, thereby further reducing the complexity of the encoder.
上文指出,编码端可以基于预测块的边界值与第一区域的边界值,判断预测块是否位于参考帧的瓦片边界上,其中,第一区域为瓦片边界受滤波影响的区域。关于第一区域的确定,可以通过以下方式确定,具体详见下文。As noted above, the encoder can determine whether the prediction block is located on the tile boundary of the reference frame based on the boundary value of the prediction block and the boundary value of the first region, where the first region is the region affected by the filtering of the tile boundary. The determination of the first region can be determined in the following manner, and details are detailed below.
若对参考帧进行垂直划分得到两个瓦片,则第一区域的左边界和右边界可以分别通过公式(1)和公式(2)确定。If the reference frame is vertically divided to obtain two tiles, the left boundary and the right boundary of the first region can be determined by formula (1) and formula (2), respectively.
fbd_zone_left=(Tile_i_x_start-offset_left1-offset_left2)*4  (1)fbd_zone_left=(Tile_i_x_start-offset_left1-offset_left2)*4 (1)
fbd_zone_right=(Tile_i_x_start+offset_right1+offset_right2)*4  (2)fbd_zone_right=(Tile_i_x_start+offset_right1+offset_right2)*4 (2)
其中,fbd_zone_left表示第一区域的左边界,fbd_zone_right表示第一区域的右边界,Tile_i_x_start表示第i个瓦片在水平方向的起始坐标,offset_left1、offset_left2、offset_right1、offset_right2表示偏移值,offset_left1可取大于或等于3的整数,offset_left2可取大于或等于4的整数;offset_right1可取大于或等于4的整数,offset_right2可取大于或等于4的整数。Among them, fbd_zone_left represents the left boundary of the first area, fbd_zone_right represents the right boundary of the first area, Tile_i_x_start represents the starting coordinates of the ith tile in the horizontal direction, offset_left1, offset_left2, offset_right1, offset_right2 represent offset values, offset_left1 can be greater than or an integer equal to 3, offset_left2 can take an integer greater than or equal to 4; offset_right1 can take an integer greater than or equal to 4, and offset_right2 can take an integer greater than or equal to 4.
当前图像块的运动矢量所指向的预测块的左边界和右边界可以分别通过公式(3)和公式(4)确定。The left boundary and the right boundary of the prediction block pointed to by the motion vector of the current image block can be determined by formula (3) and formula (4), respectively.
pred_block_left=block_x*4+mv_x  (3)pred_block_left=block_x*4+mv_x (3)
pred_block_right=(block_x+block_width-1)*4+mv_x  (4)pred_block_right=(block_x+block_width-1)*4+mv_x (4)
其中,pred_block_left表示预测块的左边界,pred_block_right表示预测块的右边界,block_x表示当前图像块左上角点的水平轴坐标,mv_x表示mv的水平分量(以1/4像素精度标识),block_width表示当前图像块的宽度。Among them, pred_block_left represents the left boundary of the prediction block, pred_block_right represents the right boundary of the prediction block, block_x represents the horizontal axis coordinate of the upper left corner of the current image block, mv_x represents the horizontal component of mv (identified with 1/4 pixel precision), and block_width represents the current The width of the image block.
若公式(5)成立,则可以确定当前图像块的运动矢量所指向的预测块与第一区域有重叠。If formula (5) is established, it can be determined that the prediction block pointed to by the motion vector of the current image block overlaps with the first region.
Figure PCTCN2020104529-appb-000001
Figure PCTCN2020104529-appb-000001
需要特别说明的是,上述公式(5)所表达的含义可以是若预测块的右边界和第一区域的左边界不满足pred_block_right<fbd_zone_left,或预测块的左边界和第一区域的右边界不满足pred_block_left>fbd_zone_right,则可以确定当前图像块的运动矢量所指向的预测块与第一区域有重叠。It should be noted that the meaning expressed by the above formula (5) may be that if the right boundary of the predicted block and the left boundary of the first area do not satisfy pred_block_right<fbd_zone_left, or the left boundary of the predicted block and the right boundary of the first area do not satisfy If pred_block_left>fbd_zone_right is satisfied, it can be determined that the prediction block pointed to by the motion vector of the current image block overlaps with the first zone.
示例性地,如图12a所示,若对参考帧进行垂直划分得到两个瓦片,分别为瓦片3和瓦片4,若瓦片4的在水平方向的起始点的坐标值为20,则根据上述公式(1)和公式(2)可以得到第一区域的左边界和右边界在水平方向的坐标值分别为52和112,即图12a中虚线所示的区域为本申请中的第一区域;假设当前图像块的宽度为8,当前图像块左上角点的水平轴坐标值为150,运动矢量在水平方向的分量为-560,则通过上述公式(3)和公式(4)可以得到当前图像块的运动矢量所指向的预测块的左边界和右边界在水平方向的坐标值分别为40和64,即图12a中所示出的原预测块的位置。Exemplarily, as shown in FIG. 12a, if the reference frame is vertically divided to obtain two tiles, namely tile 3 and tile 4, if the coordinate value of the starting point of tile 4 in the horizontal direction is 20, Then according to the above formula (1) and formula (2), it can be obtained that the coordinate values of the left border and the right border of the first region in the horizontal direction are 52 and 112 respectively, that is, the region shown by the dotted line in FIG. 12a is the first region in the application. One area; Assuming that the width of the current image block is 8, the coordinate value of the horizontal axis of the upper left corner of the current image block is 150, and the component of the motion vector in the horizontal direction is -560, the above formula (3) and formula (4) can be The coordinates of the left boundary and the right boundary of the prediction block pointed to by the motion vector of the current image block in the horizontal direction are 40 and 64, respectively, that is, the position of the original prediction block shown in FIG. 12a.
由于预测块在水平方向的右边界的值为64,第一区域在水平方向的左边界的值为52,满足上述公式(5),从而可以确定当前图像块的运动矢量所指向的预测块位于瓦片边界上。Since the value of the right boundary of the prediction block in the horizontal direction is 64, and the value of the left boundary of the first region in the horizontal direction is 52, the above formula (5) is satisfied, so it can be determined that the prediction block pointed to by the motion vector of the current image block is located in on tile borders.
若对参考帧进行水平划分得到两个瓦片,则第一区域的上边界和下边界可以分别通过公式(6)和公式(7)确定。If the reference frame is horizontally divided to obtain two tiles, the upper and lower boundaries of the first region can be determined by formula (6) and formula (7), respectively.
fbd_zone_top=(Tile_i_y_start-offset_top1-offset_top2)*4  (6)fbd_zone_top=(Tile_i_y_start-offset_top1-offset_top2)*4 (6)
fbd_zone_bottom=(Tile_i_y_start+offset_bottom1+offset_bottom2)*4  (7)fbd_zone_bottom=(Tile_i_y_start+offset_bottom1+offset_bottom2)*4 (7)
其中,offset_top1可取大于或等于3的整数,offset_top2可取大于或等于4的整数;offset_bottom1可取大于或等于4的整数,offset_bottom2可取大于或等于4的整数。Wherein, offset_top1 can take an integer greater than or equal to 3, offset_top2 can take an integer greater than or equal to 4; offset_bottom1 can take an integer greater than or equal to 4, and offset_bottom2 can take an integer greater than or equal to 4.
当前图像块的运动矢量所指向的预测块的上边界和下边界可以分别通 过公式(8)和公式(9)确定。The upper and lower boundaries of the prediction block pointed to by the motion vector of the current image block can be determined by formula (8) and formula (9), respectively.
pred_block_top=block_y*4+mv_y  (8)pred_block_top=block_y*4+mv_y (8)
pred_block_bottom=(block_y+block_height-1)*4+mv_y  (9)pred_block_bottom=(block_y+block_height-1)*4+mv_y (9)
其中,block_y表示当前图像块左上角点的垂直轴坐标,mv_y表示mv的垂直分量,block_height表示当前图像块的高度。Among them, block_y represents the vertical axis coordinate of the upper left corner of the current image block, mv_y represents the vertical component of mv, and block_height represents the height of the current image block.
若公式(10)成立,则可以确定当前图像块的运动矢量所指向的预测块与第一区域有重叠。If formula (10) is established, it can be determined that the prediction block pointed to by the motion vector of the current image block overlaps with the first region.
Figure PCTCN2020104529-appb-000002
Figure PCTCN2020104529-appb-000002
类似地,需要说明的是,上述公式(10)所表达的含义可以是若预测块的下边界和第一区域的上边界不满足pred_block_bottom<fbd_zone_top,或预测块的上边界和第一区域的下边界不满足pred_block_top>fbd_zone_bottom,则可以确定当前图像块的运动矢量所指向的预测块与第一区域有重叠。Similarly, it should be noted that the meaning expressed by the above formula (10) may be that if the lower boundary of the prediction block and the upper boundary of the first zone do not satisfy pred_block_bottom<fbd_zone_top, or the upper boundary of the prediction block and the lower boundary of the first zone If the boundary does not satisfy pred_block_top>fbd_zone_bottom, it can be determined that the prediction block pointed to by the motion vector of the current image block overlaps with the first area.
示例性地,如图12b所示,若对参考帧进行水平划分得到两个瓦片,分别为瓦片1和瓦片2,若瓦片2的在垂直方向的起始点坐标值为20,则根据上述公式(5)和公式(6)可以得到第一区域的上边界和下边界在垂直方向的坐标值分别为52和112,即图12b中虚线所示的区域为本申请中的第一区域;假设当前图像块的高度为8,当前图像块左上角点的垂直轴坐标值为150,运动矢量在垂直方向的分量为-560,则通过上述公式(7)和公式(8)可以得到当前图像块的运动矢量所指向的预测块的上边界和下边界在垂直方向的坐标值分别为为40和64,即图12b中所示出的预测块的位置。Exemplarily, as shown in Figure 12b, if the reference frame is divided horizontally to obtain two tiles, namely tile 1 and tile 2, if the coordinate value of the starting point of tile 2 in the vertical direction is 20, then According to the above formula (5) and formula (6), it can be obtained that the coordinate values of the upper boundary and the lower boundary of the first region in the vertical direction are 52 and 112 respectively, that is, the region shown by the dotted line in FIG. 12b is the first region in this application. area; assuming that the height of the current image block is 8, the vertical axis coordinate value of the upper left corner of the current image block is 150, and the vertical component of the motion vector is -560, then the above formula (7) and formula (8) can be obtained The coordinate values in the vertical direction of the upper boundary and the lower boundary of the prediction block pointed to by the motion vector of the current image block are 40 and 64, respectively, that is, the position of the prediction block shown in FIG. 12b.
由于预测块在垂直方向的下边界值为64,第一区域在垂直方向的左边界值为52,满足上述公式(10),从而可以确定当前图像块的运动矢量所指向的预测块位于瓦片边界上。Since the lower boundary value of the prediction block in the vertical direction is 64, and the left boundary value of the first region in the vertical direction is 52, which satisfies the above formula (10), it can be determined that the prediction block pointed to by the motion vector of the current image block is located in the tile on the border.
可选地,在一些实施例中,所述对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部,包括:基于所述预测块的边界值与所述第一区域的边界值,对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部。Optionally, in some embodiments, the adjusting the position of the prediction block so that the prediction block is located inside the tile of the reference frame includes: based on the boundary value of the prediction block and the According to the boundary value of the first region, the position of the prediction block is adjusted so that the prediction block is located inside the tile of the reference frame.
本申请实施例中,可以通过预测块的边界值和第一区域的边界值对预测块的位置进行调整,以使得预测块位于参考帧的瓦片内部。In this embodiment of the present application, the position of the prediction block may be adjusted by the boundary value of the prediction block and the boundary value of the first region, so that the prediction block is located inside the tile of the reference frame.
本申请实施例提供的方案,基于预测块的边界值与第一区域的边界值, 对预测块的位置进行调整,以使得该预测块位于参考帧的瓦片内部,可以保证预测块位于参考帧的瓦片内部的准确性。In the solution provided by the embodiment of the present application, the position of the prediction block is adjusted based on the boundary value of the prediction block and the boundary value of the first area, so that the prediction block is located inside the tile of the reference frame, which can ensure that the prediction block is located in the reference frame The accuracy of the tile interior.
上文指出,编码端可以基于预测块的边界值与第一区域的边界值,对预测块的位置进行调整,具体的调整方式可以参见下文。It is pointed out above that the encoder can adjust the position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region, and the specific adjustment method can be referred to below.
可选地,在一些实施例中,所述基于所述预测块的边界值与所述第一区域的边界值,对所述预测块的位置进行调整,包括:对所述预测块在水平方向的边界值增加第一阈值,所述第一阈值是基于所述预测块在水平方向的边界值和所述第一区域在水平方向的边界值以及第一预设值得到的;和/或,对所述预测块在垂直方向的边界值增加第二阈值,所述第二阈值是基于所述预测块在垂直方向的边界值和所述第一区域在垂直方向的边界值以及第二预设值得到的。Optionally, in some embodiments, the adjusting the position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region includes: adjusting the position of the prediction block in a horizontal direction and/or, adding a second threshold value to the boundary value of the prediction block in the vertical direction, the second threshold value is based on the boundary value of the prediction block in the vertical direction and the boundary value of the first region in the vertical direction and a second preset value obtained.
本申请实施例中,第一阈值(下文以Δmv_x表示)和第二阈值(下文以Δmv_y表示)可以分别通过公式(11)和公式(12),或公式(13)和公式(14)获得。In this embodiment of the present application, the first threshold (represented by Δmv_x below) and the second threshold (represented by Δmv_y below) can be obtained by formula (11) and formula (12), or formula (13) and formula (14), respectively.
Δmv_x=-(pred_block_right-fbd_zone_left+offsetX)  (11)Δmv_x=-(pred_block_right-fbd_zone_left+offsetX) (11)
Δmv_y=-(pred_block_bottom-fbd_zone_top+offsetY)  (12)Δmv_y=-(pred_block_bottom-fbd_zone_top+offsetY) (12)
Δmv_x=(fbd_zone_right-pred_block_left+offsetX)  (13)Δmv_x=(fbd_zone_right-pred_block_left+offsetX) (13)
Δmv_y=(fbd_zone_bottom-pred_block_top+offsetY)  (14)Δmv_y=(fbd_zone_bottom-pred_block_top+offsetY) (14)
其中,offsetX和offsetY的取值可以为1。The values of offsetX and offsetY may be 1.
则移动后的运动矢量的水平分量和垂直分量可以通过公式(15)和公式(16)确定。Then the horizontal and vertical components of the moved motion vector can be determined by formula (15) and formula (16).
mv_x_new=mv_x+Δmv_x  (15)mv_x_new=mv_x+Δmv_x (15)
mv_y_new=mv_y+Δmv_y  (16)mv_y_new=mv_y+Δmv_y (16)
本申请实施例中的第一预设值和/或第二预设值可以为固定的,也可以是不断调整的,本申请对此不作具体限定。The first preset value and/or the second preset value in the embodiment of the present application may be fixed or continuously adjusted, which is not specifically limited in the present application.
可选地,在一些实施例中,若所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的左边界值,且所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的左边界值,所述第一阈值为负值;或,若所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的右边界值,且所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的右边界值,所述第一阈值为正值。Optionally, in some embodiments, if the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is less than or equal to the left boundary value of the first area in the horizontal direction, and the first threshold value is a negative value; or, if the left boundary value of the prediction block in the horizontal direction is less than or equal to the first area in the horizontal direction and the right boundary value of the prediction block in the horizontal direction is greater than or equal to the right boundary value of the first region in the horizontal direction, and the first threshold value is a positive value.
本申请实施例中,若预测块在水平方向的右边界值大于或等于第一区域在水平方向的左边界值,且预测块在水平方向的左边界值小于或等于第一区域在水平方向的左边界值,即图12a中所示出的原预测块的位置。在原预测块的基础上增加第一阈值,且该第一阈值为负值,即将原预测块向左移动第一阈值,即图12a中所示出的移动后的预测块的位置。In the embodiment of the present application, if the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is less than or equal to the horizontal direction value of the first region Left boundary value, ie the position of the original prediction block shown in Figure 12a. A first threshold is added on the basis of the original prediction block, and the first threshold value is a negative value, that is, the original prediction block is moved to the left by the first threshold value, that is, the position of the moved prediction block shown in FIG. 12a.
示例性地,如上所述,原预测块的左边界和右边界在水平方向的坐标值分别为40和64,第一区域的左边界和右边界在水平方向的坐标值分别为52和112,通过上述公式(11)可以得到第一阈值Δmv_x为-13,即移动后的预测块的左边界和右边界在水平方向的坐标值分别为27和51,此时,移动后的预测块的位置不位于第一区域内,编码端可以基于移动后的预测块对当前图像块进行编码。Exemplarily, as described above, the coordinate values of the left and right boundaries of the original prediction block in the horizontal direction are 40 and 64, respectively, and the coordinate values of the left and right boundaries of the first region in the horizontal direction are 52 and 112, respectively, Through the above formula (11), it can be obtained that the first threshold Δmv_x is -13, that is, the coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 27 and 51, respectively. At this time, the position of the moved prediction block is If it is not located in the first area, the encoding end may encode the current image block based on the moved prediction block.
类似地,如图12c所示,第一区域的左边界和右边界在水平方向的坐标值分别为52和112,原预测块的左边界和右边界在水平方向的坐标值分别为90和114,通过上述公式(13)可以得到第一阈值Δmv_x为23,即移动后的预测块的左边界和右边界在水平方向的坐标值分别为113和137,此时,移动后的预测块的位置不位于第一区域内,编码端可以基于移动后的预测块对当前图像块进行编码。Similarly, as shown in Figure 12c, the coordinates of the left and right boundaries of the first region in the horizontal direction are 52 and 112, respectively, and the coordinates of the left and right boundaries of the original prediction block in the horizontal direction are 90 and 114, respectively , through the above formula (13), it can be obtained that the first threshold Δmv_x is 23, that is, the coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 113 and 137 respectively. At this time, the position of the moved prediction block is If it is not located in the first area, the encoding end may encode the current image block based on the moved prediction block.
本申请实施例提供的方案,通过根据预测块在第一区域的位置的不同,得到不同的第一阈值,从而可以对预测块的位置有目的性地进行调整,进一步地,可以减少预测块的偏移量,便于实现。In the solution provided by the embodiments of the present application, different first thresholds are obtained according to the different positions of the prediction blocks in the first area, so that the positions of the prediction blocks can be adjusted purposefully, and further, the number of prediction blocks can be reduced. offset for ease of implementation.
可选地,在一些实施例中,若所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的上边界值,且所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的上边界值,所述第二阈值为负值;或,若所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的下边界值,且所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的下边界值,所述第二阈值为正值。Optionally, in some embodiments, if the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the upper boundary value of the prediction block in the vertical direction is less than or equal to the upper boundary value of the first region in the vertical direction, and the second threshold value is a negative value; or, if the upper boundary value of the prediction block in the vertical direction is less than or equal to the vertical upper boundary value of the first region and the lower boundary value of the prediction block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction, and the second threshold value is a positive value.
本申请实施例中,若预测块在垂直方向的下边界值大于或等于第一区域在垂直方向的上边界值,且预测块在垂直方向的左边界值小于或等于第一区域在垂直方向的左边界值,即图12b中所示出的原预测块的位置。在原预测块的基础上增加第二阈值,且该第二阈值为负值,即将原预测块向上移动第二阈值,即图12b中所示出的移动后的预测块的位置。In this embodiment of the present application, if the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the left boundary value of the prediction block in the vertical direction is less than or equal to the vertical boundary value of the first region The left boundary value, ie the position of the original prediction block shown in Figure 12b. A second threshold is added on the basis of the original prediction block, and the second threshold value is a negative value, that is, the original prediction block is moved up by a second threshold value, that is, the position of the moved prediction block shown in FIG. 12b.
示例性地,如上所述,原预测块的上边界和下边界在垂直方向的坐标值分别为40和64,第一区域的上边界和下边界在垂直方向的坐标值分别为52和112,通过上述公式(12)可以得到第二阈值Δmy_x为-13,即移动后的预测块的上边界和下边界在垂直方向的坐标值分别为27和51,此时,移动后的预测块的位置不位于第一区域内,编码端可以基于移动后的预测块对当前图像块进行编码。Exemplarily, as described above, the coordinates of the upper and lower boundaries of the original prediction block in the vertical direction are 40 and 64, respectively, and the coordinates of the upper and lower boundaries of the first region in the vertical direction are 52 and 112, respectively, Through the above formula (12), it can be obtained that the second threshold Δmy_x is -13, that is, the coordinate values of the upper and lower boundaries of the moved prediction block in the vertical direction are 27 and 51 respectively. At this time, the position of the moved prediction block is If it is not located in the first area, the encoding end may encode the current image block based on the moved prediction block.
类似地,如图12d所示,第一区域的上边界和下边界在垂直方向的坐标值分别为52和112,原预测块的上边界和下边界在垂直方向的坐标值分别为90和114,通过上述公式(14)可以得到第二阈值Δmv_y为23,即移动后的预测块的上边界和下边界在垂直方向的坐标值分别为113和137,此时,移动后的预测块的位置不位于第一区域内,编码端可以基于移动后的预测块对当前图像块进行编码。Similarly, as shown in Figure 12d, the coordinates of the upper and lower boundaries of the first region in the vertical direction are 52 and 112, respectively, and the coordinates of the upper and lower boundaries of the original prediction block in the vertical direction are 90 and 114, respectively , through the above formula (14), the second threshold Δmv_y can be obtained as 23, that is, the coordinate values of the upper and lower boundaries of the moved prediction block in the vertical direction are 113 and 137 respectively. At this time, the position of the moved prediction block is If it is not located in the first area, the encoding end may encode the current image block based on the moved prediction block.
应理解,上述数值仅为举例说明,还可以为其他数值,不应对本申请造成特别限定。It should be understood that the above numerical values are only examples, and other numerical values may also be used, which should not limit the present application.
本申请实施例提供的方案,通过根据预测块在第一区域的位置的不同,得到不同的第二阈值,从而可以对预测块的位置有目的性地进行调整,进一步地,可以减少预测块的偏移量,便于实现。According to the solution provided by the embodiments of the present application, different second thresholds are obtained according to the different positions of the predicted blocks in the first area, so that the positions of the predicted blocks can be adjusted purposefully, and further, the amount of the predicted blocks can be reduced. offset for ease of implementation.
可选地,在一些实施例中,若所述预测块在水平方向的左边界大于或等于所述第一区域在水平方向的左边界值,所述预测块在水平方向的右边界小于或等于所述第一区域在水平方向的右边界值,所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的上边界值,所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向的下边界值,所述第一阈值和/或所述第二阈值为正值或负值。Optionally, in some embodiments, if the left border of the prediction block in the horizontal direction is greater than or equal to the left border value of the first region in the horizontal direction, the right border of the prediction block in the horizontal direction is less than or equal to The right boundary value of the first region in the horizontal direction, the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction The value is less than or equal to the lower boundary value of the first region in the vertical direction, and the first threshold value and/or the second threshold value is a positive value or a negative value.
本申请实施例中,若预测块在水平方向的左边界大于或等于第一区域在水平方向的左边界值,预测块在水平方向的右边界小于或等于第一区域在水平方向的右边界值,预测块在垂直方向的上边界值大于或等于第一区域在垂直方向的上边界值,预测块在垂直方向的下边界值小于或等于第一区域在垂直方向的下边界值,即预测块位于第一区域内,即图12e中所示出的原预测块的位置。在原预测块的基础上增加第一阈值和/或第二阈值,且该第一阈值和/或第二阈值为正值或负值,即将原预测块任意可能的方向移动第一阈值和/或第二阈值,即图12e中所示出的移动后的预测块的位置。In this embodiment of the present application, if the left boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, the right boundary value of the prediction block in the horizontal direction is smaller than or equal to the right boundary value of the first region in the horizontal direction , the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, that is, the prediction block is located in the first area, that is, the position of the original prediction block shown in Fig. 12e. A first threshold and/or a second threshold is added on the basis of the original prediction block, and the first threshold and/or the second threshold are positive or negative, that is, the original prediction block is moved in any possible direction by the first threshold and/or The second threshold, the position of the moved prediction block shown in Figure 12e.
示例性地,如上所述,原预测块的左边界和右边界在水平方向的坐标值分别为60和84,上边界和下边界在垂直方向的坐标值分别为60和84;第一区域的左边界和右边界在水平方向的坐标值分别为52和112,上边界和下边界在垂直方向的坐标值分别为52和112。Exemplarily, as described above, the coordinate values of the left and right boundaries of the original prediction block in the horizontal direction are 60 and 84, respectively, and the coordinate values of the upper and lower boundaries in the vertical direction are 60 and 84, respectively; The coordinates of the left and right borders in the horizontal direction are 52 and 112, respectively, and the coordinates of the upper and lower borders in the vertical direction are 52 and 112, respectively.
可以通过以下多种方式对该原预测块的位置进行调整,不予限制,具体请参考下文。The position of the original prediction block can be adjusted in the following ways, without limitation, please refer to the following for details.
1)、通过上述公式(11)和公式(12)可以得到第一阈值Δmv_x和第二阈值Δmv_y的数值均为-33,即在原预测块的基础上分别在水平方向和垂直方向增加-33,则即移动后的预测块的左边界和右边界在水平方向的坐标值分别为27和51,移动后的预测块的上边界和下边界在垂直方向的坐标值分别为27和51,此时,移动后的预测块的位置如图12e中的移动后的预测块1的位置所示,编码端可以基于移动后的预测块1对当前图像块进行编码。1), through the above-mentioned formula (11) and formula (12), it can be obtained that the values of the first threshold Δmv_x and the second threshold Δmv_y are both -33, that is, on the basis of the original prediction block, increase -33 in the horizontal direction and the vertical direction, respectively, Then the coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 27 and 51, respectively, and the coordinates of the upper and lower boundaries of the moved prediction block in the vertical direction are 27 and 51, respectively. , the position of the moved prediction block is shown as the position of the moved prediction block 1 in FIG. 12e , the encoding end may encode the current image block based on the moved prediction block 1 .
2)、通过上述公式(13)和公式(12)可以得到第一阈值Δmv_x和第二阈值Δmv_y的数值分别为53和-33,即在原预测块的基础上在水平方向增加53,在垂直方向增加-33,则即移动后的预测块的左边界和右边界在水平方向的坐标值分别为113和137,移动后的预测块的上边界和下边界在垂直方向的坐标值分别为27和51,此时,移动后的预测块的位置如图12e中的移动后的预测块2的位置所示,编码端可以基于移动后的预测块2对当前图像块进行编码。2), through the above formula (13) and formula (12), the values of the first threshold Δmv_x and the second threshold Δmv_y can be obtained to be 53 and -33 respectively, that is, on the basis of the original prediction block, increase 53 in the horizontal direction, and in the vertical direction Add -33, that is, the coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 113 and 137, respectively, and the coordinates of the upper and lower boundaries of the moved prediction block in the vertical direction are 27 and 27, respectively. 51. At this time, the position of the moved prediction block is shown as the position of the moved prediction block 2 in FIG. 12e, and the encoding end may encode the current image block based on the moved prediction block 2.
3)、通过上述公式(11)和公式(14)可以得到第一阈值Δmv_x和第二阈值Δmv_y的数值分别为-33和53,即在原预测块的基础上在水平方向增加-33,在垂直方向增加53,则即移动后的预测块的左边界和右边界在水平方向的坐标值分别为27和51,移动后的预测块的上边界和下边界在垂直方向的坐标值分别为113和137,此时,移动后的预测块的位置如图12e中的移动后的预测块3的位置所示,编码端可以基于移动后的预测块3对当前图像块进行编码。3), through the above formula (11) and formula (14), the values of the first threshold Δmv_x and the second threshold Δmv_y can be obtained to be -33 and 53 respectively, that is, on the basis of the original prediction block, increase -33 in the horizontal direction, and in the vertical direction. The direction increases by 53, that is, the coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 27 and 51, respectively, and the coordinates of the upper and lower boundaries of the moved prediction block in the vertical direction are 113 and 113 respectively. 137. At this time, the position of the moved prediction block is shown as the position of the moved prediction block 3 in FIG. 12e, and the encoding end may encode the current image block based on the moved prediction block 3.
4)、通过上述公式(13)和公式(14)可以得到第一阈值Δmv_x和第二阈值Δmv_y的数值均为53,即在原预测块的基础上分别在水平方向和垂直方向增加53,则即移动后的预测块的左边界和右边界在水平方向的坐标值分别为113和137,移动后的预测块的上边界和下边界在垂直方向的坐标值分别为113和137,此时,移动后的预测块的位置如图12e中的移动后的预测块 4的位置所示,编码端可以基于移动后的预测块4对当前图像块进行编码。4), through the above formula (13) and formula (14), it can be obtained that the values of the first threshold Δmv_x and the second threshold Δmv_y are both 53, that is, on the basis of the original prediction block, increase 53 in the horizontal direction and the vertical direction, then The coordinate values of the left and right boundaries of the moved prediction block in the horizontal direction are 113 and 137, respectively, and the coordinates of the upper and lower boundaries of the moved prediction block in the vertical direction are 113 and 137, respectively. The position of the subsequent prediction block is shown as the position of the moved prediction block 4 in FIG. 12e , and the encoding end may encode the current image block based on the moved prediction block 4 .
本申请实施例提供的方案,基于预测块的边界值与第一区域的边界值,对预测块的位置进行调整,以使得该预测块位于参考帧的瓦片内部,可以保证预测块位于参考帧的瓦片内部的准确性。In the solution provided by the embodiment of the present application, the position of the prediction block is adjusted based on the boundary value of the prediction block and the boundary value of the first region, so that the prediction block is located inside the tile of the reference frame, which can ensure that the prediction block is located in the reference frame. The accuracy of the tile interior.
上文结合图1-图12,详细描述了本申请的方法实施例,下面结合图13-图16,描述本申请的装置实施例,装置实施例与方法实施例相互对应,因此未详细描述的部分可参见前面各部分方法实施例。The method embodiments of the present application are described in detail above with reference to FIGS. 1 to 12 , and the apparatus embodiments of the present application are described below with reference to FIGS. 13 to 16 . The apparatus embodiments and the method embodiments correspond to each other, and therefore are not described in detail. In part, please refer to the method embodiments of the previous parts.
图13为本申请一实施例提供的一种编码装置1300,该编码装置1300可以包括处理器1310。FIG. 13 is an encoding apparatus 1300 provided by an embodiment of the present application. The encoding apparatus 1300 may include a processor 1310 .
处理器1310,所述处理器1310用于:若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上,对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部,从而使得当在编码端不进行瓦片边界滤波而在解码端进行瓦片边界滤波时,所述编码端进行编码时所参考的预测块的像素值和所述解码端进行解码时所参考的预测块的像素值能够保持一致,所述当前图像块位于当前帧;基于调整后的所述预测块,对所述当前图像块进行编码。The processor 1310, the processor 1310 is configured to: if the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, adjust the position of the prediction block so that the prediction block is located at the tile boundary of the reference frame. Inside the tile of the reference frame, so that when tile boundary filtering is not performed at the encoding end and tile boundary filtering is performed at the decoding end, the pixel value of the prediction block referenced by the encoding end during encoding and the The pixel values of the prediction block referenced by the decoding end during decoding can be kept consistent, and the current image block is located in the current frame; the current image block is encoded based on the adjusted prediction block.
可选地,在一些实施例中,所述处理器1310进一步用于:在对所述当前图像块进行编码的过程中,使能所述瓦片边界滤波。Optionally, in some embodiments, the processor 1310 is further configured to: enable the tile boundary filtering in the process of encoding the current image block.
可选地,在一些实施例中,所述处理器1310进一步用于:将码流数据中的瓦片边界滤波使能标志位置为1;其中,所述瓦片边界滤波使能标志位位于所述码流数据的图片数据集、序列参数集、条带头、图像头或序列头中。Optionally, in some embodiments, the processor 1310 is further configured to: set the tile boundary filtering enable flag in the code stream data to 1; wherein the tile boundary filtering enable flag is located in the In the picture data set, sequence parameter set, slice header, picture header or sequence header of the code stream data.
可选地,在一些实施例中,所述处理器1310进一步用于:基于预设规则对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部。Optionally, in some embodiments, the processor 1310 is further configured to: adjust the position of the prediction block based on a preset rule, so that the prediction block is located inside the tile of the reference frame.
可选地,在一些实施例中,所述预设规则包括:将所述预测块按照以下方式中的至少一种方式进行调整:Optionally, in some embodiments, the preset rule includes: adjusting the prediction block in at least one of the following manners:
将所述预测块向左上方移动;moving the prediction block to the upper left;
将所述预测块向左侧移动;moving the prediction block to the left;
将所述预测块向下方移动;moving the prediction block downward;
将所述预测块向右下方移动;moving the prediction block to the lower right;
将所述预测块向右侧移动;moving the prediction block to the right;
将所述预测块向右上方移动;以及moving the prediction block to the upper right; and
将所述预测块向计算得到的最接近的区域移动。The predicted block is moved towards the calculated closest area.
可选地,在一些实施例中,所述处理器1310还用于:基于所述预测块的边界值与第一区域的边界值,判断所述预测块是否位于所述参考帧的瓦片边界上,所述第一区域为所述瓦片边界受滤波影响的区域。Optionally, in some embodiments, the processor 1310 is further configured to: based on the boundary value of the prediction block and the boundary value of the first region, determine whether the prediction block is located at the tile boundary of the reference frame Above, the first region is the region where the tile boundary is affected by filtering.
可选地,在一些实施例中,所述处理器1310进一步用于:若所述预测块的任意边界位于所述第一区域内,对所述预测块的位置进行调整。Optionally, in some embodiments, the processor 1310 is further configured to: if any boundary of the prediction block is located in the first area, adjust the position of the prediction block.
可选地,在一些实施例中,所述处理器1310进一步用于:若所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的左边界值,且所述预测块在水平方向的右边界值小于或等于所述第一区域在水平方向的右边界值,对所述预测块的位置进行调整;和/或,若所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的右边界值,且所述预测块在水平方向的左边界值大于或等于所述第一区域在水平方向的左边界值,对所述预测块的位置进行调整。Optionally, in some embodiments, the processor 1310 is further configured to: if the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the The right boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the position of the prediction block is adjusted; and/or, if the prediction block is at the left boundary in the horizontal direction The value is less than or equal to the right boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction. position to adjust.
可选地,在一些实施例中,所述处理器1310进一步用于:若所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的上边界值,且所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向上的下边界值,对所述预测块的位置进行调整;和/或,若所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的下边界值,且所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的上边界值,对所述预测块的位置进行调整。Optionally, in some embodiments, the processor 1310 is further configured to: if the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the The lower boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, and the position of the prediction block is adjusted; and/or, if the prediction block is above the vertical direction The boundary value is less than or equal to the lower boundary value of the first region in the vertical direction, and the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the prediction Adjust the position of the block.
可选地,在一些实施例中,所述处理器1310进一步用于:若所述预测块的边界值与所述第一区域的边界值不满足预设条件,对所述预测块的位置进行调整;Optionally, in some embodiments, the processor 1310 is further configured to: if the boundary value of the prediction block and the boundary value of the first region do not meet a preset condition, perform a calculation on the position of the prediction block. adjust;
所述预设条件为以下条件中的至少一种:The preset condition is at least one of the following conditions:
所述预测块在水平方向的右边界值小于或等于所述第一区域在水平方向的左边界值;The right boundary value of the prediction block in the horizontal direction is less than or equal to the left boundary value of the first region in the horizontal direction;
所述预测块在水平方向的左边界值大于或等于所述第一区域在水平方向的右边界值;The left boundary value of the prediction block in the horizontal direction is greater than or equal to the right boundary value of the first region in the horizontal direction;
所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向的上边界值;和the lower boundary value of the prediction block in the vertical direction is less than or equal to the upper boundary value of the first region in the vertical direction; and
所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的下边界值。The upper boundary value of the prediction block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction.
可选地,在一些实施例中,所述处理器1310进一步用于:基于所述预测块的边界值与所述第一区域的边界值,对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部。Optionally, in some embodiments, the processor 1310 is further configured to: adjust the position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region, so that all The prediction block is located inside a tile of the reference frame.
可选地,在一些实施例中,所述处理器1310进一步用于:对所述预测块在水平方向的边界值增加第一阈值,所述第一阈值是基于所述预测块在水平方向的边界值和所述第一区域在水平方向的边界值以及第一预设值得到的;和/或,对所述预测块在垂直方向的边界值增加第二阈值,所述第二阈值是基于所述预测块在垂直方向的边界值和所述第一区域在垂直方向的边界值以及第二预设值得到的。Optionally, in some embodiments, the processor 1310 is further configured to: add a first threshold to the boundary value of the prediction block in the horizontal direction, where the first threshold is based on the prediction block in the horizontal direction The boundary value and the boundary value of the first region in the horizontal direction and the first preset value are obtained; and/or, a second threshold is added to the boundary value of the prediction block in the vertical direction, and the second threshold is based on The boundary value of the prediction block in the vertical direction, the boundary value of the first region in the vertical direction, and the second preset value are obtained.
可选地,在一些实施例中,若所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的左边界值,且所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的左边界值,所述第一阈值为负值;或,若所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的右边界值,且所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的右边界值,所述第一阈值为正值。Optionally, in some embodiments, if the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is less than or equal to the left boundary value of the first area in the horizontal direction, and the first threshold value is a negative value; or, if the left boundary value of the prediction block in the horizontal direction is less than or equal to the first area in the horizontal direction and the right boundary value of the prediction block in the horizontal direction is greater than or equal to the right boundary value of the first region in the horizontal direction, and the first threshold value is a positive value.
可选地,在一些实施例中,若所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的上边界值,且所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的上边界值,所述第二阈值为负值;或,若所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的下边界值,且所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的下边界值,所述第二阈值为正值。Optionally, in some embodiments, if the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the upper boundary value of the prediction block in the vertical direction is less than or equal to the upper boundary value of the first region in the vertical direction, and the second threshold value is a negative value; or, if the upper boundary value of the prediction block in the vertical direction is less than or equal to the vertical upper boundary value of the first region and the lower boundary value of the prediction block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction, and the second threshold value is a positive value.
可选地,在一些实施例中,若所述预测块在水平方向的左边界大于或等于所述第一区域在水平方向的左边界值,所述预测块在水平方向的右边界小于或等于所述第一区域在水平方向的右边界值,所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的上边界值,所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向的下边界值,所述第一阈值和/或所述第二阈值为正值或负值。Optionally, in some embodiments, if the left border of the prediction block in the horizontal direction is greater than or equal to the left border value of the first region in the horizontal direction, the right border of the prediction block in the horizontal direction is less than or equal to The right boundary value of the first region in the horizontal direction, the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction The value is less than or equal to the lower boundary value of the first region in the vertical direction, and the first threshold value and/or the second threshold value is a positive value or a negative value.
图14为本申请一实施例提供的一种解码装置1400,该解码装置1400可以包括处理器1410。FIG. 14 is a decoding apparatus 1400 provided by an embodiment of the present application. The decoding apparatus 1400 may include a processor 1410 .
处理器1410,所述处理器1410用于:确定当前图像块的运动矢量所指向的预测块位于参考帧的瓦片内部,所述当前图像块位于当前帧;基于所述预测块,对所述当前图像块进行解码。The processor 1410 is configured to: determine that the prediction block pointed to by the motion vector of the current image block is located inside the tile of the reference frame, and the current image block is located in the current frame; The current image block is decoded.
本发明实施例还提供一种编解码系统,包括:An embodiment of the present invention also provides an encoding and decoding system, including:
编码器,用于若当前图像块的运动矢量所指向的预测块位于第一参考帧的瓦片边界上,对所述预测块的位置进行调整,以使得所述预测块位于所述第一参考帧的瓦片内部;基于调整后的所述预测块,对所述当前待编码图像块进行编码;在编码过程中,对所述第一参考帧不进行瓦片边界滤波;其中,所述当前图像块位于当前帧;an encoder, configured to adjust the position of the prediction block if the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the first reference frame, so that the prediction block is located in the first reference frame Inside the tile of the frame; encode the current image block to be encoded based on the adjusted prediction block; during the encoding process, do not perform tile boundary filtering on the first reference frame; wherein the current The image block is located in the current frame;
解码器,用于基于解码得到的第二参考帧的预测块,对所述当前图像块进行解码;在解码过程中,对所述第二参考帧进行瓦片边界滤波。The decoder is configured to decode the current image block based on the prediction block of the second reference frame obtained by decoding; in the decoding process, perform tile boundary filtering on the second reference frame.
在本发明实施例中,关闭编码端的瓦片边界滤波功能,而开启解码端的瓦片边界滤波功能,既能实现在编码端显示时的画质,又能减少在解码端的数据交换和计算量。In the embodiment of the present invention, disabling the tile boundary filtering function on the encoding side and enabling the tile boundary filtering function on the decoding side can not only achieve the picture quality when displayed on the encoding side, but also reduce the amount of data exchange and computation on the decoding side.
需要说明的是,本发明实施例的编码器具体实施方式可参考上述任一实施例对视频编码方法的描述,在此不再赘述。It should be noted that, for the specific implementation manner of the encoder in this embodiment of the present invention, reference may be made to the description of the video encoding method in any of the foregoing embodiments, and details are not described herein again.
图15是本申请再一实施例提供的视频编解码装置的示意性结构图。图15所示的视频编解码装置1500包括处理器1510,处理器1510可以从存储器中调用并运行计算机程序,以实现上述图4-图12所述的方法。FIG. 15 is a schematic structural diagram of a video encoding and decoding apparatus provided by still another embodiment of the present application. The video coding and decoding apparatus 1500 shown in FIG. 15 includes a processor 1510, and the processor 1510 can call and run a computer program from a memory, so as to implement the methods described in FIG. 4-FIG. 12 above.
可选地,如图15所示,视频编解码装置1500还可以包括存储器1520。其中,处理器1510可以从存储器1520中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 15 , the video coding and decoding apparatus 1500 may further include a memory 1520 . The processor 1510 may call and run a computer program from the memory 1520 to implement the methods in the embodiments of the present application.
其中,存储器1520可以是独立于处理器1510的一个单独的器件,也可以集成在处理器1510中。The memory 1520 may be a separate device independent of the processor 1510, or may be integrated in the processor 1510.
可选地,如图15所示,视频编解码装置1500还可以包括收发器1530,处理器1510可以控制该收发器1530与其他装置进行通信,具体地,可以向其他装置发送信息或数据,或接收其他装置发送的信息或数据。Optionally, as shown in FIG. 15 , the video codec apparatus 1500 may further include a transceiver 1530, and the processor 1510 may control the transceiver 1530 to communicate with other apparatuses, specifically, may send information or data to other apparatuses, or Receive information or data sent by other devices.
可选地,该视频编解码装置例如可以是编码器、解码器、终端(包括但不限于手机、相机、无人机等),并且该编解码装置可以实现本申请实施例的各个方法中的相应流程,为了简洁,在此不再赘述。Optionally, the video encoding and decoding apparatus may be, for example, an encoder, a decoder, and a terminal (including but not limited to a mobile phone, a camera, a drone, etc.), and the encoding and decoding apparatus may implement the methods in the embodiments of the present application. For the sake of brevity, the corresponding process is not repeated here.
图16是本申请实施例的芯片的示意性结构图。图16所示的芯片1600 包括处理器1610,处理器1610可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。FIG. 16 is a schematic structural diagram of a chip according to an embodiment of the present application. The chip 1600 shown in FIG. 16 includes a processor 1610, and the processor 1610 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
可选地,如图16所示,芯片1600还可以包括存储器1620。其中,处理器1610可以从存储器1620中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 16 , the chip 1600 may further include a memory 1620 . The processor 1610 may call and run a computer program from the memory 1620 to implement the methods in the embodiments of the present application.
其中,存储器1620可以是独立于处理器1610的一个单独的器件,也可以集成在处理器1610中。The memory 1620 may be a separate device independent of the processor 1610, or may be integrated in the processor 1610.
可选地,该芯片1600还可以包括输入接口1630。其中,处理器1610可以控制该输入接口1630与其他装置或芯片进行通信,具体地,可以获取其他装置或芯片发送的信息或数据。Optionally, the chip 1600 may further include an input interface 1630 . The processor 1610 can control the input interface 1630 to communicate with other devices or chips, and specifically, can obtain information or data sent by other devices or chips.
可选地,该芯片1600还可以包括输出接口1640。其中,处理器1610可以控制该输出接口1640与其他装置或芯片进行通信,具体地,可以向其他装置或芯片输出信息或数据。Optionally, the chip 1600 may further include an output interface 1640 . The processor 1610 can control the output interface 1640 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-chip, or a system-on-a-chip, or the like.
本发明实施例还提供了一种芯片,包括处理电路,用于实现上述的编码方法获解码方法。An embodiment of the present invention further provides a chip, including a processing circuit, for implementing the above-mentioned encoding method and decoding method.
应理解,本申请实施例的处理器可能是一种集成电路图像处理系统,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be understood that the processor in this embodiment of the present application may be an integrated circuit image processing system, which has signal processing capability. In the implementation process, each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software. The above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Programming logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Wherein, the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory may be Random Access Memory (RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) ) and direct memory bus random access memory (Direct Rambus RAM, DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.
本申请实施例中的存储器可以向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器可以用于执行存储器中存储的指令,并且该处理器执行该指令时,该处理器可以执行上述方法实施例中与终端设备对应的各个步骤。The memory in the embodiments of the present application may provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor may be configured to execute the instruction stored in the memory, and when the processor executes the instruction, the processor may execute each step corresponding to the terminal device in the foregoing method embodiments.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器执行存储器中的指令,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the above-mentioned method can be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software. The steps of the methods disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory, and the processor executes the instructions in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, detailed description is omitted here.
还应理解,在本申请实施例中,图像中的像素点可以位于不同的行和/或列,其中,A的长度可以对应于A包括的位于同一行的像素点个数,A的高度可以对应于A包括的位于同一列的像素点个数。此外,A的长度和高度也可以分别称为A的宽度和深度,本申请实施例对此不做限定。It should also be understood that, in this embodiment of the present application, the pixels in the image may be located in different rows and/or columns, wherein the length of A may correspond to the number of pixels located in the same row included in A, and the height of A may be Corresponds to the number of pixels in the same column included in A. In addition, the length and height of A may also be referred to as the width and depth of A, respectively, which are not limited in this embodiment of the present application.
还应理解,在本申请实施例中,“与A的边界间隔分布”可以指与A的 边界间隔至少一个像素点,也可以称为“不与A的边界相邻”或者“不位于A的边界”,本申请实施例对此不做限定,其中,A可以是图像、矩形区域或子图像,等等。It should also be understood that, in this embodiment of the present application, "distributed at the boundary of A" may refer to at least one pixel point away from the boundary of A, and may also be referred to as "not adjacent to the boundary of A" or "not located at the boundary of A". "Boundary", which is not limited in this embodiment of the present application, where A may be an image, a rectangular area, or a sub-image, and so on.
还应理解,上文对本申请实施例的描述着重于强调各个实施例之间的不同之处,未提到的相同或相似之处可以互相参考,为了简洁,这里不再赘述。It should also be understood that the above description of the embodiments of the present application focuses on emphasizing the differences between the various embodiments, and the unmentioned same or similar points can be referred to each other, and are not repeated here for brevity.
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。Embodiments of the present application further provide a computer-readable storage medium for storing a computer program.
可选的,该计算机可读存储介质可应用于本申请实施例中的编码装置,并且该计算机程序使得计算机执行本申请实施例的各个方法中由编码装置实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer-readable storage medium can be applied to the encoding device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the encoding device in each method of the embodiments of the present application. For brevity, here No longer.
可选的,该计算机可读存储介质可应用于本申请实施例中的解码装置,并且该计算机程序使得计算机执行本申请实施例的各个方法中由解码装置实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer-readable storage medium can be applied to the decoding apparatus in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the decoding apparatus in each method of the embodiments of the present application. For brevity, here No longer.
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。Embodiments of the present application also provide a computer program product, including computer program instructions.
可选的,该计算机程序产品可应用于本申请实施例中的编码装置,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由编码装置实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program product can be applied to the encoding device in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the encoding device in the various methods of the embodiments of the present application. Repeat.
可选的,该计算机程序产品可应用于本申请实施例中的解码装置,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由解码装置实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program product can be applied to the decoding apparatus in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the decoding apparatus in each method of the embodiments of the present application. Repeat.
本申请实施例还提供了一种计算机程序。The embodiments of the present application also provide a computer program.
可选的,该计算机程序可应用于本申请实施例中的编码装置,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由编码装置实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program can be applied to the encoding device in the embodiments of the present application. When the computer program is run on the computer, the computer executes the corresponding processes implemented by the encoding device in each method of the embodiments of the present application. For the sake of brevity. , and will not be repeated here.
可选的,该计算机程序可应用于本申请实施例中的解码装置,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由解码装置实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program can be applied to the decoding device in the embodiments of the present application. When the computer program is run on the computer, the computer is made to execute the corresponding processes implemented by the decoding device in the various methods of the embodiments of the present application. For the sake of brevity. , and will not be repeated here.
应理解,在本申请实施例中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that, in this embodiment of the present application, the term "and/or" is only an association relationship for describing associated objects, indicating that there may be three kinds of relationships. For example, A and/or B can mean that A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this document generally indicates that the related objects are an "or" relationship.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. Interchangeability, the above description has generally described the components and steps of each example in terms of function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present application.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部 分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application are essentially or part of contributions to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed in the present application. Modifications or substitutions shall be covered by the protection scope of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (32)

  1. 一种视频编码的方法,其特征在于,包括:A method for video coding, comprising:
    若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上,对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部,从而使得当在编码端不进行瓦片边界滤波而在解码端进行瓦片边界滤波时,所述编码端进行编码时所参考的预测块的像素值和所述解码端进行解码时所参考的预测块的像素值能够保持一致,所述当前图像块位于当前帧;If the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, the position of the prediction block is adjusted so that the prediction block is located inside the tile of the reference frame, so that when When tile boundary filtering is not performed at the encoding end and tile boundary filtering is performed at the decoding end, the pixel value of the prediction block referred to by the encoding end for encoding and the pixel value of the prediction block referred to by the decoding end for decoding The value can be kept consistent, and the current image block is located in the current frame;
    基于调整后的所述预测块,对所述当前图像块进行编码。The current image block is encoded based on the adjusted prediction block.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    在对所述当前图像块进行编码的过程中,使能所述瓦片边界滤波。During encoding of the current image block, the tile boundary filtering is enabled.
  3. 根据权利要求2所述的方法,其特征在于,所述使能所述瓦片边界滤波,包括:The method according to claim 2, wherein the enabling the tile boundary filtering comprises:
    将码流数据中的瓦片边界滤波使能标志位置为1;其中,所述瓦片边界滤波使能标志位位于所述码流数据的图片数据集、序列参数集、条带头、图像头或序列头中。The tile boundary filtering enable flag in the code stream data is set to 1; wherein, the tile boundary filtering enable flag is located in the picture data set, sequence parameter set, slice header, image header or in the sequence header.
  4. 根据权利要求1所述的方法,其特征在于,所述对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部,包括:The method according to claim 1, wherein the adjusting the position of the prediction block so that the prediction block is located inside the tile of the reference frame comprises:
    基于预设规则对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部。The position of the prediction block is adjusted based on a preset rule, so that the prediction block is located inside the tile of the reference frame.
  5. 根据权利要求4所述的方法,其特征在于,所述预设规则包括:The method according to claim 4, wherein the preset rule comprises:
    将所述预测块按照以下方式中的至少一种方式进行调整:The prediction block is adjusted in at least one of the following ways:
    将所述预测块向左上方移动;moving the prediction block to the upper left;
    将所述预测块向左侧移动;moving the prediction block to the left;
    将所述预测块向下方移动;moving the prediction block downward;
    将所述预测块向右下方移动;moving the prediction block to the lower right;
    将所述预测块向右侧移动;moving the prediction block to the right;
    将所述预测块向右上方移动;以及moving the prediction block to the upper right; and
    将所述预测块向计算得到的最接近的区域移动。The predicted block is moved towards the calculated closest area.
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    基于所述预测块的边界值与第一区域的边界值,判断所述预测块是否位 于所述参考帧的瓦片边界上,所述第一区域为所述瓦片边界受滤波影响的区域。Based on the boundary value of the prediction block and the boundary value of the first region, it is determined whether the prediction block is located on the tile boundary of the reference frame, and the first region is the region affected by the filtering of the tile boundary.
  7. 根据权利要求6所述的方法,其特征在于,所述若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上,对所述预测块的位置进行调整,包括:The method according to claim 6, wherein if the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, adjusting the position of the prediction block comprises:
    若所述预测块的任意边界位于所述第一区域内,对所述预测块的位置进行调整。If any boundary of the prediction block is located in the first area, the position of the prediction block is adjusted.
  8. 根据权利要求7所述的方法,其特征在于,所述若所述预测块的任意边界位于所述第一区域内,对所述预测块的位置进行调整,包括:The method according to claim 7, wherein, if any boundary of the prediction block is located in the first area, adjusting the position of the prediction block comprises:
    若所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的左边界值,且所述预测块在水平方向的右边界值小于或等于所述第一区域在水平方向的右边界值,对所述预测块的位置进行调整;和/或,If the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the right boundary value of the prediction block in the horizontal direction is less than or equal to the horizontal boundary value of the first region the right boundary value of the direction to adjust the position of the prediction block; and/or,
    若所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的右边界值,且所述预测块在水平方向的左边界值大于或等于所述第一区域在水平方向的左边界值,对所述预测块的位置进行调整。If the left boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is greater than or equal to the first region in the horizontal direction The left boundary value of the direction to adjust the position of the prediction block.
  9. 根据权利要求7所述的方法,其特征在于,所述若所述预测块的任意边界位于所述第一区域内,对所述预测块的位置进行调整,包括:The method according to claim 7, wherein, if any boundary of the prediction block is located in the first area, adjusting the position of the prediction block comprises:
    若所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的上边界值,且所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向上的下边界值,对所述预测块的位置进行调整;和/或,If the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction is less than or equal to the vertical boundary value of the first region the lower boundary value in the direction to adjust the position of the prediction block; and/or,
    若所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的下边界值,且所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的上边界值,对所述预测块的位置进行调整。If the upper boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, and the upper boundary value of the prediction block in the vertical direction is greater than or equal to the vertical boundary value of the first region The upper boundary value of the direction to adjust the position of the prediction block.
  10. 根据权利要求6所述的方法,其特征在于,所述若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上,对所述预测块的位置进行调整,包括:The method according to claim 6, wherein if the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, adjusting the position of the prediction block comprises:
    若所述预测块的边界值与所述第一区域的边界值不满足预设条件,对所述预测块的位置进行调整;If the boundary value of the prediction block and the boundary value of the first region do not meet a preset condition, adjusting the position of the prediction block;
    所述预设条件为以下条件中的至少一种:The preset condition is at least one of the following conditions:
    所述预测块在水平方向的右边界值小于或等于所述第一区域在水平方向的左边界值;The right boundary value of the prediction block in the horizontal direction is less than or equal to the left boundary value of the first region in the horizontal direction;
    所述预测块在水平方向的左边界值大于或等于所述第一区域在水平方向的右边界值;The left boundary value of the prediction block in the horizontal direction is greater than or equal to the right boundary value of the first region in the horizontal direction;
    所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向的上边界值;和the lower boundary value of the prediction block in the vertical direction is less than or equal to the upper boundary value of the first region in the vertical direction; and
    所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的下边界值。The upper boundary value of the prediction block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction.
  11. 根据权利要求6至10中任一项所述的方法,其特征在于,所述对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部,包括:The method according to any one of claims 6 to 10, wherein the adjusting the position of the prediction block so that the prediction block is located inside the tile of the reference frame comprises:
    基于所述预测块的边界值与所述第一区域的边界值,对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部。Based on the boundary value of the prediction block and the boundary value of the first region, the position of the prediction block is adjusted so that the prediction block is located inside the tile of the reference frame.
  12. 根据权利要求11所述的方法,其特征在于,所述基于所述预测块的边界值与所述第一区域的边界值,对所述预测块的位置进行调整,包括:The method according to claim 11, wherein the adjusting the position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region comprises:
    对所述预测块在水平方向的边界值增加第一阈值,所述第一阈值是基于所述预测块在水平方向的边界值和所述第一区域在水平方向的边界值以及第一预设值得到的;和/或,A first threshold is added to the boundary value of the prediction block in the horizontal direction, the first threshold is based on the boundary value of the prediction block in the horizontal direction and the boundary value of the first region in the horizontal direction and a first preset value obtained; and/or,
    对所述预测块在垂直方向的边界值增加第二阈值,所述第二阈值是基于所述预测块在垂直方向的边界值和所述第一区域在垂直方向的边界值以及第二预设值得到的。adding a second threshold value to the boundary value of the prediction block in the vertical direction, the second threshold value is based on the boundary value of the prediction block in the vertical direction and the boundary value of the first region in the vertical direction and a second preset value obtained.
  13. 根据权利要求12所述的方法,其特征在于,若所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的左边界值,且所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的左边界值,所述第一阈值为负值;或,The method according to claim 12, wherein if the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the prediction block is horizontal in the horizontal direction The left boundary value is less than or equal to the left boundary value of the first region in the horizontal direction, and the first threshold value is a negative value; or,
    若所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的右边界值,且所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的右边界值,所述第一阈值为正值。If the left boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the right boundary value of the prediction block in the horizontal direction is greater than or equal to the first region in the horizontal direction The right boundary value of the direction, the first threshold value is a positive value.
  14. 根据权利要求11或12所述的方法,其特征在于,若所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的上边界值,且所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的上边界值,所述第二阈值为负值;或,The method according to claim 11 or 12, wherein if the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the prediction block is in the vertical direction The upper boundary value of the direction is less than or equal to the upper boundary value of the first region in the vertical direction, and the second threshold value is a negative value; or,
    若所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直 方向的下边界值,且所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的下边界值,所述第二阈值为正值。If the upper boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction is greater than or equal to the vertical boundary value of the first region The lower boundary value of the direction, the second threshold value is a positive value.
  15. 根据权利要求12所述的方法,其特征在于,若所述预测块在水平方向的左边界大于或等于所述第一区域在水平方向的左边界值,所述预测块在水平方向的右边界小于或等于所述第一区域在水平方向的右边界值,所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的上边界值,所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向的下边界值,所述第一阈值和/或所述第二阈值为正值或负值。The method according to claim 12, wherein if the left boundary of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, the right boundary of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the prediction block is in the vertical direction The lower boundary value of is less than or equal to the lower boundary value of the first region in the vertical direction, and the first threshold and/or the second threshold are positive or negative.
  16. 一种视频编码的装置,其特征在于,包括:A device for video encoding, comprising:
    处理器,所述处理器用于:若当前图像块的运动矢量所指向的预测块位于参考帧的瓦片边界上,对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部,从而使得当在编码端不进行瓦片边界滤波而在解码端进行瓦片边界滤波时,所述编码端进行编码时所参考的预测块的像素值和所述解码端进行解码时所参考的预测块的像素值能够保持一致,所述当前图像块位于当前帧;a processor, the processor is configured to: if the prediction block pointed to by the motion vector of the current image block is located on the tile boundary of the reference frame, adjust the position of the prediction block so that the prediction block is located in the reference frame Inside the tile of the frame, so that when tile boundary filtering is not performed at the encoding end and tile boundary filtering is performed at the decoding end, the pixel value of the prediction block referenced by the encoding end when encoding is performed with the decoding end. The pixel values of the prediction block referenced during decoding can be kept consistent, and the current image block is located in the current frame;
    基于调整后的所述预测块,对所述当前图像块进行编码。The current image block is encoded based on the adjusted prediction block.
  17. 根据权利要求16所述的装置,其特征在于,所述处理器进一步用于:The apparatus of claim 16, wherein the processor is further configured to:
    在对所述当前图像块进行编码的过程中,使能所述瓦片边界滤波。During encoding of the current image block, the tile boundary filtering is enabled.
  18. 根据权利要求17所述的装置,其特征在于,所述处理器进一步用于:The apparatus of claim 17, wherein the processor is further configured to:
    将码流数据中的瓦片边界滤波使能标志位置为1;其中,所述瓦片边界滤波使能标志位位于所述码流数据的图片数据集、序列参数集、条带头、图像头或序列头中。The tile boundary filtering enable flag in the code stream data is set to 1; wherein, the tile boundary filtering enable flag is located in the picture data set, sequence parameter set, slice header, image header or in the sequence header.
  19. 根据权利要求16所述的装置,其特征在于,所述处理器进一步用于:The apparatus of claim 16, wherein the processor is further configured to:
    基于预设规则对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部。The position of the prediction block is adjusted based on a preset rule, so that the prediction block is located inside the tile of the reference frame.
  20. 根据权利要求19所述的装置,其特征在于,所述预设规则包括:The device according to claim 19, wherein the preset rule comprises:
    将所述预测块按照以下方式中的至少一种方式进行调整:The prediction block is adjusted in at least one of the following ways:
    将所述预测块向左上方移动;moving the prediction block to the upper left;
    将所述预测块向左侧移动;moving the prediction block to the left;
    将所述预测块向下方移动;moving the prediction block downward;
    将所述预测块向右下方移动;moving the prediction block to the lower right;
    将所述预测块向右侧移动;moving the prediction block to the right;
    将所述预测块向右上方移动;以及moving the prediction block to the upper right; and
    将所述预测块向计算得到的最接近的区域移动。The predicted block is moved towards the calculated closest area.
  21. 根据权利要求16所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 16, wherein the processor is further configured to:
    基于所述预测块的边界值与第一区域的边界值,判断所述预测块是否位于所述参考帧的瓦片边界上,所述第一区域为所述瓦片边界受滤波影响的区域。Based on the boundary value of the prediction block and the boundary value of the first region, it is determined whether the prediction block is located on the tile boundary of the reference frame, and the first region is the region affected by the filtering of the tile boundary.
  22. 根据权利要求21所述的装置,其特征在于,所述处理器进一步用于:The apparatus of claim 21, wherein the processor is further configured to:
    若所述预测块的任意边界位于所述第一区域内,对所述预测块的位置进行调整。If any boundary of the prediction block is located in the first area, the position of the prediction block is adjusted.
  23. 根据权利要求21所述的装置,其特征在于,所述处理器进一步用于:The apparatus of claim 21, wherein the processor is further configured to:
    若所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的左边界值,且所述预测块在水平方向的右边界值小于或等于所述第一区域在水平方向的右边界值,对所述预测块的位置进行调整;和/或,If the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the right boundary value of the prediction block in the horizontal direction is less than or equal to the horizontal boundary value of the first region the right boundary value of the direction to adjust the position of the prediction block; and/or,
    若所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的右边界值,且所述预测块在水平方向的左边界值大于或等于所述第一区域在水平方向的左边界值,对所述预测块的位置进行调整。If the left boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is greater than or equal to the first region in the horizontal direction The left boundary value of the direction to adjust the position of the prediction block.
  24. 根据权利要求21所述的装置,其特征在于,所述处理器进一步用于:The apparatus of claim 21, wherein the processor is further configured to:
    若所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的上边界值,且所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向上的下边界值,对所述预测块的位置进行调整;和/或,If the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction is less than or equal to the vertical boundary value of the first region the lower boundary value in the direction to adjust the position of the prediction block; and/or,
    若所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的下边界值,且所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的上边界值,对所述预测块的位置进行调整。If the upper boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, and the upper boundary value of the prediction block in the vertical direction is greater than or equal to the vertical boundary value of the first region The upper boundary value of the direction to adjust the position of the prediction block.
  25. 根据权利要求20所述的装置,其特征在于,所述处理器进一步用 于:The apparatus of claim 20, wherein the processor is further configured to:
    若所述预测块的边界值与所述第一区域的边界值不满足预设条件,对所述预测块的位置进行调整;If the boundary value of the prediction block and the boundary value of the first region do not meet a preset condition, adjusting the position of the prediction block;
    所述预设条件为以下条件中的至少一种:The preset condition is at least one of the following conditions:
    所述预测块在水平方向的右边界值小于或等于所述第一区域在水平方向的左边界值;The right boundary value of the prediction block in the horizontal direction is less than or equal to the left boundary value of the first region in the horizontal direction;
    所述预测块在水平方向的左边界值大于或等于所述第一区域在水平方向的右边界值;The left boundary value of the prediction block in the horizontal direction is greater than or equal to the right boundary value of the first region in the horizontal direction;
    所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向的上边界值;和the lower boundary value of the prediction block in the vertical direction is less than or equal to the upper boundary value of the first region in the vertical direction; and
    所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的下边界值。The upper boundary value of the prediction block in the vertical direction is greater than or equal to the lower boundary value of the first region in the vertical direction.
  26. 根据权利要求21至25中任一项所述的装置,其特征在于,所述处理器进一步用于:The apparatus according to any one of claims 21 to 25, wherein the processor is further configured to:
    基于所述预测块的边界值与所述第一区域的边界值,对所述预测块的位置进行调整,以使得所述预测块位于所述参考帧的瓦片内部。Based on the boundary value of the prediction block and the boundary value of the first region, the position of the prediction block is adjusted so that the prediction block is located inside the tile of the reference frame.
  27. 根据权利要求26所述的装置,其特征在于,所述处理器进一步用于:The apparatus of claim 26, wherein the processor is further configured to:
    对所述预测块在水平方向的边界值增加第一阈值,所述第一阈值是基于所述预测块在水平方向的边界值和所述第一区域在水平方向的边界值以及第一预设值得到的;和/或,A first threshold is added to the boundary value of the prediction block in the horizontal direction, the first threshold is based on the boundary value of the prediction block in the horizontal direction and the boundary value of the first region in the horizontal direction and a first preset value obtained; and/or,
    对所述预测块在垂直方向的边界值增加第二阈值,所述第二阈值是基于所述预测块在垂直方向的边界值和所述第一区域在垂直方向的边界值以及第二预设值得到的。adding a second threshold value to the boundary value of the prediction block in the vertical direction, the second threshold value is based on the boundary value of the prediction block in the vertical direction and the boundary value of the first region in the vertical direction and a second preset value obtained.
  28. 根据权利要求27所述的装置,其特征在于,若所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的左边界值,且所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的左边界值,所述第一阈值为负值;或,28. The device according to claim 27, wherein if the right boundary value of the prediction block in the horizontal direction is greater than or equal to the left boundary value of the first region in the horizontal direction, and the prediction block is in the horizontal direction The left boundary value is less than or equal to the left boundary value of the first region in the horizontal direction, and the first threshold value is a negative value; or,
    若所述预测块在水平方向的左边界值小于或等于所述第一区域在水平方向的右边界值,且所述预测块在水平方向的右边界值大于或等于所述第一区域在水平方向的右边界值,所述第一阈值为正值。If the left boundary value of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, and the right boundary value of the prediction block in the horizontal direction is greater than or equal to the first region in the horizontal direction The right boundary value of the direction, the first threshold value is a positive value.
  29. 根据权利要求27或28所述的装置,其特征在于,若所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的上边界值,且所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的上边界值,所述第二阈值为负值;或,The apparatus according to claim 27 or 28, wherein if the lower boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the prediction block is in the vertical direction The upper boundary value of the direction is less than or equal to the upper boundary value of the first region in the vertical direction, and the second threshold value is a negative value; or,
    若所述预测块在垂直方向的上边界值小于或等于所述第一区域在垂直方向的下边界值,且所述预测块在垂直方向的下边界值大于或等于所述第一区域在垂直方向的下边界值,所述第二阈值为正值。If the upper boundary value of the prediction block in the vertical direction is less than or equal to the lower boundary value of the first region in the vertical direction, and the lower boundary value of the prediction block in the vertical direction is greater than or equal to the vertical boundary value of the first region The lower boundary value of the direction, the second threshold value is a positive value.
  30. 根据权利要求28所述的装置,其特征在于,若所述预测块在水平方向的左边界大于或等于所述第一区域在水平方向的左边界值,所述预测块在水平方向的右边界小于或等于所述第一区域在水平方向的右边界值,所述预测块在垂直方向的上边界值大于或等于所述第一区域在垂直方向的上边界值,所述预测块在垂直方向的下边界值小于或等于所述第一区域在垂直方向的下边界值,所述第一阈值和/或所述第二阈值为正值或负值。The apparatus according to claim 28, wherein if the left border of the prediction block in the horizontal direction is greater than or equal to the left border value of the first region in the horizontal direction, the right border of the prediction block in the horizontal direction is less than or equal to the right boundary value of the first region in the horizontal direction, the upper boundary value of the prediction block in the vertical direction is greater than or equal to the upper boundary value of the first region in the vertical direction, and the prediction block is in the vertical direction The lower boundary value of is less than or equal to the lower boundary value of the first region in the vertical direction, and the first threshold value and/or the second threshold value is a positive value or a negative value.
  31. 一种计算机可读存储介质,其特征在于,包括用于执行权利要求1至15中任一项所述的方法的指令。A computer-readable storage medium comprising instructions for performing the method of any one of claims 1 to 15.
  32. 一种芯片,包括处理电路,用于执行权利要求1至15中任一项所述的方法的指令。A chip comprising processing circuitry for executing instructions of the method of any one of claims 1 to 15.
PCT/CN2020/104529 2020-07-24 2020-07-24 Video coding and decoding method and device WO2022016535A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080005888.1A CN112970252A (en) 2020-07-24 2020-07-24 Video coding and decoding method and device
PCT/CN2020/104529 WO2022016535A1 (en) 2020-07-24 2020-07-24 Video coding and decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/104529 WO2022016535A1 (en) 2020-07-24 2020-07-24 Video coding and decoding method and device

Publications (1)

Publication Number Publication Date
WO2022016535A1 true WO2022016535A1 (en) 2022-01-27

Family

ID=76271523

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/104529 WO2022016535A1 (en) 2020-07-24 2020-07-24 Video coding and decoding method and device

Country Status (2)

Country Link
CN (1) CN112970252A (en)
WO (1) WO2022016535A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101990098A (en) * 2009-07-31 2011-03-23 索尼公司 Image processing apparatus and method
CN101990097A (en) * 2009-07-29 2011-03-23 索尼公司 Image processing apparatus and image processing method
CN103891292A (en) * 2011-10-24 2014-06-25 联发科技股份有限公司 Method and apparatus for non-cross-tile loop filtering
CN110115038A (en) * 2016-12-22 2019-08-09 佳能株式会社 Encoding device, coding method and program, decoding device, coding/decoding method and program
JP2020061701A (en) * 2018-10-12 2020-04-16 シャープ株式会社 Dynamic image coding device and dynamic image decoding device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8923633B2 (en) * 2011-03-07 2014-12-30 Panasonic Intellectual Property Corporation Of America Image decoding method, image coding method, image decoding apparatus, and image coding apparatus
JP6120707B2 (en) * 2013-07-08 2017-04-26 ルネサスエレクトロニクス株式会社 Video encoding apparatus and operation method thereof
US11184636B2 (en) * 2017-06-28 2021-11-23 Sharp Kabushiki Kaisha Video encoding device and video decoding device
WO2020032049A1 (en) * 2018-08-06 2020-02-13 シャープ株式会社 Moving image decoding apparatus and moving image encoding apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101990097A (en) * 2009-07-29 2011-03-23 索尼公司 Image processing apparatus and image processing method
CN101990098A (en) * 2009-07-31 2011-03-23 索尼公司 Image processing apparatus and method
CN103891292A (en) * 2011-10-24 2014-06-25 联发科技股份有限公司 Method and apparatus for non-cross-tile loop filtering
CN110115038A (en) * 2016-12-22 2019-08-09 佳能株式会社 Encoding device, coding method and program, decoding device, coding/decoding method and program
JP2020061701A (en) * 2018-10-12 2020-04-16 シャープ株式会社 Dynamic image coding device and dynamic image decoding device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Y. -K. WANG (QUALCOMM), J. CHON (QUALCOMM), Y. CHEN (QUALCOMM), I. S. CHONG (QUALCOMM), M. COBAN (QUALCOMM), M. KARCZEWICZ (QUALCO: "Flexible tile dependency and loop filter control", 8. JCT-VC MEETING; 20120201 - 20120210; SAN JOSE; (JOINT COLLABORATIVE TEAM ON VIDEO CODING OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JCTVC-H0521, 31 January 2012 (2012-01-31), XP030231918 *

Also Published As

Publication number Publication date
CN112970252A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
US11375199B2 (en) Interpolation filter for an inter prediction apparatus and method for video coding
US20220345699A1 (en) In-loop filtering method and device
WO2021196035A1 (en) Video coding method and apparatus
CN116567207B (en) Method and apparatus for intra prediction
KR20150047379A (en) Video encoding devic and driving method thereof
WO2020132908A1 (en) Decoding prediction method and apparatus, and computer storage medium
CN111869215B (en) Method and device for predicting limited long-distance motion vector
WO2021056212A1 (en) Method and apparatus for video encoding and decoding
WO2022016535A1 (en) Video coding and decoding method and device
CN118077201A (en) Method, apparatus and medium for video processing
CN112534824B (en) Method and apparatus for video encoding
CN114363635B (en) Information processing method and device, equipment and storage medium
WO2023198057A1 (en) Method, apparatus, and medium for video processing
CN112640458A (en) Information processing method and device, equipment and storage medium
WO2023051654A1 (en) Method, apparatus, and medium for video processing
WO2022217474A1 (en) Video encoding and decoding methods, apparatus, system, and storage medium
WO2022110131A1 (en) Inter-frame prediction method and apparatus, and encoder, decoder and storage medium
WO2023051653A1 (en) Method, apparatus, and medium for video processing
WO2021134700A1 (en) Method and apparatus for video encoding and decoding
WO2024078598A1 (en) Method, apparatus, and medium for video processing
WO2024077562A1 (en) Coding method and apparatus, decoding method and apparatus, coder, decoder, code stream, and storage medium
WO2024078599A1 (en) Method, apparatus, and medium for video processing
WO2021056920A1 (en) Method and apparatus for video encoding and decoding
US20240187599A1 (en) Image decoding method and apparatus therefor
CN118044195A (en) Method, apparatus and medium for video processing

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: 20945972

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: 20945972

Country of ref document: EP

Kind code of ref document: A1