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

Video coding and decoding method and device Download PDF

Info

Publication number
CN112970252A
CN112970252A CN202080005888.1A CN202080005888A CN112970252A CN 112970252 A CN112970252 A CN 112970252A CN 202080005888 A CN202080005888 A CN 202080005888A CN 112970252 A CN112970252 A CN 112970252A
Authority
CN
China
Prior art keywords
prediction block
boundary value
boundary
region
vertical direction
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202080005888.1A
Other languages
Chinese (zh)
Inventor
缪泽翔
郑萧桢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SZ DJI Technology Co Ltd
Original Assignee
SZ DJI Technology Co Ltd
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 SZ DJI Technology Co Ltd filed Critical SZ DJI Technology Co Ltd
Publication of CN112970252A publication Critical patent/CN112970252A/en
Pending legal-status Critical Current

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

Landscapes

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

Abstract

A method and apparatus for video encoding and decoding, comprising: if the prediction block pointed by the motion vector of the current image block is positioned on the tile boundary of a reference frame, adjusting the position of the prediction block to ensure that the prediction block is positioned inside a tile of the reference frame, so that when tile boundary filtering is not performed at an encoding end and tile boundary filtering is performed at a decoding end, the pixel value of the prediction block referred to when the encoding end performs encoding and the pixel value of the prediction block referred to when the decoding end performs decoding can be kept consistent, and the current image block is positioned at the current frame; and encoding the current image block based on the adjusted prediction block. According to the scheme, the prediction block pointed by the motion vector of the current image block is adjusted to the inside of the tile, so that the complexity of an encoder can be further reduced, and the image quality deterioration caused by the block boundary effect of the image on the tile boundary can be avoided.

Description

Video coding and decoding method and device
Technical Field
The present application relates to the field of image processing, and more particularly, to a method and apparatus for video encoding and decoding.
Background
At present, in practical applications, as demands for video resolution and frame rate are increasing, a single-core hardware encoder cannot meet the demands, and a multi-core hardware encoder can provide higher encoding performance, so that the demands for higher resolution and frame rate can be met. A multi-core hardware encoder will typically divide an image or video into a plurality of tiles (tiles), with each core being responsible for the encoding and decoding of one or more of the tiles.
Since the image is divided into a plurality of cores for encoding, a more obvious boundary blocking effect is more likely to occur at the divided boundary of the image, thereby resulting in poor image display quality and a reduced user experience in watching video. In the High Efficiency Video Coding standard (HEVC), information and function switches related to image tiling are stored in a Picture Parameter Set (PPS), in which there is a switch loop _ filter _ across _ tiles _ enabled _ flag whether filtering is performed at tile boundaries. For the above problem, in an implementation manner, the loop _ filter _ across _ tiles _ enabled _ flag may be set to 1, that is, filtering may be performed on a Coding Tree Unit (CTU) on a tile boundary, but this approach may additionally increase implementation complexity of an encoder because more data exchange needs to be performed on the tile boundary; in another implementation, the loop _ filter _ across _ tiles _ enabled _ flag may be set to 0, that is, the tile boundary is not filtered, but the decoded image may have a significant block boundary effect at the tile boundary, which may result in degraded subjective quality. Because the code stream is completely consistent between the encoding end and the decoding end, when the loop _ filter _ across _ tiles _ enabled _ flag is 1, the encoding end and the decoding end both carry out tile boundary filtering operation; when the loop _ filter _ across _ tiles _ enabled _ flag is 0, neither the encoding side nor the decoding side performs the tile boundary filtering operation.
Therefore, how to eliminate the boundary blocking effect caused by different cores encoding different images in the same video and reduce the encoder complexity becomes a problem to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a method and a device for video coding and decoding, which can set a loop _ filter _ across _ tiles _ enabled _ flag to be 1, but do not perform tile boundary filtering at a coding end to reduce the complexity of a coder, and perform tile boundary filtering at a decoding end to relatively not reduce the subjective quality, solve the defects and shortcomings of the prior art in which filtering is performed at the coding end and the decoding end at the same time, and simultaneously ensure that the effects and effects of a reconstructed image at the coding end and a decoded image at the decoding end are completely consistent when the reconstructed image at the decoding end and the decoded image at the decoding end are used as reference frames, and further, because filtering operation is performed at the decoding end, the potential tile boundary block effect of the decoded image can be reduced, and the watching experience of a user can be improved.
In a first aspect, a method for video coding is provided, including: if the prediction block pointed by the motion vector of the current image block is positioned on the tile boundary of a reference frame, adjusting the position of the prediction block to ensure that the prediction block is positioned inside a tile of the reference frame, so that when tile boundary filtering is not performed at an encoding end and tile boundary filtering is performed at a decoding end, the pixel value of the prediction block referred to when the encoding end performs encoding and the pixel value of the prediction block referred to when the decoding end performs decoding can be kept consistent, and the current image block is positioned at the current frame; and encoding the current image block based on the adjusted prediction block.
In the video encoding method provided by the embodiment of the present application, if the prediction block pointed 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 may be adjusted to the inside of the tile, so that the current image block is encoded based on the adjusted prediction block. The prediction block pointed by the motion vector of the current image block is adjusted to the inside of the tile, so that all pixels of the prediction block are not in a tile boundary filtering area needing filtering, tile boundary filtering can be realized at an encoding end without carrying out tile boundary filtering and at a decoding end without introducing decoding errors caused by inconsistency between the prediction block at the encoding end and the prediction block at the decoding end due to the fact that the encoding end does not carry out tile boundary filtering and the decoding end carries out tile boundary filtering, and the complexity of an encoder can be further reduced.
In a second aspect, an apparatus for video encoding is provided that includes 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, and executing the method in the first aspect or each implementation manner thereof.
For brevity, the description of the first aspect is omitted here for brevity.
In a third aspect, a chip is provided, which comprises a processing circuit for implementing the method of the first aspect.
Drawings
FIG. 1 is an architecture diagram of a solution applying an embodiment of the present application;
fig. 2 is a schematic diagram of a video coding framework 2 according to 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 flow chart of an encoding method provided by an embodiment of the present application;
fig. 5a is a schematic diagram of a partition of a video to be encoded according to an embodiment of the present application;
fig. 5b is a schematic diagram of a partition of a video to be encoded provided by another embodiment of the present application;
fig. 5c is a schematic diagram of a partition of a video to be encoded provided by a further embodiment of the present application;
fig. 6 is a schematic flow chart of a decoding method provided in an embodiment of the present application;
fig. 7 is a schematic diagram of a video coding framework 2 according to another embodiment of the present application;
fig. 8 is a schematic diagram of information included after partitioning a video to be encoded according to an embodiment of the present application;
FIG. 9a is a diagram illustrating inter-frame prediction according to an embodiment of the present application;
FIG. 9b is a diagram illustrating inter-frame prediction according to another embodiment of the present application;
FIG. 9c is a diagram illustrating inter-frame prediction according to yet another embodiment of the present application;
FIG. 10a is a schematic diagram of a region where the boundary of a divided tile is affected by filtering according to an embodiment of the present application;
FIG. 10b is a diagram of a region where the boundary of a divided tile is affected by filtering according to another embodiment of the present application;
FIG. 10c is a schematic diagram of a region where the boundaries of a divided tile are affected by filtering according to another embodiment of the present application;
FIG. 11a is a schematic diagram of a position of a prediction block according to an embodiment of the present application;
FIG. 11b is a diagram illustrating the location of a prediction block according to another embodiment of the present application;
FIG. 11c is a diagram illustrating the location of a prediction block according to another embodiment of the present application;
fig. 12a is a schematic diagram of adjusting the position of an original prediction block according to an embodiment of the present application;
FIG. 12b is a diagram illustrating an adjustment of the position of an original prediction block according to another embodiment of the present application;
FIG. 12c is a diagram illustrating an adjustment of the position of an original prediction block according to another embodiment of the present application;
FIG. 12d is a diagram illustrating an adjustment of the position of an original prediction block according to still another embodiment of the present application;
FIG. 12e is a diagram illustrating an adjustment of the position of an original prediction block according to still 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 device provided in an embodiment of the present application;
fig. 16 is a schematic structural diagram of a chip provided in an embodiment of the present application.
Detailed Description
The following describes technical solutions in the embodiments of the present application.
Unless otherwise defined, all technical and scientific terms used in the examples of this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to limit the scope of the present application.
Fig. 1 is an architecture diagram of a solution to which an embodiment of the present application is applied.
As shown in FIG. 1, the system 100 can receive the data 102 to be processed, process the data 102 to be processed, and generate processed data 108. For example, the system 100 may receive data to be encoded, encoding the data to be encoded to produce encoded data, or the system 100 may receive data to be decoded, decoding the data to be decoded to produce decoded data. In some embodiments, the components in system 100 may be implemented by one or more processors, which may be processors in a computing device or in a mobile device (e.g., a drone). The processor may be any kind 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, a codec, or the like. One or more memories may also be included in the system 100. The memory may be used to store instructions and data, such as computer-executable instructions to implement aspects of embodiments of the invention, pending data 102, processed data 108, and the like. The memory may be any kind of memory, which is not limited in this embodiment of the present invention.
The data to be encoded may include text, images, graphical 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 (e.g., cameras, infrared sensors), microphones, near-field sensors (e.g., ultrasonic sensors, radar), position sensors, temperature sensors, touch sensors, and so forth. In some cases, the data to be encoded may include information from the user, e.g., biometric information, which may include facial features, fingerprint scans, retinal scans, voice recordings, DNA samples, and the like.
Fig. 2 is a schematic diagram of a video coding framework 2 according to an embodiment of the present application. As shown in fig. 2, after receiving the video to be encoded, each frame of the video to be encoded is encoded in turn, starting from the first frame of the video to be encoded. Wherein, the current coding frame mainly passes through: and (3) processing Prediction (Prediction), transformation (Transform), Quantization (Quantization), Entropy Coding (encoding) and the like, and finally outputting the code stream of the current Coding frame. Correspondingly, the decoding process generally decodes the received code stream according to the inverse process of the above process to recover the video frame information before decoding.
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 during 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, and controls the selection of an intra mode or an inter mode, and the parameter control of motion estimation and filtering, and the control parameters of the encoding control module 201 are also input to the entropy encoding module and encoded to form a part of the encoded code stream.
When the current coding frame is coded, the coding frame is divided 202, specifically, the coding frame is divided into slices (slices) and then divided into blocks. Optionally, in an example, the encoded frame is divided into a plurality of largest mutually non-overlapping CTUs, each CTU may also be iteratively divided into a series of smaller Coding Units (CUs) in a quadtree manner, or a binary tree manner, or a ternary tree manner, respectively, and in some examples, a CU may further include a Prediction Unit (PU) and a Transform Unit (TU) associated therewith, where the PU is a basic Unit of Prediction and the TU is a basic Unit of Transform and quantization. In some examples, a PU and a TU are each divided into one or more blocks on a CU basis, where a PU includes multiple Prediction Blocks (PBs) and associated syntax elements. In some examples, the PU and TU may be the same or derived from the CU by different partitioning methods. In some examples, at least two of the CU, PU, and TU are the same, e.g., without distinguishing the CU, PU, and TU, all are predicted, quantized, and transformed in units of CUs. For convenience of description, a CTU, CU, or other formed data unit is hereinafter referred to as an encoded block.
It should be understood that in the embodiments of the present application, the data unit for video coding may be a frame, a slice, a coding tree unit, a coding block or a group of any of the above. The size of the data units may vary in different embodiments.
Specifically, as shown in fig. 2, after the encoded frame is divided into a plurality of encoded blocks, a prediction process is performed to remove redundant information in spatial domain and temporal domain of the current encoded frame. The currently used prediction coding methods include intra-frame prediction and inter-frame prediction. Intra-frame prediction uses only the reconstructed information in the current frame image to predict the current coding block, while inter-frame prediction uses information in other frame images (also called reference frames) that have been reconstructed before to predict the current coding block. Specifically, in the embodiment of the present application, the encoding control module 201 is configured to decide to select intra prediction or inter prediction.
When the intra-frame prediction mode is selected, the intra-frame prediction 203 includes obtaining reconstructed blocks of adjacent blocks coded around the current coding block as reference blocks, calculating predicted values to generate prediction blocks by adopting a prediction mode method based on pixel values of the reference blocks, subtracting corresponding pixel values of the current coding block and the prediction blocks to obtain residual errors of the current coding block, and transforming 204, quantizing 205 and entropy coding 210 the residual errors of the current coding block to form a code stream of the current coding block. Furthermore, after all the coding blocks of the current coding frame are subjected to the coding process, a part of the coding code stream of the coding frame is formed. In addition, the control and reference data generated in intra prediction 203 is also entropy encoded 210, forming part of the encoded code stream.
In particular, the transform 204 is used to remove correlation of the residuals of the 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 (DCT) transformation and two-dimensional Discrete Sine Transform (DST) transformation are usually adopted, for example, at the encoding end, the residual information of the coding block is multiplied by an N × M transformation matrix and its transpose matrix, respectively, and the Transform coefficient of the current coding block is obtained after multiplication.
After the transform coefficients are generated, quantization 205 is used to further improve the compression efficiency, the transform coefficients are quantized to obtain quantized coefficients, and then entropy Coding 210 is performed on the quantized coefficients to obtain the residual code stream of the current Coding block, wherein the entropy Coding method includes, but is not limited to, Content Adaptive Binary Arithmetic Coding (CABAC) entropy Coding. And finally, storing the bit stream obtained by entropy coding and the coded coding mode information or sending the bit stream and the coded coding mode information to a decoding end. At the encoding end, the quantized result is also dequantized 206 and the dequantized result is inverse transformed 207. After the inverse transformation 207, the reconstructed pixel is obtained using the inverse transformation result and the motion compensation result. The reconstructed pixels are then filtered (i.e., 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 the embodiment of the present application, the reconstructed image may also be referred to as a reconstructed image or a reconstructed image.
Specifically, the encoded neighboring blocks in the intra prediction 203 process are: before the current coding block is coded, the residual error generated in the coding process of the adjacent block is transformed 204, quantized 205, dequantized 206 and inverse transformed 207, and then is added to the prediction block of the adjacent block to obtain a reconstructed block. Correspondingly, inverse quantization 206 and inverse transform 207 are inverse processes of quantization 206 and transform 204, and are used to recover residual data prior to quantization and transformation.
As shown in fig. 2, when the inter prediction mode is selected, the inter prediction process includes Motion Estimation (ME) 208 and Motion Compensation (MC) 209. Specifically, the encoding end may perform Motion estimation 208 according to a reference frame image in the reconstructed video frame, and search, according to a certain matching criterion, an image block most similar to the current coding block in one or more reference frame images as a prediction block, where a relative displacement between the prediction block and the current coding block is a Motion Vector (MV) of the current coding block. And subtracting the original value of the pixel of the coding block from the corresponding pixel value of the prediction block to obtain the residual error of the coding block. The residual of the current coding block is transformed 204, quantized 205 and entropy coded 210 to form a part of the coded stream of the coded frame. For the decoding side, motion compensation 209 may be performed based on the determined motion vector and the prediction block to obtain the current coding block.
As shown in fig. 2, the reconstructed video frame is a video frame obtained after being filtered 211. The reconstructed video frame includes one or more reconstructed images. The filtering 211 is used to reduce compression distortion such as blocking effect and ringing effect generated in the encoding process, the reconstructed video frame is used to provide a reference frame for inter-frame prediction in the encoding process, and the reconstructed video frame is output as a final decoded video after post-processing in the decoding process.
In particular, the inter Prediction mode may include an Advanced Motion Vector Prediction (AMVP) mode, a Merge (Merge) mode, or a skip (skip) mode.
For the AMVP mode, Motion Vector Prediction (MVP) may be determined first, after obtaining MVP, a start point of Motion estimation may be determined according to MVP, Motion search may be performed near the start point, an optimal MV may be obtained after the search is completed, a position of a reference block in a reference image is determined by the MV, a residual block is obtained by subtracting a current block from the reference block, a Motion Vector Difference (MVD) is obtained by subtracting MVP from the MV, and an index of the MVD and the MVP is transmitted to a decoding end through a code stream.
For the Merge mode, the MVP may be determined first, and directly determined as the MV of the current block. In order to obtain the MVP, a candidate MVP list (merge candidate list) may be first constructed, where the candidate MVP list may include at least one candidate MVP, each candidate MVP may correspond to an index, after selecting an MVP from the candidate MVP list, the encoding end may write the MVP index into the code stream, and then the decoding end may find the MVP corresponding to the index from the candidate MVP list according to the index, so as to implement decoding of the image block.
It should be understood that the above process is just one specific implementation of the Merge mode. The Merge mode may also have other implementations.
For example, Skip mode is a special case of Merge mode. After obtaining the MV according to the Merge mode, if the encoding side determines that the current block and the reference block are substantially the same, it is not necessary to transmit residual data, only the index of the MVP needs to be transmitted, and further, a flag may be transmitted, which may indicate that the current block may be directly obtained from the reference block.
That is, the Merge mode is characterized by: MV ═ MVP (MVD ═ 0); and Skip mode has one more feature, namely: the reconstructed value rec is the predicted value pred (residual value resi is 0).
The Merge mode can be applied to the geometric prediction technology. In the geometric prediction technology, an image block to be encoded may be divided into a plurality of sub image blocks having polygonal shapes, a motion vector may be determined for each sub image block from a motion information candidate list, a predictor block corresponding to each sub image block may be determined based on the motion vector of each sub image block, and a prediction block of a current image block may be constructed based on the predictor block corresponding to each sub image block, thereby implementing encoding of the current image block.
In order to remove the Blocking effect of the encoded and reconstructed image, the High Efficiency Video Coding (HEVC) standard uses a Deblocking Filter (DBF) technique in a Coding loop to improve the subjective quality of a Video and the reference Efficiency of a reconstructed frame. The DBF technology has the function of correcting and reconstructing the pixel value of the coding block, particularly the pixel value near the boundary of the coding block, so that the aim of eliminating the block effect brought by the coding and decoding algorithm is fulfilled. The DBF has mainly two steps, namely the decision of the block boundary filter strength and the filtering of the block boundary pixels.
The filtering order of the DBF in HEVC is to filter according to the raster order with the CTU as the basic unit, and first perform vertical boundary filtering and then perform horizontal boundary filtering. As shown in fig. 3, solid dots in the figure represent pixel points, a solid black line in the figure represents the boundary of an image block to be filtered, and a thick black dashed frame part represents processing blocks of 8x8 size for performing filtering operation, each of which spans 4 blocks to be filtered of 8x8 and includes a "+" shaped edge. Thus, each processing block aims to filter the boundaries of the "+" shape and contains all the filtering data required by itself, which enables the filtering operation to be performed on each 8 × 8 processing block individually, and is beneficial to the parallel filtering operation of HEVC. The DBF technology can modify the pixel values of at most 3 pixel points on the left side and the right side of the image block boundary to smooth the boundary of the image block.
For the decoding end, the operation corresponding to the encoding end is performed. Firstly, residual error information is obtained by utilizing entropy decoding, inverse quantization and inverse transformation, and whether the current image block uses intra-frame prediction or inter-frame prediction is determined according to a decoded code stream. If the prediction is intra-frame prediction, the reconstructed image block in the current frame is utilized to construct prediction information according to an intra-frame prediction method; if the inter-frame prediction is carried out, motion information needs to be analyzed, and a reference block is determined in the reconstructed image by using the analyzed motion information to obtain prediction information; and then, superposing the prediction information and the residual information, and obtaining the reconstruction information through filtering operation.
In practical applications, as the demands for video resolution and frame rate are increasing, a single-core hardware encoder cannot meet the demands, and a multi-core hardware encoder can provide higher encoding performance, so that the demands for higher resolution and frame rate can be met. A multi-core hardware encoder will typically divide an image or video into a plurality of tiles, with each core being responsible for the encoding of one or more of the tiles.
It should be understood that, in the embodiment of the present application, a plurality of tiles obtained by dividing an image or a video may also be referred to as image blocks, and the present application is not particularly limited thereto.
Since the image is divided into a plurality of cores for encoding, a more distinct boundary may appear at the boundary where the image is divided, resulting in a reduction in the viewing experience of the user.
For the above problem, in a first implementation manner, it may be selected that neither the encoding end nor the decoding end performs filtering on tile boundaries, but an obvious block boundary effect may occur at tile boundaries in a decoded image, which may result in poor subjective quality; the second implementation manner is that tile boundary filtering can be performed at both the encoding end and the decoding end, so that the block boundary effect at the tile boundary can be solved, but display is not required at the encoding end, extra data exchange and calculation amount are brought by performing tile boundary filtering, and the implementation complexity of the encoding process is improved.
The application provides a video coding and video decoding method, which can realize that not only the complexity of a coder is reduced by not carrying out tile boundary filtering at a coding end, but also the subjective quality is not reduced by carrying out tile boundary filtering at a decoding end, thereby solving the defects and shortcomings of the prior art in which filtering is carried out at the coding end and the decoding end simultaneously, ensuring that the effect and the effect of a reconstructed image at the coding end and a decoded image at the decoding end are completely consistent when the reconstructed image and the decoded image are used as reference frames, and further reducing the potential tile boundary block effect of the decoded image and improving the watching experience of a user because filtering operation is carried out at the decoding end.
The method 400 for video encoding provided by the embodiment of the present application will be described in detail below with reference to fig. 4.
As shown in fig. 4, a method 400 for video encoding according to an embodiment of the present application is provided, where the method 400 may be executed by an encoding end, and the method 400 may include steps 410 and 420.
If the prediction block pointed 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 the tile boundary filtering is not performed at the encoding end and the tile boundary filtering is performed at the decoding end, the pixel value of the prediction block referred to by the encoding end when encoding and the pixel value of the prediction block referred to by the decoding end when decoding can be kept consistent, and the current image block is located in the current frame.
If step 410 is not performed, when the tile boundary filtering is not performed at the encoding end, and the tile boundary filtering is performed at the decoding end, when the prediction block is located on the tile boundary, the prediction block referred to by the encoding end during encoding will not be consistent with the prediction block referred to by the decoding end during decoding, thereby causing a decoding error.
In the embodiment of the present invention, since the prediction block after position adjustment is located inside the tile of the reference frame, when the encoding end does not perform tile boundary filtering and the decoding end performs tile boundary filtering, the prediction block (after position adjustment) referred to by the encoding end during encoding is located inside each tile of the reference frame, and furthermore, since the prediction block location information during decoding is completely the same as the prediction block location information of the encoding end, the prediction block referred to by the decoding end during decoding is also located inside each tile of the reference frame, and is not related to the boundary, thereby ensuring consistency of the two, and avoiding the decoding error caused by tile boundary filtering performed at the decoding end without performing tile boundary filtering at the encoding end. In addition, in the embodiment of the invention, the tile boundary filtering is not needed to be carried out at the encoding end, the calculation amount of data exchange and filtering at the encoding end is reduced, meanwhile, the tile boundary filtering is carried out at the decoding end, and the image quality deterioration caused by the block boundary effect of the image at the tile boundary is also avoided.
It is noted that the prediction block is located inside the tile of the reference frame, and includes a region where the boundary between the prediction block and the tile of the reference frame needs to be filtered is not overlapped. In addition, the adjustment of the prediction block position may be achieved by adjusting the motion vector.
The prediction block in the embodiment of the present application may be one or more reference blocks in a plurality of reference blocks, where the reference block is located in a reference frame, where the reference frame may be a previous frame and/or a next frame of a current frame, may also be previous frames and/or next frames of the current frame, and may also be a fixed frame, which is not limited in this application in particular.
In the embodiment of the present application, the size of a plurality of tiles included in the divided reference frame may be the same, that is, when the reference frame is divided, the reference frame may be divided vertically or horizontally from the center of the reference frame; the size of the tiles included in the divided reference frame may also be different, that is, the reference frame may not be divided vertically or horizontally from the center of the reference frame when the reference frame is divided.
For example, as shown in fig. 5a, an exemplary diagram of the division of a certain frame (which may be a reference frame in this application) image in a video to be encoded is provided for an embodiment of this application. Two tiles, tile 1 and tile 2, each of rectangular shape, may be obtained by dividing the reference frame horizontally.
Where each tile may include an integer number of CTUs, tile 1 and tile 2 may be separately encoded using different processors when encoding.
Fig. 5b is a schematic diagram of a partition of a picture of a frame (which may be a reference frame in this application) in a video to be encoded according to another embodiment of this application. Two tiles, tile 3 and tile 4, can be obtained by vertically dividing the reference frame, each tile being rectangular.
Similarly, each tile may include an integer number of CTUs, and when encoding, tile 3 and tile 4 may be separately encoded using different processors.
Fig. 5c is a schematic diagram of a division of a picture of a frame (which may be a reference frame in this application) in a video to be encoded, provided for a further embodiment of this application. Four tiles, tile 5, tile 6, tile 7 and tile 8, each of rectangular shape, may be obtained by dividing the reference frame vertically and horizontally.
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 separately using different processors.
It should be understood that horizontal division in the embodiments of the present application may refer to division of an image from a horizontal direction, and vertical division may refer to division of an image from a vertical direction.
In the embodiment of the present application, if the prediction 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 prediction block may be adjusted, that is, the prediction block may be shifted to a certain direction, so that the moved prediction block is located inside the tile of the reference frame.
And 420, encoding the current image block based on the adjusted prediction block.
In the video encoding method provided by the embodiment of the present application, if the prediction block pointed 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 may be adjusted to the inside of the tile, so that the current image block is encoded based on the adjusted prediction block. The prediction block pointed by the motion vector of the current image block is adjusted to the inside of the tile, so that all pixels of the prediction block are not in a tile boundary filtering area needing filtering, tile boundary filtering can be realized at an encoding end without carrying out tile boundary filtering and at a decoding end without introducing decoding errors caused by inconsistency between the prediction block at the encoding end and the prediction block at the decoding end due to the fact that the encoding end does not carry out tile boundary filtering and the decoding end carries out tile boundary filtering, and the complexity of an encoder can be further reduced.
Optionally, in some embodiments, the method further comprises: enabling the tile boundary filtering in encoding the current image block.
Optionally, in some embodiments, said enabling said tile boundary filtering comprises: setting the tile boundary filtering enabling flag position in code stream data to be 1; and the tile boundary filtering enabling flag bit is positioned in a picture data set, a sequence parameter set, a slice header, an image header or a sequence header of the code stream data.
In this embodiment, tile boundary filtering is enabled, that is, a tile boundary filtering enabling flag bit loop _ filter _ across _ tiles _ enabled _ flag in code stream data is set to 1. The tile boundary filtering enable flag bit loop _ filter _ across _ tiles _ enabled _ flag is located in a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), a slice header, a Picture header or a Sequence header in the code stream data or other header data. The embodiment of the invention can realize that the loop _ filter _ across _ tiles _ enabled _ flag is set to be 1, but the tile boundary filtering is not carried out at the encoding end to reduce the complexity of the encoder, and the tile boundary filtering is carried out at the decoding end to ensure that the subjective quality is not reduced relatively, thereby overcoming the defects and shortcomings of the prior art in which the filtering is carried out at the encoding end and the decoding end simultaneously, ensuring that the action and the effect of the reconstructed image at the encoding end and the decoded image at the decoding end are completely consistent when the reconstructed image and the decoded image are used as reference frames, and further reducing the potential tile boundary block effect of the decoded image due to the filtering operation at the decoding end and improving the viewing experience of users.
Accordingly, for the decoding side, the decoding side can perform decoding based on the above-described encoding process.
As shown in fig. 6, a method 600 for video encoding according to an embodiment of the present application is provided, where the method 600 may include steps 610 and 620.
It is determined 610 that the prediction block pointed to by the motion vector of the current image block, which is located in the current frame, is located inside a tile of the reference frame.
It can be understood that, since the encoding end adjusts the position of the prediction block pointed by the motion vector of the current image block to the inside of the tile during the encoding process, the encoding is performed based on the adjusted prediction block. Accordingly, in the process of decoding, 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 is noted that the prediction block being located inside a tile of the reference frame may mean that the prediction block is not located on the boundary of the tile, i.e. not located in the first region mentioned below. In other words, the prediction block is not located in the first region mentioned below, i.e., the prediction block is understood to be located inside a tile of the reference frame.
Decoding 620 the current image block based on the prediction block.
It should be understood that 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 decode the current image block based on the prediction block.
In the method for video decoding provided by the embodiment of the present application, the decoding end may determine that the prediction block pointed by the motion vector of the current image block is located inside a tile of the reference frame, so as to decode the current image block based on the prediction block. Therefore, the encoding end does not carry out boundary filtering during encoding, the decoding end can carry out tile boundary filtering during decoding, subjective quality is not reduced relatively, meanwhile, the decoding end decoded image and the encoding end reconstructed image can be guaranteed to be completely consistent, and further, the watching experience of a user can be improved.
In order to facilitate understanding of the scheme of the present application, a method for video encoding provided by the embodiment of the present application will be described below with reference to fig. 7.
Fig. 7 is a schematic diagram of a video coding framework 2 according to another embodiment of the present application. Wherein a tile boundary information partition 212 is added to the video coding frame diagram. Specifically, the encoding end may perform motion estimation 208 according to a reference frame image in the reconstructed video frame, and search, according to a certain matching criterion, an image block most similar to the current coding block in one or more reference frame images as a prediction block, where a relative displacement between the prediction block and the current coding block is a motion vector of the current coding block. If the prediction block obtained according to the tile boundary information division judgment is located on the tile boundary, the position of the prediction block can be adjusted to the inside of the tile, and the original value of the pixel of the coding block and the corresponding pixel value of the prediction block are subtracted to obtain the residual error of the coding block. The residual of the current coding block is transformed 204, quantized 205 and entropy coded 210 to form a part of the coded stream of the coded frame. For the decoding side, motion compensation 209 may be performed based on the motion vector and the prediction block determined as described above, thereby obtaining a current block.
The dividing 202 of the encoded frame may refer to performing tile dividing on the encoded frame, and sending the divided tile boundary information to the inter-frame prediction module, so that the inter-frame prediction module performs judgment and executes corresponding operations when performing the motion estimation 208 and the motion compensation 209.
The divided tile boundary information may include: tile i _ x _ start, tile i _ x _ end, tile i _ y _ start, tile i _ y _ end. The tile i _ x _ start represents the start coordinate of the ith tile in the horizontal direction, the tile i _ x _ end represents the end coordinate of the ith tile in the horizontal direction, the tile i _ y _ start represents the start coordinate of the ith tile in the vertical direction, and the tile i _ y _ end represents the end coordinate of the ith tile in the vertical direction.
As shown in fig. 8, a schematic diagram of information included after dividing video to be encoded is provided for the embodiment of the present application. Shown in fig. 8 is the vertical division of the reference frame into two tiles, tile 0 and tile 1, respectively. Taking 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 start coordinate of tile 1 in the vertical direction, and tile 1_ y _ end represents the end coordinate of tile 1 in the vertical direction.
It is noted above that the position of the prediction block may be adjusted when it is determined that the prediction block pointed to by the motion vector of the current image block is located on a tile boundary of the reference frame. The adjustment mode may include various modes, and details are described below.
Optionally, in some embodiments, said adjusting the position of the prediction block so that the prediction block is located inside a tile of the reference frame comprises: adjusting a position of the prediction block based on a preset rule such that the prediction block is located inside a tile of the reference frame.
Optionally, in some embodiments, the preset rule includes: adjusting the prediction block 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 downward and rightward;
moving the prediction block to the right;
moving the prediction block to the upper right; and
moving the prediction block to the calculated closest region.
In the embodiment of the present application, as shown in fig. 9a, a schematic diagram of inter-frame prediction provided in the embodiment of the present application is shown. Two tiles, tile 1 and tile 2, may be obtained by dividing the reference frame horizontally. As can be seen from fig. 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 upwards to adjust the prediction block to the inside of tile 1, as indicated by the dashed line in fig. 9 a.
Fig. 9b is a schematic diagram of inter-frame prediction according to another embodiment of the present application. Two tiles, tile 3 and tile 4, may be obtained by vertically partitioning the reference frame. As can be seen in fig. 9b, the prediction block for 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 inside of tile 3, as indicated by the dashed line in fig. 9 b.
Fig. 9c is a schematic diagram of inter-frame prediction according to another embodiment of the present application. Four tiles, tile 5, tile 6, tile 7 and tile 8, may be obtained by dividing the reference frame vertically and horizontally. As can be seen in fig. 9c, the prediction block for 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 inside of tile 5, as indicated by the dashed line in fig. 9 c.
Similarly, other possible approaches are similar to those described above and, for brevity, will not be described again here.
It should be particularly noted that, in the implementation of the present application, moving the prediction block to the closest calculated region may be understood as: moving the prediction block towards a region in which a majority of blocks of the prediction block are located. Referring to fig. 9c, a prediction block of a current image block is located on a tile boundary of a reference frame, and most blocks of the prediction block are located in tile 5, and thus, the prediction block may be moved to a region of tile 5 such that the prediction block is adjusted into tile 5.
The above describes various ways 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 reference frame. An implementation of determining that the prediction block pointed to by the motion vector of the current image block is located on a tile boundary of a reference frame will be described below, see in particular below.
In the embodiment of the present application, the position of the prediction block to which the determined motion vector points may be adjusted. More preferably, if the motion vector is a motion vector in the candidate list, the motion vector may be marked, the marking being intended to identify that the motion vector is not available in a 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 of a left image block, an upper image block, and the like of each image block. Wherein the candidate list can be represented 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 tabular form or other form, without limitation.
Optionally, in some embodiments, the method further comprises: determining whether the prediction block is located on a tile boundary of the reference frame based on a boundary value of the prediction block and a boundary value of a first region, the first region being a region where the tile boundary is affected by filtering.
Fig. 10a is a schematic diagram of a region where a boundary of a divided tile is affected by filtering according to an embodiment of the present application. Referring to fig. 10a, two tiles, tile 1 and tile 2, may be obtained by dividing the reference frame horizontally, where the thicker solid black line in the middle of the reference frame is a tile dividing boundary line, and the area formed by the upper and lower dashed lines and the left and right boundaries of the reference frame may be the first area in the embodiment of the present application.
According to the scheme provided by the embodiment of the application, whether the prediction block pointed by the motion vector is positioned on the tile boundary of the reference frame is judged through the boundary value of the prediction block and the boundary value of the first area, so that the encoding end is facilitated to determine whether to adjust the position of the prediction block pointed by the motion vector.
Optionally, in some embodiments, the 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 a tile boundary of a reference frame includes: and if any boundary of the prediction block is positioned in the first area, adjusting the position of the prediction block.
As described above, the first area in the embodiment of the present application may be an area where the tile boundary is affected by filtering. Referring to fig. 10a, two tiles, tile 1 and tile 2, can be obtained by dividing the reference frame horizontally, and the area formed by the upper and lower dotted lines and the left and right boundaries of the reference frame is the first area in this application. Assuming that an arbitrary boundary of a prediction block of the current image block is located within the first region, it may be determined that the prediction block to which the motion vector points is located on a tile boundary of the reference frame, so that the position of the prediction block may be adjusted.
As shown in FIG. 10a, it can be seen that the lower boundary of the prediction block 1-1 is located within the first region, the upper boundary of the prediction block 1-2 is located within the first region, and all the boundaries of the prediction block 2 are located within the first region. If the prediction block pointed to by the motion vector is located at the position of one of the 3 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 adjusted.
Referring to fig. 10b, two tiles, namely tile 3 and tile 4, can be obtained by vertically dividing the reference frame, and the region formed by the left and right dashed lines and the upper and lower boundaries of the reference frame is the first region in this application. Assuming that an arbitrary boundary of a prediction block of the current image block is located within the first region, it may be determined that the prediction block to which the motion vector points is located on a tile boundary of the reference frame, so that the position of the prediction block may be adjusted.
As shown in FIG. 10b, it can be seen that the right boundary of the prediction block 3-1 is located within the first region, the left boundary of the prediction block 3-2 is located within the first region, and all the boundaries of the prediction block 4 are located within the first region. If the prediction block pointed to by the motion vector is located at the position of one of the 3 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 adjusted.
Referring to fig. 10c, four tiles, namely tile 5, tile 6, tile 7 and tile 8, are obtained by dividing the reference frame horizontally and vertically, and the area formed by all the dotted lines in the figure and the boundary of the reference frame is the first area in this application. Assuming that an arbitrary boundary of a prediction block of the current image block is located within the first region, it may be determined that the prediction block to which the motion vector points is located on a tile boundary of the reference frame, so that the position of the prediction block may be adjusted.
As shown in FIG. 10c, it can be seen that the right and lower boundaries of the prediction block 5-1 are located within the first region, the left and lower boundaries of the prediction block 5-2 are located within the first region, the left boundary of the prediction block 5-3 is located within the first region, and all the boundaries of the prediction block 6 are located within the first region. If the prediction block pointed to by the motion vector is located at the position of one of the 4 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 adjusted.
It should be noted that the positions of the prediction blocks are merely examples, and the present application may be applied as long as any boundary of the prediction block is located in the first region, and the present application is not particularly limited.
In addition, the boundary value of the prediction block in the embodiment of the present application may refer to a 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 an x value of the prediction block in the coordinate system, and the upper boundary value and the lower boundary value of the prediction block may refer to a y value of the prediction block in the coordinate system.
According to the scheme provided by the embodiment of the application, if any boundary of the prediction block pointed by the motion vector is located in the first region, the position of the prediction block pointed by the motion vector can be adjusted to the inside of the tile, and the encoding end can be free from tile boundary filtering, so that the complexity of an encoder can be further reduced.
Optionally, in some embodiments, if any boundary of the prediction block is located in the first region, adjusting the position of the prediction block includes: if the right boundary value of the prediction block in the horizontal direction is larger than or equal to the left boundary value of the first area in the horizontal direction, and 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 area in the horizontal direction, adjusting 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 area 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 area in the horizontal direction, adjusting the position of the prediction block.
The coordinate system referred to by the right and left boundaries in the embodiment of the present application may be a two-dimensional coordinate system, for example, as shown in fig. 8 described above, the upper left corner of the prediction block may be located at the origin o of the coordinate system, the direction horizontally rightward from the origin o may be the X direction in the present application, and the direction vertically downward from the origin o may be the Y direction in the present application.
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 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, the position of the prediction block is more possible. One possibility is that the right boundary of the prediction block is located in the first region and the left boundary of the prediction block is not located in the first region, as in prediction block 3-1 in fig. 10 b; another possibility is that both the right and left boundaries of the prediction block are located in the first region, like the prediction block 4 in fig. 10 b.
Based on what is described above, it can be understood that the position of the prediction block can be adjusted if the right boundary of the prediction block in the horizontal direction is located within the first region.
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, the position of the prediction block is more likely. One possibility is that the left boundary of the prediction block is located in the first region and the right boundary of the prediction block is not located in the first region, as in prediction block 3-2 in fig. 10 b; another possibility is that both the left and right boundaries of the prediction block are located in the first region, like the prediction block 4 in fig. 10 b.
Based on what is described above, it can be understood that the position of the prediction block may be adjusted if the left boundary of the prediction block in the horizontal direction is located within the first region.
According to the scheme provided by the embodiment of the application, the position of the prediction block can be determined to be adjusted by judging the boundary value of the prediction block and the boundary value of the first region, so that the encoding end does not carry out tile boundary filtering, and the complexity of an encoder can be further reduced.
Optionally, in some embodiments, if any boundary of the prediction block is located in the first region, adjusting the position of the prediction block includes: 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 area 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 area in the vertical direction, adjusting the position of the prediction block; and/or adjusting the position of the prediction block 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 area 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 area in the vertical direction.
In the 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 less than or equal to the lower boundary value of the first region in the vertical direction, the position of the prediction block is more possible. One possibility is that the lower boundary of the prediction block is located in the first region and the upper boundary of the prediction block is not located in the first region, as in prediction block 1-1 in fig. 10 a; another possibility is that both the lower and upper boundaries of the prediction block are located in the first region, as in prediction block 2 in fig. 10 a.
Based on the above description, it can be understood that the position of the prediction block may be adjusted if the lower boundary of the prediction block in the vertical direction is located within the first region.
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, the position of the prediction block is variously possible. One possibility is that the upper boundary of the prediction block is located in the first region and the lower boundary of the prediction block is not located in the first region, as in prediction block 1-2 in fig. 10 a; another possibility is that both the upper and lower boundaries of the prediction block are located in the first region, as in prediction block 2 in fig. 10 a.
Based on what is described above, it can be understood that the position of the prediction block can be adjusted if the upper boundary of the prediction block in the vertical direction is located within the first region.
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, and the region formed by all the dotted lines in the figure and the boundary of the reference frame is the first region in the present application, the position of the predicted block is possible in many ways. One possibility is that all boundaries of the prediction block are located within the first region, as in prediction block 6 in fig. 10 c; another possibility is that part of the boundary of the prediction block is located within the first region, such as prediction block 5-1, prediction block 5-2 and prediction block 5-3 in FIG. 10 c.
It is understood that, if the partial boundary of the prediction block is located in the first region, the location of the prediction block is not limited to that shown in fig. 10c, and may be located in other locations without limitation.
According to the scheme provided by the embodiment of the application, the position of the prediction block can be determined to be adjusted by judging the boundary value of the prediction block and the boundary value of the first region, so that the encoding end does not carry out tile boundary filtering, and the complexity of an encoder can be further reduced.
Optionally, in some embodiments, the 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 a tile boundary of a reference frame includes: and if the boundary value of the prediction block and the boundary value of the first area do not meet the preset condition, adjusting the position of the prediction block.
The preset condition is at least one of the following conditions: a right boundary value of the prediction block in a horizontal direction is less than or equal to a left boundary value of the first region in the horizontal direction; a left boundary value of the prediction block in a horizontal direction is greater than or equal to a right boundary value of the first region in the horizontal direction; a lower boundary value of the prediction block in a vertical direction is less than or equal to an upper boundary value of the first region in the vertical direction; and an upper boundary value of the prediction block in a vertical direction is greater than or equal to a lower boundary value of the first region in the vertical direction.
In the embodiment of the present application, if the reference frame is horizontally divided into two tiles, namely tile 1 and tile 2, an area formed by an upper dotted line and a lower dotted line and a left boundary and a right boundary of the reference frame is a first area in the present application. The position of the prediction block 1 as in fig. 11a can be expressed as: a lower boundary value of the prediction block in the vertical direction is less than or equal to an upper boundary value of the first region in the vertical direction; the position of the prediction block 2 as in fig. 11a can be expressed as: an upper boundary value of the prediction block in the vertical direction is greater than or equal to a lower boundary value of the first region in the vertical direction.
In the embodiment of the present application, if the prediction block pointed by the motion vector of the current image block is not the position of the prediction block 1 or the prediction block 2, that is, the prediction block pointed by the motion vector of the current image block overlaps with the first region, the position of the prediction block may be adjusted.
In the embodiment of the present application, if the reference frame is vertically divided into two tiles, namely tile 3 and tile 4, an area formed by the left and right dashed lines and the upper boundary and the lower boundary of the reference frame is the first area in the present application. The position of the prediction block 3 as in fig. 11b can be expressed as: a right boundary value of the prediction block in the horizontal direction is less than or equal to a left boundary value of the first region in the horizontal direction; the position of the prediction block 4 as in fig. 11b can be expressed as: a left boundary value of the prediction block in the horizontal direction is greater than or equal to a right boundary value of the first region in the horizontal direction.
In the embodiment of the present application, if the prediction block pointed by the motion vector of the current image block is not the position of the prediction block 3 or the prediction block 4, that is, the prediction block pointed by the motion vector of the current image block overlaps with the first region, the position of the prediction block may be adjusted.
In addition, as shown in fig. 11c, if the reference frame is divided horizontally and vertically to obtain four tiles, which are tile 5, tile 6, tile 7, and tile 8, an area formed by all the dotted lines in the figure and the boundary of the reference frame is the first area in the present application. The positions of the prediction block 5, prediction block 6, prediction block 7 and prediction block 8 as in fig. 11c may be expressed that all boundaries of the prediction block are located outside the first area.
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 positions of the prediction block 5, the prediction block 6, the prediction block 7, and the prediction block 8, that is, the prediction block pointed to by the motion vector of the current image block overlaps with the first region, the position of the prediction block may be adjusted.
According to the scheme provided by the embodiment of the application, the position of the prediction block can be determined to be adjusted by judging that the prediction block is overlapped with the first area, so that tile boundary filtering is not performed at a coding end, and the complexity of an encoder can be further reduced.
As indicated above, the encoding side may determine whether the prediction block is located on a tile boundary of the reference frame based on a boundary value of the prediction block and a boundary value of a first region, wherein the first region is a region where the tile boundary is affected by filtering. The determination of the first region can be determined in the following manner, as described in detail below.
If the reference frame is vertically divided into two tiles, the left boundary and the right boundary of the first area may 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)
Wherein 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 start coordinate of the i-th Tile in the horizontal direction, offset _ left1, offset _ left2, offset _ right1, offset _ right2 represent offset values, offset _ left1 may take an integer greater than or equal to 3, and offset _ left2 may take an integer greater than or equal to 4; offset _ right1 may take an integer greater than or equal to 4 and offset _ right2 may take an integer greater than or equal to 4.
The left and right boundaries of the prediction block to which the motion vector of the current image block points may be determined by equation (3) and equation (4), respectively.
pred_block_left=block_x*4+mv_x (3)
pred_block_right=(block_x+block_width-1)*4+mv_x (4)
Where 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 top 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 width of the current image block.
If equation (5) holds, it may be determined that the prediction block pointed to by the motion vector of the current image block overlaps the first region.
Figure BDA0003041872510000211
It should be noted that the above formula (5) may mean that if the right boundary of the prediction block and the left boundary of the first region do not satisfy pred _ block _ right < fbd _ zone _ left, or the left boundary of the prediction block and the right boundary of the first region do not satisfy pred _ block _ left > fbd _ zone _ right, it may be determined that the prediction block pointed by the motion vector of the current image block overlaps with the first region.
For example, as shown in fig. 12a, if the reference frame is divided vertically to obtain two tiles, namely tile 3 and tile 4, and if the coordinate value of the start point of tile 4 in the horizontal direction is 20, then the coordinate values of the left boundary and the right boundary of the first area in the horizontal direction according to the above equations (1) and (2) can be obtained as 52 and 112, respectively, that is, the area shown by the dashed line in fig. 12a is the first area in this application; assuming that the width of the current image block is 8, the horizontal axis coordinate value of the top left corner of the current image block is 150, and the component of the motion vector in the horizontal direction is-560, then it can be obtained through the above formula (3) and formula (4) that the coordinate values of the left boundary and the right boundary of the prediction block pointed 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. 12 a.
Since the right boundary of the prediction block in the horizontal direction has a value of 64 and the left boundary of the first region in the horizontal direction has a value of 52, the above equation (5) is satisfied, so that it can be determined that the prediction block to which the motion vector of the current image block points is located on the tile boundary.
If the reference frame is divided horizontally into two tiles, the upper and lower boundaries of the first area may be determined by equation (6) and equation (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)
Wherein offset _ top1 can be an integer greater than or equal to 3, and offset _ top2 can be an integer greater than or equal to 4; offset _ bottom1 may take an integer greater than or equal to 4 and offset _ bottom2 may take an integer greater than or equal to 4.
The upper and lower boundaries of the prediction block to which the motion vector of the current image block points may be determined by equation (8) and equation (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, and block _ height represents the height of the current image block.
If equation (10) holds, it may be determined that the prediction block pointed to by the motion vector of the current image block overlaps the first region.
Figure BDA0003041872510000221
Similarly, it should be noted that the above equation (10) may mean that if the lower boundary of the prediction block and the upper boundary of the first region do not satisfy pred _ block _ bottom < fbd _ zone _ top, or the upper boundary of the prediction block and the lower boundary of the first region do not satisfy pred _ block _ top > fbd _ zone _ bottom, it may be determined that the prediction block pointed by the motion vector of the current image block overlaps with the first region.
For example, as shown in fig. 12b, if the reference frame is divided horizontally to obtain two tiles, namely tile 1 and tile 2, and if the coordinate value of the starting point of tile 2 in the vertical direction is 20, then the coordinate values of the upper boundary and the lower boundary of the first area in the vertical direction can be obtained as 52 and 112 according to the above equations (5) and (6), that is, the area shown by the dashed line in fig. 12b is the first area in this application; assuming that the height of the current image block is 8, the vertical axis coordinate value of the top left corner of the current image block is 150, and the component of the motion vector in the vertical direction is-560, it can be obtained through the above equation (7) and equation (8) that the coordinate values of the upper boundary and the lower boundary of the prediction block pointed by the motion vector of the current image block in the vertical direction are 40 and 64, respectively, i.e., the positions of the prediction blocks shown in fig. 12 b.
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, the above equation (10) is satisfied, so that it can be determined that the prediction block pointed to by the motion vector of the current image block is located on the tile boundary.
Optionally, in some embodiments, said adjusting the position of the prediction block so that the prediction block is located inside a tile of the reference frame comprises: adjusting a position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region such that the prediction block is located inside a tile of the reference frame.
In the 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 such that the prediction block is located inside a tile of the reference frame.
According to the scheme provided by the embodiment of the 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 positioned inside a tile of a reference frame, and the accuracy of the prediction block positioned inside the tile of the reference frame can be ensured.
As indicated above, the encoding end may 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 manner may be as follows.
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: adding a first threshold to a boundary value of the prediction block in the horizontal direction, wherein the first threshold is obtained based on the boundary value of the prediction block in the horizontal direction, the boundary value of the first region in the horizontal direction and a first preset value; and/or adding a second threshold to a boundary value of the prediction block in the vertical direction, wherein the second threshold is obtained 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 a second preset value.
In the embodiment of the present application, the first threshold value (hereinafter, denoted by Δ mv _ x) and the second threshold value (hereinafter, denoted by Δ mv _ y) may 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_y=-(pred_block_bottom-fbd_zone_top+offsetY) (12)
Δmv_x=(fbd_zone_right-pred_block_left+offsetX) (13)
Δmv_y=(fbd_zone_bottom-pred_block_top+offsetY) (14)
The values of offsetX and offsetY may be 1.
The horizontal component and the vertical component of the moved motion vector can be determined by equation (15) and equation (16).
mv_x_new=mv_x+Δmv_x (15)
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 may be continuously adjusted, which is not specifically limited in the present application.
Optionally, in some embodiments, if a right boundary value of the prediction block in the horizontal direction is greater than or equal to a left boundary value of the first region in the horizontal direction, and a left boundary value of the prediction block in the horizontal direction is less than or equal to a left boundary value of the first region in the horizontal direction, the first threshold 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 right boundary value of the first region in the horizontal direction, the first threshold is a positive value.
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 left boundary value of the first region in the horizontal direction, that is, the position of the original prediction block shown in fig. 12 a. A first threshold is added on the basis of the original prediction block and is a negative value, i.e. the original prediction block is moved to the left by the first threshold, i.e. the position of the moved prediction block shown in fig. 12 a.
Illustratively, as described above, the coordinate values of the left boundary and the right boundary of the original prediction block in the horizontal direction are 40 and 64, respectively, and the coordinate values of the left boundary and the right boundary of the first region in the horizontal direction are 52 and 112, respectively, it can be obtained by the above equation (11) that the first threshold Δ mv _ x is-13, that is, the coordinate values of the left boundary and the right boundary 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 not located in the first region, and the encoding end may encode the current image block based on the moved prediction block.
Similarly, as shown in fig. 12c, the coordinate values of the left boundary and the right boundary of the first region in the horizontal direction are 52 and 112, respectively, and the coordinate values of the left boundary and the right boundary of the original prediction block in the horizontal direction are 90 and 114, respectively, and it can be obtained through the above formula (13) that the first threshold Δ mv _ x is 23, that is, the coordinate values of the left boundary and the right boundary 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 not located in the first region, and the encoding end may encode the current image block based on the moved prediction block.
According to the scheme provided by the embodiment of the application, different first threshold values are obtained according to different positions of the prediction block in the first area, so that the position of the prediction block can be purposefully adjusted, further, the offset of the prediction block can be reduced, and the implementation is facilitated.
Optionally, in some embodiments, if a lower boundary value of the prediction block in the vertical direction is greater than or equal to an upper boundary value of the first region in the vertical direction, and an upper boundary value of the prediction block in the vertical direction is less than or equal to an upper boundary value of the first region in the vertical direction, the second threshold is a negative value; or, if an upper boundary value of the prediction block in the vertical direction is less than or equal to a lower boundary value of the first region in the vertical direction, and a lower boundary value of the prediction block in the vertical direction is greater than or equal to a lower boundary value of the first region in the vertical direction, the second threshold is a positive value.
In the 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 left boundary value of the first region in the vertical direction, that is, the position of the original prediction block shown in fig. 12 b. A second threshold is added on the basis of the original prediction block and is negative, i.e. the original prediction block is moved upwards by the second threshold, i.e. the position of the moved prediction block shown in fig. 12 b.
Illustratively, as described above, the coordinate values of the upper boundary and the lower boundary of the original prediction block in the vertical direction are 40 and 64, respectively, and the coordinate values of the upper boundary and the lower boundary of the first region in the vertical direction are 52 and 112, respectively, it can be obtained through the above equation (12) that the second threshold Δ my _ x is-13, that is, the coordinate values of the upper boundary and the lower boundary 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 not located in the first region, and the encoding end may encode the current image block based on the moved prediction block.
Similarly, as shown in fig. 12d, the coordinate values of the upper boundary and the lower boundary of the first region in the vertical direction are 52 and 112, respectively, and the coordinate values of the upper boundary and the lower boundary of the original prediction block in the vertical direction are 90 and 114, respectively, and it can be obtained through the above equation (14) that the second threshold Δ mv _ y is 23, that is, the coordinate values of the upper boundary and the lower boundary 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 not located in the first region, and 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 are also possible, and the present application should not be particularly limited.
According to the scheme provided by the embodiment of the application, different second threshold values are obtained according to different positions of the prediction block in the first area, so that the position of the prediction block can be purposefully adjusted, further, the offset of the prediction block can be reduced, and the implementation is facilitated.
Optionally, in some embodiments, if a left boundary of the prediction block in the horizontal direction is greater than or equal to a left boundary of the first region in the horizontal direction, a right boundary of the prediction block in the horizontal direction is less than or equal to a right boundary of the first region in the horizontal direction, an upper boundary of the prediction block in the vertical direction is greater than or equal to an upper boundary of the first region in the vertical direction, a lower boundary of the prediction block in the vertical direction is less than or equal to a lower boundary of the first region in the vertical direction, and the first threshold and/or the second threshold is a positive value or a negative value.
In the embodiment of the present application, 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 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 region, that is, the position of the original prediction block shown in fig. 12 e. The first threshold and/or the second threshold is/are added on the basis of the original prediction block, and the first threshold and/or the second threshold is/are positive or negative, that is, the original prediction block is moved by the first threshold and/or the second threshold in any possible direction, that is, the position of the moved prediction block shown in fig. 12 e.
Illustratively, 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 left and right boundaries of the first region have coordinate values in the horizontal direction of 52 and 112, respectively, and the upper and lower boundaries have coordinate values in the vertical direction of 52 and 112, respectively.
The position of the original prediction block can be adjusted in various ways without limitation, and refer to the following.
1) It can be obtained through the above equation (11) and equation (12) that the values of the first threshold Δ mv _ x and the second threshold Δ mv _ y are both-33, that is, the values are increased by-33 in the horizontal direction and the vertical direction respectively based on the original prediction block, that is, the coordinate values of the left boundary and the right boundary of the moved prediction block in the horizontal direction are respectively 27 and 51, and the coordinate values of the upper boundary and the lower boundary of the moved prediction block in the vertical direction are respectively 27 and 51, at this time, the position of the moved prediction block is as shown by the position of the moved prediction block 1 in fig. 12e, and the encoding end can encode the current image block based on the moved prediction block 1.
2) It can be obtained through the above equation (13) and equation (12) that the values of the first threshold Δ mv _ x and the second threshold Δ mv _ y are 53 and-33 respectively, that is, 53 is increased in the horizontal direction on the basis of the original prediction block, and-33 is increased in the vertical direction, that is, the coordinate values of the left boundary and the right boundary of the moved prediction block in the horizontal direction are 113 and 137 respectively, and the coordinate values of the upper boundary and the lower boundary 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 as shown in the position of the moved prediction block 2 in fig. 12e, and the encoding end can encode the current image block based on the moved prediction block 2.
3) It can be obtained through the above equation (11) and equation (14) that the values of the first threshold Δ mv _ x and the second threshold Δ mv _ y are-33 and 53, respectively, that is, the values are increased by-33 in the horizontal direction and 53 in the vertical direction on the basis of the original prediction block, that is, the coordinate values of the left boundary and the right boundary of the moved prediction block in the horizontal direction are 27 and 51, respectively, and the coordinate values of the upper boundary and the lower boundary 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 as shown in the position of the moved prediction block 3 in fig. 12e, and the encoding end can encode the current image block based on the moved prediction block 3.
4) It can be obtained through the above equations (13) and (14) that the values of the first threshold Δ mv _ x and the second threshold Δ mv _ y are both 53, that is, 53 is added in the horizontal direction and the vertical direction on the basis of the original prediction block, that is, the coordinate values of the left boundary and the right boundary of the moved prediction block in the horizontal direction are 113 and 137, respectively, the coordinate values of the upper boundary and the lower boundary 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 as shown in 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.
According to the scheme provided by the embodiment of the 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 positioned inside a tile of a reference frame, and the accuracy of the prediction block positioned inside the tile of the reference frame can be ensured.
The method embodiment of the present application is described in detail above with reference to fig. 1 to 12, and the apparatus embodiment of the present application is described below with reference to fig. 13 to 16, and corresponds to the method embodiment, so that the parts not described in detail can be referred to the method embodiments of the previous parts.
Fig. 13 is an encoding apparatus 1300 according to an embodiment of the present application, where the encoding apparatus 1300 may include a processor 1310.
A processor 1310, the processor 1310 to: if the prediction block pointed by the motion vector of the current image block is positioned on the tile boundary of a reference frame, adjusting the position of the prediction block to ensure that the prediction block is positioned inside a tile of the reference frame, so that when tile boundary filtering is not performed at an encoding end and tile boundary filtering is performed at a decoding end, the pixel value of the prediction block referred to when the encoding end performs encoding and the pixel value of the prediction block referred to when the decoding end performs decoding can be kept consistent, and the current image block is positioned at the current frame; and encoding the current image block based on the adjusted prediction block.
Optionally, in some embodiments, the processor 1310 is further configured to: enabling the tile boundary filtering in encoding the current image block.
Optionally, in some embodiments, the processor 1310 is further configured to: setting the tile boundary filtering enabling flag position in code stream data to be 1; and the tile boundary filtering enabling flag bit is positioned in a picture data set, a sequence parameter set, a slice header, an image header or a sequence header of the code stream data.
Optionally, in some embodiments, the processor 1310 is further configured to: adjusting a position of the prediction block based on a preset rule such that the prediction block is located inside a tile of the reference frame.
Optionally, in some embodiments, the preset rule includes: adjusting the prediction block 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 downward and rightward;
moving the prediction block to the right;
moving the prediction block to the upper right; and
moving the prediction block to the calculated closest region.
Optionally, in some embodiments, the processor 1310 is further configured to: determining whether the prediction block is located on a tile boundary of the reference frame based on a boundary value of the prediction block and a boundary value of a first region, the first region being a region where the tile boundary is affected by filtering.
Optionally, in some embodiments, the processor 1310 is further configured to: and if any boundary of the prediction block is positioned in the first area, adjusting the position of the prediction block.
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 larger than or equal to the left boundary value of the first area in the horizontal direction, and 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 area in the horizontal direction, adjusting 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 area 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 area in the horizontal direction, adjusting the position of the prediction block.
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 area 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 area in the vertical direction, adjusting the position of the prediction block; and/or adjusting the position of the prediction block 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 area 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 area in the vertical direction.
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 area do not meet the preset condition, adjusting the position of the prediction block;
the preset condition is at least one of the following conditions:
a right boundary value of the prediction block in a horizontal direction is less than or equal to a left boundary value of the first region in the horizontal direction;
a left boundary value of the prediction block in a horizontal direction is greater than or equal to a right boundary value of the first region in the horizontal direction;
a lower boundary value of the prediction block in a vertical direction is less than or equal to an upper boundary value of the first region in the vertical direction; and
an upper boundary value of the prediction block in a vertical direction is greater than or equal to a lower boundary value of the first region in the vertical direction.
Optionally, in some embodiments, the processor 1310 is further configured to: adjusting a position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region such that the prediction block is located inside a tile of the reference frame.
Optionally, in some embodiments, the processor 1310 is further configured to: adding a first threshold to a boundary value of the prediction block in the horizontal direction, wherein the first threshold is obtained based on the boundary value of the prediction block in the horizontal direction, the boundary value of the first region in the horizontal direction and a first preset value; and/or adding a second threshold to a boundary value of the prediction block in the vertical direction, wherein the second threshold is obtained 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 a second preset value.
Optionally, in some embodiments, if a right boundary value of the prediction block in the horizontal direction is greater than or equal to a left boundary value of the first region in the horizontal direction, and a left boundary value of the prediction block in the horizontal direction is less than or equal to a left boundary value of the first region in the horizontal direction, the first threshold 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 right boundary value of the first region in the horizontal direction, the first threshold is a positive value.
Optionally, in some embodiments, if a lower boundary value of the prediction block in the vertical direction is greater than or equal to an upper boundary value of the first region in the vertical direction, and an upper boundary value of the prediction block in the vertical direction is less than or equal to an upper boundary value of the first region in the vertical direction, the second threshold is a negative value; or, if an upper boundary value of the prediction block in the vertical direction is less than or equal to a lower boundary value of the first region in the vertical direction, and a lower boundary value of the prediction block in the vertical direction is greater than or equal to a lower boundary value of the first region in the vertical direction, the second threshold is a positive value.
Optionally, in some embodiments, if a left boundary of the prediction block in the horizontal direction is greater than or equal to a left boundary of the first region in the horizontal direction, a right boundary of the prediction block in the horizontal direction is less than or equal to a right boundary of the first region in the horizontal direction, an upper boundary of the prediction block in the vertical direction is greater than or equal to an upper boundary of the first region in the vertical direction, a lower boundary of the prediction block in the vertical direction is less than or equal to a lower boundary of the first region in the vertical direction, and the first threshold and/or the second threshold is a positive value or a negative value.
Fig. 14 is a decoding apparatus 1400 according to an embodiment of the present application, where the decoding apparatus 1400 may include a processor 1410.
A processor 1410, the processor 1410 configured to: determining that a prediction block pointed to by a motion vector of a current image block is located inside a tile of a reference frame, the current image block being located in a current frame; decoding the current image block based on the prediction block.
An embodiment of the present invention further provides an encoding and decoding system, including:
an encoder, configured to adjust a position of a prediction block pointed to by a motion vector of a current image block if the prediction block is located on a tile boundary of a first reference frame, so that the prediction block is located inside a tile of the first reference frame; based on the adjusted prediction block, encoding the current image block to be encoded; during the encoding process, the first reference frame is not subjected to tile boundary filtering; wherein, the current image block is positioned in the current frame;
a decoder for decoding the current image block based on a decoded prediction block of a second reference frame; tile boundary filtering is performed on the second reference frame during decoding.
In the embodiment of the invention, the tile boundary filtering function of the encoding end is closed, and the tile boundary filtering function of the decoding end is opened, so that the image quality during display at the encoding end can be realized, and the data exchange and calculation amount at the decoding end can be reduced.
It should be noted that, for the specific implementation of the encoder according to the embodiment of the present invention, reference may be made to the description of the video encoding method in any of the above embodiments, and details are not described herein again.
Fig. 15 is a schematic structural diagram of a video encoding and decoding device according to still another embodiment of the present application. The video codec device 1500 shown in fig. 15 includes a processor 1510, and the processor 1510 can call and run a computer program from a memory to implement the methods described in fig. 4 to fig. 12.
Optionally, as shown in fig. 15, the video codec device 1500 may further include a memory 1520. From the memory 1520, the processor 1510 can call and execute a computer program to implement the method in the embodiment of the present application.
The memory 1520 may be a separate device from the processor 1510 or may be integrated into the processor 1510.
Optionally, as shown in fig. 15, the video codec device 1500 may further include a transceiver 1530, and the processor 1510 may control the transceiver 1530 to communicate with other devices, and specifically, may transmit information or data to the other devices or receive information or data transmitted by the other devices.
Optionally, the video encoding and decoding device may be, for example, an encoder, a decoder, a terminal (including but not limited to a mobile phone, a camera, an unmanned aerial vehicle, etc.), and the encoding and decoding device may implement corresponding processes in the methods of the embodiments of the present application, and for brevity, details are not repeated here.
Fig. 16 is a schematic structural diagram of a chip of an embodiment of the present application. The chip 1600 shown in fig. 16 includes a processor 1610, and the processor 1610 can call and execute a computer program from a memory to implement the method in the embodiment of the present application.
Optionally, as shown in fig. 16, the chip 1600 may further include a memory 1620. From the memory 1620, the processor 1610 can call and run a computer program to implement the method in the embodiment of the present application.
The memory 1620 may be a separate device from the processor 1610, or may be integrated into the processor 1610.
Optionally, the chip 1600 may also include an input interface 1630. The processor 1610 can control the input interface 1630 to communicate with other devices or chips, and in particular, can obtain information or data transmitted by other devices or chips.
Optionally, the chip 1600 may also include an output interface 1640. The processor 1610 can control the output interface 1640 to communicate with other devices or chips, and in particular, can output information or data to other devices or chips.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip or a system-on-chip, etc.
The embodiment of the invention also provides a chip which comprises a processing circuit and is used for realizing the coding method and the decoding method.
It should be understood that the processor of the embodiments of the present application may be an integrated circuit image processing system having signal processing capabilities. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. 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 connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It will be appreciated that the memory in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (DDR SDRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous link SDRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory in embodiments of the present application may provide instructions and data to the processor. The portion of 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 instructions stored in the memory, and when the processor executes the instructions, the processor may perform the steps corresponding to the terminal device in the above method embodiment.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor executes instructions in the memory, in combination with hardware thereof, to perform the steps of the above-described method. To avoid repetition, it is not described in detail here.
It should also be understood that, in the embodiment of the present application, the pixel points in the image may be located in different rows and/or columns, where the length of a may correspond to the number of pixel points in the same row included in a, and the height of a may correspond to the number of pixel points in the same column included in a. In addition, the length and the height of a may also be referred to as the width and the depth of a, respectively, which is not limited in this application.
It should also be understood that, in this embodiment of the present application, the "boundary spaced from a" may refer to at least one pixel point spaced 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", which is not limited in this embodiment of the present application, where a may be an image, a rectangular area, or a sub-image, etc.
It should also be understood that the foregoing descriptions of the embodiments of the present application focus on highlighting differences between the various embodiments, and that the same or similar elements that are not mentioned may be referred to one another and, for brevity, are not repeated herein.
The embodiment of the application also provides a computer readable storage medium for storing the computer program.
Optionally, the computer-readable storage medium may be applied to the encoding apparatus in the embodiment of the present application, and the computer program enables a computer to execute corresponding processes implemented by the encoding apparatus in the methods in the embodiment of the present application, which are not described herein again for brevity.
Optionally, the computer-readable storage medium may be applied to the decoding apparatus in the embodiment of the present application, and the computer program enables the computer to execute the corresponding process implemented by the decoding apparatus in each method in the embodiment of the present application, which is not described herein again for brevity.
Embodiments of the present application also provide a computer program product comprising computer program instructions.
Optionally, the computer program product may be applied to the encoding apparatus in the embodiment of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the encoding apparatus in the methods in the embodiment of the present application, which are not described herein again for brevity.
Optionally, the computer program product may be applied to the decoding apparatus in the embodiment of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the decoding apparatus in the methods in the embodiment of the present application, which are not described herein again for brevity.
The embodiment of the application also provides a computer program.
Optionally, the computer program may be applied to the encoding apparatus in the embodiment of the present application, and when the computer program runs on a computer, the computer executes the corresponding process implemented by the encoding apparatus in each method in the embodiment of the present application, and for brevity, details are not described here again.
Optionally, the computer program may be applied to the decoding apparatus in the embodiment of the present application, and when the computer program runs on a computer, the computer is enabled to execute the corresponding process implemented by the decoding apparatus in each method in the embodiment of the present application, and for brevity, details are not described here again.
It should be understood that, in the embodiment of the present application, the term "and/or" is only one kind of association relation describing an associated object, and means that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially or partially contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (32)

1. A method of video encoding, comprising:
if the prediction block pointed by the motion vector of the current image block is positioned on the tile boundary of a reference frame, adjusting the position of the prediction block to ensure that the prediction block is positioned inside a tile of the reference frame, so that when tile boundary filtering is not performed at an encoding end and tile boundary filtering is performed at a decoding end, the pixel value of the prediction block referred to when the encoding end performs encoding and the pixel value of the prediction block referred to when the decoding end performs decoding can be kept consistent, and the current image block is positioned at the current frame;
and encoding the current image block based on the adjusted prediction block.
2. The method of claim 1, further comprising:
enabling the tile boundary filtering in encoding the current image block.
3. The method of claim 2, wherein said enabling the tile boundary filtering comprises:
setting the tile boundary filtering enabling flag position in code stream data to be 1; and the tile boundary filtering enabling flag bit is positioned in a picture data set, a sequence parameter set, a slice header, an image header or a sequence header of the code stream data.
4. The method of claim 1, wherein the adjusting the position of the prediction block such that the prediction block is located inside a tile of the reference frame comprises:
adjusting a position of the prediction block based on a preset rule such that the prediction block is located inside a tile of the reference frame.
5. The method of claim 4, wherein the preset rules comprise:
adjusting the prediction block 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 downward and rightward;
moving the prediction block to the right;
moving the prediction block to the upper right; and
moving the prediction block to the calculated closest region.
6. The method of claim 1, further comprising:
determining whether the prediction block is located on a tile boundary of the reference frame based on a boundary value of the prediction block and a boundary value of a first region, the first region being a region where the tile boundary is affected by filtering.
7. The method of claim 6, wherein the adjusting the position of the prediction block pointed to by the motion vector of the current image block if the prediction block is located on a tile boundary of a reference frame comprises:
and if any boundary of the prediction block is positioned in the first area, adjusting the position of the prediction block.
8. The method of claim 7, wherein the adjusting the position of the prediction block if any boundary of the prediction block is located in the first region comprises:
if the right boundary value of the prediction block in the horizontal direction is larger than or equal to the left boundary value of the first area in the horizontal direction, and 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 area in the horizontal direction, adjusting the position of the prediction block; and/or the presence of a gas in the gas,
if the left boundary value of the prediction block in the horizontal direction is smaller than or equal to the right boundary value of the first area in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is larger than or equal to the left boundary value of the first area in the horizontal direction, the position of the prediction block is adjusted.
9. The method of claim 7, wherein the adjusting the position of the prediction block if any boundary of the prediction block is located in the first region 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 area 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 area in the vertical direction, adjusting the position of the prediction block; and/or the presence of a gas in the gas,
and 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 area 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 area in the vertical direction, adjusting the position of the prediction block.
10. The method of claim 6, wherein the adjusting the position of the prediction block pointed to by the motion vector of the current image block if the prediction block is located on a tile boundary of a reference frame comprises:
if the boundary value of the prediction block and the boundary value of the first area do not meet the preset condition, adjusting the position of the prediction block;
the preset condition is at least one of the following conditions:
a right boundary value of the prediction block in a horizontal direction is less than or equal to a left boundary value of the first region in the horizontal direction;
a left boundary value of the prediction block in a horizontal direction is greater than or equal to a right boundary value of the first region in the horizontal direction;
a lower boundary value of the prediction block in a vertical direction is less than or equal to an upper boundary value of the first region in the vertical direction; and
an upper boundary value of the prediction block in a vertical direction is greater than or equal to a lower boundary value of the first region in the vertical direction.
11. The method of any of claims 6 to 10, wherein said adjusting the position of the prediction block such that the prediction block is located inside a tile of the reference frame comprises:
adjusting a position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region such that the prediction block is located inside a tile of the reference frame.
12. The method of 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:
adding a first threshold to a boundary value of the prediction block in the horizontal direction, wherein the first threshold is obtained based on the boundary value of the prediction block in the horizontal direction, the boundary value of the first region in the horizontal direction and a first preset value; and/or the presence of a gas in the gas,
and adding a second threshold to a boundary value of the prediction block in the vertical direction, wherein the second threshold is obtained 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 a second preset value.
13. The method of claim 12, wherein the first threshold is negative if a right boundary value of the prediction block in the horizontal direction is greater than or equal to a left boundary value of the first region in the horizontal direction, and a left boundary value of the prediction block in the horizontal direction is less than or equal to a left boundary value of the first region in the horizontal direction; or the like, or, alternatively,
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 right boundary value of the first region in the horizontal direction, the first threshold is a positive value.
14. The method according to claim 11 or 12, wherein the second threshold is negative if a lower boundary value of the prediction block in a vertical direction is greater than or equal to an upper boundary value of the first region in the vertical direction, and an upper boundary value of the prediction block in the vertical direction is less than or equal to an upper boundary value of the first region in the vertical direction; or the like, or, alternatively,
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 lower boundary value of the first region in the vertical direction, the second threshold is a positive value.
15. 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 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 of the first region in the horizontal direction, the upper boundary of the prediction block in the vertical direction is greater than or equal to the upper boundary of the first region in the vertical direction, the lower boundary of the prediction block in the vertical direction is less than or equal to the lower boundary of the first region in the vertical direction, and the first threshold and/or the second threshold is a positive value or a negative value.
16. An apparatus for video encoding, comprising:
a processor to: if the prediction block pointed by the motion vector of the current image block is positioned on the tile boundary of a reference frame, adjusting the position of the prediction block to ensure that the prediction block is positioned inside a tile of the reference frame, so that when tile boundary filtering is not performed at an encoding end and tile boundary filtering is performed at a decoding end, the pixel value of the prediction block referred to when the encoding end performs encoding and the pixel value of the prediction block referred to when the decoding end performs decoding can be kept consistent, and the current image block is positioned at the current frame;
and encoding the current image block based on the adjusted prediction block.
17. The apparatus of claim 16, wherein the processor is further configured to:
enabling the tile boundary filtering in encoding the current image block.
18. The apparatus of claim 17, wherein the processor is further configured to:
setting the tile boundary filtering enabling flag position in code stream data to be 1; and the tile boundary filtering enabling flag bit is positioned in a picture data set, a sequence parameter set, a slice header, an image header or a sequence header of the code stream data.
19. The apparatus of claim 16, wherein the processor is further configured to:
adjusting a position of the prediction block based on a preset rule such that the prediction block is located inside a tile of the reference frame.
20. The apparatus of claim 19, wherein the preset rules comprise:
adjusting the prediction block 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 downward and rightward;
moving the prediction block to the right;
moving the prediction block to the upper right; and
moving the prediction block to the calculated closest region.
21. The apparatus of claim 16, wherein the processor is further configured to:
determining whether the prediction block is located on a tile boundary of the reference frame based on a boundary value of the prediction block and a boundary value of a first region, the first region being a region where the tile boundary is affected by filtering.
22. The apparatus of claim 21, wherein the processor is further configured to:
and if any boundary of the prediction block is positioned in the first area, adjusting the position of the prediction block.
23. 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 larger than or equal to the left boundary value of the first area in the horizontal direction, and 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 area in the horizontal direction, adjusting the position of the prediction block; and/or the presence of a gas in the gas,
if the left boundary value of the prediction block in the horizontal direction is smaller than or equal to the right boundary value of the first area in the horizontal direction, and the left boundary value of the prediction block in the horizontal direction is larger than or equal to the left boundary value of the first area in the horizontal direction, the position of the prediction block is adjusted.
24. 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 area 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 area in the vertical direction, adjusting the position of the prediction block; and/or the presence of a gas in the gas,
and 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 area 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 area in the vertical direction, adjusting the position of the prediction block.
25. 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 area do not meet the preset condition, adjusting the position of the prediction block;
the preset condition is at least one of the following conditions:
a right boundary value of the prediction block in a horizontal direction is less than or equal to a left boundary value of the first region in the horizontal direction;
a left boundary value of the prediction block in a horizontal direction is greater than or equal to a right boundary value of the first region in the horizontal direction;
a lower boundary value of the prediction block in a vertical direction is less than or equal to an upper boundary value of the first region in the vertical direction; and
an upper boundary value of the prediction block in a vertical direction is greater than or equal to a lower boundary value of the first region in the vertical direction.
26. The apparatus of any of claims 21-25, wherein the processor is further configured to:
adjusting a position of the prediction block based on the boundary value of the prediction block and the boundary value of the first region such that the prediction block is located inside a tile of the reference frame.
27. The apparatus of claim 26, wherein the processor is further configured to:
adding a first threshold to a boundary value of the prediction block in the horizontal direction, wherein the first threshold is obtained based on the boundary value of the prediction block in the horizontal direction, the boundary value of the first region in the horizontal direction and a first preset value; and/or the presence of a gas in the gas,
and adding a second threshold to a boundary value of the prediction block in the vertical direction, wherein the second threshold is obtained 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 a second preset value.
28. The apparatus of claim 27, wherein the first threshold is negative if a right boundary value of the prediction block in a horizontal direction is greater than or equal to a left boundary value of the first region in the horizontal direction, and a left boundary value of the prediction block in the horizontal direction is less than or equal to a left boundary value of the first region in the horizontal direction; or the like, or, alternatively,
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 right boundary value of the first region in the horizontal direction, the first threshold is a positive value.
29. The apparatus according to claim 27 or 28, wherein the second threshold is negative if a lower boundary value of the prediction block in a vertical direction is greater than or equal to an upper boundary value of the first region in the vertical direction, and an upper boundary value of the prediction block in the vertical direction is less than or equal to an upper boundary value of the first region in the vertical direction; or the like, or, alternatively,
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 lower boundary value of the first region in the vertical direction, the second threshold is a positive value.
30. The apparatus of claim 28, wherein if a left boundary of the prediction block in a horizontal direction is greater than or equal to a left boundary of the first region in the horizontal direction, a right boundary of the prediction block in the horizontal direction is less than or equal to a right boundary of the first region in the horizontal direction, an upper boundary of the prediction block in a vertical direction is greater than or equal to an upper boundary of the first region in the vertical direction, a lower boundary of the prediction block in the vertical direction is less than or equal to a lower boundary of the first region in the vertical direction, and the first threshold and/or the second threshold is a positive value or a negative value.
31. A computer-readable storage medium comprising instructions for performing the method of any of claims 1-15.
32. A chip comprising processing circuitry to execute instructions of the method of any of claims 1 to 15.
CN202080005888.1A 2020-07-24 2020-07-24 Video coding and decoding method and device Pending CN112970252A (en)

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
CN112970252A true CN112970252A (en) 2021-06-15

Family

ID=76271523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080005888.1A Pending CN112970252A (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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130136373A1 (en) * 2011-03-07 2013-05-30 Panasonic Corporation Image decoding method, image coding method, image decoding apparatus, and image coding apparatus
US20170280155A1 (en) * 2013-07-08 2017-09-28 Renesas Electronics Corporation Video encoder and operation method thereof
WO2020032049A1 (en) * 2018-08-06 2020-02-13 シャープ株式会社 Moving image decoding apparatus and moving image encoding apparatus
US20200177911A1 (en) * 2017-06-28 2020-06-04 Sharp Kabushiki Kaisha Video encoding device and video decoding device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5353532B2 (en) * 2009-07-29 2013-11-27 ソニー株式会社 Image processing apparatus and image processing method
JP5233897B2 (en) * 2009-07-31 2013-07-10 ソニー株式会社 Image processing apparatus and method
EP2737705A4 (en) * 2011-10-24 2016-03-02 Mediatek Inc Method and apparatus for non-cross-tile loop filtering
JP2018107500A (en) * 2016-12-22 2018-07-05 キヤノン株式会社 Coding device, coding method, program, decoding device, decoding method, and program
JP2020061701A (en) * 2018-10-12 2020-04-16 シャープ株式会社 Dynamic image coding device and dynamic image decoding device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130136373A1 (en) * 2011-03-07 2013-05-30 Panasonic Corporation Image decoding method, image coding method, image decoding apparatus, and image coding apparatus
US20170280155A1 (en) * 2013-07-08 2017-09-28 Renesas Electronics Corporation Video encoder and operation method thereof
US20200177911A1 (en) * 2017-06-28 2020-06-04 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

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ROBERT SKUPIN等: "CE12-related: Normative temporally independent tile group coding", 《JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11》 *

Also Published As

Publication number Publication date
WO2022016535A1 (en) 2022-01-27

Similar Documents

Publication Publication Date Title
TWI717779B (en) Method and apparatus of constrained overlapped block motion compensation in video coding
CN114363612B (en) Method and apparatus for bit width control of bi-directional optical flow
KR20240068078A (en) Method and apparatus for filtering with mode-aware deep learning
US20230283784A1 (en) Affine model-based image encoding/decoding method and device
US20200267407A1 (en) Interpolation filter for an inter prediction apparatus and method for video coding
US20220345699A1 (en) In-loop filtering method and device
JP7375224B2 (en) Encoding/decoding methods, apparatus and devices thereof
CN112514390B (en) Video coding method and device
CN114342378A (en) Method and apparatus relating to predictive refinement using optical flow
CN114009033A (en) Method and apparatus for signaling symmetric motion vector difference mode
CN113709498B (en) Inter prediction method, encoder, decoder, and computer storage medium
JP2024016288A (en) Method and apparatus for decoder side motion vector correction in video coding
CN111869215B (en) Method and device for predicting limited long-distance motion vector
CN114128263A (en) Method and apparatus for adaptive motion vector resolution in video coding and decoding
WO2021056212A1 (en) Method and apparatus for video encoding and decoding
CN112204973A (en) Method and device for video coding and decoding
US20220217397A1 (en) Video Processing Methods and Apparatuses of Determining Motion Vectors for Storage in Video Coding Systems
CN112534824B (en) Method and apparatus for video encoding
CN112970252A (en) Video coding and decoding method and device
CN114363635B (en) Information processing method and device, equipment and storage medium
US20180249155A1 (en) Method and apparatus of prediction offset derived based on neighbouring area in video coding
WO2023198057A1 (en) Method, apparatus, and medium for video processing
WO2023051654A1 (en) Method, apparatus, and medium for video processing
WO2024078598A1 (en) Method, apparatus, and medium for video processing
WO2021134700A1 (en) Method and apparatus for video encoding and decoding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210615