CN110677676B - Video encoding method and apparatus, video decoding method and apparatus, and storage medium - Google Patents

Video encoding method and apparatus, video decoding method and apparatus, and storage medium Download PDF

Info

Publication number
CN110677676B
CN110677676B CN201910927119.6A CN201910927119A CN110677676B CN 110677676 B CN110677676 B CN 110677676B CN 201910927119 A CN201910927119 A CN 201910927119A CN 110677676 B CN110677676 B CN 110677676B
Authority
CN
China
Prior art keywords
resolution
block
region
pixel
decoded
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.)
Active
Application number
CN201910927119.6A
Other languages
Chinese (zh)
Other versions
CN110677676A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910927119.6A priority Critical patent/CN110677676B/en
Publication of CN110677676A publication Critical patent/CN110677676A/en
Application granted granted Critical
Publication of CN110677676B publication Critical patent/CN110677676B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/583Motion compensation with overlapping blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display

Landscapes

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

Abstract

The invention discloses a video encoding method and device, a video decoding method and device and a storage medium. Wherein the method comprises the following steps: under the condition that the initial resolution of a reconstructed block of a decoded block of a video frame to be decoded is higher than the first resolution a multiplied by b adopted by the block to be decoded of the video frame to be decoded in decoding, directly adjusting the resolution of the reconstructed block from the initial resolution to a second resolution na multiplied by nb, wherein n is an integer larger than or equal to 2, and the video frame to be decoded is a YUV image; determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching; determining a first pixel region matched with the UV value of the block to be decoded from a first region to be matched according to a first MV corresponding to the UV value of the block to be decoded; and determining the UV value of the pixel point obtained after decoding the block to be decoded according to the UV value of the pixel point in the first pixel region.

Description

Video encoding method and apparatus, video decoding method and apparatus, and storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a video encoding method and apparatus, a video decoding method and apparatus, and a storage medium.
Background
Currently, in the process of video coding, a video frame in a video may be divided into a plurality of blocks to perform coding processing respectively. The current block may be encoded by pre-analysis by referring to the encoded block to determine encoding parameter information of the current block before encoding the current block. For ease of processing, it is common to encode different blocks of a frame in video with a uniform resolution.
However, in the manner of encoding and decoding different blocks in a frame with uniform resolution, there is a problem of distortion verification due to mismatch between resolution and transmission bandwidth. Even if different resolutions are adopted for different blocks, the relative relationship between each block and its reference block is dynamic, so that it is difficult to determine the relative position of the block to be encoded and its reference block, thereby affecting the efficiency and effect of encoding and decoding.
Therefore, the related art method of encoding and decoding with different resolutions by using different blocks in one frame has the problems of low encoding and decoding efficiency and poor decoding effect due to difficulty in determining the relative positions of the block to be encoded and the reference block.
Disclosure of Invention
The embodiment of the invention provides a video coding method and device, a video decoding method and device and a storage medium, which at least solve the technical problems of low coding and decoding efficiency and poor decoding effect in the related art that different blocks in one frame of video are coded and decoded by adopting different resolutions.
According to an aspect of an embodiment of the present invention, there is provided a video decoding method including: under the condition that the initial resolution of a reconstructed block of a decoded block of a video frame to be decoded is higher than the first resolution a multiplied by b adopted by the block to be decoded of the video frame to be decoded in decoding, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution na multiplied by nb, wherein n is an integer larger than or equal to 2, and the video frame to be decoded is a YUV image; determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching; determining a first pixel region matched with the UV value of the block to be decoded from a first region to be matched according to a first MV corresponding to the UV value of the block to be decoded, wherein the first MV is a motion vector from the first pixel region to the block to be decoded, and the size of the first pixel region is the same as the size of the block to be decoded; and determining the UV value of the pixel point obtained after decoding the block to be decoded according to the UV value of the pixel point in the first pixel region.
According to another aspect of an embodiment of the present invention, there is provided a video encoding method including: under the condition that the initial resolution of a reconstruction block of an encoded block of a video frame to be encoded is higher than the first resolution a multiplied by b adopted when encoding the block to be encoded of the video frame to be encoded, directly adjusting the resolution of the reconstruction block from the initial resolution to the second resolution na multiplied by nb, wherein n is an integer greater than or equal to 2, and the video frame to be encoded is a YUV image; determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching; searching a first pixel area matched with the UV value of the block to be encoded in the first area to be matched, wherein the size of the first pixel area is the same as the size of the block to be encoded; and obtaining MVs from the first pixel region to the block to be encoded, and obtaining a first MV corresponding to the UV value of the block to be encoded.
According to still another aspect of the embodiments of the present invention, there is also provided a video decoding apparatus including: a first adjusting unit, configured to directly adjust the resolution of a reconstructed block of a decoded block of a video frame to be decoded from the initial resolution to a second resolution na×nb, where n is an integer greater than or equal to 2, and the video frame to be decoded is a YUV image, when the initial resolution of the reconstructed block of the decoded block of the video frame to be decoded is higher than a first resolution a×b employed when decoding; the first determining unit is used for determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the video frame to be decoded is a YUV image, and the first region to be matched is a pixel region to be subjected to UV value matching; the second determining unit is used for determining a first pixel area matched with the UV value of the block to be decoded from the first area to be matched according to a first MV corresponding to the UV value of the block to be decoded, wherein the first MV is a motion vector from the first pixel area to the block to be decoded, and the size of the first pixel area is the same as that of the block to be decoded; and the third determining unit is used for determining the UV value of the pixel point obtained after the decoding of the block to be decoded according to the UV value of the pixel point in the first pixel region.
According to still another aspect of the embodiments of the present invention, there is also provided a video encoding apparatus including: a first adjusting unit, configured to directly adjust the resolution of a reconstructed block of an encoded block of a video frame to be encoded from the initial resolution to a second resolution na×nb, where n is an integer greater than or equal to 2, and the video frame to be encoded is a YUV image, when the initial resolution of the reconstructed block of the encoded block of the video frame to be encoded is higher than a first resolution a×b employed when encoding; the first determining unit is used for obtaining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the video frame to be encoded is a YUV image, and the first region to be matched is a pixel region to be subjected to UV value matching; the first searching unit is used for searching a first pixel area matched with the UV value of the block to be encoded in a first area to be matched, wherein the size of the first pixel area is the same as that of the block to be encoded; the first obtaining unit is used for obtaining the motion vector MV from the first pixel region to the block to be encoded, and obtaining a first MV corresponding to the UV value of the block to be encoded.
In the embodiment of the invention, a mode of unifying the resolutions of the reconstructed blocks of all decoded blocks is adopted, and when the initial resolution of the reconstructed blocks of the decoded blocks of the video frame to be decoded is higher than the first resolution a×b adopted by the decoded blocks of the video frame to be decoded in decoding, the resolution of the reconstructed blocks is directly adjusted from the initial resolution to the second resolution na×nb, wherein n is an integer greater than or equal to 2, and the video frame to be decoded is a YUV image; determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching; determining a first pixel region matched with the UV value of the block to be decoded from a first region to be matched according to a first MV corresponding to the UV value of the block to be decoded, wherein the first MV is a motion vector from the first pixel region to the block to be decoded, and the size of the first pixel region is the same as the size of the block to be decoded; according to the UV value of the pixel point in the first pixel area, the UV value of the pixel point obtained after decoding the block to be decoded is determined, and as the resolution of the reconstructed block of all the decoded blocks is directly adjusted to be the second resolution na multiplied by nb, the reference block matched with the UV value of the block to be decoded is determined according to the motion vector under the second resolution, the UV value of the reference block with high resolution can be directly used as the UV reference value of the half pixel of the current coding block, the loss of image information caused by downsampling before downsampling is avoided, and the difference between the insertion value and the pixel point in the original image is ensured when upsampling interpolation is carried out, so that the aim of ensuring the accuracy of the decoding result is fulfilled, the coding and decoding efficiency is improved, the technical effect of improving the decoding effect is achieved, and the technical problems that the coding and decoding efficiency is low and the decoding effect is poor due to the fact that different blocks in one frame of video adopt different resolutions in the related technology are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a schematic diagram of an application environment of an alternative video decoding method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative video decoding method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an alternative video decoding method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another alternative video decoding method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of yet another alternative video decoding method according to an embodiment of the present invention;
FIG. 6 is a flow chart of an alternative video encoding method according to an embodiment of the invention;
FIG. 7 is a schematic diagram of an alternative video encoding method according to an embodiment of the invention;
FIG. 8 is a schematic diagram of an alternative video encoding method according to an embodiment of the invention;
FIG. 9 is a schematic diagram of an alternative video encoding and decoding process according to an embodiment of the present invention;
fig. 10 is a schematic structural view of an alternative video decoding apparatus according to an embodiment of the present invention;
Fig. 11 is a schematic structural view of an alternative video encoding apparatus according to an embodiment of the present invention;
fig. 12 is a schematic structural view of an alternative electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Technical terms related to the embodiment of the invention include:
(1) PSNR (Peak Signal to Noise Ratio, peak signal-to-noise ratio), which represents the ratio of the maximum possible power of a signal to the destructive noise power affecting its accuracy of representation, in dB, with a larger PSNR value representing less distortion;
(2) MV (motion Vector), which represents the relative displacement between the current coding block and the best matching block in its reference picture.
According to an aspect of an embodiment of the present invention, there is provided a video decoding method. Alternatively, as an alternative embodiment, the video decoding method described above may be applied, but not limited to, in an application environment as shown in fig. 1. The application environment includes a terminal 102 and a server 104, where the terminal 102 and the server 104 communicate through a network. The terminal 102 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, etc. The server 104 may be, but is not limited to, a computer processing device with a high data processing capability and a certain storage space.
Note that, the video encoding method corresponding to the video decoding method described above may be applied to, but not limited to, the application environment shown in fig. 1. After obtaining the video to be encoded, the video encoding method provided in the present application may be, but is not limited to, adjusting the resolution of the reconstructed block of the decoded block to the same resolution (for example, the second resolution 2a×2b) through the interaction process between the terminal 102 and the server 104 shown in fig. 1, searching the pixel area (for example, the most-pixel area) matched with the UV value of the current block to be encoded in the pixel area encoded in the frame under the same resolution, obtaining the first MV corresponding to the UV value of the current block to be encoded and the matching pixel area, and directly using the UV value of the high-resolution reference block as the UV reference value of the half-pixel of the current block to be encoded, thereby saving the encoding time while guaranteeing the accuracy of the decoding result. In addition, after the video to be decoded is obtained, the video decoding method provided by the present application may be used, but is not limited to, by the interaction process between the terminal 102 and the server 104 shown in fig. 1, under the scene of block-level encoding with different resolutions, a first area to be matched with the UV value of the current block to be decoded is determined according to the first MV under the same resolution (second resolution na×nb), and then the UV value of the block to be decoded is determined according to the first area to be matched, thereby improving decoding efficiency and improving decoding effect.
In one embodiment, terminal 102 may include, but is not limited to, the following: an image processing unit 1021, a processor 1022, a storage medium 1023, a memory 1024, a network interface 1025, a display screen 1026, and an input device 1027. The components described above may be connected by, but are not limited to, a system bus 1028. Wherein, the image processing unit 1021 is used for providing at least the drawing capability of the display interface; the processor 1022 is configured to provide computing and control capabilities to support operation of the terminal 102; the storage medium 1023 has stored therein an operating system 1023-2, a video encoder and/or a video decoder 1023-4. The operating system 1023-2 is used to provide control operation instructions, and the video encoder and/or video decoder 1023-4 is used to perform encoding/decoding operations in accordance with the control operation instructions. In addition, the memory provides an operating environment for the video encoder and/or video decoder 1023-4 in the storage medium 1023, and the network interface 1025 is used for network communication with the network interface 1043 in the server 104. The display screen is used for displaying application interfaces and the like, such as decoding video; the input device 1027 is used to receive commands or data input by a user, and the like. For a terminal 102 with a touch screen, the display screen 1026 and the input device 1027 may be touch screens. The above-described internal structure of the terminal shown in fig. 1 is merely a block diagram of a part of the structure related to the present application and does not constitute a limitation of the terminal to which the present application is applied, and a specific terminal or server may include more or less components than those shown in the drawings, or may combine some components, or have different arrangements of components.
In one embodiment, the server 104 may include, but is not limited to, the following: a processor 1041, memory 1042, a network interface 1043, and storage media 1044. The components described above may be connected by, but are not limited to, a system bus 1045. The storage medium 1044 includes an operating system 1044-1, a database 1044-2, a video encoder and/or a video decoder 1044-3. Wherein the processor 1041 is configured to provide computing and control capabilities to support operation of the server 104. Memory 1042 provides an environment for operation of video encoder and/or video decoding 1044-3 in storage medium 1044. The network interface 1043 communicates with the network interface 1025 of the external terminal 102 through a network connection. The operating system 1044-1 in the storage medium is used to provide control operation instructions; the video encoder and/or video decoder 1044-3 is for performing encoding/decoding operations according to the control operation instructions; database 1044-2 is used to store data. The above-described structure inside the server shown in fig. 1 is merely a block diagram of a part of the structure related to the present application, and does not constitute a limitation of the computer device to which the present application is applied, and a specific computer device has a different arrangement of components.
In one embodiment, the network may include, but is not limited to: wired network, wireless network. Wherein, the wired network may include, but is not limited to: wide area network, metropolitan area network, local area network. The above is merely an example, and is not limited in any way in the present embodiment.
Alternatively, in the present embodiment, as an optional implementation manner, a video decoding method performed by the terminal 102 or the server 104 is provided. As shown in fig. 2, the video decoding method includes:
step S202, in the case that the initial resolution of a reconstructed block of a decoded block of a video frame to be decoded is greater than the first resolution a×b adopted by the decoded block of the video frame to be decoded in decoding, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution na×nb, wherein n is an integer greater than or equal to 2, and the video frame to be decoded is a YUV image;
step S204, determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching;
step S206, determining a first pixel area matched with the UV value of the block to be decoded from a first area to be matched according to a first MV corresponding to the UV value of the block to be decoded, wherein the first MV is a motion vector from the first pixel area to the block to be decoded, and the size of the first pixel area is the same as the size of the block to be decoded;
Step S208, determining the UV value of the pixel point obtained after decoding the block to be decoded according to the UV value of the pixel point in the first pixel region.
It should be noted that the video decoding method shown in fig. 2 may be used in the video decoder shown in fig. 1, but is not limited to the above method. The video decoder is matched with other parts in interaction to complete the decoding process of the video frames to be decoded.
Alternatively, in the present embodiment, the video decoding method described above may be applied to various scenes related to video encoding and decoding technologies, for example, application scenes such as video playing application, video sharing application, video session application, short video transmission in instant messaging application, video chat in instant messaging application, and the like. The video transmitted in the application scenario may include, but is not limited to: the long video, the short video, such as the long video, can be a play episode with longer play time (for example, the play time is longer than 10 minutes), or the pictures shown in the long video session, and the short video can be a voice message interacted by two or more parties, or a video with shorter play time (for example, the play time is less than or equal to 30 seconds) shown on the sharing platform. The foregoing is merely an example, and the video decoding method provided in the present embodiment may be applied to, but not limited to, a playback device for playing back video in the foregoing application scenario.
In this embodiment, for the UV value of the current block to be decoded in the current video frame to be decoded in the video to be decoded, a plurality of decoded blocks are reconstructed and adjusted to the same resolution (the second resolution), so as to obtain a first region to be matched, and according to the first pixel region matched with the first MV corresponding to the UV value of the block to be decoded, the UV value of the pixel point in the target decoding block obtained by decoding the block to be decoded is determined according to the UV value of the pixel point in the first pixel region, which can solve the technical problems of low encoding and decoding efficiency and poor decoding effect existing in the related art that different blocks in one frame of video adopt different resolutions for encoding and decoding.
The video decoding method in the present embodiment is explained below with reference to fig. 2.
In step S202, in the case where the initial resolution of the reconstructed block of the decoded block of the video frame to be decoded is greater than the first resolution a×b adopted by the block to be decoded of the video frame to be decoded in decoding, the resolution of the reconstructed block is directly adjusted from the initial resolution to the second resolution na×nb, where n is an integer greater than or equal to 2, and the video frame to be decoded is a YUV image.
A receiving device of the video (e.g., server 104) may receive a video bitstream transmitted by a transmitting device of the video (e.g., terminal 102) through a network. The video code stream contains data obtained by video encoding one or more video frames (video images) of the video.
After receiving the video code stream, the receiving device may decode each video frame to be decoded in the video to obtain a decoded video. Video frames with relevance can be decoded according to the sequence of relevance, and for video frames without relevance, the video frames can be decoded according to the sequence in video, can be decoded according to random sequence, can be decoded in parallel by a plurality of video frames, and the specific decoding mode can be determined according to convention or according to indication information in a video code stream, so that the method is not particularly limited in the embodiment.
For each image block in the current video frame to be decoded, when an intra block copy (intra block copy) coding mode is used, different resolutions may be used for coding. The adopted resolution can be indicated by indication information corresponding to the video frame to be decoded (or the block to be decoded) in the video code stream, can be determined according to other image blocks or reference information of other video frames, and can be determined according to indication information corresponding to the video frame to be decoded (or the block to be decoded) in the video code stream and reference information of other image blocks or other video frames. The specific manner in which the resolution employed for each image block is determined is not particularly limited in this embodiment.
When each block to be decoded is decoded, in the case that the video code stream contains the data to be decoded corresponding to the current block to be decoded, the data to be decoded can be decoded with the resolution (first resolution) corresponding to the current block to be decoded, so as to obtain the current decoded block corresponding to the current block to be decoded. In the case where the video bitstream does not include the data to be decoded corresponding to the current block to be decoded, the current decoded block corresponding to the current block to be decoded may be determined according to a target pixel region (e.g., a pixel region most similar to the current block to be decoded) that matches the current block to be decoded among the decoded pixel regions.
Alternatively, in the present embodiment, the target pixel region may span a plurality of blocks (decoded blocks), reconstruct the plurality of blocks into one copy and adjust to the target resolution. For example, the resolution of a reconstructed block of a decoded block of a video frame to be decoded may be adjusted from an initial resolution to a target resolution, resulting in a region to be matched having a resolution of the target resolution. The initial resolution is the resolution adopted by the decoded blocks in decoding, and the corresponding initial resolutions of different decoded blocks can be the same or different. The target resolution is a resolution adopted by the current block to be decoded in decoding, that is, the first resolution a×b, and may also be the second resolution na×nb.
The reconstructed block of the decoded block is a copy of the reconstructed decoded block, the decoded block and the reconstructed block are the same in size, the same in resolution, and the pixel values of the pixels at the same position are also the same.
The magnitude relation of the initial resolution and the target resolution may include at least one of: the initial resolution is higher than the target resolution, the initial resolution is equal to the target resolution, and the initial resolution is lower than the target resolution.
The video frame to be decoded is a YUV image. When Y value matching is carried out, searching a reference block by taking a pixel point as a unit under the same resolution; in performing UV value matching, a reference block is searched in units of half pixel points (or smaller pixel units) at the same resolution.
As an alternative, the resolution of the reconstructed block may be adjusted from the initial resolution to the first resolution when Y-value matching is performed; determining a second region to be matched with the resolution ratio being the first resolution ratio according to the region where the reconstruction block is located, wherein the second region to be matched is a pixel region to be subjected to Y value matching; determining a second pixel region matched with the block to be decoded from a second region to be matched according to a second MV corresponding to the Y value of the block to be decoded, wherein the second MV is a motion vector from the second pixel region to the block to be decoded, and the size of the second pixel region is the same as that of the block to be decoded; and determining the Y value of the pixel point obtained after decoding the block to be decoded according to the Y value of the pixel point in the second pixel region.
Under the condition that the initial resolution is larger than the first resolution, the resolution of the reconstruction block can be downsampled from the initial resolution to the first resolution, and a second region to be matched with the first resolution is obtained. In the case where the initial resolution is equal to the first resolution, the resolution of the reconstructed block may not be adjusted. Under the condition that the initial resolution is smaller than the first resolution, the resolution of the reconstruction block can be up-sampled from the initial resolution to the first resolution, and a second region to be matched with the first resolution is obtained. The second region to be matched is a pixel region to be matched with the Y value.
And under the condition that a plurality of decoded blocks are provided, the resolution of the reconstructed blocks of each decoded block can be adjusted in sequence, so that a second region to be matched with the first resolution is obtained.
According to the embodiment, the resolution of the reconstructed block of the decoded block is unified from the initial resolution to the first resolution, so that the pixel region matched with the current block to be decoded can be conveniently searched under the same resolution, the decoding efficiency can be improved, and the decoding effect is improved.
When UV value matching is performed, in the case that the initial resolution is equal to the first resolution, the resolution of the reconstructed block may be up-sampled to the second resolution, resulting in a first region to be matched having a resolution of the second resolution. Under the condition that the initial resolution is smaller than the first resolution, the resolution of the reconstruction block can be up-sampled from the initial resolution to the first resolution and then up-sampled to the second resolution, or the resolution of the reconstruction block can be up-sampled from the initial resolution to the second resolution directly, so that a first region to be matched with the resolution being the second resolution is obtained.
Under the condition that the initial resolution is larger than the resolution and is higher than the first resolution, the resolution of the reconstruction block can be firstly downsampled from the initial resolution to the first resolution and then upsampled to the second resolution to obtain a first region to be matched with the resolution being the second resolution, and the resolution of the reconstruction block can also be directly adjusted from the initial resolution to the second resolution to obtain the first region to be matched with the resolution being the second resolution. The first region to be matched is a pixel region to be matched with the UV value.
The resolution of the reconstruction block is directly adjusted from the initial resolution to the second resolution, so that the mode of downsampling and upsampling of the reconstruction block can be avoided, image information loss caused by pixel point removal and then pixel point insertion is avoided, decoding deviation caused by uncertainty of the inserted pixel point (constructed pixel point) is avoided, and accuracy of a decoding result is improved.
As an alternative embodiment, in the case that the initial resolution is higher than the second resolution, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution may include: the resolution of the reconstructed block is downsampled from the initial resolution to a second resolution.
The resolution of the reconstructed block with the initial resolution higher than the second resolution can be downsampled from the initial resolution to the second resolution, and the downsampled reconstructed block with the resolution can be obtained.
As another alternative embodiment, in the case that the initial resolution is lower than the second resolution, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution may include: the resolution of the reconstructed block is up-sampled from the initial resolution to a second resolution.
The resolution of the reconstructed block with the initial resolution lower than the second resolution may be up-sampled from the initial resolution to the second resolution, resulting in a resolution up-sampled reconstructed block.
According to the embodiment, the resolution of the reconstruction block is up-sampled or down-sampled according to the relation between the initial resolution and the second resolution, so that the resolution of the reconstruction block can be accurately adjusted to the second resolution, and the accuracy of determining the first region to be matched is improved.
The decoded blocks having an initial resolution higher than the first resolution may have one or more of them before decoding the current block to be decoded. In the case that the decoded block with the initial resolution higher than the first resolution is one, the resolution of the reconstructed block of the decoded block can be directly adjusted from the initial resolution to the second resolution, so as to obtain a first region to be matched with the resolution of the second resolution. In the case that the number of the decoded blocks with the initial resolution is greater than the first resolution, the resolutions of the reconstructed blocks of the decoded blocks can be directly adjusted from the initial resolution to the second resolution respectively, so as to obtain a first region to be matched with the second resolution.
As an alternative embodiment, adjusting the resolution of the reconstructed block from the initial resolution directly to the second resolution comprises: in the case that the decoded block includes a plurality of blocks and the plurality of blocks includes a first block having an initial resolution higher than a second resolution, downsampling the resolution of the reconstructed block of the first block from the initial resolution to the second resolution to obtain a first decoded block having a resolution of the second resolution, wherein the first region to be matched includes a region in which the first decoded block is located.
For a first block (which may include one or more) of the plurality of decoded blocks having an initial resolution higher than a second resolution, the resolution of the reconstructed block of the first block may be downsampled from the initial resolution to the second resolution to obtain a first decoded block having a resolution of a target resolution, and the first region to be matched includes a region in which the first target decoded block is located.
As another alternative embodiment, in the case where the decoded block includes a plurality of blocks and the plurality of blocks includes a second block having an initial resolution lower than the second resolution, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution includes: and upsampling the resolution of the reconstructed block of the second block from the initial resolution to a second resolution to obtain a second decoded block with the resolution of the second resolution, wherein the first region to be matched comprises a region in which the second decoded block is located.
For a second block (the second block may include one or more) of the plurality of decoded blocks having an initial resolution lower than the second resolution, the resolution of the reconstructed block of the second block may be upsampled from the initial resolution to the second resolution to obtain a second target decoded block having a resolution of the second resolution, and the first region to be matched includes a region in which the second target decoded block is located.
For example, as shown in fig. 3, a video frame to be decoded contains 4×4 image blocks, 10 decoded blocks, including: 2 decoded blocks of Resolution R1 (Resolution), 3 decoded blocks of Resolution R2, 2 decoded blocks of Resolution R3, 3 decoded blocks of Resolution R4, wherein R1 > R2 > R3 > R4. The resolution of the current block to be decoded is R3,2R3 > R2 > R3, and R1 > 2R3, then the resolution of the reconstructed block of the decoded block with resolution R1 may be downsampled from R1 to 2R3, the resolutions of the reconstructed blocks of the decoded blocks with resolutions R2, R3, and R4 may be upsampled from R2, R3, and R4 to 2R3, respectively, and taken as the first region to be matched along with the reconstructed block of the decoded block with resolution R1.
According to the embodiment, when the number of the decoded blocks is multiple, the resolution of the reconstructed block of each decoded block is adjusted according to the relation between the resolution corresponding to each decoded block and the second resolution, so that the resolution of each reconstructed block can be ensured to be adjusted to the second resolution, and the accuracy of determining the first region to be matched is improved.
In step S204, a first region to be matched with a second resolution is determined according to the region where the reconstruction block is located, where the first region to be matched is a pixel region to be matched with the UV value.
After the resolution of the reconstructed block of each decoded block is adjusted from the initial resolution to the second resolution, the region where the adjusted reconstructed block is located may be used as the first region to be matched, or the edge filtering process may be performed on the adjusted reconstructed block first, and the region where the filtered reconstructed block is located may be used as the first region to be matched.
As an alternative, after determining the first to-be-matched region with the resolution of the second resolution according to the region where the reconstructed block is located, in the case where the decoded block includes a plurality of blocks, edge filtering may be performed on pixel points on adjacent sides of adjacent pixel blocks in the first to-be-matched region, where the adjacent pixel blocks are pixel blocks corresponding to adjacent blocks in the first to-be-matched region.
Edge filtering may be performed by one or more rows of pixels on adjacent row edges (row edge neighbors) or one or more columns of pixels on adjacent column edges of adjacent pixel blocks. In the edge filtering, for a pixel to be filtered, the pixel used for filtering the pixel to be filtered may be one or more pixels adjacent to the pixel to be filtered (row-adjacent, column-adjacent, etc.), or may be pixels within a predetermined range centered on the pixel to be filtered, where the predetermined range may be a circle with a radius of a predetermined length, or a square, a rectangle, etc. with a side length of a predetermined length. The filtering method used for the edge filtering may be set as needed, and is not particularly limited in this embodiment.
For example, as shown in fig. 4, for the adjusted reconstruction block, edge filtering is performed for two rows of pixels on adjacent sides (as shown by a dashed box in fig. 4), and the pixel value (filtering) of each pixel is adjusted according to the pixel value of the pixel corresponding to each pixel (for example, the pixel used for the filtering), so as to obtain the filtered reconstruction block. The filtered pixel block may be used as a pixel region to be matched (may include a first region to be matched and a second region to be matched).
The filtering process on the decoding side may be performed by:
determining at least one pair of decoding blocks to be reconstructed from a current decoded video frame to be processed, wherein each pair of decoding blocks in the at least one pair of decoding blocks comprises a first decoding block with a first initial resolution and a second decoding block with a second initial resolution, and the first decoding block and the second decoding block are adjacent decoding blocks in position;
adjusting a first initial resolution of the first decoding block to a target resolution, and adjusting a second initial resolution of the second decoding block to the target resolution;
determining a first edge pixel point set from a first decoding block and determining a second edge pixel point set from a second decoding block, wherein the position of the first edge pixel point set is adjacent to the position of the second edge pixel point set;
Filtering the first edge pixel point set to obtain a filtered first edge pixel point set, filtering the second edge pixel point set to obtain a filtered second edge pixel point set, wherein a first difference value between a pixel value of an ith pixel point in the filtered first edge pixel point set and a pixel value of a jth pixel point corresponding to the ith pixel point in the filtered second edge pixel point set is smaller than a second difference value between the pixel value of the ith pixel point in the first edge pixel point set and the pixel value of the jth pixel point in the second edge pixel point set, i is a positive integer and is smaller than or equal to the total number of the pixel points in the first edge pixel point set, j is a positive integer and is smaller than or equal to the total number of the pixel points in the second edge pixel point set.
Wherein adjusting to the target resolution comprises: the first and second initial resolutions are adjusted to the first resolution, the second resolution, or the first and second resolutions.
The resolution of the decoding block is adjusted, and the edge pixel point set determined in the decoding block is subjected to edge filtering treatment, so that obvious joints in the video can be avoided in the reconstruction process, the content in the video is ensured to be accurately restored, and the technical problem of video distortion caused by inconsistent resolution is solved.
According to the embodiment, the influence of resolution adjustment on the pixel points can be reduced by carrying out edge filtering on the adjusted reconstruction blocks, and the effectiveness of the pixel points in the pixel region to be matched is ensured.
In step S206, a first pixel region matching the UV value of the block to be decoded is determined from the first region to be matched according to a first MV corresponding to the UV value of the block to be decoded, wherein the first MV is a motion vector from the first pixel region to the block to be decoded, and the size of the first pixel region is the same as the size of the block to be decoded.
After the first region to be matched is obtained, the first pixel region may be determined from the first region to be matched according to a motion vector (first MV) from the first pixel region corresponding to the block to be decoded in the first region to be matched to the block to be decoded. The first pixel area is used for determining a UV value of a target decoding block corresponding to the UV value of the block to be decoded, and the target decoding block is a decoding block obtained by decoding the block to be decoded according to a first resolution, and can span multiple adjusted reconstruction blocks.
The first MV may be carried in indication information corresponding to a video to be decoded, a video frame to be decoded, or a block to be decoded. The indication information may carry a plurality of parameters including at least a motion vector parameter for indicating the first MV (the motion vector parameter may also indicate the second MV). From the parameter values of the motion vector parameters, a target MV (which may include a first MV and may also include a second MV) may be determined.
It should be noted that, the first MV is used to determine the relative positional relationship between the first pixel region and the block to be decoded, and may be a motion vector from the first pixel region to the block to be decoded, or may be a motion vector from the block to be decoded to the first pixel region. The second MV is used for determining a relative positional relationship between the second pixel region and the block to be decoded, and may be a motion vector from the second pixel region to the block to be decoded, or a motion vector from the block to be decoded to the second pixel region
In addition to the target MV (including the first MV and the second MV), determining the target pixel region (including the first pixel region and the second pixel region) also requires a reference position for locating the target pixel region, the reference position being a relative position of a reference point position in the block to be decoded. The reference point position in the block to be decoded may be a certain pixel position (an upper left pixel, an upper right pixel, a lower left pixel, a lower right pixel) in the block to be decoded, or may be other positions than the pixel position, for example, a center point. The reference point position may be set as needed, and is not particularly limited in this embodiment.
As an alternative, determining, according to the UV value of the pixel point in the first pixel area, the UV value of the pixel point obtained after decoding the block to be decoded includes: determining a second pixel position matched with a first pixel position in a block to be decoded in a first region to be matched, wherein a motion vector from the second pixel position to the first pixel position is a first MV; and determining a first pixel area in the first area to be matched according to the second pixel position, wherein the relative position of the second pixel position in the first pixel area is the same as the relative position of the first pixel position in the block to be decoded.
After the first MV is obtained, the reference point position in the block to be decoded can also be determined. The reference point position in the block to be decoded may be the first pixel point position in the block to be decoded. The first pixel location may be a location of a first pixel in the block to be decoded. The first pixel point may be a specific pixel point in the block to be decoded, and the specific pixel point may be any pixel point, for example, a pixel point in an upper left corner, a pixel point in an upper right corner, a pixel point in a lower left corner, and a pixel point in a lower right corner.
The reference point position in the block to be decoded (the relative position of the first pixel point position in the block to be decoded) and the reference point position in the first pixel region (the relative position of the second pixel point position in the target pixel region) are the same. The reference point position may be defined by convention, or may be determined by a parameter value indicating a reference point position parameter among a plurality of parameters in the information. The reference point position may be defined as needed, and is not particularly limited in this embodiment.
The motion vector from the second pixel position to the first pixel position is the first MV, or the motion vector from the first pixel position to the second pixel position is the first MV. From the reference point positions in the block to be decoded, the reference point positions (second pixel point positions) in the first pixel region can be obtained from the first MV. Since the size of the block to be decoded is constant, it is possible to locate the first pixel region from the first region to be matched according to the reference point position in the first pixel region.
For example, as shown in fig. 5, according to the first MV and the first pixel location, the second pixel location (such as two end locations of the first MV in fig. 5) may be determined, and then the first pixel area may be determined according to size information of the block to be decoded (or other information capable of determining the size of the block to be decoded).
According to the embodiment, the first pixel area is determined according to the first MV corresponding to the block to be decoded and the reference point position (the first pixel point position) in the block to be decoded, so that the accuracy of determining the first pixel point position can be ensured, and the decoding quality can be improved.
In step S208, the UV value of the pixel point obtained after decoding the block to be decoded is determined according to the UV value of the pixel point in the first pixel region.
After the first pixel area is determined, determining the UV value of the pixel point in the target decoding block corresponding to the block to be decoded according to the UV value of the pixel point in the first pixel area, wherein the target decoding block is a decoding block obtained by decoding the block to be decoded according to the first resolution.
There may be various ways of determining the UV value of the pixel point in the target decoding block corresponding to the block to be decoded, for example, the UV value of the pixel point in the first pixel area may be directly used as the UV value of the pixel point in the target decoding block.
As an alternative, determining, according to the UV value of the pixel point in the first pixel area, the UV value of the pixel point obtained after decoding the block to be decoded may include: and converting the UV value of the pixel point in the first pixel region according to the target conversion parameter to obtain the UV value of the pixel point in the target decoding block.
In addition to the first MV, parameters in the video bitstream corresponding to the block to be decoded may further include: the target conversion parameter may be a conversion parameter that converts UV values of pixels in the first pixel region into UV values of pixels in the target decoding block. The conversion parameters may be: the difference between the UV value of the pixel point in the first pixel region and the UV value of the pixel point in the target decoding block.
Since the first pixel region is a pixel region matching the block to be decoded (for example, a pixel region most similar to the block to be decoded in the first region to be matched), the data amount of the conversion parameters required for determining the target decoding block is smaller, so that an accurate target decoding block can be obtained at a lower cost.
According to another aspect of an embodiment of the present invention, there is provided a video encoding method, as shown in fig. 6, the method including:
step S602, in the case that the initial resolution of the reconstructed block of the encoded block of the video frame to be encoded is higher than the first resolution a×b adopted when encoding the encoded block of the video frame to be encoded, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution na×nb, wherein n is an integer greater than or equal to 2, and the video frame to be encoded is a YUV image;
step S604, determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the video frame to be encoded is a YUV image, and the first region to be matched is a pixel region to be subjected to UV value matching;
step S606, a first pixel area matched with the UV value of the block to be encoded is searched in the first area to be matched, wherein the size of the first pixel area is the same as the size of the block to be encoded;
In step S608, the MV from the first pixel region to the block to be encoded is obtained, and the first MV corresponding to the UV value of the block to be encoded is obtained.
It should be noted that the video encoding method shown in fig. 6 may be used in the video encoder shown in fig. 1, but is not limited to the above method. The video encoder is matched with other parts in interaction to complete the encoding process of the video frames to be encoded.
Alternatively, in this embodiment, the video encoding method may be applied to, but not limited to, application scenarios such as a video playing application, a video sharing application, or a video session application. The video transmitted in the application scenario may include, but is not limited to: the long video, the short video, such as the long video, can be a play episode with longer play time (for example, the play time is longer than 10 minutes), or the pictures shown in the long video session, and the short video can be a voice message interacted by two or more parties, or a video with shorter play time (for example, the play time is less than or equal to 30 seconds) shown on the sharing platform. The above is merely an example, and the video encoding method provided in the present embodiment may be applied to, but not limited to, a transmitting apparatus for transmitting video in the above application scenario.
In the video encoding process, in order to ensure the real-time performance and flexibility of video frame encoding, a video frame is divided into a plurality of blocks to be encoded respectively. Furthermore, before encoding the current block, it is necessary to perform encoding pre-analysis on the current block by referring to the encoded block to determine the resolution of the current block. In the video encoding process in the related art, for different blocks within the same video frame, for convenience of processing, a uniform resolution is generally used for encoding.
As shown in fig. 7, if high resolution encoding is used for different blocks in one frame of video, in the case where the bandwidth of transmission is relatively small (e.g., smaller than the bandwidth threshold Th shown in fig. 7), the peak signal-to-noise ratio PSNR1 corresponding to encoding with high resolution for different blocks in one frame of video is lower than the peak signal-to-noise ratio PSNR2 corresponding to encoding with low resolution for different blocks in one frame of video, that is, the peak signal-to-noise ratio PSNR1 when encoding with high resolution is relatively small when the bandwidth of transmission is small, and the distortion is relatively large.
Similarly, if low resolution encoding is used for different blocks in a frame of video, in the case where the bandwidth of transmission is relatively large (e.g., greater than the bandwidth threshold Th shown in fig. 7), the peak signal-to-noise ratio PSNR3 corresponding to encoding with low resolution for different blocks in a frame of video is lower than the peak signal-to-noise ratio PSNR4 corresponding to encoding with high resolution for different blocks in a frame of video, that is, the peak signal-to-noise ratio PSNR3 when encoding with low resolution is relatively small when the transmission bandwidth is large, and the distortion is relatively large.
Even if different resolutions are adopted for different blocks, there is no way to effectively and dynamically mark the above-mentioned relative relationship with respect to the dynamic relative relationship between each block and its reference block, and thus the video coding method in the related art has a problem of low coding efficiency.
In this embodiment, for the UV value of the current block to be encoded in the current video frame to be encoded in the video to be decoded, a plurality of encoded blocks are reconstructed and adjusted to the same resolution (the second resolution), so as to obtain a first region to be matched, and a first pixel region matched with the UV value of the block to be encoded is searched from the first region to be matched, so as to determine a first MV from the first pixel region to the block to be encoded, thereby solving the technical problems of low encoding and decoding efficiency and poor decoding effect existing in the manner that different blocks in one frame of the video adopt different resolutions for encoding and decoding in the related art.
The video encoding method in the present embodiment is described below with reference to fig. 6.
In step S602, in the case where the initial resolution of the reconstructed block of the encoded block of the video frame to be encoded is higher than the first resolution a×b employed in encoding the encoded block of the video frame to be encoded, the resolution of the reconstructed block is directly adjusted from the initial resolution to the second resolution na×nb, where n is an integer greater than or equal to 2, and the video frame to be encoded is a YUV image.
A video transmitting device (e.g., terminal 102) may encode a video to be transmitted to obtain an encoded video bitstream. For video frames with relevance in the video to be encoded, video frame encoding can be performed according to the sequence of relevance, for video frames without relevance, encoding can be performed according to the sequence in the video, encoding can be performed according to random sequence, and parallel encoding of a plurality of video frames can be performed, and a specific encoding mode can be determined according to convention or the resource condition of a terminal, which is not particularly limited in the embodiment.
For each image block in the current video frame to be encoded, when an intra block copy (intra block copy) encoding mode is used, encoding can be performed with different resolutions. The resolution ratio adopted by the block to be encoded can be determined according to the pixel value of the pixel point in the block to be encoded, can be determined according to the reference information of other image blocks or other video frames, and can be determined according to the pixel value of the pixel point in the block to be encoded and the reference information of other image blocks or other video frames. The specific manner in which the resolution employed for each image block is determined is not particularly limited in this embodiment. The resolution adopted by each image block can be indicated by indication information corresponding to a video frame to be decoded (or a block to be decoded) in the video code stream.
Under the condition that different resolutions are adopted for different blocks, before each block is encoded according to the different resolutions, motion information between each block and a reference block is determined, so that encoding is performed by directly utilizing a relative relation, and encoding efficiency is improved.
When each block to be encoded is encoded, the resolution of a reconstructed block of the encoded block of the video frame to be encoded may be first adjusted from the initial resolution to the target resolution, so as to obtain a region to be matched with the resolution being the target resolution. The initial resolution is the resolution adopted by the coded block in the process of coding, and the corresponding initial resolutions of different coded blocks can be the same or different. The target resolution is a resolution adopted by the current block to be decoded in decoding, that is, the first resolution a×b, and may also be the second resolution na×nb.
The reconstructed block of the encoded block is a copy of the reconstructed encoded block, the encoded block and the reconstructed block are the same size, the resolution is the same, and the pixel values of the pixels at the same position are the same.
The magnitude relation of the initial resolution and the target resolution may include at least one of: the initial resolution is higher than the target resolution, the initial resolution is equal to the target resolution, and the initial resolution is lower than the target resolution.
The video frame to be encoded is a YUV image. When Y value matching is carried out, searching a reference block by taking a pixel point as a unit under the same resolution; in performing UV value matching, a reference block is searched in units of half pixel points (or smaller pixel units) at the same resolution.
As an alternative, the resolution of the reconstructed block may be adjusted from the initial resolution to the first resolution when Y-value matching is performed; determining a second region to be matched with the resolution ratio being the first resolution ratio according to the region where the reconstruction block is located, wherein the second region to be matched is a pixel region to be subjected to Y value matching; searching a second pixel area matched with the Y value of the block to be encoded in a second area to be matched, wherein the size of the second pixel area is the same as that of the block to be encoded; and obtaining a motion vector MV from the second pixel region to the block to be encoded, and obtaining a second MV corresponding to the Y value of the block to be encoded.
Under the condition that the initial resolution is higher than the first resolution, the resolution of the reconstruction block can be downsampled from the initial resolution to the first resolution, and a second region to be matched with the first resolution is obtained. In the case where the initial resolution is equal to the first resolution, the resolution of the reconstructed block may not be adjusted. Under the condition that the initial resolution is smaller than the first resolution, the resolution of the reconstruction block can be up-sampled from the initial resolution to the first resolution, and a second region to be matched with the first resolution is obtained. The second region to be matched is a pixel region to be matched with the Y value.
And under the condition that a plurality of encoded blocks are provided, the resolution of the reconstruction blocks of each encoded block can be adjusted in sequence, so that a second region to be matched with the first resolution is obtained.
According to the embodiment, the resolution of the reconstructed block of the encoded block is unified from the initial resolution to the first resolution, so that the pixel region matched with the current block to be encoded can be conveniently searched under the same resolution, the encoding efficiency can be improved, and the encoding effect can be improved.
When UV value matching is performed, in the case that the initial resolution is equal to the first resolution, the resolution of the reconstructed block may be up-sampled to the second resolution, resulting in a first region to be matched having a resolution of the second resolution. Under the condition that the initial resolution is smaller than the first resolution, the resolution of the reconstruction block can be up-sampled from the initial resolution to the first resolution and then up-sampled to the second resolution, or the resolution of the reconstruction block can be up-sampled from the initial resolution to the second resolution directly, so that a first region to be matched with the resolution being the second resolution is obtained.
Under the condition that the initial resolution is higher than the first resolution, the resolution of the reconstruction block can be firstly downsampled from the initial resolution to the first resolution and then upsampled to the second resolution to obtain a first region to be matched with the resolution of the second resolution, and the resolution of the reconstruction block can also be directly adjusted from the initial resolution to the second resolution to obtain the first region to be matched with the resolution of the second resolution. The first region to be matched is a pixel region to be matched with the UV value.
The resolution of the reconstruction block is directly adjusted from the initial resolution to the second resolution, so that the mode of downsampling and upsampling of the reconstruction block can be avoided, image information loss caused by pixel point removal and then pixel point insertion is avoided, coding deviation caused by uncertainty of the inserted pixel point (constructed pixel point) is avoided, and accuracy of a coding result is improved.
As an alternative embodiment, in the case that the initial resolution is higher than the second resolution, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution may include: the resolution of the reconstructed block is downsampled from the initial resolution to a second resolution.
The resolution of the reconstructed block with the initial resolution higher than the second resolution can be downsampled from the initial resolution to the second resolution, and the downsampled reconstructed block with the resolution can be obtained.
As another alternative embodiment, in the case that the initial resolution is lower than the second resolution, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution may include: the resolution of the reconstructed block is up-sampled from the initial resolution to a second resolution.
The resolution of the reconstructed block with the initial resolution lower than the second resolution may be up-sampled from the initial resolution to the second resolution, resulting in a resolution up-sampled reconstructed block.
According to the embodiment, the resolution of the reconstruction block is up-sampled or down-sampled according to the relation between the initial resolution and the second resolution, so that the resolution of the reconstruction block can be accurately adjusted to the second resolution, and the accuracy of determining the first region to be matched is improved.
The coded blocks having an initial resolution higher than the first resolution may have one or more of them before the current block to be coded is coded. In the case that the number of encoded blocks having an initial resolution higher than the first resolution is one, the resolution of the reconstructed block of the one encoded block may be directly adjusted from the initial resolution to the second resolution, resulting in a first region to be matched having a resolution of the second resolution. In the case that the number of the encoded blocks with the initial resolution is greater than the first resolution, the resolutions of the plurality of reconstructed blocks of the plurality of encoded blocks can be directly adjusted from the initial resolution to the second resolution respectively, so as to obtain a first region to be matched with the second resolution.
As an alternative embodiment, in case the encoded block comprises a plurality of blocks and the plurality of blocks comprises a first block having an initial resolution higher than a second resolution, the adjusting the resolution of the reconstructed block from the initial resolution directly to the second resolution comprises: and downsampling the resolution of the reconstructed block of the first block from the initial resolution to the second resolution to obtain a first encoded block with the resolution of the second resolution, wherein the first region to be matched comprises a region in which the first encoded block is located.
For a first block (which may include one or more) of the plurality of encoded blocks having an initial resolution higher than a second resolution, the resolution of the reconstructed block of the first block may be downsampled from the initial resolution to the second resolution to obtain a first encoded block having a resolution that is the target resolution, and the first region to be matched includes a region in which the first target encoded block is located.
As another alternative embodiment, in the case where the encoded block includes a plurality of blocks and the plurality of blocks includes a second block having an initial resolution lower than the second resolution, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution includes: and upsampling the resolution of the reconstructed block of the second block from the initial resolution to a second resolution to obtain a second encoded block having a resolution of the second resolution, wherein the first region to be matched comprises a region in which the second encoded block is located.
For a second block (the second block may include one or more blocks) of the plurality of encoded blocks having an initial resolution lower than the second resolution, the resolution of the reconstructed block of the second block may be upsampled from the initial resolution to the second resolution to obtain a second target encoded block having a resolution of the second resolution, and the first region to be matched includes a region in which the second target encoded block is located.
According to the embodiment, when the number of the coded blocks is multiple, the resolution of the reconstruction block of each coded block is adjusted according to the relation between the resolution corresponding to each coded block and the second resolution, so that the resolution of each reconstruction block can be ensured to be adjusted to the second resolution, and the accuracy of determining the first region to be matched is improved.
In addition to adjusting the resolution of the reconstructed block of each encoded block from the initial resolution to the target resolution (the first resolution or the second resolution), for the current block to be encoded, if the resolution of the current block to be encoded is not the target resolution, the current block to be encoded may be up-sampled (in the case where the resolution of the current block to be encoded is lower than the target resolution) or down-sampled (in the case where the resolution of the current block to be encoded is higher than the target resolution), thereby adjusting the resolution of the current block to be encoded to the target resolution.
In step S604, a first region to be matched with a second resolution is determined according to the region where the reconstruction block is located, where the video frame to be encoded is a YUV image, and the first region to be matched is a pixel region to be subjected to UV value matching.
After the resolution of the reconstructed block of each encoded block is adjusted from the initial resolution to the second resolution, the region where the adjusted reconstructed block is located may be used as the first region to be matched, or the adjusted reconstructed block may be first subjected to edge filtering processing, and the region where the filtered reconstructed block is located may be used as the first region to be matched.
As an alternative, after determining the first to-be-matched area with the second resolution according to the area where the reconstructed block is located, if the encoded block includes a plurality of blocks, edge filtering is performed on pixel points on adjacent sides of adjacent pixel blocks in the first to-be-matched area, where the adjacent pixel blocks are pixel blocks corresponding to adjacent blocks in the plurality of blocks in the first to-be-matched area.
Edge filtering may be performed by one or more rows of pixels on adjacent row edges (row edge neighbors) or one or more columns of pixels on adjacent column edges of adjacent pixel blocks. In the edge filtering, for a pixel to be filtered, the pixel used for filtering the pixel to be filtered may be one or more pixels adjacent to the pixel to be filtered (row-adjacent, column-adjacent, etc.), or may be pixels within a predetermined range centered on the pixel to be filtered, where the predetermined range may be a circle with a radius of a predetermined length, or a square, a rectangle, etc. with a side length of a predetermined length. The filtering method used for the edge filtering may be set as needed, and is not particularly limited in this embodiment.
The process of the filtering process on the encoding side is similar to the process of the filtering process on the decoding side, and will not be described here.
According to the embodiment, the influence of resolution adjustment on the pixel points can be reduced by carrying out edge filtering on the adjusted reconstruction blocks, and the effectiveness of the pixel points in the pixel region to be matched is ensured.
In step S606, a first pixel region matching the UV value of the block to be encoded is searched for in the first region to be matched, wherein the size of the first pixel region is the same as the size of the block to be encoded.
And searching a first pixel region matched with the block to be coded in the first region to be matched after the first region to be matched is obtained. The way to find the first pixel area may include: on the premise that each coding block selects different resolution codes, the resolution (second resolution) of the reconstruction block of each coding block is unified, and a first pixel region (such as a most similar region) matched with the to-be-coded block in the coded block (a first to-be-matched region) is enumerated.
For example, when each encoding block adopts an intra block copy encoding mode under the premise of deciding to select encoding with different resolutions, searching a pixel area most similar to a current block to be encoded in a pixel area encoded in a frame (the most similar pixel area possibly spans multiple blocks, reconstructing and adjusting the multiple blocks into one and the same resolution, finding a pixel area corresponding to the current block on the multiple blocks), and calculating an MV from the pixel area to the current block. The way to find the most likely pixel area may be: enumeration finds the most similar region in the encoded block, and the distance of each pixel of the region to the current block needs to be calculated.
The region is obtained according to the reconstruction of the similar region, the similar region needs to be processed with uniform resolution, and the mode of uniform resolution can be as follows: each block is interpolated/downsampled to the target resolution. When adjusting the resolution, if the current resolution is low, the high resolution UV half-pixel values can be multiplexed in the downsampling: the UV value of the high resolution reference block can be directly used as the UV reference value of the half-pixel of the current coding block.
As an alternative, searching the first pixel region matching the block to be encoded in the first region to be matched includes: sequentially acquiring a plurality of candidate pixel areas with the same size as the block to be encoded from the first area to be matched according to the sequence of the first row and the second row by using a preset step length; and determining a first pixel area from the plurality of candidate pixel areas, wherein the first pixel area is the candidate pixel area which has the highest similarity with the block to be encoded and has the similarity with the block to be encoded higher than a similarity threshold value in the plurality of candidate pixel areas.
The way to enumerate the first pixel region that finds the first region to be matched to the UV value of the block to be encoded may be: and sequentially acquiring a plurality of candidate pixel areas with the same size as the block to be encoded from the first region to be matched by using a preset step length according to the sequence of the first sequence and the second sequence, and taking the candidate pixel area with the highest similarity (the similarity of the UV value) with the block to be encoded and the similarity with the block to be encoded higher than a similarity threshold value as the first pixel area.
It should be noted that, the similarity between the candidate pixel region and the block to be encoded may be: the ratio of the number of pixels with the same UV value at the same position to the total number of pixels contained in the candidate pixel area. Other types of similarity are also possible. The manner of determining the similarity between the candidate pixel region and the block to be encoded may be set as required, and is not particularly limited in this embodiment.
For example, as shown in fig. 8, the candidate pixel region may be determined by first obtaining a first candidate pixel region (the pixel point in the upper left corner is a (0, 0)) having the same size as the block to be encoded, with the pixel point in the upper left corner of the first region to be matched (the second region to be matched is similar to the first region to be matched) as the starting point; then shifting half pixel points to the right (each point in fig. 8 represents half pixel points shifted due to the second resolution), resulting in a second candidate pixel region (the pixel point in the upper left corner is a (0, 1)); sequentially acquiring candidate pixel areas in a mode of shifting one pixel point rightward until reaching the right side of the first area to be matched; then, translating downwards by one line, returning to the left side, and continuously acquiring a candidate pixel region (the pixel point at the upper left corner is A (1, 0)); the candidate pixel regions are sequentially acquired in the preceding and following manner until no candidate pixel region satisfying the size condition is present.
According to the embodiment, a plurality of candidate pixel areas are sequentially acquired by using a preset step length according to the sequence of the preceding column or the following column or the preceding column and the following row; and the first pixel area is determined from the plurality of candidate pixel areas, so that omission of acquisition of the candidate pixel areas is avoided, and the accuracy of determination of the first pixel area is ensured.
In step S608, the MV from the first pixel region to the block to be encoded is acquired, and the first MV corresponding to the UV value of the block to be encoded is obtained.
After the first pixel region is determined, a motion vector from a reference point position in the first pixel region to a reference point position in the block to be encoded may be used as a first MV corresponding to a UV value of the block to be encoded.
Alternatively, in addition to the first MV, a difference of UV values between a pixel point in the first pixel region and a pixel point in the block to be encoded may be determined, and the difference may be written as a target conversion parameter into the video bitstream obtained after encoding (for example, written as indication information to a specific position in the video bitstream).
It should be noted that if the first pixel area matching with the UV value of the block to be encoded cannot be found, the block to be encoded may be directly encoded according to the first resolution, so as to obtain an encoded block (encoded data) corresponding to the block to be encoded, and the obtained encoded data may be written into the video bitstream.
Specifically, steps S902 to S930 in the example shown in fig. 9 are described. In this example, when the intra block copy coding mode is adopted in a scene of block-level different resolution coding, a pixel region most similar to a current block to be coded is searched in a pixel region coded in a frame, and an MV from the pixel region to the current block is calculated, wherein the most similar pixel region possibly spans multiple blocks, the multiple blocks are reconstructed and adjusted to the same resolution, and the pixel region corresponding to the current block is found on the multiple blocks. For matching of UV values, the resolution adjustment used in this example is: for each coding block with the second resolution which is not predetermined, the resolution of each coding block is adjusted to the second resolution by adopting an up-sampling interpolation or down-sampling mode.
The relationship between the second resolution and the first resolution adopted when the block to be coded is as follows: the first resolution is a multiplied by b, the second resolution is 2a multiplied by 2b (n is 2), and the UV value of the reference block with high resolution can be directly used as the UV reference value of half pixel of the current coding block by adjusting the resolution to the second resolution, so that the operation is simplified, and the information loss is avoided.
At the encoding end, steps S902 to S916 are performed: obtaining a video frame to be encoded, and deciding through the resolution of a block to be encoded; the resolution adopted when the block to be encoded is determined to be the first resolution (a×b), and then the reconstructed blocks of the plurality of encoded blocks are adjusted to the target resolution (the first resolution, or the second resolution 2a×2 b) (step S906-2 to step S906-8), so as to obtain the pixel region to be matched (including the first region to be matched and the second region to be matched). Judging whether pixel areas (a first pixel area and a second pixel area) which are most similar to the current block to be encoded are found from the pixel areas to be matched (the first area to be matched and the second area to be matched); if yes, determining a target MV (comprising a first MV and a second MV) and a target transformation parameter corresponding to the block to be coded; the method comprises the steps of adjusting reconstructed blocks of a plurality of encoded blocks to target resolution, obtaining a pixel region to be matched, and judging whether a pixel region (a first pixel region and a second pixel region) which is most similar to a current block to be encoded is searched from the pixel region to be matched; if so, determining a target MV and a target conversion parameter corresponding to the block to be coded; if not, the block to be coded is coded by adopting the first resolution, the resolution identification of the first resolution is added into the video code stream, and the video code stream is output.
At the decoding end, steps S918 to S930 are performed: acquiring a video code stream; performing resolution decision on the block to be decoded, and determining a first resolution corresponding to the block to be decoded; determining whether a target MV (a first MV and a second MV) is acquired from a video code stream; if the target MV is acquired, the reconstructed blocks of the plurality of decoded blocks are adjusted to a target resolution (first resolution, or second resolution 2a×2b) (steps S924-2 to S924-8), and a pixel region to be matched is obtained; determining a target pixel area (a first pixel area and a second pixel area) matched with a block to be decoded according to a target MV, and determining a pixel value of a pixel point in the target decoding block obtained by decoding the block to be decoded according to a first resolution according to the pixel value of the pixel point in the target pixel area; if the target MV is not acquired, the block to be decoded is decoded with a first resolution.
And decoding each block to be decoded of each video frame to be decoded to obtain a decoded video frame corresponding to each video frame to be decoded in the video code stream, and finally decoding the video.
The foregoing is merely an example, and the video encoding method and the video decoding method provided in this embodiment are applied to the decision process of the target MV and the use process of the target MV shown in fig. 1, so that in the case where the encoding end and the decoding end adopt different resolutions for different blocks to be encoded/decoded, before encoding each block according to the different resolutions, the resolution of the reconstructed block of the encoded block with each resolution that is not the predetermined target resolution (the first resolution or the second resolution) is adjusted to the target resolution by adopting an upsampling interpolation or downsampling method, so as to determine the motion information between each block and its reference block, so as to perform encoding and decoding by directly using the relative relationship, and improve the encoding and decoding efficiency.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
According to still another aspect of the embodiment of the present invention, there is also provided a video decoding apparatus. As shown in fig. 10, the apparatus includes:
(1) A first adjusting unit 1002, configured to directly adjust the resolution of a reconstructed block of an encoded block of a video frame to be encoded to a second resolution na×nb from the initial resolution when the initial resolution of the reconstructed block of the encoded block of the video frame to be encoded is higher than a first resolution a×b employed when encoding, where n is an integer greater than or equal to 2, and the video frame to be encoded is a YUV image;
(2) A first determining unit 1004, configured to determine a first to-be-matched area with a resolution of a second resolution according to an area where the reconstruction block is located, where the first to-be-matched area is a pixel area to be subjected to UV value matching,
(3) A second determining unit 1006, configured to determine, from a first region to be matched, a first pixel region that matches a UV value of a block to be decoded according to a first MV that corresponds to the UV value of the block to be decoded, where the first MV is a motion vector from the first pixel region to the block to be decoded, and a size of the first pixel region is the same as a size of the block to be decoded;
(4) And a third determining unit 1008, configured to determine, according to the UV value of the pixel point in the first pixel area, the UV value of the pixel point obtained after the decoding of the block to be decoded.
It should be noted that the video decoding apparatus shown in fig. 10 may be used in the video decoder shown in fig. 1, but is not limited to the above. The video decoder is matched with other parts in interaction to complete the decoding process of the video frames to be decoded.
Alternatively, the first adjusting unit 1002 may be used to perform the aforementioned step S202, the first determining unit 1004 may be used to perform the aforementioned step S204, the second determining unit 1006 may be used to perform the aforementioned step S206, and the third determining unit 1008 may be used to perform the aforementioned step S208.
In this embodiment, for the UV value of the current block to be decoded in the current video frame to be decoded in the video to be decoded, a plurality of decoded blocks are reconstructed and adjusted to the same resolution (the second resolution), so as to obtain a first region to be matched, and according to the first pixel region matched with the first MV corresponding to the UV value of the block to be decoded, the UV value of the pixel point in the target decoding block obtained by decoding the block to be decoded is determined according to the UV value of the pixel point in the first pixel region, which can solve the technical problems of low encoding and decoding efficiency and poor decoding effect existing in the related art that different blocks in one frame of video adopt different resolutions for encoding and decoding.
As an alternative embodiment, the first adjusting unit 1102 includes:
(1) A first downsampling module for downsampling the resolution of the reconstructed block from an initial resolution to a second resolution if the initial resolution is higher than the second resolution;
(2) And the first upsampling module is used for upsampling the resolution of the reconstruction block from the initial resolution to the second resolution under the condition that the initial resolution is lower than the second resolution.
By the embodiment, the resolution of the reconstruction block is up-sampled or down-sampled according to the relation between the initial resolution and the second resolution, so that the resolution of the reconstruction block can be ensured to be adjusted to the second resolution, and the accuracy of determining the first region to be matched is improved.
As an alternative embodiment, the first adjusting unit 1002 includes:
(1) The second downsampling module is used for downsampling the resolution of the reconstructed block of the first block from the initial resolution to the second resolution to obtain a first decoded block with the resolution of the second resolution when the decoded block comprises a plurality of blocks and the plurality of blocks comprise a first block with the initial resolution higher than the second resolution, wherein the first region to be matched comprises a region where the first decoded block is located;
(2) And a second upsampling module for upsampling the resolution of the reconstructed block of the second block from the initial resolution to the second resolution to obtain a second decoded block having a resolution of the second resolution, in case the decoded block comprises a plurality of blocks, and the plurality of blocks comprises a second block having an initial resolution higher than the first resolution and lower than the second resolution, wherein the first region to be matched comprises the second decoded block.
According to the embodiment, when the number of the decoded blocks is multiple, the resolution of the reconstructed block of each decoded block is adjusted according to the relation between the resolution corresponding to each decoded block and the second resolution, so that the resolution of each reconstructed block can be ensured to be adjusted to the second resolution, and the accuracy of determining the first region to be matched is improved.
As an alternative embodiment, the device further comprises:
(1) And the filtering unit is used for carrying out edge filtering on pixel points on adjacent edges of adjacent pixel blocks in the first to-be-matched area under the condition that the decoded block comprises a plurality of blocks after the first to-be-matched area with the resolution of the second resolution is determined according to the area where the reconstructed block is located, wherein the adjacent pixel blocks are the pixel blocks corresponding to the adjacent blocks in the plurality of blocks in the first to-be-matched area.
According to the embodiment, the influence of resolution adjustment on the pixel points can be reduced by carrying out edge filtering on the adjusted reconstruction blocks, and the effectiveness of the pixel points in the pixel region to be matched is ensured.
As an alternative embodiment, the second determining unit 1006 includes:
(1) The first determining module is used for determining a second pixel position matched with the first pixel position in the block to be decoded in the first region to be matched, wherein the motion vector from the second pixel position to the first pixel position is a first MV;
(2) And the second determining module is used for determining a first pixel area in the first area to be matched according to the second pixel position, wherein the relative position of the second pixel position in the first pixel area is the same as the relative position of the first pixel position in the block to be decoded.
According to the embodiment, the first pixel area is determined according to the first MV corresponding to the block to be decoded and the reference point position (the first pixel point position) in the block to be decoded, so that the accuracy of determining the first pixel point position can be ensured, and the decoding quality can be improved.
As an alternative embodiment, the apparatus further comprises:
(1) A second adjustment unit for adjusting the resolution of the reconstruction block from the initial resolution to the first resolution;
(2) A fourth determining unit, configured to determine, according to an area where the reconstruction block is located, a second area to be matched with the resolution being the first resolution, where the second area to be matched is a pixel area to be subjected to Y-value matching;
(3) A fifth determining unit, configured to determine a second pixel region matching the block to be decoded from a second region to be matched according to a second MV corresponding to a Y value of the block to be decoded, where the second MV is a motion vector from the second pixel region to the block to be decoded, and a size of the second pixel region is the same as a size of the block to be decoded;
(4) And a sixth determining unit, configured to determine, according to the Y value of the pixel point in the second pixel area, the Y value of the pixel point obtained after decoding the block to be decoded.
According to the embodiment, the resolution of the reconstructed block of the decoded block is unified from the initial resolution to the first resolution, so that the pixel region matched with the current block to be decoded can be conveniently searched under the same resolution, the decoding efficiency can be improved, and the decoding effect is improved.
According to still another aspect of the embodiment of the present invention, there is also provided a video encoding apparatus. As shown in fig. 11, the apparatus includes:
(1) A first adjusting unit 1102, configured to directly adjust the resolution of a reconstructed block of an encoded block of a video frame to be encoded to a second resolution na×nb from the initial resolution when the initial resolution of the reconstructed block of the encoded block of the video frame to be encoded is higher than a first resolution a×b adopted when encoding, where n is an integer greater than or equal to 2, and the video frame to be encoded is a YUV image;
(2) A first determining unit 1104, configured to determine a first region to be matched with a resolution of a second resolution according to a region where the reconstruction block is located, where the first region to be matched is a pixel region to be matched with the UV value;
(3) A first searching unit 1106, configured to search a first pixel area matching with the UV value of the block to be encoded in a first area to be matched, where the size of the first pixel area is the same as the size of the block to be encoded;
(4) The first obtaining unit 1108 is configured to obtain a motion vector MV from the first pixel region to the block to be encoded, and obtain a first MV corresponding to a UV value of the block to be encoded.
It should be noted that the video encoding apparatus shown in fig. 11 may be used in the video encoder shown in fig. 1, but is not limited to the foregoing. The video encoder is matched with other parts in interaction to complete the encoding process of the video frames to be encoded.
Alternatively, the first adjusting unit 1102 may be used to perform the foregoing step S602, the first determining unit 1104 may be used to perform the foregoing step S604, the first searching unit 1106 may be used to perform the foregoing step S606, and the first obtaining unit 1108 may be used to perform the foregoing step S608.
In this embodiment, for the UV value of the current block to be encoded in the current video frame to be encoded in the video to be decoded, a plurality of encoded blocks are reconstructed and adjusted to the same resolution (the second resolution), so as to obtain a first region to be matched, and a first pixel region matched with the UV value of the block to be encoded is searched from the first region to be matched, so as to determine a first MV from the first pixel region to the block to be encoded, thereby solving the technical problems of low encoding and decoding efficiency and poor decoding effect existing in the manner that different blocks in one frame of the video adopt different resolutions for encoding and decoding in the related art.
As an alternative embodiment, the first adjusting unit 1102 includes:
(1) A first downsampling module for downsampling the resolution of the reconstructed block from an initial resolution to a second resolution if the initial resolution is higher than the second resolution;
(2) And the first upsampling module is used for upsampling the resolution of the reconstruction block from the initial resolution to the second resolution under the condition that the initial resolution is lower than the second resolution.
By the embodiment, the resolution of the reconstruction block is up-sampled or down-sampled according to the relation between the initial resolution and the second resolution, so that the resolution of the reconstruction block can be ensured to be adjusted to the second resolution, and the accuracy of determining the first region to be matched is improved.
As an alternative embodiment, the first adjusting unit 1102 includes:
(1) The second downsampling module is used for downsampling the resolution of the reconstructed block of the first block from the initial resolution to the second resolution to obtain a first encoded block with the resolution of the second resolution when the encoded block comprises a plurality of blocks and the plurality of blocks comprise a first block with the initial resolution higher than the second resolution, wherein the first region to be matched comprises a region where the first encoded block is located;
(2) And the second upsampling module is used for upsampling the resolution of the reconstructed block of the second block from the initial resolution to the second resolution to obtain a second coded block with the resolution of the second resolution under the condition that the coded block comprises a plurality of blocks and the plurality of blocks comprise the second block with the initial resolution lower than the second resolution, wherein the first region to be matched comprises the region where the second coded block is located.
According to the embodiment, when the number of the decoded blocks is multiple, the resolution of the reconstructed block of each decoded block is adjusted according to the relation between the resolution corresponding to each decoded block and the second resolution, so that the resolution of each reconstructed block can be ensured to be adjusted to the second resolution, and the accuracy of determining the first region to be matched is improved.
As an alternative embodiment, the apparatus further comprises:
(1) And the filtering unit is used for carrying out edge filtering on pixel points on adjacent edges of adjacent pixel blocks in the first to-be-matched area under the condition that the coded block comprises a plurality of blocks after the first to-be-matched area with the resolution of the second resolution is determined according to the area where the reconstructed block is located, wherein the adjacent pixel blocks are the pixel blocks corresponding to the adjacent blocks in the plurality of blocks in the first to-be-matched area.
According to the embodiment, the influence of resolution adjustment on the pixel points can be reduced by carrying out edge filtering on the adjusted reconstruction blocks, and the effectiveness of the pixel points in the pixel region to be matched is ensured.
As an alternative embodiment, the first search unit 1106 includes:
(1) The acquisition module is used for sequentially acquiring a plurality of candidate pixel areas with the same size as the block to be encoded from the first area to be matched according to the sequence of the preceding column or the following column by using a preset step length;
(2) And the determining module is used for determining a first pixel area from the plurality of candidate pixel areas, wherein the first pixel area is the candidate pixel area which has the highest similarity with the block to be encoded and has the similarity with the block to be encoded higher than a similarity threshold value in the plurality of candidate pixel areas.
According to the embodiment, a plurality of candidate pixel areas are sequentially acquired by using a preset step length according to the sequence of the preceding column or the following column or the preceding column and the following row; and the first pixel area is determined from the plurality of candidate pixel areas, so that omission of acquisition of the candidate pixel areas is avoided, and the accuracy of determination of the first pixel area is ensured.
As an alternative embodiment, the apparatus further comprises:
(1) A second adjustment unit for adjusting the resolution of the reconstruction block from the initial resolution to the first resolution;
(2) The second determining unit is used for determining a second region to be matched with the first resolution according to the region where the reconstruction block is located, wherein the second region to be matched is a pixel region to be subjected to Y value matching;
(3) The second searching unit is used for searching a second pixel area matched with the Y value of the block to be encoded in a second area to be matched, wherein the size of the second pixel area is the same as that of the block to be encoded;
(3) And the second acquisition unit is used for acquiring the motion vector MV from the second pixel region to the block to be encoded to obtain a second MV corresponding to the Y value of the block to be encoded.
According to the embodiment, the resolution of the reconstructed block of the encoded block is unified from the initial resolution to the first resolution, so that the pixel region matched with the current block to be encoded can be conveniently searched under the same resolution, the encoding efficiency can be improved, and the encoding effect can be improved.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
According to a further aspect of embodiments of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that the initial resolution of a reconstructed block of a decoded block of a video frame to be decoded is higher than the first resolution a multiplied by b adopted by the block to be decoded of the video frame to be decoded in decoding, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution na multiplied by nb, wherein n is an integer greater than or equal to 2, and the video frame to be decoded is a YUV image;
s2, determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching;
s3, determining a first pixel region matched with the UV value of the block to be decoded from a first region to be matched according to a first MV corresponding to the UV value of the block to be decoded, wherein the first MV is a motion vector from the first pixel region to the block to be decoded, and the size of the first pixel region is the same as that of the block to be decoded;
And S4, determining the UV value of the pixel point obtained after decoding the block to be decoded according to the UV value of the pixel point in the first pixel region.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that the initial resolution of a reconstruction block of an encoded block of a video frame to be encoded is higher than the first resolution a multiplied by b adopted when the encoding is carried out on the block to be encoded of the video frame to be encoded, directly adjusting the resolution of the reconstruction block from the initial resolution to the second resolution na multiplied by nb, wherein n is an integer which is more than or equal to 2, and the video frame to be encoded is a YUV image;
s2, determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching;
s3, searching a first pixel area matched with the UV value of the block to be encoded in the first area to be matched, wherein the size of the first pixel area is the same as that of the block to be encoded;
and S4, obtaining MVs from the first pixel region to the block to be encoded, and obtaining a first MV corresponding to the UV value of the block to be encoded.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
According to a further aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the video decoding method or the video encoding method described above, as shown in fig. 12, the electronic device comprising a memory 1202 and a processor 1204, the memory 1202 storing a computer program, the processor 1204 being arranged to perform the steps of any of the method embodiments described above by means of the computer program.
Alternatively, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, under the condition that the initial resolution of a reconstructed block of a decoded block of a video frame to be decoded is higher than the first resolution a multiplied by b adopted by the block to be decoded of the video frame to be decoded in decoding, directly adjusting the resolution of the reconstructed block from the initial resolution to the second resolution na multiplied by nb, wherein n is an integer greater than or equal to 2, and the video frame to be decoded is a YUV image;
s2, determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching;
S3, determining a first pixel region matched with the UV value of the block to be decoded from a first region to be matched according to a first MV corresponding to the UV value of the block to be decoded, wherein the first MV is a motion vector from the first pixel region to the block to be decoded, and the size of the first pixel region is the same as that of the block to be decoded;
and S4, determining the UV value of the pixel point obtained after decoding the block to be decoded according to the UV value of the pixel point in the first pixel region.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, under the condition that the initial resolution of a reconstruction block of an encoded block of a video frame to be encoded is higher than the first resolution a multiplied by b adopted when the encoding is carried out on the block to be encoded of the video frame to be encoded, directly adjusting the resolution of the reconstruction block from the initial resolution to the second resolution na multiplied by nb, wherein n is an integer which is more than or equal to 2, and the video frame to be encoded is a YUV image;
s2, determining a first region to be matched with a second resolution according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching;
s3, searching a first pixel area matched with the UV value of the block to be encoded in the first area to be matched, wherein the size of the first pixel area is the same as that of the block to be encoded;
And S4, obtaining MVs from the first pixel region to the block to be encoded, and obtaining a first MV corresponding to the UV value of the block to be encoded.
Alternatively, it will be understood by those skilled in the art that the structure shown in fig. 12 is only schematic, and the electronic device may also be a terminal device such as a smart phone (e.g. an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 12 is not limited to the structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 12, or have a different configuration than shown in FIG. 12.
The memory 1202 may be used to store software programs and modules, such as a video decoding method and apparatus or program instructions/modules corresponding to a video encoding method and apparatus in an embodiment of the present invention, and the processor 1204 executes the software programs and modules stored in the memory 1202 to perform various functional applications and data processing, that is, implement the video decoding method or the video encoding method. Memory 1202 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1202 may further include memory located remotely from the processor 1204, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 1202 may be, but not limited to, a memory for storing information such as sample characteristics of the item and a target virtual resource account number. As an example, as shown in fig. 12, the memory 1202 may include, but is not limited to, a first adjustment unit 1002, a first determination unit 1004, a second determination unit 1006, and a third determination unit 1008 in the video decoding apparatus. As another example, the memory 1202 may include, but is not limited to, the first adjusting unit 1102, the first determining unit 1104, the first searching unit 1106, and the first obtaining unit 1108 in the video encoding apparatus. In addition, the foregoing video decoding apparatus or other module units in the video encoding apparatus may be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 1206 is configured to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission means 1206 comprises a network adapter (Network Interface Controller, NIC) that can be connected to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 1206 is a Radio Frequency (RF) module for communicating wirelessly with the internet.
In addition, the electronic device further includes: a connection bus 1208 for connecting the respective module components in the above-described electronic apparatus.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present invention.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (16)

1. A video decoding method, comprising:
directly adjusting the resolution of a reconstructed block of a decoded block of a video frame to be decoded from the initial resolution to a second resolution na×nb under the condition that the initial resolution of the reconstructed block of the decoded block of the video frame to be decoded is higher than a first resolution a×b adopted by the block to be decoded in decoding, wherein n is an integer greater than or equal to 2, and the video frame to be decoded is a YUV image;
determining a first region to be matched with the resolution ratio of the second resolution ratio according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching;
Determining a first pixel region matched with the UV value of the block to be decoded from the first region to be matched according to a first MV corresponding to the UV value of the block to be decoded, wherein the first MV is a motion vector from the first pixel region to the block to be decoded, and the size of the first pixel region is the same as the size of the block to be decoded;
determining a second pixel position matched with a first pixel position in the block to be decoded in the first region to be matched, wherein a motion vector from the second pixel position to the first pixel position is the first MV; determining the first pixel area in the first area to be matched according to the second pixel position, wherein the relative position of the second pixel position in the first pixel area is the same as the relative position of the first pixel position in the block to be decoded;
adjusting the resolution of the reconstructed block from the initial resolution to the first resolution; determining a second region to be matched with the resolution ratio being the first resolution ratio according to the region where the reconstruction block is located, wherein the second region to be matched is a pixel region to be subjected to Y value matching; determining a second pixel region matched with the block to be decoded from the second region to be matched according to a second MV corresponding to the Y value of the block to be decoded, wherein the second MV is a motion vector from the second pixel region to the block to be decoded, and the size of the second pixel region is the same as the size of the block to be decoded; and determining the Y value of the pixel point obtained after the decoding of the block to be decoded according to the Y value of the pixel point in the second pixel region.
2. The method of claim 1, wherein adjusting the resolution of the reconstructed block from the initial resolution directly to the second resolution comprises:
downsampling the resolution of the reconstructed block from the initial resolution to the second resolution if the initial resolution is higher than the second resolution;
in case the initial resolution is lower than the second resolution, upsampling the resolution of the reconstructed block from the initial resolution to the second resolution.
3. The method of claim 1, wherein adjusting the resolution of the reconstructed block from the initial resolution directly to the second resolution comprises:
downsampling the resolution of a reconstructed block of the first block from the initial resolution to the second resolution to obtain a first decoded block with the resolution of the second resolution, wherein the first region to be matched comprises a region in which the first decoded block is located, when the decoded block comprises a plurality of blocks and the plurality of blocks comprises a first block with the initial resolution higher than the second resolution;
and under the condition that the decoded blocks comprise a plurality of blocks and the plurality of blocks comprise a second block with the initial resolution lower than the second resolution, upsampling the resolution of the reconstructed block of the second block from the initial resolution to the second resolution to obtain a second decoded block with the resolution of the second resolution, wherein the first region to be matched comprises a region where the second decoded block is located.
4. The method according to claim 1, wherein after determining the first region to be matched having the resolution of the second resolution from the region in which the reconstructed block is located, the method further comprises:
and carrying out edge filtering on pixel points on adjacent sides of adjacent pixel blocks in the first region to be matched under the condition that the decoded blocks comprise a plurality of blocks, wherein the adjacent pixel blocks are pixel blocks corresponding to the adjacent blocks in the plurality of blocks in the first region to be matched.
5. A video encoding method, comprising:
directly adjusting the resolution of a reconstructed block of an encoded block of a video frame to be encoded to a second resolution na x nb from the initial resolution under the condition that the initial resolution of the reconstructed block is higher than a first resolution a x b adopted when encoding the block to be encoded of the video frame to be encoded, wherein n is an integer greater than or equal to 2, and the video frame to be encoded is a YUV image;
determining a first region to be matched with the resolution ratio of the second resolution ratio according to the region where the reconstruction block is located, wherein the first region to be matched is a pixel region to be subjected to UV value matching;
Sequentially acquiring a plurality of candidate pixel areas with the same size as the block to be encoded from the first area to be matched according to the sequence of the preceding column or the following column by using a preset step length; determining a first pixel area from the plurality of candidate pixel areas, wherein the first pixel area is the candidate pixel area with the highest similarity with the block to be encoded and the similarity with the block to be encoded in the plurality of candidate pixel areas being higher than a similarity threshold, and the size of the first pixel area is the same as the size of the block to be encoded;
obtaining a motion vector MV from the first pixel region to the block to be encoded, and obtaining a first MV corresponding to the UV value of the block to be encoded;
adjusting the resolution of the reconstructed block from the initial resolution to the first resolution; determining a second region to be matched with the resolution ratio being the first resolution ratio according to the region where the reconstruction block is located, wherein the second region to be matched is a pixel region to be subjected to Y value matching; searching a second pixel region matched with the Y value of the block to be encoded in the second region to be matched, wherein the size of the second pixel region is the same as that of the block to be encoded; and obtaining a motion vector MV from the second pixel region to the block to be encoded, and obtaining a second MV corresponding to the Y value of the block to be encoded.
6. The method of claim 5, wherein adjusting the resolution of the reconstructed block from the initial resolution directly to the second resolution comprises:
downsampling the resolution of a reconstructed block of the first block from the initial resolution to the second resolution to obtain a first encoded block with the resolution of the second resolution, wherein the first region to be matched comprises a region in which the first encoded block is located, when the encoded block comprises a plurality of blocks and the plurality of blocks comprises a first block with the initial resolution higher than the second resolution;
and under the condition that the encoded blocks comprise a plurality of blocks and the plurality of blocks comprise a second block with the initial resolution lower than the second resolution, upsampling the resolution of the reconstructed block of the second block from the initial resolution to the second resolution to obtain a second encoded block with the resolution being the second resolution, wherein the first region to be matched comprises a region where the second encoded block is located.
7. The method of claim 5, wherein after adjusting the resolution of the reconstructed block of the encoded block of the video frame to be encoded from the initial resolution to the second resolution, the method further comprises:
And carrying out edge filtering on pixel points on adjacent sides of adjacent pixel blocks in the first region to be matched under the condition that the encoded blocks comprise a plurality of blocks, wherein the adjacent pixel blocks are the pixel blocks corresponding to the adjacent blocks in the plurality of blocks in the first region to be matched.
8. A video decoding apparatus, comprising:
a first adjusting unit, configured to directly adjust a resolution of a reconstructed block of a decoded block of a video frame to be decoded from an initial resolution to a second resolution na×nb, where n is an integer greater than or equal to 2, and the video frame to be decoded is a YUV image, when the initial resolution of the reconstructed block is higher than a first resolution a×b employed by the decoded block of the video frame to be decoded in decoding;
the first determining unit is used for determining a first region to be matched with the resolution ratio being the second resolution ratio according to the region where the reconstruction block is located, wherein the video frame to be decoded is a YUV image, and the first region to be matched is a pixel region to be subjected to UV value matching;
a second determining unit, configured to determine, from the first region to be matched, a first pixel region that matches the UV value of the block to be decoded according to a first MV that corresponds to the UV value of the block to be decoded, where the first MV is a motion vector from the first pixel region to the block to be decoded, and a size of the first pixel region is the same as a size of the block to be decoded;
A third determination unit including: a first determining module, configured to determine, in the first region to be matched, a second pixel position that matches a first pixel position in the block to be decoded, where a motion vector from the second pixel position to the first pixel position is the first MV; a second determining module, configured to determine, according to the second pixel location, the first pixel area in the first to-be-matched area, where a relative location of the second pixel location in the first pixel area is the same as a relative location of the first pixel location in the block to be decoded;
a second adjustment unit configured to adjust a resolution of the reconstruction block from the initial resolution to the first resolution; a fourth determining unit, configured to determine, according to an area where the reconstruction block is located, a second area to be matched with the resolution being the first resolution, where the second area to be matched is a pixel area to be subjected to Y value matching; a fifth determining unit, configured to determine a second pixel region matched with the block to be decoded from the second region to be matched according to a second MV corresponding to the Y value of the block to be decoded, where the second MV is a motion vector from the second pixel region to the block to be decoded, and a size of the second pixel region is the same as a size of the block to be decoded; and a sixth determining unit, configured to determine, according to the Y value of the pixel point in the second pixel area, the Y value of the pixel point obtained after decoding the block to be decoded.
9. The apparatus of claim 8, wherein the first adjustment unit comprises:
a first downsampling module for downsampling the resolution of the reconstruction block from the initial resolution to the second resolution if the initial resolution is higher than the second resolution;
a first upsampling module for upsampling the resolution of the reconstructed block from the initial resolution to the second resolution in case the initial resolution is lower than the second resolution.
10. The apparatus of claim 8, wherein the first adjustment unit further comprises:
a second downsampling module, configured to downsample, from the initial resolution to the second resolution, a resolution of a reconstructed block of the first block to obtain a first decoded block with the resolution being the second resolution, where the first region to be matched includes a region where the first decoded block is located, when the decoded block includes a plurality of blocks and the plurality of blocks includes a first block with the initial resolution being higher than the second resolution;
and the second upsampling module is used for upsampling the resolution of the reconstructed block of the second block from the initial resolution to the second resolution to obtain a second decoded block with the resolution of the second resolution when the decoded block comprises a plurality of blocks and the plurality of blocks comprises a second block with the initial resolution lower than the second resolution, wherein the first region to be matched comprises a region where the second decoded block is located.
11. The apparatus of claim 8, wherein the apparatus further comprises:
and the filtering unit is used for carrying out edge filtering on pixel points on adjacent edges of adjacent pixel blocks in the first to-be-matched area under the condition that the decoded block comprises a plurality of blocks after the first to-be-matched area with the resolution of the second resolution is determined according to the area where the reconstructed block is located, wherein the adjacent pixel blocks are the pixel blocks corresponding to the adjacent blocks in the first to-be-matched area.
12. A video encoding apparatus, comprising:
a first adjusting unit, configured to directly adjust a resolution of a reconstructed block of an encoded block of a video frame to be encoded to a second resolution na×nb from an initial resolution when the initial resolution is higher than a first resolution a×b adopted when encoding the encoded block of the video frame to be encoded, where n is an integer greater than or equal to 2, and the video frame to be encoded is a YUV image;
the first determining unit is used for obtaining a first region to be matched with the second resolution according to the region where the reconstruction block is located, wherein the video frame to be encoded is a YUV image, and the first region to be matched is a pixel region to be subjected to UV value matching;
A first lookup unit, the first lookup unit comprising: the acquisition module is used for sequentially acquiring a plurality of candidate pixel areas with the same size as the block to be encoded from the first area to be matched according to the sequence of the preceding column or the following column by using a preset step length; a determining module, configured to determine a first pixel area from the plurality of candidate pixel areas, where the first pixel area is a candidate pixel area with highest similarity to the block to be encoded and a similarity to the block to be encoded that is higher than a similarity threshold, and a size of the first pixel area is the same as a size of the block to be encoded;
the first acquisition unit is used for acquiring a motion vector MV from the first pixel region to the block to be encoded to obtain a first MV corresponding to the UV value of the block to be encoded;
a second adjustment unit configured to adjust a resolution of the reconstruction block from the initial resolution to the first resolution; the second determining unit is used for determining a second region to be matched with the first resolution according to the region where the reconstruction block is located, wherein the second region to be matched is a pixel region to be subjected to Y value matching; the second searching unit is used for searching a second pixel area matched with the Y value of the block to be encoded in the second area to be matched, wherein the size of the second pixel area is the same as that of the block to be encoded; and the second acquisition unit is used for acquiring the motion vector MV from the second pixel region to the block to be encoded to obtain a second MV corresponding to the Y value of the block to be encoded.
13. The apparatus of claim 12, wherein the first adjustment unit comprises:
a second downsampling module, configured to downsample, from the initial resolution, a resolution of a reconstructed block of the first block to the second resolution, to obtain a first encoded block having the resolution of the second resolution, where the first region to be matched includes a region in which the first encoded block is located, when the encoded block includes a plurality of blocks and the plurality of blocks includes a first block having the initial resolution higher than the second resolution;
and the second upsampling module is used for upsampling the resolution of the reconstructed block of the second block from the initial resolution to the second resolution to obtain a second coded block with the resolution of the second resolution under the condition that the coded block comprises a plurality of blocks and the plurality of blocks comprise a second block with the initial resolution lower than the second resolution, wherein the first region to be matched comprises a region where the second coded block is located.
14. The apparatus of claim 12, wherein the apparatus further comprises:
And a filtering unit, configured to, after adjusting the resolution of the reconstructed block of the encoded block of the video frame to be encoded from the initial resolution to the second resolution, perform edge filtering on pixel points on adjacent sides of adjacent pixel blocks in the first region to be matched, where the adjacent pixel blocks are pixel blocks corresponding to adjacent blocks in the first region to be matched, in a case where the encoded block includes a plurality of blocks.
15. A computer readable storage medium comprising a stored program, wherein the program when executed by a processor performs the method of any of the preceding claims 1 to 7.
16. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 7 by means of the computer program.
CN201910927119.6A 2019-09-27 2019-09-27 Video encoding method and apparatus, video decoding method and apparatus, and storage medium Active CN110677676B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910927119.6A CN110677676B (en) 2019-09-27 2019-09-27 Video encoding method and apparatus, video decoding method and apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910927119.6A CN110677676B (en) 2019-09-27 2019-09-27 Video encoding method and apparatus, video decoding method and apparatus, and storage medium

Publications (2)

Publication Number Publication Date
CN110677676A CN110677676A (en) 2020-01-10
CN110677676B true CN110677676B (en) 2024-02-09

Family

ID=69079703

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910927119.6A Active CN110677676B (en) 2019-09-27 2019-09-27 Video encoding method and apparatus, video decoding method and apparatus, and storage medium

Country Status (1)

Country Link
CN (1) CN110677676B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586416A (en) * 2020-06-02 2020-08-25 浙江大华技术股份有限公司 Video coding method, video coding device, video coder and storage device
WO2023193804A1 (en) * 2022-04-08 2023-10-12 Beijing Bytedance Network Technology Co., Ltd. Method, apparatus, and medium for video processing

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013113134A1 (en) * 2012-02-02 2013-08-08 Nokia Corporation An apparatus, a method and a computer program for video coding and decoding
US9154808B2 (en) * 2005-01-14 2015-10-06 Thomson Licensing Method and apparatus for INTRA prediction for RRU
CN107592972A (en) * 2015-05-11 2018-01-16 高通股份有限公司 Region of search for the Interframe coding in particular picture in video data determines
CN108769682A (en) * 2018-06-20 2018-11-06 腾讯科技(深圳)有限公司 Video coding, coding/decoding method, device, computer equipment and storage medium
CN108833916A (en) * 2018-06-20 2018-11-16 腾讯科技(深圳)有限公司 Video coding, coding/decoding method, device, storage medium and computer equipment
CN108848380A (en) * 2018-06-20 2018-11-20 腾讯科技(深圳)有限公司 Video coding and decoding method, apparatus, computer equipment and storage medium
CN109274969A (en) * 2017-07-17 2019-01-25 华为技术有限公司 The method and apparatus of colorimetric prediction
CN109618168A (en) * 2018-11-06 2019-04-12 建湖云飞数据科技有限公司 It is a kind of based on divide pixel value difference handle video encoding/decoding method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5544996B2 (en) * 2010-04-09 2014-07-09 ソニー株式会社 Image processing apparatus and method
US10327008B2 (en) * 2010-10-13 2019-06-18 Qualcomm Incorporated Adaptive motion vector resolution signaling for video coding
US9854201B2 (en) * 2015-01-16 2017-12-26 Microsoft Technology Licensing, Llc Dynamically updating quality to higher chroma sampling rate
US10638137B2 (en) * 2018-03-07 2020-04-28 Tencent America LLC Method and apparatus for video coding

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9154808B2 (en) * 2005-01-14 2015-10-06 Thomson Licensing Method and apparatus for INTRA prediction for RRU
WO2013113134A1 (en) * 2012-02-02 2013-08-08 Nokia Corporation An apparatus, a method and a computer program for video coding and decoding
CN107592972A (en) * 2015-05-11 2018-01-16 高通股份有限公司 Region of search for the Interframe coding in particular picture in video data determines
CN109274969A (en) * 2017-07-17 2019-01-25 华为技术有限公司 The method and apparatus of colorimetric prediction
CN108769682A (en) * 2018-06-20 2018-11-06 腾讯科技(深圳)有限公司 Video coding, coding/decoding method, device, computer equipment and storage medium
CN108833916A (en) * 2018-06-20 2018-11-16 腾讯科技(深圳)有限公司 Video coding, coding/decoding method, device, storage medium and computer equipment
CN108848380A (en) * 2018-06-20 2018-11-20 腾讯科技(深圳)有限公司 Video coding and decoding method, apparatus, computer equipment and storage medium
CN109618168A (en) * 2018-11-06 2019-04-12 建湖云飞数据科技有限公司 It is a kind of based on divide pixel value difference handle video encoding/decoding method

Also Published As

Publication number Publication date
CN110677676A (en) 2020-01-10

Similar Documents

Publication Publication Date Title
CN108848376B (en) Video encoding method, video decoding method, video encoding device, video decoding device and computer equipment
CN108833917B (en) Video encoding method, video decoding method, video encoding apparatus, video decoding apparatus, computer device, and storage medium
EP2916543A1 (en) Method for coding/decoding depth image and coding/decoding device
CN110636312B (en) Video encoding and decoding method and device and storage medium
CN110636294B (en) Video decoding method and device, and video encoding method and device
CN108848377B (en) Video encoding method, video decoding method, video encoding apparatus, video decoding apparatus, computer device, and storage medium
CN110870310A (en) Image encoding method and apparatus
CN110677676B (en) Video encoding method and apparatus, video decoding method and apparatus, and storage medium
CN110572673B (en) Video encoding and decoding method and device, storage medium and electronic device
CN110545433B (en) Video encoding and decoding method and device and storage medium
CN110572677B (en) Video encoding and decoding method and device, storage medium and electronic device
CN110662071B (en) Video decoding method and device, storage medium and electronic device
CN110572672B (en) Video encoding and decoding method and device, storage medium and electronic device
CN110677653B (en) Video encoding and decoding method and device and storage medium
CN112601095A (en) Method and system for creating fractional interpolation model of video brightness and chrominance
CN110572676B (en) Video encoding method and apparatus, video decoding method and apparatus, and storage medium
CN110662060B (en) Video encoding method and apparatus, video decoding method and apparatus, and storage medium
CN115442617A (en) Video processing method and device based on video coding
CN110582022B (en) Video encoding and decoding method and device and storage medium
CN110677721B (en) Video encoding and decoding method and device and storage medium
CN110636293B (en) Video encoding and decoding methods and devices, storage medium and electronic device
CN110677690B (en) Video processing method and device and storage medium
CN110677692B (en) Video decoding method and device and video encoding method and device
CN110545431B (en) Video decoding method and device, video encoding method and device
CN114240750A (en) Video resolution improving method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40019527

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant