WO2023130899A1 - 环路滤波方法、视频编解码方法、装置、介质及电子设备 - Google Patents

环路滤波方法、视频编解码方法、装置、介质及电子设备 Download PDF

Info

Publication number
WO2023130899A1
WO2023130899A1 PCT/CN2022/137908 CN2022137908W WO2023130899A1 WO 2023130899 A1 WO2023130899 A1 WO 2023130899A1 CN 2022137908 W CN2022137908 W CN 2022137908W WO 2023130899 A1 WO2023130899 A1 WO 2023130899A1
Authority
WO
WIPO (PCT)
Prior art keywords
component
loop filtering
adaptive loop
alf
chrominance
Prior art date
Application number
PCT/CN2022/137908
Other languages
English (en)
French (fr)
Inventor
张瀚
张洪彬
匡伟
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2023130899A1 publication Critical patent/WO2023130899A1/zh
Priority to US18/498,611 priority Critical patent/US20240064298A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field

Definitions

  • the present application relates to the field of computer and communication technologies, and in particular, to a loop filtering method, a video encoding and decoding method, device, medium and electronic equipment.
  • Cross-Component Adaptive Loop Filtering is a Wiener filter that can be adaptively generated and used according to the characteristics of video content (such as game videos, online conference videos, etc.) different filter coefficients.
  • filter coefficients need to be adaptively selected by classification, but there is often a problem of low classification accuracy, resulting in poor performance in cross-component adaptive loop filtering.
  • a loop filtering method, video encoding and decoding method, device, medium and electronic equipment are provided.
  • a loop filtering method which is executed by a video encoding device or a video decoding device, the method comprising: acquiring the brightness component in a video image frame when performing adaptive loop filtering Block classification information; according to the block classification information of the luminance component when performing adaptive loop filtering, determine the block classification information of the chrominance component in the video image frame when performing cross-component adaptive loop filtering; and according to The block classification information of the chrominance component when cross-component adaptive loop filtering is performed, and the corresponding filter coefficients are selected to perform cross-component adaptive loop filtering processing on the chrominance component.
  • a video decoding method executed by a video decoding device comprising: acquiring block classification information of a luminance component in a video image frame when adaptive loop filtering is performed; according to The block classification information of the luminance component when performing adaptive loop filtering is used to determine the block classification information of the chrominance components in the video image frame when performing cross-component adaptive loop filtering; according to the chrominance components in the Selecting the corresponding filter coefficients to perform cross-component adaptive loop filtering processing on the chroma component based on the block classification information when performing cross-component adaptive loop filtering; and according to the processing result of the adaptive loop filtering of the luminance component , and the cross-component adaptive loop filtering processing result of the chrominance component, and decode the video code stream.
  • a video coding method which is executed by a video coding device, and the method includes: acquiring block classification information of a luminance component in a video image frame when adaptive loop filtering is performed; according to The block classification information of the luminance component when performing adaptive loop filtering is used to determine the block classification information of the chrominance components in the video image frame when performing cross-component adaptive loop filtering; according to the chrominance components in the Selecting the corresponding filter coefficients to perform cross-component adaptive loop filtering processing on the chroma component based on the block classification information when performing cross-component adaptive loop filtering; and according to the processing result of the adaptive loop filtering of the luminance component , and the cross-component adaptive loop filtering process of the chrominance component, encoding the video image frame to obtain a video code stream.
  • a loop filtering device including: an acquisition unit configured to acquire block classification information of a luminance component in a video image frame when adaptive loop filtering is performed
  • the determination unit is configured to determine, according to the block classification information of the luminance component when performing adaptive loop filtering, that the chroma component in the video image frame is performing cross-component adaptive loop filtering and cross-component adaptive loop filtering Block classification information during filtering;
  • the filtering unit is configured to select corresponding filter coefficients to perform cross-component adaptation on the chroma component according to the block classification information of the chroma component when performing cross-component adaptive loop filtering loop filter processing.
  • a video decoding device including: an acquisition unit configured to acquire block classification information of a luminance component in a video image frame when adaptive loop filtering is performed; a determination unit configured to According to the block classification information of the luminance component when performing adaptive loop filtering, determine the block classification information of the chroma component in the video image frame when performing cross-component adaptive loop filtering; the filtering unit is configured according to The block classification information of the chrominance component when performing cross-component adaptive loop filtering, selects the corresponding filter coefficient to perform cross-component adaptive loop filtering processing on the chrominance component; the first processing unit is configured according to The processing result of the adaptive loop filtering of the luminance component and the processing result of the cross-component adaptive loop filtering of the chrominance component are used to decode the video code stream.
  • a video encoding device including: an acquisition unit configured to acquire block classification information of a luminance component in a video image frame when adaptive loop filtering is performed; a determination unit configured to According to the block classification information of the luminance component when performing adaptive loop filtering, determine the block classification information of the chroma component in the video image frame when performing cross-component adaptive loop filtering; the filtering unit is configured according to The block classification information of the chrominance component when performing cross-component adaptive loop filtering, selects the corresponding filter coefficient to perform cross-component adaptive loop filtering processing on the chrominance component; the second processing unit is configured according to The adaptive loop filtering processing result of the luminance component and the cross-component adaptive loop filtering processing of the chrominance component encode the video image frame to obtain a video code stream.
  • an electronic device includes a memory and a processor, the memory stores computer-readable instructions, and the processor implements the above-mentioned Methods provided in various alternative embodiments.
  • a computer storage medium has computer-readable instructions stored thereon.
  • the computer-readable instructions are executed by a processor, the above-mentioned various optional Methods provided in the Examples.
  • a computer program product includes computer-readable instructions, and when the computer-readable instructions are executed by a processor, the above-mentioned various optional embodiments provide method.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied;
  • FIG. 2 shows a schematic diagram of a placement manner of a video encoding device and a video decoding device in a streaming system
  • Figure 3 shows a basic flow diagram of a video encoder
  • Fig. 4 shows the overall structure of VVC and the schematic diagram of loop filtering process
  • Figure 5 shows a schematic diagram of the flow of CC-ALF and the relationship with ALF
  • Fig. 6 shows a schematic diagram of a diamond filter
  • FIG. 7 shows a flow chart of a ring filtering method according to an embodiment of the present application.
  • FIG. 8 shows a flowchart of a video encoding method according to an embodiment of the present application
  • FIG. 9 shows a flowchart of a video decoding method according to an embodiment of the present application.
  • FIG. 10 shows a block diagram of a loop filtering device according to an embodiment of the present application.
  • Fig. 11 shows a block diagram of a video decoding device according to an embodiment of the present application.
  • FIG. 12 shows a block diagram of a video encoding device according to an embodiment of the present application.
  • Fig. 13 shows a schematic structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present application.
  • the "plurality” mentioned in this article refers to two or more than two.
  • “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships. For example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character “/” generally indicates that the contextual objects are an "or” relationship.
  • Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
  • the system architecture 100 includes a plurality of end devices that can communicate with each other through, for example, a network 150 .
  • the system architecture 100 may include a first terminal device 110 and a second terminal device 120 interconnected by a network 150 .
  • the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission.
  • the first terminal device 110 can encode video data (such as a video picture stream collected by the terminal device 110) to be transmitted to the second terminal device 120 through the network 150, and the encoded video data is encoded in one or more The coded video stream is transmitted, and the second terminal device 120 can receive the coded video data from the network 150, decode the coded video data to recover the video data, and display the video picture according to the recovered video data.
  • video data such as a video picture stream collected by the terminal device 110
  • the second terminal device 120 can receive the coded video data from the network 150, decode the coded video data to recover the video data, and display the video picture according to the recovered video data.
  • the system architecture 100 may include a third terminal device 130 and a fourth terminal device 140 performing bidirectional transmission of encoded video data, such as may occur during a video conference.
  • each of the third terminal device 130 and the fourth terminal device 140 can encode video data (such as a video picture stream captured by the terminal device) for transmission to the third terminal device through the network 150 130 and the other terminal device in the fourth terminal device 140 .
  • Each of the third terminal device 130 and the fourth terminal device 140 can also receive the encoded video data transmitted by the other terminal device of the third terminal device 130 and the fourth terminal device 140, and can modify the encoded video data.
  • the video data is decoded to recover the video data, and video pictures may be displayed on an accessible display device based on the recovered video data.
  • the first terminal device 110, the second terminal device 120, the third terminal device 130 and the fourth terminal device 140 can be servers or terminals, and the servers can be independent physical servers or multiple
  • a server cluster or distributed system composed of physical servers can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
  • the terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, a smart home appliance, a vehicle terminal, an aircraft, etc., but is not limited thereto.
  • Network 150 represents any number of networks, including for example wired and/or wireless communication networks, that communicate encoded video data between first terminal device 110, second terminal device 120, third terminal device 130, and fourth terminal device 140.
  • Communication network 150 may exchange data in circuit-switched and/or packet-switched channels.
  • the network may include a telecommunications network, a local area network, a wide area network and/or the Internet.
  • the architecture and topology of network 150 may be immaterial to the operation of the present disclosure.
  • Fig. 2 shows how a video encoding device and a video decoding device are placed in a streaming environment.
  • the subject matter disclosed herein is equally applicable to other video-enabled applications including, for example, videoconferencing, digital TV (television), storing compressed video on digital media including CDs, DVDs, memory sticks, and the like.
  • the streaming transmission system may include an acquisition subsystem 213 , the acquisition subsystem 213 may include a video source 201 such as a digital camera, and the video source creates an uncompressed video picture stream 202 .
  • video picture stream 202 includes samples captured by a digital camera. Compared to the encoded video data 204 (or encoded video code stream 204), the video picture stream 202 is depicted as a thick line to emphasize the video picture stream of high data volume.
  • the video picture stream 202 can be processed by the electronic device 220, the electronic device 220
  • the device 220 comprises a video encoding device 203 coupled to the video source 201 .
  • Video encoding device 203 may include hardware, software, or a combination of hardware and software to implement or implement aspects of the disclosed subject matter as described in more detail below.
  • the encoded video data 204 (or encoded video code stream 204 ) is depicted as a thinner line to emphasize the lower data volume of the encoded video data 204 (or encoded video code stream 204 ) compared to the video picture stream 202 . 204), which may be stored on the streaming server 205 for future use.
  • One or more streaming client subsystems such as client subsystem 206 and client subsystem 208 in FIG. 2 , may access streaming server 205 to retrieve copies 207 and 209 of encoded video data 204 .
  • Client subsystem 206 may include, for example, video decoding device 210 in electronic device 230 .
  • a video decoding device 210 decodes an incoming copy 207 of encoded video data and produces an output video picture stream 211 that may be presented on a display 212, such as a display screen, or another presentation device.
  • encoded video data 204, video data 207, and video data 209 may be encoded according to certain video encoding/compression standards.
  • the electronic device 220 and the electronic device 230 may include other components not shown in the figure.
  • the electronic device 220 may include a video decoding device
  • the electronic device 230 may also include a video encoding device.
  • the video frame image when After inputting a video frame image, the video frame image will be divided into several non-overlapping processing units according to a block size, and each processing unit will perform a similar compression operation.
  • This processing unit is called CTU, or LCU (Largest Coding Unit, maximum coding unit).
  • the CTU can be further divided into finer divisions to obtain one or more basic coding units CU (Coding Unit, coding unit).
  • CU is the most basic element in a coding process.
  • Predictive Coding includes intra-frame prediction and inter-frame prediction. After the original video signal is predicted by the selected reconstructed video signal, a residual video signal is obtained. The encoder needs to decide which predictive coding mode to choose for the current CU, and inform the decoder. Among them, intra-frame prediction means that the predicted signal comes from the area that has been coded and reconstructed in the same image; inter-frame prediction means that the predicted signal comes from another image (called a reference image) that has been encoded and is different from the current image. .
  • Transform&Quantization After the residual video signal undergoes transformation operations such as DFT (Discrete Fourier Transform, Discrete Fourier Transform), DCT (Discrete Cosine Transform, Discrete Cosine Transform), the signal is converted into the transform domain, called is the transformation coefficient.
  • the transform coefficients are further subjected to a lossy quantization operation, and certain information is lost, so that the quantized signal is conducive to compressed expression.
  • there may be more than one transformation method for selection so the encoder also needs to select one of the transformation methods for the current CU and inform the decoder.
  • the fineness of quantization is usually determined by the quantization parameter (Quantization Parameter, referred to as QP).
  • a larger value of QP means that coefficients with a larger range of values will be quantized into the same output, which usually results in greater distortion and Lower code rate; on the contrary, the QP value is smaller, which means that the coefficients with a smaller range of values will be quantized to the same output, so it usually brings smaller distortion and corresponds to a higher code rate.
  • Entropy Coding or Statistical Coding The quantized transform domain signal will be statistically compressed and coded according to the frequency of occurrence of each value, and finally output a binary (0 or 1) compressed code stream. At the same time, other information generated by encoding, such as the selected encoding mode, motion vector data, etc., also needs to be entropy encoded to reduce the bit rate.
  • Statistical coding is a lossless coding method that can effectively reduce the bit rate required to express the same signal. Common statistical coding methods include variable length coding (Variable Length Coding, VLC for short) or context-based binary arithmetic coding ( Content Adaptive Binary Arithmetic Coding, referred to as CABAC).
  • the context-based binary arithmetic coding (CABAC) process mainly includes three steps: binarization, context modeling and binary arithmetic coding.
  • the binary data can be encoded by the regular coding mode and the bypass coding mode (Bypass Coding Mode).
  • the bypass encoding mode does not need to assign a specific probability model to each binary bit, and the input binary bit bin value is directly encoded by a simple bypass encoder to speed up the entire encoding and decoding.
  • different grammatical elements are not completely independent, and the same grammatical element itself has a certain memory.
  • coded syntax elements for conditional coding can further improve the coding performance compared to independent coding or memoryless coding.
  • coded symbolic information used as conditions are called contexts.
  • the binary bits of the syntax elements enter the context modeler sequentially, and the encoder assigns an appropriate probability model to each input binary bit according to the values of the previously encoded syntax elements or binary bits.
  • Processes model contexts Through ctxIdxInc (context index increment, context index increment) and ctxIdxStart (context index Start, context start index), the context model corresponding to the syntax element can be located. After the bin value and the assigned probability model are sent to the binary arithmetic coder for encoding, the context model needs to be updated according to the bin value, which is the adaptive process in encoding.
  • Loop Filtering The changed and quantized signal will be reconstructed through inverse quantization, inverse transformation and prediction compensation operations. Compared with the original image, due to the influence of quantization, some information of the reconstructed image is different from the original image, that is, the reconstructed image will produce distortion (Distortion). Therefore, a filtering operation can be performed on the reconstructed image to effectively reduce the degree of distortion caused by quantization. Since these filtered reconstructed images will be used as references for subsequent encoded images to predict future image signals, the above filtering operation is also called in-loop filtering, that is, a filtering operation in an encoding loop.
  • FIG. 3 shows a basic flow chart of a video encoder, in which intra prediction is taken as an example for illustration.
  • the original image signal s k [x,y] and the predicted image signal Do the difference operation to get the residual signal u k [x, y], and the residual signal u k [x, y] is transformed and quantized to obtain the quantized coefficient.
  • the quantized coefficient is obtained by entropy coding to obtain the coded bit
  • the reconstructed residual signal u' k [x,y] is obtained through inverse quantization and inverse transformation processing, and the predicted image signal Superimposed with the reconstructed residual signal u' k [x,y] to generate a reconstructed image signal reconstruct image signal
  • it is input to the intra-frame mode decision module and the intra-frame prediction module for intra-frame prediction processing, and on the other hand, it is filtered through loop filtering, and the filtered image signal s' k [x, y] is output, and the filtered
  • the image signal s' k [x, y] can be used as a reference image of the next frame for motion estimation and motion compensation prediction. Then based on the result of motion compensation prediction s' r [x+m x ,y+m y ] and the intra prediction result Get the predicted image signal of the next frame And continue to repeat the above process until the encoding is
  • loop filtering is one of the core modules of video encoding, which can effectively remove various encoding distortions.
  • VVC deblocking filter
  • SAO Sample Adaptive Offset
  • ALF adaptive loop filter
  • CC-ALF cross-component adaptive loop filtering
  • the overall structure of VVC and the loop filtering process are shown in Figure 4, and its overall flow is similar to the encoder flow shown in Figure 3.
  • ALF and CC-ALF are a kind of Wiener filtering
  • the filter can adaptively determine the filter coefficient according to the content of different video components, thereby reducing the mean square error (Mean Square Error, MSE for short) between the reconstructed component and the original component.
  • MSE mean Square Error
  • the input of ALF is the reconstructed pixel value filtered by DF and SAO, and the output is the enhanced reconstructed luminance image and reconstructed chrominance image; while the input of CC-ALF is filtered by DF and SAO without ALF
  • the output is the correction value of the corresponding chrominance component. That is, CC-ALF only acts on the chrominance component.
  • the correlation between the luminance component and the chrominance component is used to obtain the correction value of the chrominance component through linear filtering of the luminance component.
  • the correction value is the same as the ALF filter.
  • the chrominance components are added together as the final reconstructed chrominance components.
  • the Wiener filter can generate different filter coefficients for video content with different characteristics. Therefore, ALF and CC-ALF need to classify video content and use corresponding filters for each category of video content.
  • the ALF of the luma component supports 25 different types of filters
  • the ALF of each chroma component supports up to 8 different types of filters
  • the CC-ALF of each chroma component supports up to 4 different types of filters.
  • ALF will adaptively use different filters at the sub-block level (4 ⁇ 4 luminance blocks in VVC), that is, each 4 ⁇ 4 luminance component pixel block needs to be divided into 25 categories of a class.
  • the classification index C of the luminance component pixel block is composed of the directional feature (Directionality) D and the quantized activity feature (Activity) of the luminance component pixel block. jointly obtained. Specifically, it is shown in the following formula (1):
  • V k,l
  • R(k,l) represents the reconstructed pixel value at position (k,l) before ALF filtering
  • R(k-1,l) represents the reconstruction at position (k-1,l) before ALF filtering Pixel value
  • R(k+1,l) indicates the reconstructed pixel value at (k+1,l) position before ALF filtering
  • R(k,l-1) indicates (k,l-1) position before ALF filtering
  • R(k,l+1) represents the reconstructed pixel value at position (k,l+1) before ALF filtering
  • R(k-1,l-1) represents (k-1,l-1 ) is the reconstructed pixel value before ALF filtering
  • R(k+1,l+1) represents the reconstructed pixel value at (k+1,l+1) before ALF filtering
  • R(k-1,l+1 ) represents the reconstructed pixel value at position (k-1, l+1) before ALF filtering
  • R(k+1, l-1) represents the reconstructed pixel value at position (
  • the overall horizontal gradient g h , vertical gradient g v , diagonal direction gradient g d0 and anti-diagonal direction gradient g d1 of each 4 ⁇ 4 pixel block can be calculated, specifically as the following formula ( 6) and formula (7):
  • i and j represent the pixel coordinates of the upper left corner of the 4 ⁇ 4 pixel block.
  • the maximum value of the gradient value in the horizontal direction and the gradient value in the vertical direction and minimum are:
  • the maximum value of the gradient value in the diagonal direction and the gradient value in the anti-diagonal direction and minimum are:
  • the directional feature D is derived by comparing the maximum and minimum values of the gradient values in the four directions obtained by formula (8) and formula (9).
  • the specific process is:
  • t 1 and t 2 are set constants.
  • the filter coefficients and the corresponding limit values will be geometrically transformed according to the gradient value of the current block according to the rules shown in Table 1 below, including not Change (No transformation), Diagonal transformation (Diagonal), Vertical flip (Vertical flip) and Rotation transformation (Rotation).
  • applying geometric transformation to the filter coefficients is equivalent to applying geometric transformation to pixel values and then filtering the coefficients.
  • the purpose of geometric transformation is to align the directionality of different block contents as much as possible, thereby reducing ALF.
  • the number of classes required so that different pixels share the same filter coefficients. Using geometric transformation can improve the real classification from 25 to 100 without increasing the number of ALF filters, which improves its adaptability.
  • CC-ALF generates a corresponding correction value for each chrominance component through linear filtering of the luminance component.
  • the process and the relationship with ALF are shown in Figure 5.
  • the luminance component RY after SAO filtering is input to the ALF filter for further processing.
  • the filtering process of the luminance component and the value Y of the luminance component are output; at the same time, the value RY of the luminance component after SAO filtering is input to the CC-ALF filter to filter the two chroma components Cb and Cr respectively, and two color components are obtained.
  • Correction values ⁇ R Cb and ⁇ R Cr of degree components are obtained.
  • the values of the two chroma components after SAO filtering are input to the ALF filter to filter the chroma components, and then the ALF filter superimposes the filtering results of the two chroma components with the correction values ⁇ R Cb and ⁇ R Cr respectively, and finally outputs the color The values of the degree components Cb and Cr.
  • ⁇ R i (x, y) represents the correction value (that is, the offset value) of the chroma component i at the sample position (x, y);
  • S i represents the filtering area supported by the CC-ALF filter on the luminance component ;
  • c i (x 0 , y 0 ) represents the filter coefficient corresponding to the chroma component i;
  • R Y represents the luminance component;
  • (x c , y C ) represents the position of the luminance component obtained from the chroma component;
  • (x 0 , y 0 ) represents the offset position corresponding to the luminance component, which is obtained by transforming the coordinates of the chroma component according to the scaling relationship between luminance and chrominance corresponding to the video sequence.
  • CC-ALF supports a 3 ⁇ 4 diamond filter as shown in Figure 6.
  • the filter coefficient of CC-ALF cancels the limitation of symmetry, so that it can flexibly adapt to the relative relationship of various luma components and chrominance components.
  • CC-ALF has the following two restrictions on its filter coefficients: 1. The sum of all CC-ALF coefficients is limited to 0, so for 3 ⁇ 4 As far as the diamond filter is concerned, only 7 filter coefficients need to be calculated and transmitted, and the filter coefficient at the center position can be automatically inferred at the decoding end according to this condition; 2.
  • each filter coefficient to be transmitted must be is a power of 2, and can be represented by 6 bits at most, so the absolute value of the filter coefficient of CC-ALF is ⁇ 0, 2, 4, 8, 16, 32, 64 ⁇ .
  • the design can use shift operations instead of multiplication operations to reduce the number of multiplication operations.
  • CC-ALF Unlike the ALF of the luminance component that supports sub-block-level classification and adaptive selection, CC-ALF only supports CTU-level classification and adaptive selection. For each chroma component, all chroma pixels in a CTU belong to the same category and use the same filter.
  • an APS Adaptation Parameter Set, adaptive parameter set
  • APS can contain up to 25 sets of luma filter coefficients and corresponding limit value indexes
  • two chroma components can contain up to 8 sets of chroma filter coefficients and corresponding limit values index, and up to 4 sets of CC-ALF filter coefficients per chroma component.
  • the filter coefficients of different categories can be merged (Merge), so that multiple categories share a set of filter coefficients, and the encoding end will pass the rate-distortion optimization (Rate -Distortion Optimization (RDO for short) determines which types of coefficients can be merged, and the APS index used by the current slice is marked in the slice header (Slice Header).
  • CC-ALF supports CTU-level adaptation. For the case of multiple filters, at the CTU level, it will adaptively select whether to use CC-ALF and the index of the filter used for each chrominance component.
  • the technical solution of the embodiment of the present application proposes a new technical solution, which can increase the block classification category of the chrominance component when performing CC-ALF, so as to improve the accuracy of content classification in CC-ALF, and further improve The self-adaptive capability and filtering performance of CC-ALF help to improve the coding and decoding efficiency.
  • Fig. 7 shows a flowchart of a loop filtering method according to an embodiment of the present application, and the loop filtering method may be executed by a video encoding device or a video decoding device.
  • the loop filtering method includes at least step S710 to step S730, which are described in detail as follows:
  • step S710 the block classification information of the luminance component in the video image frame when adaptive loop filtering is performed is acquired.
  • the block classification information refers to information used to indicate subblock level classification results, and the block classification information may be identification information corresponding to a classification category, specifically, it may be a classification index.
  • the block classification process of the luminance component when ALF is performed can refer to the foregoing formula (1) to formula (10) to calculate specific classification indexes, and then the block classification information of the luminance component when ALF is performed can be determined.
  • step S720 according to the block classification information of the luminance component when adaptive loop filtering is performed, the block classification information of the chrominance component in the video image frame when performing cross-component adaptive loop filtering is determined.
  • the classification result of the luma component for sub-blocks when ALF is performed may be used as the classification result of the chrominance component for blocks of the same size when CC-ALF is performed.
  • the classification result of the luminance component of a sub-block indicates that the sub-block belongs to the third category when ALF is performed
  • the chrominance component of the sub-block also belongs to the third category when CC-ALF is performed, that is, the sub-block
  • the category of the luma component when performing ALF may be shared with its category when performing CC-ALF.
  • the classification result of the luminance component for sub-blocks when ALF is performed is used as the classification result of the same size block when the chrominance component is performed CC-ALF, so that it can be increased.
  • the block classification category of the chrominance component when performing CC-ALF improves the accuracy of content classification in CC-ALF, which in turn can improve the adaptive ability and filtering performance of CC-ALF, which is conducive to improving the encoding and decoding efficiency.
  • the classification result and the corresponding geometric transformation type of the luma component for sub-blocks when performing ALF can be used as the classification result and geometric transformation of the same size block when the chroma component is performing CC-ALF type.
  • the technical solution of this embodiment can also increase the block classification category of the chrominance component when performing CC-ALF, improve the accuracy of content classification in CC-ALF, and then can improve the adaptive ability and filtering performance of CC-ALF, thereby It is beneficial to improve the encoding and decoding efficiency.
  • step S730 according to the block classification information of the chrominance component when cross-component adaptive loop filtering is performed, corresponding filter coefficients are selected to perform cross-component adaptive loop filtering processing on the chrominance component.
  • the corresponding filter coefficients can be determined respectively for the block classification category of the chroma component when CC-ALF is performed, and then the corresponding filter can be selected according to the block classification information of the chroma component when CC-ALF is performed
  • the coefficients perform CC-ALF processing on the chrominance components.
  • the combination results of chrominance components performed on various types of filters when CC-ALF is performed may also be determined.
  • the combination result of various types of filters when the luma component is performing ALF is used as the combination result of various types of filters when the chroma component is performing CC-ALF.
  • various types of filters are combined, and at least two ALF filters can be combined by traversing every possible combination method, and the corresponding rate-distortion overhead is calculated, which will be calculated according to the rate
  • the combination method with the least distortion overhead obtains the combination result as the combination result of various filters when ALF is performed.
  • the rate-distortion overhead of filter combining in the ALF process of the luma component and the rate-distortion overhead of filter combining in the CC-ALF process of the chroma component it is determined that the luma component is When performing ALF, and when the chrominance component is performing CC-ALF, the combined results of various filters.
  • the technical solution of this embodiment can jointly optimize the ALF of the luminance component and the CC-ALF of the chrominance component, so as to simultaneously determine the combination results of the ALF of the luminance component and the CC-ALF of the chrominance component for various types of filters.
  • the number of filters available for the chrominance component when performing CC-ALF may be determined according to the number of filters determined when performing ALF for the luma component. For example, the number of filters determined when the luma component is performing ALF may be used as the number of available filters when the chrominance component is performing CC-ALF.
  • loop filtering method in the embodiment shown in FIG. 7 can be applied in the encoding process of the video encoding end, and can also be applied in the decoding process of the video decoding end.
  • Fig. 8 shows a flow chart of a video encoding method according to an embodiment of the present application, and the video encoding method may be executed by a video encoding device.
  • the video encoding method includes at least steps S810 to S840, which are described in detail as follows:
  • step S810 the block classification information of the luminance component in the video image frame when ALF is performed is obtained.
  • step S820 according to the block classification information of the luma component when performing ALF, determine the block classification information of the chrominance component in the video image frame when CC-ALF is performed.
  • step S830 according to the block classification information of the chroma component when CC-ALF is performed, corresponding filter coefficients are selected to perform CC-ALF processing on the chroma component.
  • step S840 according to the ALF processing result of the luminance component and the CC-ALF processing of the chrominance component, the video image frame is encoded to obtain a video code stream.
  • the corresponding filter coefficient can be determined according to the block classification information of the luminance component when ALF is performed, and the ALF processing is performed on the luminance component according to the filter coefficient to obtain the ALF processing result, so that the ALF processing result and the CC-ALF processing result can be , and encode the video image frame to obtain a video code stream.
  • the block classification category of the chrominance component can be increased when CC-ALF is performed to improve the accuracy of content classification in CC-ALF, thereby improving the adaptive ability and Filtering performance, which is beneficial to improve coding efficiency.
  • the block classification strategy in the video coding method shown in FIG. 8 (that is, according to the block classification information of the luminance component when performing ALF, determine the block classification information of the chrominance component when performing CC-ALF) It can be used alone, and can also be used together with other classification strategies (such as classification strategies in the related art). The two situations are described below:
  • the encoder can encode the first flag bit corresponding to the current slice of the video image frame in the video code stream.
  • the first flag The value of the bit is used to indicate whether the chrominance component of the target block in the current slice adopts the CC-ALF processing method proposed in the embodiment of the present application (that is, the CC-ALF processing method using the block classification strategy in FIG. 8 ).
  • the first flag corresponding to the current slice can directly indicate whether the chrominance component of the target block in the current slice adopts the embodiment of the present application The CC-ALF processing method proposed in .
  • the value of the first flag bit is the first value (for example, 1), it indicates that the chrominance components of some target blocks in the current slice adopt the CC-ALF processing method proposed in the embodiment of the present application, or The chrominance components indicating all target blocks in the current slice adopt the CC-ALF processing method proposed in the embodiment of the present application.
  • the value of the first flag bit is the second value (for example, 0), it indicates that the chrominance components of all target blocks in the current slice do not use the CC-ALF processing method proposed in the embodiment of the present application.
  • the first flag bit is a slice-level flag bit, if the value of the first flag bit indicates that the chrominance components of all target blocks in the current slice adopt the CC proposed in the embodiment of the present application -ALF processing mode, or indicate that the chrominance components of all target blocks in the current slice do not adopt the CC-ALF processing mode proposed in the embodiment of the present application, then there is no need to encode a block-level flag bit.
  • the encoder can encode in the video stream to obtain the current slice contains
  • the second flag bit corresponding to each target block the value of the second flag bit is used to indicate whether the chrominance component of the corresponding target block adopts the CC-ALF processing method proposed in the embodiment of the present application. That is to say, in this embodiment, on the basis of the slice-level flag bit, the block-level flag bit (that is, the second flag bit) can be further used to indicate that the chrominance components of those target blocks need to adopt the method proposed in the embodiment of the present application.
  • the CC-ALF processing method the block-level flag bit
  • a second flag bit can be set for each of the two chroma components of the target block, and each second flag bit The value is used to indicate whether the corresponding chrominance component in the target block adopts the CC-ALF processing method proposed in the embodiment of the present application.
  • the two chrominance components (Cr and Cb) of the target block may also correspond to the same second flag bit, and the value of the same second flag bit is used to indicate two Whether the chrominance component adopts the CC-ALF processing method proposed in the embodiment of this application.
  • a first flag bit can be set for each of the two chroma components of the current slice, and the value of each first flag bit is used to indicate whether the corresponding chroma component in the current slice.
  • the two chroma components of the current slice may also correspond to the same first flag bit, and the value of the same first flag bit is used to indicate the two chroma components in the current slice Whether the component adopts the CC-ALF processing method proposed in the embodiment of this application.
  • the block-level flags can also set a second flag for the two chroma components respectively . If the block-level flag bit sets a second flag bit for two chroma components, then the slice-level flag bit only needs to set a first flag bit for two chroma components.
  • the encoding end may determine whether the chrominance components of each target block adopt the CC-ALF processing method proposed in the embodiment of the present application through rate-distortion optimization.
  • the encoder can calculate the first rate-distortion overhead of the chrominance components of each target block when the CC-ALF processing proposed in the embodiment of the present application is used, and calculate the chrominance components of each target block without CC. - the second rate-distortion overhead during ALF processing, and then according to the first rate-distortion overhead and the second rate-distortion overhead, determine whether the chroma component of each target block adopts the CC-ALF processing method proposed in the embodiment of the present application.
  • the rate-distortion overhead corresponding to the chrominance component of a certain target block is smaller than the second rate-distortion overhead, it means that the chrominance component of the target block adopts the CC-ALF processing method proposed in the embodiment of the present application; if If the first rate-distortion overhead corresponding to the chrominance component of a certain target block is greater than the second rate-distortion overhead, it means that the chrominance component of the target block does not use the CC-ALF processing method proposed in the embodiment of the present application.
  • the rate-distortion overhead can be saved as much as possible while ensuring the coding efficiency.
  • the classification strategy includes the block classification strategy shown in Figure 8 (that is, according to the block classification information of the luma component when performing ALF Block classification information of chrominance components when performing CC
  • the block classification strategy shown in FIG. 8 and other classification strategies are used at the same time, it is necessary to indicate the chroma of the target block in the current stripe through the slice-level flag bit (ie, the third flag bit)
  • the slice-level flag bit ie, the third flag bit
  • the component undergoes CC-ALF processing if CC-ALF processing is performed, then it needs to be in the corresponding adaptive parameter set (referenced by the index of the adaptive parameter set) encodes the flag bit of the classification strategy (that is, the fourth flag bit), so as to clearly indicate whether to adopt the block classification strategy shown in FIG. 8 or other classification strategies.
  • the fourth flag is 1, it means that the block classification strategy shown in FIG. 8 needs to be adopted; if the value of the fourth flag is 0, it means that other classification strategies need to be adopted.
  • the video code stream can The fifth flag bit corresponding to each target block included in the current slice is encoded, and the value of the fifth flag bit is used to indicate whether the chrominance component of the corresponding target block is subjected to CC-ALF processing.
  • the value of the fifth flag bit corresponding to a certain target block is 1, it means that the chrominance component of the target block needs to be processed by CC-ALF; if the value of the fifth flag bit corresponding to a certain target block is 0, it means that the chrominance component of the target block does not need to be processed by CC-ALF.
  • the slice-level flag bit (that is, the third flag bit) indicates that the chrominance components of all target blocks in the current slice do not need to be processed by CC-ALF, or indicate that the chrominance components of all target blocks If CC-ALF processing is required, then there is no need to introduce a block-level flag (that is, the fifth flag).
  • the value of the slice-level flag indicates that some target blocks in the slice need to be processed by CC-ALF
  • the flag of the coding classification strategy that is, the fourth flag
  • the block classification strategy shown in Figure 8 if the block-level flag bit (i.e. the fifth flag bit) of a certain target block indicates that CC-ALF processing is required, then for the target block, the Perform CC-ALF processing with the block classification strategy shown.
  • a technical solution similar to that of the foregoing embodiment may be adopted, that is, a second chroma component is respectively set for the two chroma components of the current slice Three flags, or set the same third flag for the two chroma components of the current stripe.
  • a fifth flag bit may be set for each of the two chrominance components of the target block, or the same fifth flag bit may be set for the two chrominance components of the target block.
  • a fourth flag bit may be set in the APS for the two chroma components, or the same fourth flag bit may be set in the APS for the two chroma components.
  • the encoding end can determine whether the chrominance component of the current slice uses the block classification strategy shown in FIG. 8 or other classification strategies when performing CC-ALF processing through rate-distortion optimization. .
  • the encoder can calculate the third rate-distortion cost of the chrominance components of all target blocks in the current slice when CC-ALF processing is performed using the block classification strategy shown in Figure 8, and calculate all target blocks in the current slice
  • the fourth rate-distortion overhead of the chrominance component of the block when other classification strategies are used for CC-ALF processing and then according to the third rate-distortion overhead and the fourth rate-distortion overhead, it is determined that the chrominance component of the current slice is performing CC-ALF Classification strategy used in ALF processing.
  • the third rate-distortion overhead corresponding to a certain slice is less than the fourth rate-distortion overhead, it means that the chrominance component of the slice adopts the block classification strategy shown in Figure 8 when performing CC-ALF processing; if If the third rate-distortion overhead corresponding to a certain slice is greater than the fourth rate-distortion overhead, it means that the CC-ALF processing of the chrominance components of the slice adopts other classification strategies.
  • the size information of the target block in the foregoing embodiments may be preset by the encoding end and the decoding end; or it may be determined by the encoding end, and after determining the target block
  • encode the size information of the target block in the sequence parameter set, picture parameter set, picture header or slice header of the video code stream may be a CTU, or a block smaller than the CTU.
  • Fig. 9 shows a flowchart of a video decoding method according to an embodiment of the present application, and the video decoding method can be executed by a video decoding device.
  • the video decoding method includes at least step S910 to step S940, described in detail as follows:
  • step S910 the block classification information of the luminance component in the video image frame when ALF is performed is obtained.
  • step S920 according to the block classification information of the luma component when performing ALF, determine the block classification information of the chrominance component in the video image frame when CC-ALF is performed.
  • step S930 according to the block classification information of the chroma component when CC-ALF is performed, corresponding filter coefficients are selected to perform CC-ALF processing on the chroma component.
  • step S940 the video code stream is decoded according to the ALF processing result of the luma component and the CC-ALF processing result of the chrominance component.
  • the corresponding filter coefficient can be determined according to the block classification information of the luminance component when ALF is performed, and the ALF processing is performed on the luminance component according to the filter coefficient to obtain the ALF processing result, so that the ALF processing result and the CC-ALF processing result can be , to decode the video code stream.
  • the block classification category of the chrominance component when performing CC-ALF can be increased to improve the accuracy of content classification in CC-ALF, thereby improving the adaptive ability and Filtering performance, which is conducive to improving the efficiency of encoding and decoding.
  • the block classification strategy in the video decoding method shown in FIG. 9 (that is, according to the block classification information of the luminance component when performing ALF, determine the block classification information of the chrominance component when performing CC-ALF) It can be used alone, and can also be used together with other classification strategies (such as classification strategies in the related art). The two situations are described below:
  • the decoding end can learn from The first flag bit corresponding to the current slice is obtained by decoding the video code stream, and the value of the first flag bit is used to indicate whether the chrominance component of the target block in the current slice adopts the CC- The ALF processing method (that is, the CC-ALF processing method adopting the block classification strategy in FIG. 9 ).
  • the first flag corresponding to the current slice can directly indicate whether the chrominance component of the target block in the current slice adopts the embodiment of the present application.
  • the value of the first flag bit is the first value (for example, 1), it indicates that the chrominance components of some target blocks in the current slice adopt the CC-ALF processing method proposed in the embodiment of the present application, or The chrominance components indicating all target blocks in the current slice adopt the CC-ALF processing method proposed in the embodiment of the present application.
  • the value of the first flag bit is the second value (for example, 0), it indicates that the chrominance components of all target blocks in the current slice do not use the CC-ALF processing method proposed in the embodiment of the present application.
  • the first flag bit is a slice-level flag bit, if the value of the first flag bit indicates that the chrominance components of all target blocks in the current slice adopt the CC proposed in the embodiment of the present application -ALF processing method, or indicate that the chrominance components of all target blocks in the current slice do not use the CC-ALF processing method proposed in the embodiment of the present application, then there is no need to decode the block-level flag bit (the encoding end does not need to encode the block-level flag bit).
  • the decoder needs to decode the video code stream to obtain the current slice contains
  • the second flag bit corresponding to each target block the value of the second flag bit is used to indicate whether the chrominance component of the corresponding target block adopts the CC-ALF processing method proposed in the embodiment of the present application. That is, in this embodiment, on the basis of the slice-level flag bits, the block-level flag bits (that is, the second flag bits) can be further obtained by decoding to indicate that the chrominance components of those target blocks need to use the Proposed CC-ALF processing.
  • a second flag bit can be set for each of the two chroma components of the target block, and each second flag bit The value is used to indicate whether the corresponding chrominance component in the target block adopts the CC-ALF processing method proposed in the embodiment of the present application.
  • the two chrominance components (Cr and Cb) of the target block may also correspond to the same second flag bit, and the value of the same second flag bit is used to indicate two Whether the chrominance component adopts the CC-ALF processing method proposed in the embodiment of this application.
  • a first flag bit can be set for each of the two chroma components of the current slice, and the value of each first flag bit is used to indicate whether the corresponding chroma component in the current slice.
  • the two chroma components of the current slice may also correspond to the same first flag bit, and the value of the same first flag bit is used to indicate the two chroma components in the current slice Whether the component adopts the CC-ALF processing method proposed in the embodiment of this application.
  • the block-level flags can also set a second flag for the two chroma components respectively . If the block-level flag bit sets a second flag bit for two chroma components, then the slice-level flag bit only needs to set a first flag bit for two chroma components.
  • the decoding end also needs to decode the adaptive parameter set from the video code stream during decoding, which contains the filter coefficients of CC-ALF.
  • the first flag The value of indicates that the chrominance component of at least one target block in the current slice adopts the CC-ALF processing proposed in the embodiment of this application
  • the index of the adaptive parameter set corresponding to the current slice can be decoded from the video code stream , and then select corresponding filter coefficients from the adaptive parameter set corresponding to the index of the adaptive parameter set to perform filtering processing on the chrominance component of the corresponding target block under the current condition.
  • the block classification strategy shown in Figure 9 and other classification strategies are used at the same time, then when decoding, it is necessary to decode the adaptive parameter set from the video stream, and the current slice
  • the corresponding third flag bit, the value of the third flag bit is used to indicate whether the chrominance component of the target block in the current slice is subjected to CC-ALF processing; if the chrominance component of the target block in the current slice needs to be CC-ALF -ALF processing, then decode the index of the adaptive parameter set corresponding to the current slice from the video code stream; then obtain the corresponding chroma component of the current slice from the adaptive set corresponding to the index of the adaptive parameter set
  • the fourth flag bit, the value of the fourth flag bit is used to indicate the classification strategy adopted by the chrominance component of the current slice when performing CC-ALF processing, and the classification strategy includes the block classification strategy shown in Figure 9 (ie According to the block classification information of the luminance component when performing ALF, determine the block classification information
  • the block classification strategy shown in FIG. 9 and other classification strategies are used at the same time, it is necessary to indicate the chroma of the target block in the current stripe through the slice-level flag bit (ie, the third flag bit)
  • the slice-level flag bit ie, the third flag bit
  • the component undergoes CC-ALF processing it can be the CC-ALF processing method proposed in the embodiment of this application or other CC-ALF processing methods
  • CC-ALF processing it needs to be in the corresponding adaptive parameter set (referenced by the index of the adaptive parameter set) is decoded to obtain the flag bit of the classification strategy (that is, the fourth flag bit), so as to clearly indicate whether to adopt the block classification strategy shown in FIG. 9 or other classification strategies.
  • the classification strategy is the classification strategy shown in Figure 9; if the value of the fourth flag bit corresponding to the chroma component of the current slice is the second value (such as 0), it indicates that the chroma component of the current slice is performing CC-ALF
  • the classification strategy adopted during processing is other classification strategies.
  • the video code stream can be The fifth flag bit corresponding to each target block included in the current slice is obtained by decoding, and the value of the fifth flag bit is used to indicate whether the chrominance component of the corresponding target block is subjected to CC-ALF processing.
  • the value of the fifth flag bit corresponding to a certain target block is 1, it means that the chrominance component of the target block needs to be processed by CC-ALF; if the value of the fifth flag bit corresponding to a certain target block is 0, it means that the chrominance component of the target block does not need to be processed by CC-ALF.
  • the slice-level flag bit (that is, the third flag bit) indicates that the chrominance components of all target blocks in the current slice do not need to be processed by CC-ALF, or indicate that the chrominance components of all target blocks If CC-ALF processing is required, then there is no need to introduce a block-level flag (that is, the fifth flag).
  • the value of the slice-level flag indicates that some target blocks in the slice need to be processed by CC-ALF
  • the flag of the coding classification strategy that is, the fourth flag
  • the block-level flag bit indicates that CC-ALF processing is required, then for the target block, the Perform CC-ALF processing with the block classification strategy shown.
  • a technical solution similar to that of the foregoing embodiment may be adopted, that is, a second chroma component is respectively set for the two chroma components of the current slice Three flags, or set the same third flag for the two chroma components of the current stripe.
  • a fifth flag bit can also be set for each of the two chroma components of the target block, or the same fifth flag bit can be set for the two chroma components of the target block.
  • the size information of the target block in the foregoing embodiments may be preset by the encoding end and the decoding end; or it may be determined by the encoding end, and after determining the target block
  • the size information encode the size information of the target block in the sequence parameter set, picture parameter set, picture header or slice header of the video code stream, so that the decoder needs to decode the corresponding size information from the code stream.
  • the target block may be a CTU, or a block smaller than the CTU.
  • the embodiment of the present application proposes to determine the classification result of the CC-ALF of the chrominance component at the sub-block level at the same level according to the classification of the ALF of the luma component at the sub-block level, and proposes an adaptive selection filter at different levels according to the classification result method, which is described in detail below:
  • the embodiment of the present application proposes to set the number of CC-ALF filters that can be supported by each chroma component as the number of ALF filters that can be supported by the luma component, and at the same time determine the chroma according to the ALF classification process of the luma component
  • the CC-ALF classification of the component can be used alone or in combination.
  • the classification result of the CC-ALF of the chrominance component may be determined according to the classification of the ALF of the luma component at the subblock level.
  • the classification result of the ALF of the luminance component at the subblock level can be used as the classification result of the CC-ALF on the block of the same size.
  • the classification process of the ALF of the luminance component at the subblock level is as described in the foregoing formula (1) to formula (10).
  • the classification result and the corresponding geometric transformation type of the ALF of the luminance component at the subblock level may also be used as the classification result and geometric transformation type of the CC-ALF of the chrominance component on blocks of the same size.
  • the classification process of the ALF of the luminance component at the subblock level is as described in the foregoing formula (1) to formula (10).
  • the merging process of the CC-ALF of the chrominance component for various types of filters may be determined according to the merging process (Merge) of the ALF of the luminance component for various types of filters.
  • the combination result of the ALF of the luma component and various filters may be used as the combination result of the CC-ALF of the chrominance component and various filters.
  • the ALF of the luma component and the CC-ALF of the two chrominance components may be jointly optimized to simultaneously determine the combined results of the ALF of the luma component and the CC-ALF of the chrominance component for various types of filters.
  • the number of filters available for the CC-ALF of each chrominance component may be determined according to the final number of filters of the ALF of the luma component.
  • the embodiment of the present application proposes a technical solution for adaptively selecting filter types and transmitting filter-related parameters at different levels based on the aforementioned CC-ALF classification method of chrominance components. Specifically, it can be divided into the embodiment of using the classification method proposed in the embodiment of the present application alone, and the embodiment of using the classification method proposed in the embodiment of the present application and the existing classification method in the related CC-ALF technology at the same time.
  • the classification method proposed in the embodiment of the present application is used alone, and the two chrominance components are respectively used for CC-ALF selection decision:
  • the CC-ALF selection decision can be made separately for the two chroma components Cb and Cr and parameter transfer.
  • the CC-ALF related parameters that need to be transmitted by the encoding end are as follows:
  • CC-ALF On/Off flag at the CTU level. For example, if the flag bit is 1, it means that the corresponding chrominance component samples in the current CTU are filtered using CC-ALF (since the classification method proposed in the embodiment of this application is used alone, if it is indicated to use CC-ALF for filtering If the CC-ALF is used for filtering, then the classification method proposed in the embodiment of the present application is adopted); if the flag bit is 0, it means that the corresponding chrominance component in the current CTU does not use CC-ALF filtering.
  • CC-ALF flag at the slice level For example, if the flag bit is 1, it means that the chrominance component corresponding to at least one CTU in the current slice selects to use CC-ALF (since the classification method proposed in the embodiment of this application is used alone, so if it is indicated to use CC-ALF If filtering is performed, then the classification method proposed in the embodiment of the present application is adopted when using CC-ALF for filtering); if the flag bit is 0, it means that the chrominance components corresponding to all CTUs in the current slice do not use CC -ALF.
  • the flag bit of whether to use CC-ALF at the slice level is 1, it may also indicate that the chrominance components corresponding to all CTUs in the current slice use CC-ALF.
  • the Slice level uses the CC-ALF flag to indicate that the chroma components corresponding to all CTUs in the current slice do not use CC-ALF, or indicate that the chroma components corresponding to all CTUs in the current slice use CC-ALF, then the encoding end does not need to encode whether the CTU level uses the CC-ALF flag, and the decoding end does not need to decode.
  • CC-ALF flag bit of the slice level is 1, the coefficients of each filter in the CC-ALF filter bank corresponding to the relevant chrominance component need to be transmitted.
  • Other CC-ALF related control parameters such as the number of filters included in the filter bank and the filter combination index, etc. do not require additional transmission, and can be inferred from the parameters corresponding to the ALF of the luminance component.
  • the classification method proposed in the embodiment of the present application is used alone, and the two chrominance components are used together to make the selection decision of CC-ALF :
  • the CC-ALF selection decision can be made jointly for the two chroma components Cb and Cr and parameter transfer.
  • the CC-ALF related parameters that need to be transmitted by the encoding end are as follows:
  • CC-ALF On/Off flag at the CTU level. For example, if the flag bit is 1, it means that the two chrominance component samples in the current CTU are filtered using CC-ALF (since the classification method proposed in the embodiment of this application is used alone, if it is indicated to use CC-ALF If filtering, then the classification method proposed in the embodiment of the present application is adopted when using CC-ALF for filtering); if the flag bit is 0, it means that the two chrominance components in the current CTU do not use CC-ALF filtering .
  • CC-ALF flag at the slice level For example, if the flag bit is 1, it means that the two chrominance components of at least one CTU in the current slice choose to use CC-ALF (since the classification method proposed in the embodiment of this application is used alone, if it is indicated to use CC-ALF If the CC-ALF is used for filtering, then the classification method proposed in the embodiment of the present application is adopted when using CC-ALF for filtering); if the flag bit is 0, it means that the two chrominance components of all CTUs in the current slice are not Use CC-ALF.
  • the flag bit of whether to use CC-ALF at the slice level is 1, it may also indicate that both chrominance components of all CTUs in the current slice use CC-ALF.
  • the Slice level uses the CC-ALF flag bit, it indicates that the two chroma components of all CTUs in the current slice do not use CC-ALF, or indicates that the two chroma components of all CTUs in the current slice Both use CC-ALF, so the encoding end does not need to encode the flag of whether the CTU level uses CC-ALF, and the decoding end does not need to decode.
  • CC-ALF flag bit of the slice level is 1, the coefficients of each filter in the CC-ALF filter bank corresponding to the two chrominance components need to be transmitted.
  • Other CC-ALF related control parameters such as the number of filters included in the filter bank and the filter combination index, etc. do not require additional transmission, and can be inferred from the parameters corresponding to the ALF of the luminance component.
  • the classification method proposed in the embodiment of the present application and the existing classification method in the related CC-ALF technology are used in the CC-ALF of the chrominance component
  • the chroma components Cb and Cr respectively specify classification methods, so as to use the corresponding classification methods for all samples of the corresponding chrominance components in the current frame, and perform CC-ALF selection decisions and related parameter transmissions respectively.
  • the CC-ALF related parameters that need to be transmitted by the encoding end are as follows:
  • CC-ALF On/Off flag at the CTU level. For example, if the flag bit is 1, it means that the corresponding chrominance component samples in the current CTU are filtered using CC-ALF (the classification method used in the specific filtering can be the classification method proposed in the embodiment of this application, or it can be The existing classification method in the relevant CC-ALF technology, which one needs to be further indicated by the flag bit in the APS); if the flag bit is 0, it means that the corresponding chrominance component in the current CTU does not use CC-ALF ALF filtering.
  • the flag bit is 1, it means that the chrominance component corresponding to at least one CTU in the current slice is selected to use CC-ALF (similarly, the classification method adopted during specific filtering can be the classification proposed in the embodiment of this application method, it can also be the existing classification method in the relevant CC-ALF technology, which one needs to be further indicated through the flag bit in APS); if the flag bit is 0, it means that all CTUs in the current stripe correspond to None of the chroma components use CC-ALF.
  • the flag bit of whether to use CC-ALF at the slice level is 1, it may also indicate that the chrominance components corresponding to all CTUs in the current slice use CC-ALF.
  • the Slice level uses the CC-ALF flag to indicate that the chroma components corresponding to all CTUs in the current slice do not use CC-ALF, or indicate that the chroma components corresponding to all CTUs in the current slice use CC-ALF, then the encoding end does not need to encode whether the CTU level uses the CC-ALF flag, and the decoding end does not need to decode.
  • CC-ALF When CC-ALF needs to be used, it is necessary to indicate an APS index, and use a classification method flag bit in the APS corresponding to the index to indicate the classification method used by the corresponding chroma component. For example, if the classification method flag is 0, it indicates that the existing classification method in the relevant CC-ALF technology is used; if the classification method flag is 1, it indicates that the classification method proposed in the embodiment of the present application is used.
  • classification method flag in the APS is 0, it means that the existing classification method in the relevant CC-ALF technology needs to be used, and then relevant parameters at all levels can be transmitted according to the existing design in the relevant CC-ALF technology .
  • the flag bit of the classification method in the APS is 1, it means that the classification method proposed in the embodiment of the present application needs to be adopted, and then relevant parameters at various levels can be transmitted in the manner in the foregoing embodiments.
  • the decision-making process for the selection of the CC-ALF classification method at the encoding end is as follows:
  • A) Perform CC-ALF decisions on all CTUs in the current slice (Slice) according to the existing classification method in the relevant CC-ALF technology, and obtain the optimal rate-distortion overhead of the CC-ALF of the current slice.
  • the two chroma components Cb and Cr can share a classification method flag in the APS to use the same classification method for all samples of the two chrominance components in the current frame, and make CC-ALF selection decisions for the two chrominance components Cb and Cr with the transfer of relevant parameters.
  • the CC-ALF related parameters that need to be transmitted by the encoding end are as follows:
  • CC-ALF On/Off flag at the CTU level.
  • the flag bit is 1, it means that the two chrominance components in the current CTU are filtered using CC-ALF (the classification method adopted during the specific filtering can be the classification method proposed in the embodiment of the present application, or it can be The existing classification method in the related CC-ALF technology, which one needs to be further indicated by the flag bit in the APS); if the flag bit is 0, it means that the two chrominance components in the current CTU do not use CC -ALF filtering.
  • the flag bit is 1, it means that the two chrominance components of at least one CTU in the current slice use CC-ALF (similarly, the classification method used in specific filtering can be the classification proposed in the embodiment of this application The method can also be the existing classification method in the related CC-ALF technology, which one needs to be further indicated by the flag bit in the APS); if the flag bit is 0, it means that the two None of the chroma components use CC-ALF.
  • the flag bit of whether to use CC-ALF at the Slice level is 1, it can also indicate that both chrominance components of all CTUs in the current slice use CC-ALF.
  • the Slice level uses the CC-ALF flag bit, it indicates that the two chroma components of all CTUs in the current slice do not use CC-ALF, or indicates that the two chroma components of all CTUs in the current slice Both use CC-ALF, so the encoding end does not need to encode the flag of whether the CTU level uses CC-ALF, and the decoding end does not need to decode.
  • a classification method flag bit is used in the APS corresponding to the index to indicate the classification method of the two chrominance components. For example, if the classification method flag is 1, it means that the classification method proposed in the embodiment of the application is used for all samples of the two chroma components; if the classification method flag is 0, it means that the two chroma components The entire sample uses the existing classification method in the related CC-ALF technique.
  • classification method flag in APS is 0, it means that all samples of the two chrominance components use the existing classification method in the relevant CC-ALF technology, and then can follow the existing classification method in the relevant CC-ALF technology
  • the design transmits relevant parameters at all levels.
  • classification method flag in the APS is 1, it means that the classification method proposed in the embodiment of this application is used for all samples of the two chrominance components, and then all levels of Related parameters.
  • the decision-making process for the selection of the CC-ALF classification method at the encoding end is as follows:
  • A) Perform CC-ALF decision for all CTUs in the current Slice for the two chroma components Cb and Cr according to the existing classification method in the relevant CC-ALF technology, and obtain the total of the two chroma components in the current Slice CC-ALF optimal rate-distortion overhead.
  • whether the CTU level uses the CC-ALF flag, whether the Slice level uses the CC-ALF flag, and the classification method flag in the APS can be set for each color
  • One flag bit is set for the degree component (that is, there are two CTU-level flag bits, two Slice-level flag bits and two APS-level flag bits to correspond to the two chroma components respectively), or it can be for the two chroma components Only one flag bit is set (that is, there are 1 CTU-level flag bit, 1 Slice-level flag bit and 1 APS-level flag bit, and correspond to the two chrominance components).
  • the CTU-level block is used as an example for illustration. In other embodiments of the present application, it can also be used to process blocks of other sizes. For example, in addition to the size In addition to the 128 ⁇ 128 CTU-level block, it may also be a 64 ⁇ 64 or other smaller size block.
  • the size of the block-level unit for block-level CC-ALF filter selection may be specified at both the encoding end and the decoding end, so that the size information of the block-level unit does not need to be transmitted.
  • a flag bit needs to be transmitted for each block-level unit to indicate whether the corresponding block unit uses CC-ALF.
  • CC-ALF filtering at the encoding end, and write the size of the corresponding block-level unit into the code stream, and the decoding end parses to obtain the size information of the corresponding block-level unit .
  • the size information can be written in SPS (Sequence Parameter Set, sequence parameter set), PPS (Picture Parameter Set, image parameter set), picture header (Picture Header) or slice header (Slice Header).
  • SPS Sequence Parameter Set, sequence parameter set
  • PPS Picture Parameter Set, image parameter set
  • picture header Picture Header
  • slice header Slice header
  • a flag bit needs to be transmitted for each block-level unit to indicate whether the corresponding block unit uses CC-ALF.
  • steps in the flow charts involved in the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flow charts involved in the above-mentioned embodiments may include multiple steps or stages, and these steps or stages are not necessarily executed at the same time, but may be performed at different times For execution, the execution order of these steps or stages is not necessarily performed sequentially, but may be executed in turn or alternately with other steps or at least a part of steps or stages in other steps.
  • Fig. 10 shows a block diagram of a loop filtering device according to an embodiment of the present application, and the loop filtering device may be set in a video encoding device or a video decoding device.
  • a loop filtering device 1000 includes: an acquiring unit 1002 , a determining unit 1004 and a filtering unit 1006 .
  • the obtaining unit 1002 is configured to obtain the block classification information of the luminance component in the video image frame when performing adaptive loop filtering ALF;
  • the determining unit 1004 is configured to determine the block classification information according to the block classification information of the luminance component when performing ALF The block classification information of the chrominance component in the video image frame when performing cross-component adaptive loop filtering CC-ALF;
  • the filtering unit 1006 is configured to select according to the block classification information of the chrominance component when performing CC-ALF The corresponding filter coefficients perform CC-ALF processing on the chrominance components.
  • the determining unit 1004 is configured to: use the classification result of the luma component for sub-blocks when performing ALF as the classification result of the chrominance component for the same size when performing CC-ALF the classification result of the block; or
  • the classification result and the corresponding geometric transformation type of the luma component for sub-blocks when ALF is performed are used as the classification result and geometric transformation type of the chrominance component for blocks of the same size when CC-ALF is performed.
  • the determining unit 1004 is further configured to: determine the Combined results for various filters.
  • the determining unit 1004 is further configured to: perform the rate-distortion overhead of filter combination in the ALF process of the luma component, and the CC-ALF process of the chrominance component
  • the rate-distortion overhead of filter combination determines the result of combining various filters when the luminance component performs ALF and the chrominance component performs CC-ALF.
  • the determining unit 1004 is further configured to: determine the number of filters available for the chrominance component when performing CC-ALF according to the number of filters determined when the luminance component is performing ALF number of filters.
  • Fig. 11 shows a block diagram of a video decoding device according to an embodiment of the present application, and the video decoding device may be set in a video decoding device.
  • a video decoding device 1100 includes: an acquiring unit 1102 , a determining unit 1104 , a filtering unit 1106 and a first processing unit 1108 .
  • the obtaining unit 1102 is configured to obtain the block classification information of the luminance component in the video image frame when performing adaptive loop filtering (ALF);
  • the determining unit 1104 is configured to determine the block classification information according to the block classification information of the luminance component when performing ALF The block classification information of the chrominance component in the video image frame when performing cross-component adaptive loop filtering CC-ALF;
  • the filtering unit 1106 is configured to select according to the block classification information of the chrominance component when performing CC-ALF The corresponding filter coefficient performs CC-ALF processing on the chrominance component;
  • the first processing unit 1108 is configured to process the video code according to the ALF processing result of the luminance component and the CC-ALF processing result of the chrominance component The stream is decoded.
  • the video decoding device 1100 further includes: a first decoding unit: configured to determine the video image according to the block classification information when the luminance component is performing ALF The chrominance component in the frame is decoded from the video code stream before the block classification information when performing CC-ALF to obtain the first flag bit corresponding to the current slice, and the value of the first flag bit is used to indicate the current Whether the chrominance component of the target block in the slice is processed by the CC-ALF.
  • a first decoding unit configured to determine the video image according to the block classification information when the luminance component is performing ALF
  • the chrominance component in the frame is decoded from the video code stream before the block classification information when performing CC-ALF to obtain the first flag bit corresponding to the current slice, and the value of the first flag bit is used to indicate the current Whether the chrominance component of the target block in the slice is processed by the CC-ALF.
  • the value of the first flag bit is the first value, it indicates that the chrominance components of some target blocks in the current slice are processed by the CC-ALF, Or indicate that the chrominance components of all target blocks in the current slice are processed by the CC-ALF; if the value of the first flag bit is the second value, indicate the chrominance components of all target blocks in the current slice None of the degree components are processed using the CC-ALF.
  • the first decoding unit is further configured to: if the value of the first flag indicates that the chrominance components of some target blocks in the current slice use the CC -ALF processing, decoding from the video code stream to obtain the second flag bit corresponding to each target block included in the current slice, the value of the second flag bit is used to indicate the chrominance component of the corresponding target block Whether to use the CC-ALF treatment.
  • the two chrominance components of the target block each correspond to a second flag bit, and the value of each second flag bit is used to indicate the corresponding chroma component in the target block. whether the degree component is processed using the CC-ALF; or
  • the two chroma components of the target block correspond to the same second flag bit, and the value of the same second flag bit is used to indicate whether the two chroma components in the target block are processed by the CC-ALF .
  • the first decoding unit is further configured to: decode the video code stream to obtain an adaptive parameter set; if the value of the first flag indicates that the current The chrominance component of at least one target block in the slice is processed by the CC-ALF, then the index of the adaptive parameter set corresponding to the current slice is obtained by decoding from the video code stream; The corresponding filter coefficients are selected in the adaptive parameter set corresponding to the index of the parameter set to perform filtering processing on the chrominance component of the target block.
  • the current slice corresponds to a first flag bit for each of the two chroma components, and the value of each first flag bit is used to indicate the corresponding whether the chrominance component is processed using the CC-ALF; or
  • the current slice corresponds to the same first flag bit for the two chroma components, and the value of the same first flag bit is used to indicate whether the current slice uses the CC-ALF treatment.
  • the video decoding device 1100 further includes: a second decoding unit configured to determine the video image according to the block classification information when the luminance component is performing ALF
  • the chrominance component in the frame is decoded from the video code stream to obtain the adaptive parameter set and the third flag bit corresponding to the current slice before the block classification information when CC-ALF is performed, and the value of the third flag bit Used to indicate whether the chrominance component of the target block in the current slice is subjected to CC-ALF processing; if the value of the third flag indicates that the chrominance component of the target block in the current slice needs to perform CC-ALF processing, then decode from the video code stream to obtain the index of the adaptive parameter set corresponding to the current slice; obtain the chroma of the current slice from the adaptive parameter set corresponding to the index of the adaptive parameter set The fourth flag bit corresponding to the component, the value of the fourth flag bit is used to indicate the classification strategy adopted by the chrom
  • the value of the fourth flag bit corresponding to the chroma component of the current slice is the first value, it indicates that the chroma component of the current slice is performing
  • the classification strategy adopted during CC-ALF processing is to determine the block classification information of the chroma component when performing CC-ALF according to the block classification information of the luma component when performing ALF; if the chroma component of the current slice corresponds to The value of the fourth flag bit is the second value, indicating that the classification strategy adopted by the chrominance component of the current slice when CC-ALF processing is performed is the other classification strategy.
  • the second decoding unit is further configured to: if the value of the third flag indicates that the chrominance components of some target blocks in the current slice need to perform CC- ALF processing, then decode from the video code stream to obtain the fifth flag bit corresponding to each target block contained in the current slice, and the value of the fifth flag bit is used to indicate whether the chrominance component of the corresponding target block is Perform CC-ALF treatment.
  • each of the two chrominance components of the current slice corresponds to a fourth flag bit, and the value of each fourth flag bit is used to indicate the corresponding The classification strategy adopted by the chrominance component of CC-ALF processing; or
  • the two chroma components of the current slice correspond to the same fourth flag bit, and the value of the same fourth flag bit is used to indicate that the two chroma components in the current slice are performing CC-ALF
  • the first processing unit 1108 is further configured to: determine the size information of the target block according to a preset size; or
  • the size information of the target block is obtained by decoding from the sequence parameter set, picture parameter set, picture header or slice header of the video code stream.
  • the target block includes: a coding tree unit or a block whose size is smaller than the coding tree unit.
  • Fig. 12 shows a block diagram of a video encoding device according to an embodiment of the present application, and the video encoding device may be set in a video encoding device.
  • a video coding apparatus 1200 includes: an acquiring unit 1202 , a determining unit 1204 , a filtering unit 1206 and a second processing unit 1208 .
  • the obtaining unit 1202 is configured to obtain the block classification information of the luminance component in the video image frame when performing adaptive loop filtering (ALF);
  • the determining unit 1204 is configured to determine the block classification information according to the block classification information of the luminance component when performing ALF The block classification information of the chrominance component in the video image frame when performing cross-component adaptive loop filtering CC-ALF;
  • the filtering unit 1206 is configured to select according to the block classification information of the chrominance component when performing CC-ALF The corresponding filter coefficients perform CC-ALF processing on the chrominance component;
  • the second processing unit 1208 is configured to perform a CC-ALF processing on the video image according to the ALF processing result of the luminance component and the CC-ALF processing result of the chrominance component
  • the frame is encoded to obtain the video code stream.
  • the video encoding device 1200 further includes: a first encoding unit configured to encode the first slice corresponding to the current slice of the video image frame in the video code stream A flag bit, the value of the first flag bit is used to indicate whether the chrominance component of the target block in the current slice is processed by the CC-ALF.
  • the first encoding unit is further configured to: if the value of the first flag indicates that the chrominance components of some target blocks in the current slice use the CC -ALF processing, encoding in the video code stream to obtain the second flag bit corresponding to each target block included in the current slice, the value of the second flag bit is used to indicate the chrominance component of the corresponding target block Whether to use the CC-ALF treatment.
  • the first encoding unit is further configured to: before encoding the second flag bits corresponding to each target block included in the current slice in the video code stream , calculating the first rate-distortion cost of the chroma components of each target block when the CC-ALF processing is used, and the chroma components of each target block are performed based on the luminance component when the CC-ALF processing is performed.
  • the CC-ALF filter selected by the block classification information during ALF; calculate the second rate-distortion overhead of the chrominance component of each target block when CC-ALF processing is not performed; according to the first rate-distortion overhead and the obtained The second rate-distortion overhead is used to determine whether the chrominance components of the target blocks are processed by the CC-ALF.
  • the video encoding device 1200 further includes: a second encoding unit configured to encode a third flag bit corresponding to the current slice in the video code stream, the The value of the third flag bit is used to indicate whether the chrominance component of the target block in the current slice is subjected to CC-ALF processing; if the chrominance component of the target block in the current slice needs to perform CC-ALF processing, then Encode the index of the corresponding adaptive parameter set in the video code stream; encode the fourth flag bit corresponding to the chroma component of the current slice in the adaptive set corresponding to the index of the adaptive parameter set, the The value of the fourth flag bit is used to indicate the classification strategy adopted by the chroma component of the current slice when performing CC-ALF processing, and the classification strategy includes: according to the block classification information of the luma component when performing ALF, determine Block classification information of chrominance components when performing CC-ALF; or other classification strategies.
  • the second encoding unit is further configured to: if the value of the third flag indicates that the chrominance components of some target blocks in the current slice need to perform CC- ALF processing, encoding the fifth flag bit corresponding to each target block included in the current slice in the video code stream, the value of the fifth flag bit is used to indicate whether the chrominance component of the corresponding target block is CC-ALF treatment.
  • the second encoding unit is further configured to: encode the first corresponding to the chroma component of the current slice in the adaptation set corresponding to the index of the adaptation parameter set Before the four flag bits, calculate the third rate-distortion cost of the chrominance components of all target blocks in the current slice when the target classification strategy performs CC-ALF processing, and the target classification strategy is based on the luminance component when performing ALF Block classification information, to determine the block classification information of the chroma component when performing CC-ALF; calculate the fourth chroma component of all target blocks in the current slice when using the other classification strategy to perform CC-ALF processing Rate-distortion overhead: according to the third rate-distortion overhead and the fourth rate-distortion overhead, determine the classification strategy adopted by the chrominance components of the current slice when CC-ALF processing is performed.
  • the second processing unit 1208 is further configured to: determine the size information of the target block according to a preset size; or
  • the size information of the target block is encoded in the sequence parameter set, picture parameter set, picture header or slice header of the video code stream.
  • the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores computer-readable instructions, and the processor implements any of the above implementations when executing the computer-readable instructions method described in the example.
  • Fig. 13 shows a schematic structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present application.
  • the computer system 1300 includes a central processing unit (Central Processing Unit, CPU) 1301, which can be stored in a program in a read-only memory (Read-Only Memory, ROM) 1302 or loaded from a storage part 1308 to a random Access programs in the memory (Random Access Memory, RAM) 1303 to perform various appropriate actions and processes, such as performing the methods described in the above-mentioned embodiments.
  • CPU Central Processing Unit
  • RAM Random Access Memory
  • RAM 1303 various programs and data necessary for system operation are also stored.
  • the CPU 1301, ROM 1302, and RAM 1303 are connected to each other through a bus 1304.
  • An input/output (Input/Output, I/O) interface 1305 is also connected to the bus 1304 .
  • the following components are connected to the I/O interface 1305: an input part 1306 including a keyboard, a mouse, etc.; an output part 1307 including a cathode ray tube (Cathode Ray Tube, CRT), a liquid crystal display (Liquid Crystal Display, LCD) etc., and a speaker ; comprise the storage part 1308 of hard disk etc.; And comprise the communication part 1309 of the network interface card such as LAN (Local Area Network, local area network) card, modem etc. The communication section 1309 performs communication processing via a network such as the Internet.
  • a drive 1310 is also connected to the I/O interface 1305 as needed.
  • a removable medium 1311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 1310 as necessary so that a computer program read therefrom is installed into the storage section 1308 as necessary.
  • the processes described above with reference to the flowcharts can be implemented as computer software programs.
  • the present application also provides a computer program product, where the computer program product includes computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method described in any of the foregoing embodiments is implemented.
  • the computer readable instructions may be downloaded and installed from a network via communications portion 1309 and/or installed from removable media 1311 .
  • the units described in the embodiments of the present application may be implemented by software or by hardware, and the described units may also be set in a processor. Wherein, the names of these units do not constitute a limitation of the unit itself under certain circumstances.
  • the present application also provides a computer-readable medium.
  • the computer-readable medium may be included in the electronic device described in the above embodiments; it may also exist independently without being assembled into the electronic device. middle.
  • the above-mentioned computer-readable medium carries one or more computer-readable instructions, and when the above-mentioned one or more computer-readable instructions are executed by an electronic device, the electronic device is made to implement the method described in any of the above-mentioned embodiments.
  • this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of one module or unit described above can be further divided to be embodied by a plurality of modules or units.
  • the technical solutions according to the embodiments of the present application can be embodied in the form of software products, which can be stored in a non-volatile storage medium (which can be CD-ROM, U disk, mobile hard disk, etc.) or on the network , including several instructions to make a computing device (which may be a personal computer, server, touch terminal, or network device, etc.) execute the method according to the embodiment of the present application.
  • a non-volatile storage medium which can be CD-ROM, U disk, mobile hard disk, etc.
  • a computing device which may be a personal computer, server, touch terminal, or network device, etc.

Landscapes

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

Abstract

本申请的实施例提供了一种环路滤波方法、视频编解码方法、装置、介质及电子设备。该环路滤波方法包括:获取视频图像帧中的亮度分量在进行自适应环路滤波自适应环路滤波时的块分类信息(S710);根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波跨分量自适应环路滤波时的块分类信息(S720);根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理(S730)。

Description

环路滤波方法、视频编解码方法、装置、介质及电子设备
相关申请
本申请要求于2022年01月07日提交中国专利局,申请号为2022100178140,申请名称为“环路滤波方法、视频编解码方法、装置、介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机及通信技术领域,具体而言,涉及一种环路滤波方法、视频编解码方法、装置、介质及电子设备。
背景技术
跨分量自适应环路滤波(Cross-Component Adaptive Loop Filtering,简称CC-ALF)是一种维纳滤波器,可以根据视频内容(如游戏视频、在线会议视频等)的特性自适应的生成并使用不同的滤波器系数。
在目前的CC-ALF设计中,需要通过分类自适应选择滤波器系数,然而经常存在分类准确度低的问题,导致跨分量自适应环路滤波时性能较差。
发明内容
根据本申请的各种实施例,提供了一种环路滤波方法、视频编解码方法、装置、介质及电子设备。
根据本申请实施例的一个方面,提供了一种环路滤波方法,由视频编码设备或者视频解码设备执行,所述方法包括:获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息;根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息;及根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理。
根据本申请实施例的一个方面,提供了一种视频解码方法,由视频解码设备执行,所述方法包括:获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息;根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息;根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理;及根据所述亮度分量的自适应环路滤波处理结果,以及所述色度分量的跨分量自适应环路滤波处理结果,对视频码流进行解码处理。
根据本申请实施例的一个方面,提供了一种视频编码方法,由视频编码设备执行,所述方法包括:获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息;根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息;根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理;及根据所述亮度分量的自适应环路滤波处理结果,以及所述色度分量的跨分量自适应环路滤波处理,对视频图像帧进行编码处理,得到视频码流。
根据本申请实施例的一个方面,提供了一种环路滤波装置,包括:获取单元,配置为获取视频图像帧中的亮度分量在进行自适应环路滤波自适应环路滤波时的块分类信息;确定单元,配置为根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波跨分量自适应环路滤波时的块分类信息;滤波单元,配置为根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理。
根据本申请实施例的一个方面,提供了一种视频解码装置,包括:获取单元,配置为获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息;确定单元,配置为根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度 分量在进行跨分量自适应环路滤波时的块分类信息;滤波单元,配置为根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理;第一处理单元,配置为根据所述亮度分量的自适应环路滤波处理结果,以及所述色度分量的跨分量自适应环路滤波处理结果,对视频码流进行解码处理。
根据本申请实施例的一个方面,提供了一种视频编码装置,包括:获取单元,配置为获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息;确定单元,配置为根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息;滤波单元,配置为根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理;第二处理单元,配置为根据所述亮度分量的自适应环路滤波处理结果,以及所述色度分量的跨分量自适应环路滤波处理,对视频图像帧进行编码处理,得到视频码流。
根据本申请实施例的一个方面,提供了一种电子设备,所述电子设备包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述各种可选实施例中提供的方法。
根据本申请实施例的一个方面,提供了一种计算机存储介质,所述计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时上述各种可选实施例中提供的方法。
根据本申请实施例的一个方面,提供了一种计算机程序产品,所述计算机程序产品,包括计算机可读指令,所述计算机可读指令被处理器执行时上述各种可选实施例中提供的方法。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或传统技术中的技术方案,下面将对实施例或传统技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据公开的附图获得其他的附图。
图1示出了可以应用本申请实施例的技术方案的示例性系统架构的示意图;
图2示出视频编码装置和视频解码装置在流式传输系统中的放置方式示意图;
图3示出了一个视频编码器的基本流程图;
图4示出了VVC的整体结构以及环路滤波过程示意图;
图5示出了CC-ALF的流程及与ALF之间的关系示意图;
图6示出了一种菱形滤波器的示意图;
图7示出了根据本申请的一个实施例的环形滤波方法的流程图;
图8示出了根据本申请的一个实施例的视频编码方法的流程图;
图9示出了根据本申请的一个实施例的视频解码方法的流程图;
图10示出了根据本申请的一个实施例的环形滤波装置的框图;
图11示出了根据本申请的一个实施例的视频解码装置的框图;
图12示出了根据本申请的一个实施例的视频编码装置的框图;
图13示出了适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实 施例,都属于本申请保护的范围。
此外,本申请所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,有许多具体细节从而可以充分理解本申请的实施例。然而,本领域技术人员应意识到,在实施本申请的技术方案时可以不需用到实施例中的所有细节特征,可以省略一个或更多特定细节,或者可以采用其它的方法、元件、装置、步骤等。
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
需要说明的是:在本文中提及的“多个”是指两个或两个以上。“和/或”描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
图1示出了可以应用本申请实施例的技术方案的示例性系统架构的示意图。
如图1所示,系统架构100包括多个终端装置,所述终端装置可通过例如网络150彼此通信。举例来说,系统架构100可以包括通过网络150互连的第一终端装置110和第二终端装置120。在图1的实施例中,第一终端装置110和第二终端装置120执行单向数据传输。
举例来说,第一终端装置110可对视频数据(例如由终端装置110采集的视频图片流)进行编码以通过网络150传输到第二终端装置120,已编码的视频数据以一个或多个已编码视频码流形式传输,第二终端装置120可从网络150接收已编码视频数据,对已编码视频数据进行解码以恢复视频数据,并根据恢复的视频数据显示视频图片。
在本申请的一个实施例中,系统架构100可以包括执行已编码视频数据的双向传输的第三终端装置130和第四终端装置140,所述双向传输比如可以发生在视频会议期间。对于双向数据传输,第三终端装置130和第四终端装置140中的每个终端装置可对视频数据(例如由终端装置采集的视频图片流)进行编码,以通过网络150传输到第三终端装置130和第四终端装置140中的另一终端装置。第三终端装置130和第四终端装置140中的每个终端装置还可接收由第三终端装置130和第四终端装置140中的另一终端装置传输的已编码视频数据,且可对已编码视频数据进行解码以恢复视频数据,并可根据恢复的视频数据在可访问的显示装置上显示视频图片。
在图1的实施例中,第一终端装置110、第二终端装置120、第三终端装置130和第四终端装置140可为服务器或者终端,服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN(Content Delivery Network,内容分发网络)、以及大数据和人工智能平台等基础云计算服务的云服务器。终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、智能手表、智能语音交互设备、智能家电、车载终端、飞行器等,但并不局限于此。
网络150表示在第一终端装置110、第二终端装置120、第三终端装置130和第四终端装置140之间传送已编码视频数据的任何数目的网络,包括例如有线和/或无线通信网络。通信网络150可在电路交换和/或分组交换信道中交换数据。该网络可包括电信网络、局域网、广域网和/或互联网。出于本申请的目的,除非在下文中有所解释,否则网络150的架构和拓扑对于本申请公开的操作来说可能是无关紧要的。
在本申请的一个实施例中,图2示出视频编码装置和视频解码装置在流式传输环境 中的放置方式。本申请所公开主题可同等地适用于其它支持视频的应用,包括例如视频会议、数字TV(television,电视机)、在包括CD、DVD、存储棒等的数字介质上存储压缩视频等等。
流式传输系统可包括采集子系统213,采集子系统213可包括数码相机等视频源201,视频源创建未压缩的视频图片流202。在实施例中,视频图片流202包括由数码相机拍摄的样本。相较于已编码的视频数据204(或已编码的视频码流204),视频图片流202被描绘为粗线以强调高数据量的视频图片流,视频图片流202可由电子装置220处理,电子装置220包括耦接到视频源201的视频编码装置203。视频编码装置203可包括硬件、软件或软硬件组合以实现或实施如下文更详细地描述的所公开主题的各方面。相较于视频图片流202,已编码的视频数据204(或已编码的视频码流204)被描绘为细线以强调较低数据量的已编码的视频数据204(或已编码的视频码流204),其可存储在流式传输服务器205上以供将来使用。一个或多个流式传输客户端子系统,例如图2中的客户端子系统206和客户端子系统208,可访问流式传输服务器205以检索已编码的视频数据204的副本207和副本209。客户端子系统206可包括例如电子装置230中的视频解码装置210。视频解码装置210对已编码的视频数据的传入副本207进行解码,且产生可在显示器212(例如显示屏)或另一呈现装置上呈现的输出视频图片流211。在一些流式传输系统中,可根据某些视频编码/压缩标准对已编码的视频数据204、视频数据207和视频数据209(例如视频码流)进行编码。
应注意,电子装置220和电子装置230可包括图中未示出的其它组件。举例来说,电子装置220可包括视频解码装置,且电子装置230还可包括视频编码装置。
在本申请的一个实施例中,以国际视频编码标准HEVC(High Efficiency Video Coding,高效率视频编码)、VVC(Versatile Video Coding,多功能视频编码),以及中国国家视频编码标准AVS为例,当输入一个视频帧图像之后,会根据一个块大小,将视频帧图像划分成若干个不重叠的处理单元,每个处理单元将进行类似的压缩操作。这个处理单元被称作CTU,或者称之为LCU(Largest Coding Unit,最大编码单元)。CTU再往下可以继续进行更加精细的划分,得到一个或多个基本的编码单元CU(Coding Unit,编码单元),CU是一个编码环节中最基本的元素。
以下介绍对CU进行编码时的一些概念:
预测编码(Predictive Coding):预测编码包括了帧内预测和帧间预测等方式,原始视频信号经过选定的已重建视频信号的预测后,得到残差视频信号。编码端需要为当前CU决定选择哪一种预测编码模式,并告知解码端。其中,帧内预测是指预测的信号来自于同一图像内已经编码重建过的区域;帧间预测是指预测的信号来自已经编码过的、不同于当前图像的其它图像(称之为参考图像)。
变换及量化(Transform&Quantization):残差视频信号经过DFT(Discrete Fourier Transform,离散傅里叶变换)、DCT(Discrete Cosine Transform,离散余弦变换)等变换操作后,将信号转换到变换域中,称之为变换系数。变换系数进一步进行有损的量化操作,丢失掉一定的信息,使得量化后的信号有利于压缩表达。在一些视频编码标准中,可能有多于一种变换方式可以选择,因此编码端也需要为当前CU选择其中的一种变换方式,并告知解码端。量化的精细程度通常由量化参数(Quantization Parameter,简称QP)来决定,QP取值较大,表示更大取值范围的系数将被量化为同一个输出,因此通常会带来更大的失真及较低的码率;相反,QP取值较小,表示较小取值范围的系数将被量化为同一个输出,因此通常会带来较小的失真,同时对应较高的码率。
熵编码(Entropy Coding)或统计编码:量化后的变换域信号将根据各个值出现的频率进行统计压缩编码,最后输出二值化(0或者1)的压缩码流。同时,编码产生其他信息,例如选择的编码模式、运动矢量数据等,也需要进行熵编码以降低码率。统计编码是一种无损的编码方式,可以有效的降低表达同样信号所需要的码率,常见的统计编 码方式有变长编码(Variable Length Coding,简称VLC)或者基于上下文的二值化算术编码(Content Adaptive Binary Arithmetic Coding,简称CABAC)。
基于上下文的二值化算术编码(CABAC)过程主要包含3个步骤:二值化、上下文建模和二进制算术编码。在对输入的语法元素进行二值化处理后,可以通过常规编码模式和旁路编码模式(Bypass Coding Mode)对二元数据进行编码。旁路编码模式无须为每个二元位分配特定的概率模型,输入的二元位bin值直接用一个简单的旁路编码器进行编码,以加快整个编码以及解码的速度。一般情况下,不同的语法元素之间并不是完全独立的,且相同语法元素自身也具有一定的记忆性。因此,根据条件熵理论,利用其他已编码的语法元素进行条件编码,相对于独立编码或者无记忆编码能够进一步提高编码性能。这些用来作为条件的已编码符号信息称为上下文。在常规编码模式中,语法元素的二元位顺序地进入上下文模型器,编码器根据先前编码过的语法元素或二元位的值,为每一个输入的二元位分配合适的概率模型,该过程即为上下文建模。通过ctxIdxInc(context index increment,上下文索引增量)和ctxIdxStart(context index Start,上下文起始索引)即可定位到语法元素所对应的上下文模型。将bin值和分配的概率模型一起送入二元算术编码器进行编码后,需要根据bin值更新上下文模型,也就是编码中的自适应过程。
环路滤波(Loop Filtering):经过变化及量化的信号会通过反量化、反变换及预测补偿的操作获得重建图像。重建图像与原始图像相比由于存在量化的影响,部分信息与原始图像有所不同,即重建图像会产生失真(Distortion)。因此,可以对重建图像进行滤波操作,以有效降低量化所产生的失真程度。由于这些经过滤波后的重建图像将作为后续编码图像的参考来对将来的图像信号进行预测,因此上述的滤波操作也被称为环路滤波,即在编码环路内的滤波操作。
在本申请的一个实施例中,图3示出了一个视频编码器的基本流程图,在该流程中以帧内预测为例进行说明。其中,原始图像信号s k[x,y]与预测图像信号
Figure PCTCN2022137908-appb-000001
做差值运算,得到残差信号u k[x,y],残差信号u k[x,y]经过变换及量化处理之后得到量化系数,量化系数一方面通过熵编码得到编码后的比特流,另一方面通过反量化及反变换处理得到重构残差信号u' k[x,y],预测图像信号
Figure PCTCN2022137908-appb-000002
与重构残差信号u' k[x,y]叠加生成重建图像信号
Figure PCTCN2022137908-appb-000003
重建图像信号
Figure PCTCN2022137908-appb-000004
一方面输入至帧内模式决策模块和帧内预测模块进行帧内预测处理,另一方面通过环路滤波进行滤波处理,并输出滤波后的图像信号s' k[x,y],滤波后的图像信号s' k[x,y]可以作为下一帧的参考图像进行运动估计及运动补偿预测。然后基于运动补偿预测的结果s' r[x+m x,y+m y]和帧内预测结果
Figure PCTCN2022137908-appb-000005
得到下一帧的预测图像信号
Figure PCTCN2022137908-appb-000006
并继续重复上述过程,直至编码完成。
在上述的编码流程中,环路滤波是视频编码的核心模块之一,可以有效去除多种编码失真。最新一代国际视频编码标准VVC支持四种不同类型的环路滤波器:去块效应滤波器(Deblocking filter,简称DF)、样点自适应补偿(Sample Adaptive Offset,简称SAO)、自适应环路滤波(Adaptive Loop Filter,简称ALF)以及跨分量自适应环路滤波(CC-ALF)。
可选地,VVC的整体结构以及环路滤波过程如图4所示,其整体流程与图3所示的编码器流程类似,在环路滤波中,ALF和CC-ALF是一种维纳滤波器,可以根据不同视频分量的内容自适应的决定滤波器系数,从而减少重建分量和原始分量之间的均方误差(Mean Square Error,简称MSE)。其中,ALF的输入是经过DF和SAO滤波后的重建像素值,输出的是经过增强的重建亮度图像和重建色度图像;而CC-ALF的输入是经过DF和SAO滤波后、且未经ALF处理之前的亮度分量,输出的是对应的色度分量的修正值。即CC-ALF只作用于色度分量,具体是利用亮度分量和色度分量之间的相关性,通过对亮度分量的线性滤波得到色度分量的修正值,该修正值与经过ALF滤波后的色度分量相加, 作为最终的重建色度分量。作为一种自适应滤波器,维纳滤波器可以为不同特性的视频内容产生不同的滤波系数,因此ALF与CC-ALF需要将视频内容进行分类,为各个类别的视频内容使用对应的滤波器。在当前的VVC设计中,亮度分量的ALF支持25种不同类别的滤波器,每个色度分量的ALF最多支持8种不同类别的滤波器,而每个色度分量的CC-ALF最多支持4种不同类别的滤波器。
对于亮度分量而言,ALF会在子块级(VVC中为4×4的亮度块)自适应的使用不同的滤波器,即需要将每个4×4的亮度分量像素块划分为25类中的一类。亮度分量像素块的分类索引C是由该亮度分量像素块的方向性特征(Directionality)D和量化的活动性特征(Activity)
Figure PCTCN2022137908-appb-000007
共同得到的。具体如下述公式(1)所示:
Figure PCTCN2022137908-appb-000008
为计算D和
Figure PCTCN2022137908-appb-000009
首先需要计算4×4的亮度分量像素块内每个像素的水平梯度值H k,l、竖直梯度值V k,l、对角方向梯度值D0 k,l和反对角方向梯度值D1 k,l,具体如下述公式(2)至公式(5)所示:
H k,l=|2R(k,l)-R(k-1,l)-R(k+1,l)|    公式(2)
V k,l=|2R(k,l)-R(k,l-1)-R(k,l+1)|    公式(3)
D0 k,l=|2R(k,l)-R(k-1,l-1)-R(k+1,l+1)|   公式(4)
D1 k,l-|2R(k,l)-R(k-1,l+1)-R(k+1,l-1)|    公式(5)
在上述公式中,R(k,l)表示(k,l)位置经过ALF滤波之前的重建像素值;R(k-1,l)表示(k-1,l)位置经过ALF滤波之前的重建像素值;R(k+1,l)表示(k+1,l)位置经过ALF滤波之前的重建像素值;R(k,l-1)表示(k,l-1)位置经过ALF滤波之前的重建像素值;R(k,l+1)表示(k,l+1)位置经过ALF滤波之前的重建像素值;R(k-1,l-1)表示(k-1,l-1)位置经过ALF滤波之前的重建像素值;R(k+1,l+1)表示(k+1,l+1)位置经过ALF滤波之前的重建像素值;R(k-1,l+1)表示(k-1,l+1)位置经过ALF滤波之前的重建像素值;R(k+1,l-1)表示(k+1,l-1)位置经过ALF滤波之前的重建像素值。
基于每个像素的梯度,可以计算得到每个4×4的像素块整体的水平梯度g h、竖直梯度g v、对角方向梯度g d0和反对角方向梯度g d1,具体如下述公式(6)和公式(7)所示:
Figure PCTCN2022137908-appb-000010
Figure PCTCN2022137908-appb-000011
其中,i和j表示4×4的像素块左上角的像素坐标。
在得到像素块的梯度值后,水平方向梯度值与竖直方向梯度值中的最大值
Figure PCTCN2022137908-appb-000012
和最小值
Figure PCTCN2022137908-appb-000013
分别为:
Figure PCTCN2022137908-appb-000014
对角方向梯度值与反对角方向梯度值中的最大值
Figure PCTCN2022137908-appb-000015
和最小值
Figure PCTCN2022137908-appb-000016
分别为:
Figure PCTCN2022137908-appb-000017
方向性特征D是通过比较公式(8)和公式(9)得到的四个方向的梯度值的最大值和最小值导出的,具体过程为:
S1:如果
Figure PCTCN2022137908-appb-000018
同时成立,那么D设为0;
S2:如果
Figure PCTCN2022137908-appb-000019
则转到S3,否则转到S4;
S3:如果
Figure PCTCN2022137908-appb-000020
则D设为2,否则D设为1;
S4:如果
Figure PCTCN2022137908-appb-000021
则D设为4,否则D设为3。
其中的t 1和t 2为设定的常数。
上述公式(1)中的活动性特征
Figure PCTCN2022137908-appb-000022
是将通过如下公式(10)计算得到的特征A量化到[0-4]的区间所得到的:
Figure PCTCN2022137908-appb-000023
此外,在对每个4×4的亮度分量像素块进行滤波之前,会根据当前块的梯度值按照下述表1所示的规则对滤波器系数和对应的限幅值进行几何变换,包括不变(No transformation)、对角变换(Diagonal)、竖直翻转(Vertical flip)以及旋转变换(Rotation)。其中,对滤波器系数应用几何变换等效于在系数不变的情况下对像素值应用几何变换再进行滤波,几何变换的目的是为了尽可能的对齐不同块内容的方向性,从而减少ALF所需的分类数目,使不同的像素共享相同的滤波器系数。使用几何变换可以在不增加ALF滤波器数目的情况下,将真实的分类从25类提高到100类,提升了其自适应性。
梯度值 几何变换
g d1<g d0并且g h<g v 不变
g d1<g d0并且g v≤g h 对角变换
g d0≤g d1并且g h<g v 竖直翻转
g d0≤g d1并且g v≤g h 旋转变换
表1
以上介绍了ALF对亮度分量像素块的分类及几何变换过程,以下介绍CC-ALF的滤波与分类过程。
CC-ALF通过对亮度分量的线性滤波为每个色度分量生成对应的修正值,其流程以及与ALF的关系如图5所示,经过SAO滤波后的亮度分量R Y输入至ALF滤波器进行亮度分量的滤波处理并输出亮度分量的值Y;同时,亮度分量经过SAO滤波后的值R Y输入至CC-ALF滤波器对两个色度分量Cb和Cr分别进行滤波处理,得到两个色度分量的修正值ΔR Cb和ΔR Cr。两个色度分量经过SAO滤波后的值输入至ALF滤波器进行色度分量的滤波,然后ALF滤波器对两个色度分量的滤波结果分别与修正值ΔR Cb和ΔR Cr叠加,最后输出色度分量的值Cb和Cr。
具体而言,CC-ALF的滤波过程可以如下公式(11)所示:
Figure PCTCN2022137908-appb-000024
其中,ΔR i(x,y)表示色度分量i在样本位置(x,y)处的修正值(也即偏移值);S i表示CC-ALF滤波器在亮度分量上支持的滤波区域;c i(x 0,y 0)表示色度分量i对应的滤波器系数;R Y表示亮度分量;(x c,y C)表示由色度分量得到的亮度分量的位置;(x 0,y 0)表示亮度分量对应的偏移位置,亮度分量对应的偏移位置是由色度分量的坐标根据视频序列对应的亮度和色度的缩放关系经过变换得到的。
CC-ALF支持如图6所示的3×4菱形滤波器。与ALF相比,CC-ALF的滤波器系数取消了对称性的限制,使其可以灵活的适应多种亮度分量和色度分量的相对关系。此外,为了减少需要传输的滤波器系数,在当前VVC的设计中,CC-ALF对其滤波器系数有如下两个限制:1、CC-ALF全部系数的和限制为0,因此对于3×4的菱形滤波器而言,只需要计算并传输7个滤波器系数,中心位置的滤波器系数可以根据该条件在解码端自动推断得出;2、每个需要传输的滤波器系数的绝对值必须为2的次方,且最多能用6比特表示,因此CC-ALF的滤波器系数的绝对值取值为{0,2,4,8,16,32,64}。该设计可以使用移位操作来代替乘法运算,减少乘法运算的次数。
与亮度分量的ALF支持子块级分类与自适应选择不同,CC-ALF仅支持CTU级的分类与自适应选择。对每个色度分量而言,一个CTU内的全部色度像素属于同一类别,使用相同的滤波器。
此外,一个APS(Adaptation Parameter Set,自适应参数集)可以包含最多25组亮度滤波器系数与对应的限幅值索引、两个色度分量最多8组色度滤波器系数与对应的限幅值索引,以及每个色度分量最多4组CC-ALF滤波器系数。为了节省码率,对于亮度分量的ALF滤波器而言,不同类别的滤波器系数可以进行合并(Merge),进而使得多个类别共用一组滤波器系数,并且编码端会通过率失真优化(Rate-Distortion Optimization,简称RDO)决定哪些类别的系数可以合并,同时在条带头(Slice Header)中会标记当前条带使用的APS的索引。CC-ALF支持CTU级别的自适应,对于有多个滤波器的情况,在CTU级别会为每个色度分量自适应的选择是否使用CC-ALF以及所使用的滤波器的索引。
在目前的CC-ALF设计中,对每个色度分量最多只支持4个滤波器,即最多只支持4种不同的类别。类别的上限导致不同类别的可区分程度较差;CTU级粗糙的自适应选择导致不同内容的可区分程度较差,这些都会减少CC-ALF中内容分类的准确度,降低CC-ALF的自适应能力,进而影响CC-ALF的性能。
基于此,本申请实施例的技术方案提出了一种新的技术方案,可以增加色度分量在进行CC-ALF时的块分类类别,以提高CC-ALF中内容分类的准确度,进而可以提高CC-ALF的自适应能力和滤波性能,从而有利于提升编解码效率。
以下对本申请实施例的技术方案的实现细节进行详细阐述:
图7示出了根据本申请的一个实施例的环路滤波方法的流程图,该环路滤波方法可以由视频编码设备或者视频解码设备来执行。参照图7所示,该环路滤波方法至少包括步骤S710至步骤S730,详细介绍如下:
在步骤S710中,获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息。
其中,块分类信息指的是用于指示子块(subblock)级分类结果的信息,块分类信息可以是分类类别对应的标识信息,具体例如可以是分类索引。
可选地,亮度分量在进行ALF时的块分类过程可以参考前述公式(1)至公式(10)计算得到具体的分类索引,进而可以确定亮度分量在进行ALF时的块分类信息。
在步骤S720中,根据亮度分量在进行自适应环路滤波时的块分类信息,确定视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息。
在本申请的一个实施例中,可以将亮度分量在进行ALF时针对子块的分类结果,作为色度分量在进行CC-ALF时对相同尺寸块的分类结果。例如,假设某个子块的亮度分量在进行ALF时的分类结果指示该子块属于第3类,则该子块的色度分量在进行CC-ALF时同样属于第3类,即该个子块的亮度分量在进行ALF时的类别可以和其在在进行CC-ALF时的类别进行共用。
由于亮度分量在进行ALF时的分类类别较多,因此通过将亮度分量在进行ALF时针对子块的分类结果,作为色度分量在进行CC-ALF时对相同尺寸块的分类结果,使得可以增加色度分量在进行CC-ALF时的块分类类别,提高了CC-ALF中内容分类的准确度,进而可以提高CC-ALF的自适应能力和滤波性能,从而有利于提升编解码效率。
在本申请的一个实施例中,可以将亮度分量在进行ALF时针对子块的分类结果及对应的几何变换类型,作为色度分量在进行CC-ALF时对相同尺寸块的分类结果和几何变换类型。该实施例的技术方案同样可以增加色度分量在进行CC-ALF时的块分类类别,提高了CC-ALF中内容分类的准确度,进而可以提高CC-ALF的自适应能力和滤波性能,从而有利于提升编解码效率。
在步骤S730中,根据色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对色度分量进行跨分量自适应环路滤波处理。
可选地,可以针对色度分量在进行CC-ALF时的块分类类别,分别确定对应的滤波器系数,进而可以根据色度分量在进行CC-ALF时的块分类信息,选择对应的滤波器系数对 色度分量进行CC-ALF处理。
在本申请的一个实施例中,还可以根据亮度分量在进行ALF时对各类滤波器的合并结果,确定色度分量在进行CC-ALF时对各类滤波器的合并结果。比如,将亮度分量在进行ALF时对各类滤波器的合并结果作为色度分量在进行CC-ALF时对各类滤波器的合并结果。在具体的实施过程中,在进行ALF时对各类滤波器进行合并,可以是遍历每一种可能的合并方式对至少两个ALF滤波器进行合并,并计算对应的率失真开销,将按照率失真开销最小的合并方式得到合并结果作为在进行ALF时对各类滤波器的合并结果。通过对滤波器进行合并,可以传输尽量少的滤波器系数,节省码率。
在本申请的一个实施例中,还可以根据亮度分量在ALF过程中进行滤波器合并的率失真开销,以及色度分量在CC-ALF过程中进行滤波器合并的率失真开销,确定亮度分量在进行ALF时,以及色度分量在进行CC-ALF时对各类滤波器的合并结果。该实施例的技术方案可以联合优化亮度分量的ALF和色度分量的CC-ALF,以同时决定亮度分量的ALF与色度分量的CC-ALF针对各类滤波器的合并结果。
在本申请的一个实施例中,可以根据亮度分量在进行ALF时所确定的滤波器数量,确定色度分量在进行CC-ALF时的可用滤波器数量。比如,可以将亮度分量在进行ALF时所确定的滤波器数量作为色度分量在进行CC-ALF时的可用滤波器数量。
需要说明的是,图7所示实施例的环路滤波方法可以应用在视频编码端的编码过程中,也可以应用在视频解码端的解码过程中。
图8示出了根据本申请的一个实施例的视频编码方法的流程图,该视频编码方法可以由视频编码设备来执行。参照图8所示,该视频编码方法至少包括步骤S810至步骤S840,详细介绍如下:
在步骤S810中,获取视频图像帧中的亮度分量在进行ALF时的块分类信息。
在步骤S820中,根据亮度分量在进行ALF时的块分类信息,确定视频图像帧中的色度分量在进行CC-ALF时的块分类信息。
在步骤S830中,根据色度分量在进行CC-ALF时的块分类信息,选择对应的滤波器系数对所述色度分量进行CC-ALF处理。
关于步骤S810至S830的相关解释和实现方式可以参考上文实施例。
在步骤S840中,根据所述亮度分量的ALF处理结果,以及所述色度分量的CC-ALF处理,对视频图像帧进行编码处理,得到视频码流。具体地,可以根据亮度分量在进行ALF时的块分类信息确定对应的滤波器系数,根据滤波器系数对亮度分量进行ALF处理,得到ALF处理结果,从而可以根据ALF处理结果以及CC-ALF处理结果,对视频图像帧进行编码处理,得到视频码流。
在图8所示的视频编码方法中,可以增加色度分量在进行CC-ALF时的块分类类别,以提高CC-ALF中内容分类的准确度,进而可以提高CC-ALF的自适应能力和滤波性能,从而有利于提升编码效率。
在本申请的实施例中,图8所示的视频编码方法中的块分类策略(即根据亮度分量在进行ALF时的块分类信息,确定色度分量在进行CC-ALF时的块分类信息)既可以单独来使用,也可以与其它的分类策略(如相关技术中的分类策略)共同使用。以下对这两种情况分别进行说明:
单独使用图8中所示的块分类策略
在本申请的一个实施例中,如果单独使用图8所示的块分类策略,那么编码端可以在视频码流中编码视频图像帧的当前条带所对应的第一标志位,该第一标志位的值用于指示当前条带中的目标块的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式(即采用图8中的块分类策略的CC-ALF处理方式)。在该实施例中,由于是单独使用图8所示的块分类策略,因此当前条带所对应的第一标志位可以直接指示当前条带内的目标块的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。
可选地,如果第一标志位的值为第一值(比如为1),则指示当前条带中部分目标块的色度分量采用本申请实施例中所提出的CC-ALF处理方式,或指示当前条带中全部目标块的色度分量采用本申请实施例中所提出的CC-ALF处理方式。
如果第一标志位的值为第二值(比如为0),则指示当前条带中全部目标块的色度分量均不采用本申请实施例中所提出的CC-ALF处理方式。
在本申请的一个实施例中,第一标志位为条带级的标志位,如果第一标志位的值指示当前条带中全部目标块的色度分量采用本申请实施例中所提出的CC-ALF处理方式,或者指示当前条带中全部目标块的色度分量不采用本申请实施例中所提出的CC-ALF处理方式,那么无需编码块级的标志位。而在第一标志位的值指示当前条带中部分目标块的色度分量采用本申请实施例中所提出的CC-ALF处理方式时,编码端可以在视频码流中编码得到当前条带包含的各个目标块所对应的第二标志位,该第二标志位的值用于指示对应目标块的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。即在该实施例中,可以在条带级的标志位的基础上,进一步通过块级标志位(即第二标志位)来指示那些目标块的色度分量需要采用本申请实施例中所提出的CC-ALF处理方式。
可选地,由于存在两个色度分量(Cr和Cb),因此对于一个目标块而言,可以针对目标块的两个色度分量各自设置一个第二标志位,每个第二标志位的值用于指示目标块中对应的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。
作为一种可选的处理方式,目标块的两个色度分量(Cr和Cb)也可以对应于同一个第二标志位,该同一个第二标志位的值用于指示目标块中两个色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。
类似地,对于当前条带而言,可以针对当前条带的两个色度分量各自设置一个第一标志位,每个第一标志位的值用于指示当前条带中对应的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。
作为一种可选的处理方式,当前条带的两个色度分量也可以对应于同一个第一标志位,该同一个第一标志位的值用于指示当前条带中的两个色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。
需要说明的是:如果条带级的标志位是针对两个色度分量分别设置了一个第一标志位,那么块级的标志位也可以是针对两个色度分量分别设置一个第二标志位。如果块级的标志位是针对两个色度分量设置了一个第二标志位,那么条带级的标志位也只需要针对两个色度分量设置了一个第一标志位即可。
在本申请的一个实施例中,编码端可以通过率失真优化的方式来确定各个目标块的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。具体而言,编码端可以计算各个目标块的色度分量在采用本申请实施例中所提出的CC-ALF处理时的第一率失真开销,并计算各个目标块的色度分量在不进行CC-ALF处理时的第二率失真开销,然后根据第一率失真开销和第二率失真开销,确定各个目标块的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。比如,如果某个目标块的色度分量对应的第一率失真开销小于第二率失真开销,那么说明该目标块的色度分量采用本申请实施例中所提出的CC-ALF处理方式;如果某个目标块的色度分量对应的第一率失真开销大于第二率失真开销,那么说明该目标块的色度分量不采用本申请实施例中所提出的CC-ALF处理方式。通过计算率失真开销来确定是否采用本申请实施例中所提出的CC-ALF处理方式,可以在保证编码效率的同时,尽可能的节省率失真开销。
同时,需要说明的是:在决策各个目标块的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式时,可以针对各个目标块的两个色度分量分别进行决策(即分别计算对应的率失真开销),也可以针对各个目标块的两个色度分量同时进行决策(即将率失真开销叠加起来)。
同时使用图8中所示的块分类策略和其它的分类策略
在本申请的一个实施例中,如果同时使用图8中所示的块分类策略和其它的分类策略,那么在进行编码时,需要在视频码流中编码当前条带所对应的第三标志位,该第三标志位的值用于指示当前条带中的目标块的色度分量是否进行CC-ALF处理;若当前条带中目标块的色度分量需要进行CC-ALF处理,则在视频码流中编码对应的自适应参数集的索引;在自适应参数集的索引所对应的自适应集中编码当前条带的色度分量所对应的第四标志位,该第四标志位的值用于指示当前条带的色度分量在进行CC-ALF处理时所采用的分类策略,该分类策略包括图8中所示的块分类策略(即根据亮度分量在进行ALF时的块分类信息,确定色度分量在进行CC-ALF时的块分类信息)或者其它的分类策略。
换句话说,如果同时使用了图8中所示的块分类策略和其它的分类策略,那么需要通过条带级的标志位(即第三标志位)指示当前条带中的目标块的色度分量是否进行CC-ALF处理(可以是本申请实施例中所提出的CC-ALF处理方式或者是其它的CC-ALF处理方式),如果进行CC-ALF处理,那么需要在对应的自适应参数集(通过自适应参数集的索引来进行引用)中编码分类策略的标志位(即第四标志位),以明确指示采用图8中所示的块分类策略还是其它的分类策略。比如,若第四标志位的值为1,则说明需要采用图8中所示的块分类策略,如果第四标志位的值为0,则说明需要采用其它的分类策略。
需要说明的是:对于当前条带而言,如果当前条带引用的是已经编码过的帧的APS,那么由于对应的第四标志位已经在之前的APS中编码过了,就不用再次编码了;如果当前条带应用的APS还未进行编码(比如是当前帧的APS),那么是需要在APS中编码第四标志位的。
可选地,如果第三标志位的值指示当前条带中部分目标块的色度分量需要进行CC-ALF处理,那么为了区分哪些目标块需要进行CC-ALF处理,则可以在视频码流中编码当前条带包含的各个目标块所对应的第五标志位,该第五标志位的值用于指示对应目标块的色度分量是否进行CC-ALF处理。比如,若某个目标块所对应的第五标志位的值为1,则说明该目标块的色度分量需要进行CC-ALF处理;若某个目标块所对应的第五标志位的值为0,则说明该目标块的色度分量不需要进行CC-ALF处理。
需要说明的是:如果条带级的标志位(即第三标志位)指示的是当前条带中全部目标块的色度分量不需要进行CC-ALF处理,或者指示全部目标块的色度分量需要进行CC-ALF处理,那么就不需要引入块级的标志位(即第五标志位)。
作为一个示例,比如条带级标志位(即第三标志位)的值指示条带中的部分目标块需要进行CC-ALF处理,且编码分类策略的标志位(即第四标志位)指示采用图8中所示的块分类策略,那么如果某个目标块的块级标志位(即第五标志位)指示需要进行CC-ALF处理,那么对于该目标块而言,会采用图8中所示的块分类策略进行CC-ALF处理。
可选地,由于存在两个色度分量(Cr和Cb),因此对于一个条带而言,可以采用类似前述实施例的技术方案,即针对当前条带的两个色度分量各自设置一个第三标志位,或者针对当前条带的两个色度分量设置同一个第三标志位。同样地,对于目标块而言,也可以针对目标块的两个色度分量各自设置一个第五标志位,或者针对目标块的两个色度分量设置同一个第五标志位。类似地,也可以针对两个色度分量在APS中各自设置一个第四标志位,或者针对两个色度分量在APS中设置同一个第四标志位。具体的说明可以参照前述实施例的技术方案,不再详述。
在本申请的一个实施例中,编码端可以通过率失真优化的方式来确定当前条带的色度分量在进行CC-ALF处理时是采用图8中所示的块分类策略还是其它的分类策略。具体而言,编码端可以计算当前条带中全部目标块的色度分量在采用图8所示的块分类策略进行CC-ALF处理时的第三率失真开销,并计算当前条带中全部目标块的色度分量在采用其它的分类策略进行CC-ALF处理时的第四率失真开销,然后根据第三率失真开销 和第四率失真开销,确定当前条带的色度分量在进行CC-ALF处理时所采用的分类策略。比如,如果某个条带对应的第三率失真开销小于第四率失真开销,那么说明该条带的色度分量在进行CC-ALF处理时是采用图8中所示的块分类策略;如果某个条带对应的第三率失真开销大于第四率失真开销,那么说明该条带的色度分量在进行CC-ALF处理时是采用其它的分类策略。
在本申请的一个实施例中,前述实施例中的目标块的尺寸信息可以是编码端与解码端预先设定好的;或者也可以是由编码端确定出的,并且在确定出目标块的尺寸信息之后,在视频码流的序列参数集、图像参数集、图像头或条带头中编码目标块的尺寸信息。比如,目标块可以是CTU,也可以是比CTU更小的块。
图9示出了根据本申请的一个实施例的视频解码方法的流程图,该视频解码方法可以由视频解码设备来执行。参照图9所示,该视频解码方法至少包括步骤S910至步骤S940,详细介绍如下:
在步骤S910中,获取视频图像帧中的亮度分量在进行ALF时的块分类信息。
在步骤S920中,根据亮度分量在进行ALF时的块分类信息,确定视频图像帧中的色度分量在进行CC-ALF时的块分类信息。
在步骤S930中,根据色度分量在进行CC-ALF时的块分类信息,选择对应的滤波器系数对所述色度分量进行CC-ALF处理。
关于步骤S810至S830的相关解释和实现方式可以参考上文实施例。
在步骤S940中,根据亮度分量的ALF处理结果,以及色度分量的CC-ALF处理结果,对视频码流进行解码处理。
具体地,可以根据亮度分量在进行ALF时的块分类信息确定对应的滤波器系数,根据滤波器系数对亮度分量进行ALF处理,得到ALF处理结果,从而可以根据ALF处理结果以及CC-ALF处理结果,对视频码流进行解码处理。
在图9所示的视频解码方法中,可以增加色度分量在进行CC-ALF时的块分类类别,以提高CC-ALF中内容分类的准确度,进而可以提高CC-ALF的自适应能力和滤波性能,从而有利于提升编解码效率。
在本申请的实施例中,图9所示的视频解码方法中的块分类策略(即根据亮度分量在进行ALF时的块分类信息,确定色度分量在进行CC-ALF时的块分类信息)既可以单独来使用,也可以与其它的分类策略(如相关技术中的分类策略)共同使用。以下对这两种情况分别进行说明:
单独使用图9中所示的块分类策略
在本申请的一个实施例中,如果单独使用图9所示的块分类策略(图9中所示的块分类策略与图8中所示的块分类策略是相同的),那么解码端可以从视频码流中解码得到当前条带所对应的第一标志位,该第一标志位的值用于指示当前条带中的目标块的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式(即采用图9中的块分类策略的CC-ALF处理方式)。在该实施例中,由于是单独使用图9所示的块分类策略,因此当前条带所对应的第一标志位可以直接指示当前条带内的目标块的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。
可选地,如果第一标志位的值为第一值(比如为1),则指示当前条带中部分目标块的色度分量采用本申请实施例中所提出的CC-ALF处理方式,或指示当前条带中全部目标块的色度分量采用本申请实施例中所提出的CC-ALF处理方式。
如果第一标志位的值为第二值(比如为0),则指示当前条带中全部目标块的色度分量均不采用本申请实施例中所提出的CC-ALF处理方式。
在本申请的一个实施例中,第一标志位为条带级的标志位,如果第一标志位的值指示当前条带中全部目标块的色度分量采用本申请实施例中所提出的CC-ALF处理方式,或者指示当前条带中全部目标块的色度分量不采用本申请实施例中所提出的CC-ALF处 理方式,那么无需解码块级的标志位(编码端也无需编码块级的标志位)。而在第一标志位的值指示当前条带中部分目标块的色度分量采用本申请实施例中所提出的CC-ALF处理方式时,解码端需要在视频码流中解码得到当前条带包含的各个目标块所对应的第二标志位,该第二标志位的值用于指示对应目标块的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。即在该实施例中,可以在条带级的标志位的基础上,进一步通过解码得到块级标志位(即第二标志位)来指示那些目标块的色度分量需要采用本申请实施例中所提出的CC-ALF处理方式。
可选地,由于存在两个色度分量(Cr和Cb),因此对于一个目标块而言,可以针对目标块的两个色度分量各自设置一个第二标志位,每个第二标志位的值用于指示目标块中对应的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。
作为一种可选的处理方式,目标块的两个色度分量(Cr和Cb)也可以对应于同一个第二标志位,该同一个第二标志位的值用于指示目标块中两个色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。
类似地,对于当前条带而言,可以针对当前条带的两个色度分量各自设置一个第一标志位,每个第一标志位的值用于指示当前条带中对应的色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。
作为一种可选的处理方式,当前条带的两个色度分量也可以对应于同一个第一标志位,该同一个第一标志位的值用于指示当前条带中的两个色度分量是否采用本申请实施例中所提出的CC-ALF处理方式。
需要说明的是:如果条带级的标志位是针对两个色度分量分别设置了一个第一标志位,那么块级的标志位也可以是针对两个色度分量分别设置一个第二标志位。如果块级的标志位是针对两个色度分量设置了一个第二标志位,那么条带级的标志位也只需要针对两个色度分量设置了一个第一标志位即可。
在本申请的一个实施例中,解码端在解码时还需要从视频码流中解码得到自适应参数集,其中包含有CC-ALF的滤波器系数,在这种情况下,如果第一标志位的值指示当前条带中至少有一个目标块的色度分量采用本申请实施例中所提出的CC-ALF处理,则可以从视频码流中解码得到当前条带对应的自适应参数集的索引,然后从与自适应参数集的索引相对应的自适应参数集中选择对应的滤波器系数对当前条件中对应的目标块的色度分量进行滤波处理。
同时使用图9中所示的块分类策略和其它的分类策略
在本申请的一个实施例中,如果同时使用图9中所示的块分类策略和其它的分类策略,那么在进行解码时,需要从视频码流中解码得到自适应参数集,以及当前条带所对应的第三标志位,该第三标志位的值用于指示当前条带中的目标块的色度分量是否进行CC-ALF处理;若当前条带中目标块的色度分量需要进行CC-ALF处理,则从视频码流中解码得到当前条带对应的自适应参数集的索引;然后从自适应参数集的索引所对应的自适应集中获取到当前条带的色度分量所对应的第四标志位,该第四标志位的值用于指示当前条带的色度分量在进行CC-ALF处理时所采用的分类策略,该分类策略包括图9中所示的块分类策略(即根据亮度分量在进行ALF时的块分类信息,确定色度分量在进行CC-ALF时的块分类信息)或者其它的分类策略。
换句话说,如果同时使用了图9中所示的块分类策略和其它的分类策略,那么需要通过条带级的标志位(即第三标志位)指示当前条带中的目标块的色度分量是否进行CC-ALF处理(可以是本申请实施例中所提出的CC-ALF处理方式或者是其它的CC-ALF处理方式),如果进行CC-ALF处理,那么需要在对应的自适应参数集(通过自适应参数集的索引来进行引用)中解码得到分类策略的标志位(即第四标志位),以明确指示采用图9中所示的块分类策略还是其它的分类策略。
具体地,比如,若当前条带的色度分量所对应的第四标志位的值为第一值(如1), 则指示当前条带的色度分量在进行CC-ALF处理时所采用的分类策略为图9所示的分类策略;若当前条带的色度分量对应的第四标志位的值为第二值(如0),则指示当前条带的色度分量在进行CC-ALF处理时所采用的分类策略为其它的分类策略。
可选地,如果第三标志位的值指示当前条带中部分目标块的色度分量需要进行CC-ALF处理,那么为了区分哪些目标块需要进行CC-ALF处理,则可以从视频码流中解码得到当前条带包含的各个目标块所对应的第五标志位,该第五标志位的值用于指示对应目标块的色度分量是否进行CC-ALF处理。比如,若某个目标块所对应的第五标志位的值为1,则说明该目标块的色度分量需要进行CC-ALF处理;若某个目标块所对应的第五标志位的值为0,则说明该目标块的色度分量不需要进行CC-ALF处理。
需要说明的是:如果条带级的标志位(即第三标志位)指示的是当前条带中全部目标块的色度分量不需要进行CC-ALF处理,或者指示全部目标块的色度分量需要进行CC-ALF处理,那么就不需要引入块级的标志位(即第五标志位)。
作为一个示例,比如条带级标志位(即第三标志位)的值指示条带中的部分目标块需要进行CC-ALF处理,且编码分类策略的标志位(即第四标志位)指示采用图9中所示的块分类策略,那么如果某个目标块的块级标志位(即第五标志位)指示需要进行CC-ALF处理,那么对于该目标块而言,会采用图9中所示的块分类策略进行CC-ALF处理。
可选地,由于存在两个色度分量(Cr和Cb),因此对于一个条带而言,可以采用类似前述实施例的技术方案,即针对当前条带的两个色度分量各自设置一个第三标志位,或者针对当前条带的两个色度分量设置同一个第三标志位。同样地,对于目标块而言,也可以针对目标块的两个色度分量各自设置一个第五标志位,或者针对目标块的两个色度分量设置同一个第五标志位,具体的说明可以参照前述实施例的技术方案,不再详述。
在本申请的一个实施例中,前述实施例中的目标块的尺寸信息可以是编码端与解码端预先设定好的;或者也可以是由编码端确定出的,并且在确定出目标块的尺寸信息之后,在视频码流的序列参数集、图像参数集、图像头或条带头中编码目标块的尺寸信息,这样解码端需要从码流中解码出相应的尺寸信息。比如,目标块可以是CTU,也可以是比CTU更小的块。
以上分别从编码端和解码端对本申请实施例的技术方案进行了阐述,为了对本申请的实施细节进行更具体的说明,以下将更为详细的对本申请实施例的技术方案的实现细节进行阐述:
本申请实施例提出了根据亮度分量的ALF在子块级的分类情况决定色度分量的CC-ALF在同级别子块级的分类结果,同时提出根据分类结果在不同层级自适应的选择滤波器的方法,以下详细进行说明:
在一个方面,本申请实施例提出了将每个色度分量可支持的CC-ALF滤波器数目设置为亮度分量的可支持的ALF滤波器数目,同时根据亮度分量的ALF分类过程来决定色度分量的CC-ALF分类情况。本申请实施例所提出的技术方案可以单独使用或者合并使用。
具体而言,可以根据亮度分量的ALF在子块(subblock)级的分类情况,决定色度分量的CC-ALF的分类结果。
比如,可以将亮度分量的ALF在subblock级的分类结果,作为CC-ALF在同尺寸块上的分类结果。其中,亮度分量的ALF在subblock级的分类过程如前述公式(1)至公式(10)所述。
可选地,也可以将亮度分量的ALF在subblock级的分类结果以及对应的几何变换类型,作为色度分量的CC-ALF在同尺寸块上的分类结果与几何变换类型。其中,亮度分量的ALF在subblock级的分类过程如前述公式(1)至公式(10)所述。
在本申请的一个实施例中,可以根据亮度分量的ALF对各类滤波器的合并过程(Merge),决定色度分量的CC-ALF对各类滤波器的合并过程。比如,可以将亮度分量的 ALF对各类滤波器的合并结果作为色度分量的CC-ALF对各类滤波器的合并结果。或者,可以通过联合优化亮度分量的ALF和两个色度分量的CC-ALF,以同时决定亮度分量的ALF与色度分量的CC-ALF对各类滤波器的合并结果。
在本申请的一个实施例中,可以根据亮度分量的ALF的最终滤波器数目,决定各个色度分量的CC-ALF可用的滤波器数目。
在另一个方面,本申请实施例提出了基于前述的色度分量的CC-ALF的分类方式在不同层级自适应的选择滤波器类别以及传输滤波器相关参数的技术方案。具体可以分为单独使用本申请实施例所提出的分类方法的实施例,以及同时使用本申请实施例所提出的分类方法与相关的CC-ALF技术中已存在的分类方法的实施例。
单独使用本申请实施例所提出的分类方法、且两个色度分量分别进行CC-ALF的选 择决策
在本申请的一个实施例中,当在色度分量的CC-ALF中仅使用本申请实施例所提出的分类方法时,可以为两个色度分量Cb与Cr分别进行CC-ALF的选择决策以及参数传输。
具体而言,对于每个色度分量,编码端需要传输的CC-ALF相关参数如下:
1、CTU级是否使用CC-ALF(On/Off)的标志位。比如,若该标志位为1,则表示当前CTU中对应的色度分量样本使用CC-ALF进行滤波(由于是单独使用本申请实施例所提出的分类方法,因此如果指示使用CC-ALF进行滤波的话,那么在使用CC-ALF进行滤波时采用的就是本申请实施例所提出的分类方法);若该标志位为0,则表示当前CTU中对应的色度分量不使用CC-ALF滤波。
2、Slice级是否使用CC-ALF的标志位。比如,该标志位为1,则表示当前条带中至少有一个CTU对应的色度分量选择使用CC-ALF(由于是单独使用本申请实施例所提出的分类方法,因此如果指示使用CC-ALF进行滤波的话,那么在使用CC-ALF进行滤波时采用的就是本申请实施例所提出的分类方法);该标志位为0,则表示当前条带中全部CTU对应的色度分量都不使用CC-ALF。
可选地,如果Slice级是否使用CC-ALF的标志位为1,还可以表示当前条带中的全部CTU对应的色度分量都使用CC-ALF。
需要说明的是,如果Slice级是否使用CC-ALF的标志位指示当前条带中全部CTU对应的色度分量都不使用CC-ALF,或者指示当前条带中全部CTU对应的色度分量都使用CC-ALF,那么编码端无需编码CTU级是否使用CC-ALF的标志位,解码端也无需进行解码。
3、APS中相关参数:如果Slice级的CC-ALF标志位为1,则需要传输相关色度分量对应的CC-ALF滤波器组中各滤波器的系数。而其它的CC-ALF相关控制参数,比如滤波器组中包含的滤波器数目、滤波器合并索引等不需要额外传输,可通过亮度分量的ALF所对应的参数推断得出。
对于每个色度分量,编码端针对CTU级对应的色度分量是否使用CC-ALF(由于是单独使用本申请实施例所提出的分类方法,因此如果是使用CC-ALF进行滤波的话,那么在使用CC-ALF进行滤波时采用的就是本申请实施例所提出的分类方法)的决策过程如下:
A)计算当前CTU内对应色度分量的样本不使用CC-ALF滤波的率失真开销(RDCost)。
B)对当前CTU内对应色度分量的各样本,按照对应的亮度分量样本所属类别选择CC-ALF滤波器进行滤波,并计算率失真开销。其中,亮度分量的样本所属类别不需要显式传输,解码端可以在对亮度分量的样本进行处理的过程中推断得出。
C)比较两种情况计算得到的率失真开销,如果不使用CC-ALF滤波器的开销较小,则确定CTU级对应的色度分量不使用CC-ALF,可以将CTU级CC-ALF的标志位设为0;否则设为1。
单独使用本申请实施例所提出的分类方法、且两个色度分量共同进行CC-ALF的选 择决策
在本申请的一个实施例中,当在色度分量的CC-ALF中仅使用本申请实施例所提出的分类方法时,可以针对两个色度分量Cb与Cr共同进行CC-ALF的选择决策以及参数传输。
具体而言,对于两个色度分量,编码端需要传输的CC-ALF相关参数如下:
1、CTU级是否使用CC-ALF(On/Off)的标志位。比如,若该标志位为1,则表示当前CTU中的两个色度分量样本使用CC-ALF进行滤波(由于是单独使用本申请实施例所提出的分类方法,因此如果指示使用CC-ALF进行滤波的话,那么在使用CC-ALF进行滤波时采用的就是本申请实施例所提出的分类方法);若该标志位为0,则表示当前CTU中的两个色度分量不使用CC-ALF滤波。
2、Slice级是否使用CC-ALF的标志位。比如,该标志位为1,则表示当前条带中至少有一个CTU的两个色度分量选择使用CC-ALF(由于是单独使用本申请实施例所提出的分类方法,因此如果指示使用CC-ALF进行滤波的话,那么在使用CC-ALF进行滤波时采用的就是本申请实施例所提出的分类方法);该标志位为0,则表示当前条带中全部CTU的两个色度分量都不使用CC-ALF。
可选地,如果Slice级是否使用CC-ALF的标志位为1,还可以表示当前条带中的全部CTU的两个色度分量都使用CC-ALF。
需要说明的是,如果Slice级是否使用CC-ALF的标志位指示当前条带中全部CTU的两个色度分量都不使用CC-ALF,或者指示当前条带中全部CTU的两个色度分量都使用CC-ALF,那么编码端无需编码CTU级是否使用CC-ALF的标志位,解码端也无需进行解码。
3、APS中相关参数:如果Slice级的CC-ALF标志位为1,则需要传输两个色度分量对应的CC-ALF滤波器组中各滤波器的系数。而其它的CC-ALF相关控制参数,比如滤波器组中包含的滤波器数目、滤波器合并索引等不需要额外传输,可通过亮度分量的ALF所对应的参数推断得出。
对于两个色度分量,编码端针对CTU级的两个色度分量是否使用CC-ALF(由于是单独使用本申请实施例所提出的分类方法,因此如果指示使用CC-ALF进行滤波的话,那么在使用CC-ALF进行滤波时采用的就是本申请实施例所提出的分类方法)的决策过程如下:
A)计算当前CTU内的两个色度分量的样本不使用CC-ALF滤波的率失真开销(RDCost)。
B)对当前CTU内的两个色度分量的各样本,按照对应的亮度分量样本所属类别选择CC-ALF滤波器进行滤波,并计算两个色度分量总的率失真开销。其中,亮度分量的样本所属类别不需要显式传输,解码端可以在对亮度分量的样本进行处理的过程中推断得出。
C)比较两种情况计算得到的率失真开销,如果不使用CC-ALF滤波器的开销较小,则确定CTU级的两个色度分量不使用CC-ALF,可以将CTU级CC-ALF的标志位设为0;否则设为1。
同时使用本申请实施例所提出的分类方法与相关的CC-ALF技术中已存在的分类方 法、且为两个色度分量分别指定分类方法
在本申请的一个实施例中,当在色度分量的CC-ALF中同时使用本申请实施例所提出的分类方法与相关的CC-ALF技术中已存在的分类方法时,可以为两个色度分量Cb与Cr分别指定分类方法,以对当前帧内对应的色度分量的全部样本使用相应的分类方法,并分别进行CC-ALF的选择决策与相关参数传输。
具体而言,对于每个色度分量,编码端需要传输的CC-ALF相关参数如下:
1、CTU级是否使用CC-ALF(On/Off)的标志位。比如,若该标志位为1,则表示当前CTU中对应的色度分量样本使用CC-ALF进行滤波(具体滤波时采用的分类方法可以是本申请实施例中所提出的分类方法,也可以是相关的CC-ALF技术中已存在的分类方 法,具体采用哪种则需要通过APS中的标志位进一步指示);若该标志位为0,则表示当前CTU中对应的色度分量不使用CC-ALF滤波。
2、Slice级是否使用CC-ALF的标志位。比如,该标志位为1,则表示当前条带中至少有一个CTU对应的色度分量选择使用CC-ALF(类似的,具体滤波时采用的分类方法可以是本申请实施例中所提出的分类方法,也可以是相关的CC-ALF技术中已存在的分类方法,具体采用哪种则需要通过APS中的标志位进一步指示);该标志位为0,则表示当前条带中全部CTU对应的色度分量都不使用CC-ALF。
可选地,如果Slice级是否使用CC-ALF的标志位为1,还可以表示当前条带中的全部CTU对应的色度分量都使用CC-ALF。
需要说明的是,如果Slice级是否使用CC-ALF的标志位指示当前条带中全部CTU对应的色度分量都不使用CC-ALF,或者指示当前条带中全部CTU对应的色度分量都使用CC-ALF,那么编码端无需编码CTU级是否使用CC-ALF的标志位,解码端也无需进行解码。
3、当需要使用CC-ALF时,需要指示一个APS的索引,并在该索引对应的APS中用一个分类方法标志位指示对应的色度分量所使用的分类方法。比如,若该分类方法标志位为0,则表示使用相关的CC-ALF技术中已存在的分类方法;若该分类方法标志位为1,则表示使用本申请实施例所提出的分类方法。
4、如果APS中的该分类方法标志位为0,则说明需要使用相关的CC-ALF技术中已存在的分类方法,进而可以按照相关的CC-ALF技术中已存在的设计传输各级相关参数。
5、如果APS中的该分类方法标志位为1,则说明需要采用本申请实施例所提出的分类方法,进而可以按照前述实施例中的方式传输各级相关参数。
对于每个色度分量,编码端针对CC-ALF的分类方法的选择决策过程如下:
A)按照相关的CC-ALF技术中已存在的分类方法对当前条带(Slice)中的全部CTU进行CC-ALF的决策,并得到当前Slice的CC-ALF最佳率失真开销。
B)按照本申请实施例所提出的分类方法为当前Slice中全部CTU进行CC-ALF的决策,得到当前Slice在该分类方法下的最佳率失真开销。
C)比较两个Slice级的率失真开销,将APS中的分类方法标志位设为指示率失真开销较小的分类方法。
同时使用本申请实施例所提出的分类方法与相关的CC-ALF技术中已存在的分类方 法、且为两个色度分量共同指定分类方法
在本申请的一个实施例中,当在色度分量的CC-ALF中同时使用本申请实施例所提出的分类方法与相关的CC-ALF技术中已存在的分类方法时,两个色度分量Cb与Cr可以共用一个APS中的分类方法标志位,以对当前帧内两个色度分量的全部样本使用相同的分类方法,并为两个色度分量Cb与Cr进行CC-ALF的选择决策与相关参数的传输。
具体而言,对于两个色度分量,编码端需要传输的CC-ALF相关参数如下:
1、CTU级是否使用CC-ALF(On/Off)的标志位。比如,若该标志位为1,则表示当前CTU中的两个色度分量使用CC-ALF进行滤波(具体滤波时采用的分类方法可以是本申请实施例中所提出的分类方法,也可以是相关的CC-ALF技术中已存在的分类方法,具体采用哪种则需要通过APS中的标志位进一步指示);若该标志位为0,则表示当前CTU中的两个色度分量不使用CC-ALF滤波。
2、Slice级是否使用CC-ALF的标志位。比如,该标志位为1,则表示当前条带中至少有一个CTU的两个色度分量使用CC-ALF(类似地,具体滤波时采用的分类方法可以是本申请实施例中所提出的分类方法,也可以是相关的CC-ALF技术中已存在的分类方法,具体采用哪种则需要通过APS中的标志位进一步指示);该标志位为0,则表示当前条带中全部CTU的两个色度分量都不使用CC-ALF。
可选地,如果Slice级是否使用CC-ALF的标志位为1,还可以表示当前条带中的全 部CTU的两个色度分量都使用CC-ALF。
需要说明的是,如果Slice级是否使用CC-ALF的标志位指示当前条带中全部CTU的两个色度分量都不使用CC-ALF,或者指示当前条带中全部CTU的两个色度分量都使用CC-ALF,那么编码端无需编码CTU级是否使用CC-ALF的标志位,解码端也无需进行解码。
3、当需要使用CC-ALF时,需要指示一个APS的索引,并在该索引对应的APS中用一个分类方法标志位指示两个色度分量的分类方式。比如,若该分类方法标志位为1,则表示对两个色度分量的全部样本使用本申请实施例所提出的分类方法;若该分类方法标志位为0,则表示对两个色度分量的全部样本使用相关的CC-ALF技术中已存在的分类方法。
4、如果APS中该分类方法标志位为0,则说明对两个色度分量的全部样本使用相关的CC-ALF技术中已存在的分类方法,进而可以按照相关的CC-ALF技术中已存在的设计传输各级相关参数。
5、如果APS中该分类方法标志位为1,则说明对两个色度分量的全部样本使用本申请实施例所提出的分类方法,进而可以按照前述实施例中的所述的方式传输各级相关参数。
对于两个色度分量,编码端针对CC-ALF的分类方法的选择决策过程如下:
A)对两个色度分量Cb与Cr分别按照相关的CC-ALF技术中已存在的分类方法为当前Slice中的全部CTU进行CC-ALF的决策,得到当前Slice中两个色度分量总的CC-ALF最佳率失真开销。
B)对两个色度分量Cb与Cr分别按照本申请实施例所提出的分类方法为当前Slice中的全部CTU进行CC-ALF的决策,得到当前Slice中两个色度分量在当前分类方法下总的CC-ALF最佳率失真开销。
C)比较两个Slice级的两个色度分量总的率失真开销,将APS中的分类标志位设为指示率失真开销较小的分类方法。
值得注意的是:在上述的两个实施例中,CTU级是否使用CC-ALF的标志位、Slice级是否使用CC-ALF的标志位,以及APS中的分类方法标志位可以是针对每个色度分量分别设置一个标志位(即有两个CTU级标志位、两个Slice级标志位和两个APS级标志位,以分别对应两个色度分量),也可以是针对两个色度分量都只设置一个标志位(即有1个CTU级标志位、1个Slice级标志位和1个APS级标志位,且对应于这两个色度分量)。
在本申请的其它实施例中,也可以是设置1个APS级标志位对应于两个色度分量,而Slice级标志位和CTU级标志位均设置为两个,即有两个CTU级标志位和两个Slice级标志位,以分别对应两个色度分量。
当然,也可以是设置1个APS级标志位对应于两个色度分量,设置1个Slice级标志位对应于两个色度分量,而CTU级标志位设置为两个,即有两个CTU级标志位,以分别对应两个色度分量。
需要说明的是,在本申请的上述实施例中,以CTU级的块为例进行了说明,在本申请的其它实施例中,也可以用于对其它尺寸的块级进行处理,比如除了尺寸为128×128的CTU级的块之外,也可以是64×64或者其它更小尺寸的块。
可选地,可以在编码端和解码端同时规定进行块级CC-ALF滤波选择的块级单元的尺寸,这样不需要传输块级单元的尺寸信息。此时,需要针对每个块级单元传输一个标志位以表示对应块单元是否使用CC-ALF。
可选地,也可以在编码端进行是否使用块级CC-ALF滤波的选择,并且将相应的块级单元的尺寸写入到码流中,解码端解析得出对应的块级单元的尺寸信息。该尺寸信息可以写在SPS(Sequence Parameter Set,序列参数集)、PPS(Picture Parameter Set, 图像参数集)、图片头(Picture Header)或者条带头(Slice Header)中。此外,需要针对每个块级单元传输一个标志位以表示对应块单元是否使用CC-ALF。
应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。
以下介绍本申请的装置实施例,可以用于执行本申请上述实施例中的方法。对于本申请装置实施例中未披露的细节,请参照本申请上述的方法的实施例。
图10示出了根据本申请的一个实施例的环路滤波装置的框图,该环路滤波装置可以设置在视频编码设备或者视频解码设备内。
参照图10所示,根据本申请的一个实施例的环路滤波装置1000,包括:获取单元1002、确定单元1004和滤波单元1006。
其中,获取单元1002配置为获取视频图像帧中的亮度分量在进行自适应环路滤波ALF时的块分类信息;确定单元1004配置为根据所述亮度分量在进行ALF时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波CC-ALF时的块分类信息;滤波单元1006配置为根据所述色度分量在进行CC-ALF时的块分类信息,选择对应的滤波器系数对所述色度分量进行CC-ALF处理。
在本申请的一些实施例中,基于前述方案,确定单元1004配置为:将所述亮度分量在进行ALF时针对子块的分类结果,作为所述色度分量在进行CC-ALF时对相同尺寸块的分类结果;或者
将所述亮度分量在进行ALF时针对子块的分类结果及对应的几何变换类型,作为所述色度分量在进行CC-ALF时对相同尺寸块的分类结果和几何变换类型。
在本申请的一些实施例中,基于前述方案,确定单元1004还配置为:根据所述亮度分量在进行ALF时对各类滤波器的合并结果,确定所述色度分量在进行CC-ALF时对各类滤波器的合并结果。
在本申请的一些实施例中,基于前述方案,确定单元1004还配置为:根据所述亮度分量在ALF过程中进行滤波器合并的率失真开销,以及所述色度分量在CC-ALF过程中进行滤波器合并的率失真开销,确定所述亮度分量在进行ALF时,以及所述色度分量在进行CC-ALF时对各类滤波器的合并结果。
在本申请的一些实施例中,基于前述方案,确定单元1004还配置为:根据所述亮度分量在进行ALF时所确定的滤波器数量,确定所述色度分量在进行CC-ALF时的可用滤波器数量。
图11示出了根据本申请的一个实施例的视频解码装置的框图,该视频解码装置可以设置在视频解码设备内。
参照图11所示,根据本申请的一个实施例的视频解码装置1100,包括:获取单元1102、确定单元1104、滤波单元1106和第一处理单元1108。
其中,获取单元1102配置为获取视频图像帧中的亮度分量在进行自适应环路滤波ALF时的块分类信息;确定单元1104配置为根据所述亮度分量在进行ALF时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波CC-ALF时的块分类信息;滤波单元1106配置为根据所述色度分量在进行CC-ALF时的块分类信息,选择对应的滤波器系数对所述色度分量进行CC-ALF处理;第一处理单元1108配置为根据所述亮度分量的ALF处理结果,以及所述色度分量的CC-ALF处理结果,对视频码流进行解码处理。
在本申请的一些实施例中,基于前述方案,所述的视频解码装置1100还包括:第一解码单元:配置为在根据所述亮度分量在进行ALF时的块分类信息,确定所述视频图像帧中的色度分量在进行CC-ALF时的块分类信息之前,从视频码流中解码得到当前条带所对应的第一标志位,所述第一标志位的值用于指示所述当前条带中的目标块的色度分量是否采用所述CC-ALF处理。
在本申请的一些实施例中,基于前述方案,若所述第一标志位的值为第一值,则指示所述当前条带中部分目标块的色度分量采用所述CC-ALF处理,或指示所述当前条带中全部目标块的色度分量采用所述CC-ALF处理;若所述第一标志位的值为第二值,则指示所述当前条带中全部目标块的色度分量均不采用所述CC-ALF处理。
在本申请的一些实施例中,基于前述方案,所述第一解码单元还配置为:若所述第一标志位的值指示所述当前条带中部分目标块的色度分量采用所述CC-ALF处理,则从所述视频码流中解码得到所述当前条带包含的各个目标块所对应的第二标志位,所述第二标志位的值用于指示对应目标块的色度分量是否采用所述CC-ALF处理。
在本申请的一些实施例中,基于前述方案,所述目标块的两个色度分量各自对应一个第二标志位,每个第二标志位的值用于指示所述目标块中对应的色度分量是否采用所述CC-ALF处理;或者
所述目标块的两个色度分量对应于同一个第二标志位,所述同一个第二标志位的值用于指示所述目标块中两个色度分量是否采用所述CC-ALF处理。
在本申请的一些实施例中,基于前述方案,所述第一解码单元还配置为:从所述视频码流中解码得到自适应参数集;若所述第一标志位的值指示所述当前条带中至少有一个目标块的色度分量采用所述CC-ALF处理,则从所述视频码流中解码得到所述当前条带对应的自适应参数集的索引;从与所述自适应参数集的索引相对应的自适应参数集中选择对应的滤波器系数对目标块的色度分量进行滤波处理。
在本申请的一些实施例中,基于前述方案,所述当前条带针对两个色度分量各自对应一个第一标志位,每个第一标志位的值用于指示所述当前条带中对应的色度分量是否采用所述CC-ALF处理;或者
所述当前条带针对两个色度分量对应于同一个第一标志位,所述同一个第一标志位的值用于指示所述当前条带针对所述两个色度分量是否采用所述CC-ALF处理。
在本申请的一些实施例中,基于前述方案,所述的视频解码装置1100还包括:第二解码单元,配置为在根据所述亮度分量在进行ALF时的块分类信息,确定所述视频图像帧中的色度分量在进行CC-ALF时的块分类信息之前,从视频码流中解码得到自适应参数集,以及当前条带所对应的第三标志位,所述第三标志位的值用于指示所述当前条带中的目标块的色度分量是否进行CC-ALF处理;若所述第三标志位的值指示所述当前条带中目标块的色度分量需要进行CC-ALF处理,则从所述视频码流中解码得到所述当前条带对应的自适应参数集的索引;从与所述自适应参数集的索引相对应的自适应参数集中获取当前条带的色度分量所对应的第四标志位,所述第四标志位的值用于指示所述当前条带的色度分量在进行CC-ALF处理时所采用的分类策略,所述分类策略包括:根据亮度分量在进行ALF时的块分类信息,确定色度分量在进行CC-ALF时的块分类信息;或者其它的分类策略。
在本申请的一些实施例中,基于前述方案,若所述当前条带的色度分量所对应的第四标志位的值为第一值,则指示所述当前条带的色度分量在进行CC-ALF处理时所采用的分类策略为根据亮度分量在进行ALF时的块分类信息,确定色度分量在进行CC-ALF时的块分类信息;若所述当前条带的色度分量对应的第四标志位的值为第二值,则指示所述当前条带的色度分量在进行CC-ALF处理时所采用的分类策略为所述其它的分类策略。
在本申请的一些实施例中,基于前述方案,所述第二解码单元还配置为:若所述第三标志位的值指示所述当前条带中部分目标块的色度分量需要进行CC-ALF处理,则从 所述视频码流中解码得到所述当前条带包含的各个目标块所对应的第五标志位,所述第五标志位的值用于指示对应目标块的色度分量是否进行CC-ALF处理。
在本申请的一些实施例中,基于前述方案,所述当前条带的两个色度分量各自对应一个第四标志位,每个第四标志位的值用于指示所述当前条带中对应的色度分量在进行CC-ALF处理时所采用的分类策略;或者
所述当前条带的两个色度分量对应于同一个第四标志位,所述同一个第四标志位的值用于指示所述当前条带中的两个色度分量在进行CC-ALF处理时所采用的分类策略。
在本申请的一些实施例中,基于前述方案,所述第一处理单元1108还配置为:根据预先设定的尺寸大小确定所述目标块的尺寸信息;或者
从视频码流的序列参数集、图像参数集、图像头或条带头中解码得到所述目标块的尺寸信息。
在本申请的一些实施例中,基于前述方案,所述目标块包括:编码树单元或尺寸小于所述编码树单元的块。
图12示出了根据本申请的一个实施例的视频编码装置的框图,该视频编码装置可以设置在视频编码设备内。
参照图12所示,根据本申请的一个实施例的视频编码装置1200,包括:获取单元1202、确定单元1204、滤波单元1206和第二处理单元1208。
其中,获取单元1202配置为获取视频图像帧中的亮度分量在进行自适应环路滤波ALF时的块分类信息;确定单元1204配置为根据所述亮度分量在进行ALF时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波CC-ALF时的块分类信息;滤波单元1206配置为根据所述色度分量在进行CC-ALF时的块分类信息,选择对应的滤波器系数对所述色度分量进行CC-ALF处理;第二处理单元1208配置为根据所述亮度分量的ALF处理结果,以及所述色度分量的CC-ALF处理结果,对视频图像帧进行编码处理,得到视频码流。
在本申请的一些实施例中,基于前述方案,所述视频编码装置1200还包括:第一编码单元,配置为在所述视频码流中编码所述视频图像帧的当前条带所对应的第一标志位,所述第一标志位的值用于指示所述当前条带中的目标块的色度分量是否采用所述CC-ALF处理。
在本申请的一些实施例中,基于前述方案,所述第一编码单元还配置为:若所述第一标志位的值指示所述当前条带中部分目标块的色度分量采用所述CC-ALF处理,则在所述视频码流中编码得到所述当前条带包含的各个目标块所对应的第二标志位,所述第二标志位的值用于指示对应目标块的色度分量是否采用所述CC-ALF处理。
在本申请的一些实施例中,基于前述方案,所述第一编码单元还配置为:在所述视频码流中编码得到所述当前条带包含的各个目标块所对应的第二标志位之前,计算所述各个目标块的色度分量在采用所述CC-ALF处理时的第一率失真开销,所述各个目标块的色度分量在进行所述CC-ALF处理时是基于亮度分量进行ALF时的块分类信息所选择的CC-ALF滤波器;计算所述各个目标块的色度分量在不进行CC-ALF处理时的第二率失真开销;根据所述第一率失真开销和所述第二率失真开销,确定所述各个目标块的色度分量是否采用所述CC-ALF处理。
在本申请的一些实施例中,基于前述方案,所述视频编码装置1200还包括:第二编码单元,配置为在所述视频码流中编码当前条带所对应的第三标志位,所述第三标志位的值用于指示所述当前条带中的目标块的色度分量是否进行CC-ALF处理;若所述当前条带中目标块的色度分量需要进行CC-ALF处理,则在所述视频码流中编码对应的自适应参数集的索引;在所述自适应参数集的索引所对应的自适应集中编码当前条带的色度分量所对应的第四标志位,所述第四标志位的值用于指示所述当前条带的色度分量在进行CC-ALF处理时所采用的分类策略,所述分类策略包括:根据亮度分量在进行ALF时的 块分类信息,确定色度分量在进行CC-ALF时的块分类信息;或者其它的分类策略。
在本申请的一些实施例中,基于前述方案,所述第二编码单元还配置为:若所述第三标志位的值指示所述当前条带中部分目标块的色度分量需要进行CC-ALF处理,则在所述视频码流中编码所述当前条带包含的各个目标块所对应的第五标志位,所述第五标志位的值用于指示对应目标块的色度分量是否进行CC-ALF处理。
在本申请的一些实施例中,基于前述方案,所述第二编码单元还配置为:在所述自适应参数集的索引所对应的自适应集中编码当前条带的色度分量所对应的第四标志位之前,计算所述当前条带中全部目标块的色度分量在目标分类策略进行CC-ALF处理时的第三率失真开销,所述目标分类策略是根据亮度分量在进行ALF时的块分类信息,确定色度分量在进行CC-ALF时的块分类信息;计算所述当前条带中全部目标块的色度分量在采用所述其它的分类策略进行CC-ALF处理时的第四率失真开销;根据所述第三率失真开销和所述第四率失真开销,确定所述当前条带的色度分量在进行CC-ALF处理时所采用的分类策略。
在本申请的一些实施例中,基于前述方案,所述第二处理单元1208还配置为:根据预先设定的尺寸大小确定所述目标块的尺寸信息;或者
在所述视频码流的序列参数集、图像参数集、图像头或条带头中编码所述目标块的尺寸信息。
在一个实施例中,本申请还提供一种电子设备,该电子设备包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述任意实施例中所述的方法。
图13示出了适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
需要说明的是,图13示出的电子设备的计算机系统1300仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图13所示,计算机系统1300包括中央处理单元(Central Processing Unit,CPU)1301,其可以根据存储在只读存储器(Read-Only Memory,ROM)1302中的程序或者从存储部分1308加载到随机访问存储器(Random Access Memory,RAM)1303中的程序而执行各种适当的动作和处理,例如执行上述实施例中所述的方法。在RAM 1303中,还存储有系统操作所需的各种程序和数据。CPU 1301、ROM 1302以及RAM 1303通过总线1304彼此相连。输入/输出(Input/Output,I/O)接口1305也连接至总线1304。
以下部件连接至I/O接口1305:包括键盘、鼠标等的输入部分1306;包括诸如阴极射线管(Cathode Ray Tube,CRT)、液晶显示器(Liquid Crystal Display,LCD)等以及扬声器等的输出部分1307;包括硬盘等的存储部分1308;以及包括诸如LAN(Local Area Network,局域网)卡、调制解调器等的网络接口卡的通信部分1309。通信部分1309经由诸如因特网的网络执行通信处理。驱动器1310也根据需要连接至I/O接口1305。可拆卸介质1311,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1310上,以便于从其上读出的计算机程序根据需要被安装入存储部分1308。
特别地,根据本申请的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,作为另一方面,本申请还提供了一种计算机程序产品,该计算机程序产品包括计算机可读指令,该计算机可读指令被处理器执行时实现上述任意实施例中所述的方法。。在这样的实施例中,该计算机可读指令可以通过通信部分1309从网络上被下载和安装,和/或从可拆卸介质1311被安装。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的单元也可以设置在处理器中。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。 上述计算机可读介质承载有一个或者多个计算机可读指令,当上述一个或者多个计算机可读指令被一个该电子设备执行时,使得该电子设备实现上述任意实施例中所述的方法。应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本申请的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、触控终端、或者网络设备等)执行根据本申请实施方式的方法。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (26)

  1. 一种环路滤波方法,由视频编码设备或者视频解码设备执行,包括:
    获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息;
    根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息;及
    根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理。
  2. 根据权利要求1所述的方法,其特征在于,根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息,包括:
    将所述亮度分量在进行自适应环路滤波时针对子块的分类结果,作为所述色度分量在进行跨分量自适应环路滤波时对相同尺寸块的分类结果。
  3. 根据权利要求1所述的方法,其特征在于,根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息,包括:
    将所述亮度分量在进行自适应环路滤波时针对子块的分类结果及对应的几何变换类型,作为所述色度分量在进行跨分量自适应环路滤波时对相同尺寸块的分类结果和几何变换类型。
  4. 根据权利要求1或3所述的方法,其特征在于,所述方法还包括:
    根据所述亮度分量在进行自适应环路滤波时对各类自适应环路滤波器的合并结果,确定所述色度分量在进行跨分量自适应环路滤波时对各类跨分量自适应环路滤波器的合并结果。
  5. 根据权利要求1或3所述的方法,其特征在于,所述方法还包括:
    根据所述亮度分量在自适应环路滤波过程中进行滤波器合并的率失真开销,以及所述色度分量在跨分量自适应环路滤波过程中进行滤波器合并的率失真开销,确定所述亮度分量在进行自适应环路滤波时,以及所述色度分量在进行跨分量自适应环路滤波时对各类滤波器的合并结果。
  6. 根据权利要求1或3所述的方法,其特征在于,所述方法还包括:根据所述亮度分量在进行自适应环路滤波时所确定的滤波器数量,确定所述色度分量在进行跨分量自适应环路滤波时的可用滤波器数量。
  7. 一种视频解码方法,由视频解码设备执行,包括:
    获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息;
    根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息;
    根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理;及
    根据所述亮度分量的自适应环路滤波处理结果,以及所述色度分量的跨分量自适应环路滤波处理结果,对视频码流进行解码处理。
  8. 根据权利要求7所述的方法,其特征在于,在根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息之前,所述方法还包括:
    从视频码流中解码得到当前条带所对应的第一标志位,所述第一标志位的值用于指示所述当前条带中的目标块的色度分量是否采用所述跨分量自适应环路滤波处理。
  9. 根据权利要求8所述的方法,其特征在于,
    若所述第一标志位的值为第一值,则指示所述当前条带中部分目标块的色度分量采用所述跨分量自适应环路滤波处理,或指示所述当前条带中全部目标块的色度分量采用所述 跨分量自适应环路滤波处理;
    若所述第一标志位的值为第二值,则指示所述当前条带中全部目标块的色度分量均不采用所述跨分量自适应环路滤波处理。
  10. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    若所述第一标志位的值指示所述当前条带中部分目标块的色度分量采用所述跨分量自适应环路滤波处理,则从所述视频码流中解码得到所述当前条带包含的各个目标块所对应的第二标志位,所述第二标志位的值用于指示对应目标块的色度分量是否采用所述跨分量自适应环路滤波处理。
  11. 根据权利要求10所述的方法,其特征在于,
    所述目标块的两个色度分量各自对应一个第二标志位,每个第二标志位的值用于指示所述目标块中对应的色度分量是否采用所述跨分量自适应环路滤波处理。
  12. 根据权利要求10所述的方法,其特征在于,
    所述目标块的两个色度分量对应于同一个第二标志位,所述同一个第二标志位的值用于指示所述目标块中两个色度分量是否采用所述跨分量自适应环路滤波处理。
  13. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    从所述视频码流中解码得到自适应参数集;
    若所述第一标志位的值指示所述当前条带中至少有一个目标块的色度分量采用所述跨分量自适应环路滤波处理,则从所述视频码流中解码得到所述当前条带对应的自适应参数集的索引;及
    从与所述自适应参数集的索引相对应的自适应参数集中选择对应的滤波器系数对目标块的色度分量进行滤波处理。
  14. 根据权利要求8至13中任一项所述的方法,其特征在于,所述当前条带针对两个色度分量各自对应一个第一标志位,每个第一标志位的值用于指示所述当前条带中对应的色度分量是否采用所述跨分量自适应环路滤波处理。
  15. 根据权利要求8至13中任一项所述的方法,其特征在于,所述当前条带针对两个色度分量对应于同一个第一标志位,所述同一个第一标志位的值用于指示所述当前条带针对所述两个色度分量是否采用所述跨分量自适应环路滤波处理。
  16. 根据权利要求7所述的方法,其特征在于,在所述根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息之前,所述方法还包括:
    从视频码流中解码得到自适应参数集,以及当前条带所对应的第三标志位,所述第三标志位的值用于指示所述当前条带中的目标块的色度分量是否进行跨分量自适应环路滤波处理;
    若所述第三标志位的值指示所述当前条带中目标块的色度分量需要进行跨分量自适应环路滤波处理,则从所述视频码流中解码得到所述当前条带对应的自适应参数集的索引;及
    从与所述自适应参数集的索引相对应的自适应参数集中获取当前条带的色度分量所对应的第四标志位,所述第四标志位的值用于指示所述当前条带的色度分量在进行跨分量自适应环路滤波处理时所采用的分类策略,
    所述分类策略包括:根据亮度分量在进行自适应环路滤波时的块分类信息,确定色度分量在进行跨分量自适应环路滤波时的块分类信息;或者其它的分类策略。
  17. 根据权利要求16所述的方法,其特征在于,
    若所述当前条带的色度分量所对应的第四标志位的值为第一值,则指示所述当前条带的色度分量在进行跨分量自适应环路滤波处理时所采用的分类策略为根据亮度分量在进行自适应环路滤波时的块分类信息,确定色度分量在进行跨分量自适应环路滤波时的块分类信息;及
    若所述当前条带的色度分量对应的第四标志位的值为第二值,则指示所述当前条带的色度分量在进行跨分量自适应环路滤波处理时所采用的分类策略为所述其它的分类策略。
  18. 根据权利要求16所述的方法,其特征在于,所述方法还包括:
    若所述第三标志位的值指示所述当前条带中部分目标块的色度分量需要进行跨分量自适应环路滤波处理,则从所述视频码流中解码得到所述当前条带包含的各个目标块所对应的第五标志位,所述第五标志位的值用于指示对应目标块的色度分量是否进行跨分量自适应环路滤波处理。
  19. 根据权利要求16至18中任一项所述的方法,其特征在于,
    所述当前条带的两个色度分量各自对应一个第四标志位,每个第四标志位的值用于指示所述当前条带中对应的色度分量在进行跨分量自适应环路滤波处理时所采用的分类策略。
  20. 根据权利要求16至18中任一项所述的方法,其特征在于,
    所述当前条带的两个色度分量对应于同一个第四标志位,所述同一个第四标志位的值用于指示所述当前条带中的两个色度分量在进行跨分量自适应环路滤波处理时所采用的分类策略。
  21. 一种视频编码方法,由视频编码设备执行,包括:
    获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息;
    根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息;
    根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理;及
    根据所述亮度分量的自适应环路滤波处理结果,以及所述色度分量的跨分量自适应环路滤波处理,对视频图像帧进行编码处理,得到视频码流。
  22. 一种环路滤波装置,其特征在于,包括:
    获取单元,配置为获取视频图像帧中的亮度分量在进行自适应环路滤波自适应环路滤波时的块分类信息;
    确定单元,配置为根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波跨分量自适应环路滤波时的块分类信息;
    滤波单元,配置为根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理。
  23. 一种视频解码装置,其特征在于,包括:
    获取单元,配置为获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息;
    确定单元,配置为根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息;
    滤波单元,配置为根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息,选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理;
    第一处理单元,配置为根据所述亮度分量的自适应环路滤波处理结果,以及所述色度分量的跨分量自适应环路滤波处理结果,对视频码流进行解码处理。
  24. 一种视频编码装置,其特征在于,包括:
    获取单元,配置为获取视频图像帧中的亮度分量在进行自适应环路滤波时的块分类信息;
    确定单元,配置为根据所述亮度分量在进行自适应环路滤波时的块分类信息,确定所述视频图像帧中的色度分量在进行跨分量自适应环路滤波时的块分类信息;
    滤波单元,配置为根据所述色度分量在进行跨分量自适应环路滤波时的块分类信息, 选择对应的滤波器系数对所述色度分量进行跨分量自适应环路滤波处理;
    第二处理单元,配置为根据所述亮度分量的自适应环路滤波处理结果,以及所述色度分量的跨分量自适应环路滤波处理,对视频图像帧进行编码处理,得到视频码流。
  25. 一种电子设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现权利要求1至21中任一项所述的方法的步骤。
  26. 一种计算机程序产品,包括计算机可读指令,所述计算机可读指令被处理器执行时实现权利要求1至21中任一项所述的方法的步骤。
PCT/CN2022/137908 2022-01-07 2022-12-09 环路滤波方法、视频编解码方法、装置、介质及电子设备 WO2023130899A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/498,611 US20240064298A1 (en) 2022-01-07 2023-10-31 Loop filtering, video encoding, and video decoding methods and apparatus, storage medium, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210017814.0A CN116456086A (zh) 2022-01-07 2022-01-07 环路滤波方法、视频编解码方法、装置、介质及电子设备
CN202210017814.0 2022-01-07

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/498,611 Continuation US20240064298A1 (en) 2022-01-07 2023-10-31 Loop filtering, video encoding, and video decoding methods and apparatus, storage medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2023130899A1 true WO2023130899A1 (zh) 2023-07-13

Family

ID=87073083

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/137908 WO2023130899A1 (zh) 2022-01-07 2022-12-09 环路滤波方法、视频编解码方法、装置、介质及电子设备

Country Status (3)

Country Link
US (1) US20240064298A1 (zh)
CN (1) CN116456086A (zh)
WO (1) WO2023130899A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021021590A1 (en) * 2019-07-26 2021-02-04 Mediatek Inc. Method and apparatus of cross-component adaptive loop filtering for video coding
CN112543335A (zh) * 2019-09-23 2021-03-23 腾讯美国有限责任公司 对视频数据进行编解码的方法、装置、计算机设备和存储介质
WO2021083258A1 (en) * 2019-10-29 2021-05-06 Beijing Bytedance Network Technology Co., Ltd. Cross-component adaptive loop filter using luma differences
WO2021101345A1 (ko) * 2019-11-22 2021-05-27 한국전자통신연구원 적응적 루프내 필터링 방법 및 장치
CN113615189A (zh) * 2019-03-26 2021-11-05 高通股份有限公司 在视频译码中具有自适应参数集(aps)的基于块的自适应环路滤波器(alf)

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113615189A (zh) * 2019-03-26 2021-11-05 高通股份有限公司 在视频译码中具有自适应参数集(aps)的基于块的自适应环路滤波器(alf)
WO2021021590A1 (en) * 2019-07-26 2021-02-04 Mediatek Inc. Method and apparatus of cross-component adaptive loop filtering for video coding
CN112543335A (zh) * 2019-09-23 2021-03-23 腾讯美国有限责任公司 对视频数据进行编解码的方法、装置、计算机设备和存储介质
WO2021083258A1 (en) * 2019-10-29 2021-05-06 Beijing Bytedance Network Technology Co., Ltd. Cross-component adaptive loop filter using luma differences
WO2021101345A1 (ko) * 2019-11-22 2021-05-27 한국전자통신연구원 적응적 루프내 필터링 방법 및 장치

Also Published As

Publication number Publication date
US20240064298A1 (en) 2024-02-22
CN116456086A (zh) 2023-07-18

Similar Documents

Publication Publication Date Title
WO2022022297A1 (zh) 视频解码方法、视频编码方法、装置、设备及存储介质
WO2022078163A1 (zh) 视频解码方法、视频编码方法及相关装置
WO2022063033A1 (zh) 视频解码方法、视频编码方法、装置、计算机可读介质及电子设备
WO2022116836A1 (zh) 视频解码方法、视频编码方法、装置及设备
WO2022062880A1 (zh) 视频解码方法、装置、计算机可读介质及电子设备
WO2022078304A1 (zh) 视频解码方法、装置、计算机可读介质、程序及电子设备
WO2022174660A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2023130899A1 (zh) 环路滤波方法、视频编解码方法、装置、介质及电子设备
CN115209157A (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2023202097A1 (zh) 环路滤波方法、视频编解码方法、装置、介质、程序产品及电子设备
WO2022037478A1 (zh) 视频解码方法、视频编码方法、装置、介质及电子设备
KR20240074789A (ko) 루프 필터링 방법, 비디오 인코딩/디코딩 방법 및 장치, 매체, 및 전자 디바이스
WO2022174637A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2022037477A1 (zh) 视频解码方法、装置、计算机可读介质及电子设备
WO2024082632A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2022174701A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2022174638A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2022174659A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2024109099A1 (zh) 视频编解码方法、装置、计算机可读介质及电子设备
WO2022063040A1 (zh) 视频编解码方法、装置及设备
WO2022116854A1 (zh) 视频解码方法、装置、可读介质、电子设备及程序产品
WO2022037464A1 (zh) 视频解码方法、视频编码方法、装置、设备及存储介质
WO2023051223A1 (zh) 滤波及编解码方法、装置、计算机可读介质及电子设备
WO2022037458A1 (zh) 视频编解码中的运动信息列表构建方法、装置及设备
CN117834894A (zh) 视频编解码方法、装置、介质及电子设备

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

Country of ref document: EP

Kind code of ref document: A1