WO2024119488A1 - 视频编解码方法、解码器、编码器及计算机可读存储介质 - Google Patents

视频编解码方法、解码器、编码器及计算机可读存储介质 Download PDF

Info

Publication number
WO2024119488A1
WO2024119488A1 PCT/CN2022/137973 CN2022137973W WO2024119488A1 WO 2024119488 A1 WO2024119488 A1 WO 2024119488A1 CN 2022137973 W CN2022137973 W CN 2022137973W WO 2024119488 A1 WO2024119488 A1 WO 2024119488A1
Authority
WO
WIPO (PCT)
Prior art keywords
filter
current block
block
preset
type
Prior art date
Application number
PCT/CN2022/137973
Other languages
English (en)
French (fr)
Inventor
黄航
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2022/137973 priority Critical patent/WO2024119488A1/zh
Publication of WO2024119488A1 publication Critical patent/WO2024119488A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing

Definitions

  • the embodiments of the present application relate to video coding and decoding technology, and relate to but are not limited to a video coding and decoding method, a decoder, an encoder and a computer-readable storage medium.
  • Inter-frame prediction technology is the main means of removing redundant temporal information in the video in the hybrid coding framework.
  • Inter-frame prediction technology uses the reconstructed frame of the coded frame as the reference image, and predicts and encodes the pixels of the current frame to be coded through motion estimation and motion compensation technology.
  • motion estimation refers to finding the best matching reference block for the current block to be coded in the reference image according to a specific matching criterion.
  • the displacement from the reference block to the current block is the motion vector.
  • Motion compensation usually refers to the process of using an interpolation filter to predict the pixel value of the current block to be coded based on the pixel value of the reference block. Therefore, the use of efficient inter-frame coding can greatly improve the efficiency of video compression.
  • the precision of the interpolation filter in the motion compensation process is low, thereby reducing the accuracy of pixel value prediction using the interpolation filter and reducing the coding and decoding performance.
  • the embodiments of the present application provide a video encoding and decoding method, a decoder, an encoder and a computer-readable storage medium, which can improve the encoding and decoding accuracy and thus improve the encoding and decoding performance.
  • an embodiment of the present application provides a video decoding method, the method comprising:
  • the first filter at least includes: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps;
  • a first filter is used to perform pixel value prediction and motion compensation based on the reference block to determine a predicted image block corresponding to the current block.
  • an embodiment of the present application further provides a video encoding method, the method comprising:
  • the first filter at least includes: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps;
  • a first filter is used to perform pixel value prediction and motion compensation based on the reference block to determine a predicted image block corresponding to the current block.
  • an embodiment of the present application provides a decoder, including:
  • a parsing part configured to parse the bitstream, determine a motion vector corresponding to a current block, and a first filter type corresponding to the current block;
  • a first motion estimation part configured to determine a reference block corresponding to the current block based on the motion vector
  • a first determination section is configured to determine a first filter corresponding to the first filter type; the first filter at least comprises: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps;
  • the first motion compensation part is configured to use a first filter to perform pixel value prediction and motion compensation based on the reference block to determine a predicted image block corresponding to the current block.
  • an encoder including:
  • a second motion estimation part is configured to perform motion estimation on the current block based on a reference frame corresponding to the current frame, and determine a reference block corresponding to the current block;
  • the second determining part is configured to determine a first filter type corresponding to the current block, and determine a first filter corresponding to the first filter type; the first filter at least includes: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps;
  • the second motion compensation part is configured to use the first filter to perform pixel value prediction and motion compensation based on the reference block to determine the predicted image block corresponding to the current block.
  • an embodiment of the present application further provides a decoder, including:
  • a first memory used to store executable instructions
  • the first processor is used to implement the video decoding method in the embodiment of the present application when executing the executable instructions stored in the first memory.
  • an encoder including:
  • a second memory used for storing executable instructions
  • the second processor is used to implement the video encoding method provided in the embodiment of the present application when executing the executable instructions stored in the second memory.
  • An embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded is determined based on a predicted image block corresponding to a current block; the predicted image block corresponding to the current block is obtained by performing pixel value prediction and motion compensation based on a reference block corresponding to the current block through a first filter corresponding to the current block; the first filter at least includes: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps.
  • An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon.
  • the computer program is executed by a first processor, the video decoding method provided by the embodiment of the present application is implemented; or, when the computer program is executed by a second processor, the video encoding method provided by the embodiment of the present application is implemented.
  • the embodiments of the present application provide a video encoding and decoding method, a decoder, an encoder and a computer-readable storage medium.
  • the decoder can use a sharpening filter with at least 12 taps, or a conventional filter with at least 8 taps, to perform pixel value prediction and motion compensation on a reference block corresponding to a current block.
  • the filtering accuracy and the prediction accuracy of pixel value prediction using the filter are improved, thereby improving the accuracy of motion compensation and decoding based on predicted pixels, thereby improving the decoding performance.
  • FIG1 is a schematic block diagram of a composition of an encoder provided in an embodiment of the present application.
  • FIG2 is a schematic block diagram of a decoder provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of a network architecture of a coding and decoding system provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of an optional flow chart of a decoding method provided in an embodiment of the present application.
  • FIG5 is a frequency response comparison diagram of a 12-tap sharpening filter provided in an embodiment of the present application and a current 8-tap sharpening filter;
  • FIG6 is a schematic diagram of an optional flow chart of a decoding method provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of an optional flow chart of a decoding method provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of an optional flow chart of a decoding method provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of an optional flow chart of a decoding method provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of an optional flow chart of a decoding method provided in an embodiment of the present application.
  • FIG11 is a schematic diagram of an optional flow chart of a decoding method provided in an embodiment of the present application.
  • FIG12 is a schematic diagram of an optional flow chart of a decoding method provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of an optional flow chart of a decoding method provided in an embodiment of the present application.
  • FIG14 is a schematic diagram of an optional flow chart of an encoding method provided in an embodiment of the present application.
  • FIG15 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application.
  • FIG16 is a second structural diagram of a decoder provided in an embodiment of the present application.
  • FIG17 is a structural schematic diagram 1 of an encoder provided in an embodiment of the present application.
  • FIG. 18 is a second structural diagram of an encoder provided in an embodiment of the present application.
  • AOM video compression reference software (AOMedia Video Model, AVM)
  • digital video compression technology is mainly used to compress huge digital video data for transmission and storage.
  • the existing digital video compression standards can save a lot of video data, there is still a need to pursue better digital video compression technology to reduce the bandwidth and traffic pressure of digital video transmission.
  • the AVM reference software is also a traditional block-based codec.
  • the AVM reference software is a traditional block-based codec, which includes multiple modules ⁇ block partitioning, intra-frame prediction, inter-frame prediction, transformation, quantization, entropy coding, loop and post-processing filtering, and unique coding of screen content ⁇ . This application is mainly used in the AVM codec scenario, and improves the codec performance by improving the inter-frame prediction part.
  • Inter-frame prediction technology is the main means of removing redundant temporal information in the video in the hybrid coding framework.
  • Inter-frame prediction technology uses the reconstructed frame of the coded frame as the reference image, and predicts and encodes the pixels of the current frame to be coded through motion estimation and motion compensation technology.
  • motion estimation refers to finding the best matching reference block for the current block to be coded in the reference image according to a specific matching criterion.
  • the displacement from the reference block to the current block is the motion vector.
  • Motion compensation usually refers to the process of using an interpolation filter to predict the pixel value of the current block to be coded based on the pixel value of the reference block. Therefore, the use of efficient inter-frame coding can greatly improve the efficiency of video compression.
  • inter-frame prediction In order to improve the accuracy of inter-frame prediction, flexible and diverse motion compensation technologies are usually used, including high-precision motion compensation.
  • high-precision motion compensation In actual scenes, since the distance an object moves is not necessarily an integer multiple of pixels, in order to more accurately represent the displacement of moving objects between images, it is necessary to increase the accuracy of motion estimation to the sub-pixel level.
  • the motion compensation at this time is called sub-pixel precision motion compensation.
  • an interpolation filter can be used at a non-integer pixel position to obtain the predicted pixel.
  • the sub-pixel accuracy of the motion vector can be accurate to 1/16 pixel.
  • the decoder parses the filter type used by the current block through the code stream.
  • the filter type is any one of the conventional filter type (REGULAR), smoothing filter type (SMOOTH), or sharpening filter type (SHARP).
  • REGULAR conventional filter type
  • SMOOTH smoothing filter type
  • SHARP sharpening filter type
  • the number of taps of the default REGULAR and SMOOTH filters is 6, and the number of taps of the SHARP filter is 8.
  • each type of filter has a corresponding set of short tap number filters, usually the number of taps of the short tap REGULAR filter is 4, the number of taps of the short tap SMOOTH filter is 4, and the short tap SHARP filter uses the short tap REGULAR filter.
  • the decoder can determine whether the filter used in this direction is the default tap number or the short tap number according to the width of the current block in the horizontal direction or the height in the vertical direction. Exemplarily, if the width of the current block is less than or equal to 4, the filter of the corresponding type of 4 taps is selected in the horizontal direction, otherwise the filter of the default tap number is used. If the height of the current block is less than or equal to 4, a 4-tap filter of the corresponding type is selected in the vertical direction, otherwise a filter with a default number of taps is used.
  • the embodiments of the present application provide a video encoding and decoding method, a decoder, an encoder and a computer-readable storage medium, which can improve the accuracy of video encoding and decoding, and thus improve the video encoding and decoding performance.
  • the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
  • the encoder 50 may include a transform and quantization unit 501, an intra-frame estimation unit 502, an intra-frame prediction unit 503, an inter-frame prediction unit 504, a motion estimation unit 505, an inverse transform and inverse quantization unit 506, a filter control analysis unit 507, a filtering unit 508, an encoding unit 509 and a decoded image cache unit 510, etc.
  • the filtering unit 508 may implement deblocking filtering and sample adaptive offset (Sample Adaptive Offset, SAO) filtering
  • the encoding unit 509 may implement header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmetic Coding, CABAC).
  • a video coding block can be obtained by dividing the coding tree unit (CTU), and then the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transformation and quantization unit 501 to transform the video coding block, including transforming the residual information from the pixel domain to the transform domain, and quantizing the obtained transform coefficients to further reduce the bit rate;
  • the intra-frame estimation unit 502 and the intra-frame prediction unit 503 are used to perform intra-frame prediction on the video coding block; specifically, the intra-frame The estimation unit 502 and the intra-frame prediction unit 503 are used to determine the intra-frame prediction mode to be used to encode the video coding block;
  • the inter-frame prediction unit 504 and the motion estimation unit 505 are used to perform inter-frame prediction encoding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information;
  • the motion estimation performed by the motion estimation unit 505 is a process of generating a motion vector, which can estimate the motion of the video coding block,
  • the encoding unit 509 is used to encode various coding parameters and quantized transform coefficients.
  • the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode and output the code stream of the video signal; and the decoded image cache unit 510 is used to store the reconstructed video coding block for prediction reference. As the video image encoding proceeds, new reconstructed video coding blocks will be continuously generated, and these reconstructed video coding blocks will be stored in the decoded image cache unit 510.
  • the decoder 60 includes a decoding unit 601, an inverse transform and inverse quantization unit 602, an intra-frame prediction unit 603, an inter-frame prediction unit 604, a filtering unit 605, and a decoded image cache unit 606, etc., wherein the decoding unit 601 can implement header information decoding and CABAC decoding, and the filtering unit 605 can implement deblocking filtering and SAO filtering.
  • a bit stream of the video signal is output; the bit stream is input into the decoder 60, and first passes through the decoding unit 601 to obtain the decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 602 to generate residual blocks in the pixel domain; the intra-frame prediction unit 603 can be used to generate prediction data of the current video decoding block based on the determined intra-frame prediction mode and the data of the previously decoded block from the current frame or picture; the inter-frame prediction unit 604 is to determine the prediction information for the video decoding block by parsing the motion vector and other associated syntax elements, and use The prediction information is used to generate a prediction block of the video decoding block being decoded; a decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 602 and the corresponding prediction block generated by the intra-frame prediction unit 603 or the inter-frame prediction unit 604; the decoded video signal passes
  • the embodiment of the present application also provides a network architecture of a codec system including an encoder and a decoder
  • FIG3 is a schematic diagram of a network architecture of a codec system provided by the embodiment of the present application.
  • the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01.
  • the electronic device can be various types of devices with video codec functions during implementation.
  • the electronic device can include a smart phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., and the embodiment of the present application is not specifically limited.
  • the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device.
  • the method of the embodiment of the present application is mainly applied to the inter-frame prediction unit 504 shown in Figure 1 and the inter-frame prediction unit 604 shown in Figure 2.
  • the embodiment of the present application can be applied to both the encoder and the decoder, and can even be applied to both the encoder and the decoder at the same time, but the embodiment of the present application does not specifically limit this.
  • the "current block” specifically refers to the encoding block currently to be inter-frame predicted; when applied to the inter-frame prediction unit 604 part, the "current block” specifically refers to the decoding block currently to be inter-frame predicted.
  • FIG4 a schematic flow chart of a decoding method provided by an embodiment of the present application is shown.
  • the method may include:
  • the decoder receives the code stream sent by the encoder, and obtains the current frame in the code stream by parsing the code stream, and the current frame contains multiple coding blocks (coding units).
  • the decoder parses the current block in the current frame to obtain the motion vector (Motion Vector, MV) corresponding to the current block and the first filter type corresponding to the current block.
  • the first filter type is the filter type specified by the encoder for the current block and used in the interpolation filtering process of motion compensation.
  • the current block can be the current coding unit (Coding Unit, CU), the current transform unit (Transform Unit, TU), the current prediction unit (Prediction Unit, PU), the current coding block (Coding Block, CB), etc., which is not specifically limited in the embodiments of the present application.
  • S102 Determine a reference block corresponding to the current block based on the motion vector.
  • the decoder can also obtain the reference frame index corresponding to the current block by parsing the current block, and then determine the reference frame corresponding to the current block.
  • the reference frame can be a forward or backward decoded frame corresponding to the current frame.
  • the reference frame index can be inter_pred_idc
  • the reference frame can include: LAST (most recent past) frame, GOLDEN (distant past) frame and ALTREF (temporarily filtered future) frame, etc.
  • the decoder can determine the matching image block from the reference frame according to the motion vector corresponding to the current block as the reference block corresponding to the current block.
  • the reference block here can also be called a "compensation block".
  • the decoder can determine the reference block corresponding to the current block from the List0 reference frame or the List1 reference frame according to the motion vector; for the bidirectional prediction process, the decoder can determine the List0 reference block from the List0 reference frame, and determine the List1 reference block from the List1 reference frame.
  • the first filter at least includes: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps.
  • the first filter type corresponds to at least one filter with a number of taps.
  • the decoder can determine a filter with a number of taps used for interpolation filtering of the current block from the at least one filter with a number of taps corresponding to the first filter type as the first filter.
  • the decoder is preset to support at least one filter type, and the at least one filter type includes a first filter type.
  • each filter type in the at least one filter type corresponds to a filter with at least one number of taps.
  • the at least one filter type may include: at least one of a sharpening (SHARP) filter type, a conventional (REGULAR) filter type, and a smoothing (SMOOTH) filter type.
  • the sharpening filter type includes at least: a sharpening filter with at least 12 taps, and may also include other numbers of taps, such as a sharpening filter with 4 taps.
  • the conventional filter type includes at least: a conventional filter with at least 8 taps, and may also include other numbers of taps, such as a sharpening filter with 4 taps.
  • the specific selection is made according to the actual situation, and the embodiment of the present application is not limited.
  • the decoder can determine the frame-level filter switching flag by parsing the current frame, such as parsing the frame header of the current frame; here, the frame-level filter switching flag indicates whether the filter for filtering each block in the current frame is switchable.
  • the frame-level filter switching flag can be is_filter_switchable, which is set by the encoder at the frame level of the encoded frame.
  • the block-level filter type index corresponding to the current block is determined; the first preset mark value indicates that the current frame corresponds to at least two filter types; according to the block-level filter type index, the first filter type is determined in combination with the preset correspondence between the filter type index and the filter type.
  • the decoder continues to parse the frame-level filter type index corresponding to the current frame from the current frame; the frame-level filter type index is used as the block-level filter type index corresponding to each block in the current frame.
  • the second preset mark value indicates that the current frame corresponds to a filter type.
  • the first preset mark value may be 1, and the second preset mark value may be 0. If the frame-level filter switching flag bit parsed by the decoder is 1, it indicates that different filters are used in the current frame image.
  • the interpolation filter serial number used by the current block is decoded.
  • the interpolation filter serial number is equivalent to the above-mentioned block-level filter type index.
  • three values 0, 1 and 2 may be included, and the three values correspond to the three filter types REGULAR, SMOOTH and SHARP, respectively.
  • the parsed frame-level filter switching flag bit is 0, it indicates that the entire frame image uses the same filter, and the decoder further parses the filter serial number used by the current frame, that is, the above-mentioned frame-level filter type index.
  • the correspondence between the frame-level filter type index and the filter type may be the same as the correspondence between the block-level filter index and the filter type.
  • the decoder can determine the filter with the corresponding number of taps in the first filter type corresponding to the current block in at least one preset filtering direction, that is, the first filter, according to the size of the current block.
  • the size of the current block may include: the length of the current block in at least one preset filtering direction, such as the width in the horizontal direction and the height in the vertical direction; or, including the area information of the current block, the diagonal length, etc., which is specifically selected according to the actual situation, and the embodiment of the present application is not limited.
  • the decoder determines the first filter corresponding to the next block in the current frame in the same way when performing filtering processing for inter-frame prediction on the next block in the current frame. That is to say, the decoder can adaptively select the filter with the corresponding number of taps for each block in the current frame under the first filter type according to the size of each block in the current frame, as the first filter corresponding to each block.
  • the first filter in the embodiment of the present application includes at least: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps. It can be seen that the embodiment of the present application has improved the number of taps (order) of the sharpening filter and the conventional filter. Here, more taps or a higher order means that when performing interpolation filtering of pixel values, there are more pixels for reference, which can bring more stopband attenuation, less ripples, narrower filtering, etc., thereby improving prediction accuracy.
  • the first filter may include: a sharpening filter with 12 taps, or a sharpening filter with 14 taps, or a sharpening filter with 16 taps, or, including a conventional filter with 8 taps, etc.
  • the embodiment of the present application also optimizes the coefficients of the filter after the number of taps is increased.
  • a sharpening filter with at least 12 taps it can include: a first filter coefficient corresponding to each pixel position of at least one pixel position for each tap of at least 12 taps.
  • the pixel position includes the pixel position of an integer pixel and the pixel position of a non-integer pixel (i.e., a sub-pixel).
  • the first filter coefficient at each pixel position can be obtained by processing a random signal through a first preset sampling function, such as a sinc function, and normalizing the first processing result obtained by the processing to a preset coefficient interval corresponding to a preset bit depth.
  • the preset bit depth can be 7bit
  • the random signal can be an independent variable waveform signal with a value range of [- ⁇ , + ⁇ ].
  • a waveform signal between [-1, +1] can be obtained, that is, the first processing result.
  • the waveform signal between [-1, +1] is projected to the coefficient interval of [-128, 128] corresponding to 7bit, that is, the first processing result is normalized to obtain the first filter coefficient.
  • the filter coefficients of the 12-tap sharpening filter may be as shown in Table 1, as follows:
  • the first column in Table 1 represents the pixel position of each sub-pixel.
  • each sub-pixel position corresponds to 12 first filter coefficients corresponding to the 12 taps.
  • the first filter coefficient corresponding to each tap number at each pixel position can be calculated according to a similar method as described above. The specific selection is based on the actual situation and is not limited in the embodiments of the present application.
  • a conventional filter with at least 8 taps includes: a second filter coefficient corresponding to each pixel position of at least one pixel position for each tap of the at least 8 taps; the second filter coefficient is obtained by processing the random signal through a second preset sampling function, and normalizing the second processing result obtained by the processing to a preset coefficient interval.
  • the second preset sampling function may be the same as or different from the first preset sampling function.
  • the calculation method of the second filter coefficient is similar to the calculation method of the first filter coefficient described above, and will not be repeated here.
  • the filter coefficients of a conventional filter with 8 taps may be as shown in Table 2, as follows:
  • S104 Using the first filter, perform pixel value prediction and motion compensation based on the reference block to determine a predicted image block corresponding to the current block.
  • the decoder uses the first filter to predict pixel values based on the reference block, performs motion compensation on the reference block according to the predicted pixels, and determines a predicted image block corresponding to the current block.
  • the decoder uses the corresponding number of taps of the first filter to determine the corresponding number of pixels from the reference block, and predicts the pixel values.
  • the decoder compensates the reference block based on the predicted pixels by weighted averaging and other methods to obtain the predicted image block corresponding to the current block.
  • the decoder compensates the List0 reference block in the List0 reference frame or the List1 reference block in the List1 reference frame according to the pixel values predicted by the first filter, such as the predicted chrominance value and/or luminance value, to obtain the predicted image block corresponding to the current block.
  • the decoder compensates the List0 reference block in the List0 reference frame and the List1 reference block in the List1 reference frame according to the pixel values predicted by the first filter, and then performs weighted prediction on the List0 reference block and the List1 reference block to obtain the predicted image block of the current block.
  • the decoder can continue filtering the next block in the current frame, determine the predicted image block corresponding to the next block, continue processing until the current frame is processed, and determine the decoded image corresponding to the current frame based on the predicted image block corresponding to each block in the current frame.
  • the frequency response comparison diagram of the 12-tap sharpening filter and the current 8-tap sharpening filter is shown in Figure 5.
  • the dotted line represents the frequency response curve of the 8-tap SHARP filter at 1/2 pixel accuracy
  • the solid line represents the frequency response curve of the 12-tap SHARP filter at 1/2 pixel accuracy.
  • the decoder uses a sharpening filter with at least 12 taps, or a conventional filter with at least 8 taps, to perform pixel value prediction and motion compensation on the reference block corresponding to the current block.
  • a sharpening filter with at least 12 taps, or a conventional filter with at least 8 taps.
  • the filtering accuracy and the prediction accuracy of pixel value prediction using the filter are improved, thereby improving the accuracy of motion compensation and decoding accuracy, and thus improving the decoding performance.
  • the first filter type includes any one of the following: a sharpening filter type, a conventional filter type, a smoothing filter type; and at least one preset filtering direction includes: a horizontal direction and a vertical direction.
  • each filter type corresponds to a filter with at least one number of taps.
  • at least one number of taps includes: a first number of taps and a second number of taps, wherein the second number of taps is less than the first number of taps.
  • the first number of taps filter is equivalent to a long tap filter
  • the second number of taps filter is equivalent to a short tap filter.
  • the first tap number filter may include any one of the following: a sharpening filter with at least 12 taps, a conventional filter with at least 8 taps, and a smoothing filter with 6 taps.
  • the REGULAR filter type corresponds to an 8-tap REGULAR filter and a 4-tap REGULAR filter; wherein the 8-tap REGULAR filter is the first tap number filter under the REGULAR filter type, and the 4-tap REGULAR filter is the second tap number filter under the REGULAR filter type.
  • the SMOOTH filter type corresponds to a 6-tap SMOOTH filter and a 4-tap SMOOTH filter; wherein the 6-tap SMOOTH filter is the first tap number filter under the SMOOTH filter type, and the 4-tap SMOOTH filter is the second tap number filter under the SMOOTH filter type.
  • the first tap number filter under the SHARP filter type may be a 12-tap SHARP filter, and the second tap number filter under the SHARP filter type may use a 4-tap REGULAR filter.
  • S103 in FIG. 4 may be implemented by S201 or S202 as follows:
  • the filter determines the first filter used in the horizontal direction and the vertical direction according to the size of the current block in the horizontal direction and the vertical direction.
  • the first tap number filter under the first filter type is determined as the first filter used in the horizontal direction and the first filter used in the vertical direction.
  • the preset size threshold can be 4, representing 4 pixels.
  • the first tap number filter is equivalent to a long tap filter
  • the long tap filter may be the default filter under the corresponding filter type.
  • the first filter type is a SHARP type
  • the default long tap filter in the SHARP type such as a sharpening filter with at least 12 taps, is determined as the first filter for filtering the current block in the horizontal and vertical directions.
  • the default long tap filter in the REGULAR type when the size of the current block in the horizontal and vertical directions is greater than a preset size threshold, the default long tap filter in the REGULAR type, such as a conventional filter with at least 8 taps, is determined as the first filter for filtering the current block in the horizontal and vertical directions.
  • the default long tap filter in the SMOOTH type when the size of the current block in the horizontal and vertical directions is greater than a preset size threshold, the default long tap filter in the SMOOTH type, such as a smoothing filter with 6 taps, is determined as the first filter for filtering the current block in the horizontal and vertical directions.
  • the decoder determines the second tap number filter in the first filter type as the first filter in the horizontal direction and the first filter in the vertical direction.
  • the first filter type when the size of the current block in the horizontal direction or the vertical direction is less than or equal to a preset size threshold, a short tap filter in the SHARP type, such as a 4-tap sharpening filter, is determined as the first filter for filtering the current block in the horizontal direction and the vertical direction.
  • a short tap filter in the REGULAR type when the size of the current block in the horizontal direction or the vertical direction is less than or equal to a preset size threshold, a short tap filter in the REGULAR type, such as a 4-tap conventional filter, is determined as the first filter for filtering the current block in the horizontal direction and the vertical direction.
  • the first filter type is a SMOOTH type
  • a short tap filter in the SMOOTH type such as a 4-tap smoothing filter, is determined as the first filter for filtering the current block in the horizontal direction and the vertical direction.
  • S103 in FIG. 4 may also be implemented by S301 or S302 as follows:
  • the decoder determines the first tap number filter in the first filter type as the first filter in the horizontal direction and the first filter in the vertical direction.
  • the default long tap filter in the SHARP type when the size of the current block in the horizontal direction or the vertical direction is greater than a preset size threshold, the default long tap filter in the SHARP type, such as a sharpening filter with at least 12 taps, is determined as the first filter for filtering the current block in the horizontal direction and the vertical direction.
  • the default long tap filter in the REGULAR type when the size of the current block in the horizontal direction or the vertical direction is greater than a preset size threshold, the default long tap filter in the REGULAR type, such as a conventional filter with at least 8 taps, is determined as the first filter for filtering the current block in the horizontal direction and the vertical direction.
  • the default long tap filter in the SMOOTH type such as a smoothing filter with 6 taps, is determined as the first filter for filtering the current block in the horizontal direction and the vertical direction.
  • the decoder determines the second tap number filter in the first filter type as the first filter in the horizontal direction and the first filter in the vertical direction.
  • the first filter type when the size of the current block in the horizontal direction and the vertical direction is less than or equal to a preset size threshold, a short tap filter in the SHARP type, such as a 4-tap sharpening filter, is determined as the first filter for filtering the current block in the horizontal direction and the vertical direction.
  • a short tap filter in the REGULAR type when the size of the current block in the horizontal direction and the vertical direction is less than or equal to the preset size threshold, a short tap filter in the REGULAR type, such as a 4-tap conventional filter, is determined as the first filter for filtering the current block in the horizontal direction and the vertical direction.
  • the first filter type is a SMOOTH type
  • a short tap filter in the SMOOTH type such as a 4-tap smoothing filter, is determined as the first filter for filtering the current block in the horizontal direction and the vertical direction.
  • S201 or S202 and S301 or S302 are two parallel branch processes for implementing S103. In actual application, any one of them can be selected for execution according to the situation, and the embodiments of the present application are not limited thereto.
  • the decoder may also determine the first filter corresponding to the current block by parsing a preset flag in the bitstream.
  • the preset flag may be located at a sequence level, a frame level, or a block level.
  • the encoder may set a sequence-level filter flag in the video sequence to indicate whether a filter with a certain number of taps is enabled.
  • a sequence-level filter flag may be added to the sequence structure of the video sequence, such as adding a use_longtap flag, or an existing sequence-level flag may be used as a sequence-level filter flag.
  • the scope of action of the sequence-level filter flag may be a specific filter type, such as acting on a conventional filter or acting on all filter types.
  • the decoder may determine the sequence-level filter flag by parsing the current video sequence in the bitstream, such as parsing the sequence header of the current video sequence.
  • the current video sequence is a video sequence containing the current frame, and the current frame contains the current block.
  • the sequence level filter flag is used to indicate whether the decoder enables the first tap number filter in the conventional filter type in the current video sequence.
  • S103 in FIG4 can also be implemented by S401 or S402 as follows:
  • sequence-level filter flag is a first preset value and the first filter type is a conventional filter type
  • the first preset value indicates that a filter with a first number of taps in a conventional filter type, such as an 8-tap conventional filter, can be used when performing motion compensation interpolation filtering on blocks within the current video sequence.
  • the first preset value may be 1.
  • the sequence-level filter flag when the sequence-level filter flag is a first preset value, it indicates that the first tap number filter of the conventional filter type can be used to filter the current block.
  • the first filter type parsed by the decoder from the current block is a conventional filter type
  • the first filter corresponding to the conventional filter type in at least one preset filtering direction can be determined according to the size of the current block.
  • the process of determining the first filter corresponding to the conventional filter type in at least one preset filtering direction according to the size of the current block in S401 is consistent with the process description in the above S201 or S202, or S301 or S302, and will not be repeated here.
  • the process of S401 combined with S201 may include: when the sequence-level filter flag is a first preset value and the first filter type is a conventional filter type, if the size of the current block in the horizontal and vertical directions is greater than the preset size threshold, a conventional filter with a first number of taps is used as the first filter.
  • the process of combining S401 with S202, or S301, or S302 is the same, and will not be repeated here.
  • the second preset value indicates that the filter with the first number of taps in the conventional filter type cannot be used when performing interpolation filtering for motion compensation on blocks within the current video sequence.
  • the decoder directly determines the filter with the second number of taps in the conventional filter type as the first filter corresponding to at least one preset filtering direction.
  • the above S401 and S402 describe the process of combining the filter with the number of taps adaptively selected according to the current block size according to the sequence-level filter flag.
  • the first filter with the corresponding number of taps can also be determined based on the sequence-level filter flag alone.
  • the sequence-level filter flag is a first preset value
  • the filter with the first number of taps under the first filter type can be directly used as the first filter corresponding to each block in at least one preset filtering direction.
  • the sequence-level filter flag is a second preset value
  • the filter with the first number of taps under the first filter type can be directly used as the first filter corresponding to each block in the current video sequence in at least one preset filtering direction.
  • the encoder may set a frame-level filter flag in the current frame to indicate whether a filter with a certain number of taps is enabled.
  • a first frame-level flag may be added to the frame structure, or an existing frame-level flag may be used as the first frame-level flag.
  • the frame-level screen content encoding tool flag allow_screen_content_tools is used as the first frame-level flag.
  • allow_screen_content_tools is 1, it indicates that palette encoding can be used for blocks within the frame; when allow_screen_content_tools is 0, it indicates that palette encoding is disabled.
  • allow_screen_content_tools is used as the first frame-level flag.
  • allow_screen_content_tools When allow_screen_content_tools is 0, it indicates that a filter with a first number of taps is enabled within the current frame range. When allow_screen_content_tools is 1, it indicates that a filter with a first number of taps is not used within the current frame range.
  • the scope of the first frame-level flag bit can be a certain specific filter type, such as acting on a conventional filter, and also acting on all filter types. Accordingly, the decoder can determine the first frame-level flag bit by parsing the current frame in the bitstream, such as parsing the frame header of the current frame.
  • S103 in FIG. 4 can also be implemented by S501 or S502, as follows:
  • the first frame level flag is a third preset value and the first filter type is a conventional filter type, determine a first filter corresponding to the conventional filter type in at least one preset filtering direction according to the size of the current block.
  • the third preset value indicates that a filter with a first number of taps in a conventional filter type can be used when performing interpolation filtering for motion compensation on blocks within the current frame range, such as a conventional filter with 8 taps.
  • the third preset value may be the same as or different from the first preset value described above.
  • the first frame-level flag may be a screen content encoding tool flag, and the third preset value may be 0.
  • the first frame level flag when the first frame level flag is a third preset value, it indicates that the first tap number filter of the conventional filter type can be used to filter the current block.
  • the first filter type parsed by the decoder from the current block is a conventional filter type
  • the first filter corresponding to the conventional filter type in at least one preset filtering direction can be determined according to the size of the current block.
  • the process of determining the first filter corresponding to the conventional filter type in at least one preset filtering direction according to the size of the current block in S501 is consistent with the process description in the above S201 or S202, or S301 or S302, and will not be repeated here.
  • the process of S501 combined with S201 may include: when the first frame level flag is a third preset value and the first filter type is a conventional filter type, if the size of the current block in the horizontal and vertical directions is greater than the preset size threshold, a conventional filter with a first number of taps is used as the first filter.
  • the process of combining S401 with S202, or S301, or S302 is the same, and will not be repeated here.
  • the fourth preset value indicates that the filter with the first number of taps in the conventional filter type cannot be used when performing interpolation filtering for motion compensation of blocks within the current frame range.
  • the decoder directly determines the filter with the second number of taps in the conventional filter type as the first filter corresponding to at least one preset filtering direction.
  • the fourth preset value may be the same as or different from the above-mentioned second preset value.
  • the first frame level flag may be a screen content encoding tool flag
  • the fourth preset value may be 1.
  • the above S501 and S502 describe a process of combining a filter that selects a number of taps according to the first frame-level flag with a filter that adaptively selects a number of taps according to the current block size.
  • the first filter with a corresponding number of taps may also be determined based solely on the first frame-level flag.
  • the filter with the first number of taps under the first filter type may be directly used as the first filter corresponding to each block in at least one preset filtering direction.
  • the filter with the second number of taps under the first filter type may be directly used as the first filter corresponding to each block in the current frame in at least one preset filtering direction.
  • S401 or S402 and S501 or S502 are two parallel branch processes for implementing S103. In actual application, any one of them can be selected for execution according to the situation, and the embodiments of the present application are not limited thereto.
  • the process of the decoder determining the first filter type and the first filter can be shown in FIG. 10 as follows:
  • the frame-level filter switching flag may be is_filter_switchable. If the frame-level filter switching flag is 1, it indicates that the block-level filter can be switched when filtering each block in the current frame, and then 602 is executed; if the frame-level filter switching flag is 0, it indicates that the block-level filter cannot be switched, and then S603 is executed.
  • S602 if the block-level filter type index is 0, it indicates that the block level uses a REGULAR type filter, and S605 is executed. If the block-level filter type index is 1, it indicates that the block level uses a SMOOTH type filter, and S606 is executed. If the block-level filter type index is 2, it indicates that the block level uses a SHARP type filter, and S607 is executed.
  • S603 Continue parsing the frame-level filter type flag in the current frame to determine the filter type commonly used by each block in the current frame.
  • S604 Assign the value of the frame-level filter type flag to the block-level filter type index.
  • the block-level filter type index is 0, it indicates that the block level uses a REGULAR type filter, and the process proceeds to S605. If the block-level filter type index is 1, it indicates that the block level uses a SMOOTH type filter, and the process proceeds to S606. If the block-level filter type index is 2, it indicates that the block level uses a SHARP type filter, and the process proceeds to S607.
  • a 4-tap REGULAR filter is used in the horizontal direction; when the width of the current block is greater than 4, a 6-tap REGULAR filter is used in the horizontal direction.
  • a 4-tap REGULAR filter is used in the vertical direction; when the height of the current block is greater than 4, a 6-tap REGULAR filter is used in the vertical direction.
  • S606 When the width of the current block is less than or equal to 4, a 4-tap SMOOTH filter is used in the horizontal direction; when the width of the current block is greater than 4, a 6-tap SMOOTH filter is used in the horizontal direction.
  • a 4-tap SMOOTH filter When the height of the current block is less than or equal to 4, a 4-tap SMOOTH filter is used in the vertical direction; when the height of the current block is greater than 4, a 6-tap SMOOTH filter is used in the vertical direction.
  • the process of the decoder determining the first filter type and the first filter can be shown in FIG. 11 as follows:
  • S701 if the frame-level filter switching flag is 1, it indicates that the block-level filter can be switched, and S702 is executed. If the parsed frame-level filter switching flag is 0, it indicates that the block-level filter cannot be switched, and S703 is executed.
  • S702 parse the block-level filter type index corresponding to the current block.
  • S702 if the block-level filter type index is 0, it indicates that the block level uses a REGULAR type filter, and S705 is executed. If the block-level filter type index is 1, it indicates that the block level uses a SMOOTH type filter, and S706 is executed. If the block-level filter type index is 2, it indicates that the block level uses a SHARP type filter, and S707 is executed.
  • S703 Continue parsing the frame-level filter type flag in the current frame to determine the filter type commonly used by each block in the current frame.
  • S704 Assign the value of the frame-level filter type flag to the block-level filter type index.
  • S704 if the block-level filter type index is 0, it indicates that the block level uses a REGULAR type filter, and S705 is executed. If the block-level filter type index is 1, it indicates that the block level uses a SMOOTH type filter, and S706 is executed. If the block-level filter type index is 2, it indicates that the block level uses a SHARP type filter, and S707 is executed.
  • a 4-tap REGULAR filter is used in the horizontal direction; when the width of the current block is greater than 4, a 12-tap SHARP filter is used in the horizontal direction.
  • a 4-tap REGULAR filter is used in the vertical direction; when the height of the current block is greater than 4, a 12-tap SHARP filter is used in the vertical direction.
  • the process of the decoder determining the first filter type and the first filter can be shown in FIG. 12, as follows:
  • sequence level filtering flag can be represented by use_longtap, and its value is 0 or 1.
  • the block-level filter type index is 0, it indicates that the block level uses a REGULAR type filter.
  • S806 is executed; when use_longtap is 1, S807 is executed.
  • the block-level filter type index is 1, it indicates that the block level uses a SMOOTH type filter, and S808 is executed.
  • the block-level filter type index is 2, it indicates that the block level uses a SHARP type filter, and S809 is executed.
  • S804 Continue parsing the frame-level filter type flag corresponding to the current frame to determine the filter type commonly used by each block in the current frame.
  • S805 Assign the value of the frame-level filter type flag to the block-level filter type index.
  • the block-level filter type index is 0, it indicates that the block level uses a REGULAR type filter, and when use_longtap is 0, S806 is executed; when use_longtap is 1, S807 is executed. If the block-level filter type index is 1, it indicates that the block level uses a SMOOTH type filter, and S808 is executed. If the block-level filter type index is 2, it indicates that the block level uses a SHARP type filter, and S809 is executed.
  • a 4-tap SMOOTH filter is used in the horizontal direction; when the width of the current block is greater than 4, a 6-tap SMOOTH filter is used in the horizontal direction.
  • a 4-tap SMOOTH filter is used in the vertical direction; when the height of the current block is greater than 4, a 6-tap SMOOTH filter is used in the vertical direction.
  • the first filter type determined by the decoder and the process of the first filter can be shown in FIG. 13, as follows:
  • S903 parse the block-level filter type index corresponding to the current block.
  • the block-level filter type index is 0, it indicates that the block level uses a REGULAR type filter.
  • S906 is executed; when the first frame-level flag, such as allow_screen_content_tools, is 0, S907 is executed.
  • block-level filter type index is 1, it indicates that the block level uses a SMOOTH type filter, and S908 is executed.
  • block-level filter type index is 2, it indicates that the block level uses a SHARP type filter, and S909 is executed.
  • S904 Continue parsing the frame-level filter type flag corresponding to the current frame to determine the filter type commonly used by each block in the current frame.
  • S905 Assign the value of the frame-level filter type flag to the block-level filter type index.
  • block-level filter type index if the block-level filter type index is 0, it indicates that the block level uses a REGULAR type filter, and when use_longtap is 0, execute S906; when use_longtap is 1, go to step 6. If the block-level filter type index is 1, it indicates that the block level uses a SMOOTH type filter, and execute S908. If the block-level filter type index is 2, it indicates that the block level uses a SHARP type filter, and execute S909.
  • a 4-tap SMOOTH filter is used in the horizontal direction; when the width of the current block is greater than 4, a 6-tap SMOOTH filter is used in the horizontal direction.
  • a 4-tap SMOOTH filter is used in the vertical direction; when the height of the current block is greater than 4, a 6-tap SMOOTH filter is used in the vertical direction.
  • interpolation filter selection with improved order and coefficient proposed in the embodiment of the present application combined with the sequence-level or frame-level flag to adaptively select the number of filter taps, can improve filtering accuracy and thus improve coding performance.
  • FIG14 a schematic diagram of a flow chart of an encoding method provided by an embodiment of the present application is shown.
  • the method may include:
  • the encoder when encoding the current frame, performs motion estimation on the current block based on the reference frame corresponding to the current frame, determines the motion vector corresponding to the current block, and determines the reference block corresponding to the current block in the reference frame according to the motion vector corresponding to the current block.
  • the encoder determines the reference block corresponding to the current block in the reference frame according to the motion vector corresponding to the current block, which is consistent with the description of the relevant process in the decoder S102 and is not repeated here.
  • the first filter includes at least: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps.
  • the encoder may determine the first filter type corresponding to the current block according to the coding cost.
  • the coding cost may be a rate-distortion cost.
  • the encoder may perform interpolation filtering on the current block according to at least one filter type, determine at least one rate-distortion cost of the current block under at least one filter type, and determine the first filter type corresponding to the current block according to the at least one rate-distortion cost.
  • the filter type with the smallest rate-distortion cost is used as the first filter type.
  • a sharpening filter with at least 12 taps includes: a first filter coefficient corresponding to each of the at least 12 taps at each pixel position of at least one pixel position; the first filter coefficient processes the random signal through a first preset sampling function, and normalizes the first processing result obtained by the processing to a preset coefficient interval corresponding to a preset bit depth.
  • a conventional filter with at least 8 taps includes: a second filter coefficient corresponding to each of the at least 8 taps at each pixel position of at least one pixel position; the second filter coefficient processes the random signal through a second preset sampling function, and normalizes the second processing result obtained by the processing to a preset coefficient interval.
  • the pixel position includes the pixel position of the integer pixel and the pixel position of the sub-pixel.
  • the filter coefficients of a 12-tap sharpening filter are shown in Table 1, and the filter coefficients of an 8-tap conventional filter are shown in Table 2.
  • determining the first filter corresponding to the first filter type in S1002 includes: determining, according to the size of the current block, the first filter corresponding to the first filter type in at least one preset filtering direction.
  • the first filter type includes any one of the following: a sharpening filter type, a regular filter type, and a smoothing filter type; at least one preset filtering direction includes: a horizontal direction and a vertical direction; the above-mentioned determining the first filter corresponding to the first filter type in at least one preset filtering direction according to the size of the current block includes: when the size of the current block in the horizontal direction and the vertical direction is greater than the preset size threshold, determining the first tap number filter in the first filter type as the first filter in the horizontal direction and the vertical direction; the first tap number filter includes any one of the following: a sharpening filter with at least 12 taps, a regular filter with at least 8 taps, and a smoothing filter with 6 taps.
  • the process of determining the first filter corresponding to the first filter type in at least one preset filtering direction based on the size of the current block includes: when the size of the current block in the horizontal direction is less than or equal to the preset size threshold, or when the size of the current block in the vertical direction is less than or equal to the preset size threshold, determining the second tap number filter in the first filter type as the first filter in the horizontal and vertical directions; the second tap number is less than the first tap number.
  • the above-mentioned determining, based on the size of the current block, the first filter corresponding to the first filter type in at least one preset filtering direction includes: when the size of the current block in the horizontal direction is greater than a preset size threshold, or the size in the vertical direction is greater than a preset size threshold, determining the first tap number filter in the first filter type as the first filter in the horizontal and vertical directions.
  • the above-mentioned determining, based on the size of the current block, the first filter corresponding to the first filter type in at least one preset filtering direction includes: when the size of the current block in the horizontal direction and the vertical direction is less than or equal to the preset size threshold, determining the second tap number filter in the first filter type as the first filter in the horizontal direction and the vertical direction.
  • the above method for the encoder to determine the first filter corresponding to the first filter type is consistent with the same method process description in the decoder, and will not be repeated here.
  • the encoder uses the first filter to perform pixel interpolation filtering on the reference block to obtain predicted pixels corresponding to the reference block, and performs motion compensation on the reference block according to the predicted pixels to obtain a predicted image block corresponding to the current block.
  • the process of motion compensation is consistent with the process description in S104 on the decoder side, and will not be repeated here.
  • the decoder uses a sharpening filter with at least 12 taps, or a conventional filter with at least 8 taps, to perform pixel value prediction and motion compensation on the reference block corresponding to the current block.
  • a sharpening filter with at least 12 taps, or a conventional filter with at least 8 taps.
  • the filtering accuracy and the prediction accuracy of pixel value prediction using the filter are improved, thereby improving the accuracy of motion compensation and encoding accuracy, and thus improving the encoding performance.
  • the encoder may continue filtering the next block in the current frame until the current frame is processed, and determine the encoding information corresponding to the current frame based on the predicted image block corresponding to each block in the current frame; continue encoding the next frame in the current video sequence and determine the encoding information corresponding to the next frame until the current video sequence is processed and the encoding information corresponding to each frame in the current video sequence is determined.
  • the encoder may determine the sequence-level filter flag corresponding to the current video sequence; the sequence-level filter flag is used to indicate whether the decoder enables the first tap number filter in the conventional filter type in the current video sequence; and the bitstream information corresponding to the current video sequence is determined according to the coding information corresponding to the sequence-level filter flag and each frame.
  • the encoder encodes the coding information corresponding to the sequence-level filter flag and each frame in the current video sequence into the bitstream and sends it to the decoder, so that the decoder parses the sequence-level filter flag corresponding to the current video sequence in the bitstream through the process of S401 or S402, and determines the first filter used by the decoder for the current block.
  • the encoder may continue filtering the next block in the current frame until the current frame is processed, and determine the encoding information corresponding to the current frame according to the predicted image block corresponding to each block in the current frame; the encoder determines the first frame-level flag corresponding to the current frame; the first frame-level flag is used to indicate whether the decoder enables the first tap number filter in the conventional filter type in the current frame; and the bitstream information corresponding to the current frame is determined according to the first frame-level flag and the encoding information corresponding to the current frame.
  • the encoder encodes the encoding information corresponding to the first frame-level flag and the current frame into the bitstream and sends it to the decoder, so that the decoder parses the first frame-level flag corresponding to the current frame in the bitstream through the process of S501 or S502, and determines the first filter used by the decoder for the current block.
  • a decoder 1 comprising:
  • the parsing part 10 is configured to parse the code stream to determine the motion vector corresponding to the current block and the first filter type corresponding to the current block;
  • a first motion estimation part 11 is configured to determine a reference block corresponding to the current block based on the motion vector
  • a first determination part 12 is configured to determine a first filter corresponding to the first filter type; the first filter at least includes: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps;
  • the first motion compensation part 13 is configured to use a first filter to perform pixel value prediction and motion compensation based on the reference block to determine a predicted image block corresponding to the current block.
  • the first determining part 12 is further configured to determine, according to the size of the current block, a first filter corresponding to the first filter type in at least one preset filtering direction.
  • the first filter type includes any one of the following: a sharpening filter type, a regular filter type, and a smoothing filter type;
  • the at least one preset filtering direction includes: a horizontal direction and a vertical direction;
  • the first determination part 12 is also configured to determine the first tap number filter in the first filter type as the first filter in the horizontal direction and the vertical direction when the size of the current block in the horizontal direction and the vertical direction is greater than a preset size threshold;
  • the first tap number filter includes any one of the following: the sharpening filter with at least 12 taps, the regular filter with at least 8 taps, and the smoothing filter with 6 taps.
  • the first determination part 12 is further configured to determine the second tap number filter in the first filter type as the first filter in the horizontal direction and the vertical direction when the size of the current block in the horizontal direction is less than or equal to the preset size threshold, or when the size of the current block in the vertical direction is less than or equal to the preset size threshold; the second tap number is less than the first tap number.
  • the first determination part 12 is further configured to determine the first tap number filter in the first filter type as the first filter in the horizontal direction and the vertical direction when the size of the current block in the horizontal direction is greater than a preset size threshold, or when the size of the current block in the vertical direction is greater than the preset size threshold.
  • the first determination part 12 is further configured to determine the second tap number filter in the first filter type as the first filter in the horizontal and vertical directions when the size of the current block in the horizontal and vertical directions is less than or equal to the preset size threshold.
  • the parsing part 10 before using the first filter to perform pixel value prediction and motion compensation based on the reference block to determine the predicted image block corresponding to the current block, is also configured to parse the current video sequence in the bitstream and determine the sequence-level filter flag; the first determination part 12 is also configured to, when the sequence-level filter flag is a first preset value and the first filter type is the conventional filter type, determine the first filter corresponding to the conventional filter type in at least one preset filtering direction according to the size of the current block; when the sequence-level filter flag is a second preset value and the first filter type is the conventional filter type, determine the second tap number filter in the conventional filter type as the first filter corresponding to the at least one preset filtering direction.
  • the parsing part 10 before using the first filter to perform pixel value prediction and motion compensation based on the reference block to determine the predicted image block corresponding to the current block, is also configured to determine the first frame-level flag by parsing the current frame in the code stream; the first determination part 12 is also configured to, when the first frame-level flag is a third preset value and the first filter type is the conventional filter type, determine the first filter corresponding to the conventional filter type in at least one preset filtering direction according to the size of the current block; when the first frame-level flag is a fourth preset value and the first filter type is the conventional filter type, determine the second tap number filter in the conventional filter type as the first filter corresponding to the at least one preset filtering direction.
  • the sharpening filter with at least 12 taps includes: a first filter coefficient corresponding to each tap of the at least 12 taps at each pixel position of at least one pixel position; the first filter coefficient processes a random signal through a first preset sampling function, and normalizes the first processing result obtained by the processing to a preset coefficient interval corresponding to a preset bit depth; the conventional filter with at least 8 taps includes: a second filter coefficient corresponding to each tap of the at least 8 taps at each pixel position of at least one pixel position; the second filter coefficient processes the random signal through a second preset sampling function, and normalizes the second processing result obtained by the processing to the preset coefficient interval.
  • the embodiment of the present application further provides a decoder, including:
  • the first memory 14 stores a computer program that can be run on the first processor 15.
  • the first processor 15 executes the program, the video decoding method provided in the embodiment of the present application is implemented.
  • the first processor 15 can be implemented by software, hardware, firmware or a combination thereof, and can use circuits, single or multiple application specific integrated circuits (ASICs), single or multiple general-purpose integrated circuits, single or multiple microprocessors, single or multiple programmable logic devices, or a combination of the aforementioned circuits or devices, or other suitable circuits or devices, so that the first processor 15 can execute the corresponding steps of the video decoding method provided in the embodiment of the present application.
  • ASICs application specific integrated circuits
  • microprocessors single or multiple programmable logic devices
  • a combination of the aforementioned circuits or devices or other suitable circuits or devices
  • the embodiment of the present application provides an encoder 2, as shown in FIG17 , including:
  • the second motion estimation part 20 is configured to perform motion estimation on the current block based on the reference frame corresponding to the current frame, and determine the reference block corresponding to the current block;
  • the second determining part 21 is configured to determine a first filter type corresponding to the current block, and determine a first filter corresponding to the first filter type; the first filter at least includes: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps;
  • the second motion compensation part 22 is configured to use the first filter to perform pixel value prediction and motion compensation based on the reference block to determine the predicted image block corresponding to the current block.
  • the second determining part 21 is further configured to determine the first filter type corresponding to the current block according to at least one distortion cost corresponding to at least one filter type.
  • the second determining part 21 is further configured to determine, according to the size of the current block, a first filter corresponding to the first filter type in at least one preset filtering direction.
  • the first filter type includes any one of the following: a sharpening filter type, a regular filter type, and a smoothing filter type;
  • the at least one preset filtering direction includes: a horizontal direction and a vertical direction;
  • the second determination part 21 is also configured to determine the first tap number filter in the first filter type as the first filter in the horizontal direction and the vertical direction when the size of the current block in the horizontal direction and the vertical direction is greater than a preset size threshold;
  • the first tap number filter includes any one of the following: the sharpening filter with at least 12 taps, the regular filter with at least 8 taps, and the smoothing filter with 6 taps.
  • the second determination part 21 is further configured to determine the second tap number filter in the first filter type as the first filter in the horizontal direction and the vertical direction when the size of the current block in the horizontal direction is less than or equal to the preset size threshold, or when the size of the current block in the vertical direction is less than or equal to the preset size threshold; the second tap number is less than the first tap number.
  • the second determination part 21 is further configured to determine the first tap number filter in the first filter type as the first filter in the horizontal direction and the vertical direction when the size of the current block in the horizontal direction is greater than a preset size threshold, or when the size of the current block in the vertical direction is greater than the preset size threshold.
  • the second determination part 21 is further configured to determine the second tap number filter in the first filter type as the first filter in the horizontal and vertical directions when the size of the current block in the horizontal and vertical directions is less than or equal to the preset size threshold.
  • the encoder 2 after determining the predicted image block corresponding to the current block, also includes an encoding part, which is configured to continue filtering the next block in the current frame until the current frame is processed, and determine the encoding information corresponding to the current frame according to the predicted image block corresponding to each block in the current frame; continue encoding the next frame in the current video sequence to determine the encoding information corresponding to the next frame until the current video sequence is processed and the encoding information corresponding to each frame in the current video sequence is determined; the second determination part 21 is also configured to determine the sequence-level filter flag corresponding to the current video sequence; the sequence-level filter flag is used to indicate whether the decoder enables the first tap number filter in the conventional filter type in the current video sequence; the encoding part is also configured to determine the code stream information corresponding to the current video sequence according to the sequence-level filter flag and the encoding information corresponding to each frame.
  • the encoding part after determining the predicted image block corresponding to the current block, is configured to continue filtering the next block in the current frame until the current frame is processed, and determine the encoding information corresponding to the current frame according to the predicted image block corresponding to each block in the current frame; the second determination part 21 is also configured to determine the first frame-level flag corresponding to the current frame; the first frame-level flag is used to indicate whether the decoder enables the first tap number filter in the conventional filter type in the current frame; the encoding part is also configured to determine the code stream information corresponding to the current frame according to the first frame-level flag and the encoding information corresponding to the current frame.
  • the sharpening filter with at least 12 taps includes: a first filter coefficient corresponding to each tap of the at least 12 taps at each pixel position of at least one pixel position; the first filter coefficient processes a random signal through a first preset sampling function, and normalizes the first processing result obtained by the processing to a preset coefficient interval corresponding to a preset bit depth; the conventional filter with at least 8 taps includes: a second filter coefficient corresponding to each tap of the at least 8 taps at each pixel position of at least one pixel position; the second filter coefficient processes the random signal through a second preset sampling function, and normalizes the second processing result obtained by the processing to the preset coefficient interval.
  • the embodiment of the present application further provides an encoder, including:
  • the second memory 25 stores a computer program that can be run on the second processor 26.
  • the second processor 26 executes the program, the video encoding method provided in the embodiment of the present application is implemented.
  • An embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded is determined based on a predicted image block corresponding to a current block; the predicted image block corresponding to the current block is obtained by performing pixel value prediction and motion compensation based on a reference block corresponding to the current block through a first filter corresponding to the current block; the first filter at least includes: a sharpening filter with at least 12 taps or a conventional filter with at least 8 taps.
  • An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon.
  • the computer program is executed by a first processor, the video decoding method provided by the embodiment of the present application is implemented; or, when the computer program is executed by a second processor, the video encoding method provided by the embodiment of the present application is implemented.
  • the components in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software function modules.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment.
  • the aforementioned computer-readable storage media include: ferromagnetic random access memory (FRAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic surface storage, optical disk, or compact disc read-only memory (CD-ROM), and other media that can store program codes, which are not limited by the embodiments of the present disclosure.
  • FRAM ferromagnetic random access memory
  • ROM read-only memory
  • PROM programmable read-only memory
  • EPROM erasable programmable read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory magnetic surface storage
  • optical disk optical disk
  • CD-ROM compact disc read-only memory
  • the embodiment of the present application provides a video encoding and decoding method, a decoder, an encoder and a computer-readable storage medium.
  • the decoder and the encoder can use a sharpening filter with at least 12 taps, or a conventional filter with at least 8 taps, to predict the pixel value and perform motion compensation on the reference block corresponding to the current block.
  • the filtering accuracy and the prediction accuracy of the pixel value prediction using the filter are improved, thereby improving the accuracy of motion compensation and the accuracy of encoding and decoding, and then improving the encoding and decoding performance.
  • the filter with the corresponding number of taps under the first filter type is determined, and the current block is filtered in the horizontal and vertical directions, which can improve the accuracy of pixel value prediction and further improve the accuracy of encoding and decoding and the encoding and decoding performance.
  • the filter with the corresponding number of taps under the first filter type is determined, and more indication information can be combined to determine the filter corresponding to the motion compensation process, thereby improving the accuracy of filtering prediction and improving the encoding and decoding performance.

Landscapes

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

Abstract

本申请实施例提供了一种视频编解码方法、解码器、编码器和计算机可读存储介质,能够提高编解码准确性,进而提高编解码性能。方法包括:解析码流,确定当前块对应的运动矢量,以及当前块对应的第一滤波器类型(S101);基于运动矢量,确定当前块对应的参考块(S102);确定第一滤波器类型对应的第一滤波器;第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器(S103);利用第一滤波器,基于参考块进行像素值预测与运动补偿,确定当前块对应的预测图像块(S104)。

Description

视频编解码方法、解码器、编码器及计算机可读存储介质 技术领域
本申请实施例涉及视频编解码技术,涉及但不限于一种视频编解码方法、解码器、编码器及计算机可读存储介质。
背景技术
帧间预测技术是混合编码框架中去除视频中时域冗余信息的主要手段。帧间预测技术利用已编码帧的重构帧作为参考图像,通过运动估计与运动补偿技术,对当前待编码帧的像素进行预测与编码。其中,运动估计是指在参考图像中,根据特定匹配准则为当前待编码块找到最佳匹配的参考块。参考块到当前块的位移即为运动矢量。而运动补偿通常是指利用插值滤波器,根据参考块的像素值对当前待编码块进行像素值预测的过程。因此采用高效的帧间编码方式,可以很大程度上提高视频压缩效率。
然而,目前的视频编解码中,运动补偿过程的插值滤波器的精度较低,从而降低了利用插值滤波器进行像素值预测的准确性,降低了编解码性能。
发明内容
本申请实施例提供了一种视频编解码方法、解码器、编码器及计算机可读存储介质,能够提高编解码准确性,进而提升编解码性能。
第一方面,本申请实施例提供了一种视频解码方法,所述方法包括:
解析码流,确定当前块对应的运动矢量,以及所述当前块对应的第一滤波器类型;
基于所述运动矢量,确定所述当前块对应的参考块;
确定所述第一滤波器类型对应的第一滤波器;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器;
利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块。
第二方面,本申请实施例还提供了一种视频编码方法,所述方法包括:
基于当前帧对应的参考帧,对当前块进行运动估计,确定所述当前块对应的参考块;
确定所述当前块对应的第一滤波器类型,并确定所述第一滤波器类型对应的第一滤波器;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器;
利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块。
第三方面,本申请实施例提供了一种解码器,包括:
解析部分,配置为解析码流,确定当前块对应的运动矢量,以及所述当前块对应的第一滤波器类型;
第一运动估计部分,配置为基于所述运动矢量,确定所述当前块对应的参考块;
第一确定部分,配置为确定所述第一滤波器类型对应的第一滤波器;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器;
第一运动补偿部分,配置为利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块。
第四方面,本申请实施例提供了一种编码器,包括:
第二运动估计部分,配置为基于当前帧对应的参考帧,对当前块进行运动估计,确定所述当前块对应的参考块;
第二确定部分,配置为确定所述当前块对应的第一滤波器类型,并确定所述第一滤波器类型对应的第一滤波器;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器;
第二运动补偿部分,配置为利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确 定所述当前块对应的预测图像块。
第五方面,本申请实施例还提供了一种解码器,包括:
第一存储器,用于存储可执行指令;
第一处理器,用于执行所述第一存储器中存储的可执行指令时,实现本申请实施例中的视频解码方法。
第六方面,本申请实施例还提供了一种编码器,包括:
第二存储器,用于存储可执行指令;
第二处理器,用于执行所述第二存储器中存储的可执行指令时,实现本申请实施例提供的视频编码方法。
本申请实施例提供了一种码流,所述码流是根据待编码信息进行比特编码生成的;其中,待编码信息基于当前块对应的预测图像块确定;所述当前块对应的预测图像块通过所述当前块对应的第一滤波器,基于所述当前块对应的参考块进行像素值预测与运动补偿得到;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器。
本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被第一处理器执行时,实现本申请实施例提供的视频解码方法;或者,该计算机程序被第二处理器执行时,实现本申请实施例提供的视频编码方法。
本申请实施例提供了一种视频编解码方法、解码器、编码器及计算机可读存储介质,解码器可以利用至少12抽头的锐化滤波器,或者至少8抽头的常规滤波器,对当前块对应的参考块进行像素值预测与运动补偿,相较于目前的低阶数插值滤波器,提高了滤波精度,以及利用滤波器进行像素值预测的预测精度,从而提高了基于预测的像素进行运动补偿和解码的准确性,进而提高了解码性能。
附图说明
图1为本申请实施例提供的一种编码器的组成框图示意图;
图2为本申请实施例提供的一种解码器的组成框图示意图;
图3为本申请实施例提供的一种编解码系统的网络架构示意图;
图4为本申请实施例提供的一种解码方法的可选的流程示意图;
图5为本申请实施例提供的12抽头锐化滤波器与目前的8抽头锐化滤波器的频率响应对比图;
图6为本申请实施例提供一种解码方法的可选的流程示意图;
图7为本申请实施例提供一种解码方法的可选的流程示意图;
图8为本申请实施例提供的解码方法的一种可选的流程示意图;
图9为本申请实施例提供的解码方法的一种可选的流程示意图;
图10为本申请实施例提供的解码方法的一种可选的流程示意图;
图11为本申请实施例提供的解码方法的一种可选的流程示意图;
图12为本申请实施例提供的解码方法的一种可选的流程示意图;
图13为本申请实施例提供的解码方法的一种可选的流程示意图;
图14为本申请实施例提供的编码方法的一种可选的流程示意图;
图15为本申请实施例提供的一种解码器的结构示意图一;
图16为本申请实施例提供的一种解码器的结构示意图二;
图17为本申请实施例提供的一种编码器的结构示意图一;
图18为本申请实施例提供的一种编码器的结构示意图二。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅仅用于解释相关申请,而非对该申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关申请相关的部分。
需要说明的是,说明书通篇中提到的“第一”、“第二”、“第三”等,仅仅是为了区分不同的特征,不具有限定优先级、先后顺序、大小关系等功能。
对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下 的解释:
开放媒体联盟(Alliance for Open Media,AOM)
AOM的视频压缩参考软件(AOMedia Video Model,AVM)
编码树单元(Coding Tree Unit,CTU)
运动估计(Motion Estimate,ME)
运动补偿(Motion Compensation,MC)
运动矢量(Motion Vector,MV)
可以理解,数字视频压缩技术主要是将庞大的数字影像视频数据进行压缩,以便于传输以及存储等。随着互联网视频的激增以及人们对视频清晰度的要求越来越高,尽管已有的数字视频压缩标准能够节省不少视频数据,但目前仍然需要追求更好的数字视频压缩技术,以减少数字视频传输的带宽和流量压力。
与大多数主流的视频编解码标准类似,AVM参考软件也是基于块为基础而进行的传统编解码,AVM参考软件是基于块为基础而进行的传统编解码,它包括多个模块{块划分,帧内预测,帧间预测,变换,量化,熵编码,环路和后处理滤波,屏幕内容的特有编码}。本申请主要应用于AVM的编解码场景,通过对帧间预测部分的改进,提升编解码性能。
帧间预测技术是混合编码框架中去除视频中时域冗余信息的主要手段。帧间预测技术利用已编码帧的重构帧作为参考图像,通过运动估计与运动补偿技术,对当前待编码帧的像素进行预测与编码。其中,运动估计是指在参考图像中,根据特定匹配准则为当前待编码块找到最佳匹配的参考块。参考块到当前块的位移即为运动矢量。而运动补偿通常是指利用插值滤波器,根据参考块的像素值对当前待编码块进行像素值预测的过程。因此采用高效的帧间编码方式,可以很大程度上提高视频压缩效率。
为了提升帧间预测的准确性,通常采用灵活多样的运动补偿技术,其中包括高精度的运动补偿。在实际场景中,由于物体运动的距离并不一定是像素的整数倍,为了更准确的表示运动物体在图像之间的位移,因此需要将运动估计的精度提升到亚像素级别,此时的运动补偿被称为亚像素精度的运动补偿。此时可以在非整像素的位置使用插值滤波器来获得预测像素。在视频标准AV2中,运动矢量分像素精度可以精确到1/16像素。
在AVM参考软件的实现中,解码器通过码流解析出当前块所使用的滤波器类型。通常,滤波器类型为常规滤波器类型(REGULAR)、平滑滤波器类型(SMOOTH)、或锐化滤波器类型(SHARP)中的任一种。AVM参考软件实现中,默认REGULAR、SMOOTH滤波器的抽头数为6,SHARP滤波器的抽头数为8。在实际编解码过程中,每种类型的滤波器都有一套对应的短抽头数的滤波器,通常短抽头REGULAR滤波器的抽头数为4,短抽头SMOOTH滤波器的抽头数为4,短抽头SHARP滤波器使用短抽头REGULAR滤波器。通常滤波过程按照水平和垂直两个方向进行,解码器可以根据当前块在水平方向上的宽度或者在垂直方向上的高度,来确定在该方向上所使用的滤波器是默认抽头数还是短抽头数。示例性地,若当前块的宽小于等于4时,水平方向选择4抽头相应类型的滤波器,否则使用默认抽头数的滤波器。若当前块的高小于等于4时,垂直方向选择4抽头相应类型的滤波器,否则使用默认抽头数的滤波器。
目前,在AVM中现存的插值滤波器和抽头数判定条件仍有很大的改进空间,由于插值滤波器本身阶数较低或系数精度不足,或选择的抽头数不合理,导致滤波精度的降低,从而降低了预测准确性,进而降低了编解码性能。
本申请实施例提供一种视频编解码方法、解码器、编码器及计算机可读存储介质,能够提高视频编解码的准确性,进而提高视频编解码性能。下面将结合附图对本申请各实施例进行详细说明。
参见图1,其示出了本申请实施例提供的一种编码器的组成框图示意图。如图1所示,编码器(具体为“视频编码器”)50可以包括变换与量化单元501、帧内估计单元502、帧内预测单元503、帧间预测单元504、运动估计单元505、反变换与反量化单元506、滤波器控制分析单元507、滤波单元508、编码单元509和解码图像缓存单元510等,其中,滤波单元508可以实现去方块滤波及样本自适应缩进(Sample Adaptive 0ffset,SAO)滤波,编码单元509可以实现头信息编码及基于上下文的自适应二进制算术编码(Context-based Adaptive Binary Arithmetic Coding,CABAC)。针对输入的原始视频信号,通过编码树单元(Coding Tree Unit,CTU)的划分可以得到一个视频编码块,然后对经过帧内或帧间预测后得到的残差像素信息通过变换与量化单元501对该视频编码块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内估计单元502和帧内预测单元503是用于对该视频编码块进行帧内预测;明确地说,帧内 估计单元502和帧内预测单元503用于确定待用以编码该视频编码块的帧内预测模式;帧间预测单元504和运动估计单元505用于执行所接收的视频编码块相对于一或多个参考帧中的一或多个块的帧间预测编码以提供时间预测信息;由运动估计单元505执行的运动估计为产生运动向量的过程,所述运动向量可以估计该视频编码块的运动,然后由帧间预测单元504基于由运动估计单元505所确定的运动向量执行运动补偿,故帧间预测单元504又可称为运动补偿单元;在确定帧内预测模式之后,帧内预测单元503还用于将所选择的帧内预测数据提供到编码单元509,而且运动估计单元505将所计算确定的运动向量数据也发送到编码单元509;此外,反变换与反量化单元506是用于该视频编码块的重构建,在像素域中重构建残差块,该重构建残差块通过滤波器控制分析单元507和滤波单元508去除方块效应伪影,然后将该重构残差块添加到解码图像缓存单元510的帧中的一个预测块,用以产生经重构建的视频编码块;编码单元509是用于编码各种编码参数及量化后的变换系数,在基于CABAC的编码算法中,上下文内容可基于相邻编码块,可用于编码指示所确定的帧内预测模式的信息,输出该视频信号的码流;而解码图像缓存单元510是用于存放重构建的视频编码块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频编码块,这些重构建的视频编码块都会被存放在解码图像缓存单元510中。
参见图2,其示出了本申请实施例提供的一种解码器的组成框图示意图。如图2所示,解码器(具体为“视频解码器”)60包括解码单元601、反变换与反量化单元602、帧内预测单元603、帧间预测单元604、滤波单元605和解码图像缓存单元606等,其中,解码单元601可以实现头信息解码以及CABAC解码,滤波单元605可以实现去方块滤波以及SAO滤波。输入的视频信号经过图1的编码处理之后,输出该视频信号的码流;该码流输入解码器60中,首先经过解码单元601,用于得到解码后的变换系数;针对该变换系数通过反变换与反量化单元602进行处理,以便在像素域中产生残差块;帧内预测单元603可用于基于所确定的帧内预测模式和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;帧间预测单元604是通过解析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测块;通过对来自反变换与反量化单元602的残差块与由帧内预测单元603或帧间预测单元604产生的对应预测块进行求和,而形成解码的视频块;该解码的视频信号通过滤波单元605以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元606中,解码图像缓存单元606存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,即得到了所恢复的原始视频信号。
进一步地,本申请实施例还提供了一种包含编码器和解码器的编解码系统的网络架构,图3为本申请实施例提供的一种编解码系统的网络架构示意图。如图3所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有视频编解码功能的设备,例如,所述电子设备可以包括智能手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作具体限定。在这里,本申请实施例所述的解码器或编码器就可以为上述电子设备。
需要说明的是,本申请实施例的方法主要应用在如图1所示的帧间预测单元504部分和如图2所示的帧间预测单元604部分。也就是说,本申请实施例既可以应用于编码器,也可以应用于解码器,甚至还可以同时应用于编码器和解码器,但是本申请实施例对此不作具体限定。
还需要说明的是,当应用于帧内帧间单元504部分时,“当前块”具体是指当前待进行帧间预测的编码块;当应用于帧间预测单元604部分时,“当前块”具体是指当前待进行帧间预测的解码块。
在本申请的一实施例中,参见图4,其示出了本申请实施例提供的一种解码方法的流程示意图。该方法可以包括:
S101、解析码流,确定当前块对应的运动矢量,以及当前块对应的第一滤波器类型。
S101中,解码器接收编码器发送的码流,并通过解析码流,得到码流中的当前帧,当前帧中包含多个编码块(编码单元)。解码器对当前帧中的当前块进行解析,得到当前块对应的运动矢量(Motion Vector,MV)以及当前块对应的第一滤波器类型。这里,第一滤波器类型为编码器为当前块指定的,用于运动补偿的插值滤波过程的滤波器类型。
在一些实施例中,当前块可以是当前编码单元(Coding Unit,CU)、当前变换单元(Transform Unit,TU)、当前预测单元(Prediction Unit,PU)、当前编码块(Coding Block,CB)等等,本申请实施例不作具体限定。
S102、基于运动矢量,确定当前块对应的参考块。
S102中,解码器还可以通过对当前块的解析,得到当前块对应的参考帧索引,进而确定当前块对应的参考帧。这里,参考帧可以是当前帧对应的前向或后向的已解码帧。示例性地,参考帧索引可以是inter_pred_idc,参考帧可以包括:LAST(最近过去的)帧,GOLDEN(遥远过去的)帧和ALTREF(临时过滤将来的)帧等等。这样,解码器可以根据当前块对应的运动矢量,从参考帧中确定出匹配的图像块,作为当前块对应的参考块。其中,这里的参考块也可以称为“补偿块”。
示例性地,对于帧间预测的单向预测过程,解码器可以根据运动矢量从List0参考帧或者List1参考帧中来确定当前块对应的参考块;对于双向预测过程,解码器可以从List0参考帧中确定List0参考块,以及从List1参考帧中确定List1参考块。
S103、确定第一滤波器类型对应的第一滤波器;第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器。
S103中,第一滤波器类型下对应包括至少一种抽头数的滤波器。解码器可以从第一滤波器类型对应的至少一种抽头数的滤波器中,确定出用于对当前块进行插值滤波的抽头数的滤波器,作为第一滤波器。
本申请实施例中,解码器中预设支持至少一种滤波器类型,至少一种滤波器类型包括第一滤波器类型。其中,至少一种滤波器类型中的每种滤波器类型下对应包括至少一种抽头数的滤波器。示例性地,至少一种滤波器类型可以包括:锐化(SHARP)滤波器类型、常规(REGULAR)滤波器类型、平滑(SMOOTH)滤波器类型中的至少一个。其中,锐化滤波器类型至少包括:至少12抽头的锐化滤波器,也可以包括其他抽头数,如4抽头的锐化滤波器。常规滤波器类型至少包括:至少8抽头的常规滤波器,也可以包括其他抽头数,如4抽头的锐化滤波器。具体的根据实际情况进行选择,本申请实施例不作限定。
在一些实施例中,解码器可以通过解析当前帧,如解析当前帧的帧头部,确定帧级滤波器切换标志位;这里,帧级滤波器切换标志位表征对当前帧内的各个块进行滤波的滤波器是否可切换。示例性地,帧级滤波器切换标志位可以是is_filter_switchable,由编码器在编码帧的帧级设置。解码器在解析出的帧级滤波器切换标志位为第一预设标记值的情况下,确定当前块对应的块级滤波器类型索引;第一预设标志标记值表征当前帧对应至少两种滤波器类型;根据块级滤波器类型索引,结合滤波器类型索引与滤波器类型的预设对应关系,确定第一滤波器类型。
在帧级滤波器切换标志位为第二预设标记值的情况下,解码器继续从当前帧中解析出当前帧对应的帧级滤波器类型索引;将帧级滤波器类型索引作为当前帧中每一块对应的块级滤波器类型索引。这里,第二预设标记值表征当前帧对应一种滤波器类型。
示例性地,第一预设标记值可以是1,第二预设标记值可以是0。若解码器解析出的帧级滤波器切换标志位为1,表明当前帧图像存在使用不同滤波器的情况。在后续解码每一个块(单元块信息)时,继续解码出当前块使用的插值滤波器序号,这里,插值滤波器序号相当于上述块级滤波器类型索引。示例性地,可以包括0、1和2三种取值,三种取值分别对应REGULAR、SMOOTH和SHARP三种滤波器类型。若解析出帧级滤波器切换标志位为0,表明整帧图像使用相同的滤波器,解码器进一步解析出当前帧使用的滤波器序号,也即上述的帧级滤波器类型索引。这里,帧级滤波器类型索引与滤波器类型的对应关系,与块级滤波器索引与滤波器类型的对应关系可以是相同的。
在一些实施例中,在帧级滤波器切换标志位为第一预设标记值的情况下,对于当前帧中的当前块,解码器可以根据当前块的尺寸,确定当前块在至少一个预设滤波方向上对应的第一滤波器类型中对应抽头数的滤波器,也即第一滤波器。其中,当前块的尺寸可以包括:当前块在至少一个预设滤波方向上的长度,如在水平方向上的宽度、在垂直方向上的高度;或者,包括当前块的面积信息,对角线长度等等,具体的根据实际情况进行选择,本申请实施例不作限定。进一步地,在帧级滤波器切换标志位为第一预设标记值的情况下,解码器在对当前帧中的下一块进行帧间预测的滤波处理时,以同样的方法确定下一块对应的第一滤波器。也就是说,解码器可以根据编码器指定的第一滤波器类型,根据当前帧中各个块的尺寸,自适应选择当前帧中的各个块在第一该滤波器类型下对应抽头数的滤波器,作为各个块对应的第一滤波器。
相较于目前的标准中对于运动补偿插值滤波器的配置,本申请实施例中的第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器。可以看出,本申请实施例对于锐化滤波器和常规滤波器的抽头数(阶数)进行了提升。这里,更多的抽头数或更高的阶数意味着在进行像素值的插值滤波时,用于参考的像素点更多,从而可以带来更多的阻带衰减,更少的波纹,更窄的滤波等等,从而提高预测准确性。示例性地,第一滤波器可以包括:12抽头的锐化滤波器,或14抽头的锐化滤波器,或16抽头的锐化滤波器,或者,包括8抽头的常规滤波器等等。
在一些实施例中,本申请实施例同样对抽头数提升后的滤波器的系数进行了优化。其中,对于至少12抽头的锐化滤波器,可以包括:至少12个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第一滤波系数。这里,像素位置包括整像素的像素位置与非整像素(也即亚像素)的像素位置。每个像素位置上的第一滤波系数可以通过第一预设抽样函数,如sinc函数对随机信号进行处理,并将处理得到的第一处理结果归一化至预设比特深度对应的预设系数区间得到。在一些实施例中,预设比特深度可以是7bit,随机信号可以是取值范围在[-∞,+∞]的自变量波形信号。通过sinc函数对自变量波形信号进行加窗处理,可以得到[-1,+1]之间的波形信号,也即第一处理结果。将[-1,+1]之间的波形信号投影至7bit对应的[-128,128]的系数区间,也即对第一处理结果进行归一化,得到第一滤波系数。示例性地,以亚像素精度为1/16像素为例,12抽头的锐化滤波器的滤波系数可以如表1所示,如下:
表1
1/16 0 1 -2 3 -7 127 9 -4 2 -1 0 0
2/16 -1 2 -4 7 -14 125 17 -7 4 -2 1 0
3/16 -1 2 -4 8 -18 121 27 -11 6 -3 2 -1
4/16 -1 3 -6 11 -22 115 38 -15 8 -4 2 -1
5/16 -1 3 -6 12 -24 108 49 -19 10 -6 3 -1
6/16 -1 4 -7 13 -26 100 59 -21 11 -6 3 -1
7/16 -1 3 -7 13 -26 91 70 -23 12 -6 3 -1
8/16 -1 3 -7 13 -25 81 81 -25 13 -7 3 -1
9/16 -1 3 -6 12 -23 70 91 -26 13 -7 3 -1
10/16 -1 3 -6 11 -21 59 100 -26 13 -7 4 -1
11/16 -1 3 -6 10 -19 49 108 -24 12 -6 3 -1
12/16 -1 2 -4 8 -15 38 115 -22 11 -6 3 -1
13/16 -1 2 -3 6 -11 27 121 -18 8 -4 2 -1
14/16 0 1 -2 4 -7 17 125 -14 7 -4 2 -1
15/16 0 0 -1 2 -4 9 127 -7 3 -2 1 0
表1中的第一列代表每个亚像素的像素位置,对于12抽头的SHARP滤波器(锐化滤波器),每个亚像素位置对应12抽头对应的12个第一滤波系数。对于更多抽头数的SHARP滤波器,如14抽头数或16抽头数的SHARP滤波器,可以根据上述类似的方法计算出每个抽头数在各个像素位置上对应的第一滤波系数,具体的根据实际情况进行选择,本申请实施例不作限定。
在一些实施例中,至少8抽头的常规滤波器包括:至少8个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第二滤波系数;第二滤波系数通过第二预设抽样函数对随机信号进行处理,并将处理得到的第二处理结果归一化至预设系数区间得到。这里,第二预设抽样函数可以与第一预设抽样函数相同或不同。第二滤波系数的计算方式与上述第一滤波系数的计算方式类似,这里不再赘述。
示例性地,8抽头的常规滤波器的滤波系数可以如表2所示,如下:
表2
1/16 0 2 -6 126 8 -3 1 0
2/16 -1 3 -10 123 18 -6 2 -1
3/16 -1 4 -14 118 28 -9 3 -1
4/16 -1 5 -17 112 38 -12 4 -1
5/16 -1 6 -19 105 48 -15 5 -1
6/16 -1 6 -20 97 58 -17 6 -1
7/16 -1 6 -20 88 69 -19 6 -1
8/16 -1 6 -20 79 79 -20 6 -1
9/16 -1 6 -19 69 88 -20 6 -1
10/16 -1 6 -17 58 97 -20 6 -1
11/16 -1 5 -15 48 105 -19 6 -1
12/16 -1 4 -12 38 112 -17 5 -1
13/16 -1 3 -9 28 118 -14 4 -1
14/16 -1 2 -6 18 123 -10 3 -1
15/16 0 1 -3 8 126 -6 2 0
S104、利用第一滤波器,基于参考块进行像素值预测与运动补偿,确定当前块对应的预测图像块。
S104中,解码器利用第一滤波器,基于参考块进行像素值预测,根据预测到的像素对参考块进行运动补偿,确定当前块对应的预测图像块。
本申请实施例中,解码器利用第一滤波器相应的抽头数,从参考块中确定相应数量的像素,对进行像素值预测,解码器根据预测的像素,通过加权平均等方式,对参考块进行补偿,得到当前块对应的预测图像块。
在一些实施例中,对于通过上述单向预测(即List0预测或List1预测)过程,解码器根据第一滤波器预测的像素值,如预测的色度值和/或亮度值,对List0参考帧中的List0参考块或List1参考帧中List1参考块进行补偿,得到当前块对应的预测图像块。对于双向预测过程,解码器根据第一滤波器预测的像素值,对List0参考帧中的List0参考块,以及List1参考帧中的List1参考块进行补偿,然后对List0参考块和List1参考块进行加权预测,得到当前块的预测图像块。
在一些实施例中,解码器可以对当前帧中下一块继续进行滤波处理,确定下一块对应的预测图像块,继续处理直至对当前帧处理完成,根据当前帧中每一块对应的预测图像块,确定当前帧对应的解码图像。
本申请实施例中,以第一滤波器为12抽头的锐化滤波器为例,12抽头锐化滤波器与目前的8抽头锐化滤波器的频率响应对比图如图5所示。图5中以虚线表示8抽头SHARP滤波器在1/2像素精度上的频率响应曲线,以实线表示12抽头SHARP滤波器在1/2像素精度上的频率响应曲线。可以看出,本申请实施例的12抽头SHARP滤波器在保证通带平坦的同时,有效降低了通带中的波纹效应。并且,12抽头的锐化滤波器对截止频率之内的有效信号幅值特征保留更完整,对截止频率之外的噪声衰减更迅速。
可以理解的是,解码器利用至少12抽头的锐化滤波器,或者至少8抽头的常规滤波器,对当前块对应的参考块进行像素值预测与运动补偿,相较于目前的低阶数插值滤波器,提高了滤波精度,以及利用滤波器进行像素值预测的预测精度,从而提高了运动补偿的准确性和解码准确性,进而提高了解码性能。
在一些实施例中,第一滤波器类型包括以下任一个:锐化滤波器类型、常规滤波器类型、平滑滤波器类型;至少一个预设滤波方向包括:水平方向与垂直方向。对于解码端的至少一种滤波器类型,每种滤波器类型下对应包括至少一种抽头数的滤波器。在一些实施例中,至少一种抽头数包括:第一抽头数和第二抽头数,其中,第二抽头数小于第一抽头数。这里,第一抽头数滤波器相当于长抽头滤波器,第二抽头数滤波器相当于短抽头滤波器。
在一些实施例中,第一抽头数滤波器可以包括以下任一个:至少12抽头的锐化滤波器、至少8抽头的常规滤波器、6抽头的平滑滤波器。示例性地,REGULAR滤波器类型下对应有8抽头的REGULAR滤波器和4抽头的REGULAR滤波器;其中,8抽头的REGULAR滤波器为REGULAR 滤波器类型下的第一抽头数滤波器,4抽头的REGULAR滤波器为REGULAR滤波器类型下的第二抽头数滤波器。SMOOTH滤波器类型下对应有6抽头的SMOOTH滤波器和4抽头的SMOOTH滤波器;其中,6抽头的SMOOTH滤波器为SMOOTH滤波器类型下的第一抽头数滤波器,4抽头的SMOOTH滤波器为SMOOTH滤波器类型下的第二抽头数滤波器。SHARP滤波器类型下的第一抽头数滤波器可以是12抽头的SHARP滤波器,SHARP滤波器类型下的第二抽头数滤波器可以使用4抽头的REGULAR滤波器。
参考图6,图4中的S103可以通过S201或S202来实现,如下:
S201、在当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值的情况下,将第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的第一滤波器。
S201与S202中,滤波器根据当前块在水平方向与垂直方向上的尺寸,确定在水平方向与垂直方向上使用的第一滤波器。S201中,在当前块在水平方向与垂直方向上的尺寸均大于预设尺寸阈值的情况下,将第一滤波器类型下的第一抽头数滤波器,确定为在水平方向上使用的第一滤波器,以及在垂直方向上使用的第一滤波器。在一些实施例中,预设尺寸阈值可以是4,表征4个像素。
在一些实施例中,第一抽头数滤波器相当于长抽头滤波器,长抽头滤波器可以是对应滤波器类型下默认的滤波器。示例性地,若第一滤波器类型为SHARP类型,在当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值的情况下,将SHARP类型中默认的长抽头滤波器,如至少12抽头的锐化滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。若第一滤波器类型为REGULAR类型,在当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值的情况下,将REGULAR类型中默认的长抽头滤波器,如至少8抽头的常规滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。若第一滤波器类型为SMOOTH类型,在当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值的情况下,将SMOOTH类型中默认的长抽头滤波器,如6抽头的平滑滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。
S202、在当前块在水平方向上的尺寸小于或等于预设尺寸阈值,或者,在当前块在垂直方向上的尺寸小于或等于预设尺寸阈值的情况下,将第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的第一滤波器。
S202中,在当前块在水平方向上的尺寸小于或等于预设尺寸阈值,或者,在当前块在垂直方向上的尺寸小于或等于预设尺寸阈值的情况下,也即在当前块在水平方向或垂直方向中的任一方向上的尺寸小于或等于预设尺寸阈值的情况下,解码器将第一滤波器类型中的第二抽头数滤波器确定为水平方向的第一滤波器与在垂直方向上的第一滤波器。
在一些实施例中,若第一滤波器类型为SHARP类型,在当前块在水平方向或垂直方向上的尺寸小于或等于预设尺寸阈值的情况下,将SHARP类型中短抽头滤波器,如4抽头的锐化滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。若第一滤波器类型为REGULAR类型,在当前块在水平方向或垂直方向上的尺寸小于或等于预设尺寸阈值的情况下,将REGULAR类型中短抽头滤波器,如4抽头的常规滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。若第一滤波器类型为SMOOTH类型,在当前块在水平方向或垂直方向上的尺寸小于或等于预设尺寸阈值的情况下,将SMOOTH类型中的短抽头滤波器,如4抽头的平滑滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。
在一些实施例中,参考图7,图4中的S103还可以通过S301或S302来实现,如下:
S301、在当前块在水平方向上的尺寸大于预设尺寸阈值,或者,在垂直方向上的尺寸大于预设尺寸阈值情况下,将第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的第一滤波器。
S301中,在当前块在水平方向上的尺寸大于预设尺寸阈值,或者,在当前块在垂直方向上的尺寸大于预设尺寸阈值的情况下,也即在当前块在水平方向或垂直方向中的任一方向上的尺寸大于预设尺寸阈值的情况下,解码器将第一滤波器类型中的第一抽头数滤波器确定为水平方向的第一滤波器与垂直方向上的第一滤波器。
在一些实施例中,若第一滤波器类型为SHARP类型,在当前块在水平方向或垂直方向上的尺寸大于预设尺寸阈值的情况下,将SHARP类型中默认的长抽头滤波器,如至少12抽头的锐化滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。若第一滤波器类型为REGULAR类型,在当前块在水平方向或垂直方向上的尺寸大于预设尺寸阈值的情况下,将REGULAR类型中默认的长抽头滤波器,如至少8抽头的常规滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。若第一滤波器类型为SMOOTH类型,在当前块在水平方向或垂直方向上的尺寸大等于 预设尺寸阈值的情况下,将SMOOTH类型中默认的长抽头滤波器,如6抽头的平滑滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。
S302、在当前块在水平方向与垂直方向上的尺寸小于或等于预设尺寸阈值的情况下,将第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的第一滤波器。
S302中,在当前块在水平方向与垂直方向上的尺寸均小于或等于预设尺寸阈值的情况下,解码器将第一滤波器类型中的第二抽头数滤波器确定为水平方向的第一滤波器与在垂直方向上的第一滤波器。
在一些实施例中,若第一滤波器类型为SHARP类型,在当前块在水平方向与垂直方向上的尺寸小于或等于预设尺寸阈值的情况下,将SHARP类型中的短抽头滤波器,如4抽头的锐化滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。若第一滤波器类型为REGULAR类型,在当前块在水平方向与垂直方向上的尺寸均小于或等于预设尺寸阈值的情况下,将REGULAR类型中短抽头滤波器,如4抽头的常规滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。若第一滤波器类型为SMOOTH类型,在当前块在水平方向与垂直方向上的尺寸均小于或等于预设尺寸阈值的情况下,将SMOOTH类型中的短抽头滤波器,如4抽头的平滑滤波器确定为对当前块在水平方向与垂直方向上滤波的第一滤波器。
需要说明的是,S201或S202,与S301或S302为实现S103的两种并列的分支流程,实际应用时可以根据情况选择其中任意一种来执行,本申请实施例不作限定。
可以理解的是,根据当前块的尺寸,确定第一滤波类型下对应抽头数的滤波器,对当前块在水平方向与垂直方向上进行滤波,可以提高像素值预测的精度,进一步提高了解码准确性和解码性能。
在一些实施例中,解码器还可以通过解析码流中的预设标志位来确定当前块对应的第一滤波器。该预设标志位可位于序列级、帧级或块级。
在一些实施例中,编码器可以在视频序列中设置序列级滤波标志位,用于表示是否使能某种抽头数的滤波器。示例性地,可以在视频序列的序列结构中添加序列级滤波标志位,如添加use_longtap标志位,也可以利用已有的序列级标志位作为序列级滤波标志位。序列级滤波标志位的作用范围可以是某种特定的滤波器类型,如作用于常规滤波器,也作用于全部滤波器类型。相应地,解码器可以通过解析码流中的当前视频序列,如解析当前视频序列的序列头,来确定序列级滤波标志位。这里,当前视频序列为包含当前帧的视频序列,当前帧中包含当前块。
在一些实施例中,序列级滤波标志位用于指示解码器是否在当前视频序列中使能常规滤波器类型中的第一抽头数滤波器。参考图8,图4中的S103还可以通过S401或S402来实现,如下:
S401、在序列级滤波标志位为第一预设值,且第一滤波器类型为常规滤波器类型的情况下,根据当前块的尺寸,确定常规滤波器类型在至少一个预设滤波方向上对应的第一滤波器。
S401中,第一预设值表征对当前视频序列范围内的块进行运动补偿的插值滤波时可以使用常规滤波器类型中的第一抽头数的滤波器,如8抽头的常规滤波器。在一些实施例中,第一预设值可以为1。
在一些实施例中,在序列级滤波标志位为第一预设值的情况下,说明可以使用常规滤波器类型的第一抽头数滤波器对当前块进行滤波。这样,在解码器从当前块中解析出的第一滤波器类型为常规滤波器类型的情况下,可以根据当前块的尺寸,确定常规滤波器类型在至少一个预设滤波方向上对应的第一滤波器。
这里,S401中根据当前块的尺寸,确定常规滤波器类型在至少一个预设滤波方向上对应的第一滤波器的过程与上述S201或S202,或者,S301或S302中的过程描述一致,此处不再赘述。示例性地,S401结合S201的过程可以包括:在序列级滤波标志位为第一预设值,且第一滤波器类型为常规滤波器类型的情况下,若当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值,将第一抽头数的常规滤波器作为第一滤波器。S401与S202、或S301、或S302结合的过程同理,此处不再赘述。
S402、在序列级滤波标志位为第二预设值,且第一滤波器类型为常规滤波器类型的情况下,将常规滤波器类型中的第二抽头数滤波器确定为至少一个预设滤波方向上对应的第一滤波器。
S402中,第二预设值表征对当前视频序列范围内的块进行运动补偿的插值滤波时不可使用常规滤波器类型中的第一抽头数的滤波器。这样,在序列级滤波标志位为第二预设值,且第一滤波器类型为常规滤波器类型的情况下,对于当前视频序列范围内每一帧中的每一块,解码器直接将常规滤波器类型中的第二抽头数滤波器确定为至少一个预设滤波方向上对应的第一滤波器。
需要说明的是,上述S401与S402描述的是将根据序列级滤波标志位与根据当前块尺寸自适应 选择抽头数的滤波器相结合的过程,在一些实施例中,也可以将单独根据序列级滤波标志位确定相应抽头数的第一滤波器。示例性地,在序列级滤波标志位为第一预设值的情况下,对于当前视频序列中的每一块,可以直接将第一滤波器类型下第一抽头数的滤波器作为每一块在至少一个预设滤波方向上对应的第一滤波器。在序列级滤波标志位为第二预设值的情况下,可以直接将第一滤波器类型下第一抽头数的滤波器,作为当前视频序列中的每一块在至少一个预设滤波方向上对应的第一滤波器。
在一些实施例中,编码器可以在当前帧中设置帧级的滤波标志位,用于表示是否使能某种抽头数的滤波器。示例性地,可以在帧结构中添加第一帧级标志位,或者利用已有的帧级标志位作为第一帧级标志位。例如,将帧级的屏幕内容编码工具标志位allow_screen_content_tools作为第一帧级标志位。目前,在allow_screen_content_tools为1时,表示帧内块可以使用palette编码;在allow_screen_content_tools为0时,表示禁用palette编码。本申请实施例将allow_screen_content_tools作为第一帧级标志位,在allow_screen_content_tools为0时,表示在当前帧范围内使能第一抽头数的滤波器,在allow_screen_content_tools为1时,表示在当前帧范围内不使用第一抽头数的滤波器。
在一些实施例中,第一帧级标志位的作用范围可以是某种特定的滤波器类型,如作用于常规滤波器,也作用于全部滤波器类型。相应地,解码器可以通过解析码流中的当前帧,如解析当前帧的帧头,来确定第一帧级标志位。参考图9,图4中的S103还可以通过S501或S502来实现,如下:
S501、在第一帧级标志位为第三预设值,且第一滤波器类型为常规滤波器类型的情况下,根据当前块的尺寸,确定常规滤波器类型在至少一个预设滤波方向上对应的第一滤波器。
S501中,第三预设值表征对当前帧范围内的块进行运动补偿的插值滤波时可以使用常规滤波器类型中的第一抽头数的滤波器,如8抽头的常规滤波器。在一些实施例中,第三预设值跟上述的第一预设值可以相同或不同,示例性地,第一帧级标志位可以是屏幕内容编码工具标志位,第三预设值可以为0。
在一些实施例中,在第一帧级标志位为第三预设值的情况下,说明可以使用常规滤波器类型的第一抽头数滤波器对当前块进行滤波。这样,在解码器从当前块中解析出的第一滤波器类型为常规滤波器类型的情况下,可以根据当前块的尺寸,确定常规滤波器类型在至少一个预设滤波方向上对应的第一滤波器。
这里,S501中根据当前块的尺寸,确定常规滤波器类型在至少一个预设滤波方向上对应的第一滤波器的过程与上述S201或S202,或者,S301或S302中的过程描述一致,此处不再赘述。示例性地,S501结合S201的过程可以包括:在第一帧级标志位为第三预设值,且第一滤波器类型为常规滤波器类型的情况下,若当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值,将第一抽头数的常规滤波器作为第一滤波器。S401与S202、或S301、或S302结合的过程同理,此处不再赘述。
S502、在第一帧级标志位为第四预设值,且第一滤波器类型为常规滤波器类型的情况下,将常规滤波器类型中的第二抽头数滤波器确定为至少一个预设滤波方向上对应的第一滤波器。
S502中,第四预设值表征对当前帧范围内的块进行运动补偿的插值滤波时不可使用常规滤波器类型中的第一抽头数的滤波器。这样,在第一帧级标志位为第二预设值,且第一滤波器类型为常规滤波器类型的情况下,对于当前帧范围内每一帧中的每一块,解码器直接将常规滤波器类型中的第二抽头数滤波器确定为至少一个预设滤波方向上对应的第一滤波器。在一些实施例中,第四预设值跟上述的第二预设值可以相同或不同,示例性地,第一帧级标志位可以是屏幕内容编码工具标志位,第四预设值可以为1。
需要说明的是,上述S501与S502描述的是将根据第一帧级标志位与根据当前块尺寸自适应选择抽头数的滤波器相结合的过程,在一些实施例中,也可以将单独根据第一帧级标志位确定相应抽头数的第一滤波器。示例性地,在第一帧级标志位为第三预设值的情况下,对于当前帧中的每一块,可以直接将第一滤波器类型下第一抽头数的滤波器作为每一块在至少一个预设滤波方向上对应的第一滤波器。在第一帧级标志位为第四预设值的情况下,可以直接将第一滤波器类型下第二抽头数的滤波器,作为当前帧中的每一块在至少一个预设滤波方向上对应的第一滤波器。
需要说明的是,S401或S402,与S501或S502为实现S103的两种并列的分支流程,实际应用时可以根据情况选择其中任意一种来执行,本申请实施例不作限定。
可以理解的是,本申请实施例中,通过解析序列级的标志位或帧级的标志位,确定第一滤波器类型下对应抽头数的滤波器,可以结合更多的指示信息,来确定运动补偿过程对应的滤波器,从而提高了滤波预测的准确性,提高了解码性能。
在一些实施例中,基于本申请实施例提出的12抽头SHARP滤波器,解码器确定第一滤波器类 型与第一滤波器的过程可以如图10所示,如下:
S601、解析当前帧对应的帧级滤波器切换标志位。
S601中,帧级滤波器切换标志位可以是is_filter_switchable。若帧级滤波器切换标志位为1,表征对当前帧中的各个块进行滤波时,可以切换块级滤波器,则执行602;若帧级滤波器切换标志位为0,表明块级滤波器不可切换,则执行S603。
S602、解析当前块对应的块级滤波器类型索引。
S602中,若块级滤波器类型索引为0,表明块级使用REGULAR类型滤波器,执行S605。若块级滤波器类型索引为1,表明块级使用SMOOTH类型滤波器,执行S606。若块级滤波器类型索引为2,表明块级使用SHARP类型滤波器,执行S607。
S603、继续解析当前帧中的帧级滤波器类型标志位,确定当前帧中的每个块共同使用的滤波器类型。
S604、将帧级滤波器类型标志位的值赋值给块级滤波器类型索引。
S604中,若块级滤波器类型索引为0,表明块级使用REGULAR类型滤波器,进入605。若块级滤波器类型索引为1,表明块级使用SMOOTH类型滤波器,执行S606。若块级滤波器类型索引为2,表明块级使用SHARP类型滤波器,执行S607。
S605、在当前块的宽小于或等于4的情况下,水平方向使用4抽头REGULAR滤波器;在当前块的宽大于4的情况下,水平方向使用6抽头REGULAR滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头REGULAR滤波器,在当前块的高大于4的情况下,垂直方向使用6抽头REGULAR滤波器。
S606、在当前块的宽小于或等于4的情况下,水平方向使用4抽头SMOOTH滤波器;在当前块的宽大于4的情况下,水平方向使用6抽头SMOOTH滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头SMOOTH滤波器;在当前块的高大于4的情况下,垂直方向使用6抽头SMOOTH滤波器。
S607、在当前块的宽小于或等于4的情况下,水平方向使用4抽头REGULAR滤波器;在当前块的宽大于4的情况下,水平方向使用12抽头SHARP滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头REGULAR滤波器;在当前块的高大于4的情况下,垂直方向使用12抽头SHARP滤波器。
在一些实施例中,基于本申请实施例提出的12抽头SHARP滤波器与8抽头REGULAR滤波器,解码器确定第一滤波器类型与第一滤波器的过程可以如图11所示,如下:
S701、解析当前帧对应的帧级滤波器切换标志位。
S701中,若帧级滤波器切换标志位为1,表明块级滤波器可切换,执行S702。若解析帧级滤波器切换标志位为0,表明块级滤波器不可切换,执行S703。
S702、解析当前块对应的块级滤波器类型索引。
S702中,若块级滤波器类型索引为0,表明块级使用REGULAR类型滤波器,执行S705。若块级滤波器类型索引为1,表明块级使用SMOOTH类型滤波器,执行S706。若块级滤波器类型索引为2,表明块级使用SHARP类型滤波器,执行S707。
S703、继续解析当前帧中的帧级滤波器类型标志位,确定当前帧中每个块共同使用的滤波器类型。
S704、将帧级滤波器类型标志位的值赋值给块级滤波器类型索引。
S704中,若块级滤波器类型索引为0,表明块级使用REGULAR类型滤波器,执行S705。若块级滤波器类型索引为1,表明块级使用SMOOTH类型滤波器,执行S706。若块级滤波器类型索引为2,表明块级使用SHARP类型滤波器,执行S707。
S705、在当前块的宽小于或等于4的情况下,水平方向使用4抽头REGULAR滤波器;在当前块的宽大于4的情况下,水平方向使用8抽头REGULAR滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头REGULAR滤波器;在当前块的高大于4的情况下,垂直方向使用8抽头REGULAR滤波器。
S706、在当前块的宽小于或等于4的情况下,水平方向使用4抽头SMOOTH滤波器;在当前块的宽大于4的情况下,水平方向使用6抽头SMOOTH滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头SMOOTH滤波器;在当前块的高大于4的情况下,垂直方向使用6抽头SMOOTH滤波器。
S707、在当前块的宽小于或等于4的情况下,水平方向使用4抽头REGULAR滤波器;在当前 块的宽大于4的情况下,水平方向使用12抽头SHARP滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头REGULAR滤波器;在当前块的高大于4的情况下,垂直方向使用12抽头SHARP滤波器。
在一些实施例中,基于本申请实施例提出的12抽头SHARP滤波器与8抽头REGULAR滤波器,结合上述的序列级滤波标志位,解码器确定第一滤波器类型与第一滤波器的过程可以如图12所示,如下:
S801、解析序列头中的序列级滤波标志位。
其中,序列级滤波标志位可以用use_longtap表示,其值为0或1。
S802、解析当前帧对应的帧级滤波器切换标志位。
S802中,若解析帧级滤波器切换标志位为1,表明块级滤波器可切换,执行S803。若解析帧级滤波器切换标志位为0,表明块级滤波器不可切换,执行S804。
S803、解析当前块对应的块级滤波器类型索引。
S803中,若块级滤波器类型索引为0,表明块级使用REGULAR类型滤波器,当序列级滤波标志位即use_longtap为0时,执行S806;当use_longtap为1时,执行S807。若块级滤波器类型索引为1,表明块级使用SMOOTH类型滤波器,执行S808。若块级滤波器类型索引为2,表明块级使用SHARP类型滤波器,执行S809。
S804、继续解析当前帧对应的帧级滤波器类型标志位,确定当前帧中每个块共同使用的滤波器类型。
S805、将帧级滤波器类型标志位的值赋值给块级滤波器类型索引。
S805中,若块级滤波器类型索引为0,表明块级使用REGULAR类型滤波器,当use_longtap为0时,执行S806;当use_longtap为1时,执行S807。若块级滤波器类型索引为1,表明块级使用SMOOTH类型滤波器,执行S808。若块级滤波器类型索引2,表明块级使用SHARP类型滤波器,执行S809。
S806、当前块水平垂直方向均使用4抽头REGULAR滤波器。
S807、在当前块的宽小于或等于4的情况下,水平方向使用4抽头REGULAR滤波器;在当前块的宽大于4的情况下,水平方向使用8抽头REGULAR滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头REGULAR滤波器;在当前块的高大于4的情况下,垂直方向使用8抽头REGULAR滤波器。
S808、在当前块的宽小于或等于4的情况下,水平方向使用4抽头SMOOTH滤波器;在当前块的宽大于4的情况下,水平方向使用6抽头SMOOTH滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头SMOOTH滤波器;在当前块的高大于4的情况下,垂直方向使用6抽头SMOOTH滤波器。
S809、在当前块的宽小于或等于4的情况下,水平方向使用4抽头REGULAR滤波器;在当前块的宽大于4的情况下,水平方向使用12抽头SHARP滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头REGULAR滤波器;在当前块的高大于4的情况下,垂直方向使用12抽头SHARP滤波器。
在一些实施例中,基于本申请实施例提出的12抽头SHARP滤波器与8抽头REGULAR滤波器,结合上述的第一帧级标志位,如屏幕内容编码工具标志位(allow_screen_content_tools),解码器确定的第一滤波器类型与第一滤波器的过程可以如图13所示,如下:
S901、解析当前帧中的屏幕内容编码工具标志位allow_screen_content_tools。
S902、解析当前帧对应的帧级滤波器切换标志位。
S902中,若帧级滤波器切换标志位为1,表明块级滤波器可切换,执行S903;若解析帧级滤波器切换标志位为0,表明块级滤波器不可切换,执行S904。
S903、解析当前块对应的块级滤波器类型索引。
S903中,若块级滤波器类型索引为0,表明块级使用REGULAR类型滤波器,当第一帧级标志位如allow_screen_content_tools为1时,执行S906;当第一帧级标志位如allow_screen_content_tools为0时,执行S907。若块级滤波器类型索引为1,表明块级使用SMOOTH类型滤波器,执行S908。若块级滤波器类型索引为2,表明块级使用SHARP类型滤波器,执行S909。
S904、继续解析当前帧对应的帧级滤波器类型标志位,确定当前帧中每个块共同使用的滤波器类型。
S905、将帧级滤波器类型标志位的值赋值给块级滤波器类型索引。
S905中,若块级滤波器类型索引为0,表明块级使用REGULAR类型滤波器,当use_longtap为0时,执行S906;当use_longtap为1时,进入步骤6。若块级滤波器类型索引为1,表明块级使用SMOOTH类型滤波器,执行S908。若块级滤波器类型索引为2,表明块级使用SHARP类型滤波器,执行S909。
S906、当前块水平垂直方向均使用4抽头REGULAR滤波器。
S907、在当前块的宽小于或等于4的情况下,水平方向使用4抽头REGULAR滤波器;在当前块的宽大于4的情况下,水平方向使用8抽头REGULAR滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头REGULAR滤波器;在当前块的高大于4的情况下,垂直方向使用8抽头REGULAR滤波器。
S908、在当前块的宽小于或等于4的情况下,水平方向使用4抽头SMOOTH滤波器;在当前块的宽大于4的情况下,水平方向使用6抽头SMOOTH滤波器。在当前块的高小于或等于4的情况下,则垂直方向使用4抽头SMOOTH滤波器;在当前块的高大于4的情况下,垂直方向使用6抽头SMOOTH滤波器。
S909、在当前块的宽小于或等于4的情况下,水平方向使用4抽头REGULAR滤波器;在当前块的宽大于4的情况下,水平方向使用12抽头SHARP滤波器。在当前块的高小于或等于4的情况下,垂直方向使用4抽头REGULAR滤波器;在当前块的高大于4的情况下,垂直方向使用12抽头SHARP滤波器。
可以理解的是,本申请实施例提出的阶数和系数改进的插值滤波器选择,结合序列级或帧级标志位进行自适应的滤波器抽头数的选择,可以提高滤波精度,进而提升编码性能。
在本申请的一实施例中,参见图14,其示出了本申请实施例提供的一种编码方法的流程示意图。该方法可以包括:
S1001、基于当前帧对应的参考帧,对当前块进行运动估计,确定当前块对应的参考块。
S1001中,编码器在对当前帧进行编码时,基于当前帧对应的参考帧,对当前块进行运动估计,确定当前块对应的运动矢量,根据当前块对应的运动矢量,在参考帧中确定当前块对应的参考块。这里,编码器根据当前块对应的运动矢量,在参考帧中确定当前块对应的参考块与解码器S102中的相关过程描述一致,此处不再赘述。
S1002、确定当前块对应的第一滤波器类型,并确定第一滤波器类型对应的第一滤波器;第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器。
S1002中,编码器可以根据编码代价,确定当前块对应的第一滤波器类型。在一些实施例中,编码代价可以是率失真代价。编码器可以根据至少一种滤波器类型,对当前块进行插值滤波,确定当前块在至少一种滤波器类型下的至少一个率失真代价,并根据至少一个率失真代价,确定当前块对应的第一滤波器类型。示例性地,将率失真代价最小的滤波器类型作为第一滤波器类型。
需要说明的是,编码器中的第一滤波器与解码器中的第一滤波器含义相同,同样地,至少12抽头的锐化滤波器包括:至少12个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第一滤波系数;第一滤波系数通过第一预设抽样函数对随机信号进行处理,并将处理得到的第一处理结果归一化至预设比特深度对应的预设系数区间得到。至少8抽头的常规滤波器包括:至少8个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第二滤波系数;第二滤波系数通过第二预设抽样函数对随机信号进行处理,并将处理得到的第二处理结果归一化至预设系数区间得到。这里,像素位置包括整像素的像素位置与亚像素的像素位置。
示例性地,12抽头的锐化滤波器的滤波系数如表1所示,8抽头的常规滤波器的滤波系数如表2所示。
在一些实施例中,S1002中确定第一滤波器类型对应的第一滤波器,包括:根据当前块的尺寸,确定第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器。
在一些实施例中,第一滤波器类型包括以下任一个:锐化滤波器类型、常规滤波器类型、平滑滤波器类型;至少一个预设滤波方向包括:水平方向与垂直方向;上述根据当前块的尺寸,确定第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:在当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值的情况下,将第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的第一滤波器;第一抽头数滤波器包括以下任一个:至少12抽头的锐化滤波器、至少8抽头的常规滤波器、6抽头的平滑滤波器。
在一些实施例中,上述根据当前块的尺寸,确定第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器的过程,包括:在当前块在水平方向上的尺寸小于或等于预设尺寸阈值,或者,在 当前块在垂直方向上的尺寸小于或等于预设尺寸阈值的情况下,将第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的第一滤波器;第二抽头数小于第一抽头数。
在一些实施例中,上述根据当前块的尺寸,确定第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:在当前块在水平方向上的尺寸大于预设尺寸阈值,或者,在垂直方向上的尺寸大于预设尺寸阈值情况下,将第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的第一滤波器。
在一些实施例中,上述根据当前块的尺寸,确定第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:在当前块在水平方向与垂直方向上的尺寸小于或等于预设尺寸阈值的情况下,将第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的第一滤波器。
这里,编码器确定第一滤波器类型对应的第一滤波器的上述方法与解码器中的相同方法过程描述一致,此处不再赘述。
S1003、利用第一滤波器,基于参考块进行像素值预测与运动补偿,确定当前块对应的预测图像块。
S1003中,编码器利用第一滤波器,对参考块进行像素插值滤波,得到参考块对应的预测像素,根据预测像素对参考块进行运动补偿,得到当前块对应的预测图像块。这里,运动补偿的过程与解码器侧S104中的过程描述一致,此处不再赘述。
可以理解的是,解码器利用至少12抽头的锐化滤波器,或者至少8抽头的常规滤波器,对当前块对应的参考块进行像素值预测与运动补偿,相较于目前的低阶数插值滤波器,提高了滤波精度,以及利用滤波器进行像素值预测的预测精度,从而提高了运动补偿的准确性和编码准确性,进而提高了编码性能。
在一些实施例中,编码器在S1003中,确定当前块对应的预测图像块之后,还可以对当前帧中的下一块继续进行滤波处理,直至对当前帧处理完成,根据当前帧中每一块对应的预测图像块,确定当前帧对应的编码信息;对当前视频序列中的下一帧继续进行编码,确定下一帧对应的编码信息,直至对当前视频序列处理完成,确定当前视频序列中每一帧对应的编码信息。
在一些实施例中,编码器可以确定当前视频序列对应的序列级滤波标志位;序列级滤波标志位用于指示解码器是否在当前视频序列中使能常规滤波器类型中的第一抽头数滤波器;根据序列级滤波标志位与每一帧对应的编码信息,确定当前视频序列对应的码流信息。这里,编码器将序列级滤波标志位与当前视频序列中每一帧对应的编码信息编入码流,发送给解码器,以使解码器通过S401或S402的过程对码流中当前视频序列对应的序列级滤波标志位进行解析,并确定解码器对当前块使用的第一滤波器。
在一些实施例中,编码器在S1003中,确定当前块对应的预测图像块之后,还可以对当前帧中的下一块继续进行滤波处理,直至对当前帧处理完成,根据当前帧中每一块对应的预测图像块,确定当前帧对应的编码信息;编码器确定当前帧对应的第一帧级标志位;第一帧级标志位用于指示解码器是否在当前帧中使能常规滤波器类型中的第一抽头数滤波器;根据第一帧级标志位与当前帧对应的编码信息,确定当前帧对应的码流信息。这里,编码器将第一帧级标志位与当前帧对应的编码信息编入码流,发送给解码器,以使解码器通过S501或S502的过程对码流中当前帧对应的第一帧级标志位进行解析,并确定解码器对当前块使用的第一滤波器。
基于前述实施例的实现基础,如图15所示,本申请实施例提供了一种解码器1,包括:
解析部分10,配置为解析码流,确定当前块对应的运动矢量,以及所述当前块对应的第一滤波器类型;
第一运动估计部分11,配置为基于所述运动矢量,确定所述当前块对应的参考块;
第一确定部分12,配置为确定所述第一滤波器类型对应的第一滤波器;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器;
第一运动补偿部分13,配置为利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块。
在本申请的一些实施例中,所述第一确定部分12,还配置为根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器。
在本申请的一些实施例中,所述第一滤波器类型包括以下任一个:锐化滤波器类型、常规滤波器类型、平滑滤波器类型;所述至少一个预设滤波方向包括:水平方向与垂直方向;所述第一确定部分12,还配置为在所述当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值的情况下,将所述第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器;所述第 一抽头数滤波器包括以下任一个:所述至少12抽头的锐化滤波器、所述至少8抽头的常规滤波器、6抽头的平滑滤波器。
在本申请的一些实施例中,所述第一确定部分12,还配置为在所述当前块在水平方向上的尺寸小于或等于所述预设尺寸阈值,或者,在所述当前块在垂直方向上的尺寸小于或等于所述预设尺寸阈值的情况下,将所述第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器;第二抽头数小于第一抽头数。
在本申请的一些实施例中,所述第一确定部分12,还配置为在所述当前块在水平方向上的尺寸大于预设尺寸阈值,或者,在垂直方向上的尺寸大于所述预设尺寸阈值情况下,将所述第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器。
在本申请的一些实施例中,所述第一确定部分12,还配置为在所述当前块在水平方向与垂直方向上的尺寸小于或等于所述预设尺寸阈值的情况下,将所述第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器。
在本申请的一些实施例中,所述利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块之前,所述解析部分10,还配置为解析所述码流中的当前视频序列,确定序列级滤波标志位;所述第一确定部分12,还配置为在序列级滤波标志位为第一预设值,且所述第一滤波器类型为所述常规滤波器类型的情况下,根据所述当前块的尺寸,确定所述常规滤波器类型在至少一个预设滤波方向上对应的第一滤波器;在所述序列级滤波标志位为第二预设值,且所述第一滤波器类型为所述常规滤波器类型的情况下,将所述常规滤波器类型中的第二抽头数滤波器确定为所述至少一个预设滤波方向上对应的第一滤波器。
在本申请的一些实施例中,所述利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块之前,所述解析部分10,还配置为通过解析所述码流中的当前帧,确定第一帧级标志位;所述第一确定部分12,还配置为在所述第一帧级标志位为第三预设值,且所述第一滤波器类型为所述常规滤波器类型的情况下,根据所述当前块的尺寸,确定所述常规滤波器类型在至少一个预设滤波方向上对应的第一滤波器;在所述第一帧级标志位为第四预设值,且所述第一滤波器类型为所述常规滤波器类型的情况下,将所述常规滤波器类型中的第二抽头数滤波器确定为所述至少一个预设滤波方向上对应的第一滤波器。
在本申请的一些实施例中,所述至少12抽头的锐化滤波器包括:至少12个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第一滤波系数;所述第一滤波系数通过第一预设抽样函数对随机信号进行处理,并将处理得到的第一处理结果归一化至预设比特深度对应的预设系数区间得到;所述至少8抽头的常规滤波器包括:至少8个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第二滤波系数;所述第二滤波系数通过第二预设抽样函数对随机信号进行处理,并将处理得到的第二处理结果归一化至所述预设系数区间得到。
在本申请的实际应用中,如图16所示,本申请实施例还提供了一种解码器,包括:
第一存储器14和第一处理器15;
所述第一存储器14存储有可在第一处理器15上运行的计算机程序,所述第一处理器15执行所述程序时实现本申请实施例提供的视频解码方法。
其中,第一处理器15可以通过软件、硬件、固件或者其组合实现,可以使用电路、单个或多个专用集成电路(application specific integrated circuits,ASIC)、单个或多个通用集成电路、单个或多个微处理器、单个或多个可编程逻辑器件、或者前述电路或器件的组合、或者其他适合的电路或器件,从而使得该第一处理器15可以执行本申请实施例提供的视频解码方法的相应步骤。
需要说明的是,以上解码器实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本发明解码器实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解。
本申请实施例提供了一种编码器2,如图17所示,包括:
第二运动估计部分20,配置为基于当前帧对应的参考帧,对当前块进行运动估计,确定所述当前块对应的参考块;
第二确定部分21,配置为确定所述当前块对应的第一滤波器类型,并确定所述第一滤波器类型对应的第一滤波器;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器;
第二运动补偿部分22,配置为利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块。
在本申请的一些实施例中,所述第二确定部分21,还配置为根据至少一种滤波器类型对应的至少一个失真代价,确定所述当前块对应的第一滤波器类型。
在本申请的一些实施例中,所述第二确定部分21,还配置为根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器。
在本申请的一些实施例中,所述第一滤波器类型包括以下任一个:锐化滤波器类型、常规滤波器类型、平滑滤波器类型;所述至少一个预设滤波方向包括:水平方向与垂直方向;所述第二确定部分21,还配置为在所述当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值的情况下,将所述第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器;所述第一抽头数滤波器包括以下任一个:所述至少12抽头的锐化滤波器、所述至少8抽头的常规滤波器、6抽头的平滑滤波器。
在本申请的一些实施例中,所述第二确定部分21,还配置为在所述当前块在水平方向上的尺寸小于或等于所述预设尺寸阈值,或者,在所述当前块在垂直方向上的尺寸小于或等于所述预设尺寸阈值的情况下,将所述第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器;第二抽头数小于第一抽头数。
在本申请的一些实施例中,所述第二确定部分21,还配置为在所述当前块在水平方向上的尺寸大于预设尺寸阈值,或者,在垂直方向上的尺寸大于所述预设尺寸阈值情况下,将所述第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器。
在本申请的一些实施例中,所述第二确定部分21,还配置为在所述当前块在水平方向与垂直方向上的尺寸小于或等于所述预设尺寸阈值的情况下,将所述第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器。
在本申请的一些实施例中,所述确定所述当前块对应的预测图像块之后,所述编码器2还包括编码部分,所述编码部分,配置为对所述当前帧中的下一块继续进行滤波处理,直至对所述当前帧处理完成,根据所述当前帧中每一块对应的预测图像块,确定所述当前帧对应的编码信息;对当前视频序列中的下一帧继续进行编码,确定所述下一帧对应的编码信息,直至对所述当前视频序列处理完成,确定所述当前视频序列中每一帧对应的编码信息;所述第二确定部分21,还配置为确定所述当前视频序列对应的序列级滤波标志位;所述序列级滤波标志位用于指示解码器是否在所述当前视频序列中使能所述常规滤波器类型中的第一抽头数滤波器;所述编码部分,还配置为根据所述序列级滤波标志位与所述每一帧对应的编码信息,确定所述当前视频序列对应的码流信息。
在本申请的一些实施例中,所述确定所述当前块对应的预测图像块之后,所述编码部分,配置为对所述当前帧中的下一块继续进行滤波处理,直至对所述当前帧处理完成,根据所述当前帧中每一块对应的预测图像块,确定所述当前帧对应的编码信息;所述第二确定部分21,还配置为确定所述当前帧对应的第一帧级标志位;所述第一帧级标志位用于指示解码器是否在所述当前帧中使能所述常规滤波器类型中的第一抽头数滤波器;所述编码部分,还配置为根据所述第一帧级标志位与所述当前帧对应的编码信息,确定所述当前帧对应的码流信息。
在本申请的一些实施例中,所述至少12抽头的锐化滤波器包括:至少12个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第一滤波系数;所述第一滤波系数通过第一预设抽样函数对随机信号进行处理,并将处理得到的第一处理结果归一化至预设比特深度对应的预设系数区间得到;所述至少8抽头的常规滤波器包括:至少8个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第二滤波系数;所述第二滤波系数通过第二预设抽样函数对随机信号进行处理,并将处理得到的第二处理结果归一化至所述预设系数区间得到。
在实际应用中,如图18所示,本申请实施例还提供了一种编码器,包括:
第二存储器25和第二处理器26;
所述第二存储器25存储有可在第二处理器26上运行的计算机程序,所述第二处理器26执行所述程序时实现本申请实施例提供的视频编码方法。
需要说明的是,以上编码器实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本发明编码器实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解。
本申请实施例提供了一种码流,所述码流是根据待编码信息进行比特编码生成的;其中,待编码信息基于当前块对应的预测图像块确定;所述当前块对应的预测图像块通过所述当前块对应的第一滤波器,基于所述当前块对应的参考块进行像素值预测与运动补偿得到;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器。
本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被第一处理器执行时,实现本申请实施例提供的视频解码方法;或者,该计算机程序被第二处理器执行时,实现本申请实施例提供的视频编码方法。
在本申请实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的计算机可读存储介质包括:磁性随机存取存储器(FRAM,ferromagnetic random access memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory)等各种可以存储程序代码的介质,本公开实施例不作限制。
以上所述,仅为本申请的实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例提供了一种视频编解码方法、解码器、编码器及计算机可读存储介质,解码器和编码器可以利用至少12抽头的锐化滤波器,或者至少8抽头的常规滤波器,对当前块对应的参考块进行像素值预测与运动补偿,相较于目前的低阶数插值滤波器,提高了滤波精度,以及利用滤波器进行像素值预测的预测精度,从而提高了运动补偿的准确性和编解码准确性,进而提高了编解码性能。并且,根据当前块的尺寸,确定第一滤波类型下对应抽头数的滤波器,对当前块在水平方向与垂直方向上进行滤波,可以提高像素值预测的精度,进一步提高了编解码准确性和编解码性能。并且,通过解析序列级的标志位或帧级的标志位,确定第一滤波器类型下对应抽头数的滤波器,可以结合更多的指示信息,来确定运动补偿过程对应的滤波器,从而提高了滤波预测的准确性,提高了编解码性能。

Claims (25)

  1. 一种视频解码方法,包括:
    解析码流,确定当前块对应的运动矢量,以及所述当前块对应的第一滤波器类型;
    基于所述运动矢量,确定所述当前块对应的参考块;
    确定所述第一滤波器类型对应的第一滤波器;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器;
    利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块。
  2. 根据权利要求1所述的方法,其中,所述确定所述第一滤波器类型对应的第一滤波器,包括:
    根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器。
  3. 根据权利要求2所述的方法,其中,所述第一滤波器类型包括以下任一个:锐化滤波器类型、常规滤波器类型、平滑滤波器类型;所述至少一个预设滤波方向包括:水平方向与垂直方向;所述根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:
    在所述当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值的情况下,将所述第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器;所述第一抽头数滤波器包括以下任一个:所述至少12抽头的锐化滤波器、所述至少8抽头的常规滤波器、6抽头的平滑滤波器。
  4. 根据权利要求2所述的方法,其中,所述根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:
    在所述当前块在水平方向上的尺寸小于或等于所述预设尺寸阈值,或者,在所述当前块在垂直方向上的尺寸小于或等于所述预设尺寸阈值的情况下,将所述第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器;第二抽头数小于第一抽头数。
  5. 根据权利要求2所述的方法,其中,所述根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:
    在所述当前块在水平方向上的尺寸大于预设尺寸阈值,或者,在垂直方向上的尺寸大于所述预设尺寸阈值情况下,将所述第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器。
  6. 根据权利要求2所述的方法,其中,所述根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:
    在所述当前块在水平方向与垂直方向上的尺寸小于或等于所述预设尺寸阈值的情况下,将所述第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器。
  7. 根据权利要求1-6任一项所述的方法,其中,所述利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块之前,所述方法还包括:
    解析所述码流中的当前视频序列,确定序列级滤波标志位;
    所述确定所述第一滤波器类型对应的第一滤波器,包括:
    在序列级滤波标志位为第一预设值,且所述第一滤波器类型为所述常规滤波器类型的情况下,根据所述当前块的尺寸,确定所述常规滤波器类型在至少一个预设滤波方向上对应的第一滤波器;
    在所述序列级滤波标志位为第二预设值,且所述第一滤波器类型为所述常规滤波器类型的情况下,将所述常规滤波器类型中的第二抽头数滤波器确定为所述至少一个预设滤波方向上对应的第一滤波器。
  8. 根据权利要求1-6任一项所述的方法,其中,所述利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块之前,所述方法还包括:
    解析所述码流中的当前帧,确定第一帧级标志位;
    所述确定所述第一滤波器类型对应的第一滤波器,包括:
    在所述第一帧级标志位为第三预设值,且所述第一滤波器类型为所述常规滤波器类型的情况下,根据所述当前块的尺寸,确定所述常规滤波器类型在至少一个预设滤波方向上对应的第一滤波器;
    在所述第一帧级标志位为第四预设值,且所述第一滤波器类型为所述常规滤波器类型的情况下,将所述常规滤波器类型中的第二抽头数滤波器确定为所述至少一个预设滤波方向上对应的第一滤波器。
  9. 根据权利要求1-6任一项所述的方法,其中,
    所述至少12抽头的锐化滤波器包括:至少12个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第一滤波系数;所述第一滤波系数通过第一预设抽样函数对随机信号进行处理,并将处理得到的第一处理结果归一化至预设比特深度对应的预设系数区间得到;
    所述至少8抽头的常规滤波器包括:至少8个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第二滤波系数;所述第二滤波系数通过第二预设抽样函数对随机信号进行处理,并将处理得到的第二处理结果归一化至所述预设系数区间得到。
  10. 一种视频编码方法,包括:
    基于当前帧对应的参考帧,对当前块进行运动估计,确定所述当前块对应的参考块;
    确定所述当前块对应的第一滤波器类型,并确定所述第一滤波器类型对应的第一滤波器;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器;
    利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块。
  11. 根据权利要求10所述的方法,其中,所述确定所述当前块对应的第一滤波器类型,包括:
    根据至少一种滤波器类型对应的至少一个失真代价,确定所述当前块对应的第一滤波器类型。
  12. 根据权利要求10或11所述的方法,其中,所述确定所述第一滤波器类型对应的第一滤波器,包括:
    根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器。
  13. 根据权利要求12所述的方法,其中,所述第一滤波器类型包括以下任一个:锐化滤波器类型、常规滤波器类型、平滑滤波器类型;所述至少一个预设滤波方向包括:水平方向与垂直方向;所述根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:
    在所述当前块在水平方向与垂直方向上的尺寸大于预设尺寸阈值的情况下,将所述第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器;所述第一抽头数滤波器包括以下任一个:所述至少12抽头的锐化滤波器、所述至少8抽头的常规滤波器、6抽头的平滑滤波器。
  14. 根据权利要求12所述的方法,其中,所述根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:
    在所述当前块在水平方向上的尺寸小于或等于所述预设尺寸阈值,或者,在所述当前块在垂直方向上的尺寸小于或等于所述预设尺寸阈值的情况下,将所述第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器;第二抽头数小于第一抽头数。
  15. 根据权利要求12所述的方法,其中,所述根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:
    在所述当前块在水平方向上的尺寸大于预设尺寸阈值,或者,在垂直方向上的尺寸大于所述预设尺寸阈值情况下,将所述第一滤波器类型中的第一抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器。
  16. 根据权利要求12所述的方法,其中,所述根据所述当前块的尺寸,确定所述第一滤波器类型在至少一个预设滤波方向上对应的第一滤波器,包括:
    在所述当前块在水平方向与垂直方向上的尺寸小于或等于所述预设尺寸阈值的情况下,将所述第一滤波器类型中的第二抽头数滤波器确定为水平方向与垂直方向上的所述第一滤波器。
  17. 根据权利要求10、11、13-16中任一项所述的方法,其中,所述确定所述当前块对应的预测图像块之后,所述方法还包括:
    对所述当前帧中的下一块继续进行滤波处理,直至对所述当前帧处理完成,根据所述当前帧中每一块对应的预测图像块,确定所述当前帧对应的编码信息;
    对当前视频序列中的下一帧继续进行编码,确定所述下一帧对应的编码信息,直至对所述当前视频序列处理完成,确定所述当前视频序列中每一帧对应的编码信息;
    确定所述当前视频序列对应的序列级滤波标志位;所述序列级滤波标志位用于指示解码器是否 在所述当前视频序列中使能所述常规滤波器类型中的第一抽头数滤波器;
    根据所述序列级滤波标志位与所述每一帧对应的编码信息,确定所述当前视频序列对应的码流信息。
  18. 根据权利要求10、11、13-16中任一项所述的方法,其中,所述确定所述当前块对应的预测图像块之后,所述方法还包括:
    对所述当前帧中的下一块继续进行滤波处理,直至对所述当前帧处理完成,根据所述当前帧中每一块对应的预测图像块,确定所述当前帧对应的编码信息;
    确定所述当前帧对应的第一帧级标志位;所述第一帧级标志位用于指示解码器是否在所述当前帧中使能所述常规滤波器类型中的第一抽头数滤波器;
    根据所述第一帧级标志位与所述当前帧对应的编码信息,确定所述当前帧对应的码流信息。
  19. 根据权利要求10、11、13-16中任一项所述的方法,其中,
    所述至少12抽头的锐化滤波器包括:至少12个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第一滤波系数;所述第一滤波系数通过第一预设抽样函数对随机信号进行处理,并将处理得到的第一处理结果归一化至预设比特深度对应的预设系数区间得到;
    所述至少8抽头的常规滤波器包括:至少8个抽头中的每个抽头在至少一个像素位置的每个像素位置上对应的第二滤波系数;所述第二滤波系数通过第二预设抽样函数对随机信号进行处理,并将处理得到的第二处理结果归一化至所述预设系数区间得到。
  20. 一种解码器,包括:
    解析部分,配置为解析码流,确定当前块对应的运动矢量,以及所述当前块对应的第一滤波器类型;
    第一运动估计部分,配置为基于所述运动矢量,确定所述当前块对应的参考块;
    第一确定部分,配置为确定所述第一滤波器类型对应的第一滤波器;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器;
    第一运动补偿部分,配置为利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块。
  21. 一种编码器,包括:
    第二运动估计部分,配置为基于当前帧对应的参考帧,对当前块进行运动估计,确定所述当前块对应的参考块;
    第二确定部分,配置为确定所述当前块对应的第一滤波器类型,并确定所述第一滤波器类型对应的第一滤波器;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器;
    第二运动补偿部分,配置为利用第一滤波器,基于所述参考块进行像素值预测与运动补偿,确定所述当前块对应的预测图像块。
  22. 一种解码器,包括:
    第一存储器,用于存储可执行指令;
    第一处理器,用于执行所述第一存储器中存储的可执行指令时,实现权利要求1至9中任一项所述的方法。
  23. 一种编码器,包括:
    第二存储器,用于存储可执行指令;
    第二处理器,用于执行所述第二存储器中存储的可执行指令时,实现权利要求10至19中任一项所述的方法。
  24. 一种码流,所述码流是根据待编码信息进行比特编码生成的;其中,待编码信息基于当前块对应的预测图像块确定;所述当前块对应的预测图像块通过所述当前块对应的第一滤波器,基于所述当前块对应的参考块进行像素值预测与运动补偿得到;所述第一滤波器至少包括:至少12抽头的锐化滤波器或至少8抽头的常规滤波器。
  25. 一种计算机可读存储介质,存储有可执行指令,用于引起第一处理器执行时,实现权利要求1至9中任一项所述的方法,或者,用于引起第二处理器执行时,实现权利要求10至19中任一项所述的方法。
PCT/CN2022/137973 2022-12-09 2022-12-09 视频编解码方法、解码器、编码器及计算机可读存储介质 WO2024119488A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/137973 WO2024119488A1 (zh) 2022-12-09 2022-12-09 视频编解码方法、解码器、编码器及计算机可读存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/137973 WO2024119488A1 (zh) 2022-12-09 2022-12-09 视频编解码方法、解码器、编码器及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2024119488A1 true WO2024119488A1 (zh) 2024-06-13

Family

ID=91378265

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/137973 WO2024119488A1 (zh) 2022-12-09 2022-12-09 视频编解码方法、解码器、编码器及计算机可读存储介质

Country Status (1)

Country Link
WO (1) WO2024119488A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106604030A (zh) * 2015-10-16 2017-04-26 中兴通讯股份有限公司 参考图像的处理方法及装置、编码器以及解码器
WO2020013673A1 (ko) * 2018-07-13 2020-01-16 엘지전자 주식회사 Dmvr에 기반하여 인터 예측을 수행하는 방법 및 장치
CN111010568A (zh) * 2018-10-06 2020-04-14 华为技术有限公司 插值滤波器的训练方法、装置及视频图像编解码方法、编解码器
CN111837388A (zh) * 2018-03-09 2020-10-27 韩国电子通信研究院 使用样点滤波的图像编码/解码方法和设备
US20200374562A1 (en) * 2018-01-15 2020-11-26 Samsung Electronics Co., Ltd. Encoding method and apparatus therefor, and decoding method and apparatus therefor
CN113056909A (zh) * 2018-12-31 2021-06-29 松下电器(美国)知识产权公司 编码装置、解码装置、编码方法和解码方法
CN113475078A (zh) * 2019-01-08 2021-10-01 腾讯美国有限责任公司 用于小帧间块的存储器带宽减小的方法和装置
CN115442599A (zh) * 2017-10-20 2022-12-06 韩国电子通信研究院 图像编码、解码方法以及存储比特流的记录介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106604030A (zh) * 2015-10-16 2017-04-26 中兴通讯股份有限公司 参考图像的处理方法及装置、编码器以及解码器
CN115442599A (zh) * 2017-10-20 2022-12-06 韩国电子通信研究院 图像编码、解码方法以及存储比特流的记录介质
US20200374562A1 (en) * 2018-01-15 2020-11-26 Samsung Electronics Co., Ltd. Encoding method and apparatus therefor, and decoding method and apparatus therefor
CN111837388A (zh) * 2018-03-09 2020-10-27 韩国电子通信研究院 使用样点滤波的图像编码/解码方法和设备
WO2020013673A1 (ko) * 2018-07-13 2020-01-16 엘지전자 주식회사 Dmvr에 기반하여 인터 예측을 수행하는 방법 및 장치
CN111010568A (zh) * 2018-10-06 2020-04-14 华为技术有限公司 插值滤波器的训练方法、装置及视频图像编解码方法、编解码器
CN113056909A (zh) * 2018-12-31 2021-06-29 松下电器(美国)知识产权公司 编码装置、解码装置、编码方法和解码方法
CN113475078A (zh) * 2019-01-08 2021-10-01 腾讯美国有限责任公司 用于小帧间块的存储器带宽减小的方法和装置

Similar Documents

Publication Publication Date Title
JP7233218B2 (ja) ビデオコーディングのためにブロックの複数のクラスのためのフィルタをマージすること
JP2021106403A (ja) 映像デコード方法、映像エンコード方法および記録媒体
JP5378791B2 (ja) 適応補間を使用する映像符号化及び復号化の方法と装置
JP6081499B2 (ja) 変換係数コーディングのためのコンテキスト導出における走査ベーススライディングウィンドウ
JP7554249B2 (ja) 双方向オプティカルフローに対するビット幅制御
JP2017513326A (ja) ピクセル距離を使用したデブロックフィルタ処理
JP2017513342A (ja) ゼロアウトされた係数を使用した低複雑な順変換のためのシステムおよび方法
US20200244965A1 (en) Interpolation filter for an inter prediction apparatus and method for video coding
KR101747122B1 (ko) 모션 보상 예측을 위한 방법 및 장치
JP7439841B2 (ja) ループ内フィルタリングの方法及びループ内フィルタリングの装置
JP2022516808A (ja) クロスコンポーネント線形モデルを用いたビデオコーディング
JP2014507868A (ja) 算術符号化及び終了のための方法及び装置
CN116614622A (zh) 解码预测方法、装置及计算机存储介质
CN113992914B (zh) 帧间预测方法及装置、设备、存储介质
JP2017514353A (ja) メッシュベースの計算を使用した低複雑な順変換のためのシステムおよび方法
US20140044167A1 (en) Video encoding apparatus and method using rate distortion optimization
WO2024119488A1 (zh) 视频编解码方法、解码器、编码器及计算机可读存储介质
TW202408228A (zh) 濾波方法、編碼器、解碼器、碼流以及儲存媒介
JPH06225276A (ja) 動画像符号化におけるプリフィルタ制御方法および装置
AU2019357929A1 (en) Video image component prediction method and apparatus, and computer storage medium
JP7387806B2 (ja) 画像復号装置、画像復号方法及びプログラム
KR101443865B1 (ko) 인터 예측 방법 및 장치
US20210344924A1 (en) Method for processing information, encoder and decoder
WO2024145849A1 (zh) 视频编解码方法、解码器、编码器及计算机可读存储介质
CN111953972A (zh) IBC模式下的Hash表构建方法、装置、设备

Legal Events

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

Ref document number: 22967636

Country of ref document: EP

Kind code of ref document: A1