WO2020181541A1 - In-loop filtering method and apparatus, computer system, and mobile device - Google Patents

In-loop filtering method and apparatus, computer system, and mobile device Download PDF

Info

Publication number
WO2020181541A1
WO2020181541A1 PCT/CN2019/078053 CN2019078053W WO2020181541A1 WO 2020181541 A1 WO2020181541 A1 WO 2020181541A1 CN 2019078053 W CN2019078053 W CN 2019078053W WO 2020181541 A1 WO2020181541 A1 WO 2020181541A1
Authority
WO
WIPO (PCT)
Prior art keywords
filter
pixel
types
code stream
category
Prior art date
Application number
PCT/CN2019/078053
Other languages
French (fr)
Chinese (zh)
Inventor
孟学苇
郑萧桢
贾川民
王苫社
马思伟
Original Assignee
北京大学
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京大学, 深圳市大疆创新科技有限公司 filed Critical 北京大学
Priority to PCT/CN2019/078053 priority Critical patent/WO2020181541A1/en
Priority to CN201980005266.6A priority patent/CN111279706B/en
Publication of WO2020181541A1 publication Critical patent/WO2020181541A1/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/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/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Definitions

  • This application relates to the field of video coding and decoding, and more specifically, to a method, device, computer system, and portable equipment for loop filtering.
  • Loop filtering is a key part of the video coding and decoding framework. It is mainly used to reduce compression distortions such as blocking effects and ringing effects generated in the encoding process. At present, there are mainly three loop filtering techniques, namely, deblocking filtering, adaptive sample compensation filtering and adaptive loop filtering (ALF).
  • deblocking filtering adaptive sample compensation filtering
  • ALF adaptive loop filtering
  • the deblocking filtering and adaptive sample compensation filtering follow the methods in High Efficiency Video Coding (HEVC).
  • HEVC High Efficiency Video Coding
  • the deblocking filter is used for the boundary between the prediction unit and the transform unit, and the low-pass filter obtained by training is used to perform nonlinear weighting of the boundary pixels, thereby reducing the blocking effect.
  • the adaptive sample compensation filter classifies the pixels in the image block, and then adds the same compensation value to each type of pixel to make the reconstructed image closer to the original image, thereby suppressing the ringing effect.
  • Adaptive loop filtering is a Wiener filter, which is mainly used to minimize the mean square error between the original image and the reconstructed image.
  • Wiener filter which is mainly used to minimize the mean square error between the original image and the reconstructed image.
  • the embodiments of the present application provide a method, a device, a computer system, and a portable device for loop filtering, which can improve compression efficiency.
  • a method for loop filtering including: determining the number of types of filters used in loop filtering; and determining whether to write the filter label corresponding to the pixel category according to the number of types of filters Into the code stream.
  • a method for loop filtering which includes: determining the number of types of filters used in loop filtering; and determining whether to parse the corresponding pixel categories in the code stream according to the number of types of filters Filter label.
  • a method for loop filtering which includes: loop filtering pixels of the pixel category by using a filter corresponding to the pixel category; generating an encoded code stream, where if the loop filtering is used The number of filter types is equal to the number of pixel types, and the code stream does not include the filter label corresponding to the pixel type.
  • a method for loop filtering which includes: obtaining an encoded code stream; parsing the code stream to obtain the number of types of filters used in loop filtering; The number is equal to the number of pixel categories, and for the pixels of the pixel category, a filter with the same label as the pixel category or a label with a default corresponding relationship is used to perform loop filtering.
  • a device for loop filtering including: a determining module, which determines the number of types of filters used in loop filtering; a processing module, which determines whether to classify pixels according to the number of types of filters The corresponding filter label is written into the code stream.
  • a device for loop filtering including: a determining module, configured to determine the number of types of filters used in loop filtering; and a processing module, configured to determine the number of types of filters Whether to parse the filter label corresponding to the pixel category in the bitstream.
  • a device for loop filtering which includes: a filtering module, configured to use a filter corresponding to the pixel category to loop-filter the pixels of the pixel category; and a processing module, configured to generate an encoded code Wherein, if the number of filter types used in loop filtering is equal to the number of pixel types, the code stream does not include the filter label corresponding to the pixel type.
  • a device for loop filtering which includes: an acquisition module for acquiring an encoded code stream; a processing module for analyzing the code stream to obtain information about the type of filter used in loop filtering Number; if the number of types of the filter is equal to the number of pixel types, for the pixels of the pixel type, a filter with the same label as the pixel type or a label with a default corresponding relationship is used for loop filtering.
  • a computer system including: a memory, configured to store computer-executable instructions; a processor, configured to access the memory and execute the computer-executable instructions to perform the methods in the above aspects Operation.
  • a mobile device which includes: the loop filtering device of the foregoing aspects; or, the computer system of the foregoing ninth aspect.
  • a computer storage medium is provided, and program code is stored in the computer storage medium, and the program code can be used to instruct to perform the methods of the foregoing aspects.
  • the filter label corresponding to the pixel category it is determined whether to write the filter label corresponding to the pixel category into the code stream. In this way, it is possible to avoid uniformly writing the filter label corresponding to the pixel category into the code stream. Redundancy, saving coding bits, which can improve compression efficiency.
  • Fig. 1 is a structural diagram of a technical solution applying an embodiment of the present application.
  • Figure 2 is a schematic diagram of data to be encoded in an embodiment of the present application.
  • Fig. 3 is a schematic diagram of a coding framework of an embodiment of the present application.
  • Fig. 4 is a schematic diagram of adaptive loop filtering according to an embodiment of the present application.
  • Fig. 5 is a schematic diagram of filter coefficients in an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a loop filtering method according to an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a loop filtering method according to another embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a loop filtering method according to another embodiment of the present application.
  • FIG. 9 is a schematic flowchart of a method for loop filtering according to another embodiment of the present application.
  • Fig. 10 is a schematic block diagram of a loop filtering device according to an embodiment of the present application.
  • FIG. 11 is a schematic block diagram of a loop filtering device according to another embodiment of the present application.
  • Fig. 12 is a schematic block diagram of a loop filtering device according to another embodiment of the present application.
  • Fig. 13 is a schematic block diagram of a loop filtering device according to another embodiment of the present application.
  • Fig. 14 is a schematic block diagram of a computer system according to an embodiment of the present application.
  • the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • Fig. 1 is a structural diagram of a technical solution applying an embodiment of the present application.
  • the system 100 can receive the data 102 to be processed, process the data 102 to be processed, and generate processed data 108.
  • the system 100 may receive the data to be encoded and encode the data to be encoded to generate encoded data, or the system 100 may receive the data to be decoded and decode the data to be decoded to generate decoded data.
  • the components in the system 100 may be implemented by one or more processors.
  • the processor may be a processor in a computing device or a processor in a mobile device (such as a drone).
  • the processor may be any type of processor, which is not limited in the embodiment of the present application.
  • the processor may include an encoder, a decoder, or a codec.
  • the system 100 may also include one or more memories.
  • the memory can be used to store instructions and data, for example, computer-executable instructions that implement the technical solutions of the embodiments of the present application, the to-be-processed data 102, the processed data 108, and so on.
  • the memory can be any type of memory, which is not limited in the embodiment of the present application.
  • the data to be encoded can include text, images, graphic objects, animation sequences, audio, video, or any other data that needs to be encoded.
  • the data to be encoded may include sensor data from a sensor, which may be a vision sensor (for example, a camera, an infrared sensor), a microphone, a near field sensor (for example, an ultrasonic sensor, a radar), a position sensor, and a temperature sensor. Sensors, touch sensors, etc.
  • the data to be encoded may include information from the user, for example, biological information, which may include facial features, fingerprint scans, retinal scans, voice recordings, DNA sampling, and so on.
  • Figure 2 shows a schematic diagram of data to be encoded in an embodiment of the present application.
  • the data to be encoded 202 may include a plurality of frames 204.
  • multiple frames 204 may represent consecutive image frames in a video stream.
  • Each frame 204 may include one or more slices or tiles 206.
  • Each strip or tile 206 may include one or more image blocks 208.
  • the image block 208 may be an encoding unit 208.
  • Each image block 208 may include one or more pixels 212.
  • Each pixel 212 may include one or more data sets corresponding to one or more data parts, for example, a luminance data part and a chrominance data part.
  • the data unit for image processing can be a frame, a slice, a tile, a coding unit, a macroblock, a block, a pixel, or any group of the above. In different embodiments, the size of the data unit can vary.
  • Encoding is necessary for efficient and/or secure transmission or storage of data.
  • the encoding of the data to be encoded may include data compression, encryption, error correction encoding, format conversion, and so on.
  • compressing multimedia data can reduce the number of bits transmitted in the network.
  • Sensitive data such as financial information and personal identification information, can be encrypted before transmission and storage to protect confidentiality and/or privacy. In order to reduce the bandwidth occupied by video storage and transmission, video data needs to be encoded and compressed.
  • Any suitable encoding technique can be used to encode the data to be encoded.
  • the encoding type depends on the data being encoded and the specific encoding requirements.
  • the encoder may implement one or more different codecs.
  • Each codec may include codes, instructions or computer programs that implement different encoding algorithms. Based on various factors, including the type and/or source of the data to be encoded, the receiving entity of the encoded data, available computing resources, network environment, business environment, rules and standards, etc., a suitable encoding algorithm can be selected to encode a given Data to be encoded.
  • the encoder can be configured to encode a series of video frames.
  • a series of steps can be used to encode the data in each frame.
  • the encoding step may include processing steps such as prediction, transformation, quantization, and entropy encoding.
  • Prediction includes two types of intra-frame prediction and inter-frame prediction, and its purpose is to use prediction block information to remove redundant information of the current image block to be encoded.
  • Intra-frame prediction uses the information of the current frame to obtain prediction block data.
  • Inter-frame prediction uses the information of the reference frame to obtain prediction block data. The process includes dividing the image to be encoded into several image blocks; then, for each image block, search for the image block that best matches the current image block in the reference image as Prediction block; after that, the corresponding pixel values of the image block and the prediction block are subtracted to obtain the residual.
  • Using a transformation matrix to transform the residual block of the image can remove the correlation of the residual of the image block, that is, to remove the redundant information of the image block in order to improve the coding efficiency.
  • the transformation of the data block in the image block usually adopts two-dimensional transformation. That is, at the encoding end, the residual information of the data block is respectively multiplied by an NxM transformation matrix and its transposed matrix, and the transformation coefficients are obtained after the multiplication.
  • the transform coefficients can be quantized to obtain quantized coefficients, and finally the quantized coefficients are entropy coded, and finally the bit stream obtained by entropy coding and the coding mode information after coding, such as intra prediction mode, motion vector information, etc. Store or send to the decoder.
  • the decoding end of the image first obtain the entropy coded bitstream and then perform entropy decoding to obtain the corresponding residual.
  • the predicted image block corresponding to the image block according to the predicted image block and the image block
  • the residual error of is obtained the value of each pixel in the current sub-image block.
  • Fig. 3 shows a schematic diagram of an encoding framework of an embodiment of the present application.
  • the encoding process when using inter-frame prediction, can be as follows:
  • the current frame image is acquired.
  • a reference frame image is obtained.
  • a reference frame image is used to perform motion estimation to obtain a motion vector (Motion Vector, MV) of each image block of the current frame image.
  • the motion vector obtained by the motion estimation is used to perform motion compensation to obtain the estimated value/predicted value of the current image block.
  • the estimated value/predicted value of the current image block is subtracted from the current image block to obtain a residual.
  • the residual is transformed to obtain transform coefficients.
  • the transform coefficient is quantized to obtain the quantized coefficient.
  • the quantized coefficients are entropy coded, and finally the bit stream obtained by entropy coding and the coding mode information after coding are stored or sent to the decoding end.
  • the quantization result is dequantized.
  • the inverse quantization result is inversely transformed.
  • the reconstructed pixels are obtained by using the inverse transform result and the motion compensation result.
  • the reconstructed pixels are filtered (ie, loop filtering).
  • the reconstructed pixels after filtering are output. Subsequently, the reconstructed image can be used as a reference frame image for other frame images for inter-frame prediction.
  • the encoding process can be as follows:
  • the current frame image is obtained.
  • intra-frame prediction selection is performed on the current frame image.
  • the current image block in the current frame performs intra-frame prediction.
  • the estimated value of the current image block is subtracted from the current image block to obtain the residual.
  • the residual of the image block is transformed to obtain transform coefficients.
  • the transform coefficient is quantized to obtain the quantized coefficient.
  • the quantized coefficients are entropy coded, and finally the bit stream obtained by the entropy coding and the coded coding mode information are stored or sent to the decoding end.
  • the quantization result is dequantized.
  • the inverse quantization result is inversely transformed, and in 311, the inverse transform result and the intra-frame prediction result are used to obtain reconstructed pixels.
  • the reconstructed image block can be used for intra prediction of the next image block.
  • For the decoding end operations corresponding to the encoding end are performed. First, use entropy decoding, inverse quantization and inverse transformation to obtain residual information, and determine whether the current image block uses intra prediction or inter prediction according to the decoded bitstream. If it is intra-frame prediction, the reconstructed image block in the current frame is used to construct prediction information according to the intra-frame prediction method; if it is inter-frame prediction, it is necessary to parse out the motion information, and use the parsed motion information in the reconstructed image Determine the reference block to obtain the prediction information; then, superimpose the prediction information and the residual information, and pass the filtering operation to obtain the reconstruction information.
  • the technical solutions of the embodiments of the present application can be applied to the filtering process of encoding or decoding.
  • the technical solutions of the embodiments of the present application mainly involve the filtering step, that is, the improvement in the filtering step can improve the compression efficiency, and other steps can refer to the relevant steps in the encoding process.
  • the adaptive loop filter is an optimal filter in the mean square sense calculated based on the original signal and the encoded distortion signal, and is essentially a Wiener filter.
  • X is the original signal
  • e is the noise or distortion
  • Y is the distorted signal. Is the filtered signal.
  • the filter meets:
  • the weighted average of surrounding pixels is used to obtain the result after the current point is filtered.
  • the positions of the neighboring pixels used are shown in Figure 5, where the point corresponding to C12 is the current point to be filtered.
  • the filtering process is obtained by using the weighted average of all the position points in Figure 5.
  • the filter coefficient is the weight of each point, a total of 13 A filter coefficient C0 ⁇ C13.
  • the final filtering process is the sum of the products of the points shown in Figure 5 and their corresponding filter coefficients.
  • the points used in this process are all reconstructed points obtained before adaptive loop filtering.
  • Pixels of the same category use the same set of filter coefficients (a filter).
  • a filter There are many ways to classify pixels. For example, only the Y component of the pixel may be classified, and the UV component may not be classified. For example, the Y component can be divided into 25 categories, and the UV component is only one category. This means that for a frame of image, there can be up to 25 sets of filters for the Y component and only one set for the UV component.
  • the pixel category may be a category corresponding to the Y component, but the embodiment of the present application is not limited to this, and the pixel category may also be a category corresponding to other components or all components.
  • each 4x4 block can be classified according to the Laplace direction:
  • C represents the category of the pixel block.
  • (i,j) represents the coordinate position of the current 4x4 block in the entire image.
  • R(k,l) represents the pixel value at the (k,l) position in the 4x4 block.
  • V k,l represents the vertical Laplacian gradient of the pixel at the (i,j) coordinate in the 4x4 block.
  • H k,l represents the Laplacian gradient of the pixel at the (i,j) coordinate in the 4x4 block in the horizontal direction.
  • D1 k,l represents the Laplacian gradient of the pixel at the (i,j) coordinate in the 4x4 block in the direction of 135 degrees.
  • D2 k,l represents the 45-degree Laplacian gradient of the pixel at the (i,j) coordinate in the 4x4 block.
  • g v represents the Laplacian gradient of the 4x4 block in the vertical direction.
  • g h represents the Laplacian gradient of the 4x4 block in the horizontal direction.
  • g d1 represents the Laplacian gradient of the 4x4 block at 135 degrees.
  • g d2 represents the Laplacian gradient of the 4x4 block at 45 degrees.
  • i and j are the coordinates of the upper left pixel of the 4x4 block.
  • R(i,j) represents the reconstructed pixel value at the coordinate (i,j).
  • R h,v represents the ratio of the Laplacian gradient in the horizontal and vertical directions.
  • R d0, d1 represent the ratio of the Laplacian gradient in the 45 and 135 directions.
  • t1 and t2 represent preset thresholds.
  • ALF can use coefficient merging techniques, for example, coefficient merging between different types of pixels, filter coefficient zeroing operations, and coefficient differential coding methods.
  • the combination of coefficients between different types of pixels means that different types use the same filter. If certain types use the same filter, then some filter coefficients can be transferred in the code stream.
  • the filter coefficient can be directly set to zero.
  • Coefficient differential coding method filter coefficients can choose two coding methods, choose one of the two, the first is to directly write the filter coefficients into the code stream, the other is to write the first set of filter coefficients into the code stream, and then the first The second set of coefficients after subtracting the first set of coefficients is written into the code stream, and the third set of coefficients after subtracting the second set is written into the code stream, and so on.
  • This method is the coefficient differential coding method.
  • the encoding end can select the encoding method.
  • the above coefficient merging methods require decision-making at the encoding end. For example, it is better to determine which categories are better to merge coefficients. It is better to decide whether to set the coefficients to zero or not to zero for each filter. It is better to use differential coding for the decision coefficients. It is better to code directly.
  • the number of filter types used in loop filtering may be equal to the number of pixel types, or may no longer be equal to the number of pixel types, that is, multiple pixel types may use the same filter. In this way, which filter is used for each pixel category needs to be identified in the code stream. However, the current identification method has redundancy, which affects the compression efficiency. In view of this, the embodiments of the present application provide an improved technical solution.
  • the technical solutions of the embodiments of the present application can be applied to both the encoding end and the decoding end.
  • the following describes the technical solutions of the embodiments of the present application from the encoding end and the decoding end respectively.
  • FIG. 6 shows a schematic flowchart of a method 600 for loop filtering according to an embodiment of the present application.
  • the method 600 may be executed by the encoding end. For example, it can be executed by the system 100 shown in FIG. 1 during the encoding operation.
  • the number of filter types used in loop filtering may be equal to the number of pixel types, or may no longer be equal to the number of pixel types.
  • the encoding end can write code stream according to the number of types of filters actually used. Specifically, the code stream contains the syntax element of the number of filter types. After confirming the number of types of filters, the encoder writes the number of types into the code stream.
  • the number of types of filters can be used to determine whether to label the filter corresponding to the pixel type.
  • the filter label corresponding to the pixel category may not be written into the code stream. In this way, redundancy caused by uniformly writing the filter labels corresponding to the pixel categories into the code stream can be avoided, coding bits are saved, and compression efficiency is improved.
  • the encoding end may combine the initial filters corresponding to different pixel categories to obtain a filter corresponding to each pixel category. Then, the pixels of each pixel category are loop-filtered according to the corresponding filter, and the number of filter types used is written into the code rate, so that the decoding end knows the number of filter types used by the encoding end.
  • the encoding end may subtract one from the number of types of filters and write them into the code stream. Because the number of filter types must be a value greater than or equal to 1, when the encoding end writes the code stream, it is uniformly reduced by one, and the decoding end is analyzed and then uniformly increased by one. This saves coding bits. For example, if the number of filter types can be any value between 1-25, after subtracting one, the value between 0-24 is used, and the value between 0-24 is used compared to the value between 1-25 The number of bits is less.
  • sequence and steps when ALF encoding parameters are written into the code stream can be as follows:
  • the decoding end in addition to the number of types of filters, the decoding end also needs to know the filter corresponding to each pixel category in order to perform loop filtering on the pixels of each pixel category.
  • the encoding end may need to write the filter label corresponding to the pixel category into the code stream.
  • the encoding end may determine whether to write the filter label corresponding to the pixel category into the code stream according to the number of filter types.
  • the filter label corresponding to the pixel type is not written into the code stream.
  • the decoding end may be able to determine the filter label corresponding to the pixel type. For example, if the filter label corresponding to the pixel category is the same as the label of the pixel category or is a default correspondence, the decoder does not need to analyze the filter label corresponding to the pixel category in the code stream to determine the pixel category corresponding The filter label. In this case, the encoding end does not write the filter label corresponding to the pixel category into the code stream.
  • each pixel category corresponds to a filter.
  • the decoder directly The filter label corresponding to the pixel category can be determined. Therefore, the encoding end does not need to write the filter label corresponding to the pixel category into the code stream.
  • the encoding end may also write first indication information into the code stream, where the first indication information is used to indicate that the code stream does not include filtering corresponding to the pixel category. ⁇ label.
  • the decoding end parses the first indication information, it does not parse the filter label corresponding to the pixel category in the bitstream.
  • the filter label corresponding to the pixel category is written into the code stream.
  • the decoder cannot directly determine The filter label corresponding to the pixel category. In this case, the encoding end writes the filter label corresponding to the pixel category into the code stream.
  • the order of the filters may be adjusted.
  • the label (corresponding order) of the filter may be inconsistent or different from the pixel type. It is the default correspondence.
  • the decoder cannot directly determine the filter label corresponding to the pixel category. Therefore, the encoding end needs to write the filter label corresponding to the pixel category into the code stream.
  • the encoding end may also write second indication information into the code stream, where the second indication information is used to indicate that the code stream includes the filter corresponding to the pixel category Label.
  • the decoding end parses the second indication information, it parses the filter label corresponding to the pixel category in the code stream.
  • the above-mentioned first indication information and second indication information may be used as the filter label indication information in the code stream, that is, in different situations, the filter label indication information in the code stream may be the first indication information or the second indication information .
  • the filter label corresponding to the pixel type is written into the code stream.
  • the corresponding relationship between the pixel types and the filter types is uncertain, so the encoding end needs to label the filter corresponding to the pixel type Write the code stream.
  • the filter label corresponding to the pixel type is not written into the code stream.
  • the number of the types of filters is 1, that is, only one filter is used. In this case, the encoding end does not need to write the filter label corresponding to the pixel category into the code stream.
  • the only filter in the code stream can be used for loop filtering.
  • the filter label corresponding to the pixel category it is determined whether to write the filter label corresponding to the pixel category into the code stream. In this way, it is possible to avoid uniformly writing the filter label corresponding to the pixel category into the code stream. Redundancy, saving coding bits, which can improve compression efficiency.
  • FIG. 7 shows a schematic flowchart of a method 700 for loop filtering according to another embodiment of the present application.
  • the method 700 may be executed by the decoding end. For example, it can be executed by the system 100 shown in FIG. 1 when performing a decoding operation.
  • the encoding end writes the number of types of filters used in loop filtering into the code stream, and accordingly, the decoding end can obtain the number of types of filters by analyzing the code stream.
  • the decoding end adds one after parsing to obtain the number of filter types.
  • the decoding end After obtaining the number of types of the filters, the decoding end performs different processing for different situations.
  • the filter label corresponding to the pixel type in the code stream is not parsed.
  • the decoding end uses a filter with the same label as the pixel category or a label with a default corresponding relationship to perform loop filtering.
  • the decoding end The filter label corresponding to the pixel category can be determined without parsing the filter label corresponding to the pixel category in the code stream. Therefore, the filter label that is the same as the label of the pixel category or has a default corresponding relationship can be directly used for processing. Loop filtering.
  • the filter label indication information in the bitstream is parsed first, if the filter label indicates The information is the first indication information, where the first indication information is used to indicate that the filter label corresponding to the pixel category is not included in the code stream, and the filter label corresponding to the pixel category in the code stream is not parsed.
  • the filter label uses a filter with the same label as the pixel label or a label with a default corresponding relationship for the pixels of the pixel category to perform loop filtering.
  • the filter label indication information in the bitstream is parsed first, if the filter label indicates The information is second indication information, where the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category, then the filter corresponding to the pixel category in the code stream is parsed Label. Then, for the pixels of the pixel type, the filter with the filter label corresponding to the parsed pixel type is used to perform loop filtering.
  • the filter label corresponding to the pixel type in the code stream is parsed. Then, for the pixels of the pixel type, the filter with the filter label corresponding to the parsed pixel type is used to perform loop filtering.
  • the filter label corresponding to the pixel type in the code stream is not parsed.
  • the only filter in the code stream is used for loop filtering.
  • FIG. 8 shows a schematic flowchart of a loop filtering method 800 according to another embodiment of the present application.
  • the method 800 may be executed by the encoding end. For example, it can be executed by the system 100 shown in FIG. 1 during the encoding operation. Except for the following description, for this embodiment, reference may be made to the relevant description of the embodiment described by the encoding end, which is not repeated for brevity.
  • the encoding end may first determine the initial filter corresponding to each pixel category; and then combine the initial filters corresponding to different pixel categories to obtain a filter corresponding to each pixel category. Then, the filter corresponding to each pixel category is used to loop filter the pixels of each pixel category.
  • the code stream generated by the encoding end does not include the filter label corresponding to the pixel type. That is to say, at the encoding end, if the number of filter types is equal to the number of pixel types, the filter label corresponding to the pixel type is not written into the code stream.
  • the filter label corresponding to the pixel category is the same as the label of the pixel category or is a default correspondence.
  • the encoding end may also write first indication information into the code stream, where the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  • the encoding end generates The code stream of includes the filter label corresponding to the pixel category.
  • the code stream generated by the encoding end includes the filter label corresponding to the pixel type. That is, at the encoding end, if the number of filter types is greater than 1 and less than the number of pixel types, the filter label corresponding to the pixel type is written into the code stream.
  • the filter label corresponding to the pixel type is not written into the code stream.
  • the encoding end may also write the code stream after subtracting one from the number of filter types.
  • the code stream when the number of filter types used in loop filtering is equal to the number of pixel types, the code stream does not include the filter label corresponding to the pixel type. In this way, it is possible to avoid uniform The redundancy generated by writing the filter label corresponding to the pixel category into the code stream saves coding bits, thereby improving compression efficiency.
  • FIG. 9 shows a schematic flowchart of a method 900 for loop filtering according to another embodiment of the present application.
  • the method 900 may be executed by the decoding end.
  • it can be executed by the system 100 shown in FIG. 1 when performing a decoding operation.
  • this embodiment can refer to the relevant description of the embodiment described by the foregoing decoding end, and for brevity, the details are not repeated.
  • the encoding end writes the number of types of filters used in loop filtering into the code stream, and accordingly, the decoding end can obtain the number of types of filters by analyzing the code stream.
  • the number of types of filters is equal to the number of pixel types, for pixels of the pixel type, use a filter with the same label as the pixel type or a label with a default corresponding relationship to perform loop filtering.
  • the code stream generated by the encoding end does not include the filter label corresponding to the pixel type.
  • the decoding end does not need to parse the filter label corresponding to the pixel category in the bitstream, and can directly use a filter with the same label as the pixel category or a label with a default corresponding relationship to perform loop filtering.
  • the filter label indication information in the bitstream is parsed, and if the filter label indication information is the first indication information, use and Filters with the same label of the pixel category or labels with a default corresponding relationship perform loop filtering, wherein the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  • the filter label indication information in the code stream
  • the filter label indication information is the second indication information
  • parse The filter label corresponding to the pixel category in the code stream wherein the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
  • the filter with the filter label corresponding to the parsed pixel type is used to perform loop filtering.
  • the filter label corresponding to the pixel type in the code stream is parsed. Then, for the pixels of the pixel type, the filter with the filter label corresponding to the parsed pixel type is used to perform loop filtering.
  • the only filter in the code stream is used to perform loop filtering.
  • loop filtering method of the embodiment of the present application is described in detail above, and the loop filtering device, computer system, and movable equipment of the embodiment of the present application will be described below.
  • FIG. 10 shows a schematic block diagram of a loop filtering apparatus 1000 according to an embodiment of the present application.
  • the device 1000 can execute the loop filtering method 600 of the above embodiment of the present application.
  • the device 1000 may be an encoder.
  • the apparatus 1000 may include:
  • the determining module 1010 determines the number of types of filters used in loop filtering
  • the processing module 1020 determines whether to write the filter label corresponding to the pixel category into the code stream according to the number of the types of filters.
  • processing module 1020 is used to:
  • the filter label corresponding to the pixel type is not written into the code stream.
  • the filter label corresponding to the pixel category is the same as the label of the pixel category or is a default correspondence.
  • processing module 1020 is further configured to:
  • the first indication information is written into the code stream, where the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  • processing module 1020 is used to:
  • the filter label corresponding to the pixel category is different from the label of the pixel category or is not a default correspondence, then the pixel category corresponding to the The filter label is written into the code stream.
  • processing module 1020 is further configured to:
  • the second indication information is written into the code stream, where the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
  • processing module 1020 is used to:
  • the filter label corresponding to the pixel type is written into the code stream.
  • processing module 1020 is used to:
  • the filter label corresponding to the pixel type is not written into the code stream.
  • processing module 1020 is further configured to:
  • the initial filters corresponding to different pixel categories are combined to obtain the filter corresponding to each pixel category.
  • processing module 1020 is further configured to:
  • the number of types of filters is reduced by one and then written into the code stream.
  • FIG. 11 shows a schematic block diagram of a loop filtering device 1100 according to another embodiment of the present application.
  • the device 1100 can execute the loop filtering method 700 in the above embodiment of the present application.
  • the device 1100 may be a decoder.
  • the apparatus 1100 may include:
  • the determining module 1110 is used to determine the number of types of filters used in loop filtering
  • the processing module 1120 is configured to determine whether to parse the filter label corresponding to the pixel category in the bitstream according to the number of the filter types.
  • processing module 1120 is used to:
  • the filter label corresponding to the pixel type in the code stream is not parsed.
  • processing module 1120 is used to:
  • the filter label indication information in the code stream is parsed, and if the filter label indication information is the first indication information, the code is not parsed The filter label corresponding to the pixel category in the stream, wherein the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  • processing module 1120 is further configured to:
  • a filter with the same label as the pixel category or a label with a default corresponding relationship is used to perform loop filtering.
  • processing module 1120 is used to:
  • the filter label indication information parse the filter label indication information in the code stream, and if the filter label indication information is the second indication information, parse the code stream The filter label corresponding to the pixel category in, wherein the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
  • processing module 1120 is used to:
  • the filter label corresponding to the pixel type in the code stream is parsed.
  • processing module 1120 is further configured to:
  • loop filtering is performed by using the parsed filter of the filter label corresponding to the pixel type.
  • processing module 1120 is used to:
  • the filter label corresponding to the pixel type in the code stream is not parsed.
  • processing module 1120 is further configured to:
  • the only filter in the code stream is used for loop filtering.
  • the determining module 1110 is used to:
  • FIG. 12 shows a schematic block diagram of an apparatus 1200 for loop filtering according to another embodiment of the present application.
  • the device 1200 can execute the method 800 of loop filtering in the above embodiment of the present application.
  • the device 1200 may be an encoder.
  • the apparatus 1200 may include:
  • the filtering module 1210 is configured to use a filter corresponding to the pixel category to perform loop filtering on the pixels of the pixel category;
  • the processing module 1220 is configured to generate an encoded code stream, wherein, if the number of filter types used in loop filtering is equal to the number of the pixel categories, the code stream does not include the filter corresponding to the pixel category Label.
  • processing module 1220 is used to:
  • the filter label corresponding to the pixel type is not written into the code stream.
  • the filter label corresponding to the pixel category is the same as the label of the pixel category or is a default correspondence.
  • processing module 1220 is further configured to:
  • the first indication information is written into the code stream, where the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  • processing module 1220 is used to:
  • the filter label corresponding to the pixel type is written into the code stream.
  • processing module 1220 is used to:
  • the filter label corresponding to the pixel type is not written into the code stream.
  • processing module 1220 is further configured to:
  • the initial filters corresponding to different pixel categories are combined to obtain the filter corresponding to each pixel category.
  • processing module 1220 is further configured to:
  • the number of types of filters is reduced by one and then written into the code stream.
  • FIG. 13 shows a schematic block diagram of a loop filtering device 1300 according to another embodiment of the present application.
  • the device 1300 may execute the method 900 of loop filtering in the above embodiment of the present application.
  • the device 1300 may be a decoder.
  • the apparatus 1300 may include:
  • the obtaining module 1310 is used to obtain the coded stream
  • the processing module 1320 is used to parse the code stream to obtain the number of filter types used in loop filtering; if the number of filter types is equal to the number of pixel types, for the pixels of the pixel type, use and Filters with the same labels of the pixel categories or labels with a default corresponding relationship perform loop filtering.
  • processing module 1320 is used to:
  • the filter label indication information in the code stream is parsed, and if the filter label indication information is the first indication information, the same as the pixel category Filters with the same label or a label with a default corresponding relationship perform loop filtering, wherein the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  • processing module 1320 is used to:
  • the filter label indication information parse the filter label indication information in the code stream, and if the filter label indication information is the second indication information, parse the code stream The filter label corresponding to the pixel category in, wherein the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
  • processing module 1320 is used to:
  • the filter label corresponding to the pixel type in the code stream is parsed.
  • processing module 1320 is used to:
  • loop filtering is performed by using the parsed filter of the filter label corresponding to the pixel type.
  • processing module 1320 is used to:
  • the only filter in the code stream is used for loop filtering.
  • loop filtering device in the above embodiment of the present application may be a chip, which may be specifically implemented by a circuit, but the embodiment of the present application does not limit the specific implementation form.
  • the embodiment of the present application also provides an encoder, which is used to implement the function of the encoding end in the embodiment of the present application, and may include the above-mentioned apparatus for loop filtering of the encoding end in the embodiment of the present application.
  • the embodiment of the present application also provides a decoder, which is used to implement the function of the decoder in the embodiment of the present application, and may include the above-mentioned device for loop filtering of the decoder in the embodiment of the present application.
  • An embodiment of the present application also provides a codec, which includes the device for in-loop filtering on the encoding end and the device for in-loop filtering on the decoding end in the above embodiments of the present application.
  • FIG. 14 shows a schematic block diagram of a computer system 1400 according to an embodiment of the present application.
  • the computer system 1400 may include a processor 1410 and a memory 1420.
  • the computer system 1400 may also include components commonly included in other computer systems, such as input and output devices, communication interfaces, etc., which are not limited in the embodiment of the present application.
  • the memory 1420 is used to store computer executable instructions.
  • the memory 1420 may be various types of memory, for example, it may include a high-speed random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The example does not limit this.
  • RAM Random Access Memory
  • non-volatile memory such as at least one disk memory. The example does not limit this.
  • the processor 1410 is configured to access the memory 1420 and execute the computer-executable instructions to perform operations in the loop filtering method of the above embodiment of the present application.
  • the processor 1410 may include a microprocessor, a Field-Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), etc., which are implemented in this application The example does not limit this.
  • FPGA Field-Programmable Gate Array
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • An embodiment of the present application also provides a movable device, which may include the loop filtering apparatus or computer system of the various embodiments of the present application described above.
  • the loop filtering device, computer system, and movable equipment of the embodiment of the present application may correspond to the execution body of the loop filtering method of the embodiment of the present application, and each of the loop filtering device, computer system, and movable equipment
  • the above-mentioned and other operations and/or functions of the modules are used to implement the corresponding procedures of the foregoing methods, and for brevity, they are not repeated here.
  • the embodiment of the present application also provides a computer storage medium, and the computer storage medium stores program code, and the program code may be used to instruct the execution of the loop filtering method of the foregoing embodiment of the present application.
  • the term "and/or” is merely an association relationship describing an associated object, indicating that there may be three relationships.
  • a and/or B can mean: A alone exists, A and B exist at the same time, and B exists alone.
  • the character "/" in this text generally indicates that the associated objects before and after are in an "or" relationship.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments of the present application.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium It includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code .

Abstract

Disclosed are an in-loop filtering method and apparatus, a computer system, and a mobile device. The method comprises: determining the number of types of filters used for in-loop filtering; and determining, according to the number of types of filters, whether to write a filter label corresponding to a pixel category into a code stream. The technical solution provided by embodiments of the present application can improve the compression efficiency.

Description

环路滤波的方法、装置、计算机系统和可移动设备Method, device, computer system and movable equipment for loop filtering
版权申明Copyright statement
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。The content disclosed in this patent document contains copyrighted material. The copyright belongs to the copyright owner. The copyright owner does not object to anyone copying the patent document or the patent disclosure in the official records and archives of the Patent and Trademark Office.
技术领域Technical field
本申请涉及视频编解码领域,并且更具体地,涉及一种环路滤波的方法、装置、计算机系统和可移动设备。This application relates to the field of video coding and decoding, and more specifically, to a method, device, computer system, and portable equipment for loop filtering.
背景技术Background technique
环路滤波是视频编解码框架中的关键部分。它主要用于减少编码过程中产生的块效应、振铃效应等压缩失真。目前主要有三种环路滤波技术,即去块滤波、自适应样值补偿滤波和自适应环路滤波(Adaptive loop filter,ALF)。Loop filtering is a key part of the video coding and decoding framework. It is mainly used to reduce compression distortions such as blocking effects and ringing effects generated in the encoding process. At present, there are mainly three loop filtering techniques, namely, deblocking filtering, adaptive sample compensation filtering and adaptive loop filtering (ALF).
去块滤波和自适应样值补偿滤波沿用了高效率视频编码(High Efficiency Video Coding,HEVC)中的方法。去块滤波用于预测单元和变换单元的边界,利用训练得到的低通滤波器进行边界像素的非线性加权,从而减少块效应。自适应样值补偿滤波通过对图像块内像素进行分类,进而为每类像素加上相同补偿值的方式使得重构图像更接近原始图像,从而起到抑制振铃效应的作用。The deblocking filtering and adaptive sample compensation filtering follow the methods in High Efficiency Video Coding (HEVC). The deblocking filter is used for the boundary between the prediction unit and the transform unit, and the low-pass filter obtained by training is used to perform nonlinear weighting of the boundary pixels, thereby reducing the blocking effect. The adaptive sample compensation filter classifies the pixels in the image block, and then adds the same compensation value to each type of pixel to make the reconstructed image closer to the original image, thereby suppressing the ringing effect.
自适应环路滤波是一种维纳滤波器,主要用于最小化原始图像和重构图像之间的均方误差。然而,当前技术中,在将ALF相关系数及参数写入码流时,存在冗余,影响了压缩效率。Adaptive loop filtering is a Wiener filter, which is mainly used to minimize the mean square error between the original image and the reconstructed image. However, in the current technology, when ALF correlation coefficients and parameters are written into the code stream, there is redundancy, which affects the compression efficiency.
发明内容Summary of the invention
本申请实施例提供了一种环路滤波的方法、装置、计算机系统和可移动设备,能够提高压缩效率。The embodiments of the present application provide a method, a device, a computer system, and a portable device for loop filtering, which can improve compression efficiency.
第一方面,提供了一种环路滤波的方法,包括:确定环路滤波采用的滤波器的种类的数目;根据所述滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流。In a first aspect, a method for loop filtering is provided, including: determining the number of types of filters used in loop filtering; and determining whether to write the filter label corresponding to the pixel category according to the number of types of filters Into the code stream.
第二方面,提供了一种环路滤波的方法,包括:确定环路滤波采用的滤波器的种类的数目;根据所述滤波器的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号。In a second aspect, a method for loop filtering is provided, which includes: determining the number of types of filters used in loop filtering; and determining whether to parse the corresponding pixel categories in the code stream according to the number of types of filters Filter label.
第三方面,提供了一种环路滤波的方法,包括:采用像素类别对应的滤波器对所述像素类别的像素进行环路滤波;生成编码后的码流,其中,若环路滤波采用的滤波器的种类的数目等于所述像素类别的数目,所述码流中不包括所述像素类别对应的滤波器标号。In a third aspect, a method for loop filtering is provided, which includes: loop filtering pixels of the pixel category by using a filter corresponding to the pixel category; generating an encoded code stream, where if the loop filtering is used The number of filter types is equal to the number of pixel types, and the code stream does not include the filter label corresponding to the pixel type.
第四方面,提供了一种环路滤波的方法,包括:获取编码后的码流;解析所述码流,得到环路滤波采用的滤波器的种类的数目;若所述滤波器的种类的数目等于像素类别的数目,对所述像素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。In a fourth aspect, a method for loop filtering is provided, which includes: obtaining an encoded code stream; parsing the code stream to obtain the number of types of filters used in loop filtering; The number is equal to the number of pixel categories, and for the pixels of the pixel category, a filter with the same label as the pixel category or a label with a default corresponding relationship is used to perform loop filtering.
第五方面,提供了一种环路滤波的装置,包括:确定模块,确定环路滤波采用的滤波器的种类的数目;处理模块,根据所述滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流。In a fifth aspect, a device for loop filtering is provided, including: a determining module, which determines the number of types of filters used in loop filtering; a processing module, which determines whether to classify pixels according to the number of types of filters The corresponding filter label is written into the code stream.
第六方面,提供了一种环路滤波的装置,包括:确定模块,用于确定环路滤波采用的滤波器的种类的数目;处理模块,用于根据所述滤波器的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号。In a sixth aspect, a device for loop filtering is provided, including: a determining module, configured to determine the number of types of filters used in loop filtering; and a processing module, configured to determine the number of types of filters Whether to parse the filter label corresponding to the pixel category in the bitstream.
第七方面,提供了一种环路滤波的装置,包括:滤波模块,用于采用像素类别对应的滤波器对所述像素类别的像素进行环路滤波;处理模块,用于生成编码后的码流,其中,若环路滤波采用的滤波器的种类的数目等于所述像素类别的数目,所述码流中不包括所述像素类别对应的滤波器标号。In a seventh aspect, a device for loop filtering is provided, which includes: a filtering module, configured to use a filter corresponding to the pixel category to loop-filter the pixels of the pixel category; and a processing module, configured to generate an encoded code Wherein, if the number of filter types used in loop filtering is equal to the number of pixel types, the code stream does not include the filter label corresponding to the pixel type.
第八方面,提供了一种环路滤波的装置,包括:获取模块,用于获取编码后的码流;处理模块,用于解析所述码流,得到环路滤波采用的滤波器的种类的数目;若所述滤波器的种类的数目等于像素类别的数目,对所述像素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。In an eighth aspect, a device for loop filtering is provided, which includes: an acquisition module for acquiring an encoded code stream; a processing module for analyzing the code stream to obtain information about the type of filter used in loop filtering Number; if the number of types of the filter is equal to the number of pixel types, for the pixels of the pixel type, a filter with the same label as the pixel type or a label with a default corresponding relationship is used for loop filtering.
第九方面,提供了一种计算机系统,包括:存储器,用于存储计算机可执行指令;处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行上述各方面的方法中的操作。In a ninth aspect, a computer system is provided, including: a memory, configured to store computer-executable instructions; a processor, configured to access the memory and execute the computer-executable instructions to perform the methods in the above aspects Operation.
第十方面,提供了一种可移动设备,包括:上述各方面的环路滤波的装置;或者,上述第九方面的计算机系统。In a tenth aspect, a mobile device is provided, which includes: the loop filtering device of the foregoing aspects; or, the computer system of the foregoing ninth aspect.
第十一方面,提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述各方面的方法。In an eleventh aspect, a computer storage medium is provided, and program code is stored in the computer storage medium, and the program code can be used to instruct to perform the methods of the foregoing aspects.
本申请实施例的技术方案,根据滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流,这样,可以避免统一将像素类别对应的滤波器标号写入码流而产生的冗余,节省编码比特,从而能够提高压缩效率。According to the technical solution of the embodiment of the present application, according to the number of filter types, it is determined whether to write the filter label corresponding to the pixel category into the code stream. In this way, it is possible to avoid uniformly writing the filter label corresponding to the pixel category into the code stream. Redundancy, saving coding bits, which can improve compression efficiency.
附图说明Description of the drawings
图1是应用本申请实施例的技术方案的架构图。Fig. 1 is a structural diagram of a technical solution applying an embodiment of the present application.
图2是本申请实施例的待编码数据的示意图。Figure 2 is a schematic diagram of data to be encoded in an embodiment of the present application.
图3是本申请实施例的编码框架示意图。Fig. 3 is a schematic diagram of a coding framework of an embodiment of the present application.
图4是本申请实施例的自适应环路滤波的示意图。Fig. 4 is a schematic diagram of adaptive loop filtering according to an embodiment of the present application.
图5是本申请实施例的滤波系数的示意图。Fig. 5 is a schematic diagram of filter coefficients in an embodiment of the present application.
图6是本申请一个实施例的环路滤波的方法的示意性流程图。FIG. 6 is a schematic flowchart of a loop filtering method according to an embodiment of the present application.
图7是本申请另一个实施例的环路滤波的方法的示意性流程图。FIG. 7 is a schematic flowchart of a loop filtering method according to another embodiment of the present application.
图8是本申请又一个实施例的环路滤波的方法的示意性流程图。FIG. 8 is a schematic flowchart of a loop filtering method according to another embodiment of the present application.
图9是本申请又一个实施例的环路滤波的方法的示意性流程图。FIG. 9 is a schematic flowchart of a method for loop filtering according to another embodiment of the present application.
图10是本申请一个实施例的环路滤波的装置的示意性框图。Fig. 10 is a schematic block diagram of a loop filtering device according to an embodiment of the present application.
图11是本申请另一个实施例的环路滤波的装置的示意性框图。FIG. 11 is a schematic block diagram of a loop filtering device according to another embodiment of the present application.
图12是本申请又一个实施例的环路滤波的装置的示意性框图。Fig. 12 is a schematic block diagram of a loop filtering device according to another embodiment of the present application.
图13是本申请又一个实施例的环路滤波的装置的示意性框图。Fig. 13 is a schematic block diagram of a loop filtering device according to another embodiment of the present application.
图14是本申请实施例的计算机系统的示意性框图。Fig. 14 is a schematic block diagram of a computer system according to an embodiment of the present application.
具体实施方式detailed description
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings.
应理解,本文中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围。It should be understood that the specific examples in this document are only to help those skilled in the art to better understand the embodiments of the present application, rather than limiting the scope of the embodiments of the present application.
还应理解,本申请实施例中的公式只是一种示例,而非限制本申请实施例的范围,各公式可以进行变形,这些变形也应属于本申请保护的范围。It should also be understood that the formulas in the embodiments of the present application are only examples, and do not limit the scope of the embodiments of the present application. Each formula can be modified, and these modifications should also fall within the protection scope of the present application.
还应理解,在本申请的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should also be understood that, in the various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application. The implementation process constitutes any limitation.
还应理解,本说明书中描述的各种实施方式,既可以单独实施,也可以组合实施,本申请实施例对此并不限定。It should also be understood that the various implementation manners described in this specification can be implemented individually or in combination, which is not limited in the embodiments of the present application.
除非另有说明,本申请实施例所使用的所有技术和科学术语与本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。本申请所使用的术语“和/或”包括一个或多个相关的所列项的任意的和所有的组合。Unless otherwise specified, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by those skilled in the technical field of the present application. The terminology used in this application is only for the purpose of describing specific embodiments, and is not intended to limit the scope of this application. The term "and/or" as used in this application includes any and all combinations of one or more related listed items.
图1是应用本申请实施例的技术方案的架构图。Fig. 1 is a structural diagram of a technical solution applying an embodiment of the present application.
如图1所示,系统100可以接收待处理数据102,对待处理数据102进行处理,产生处理后数据108。例如,系统100可以接收待编码数据,对待编码数据进行编码以产生编码后的数据,或者,系统100可以接收待解码数据,对待解码数据进行解码以产生解码后的数据。在一些实施例中,系统100中的部件可以由一个或多个处理器实现,该处理器可以是计算设备中的处理器,也可以是移动设备(例如无人机)中的处理器。该处理器可以为任意种类的处理器,本申请实施例对此不做限定。在一些可能的设计中,该处理器可以包括编码器、解码器或编解码器等。系统100中还可以包括一个或多个存储器。该存储器可用于存储指令和数据,例如,实现本申请实施例的技术方案的计算机可执行指令,待处理数据102、处理后数据108等。该存储器可以为任意种类的存储器,本申请实施例对此也不做限定。As shown in FIG. 1, the system 100 can receive the data 102 to be processed, process the data 102 to be processed, and generate processed data 108. For example, the system 100 may receive the data to be encoded and encode the data to be encoded to generate encoded data, or the system 100 may receive the data to be decoded and decode the data to be decoded to generate decoded data. In some embodiments, the components in the system 100 may be implemented by one or more processors. The processor may be a processor in a computing device or a processor in a mobile device (such as a drone). The processor may be any type of processor, which is not limited in the embodiment of the present application. In some possible designs, the processor may include an encoder, a decoder, or a codec. The system 100 may also include one or more memories. The memory can be used to store instructions and data, for example, computer-executable instructions that implement the technical solutions of the embodiments of the present application, the to-be-processed data 102, the processed data 108, and so on. The memory can be any type of memory, which is not limited in the embodiment of the present application.
待编码数据可以包括文本,图像,图形对象,动画序列,音频,视频,或者任何需要编码的其他数据。在一些情况下,待编码数据可以包括来自传感器的传感数据,该传感器可以为视觉传感器(例如,相机、红外传感器),麦克风,近场传感器(例如,超声波传感器、雷达),位置传感器,温度传感器,触摸传感器等。在一些情况下,待编码数据可以包括来自用户的信息,例如,生物信息,该生物信息可以包括面部特征,指纹扫描,视网膜扫描,嗓音记录,DNA采样等。The data to be encoded can include text, images, graphic objects, animation sequences, audio, video, or any other data that needs to be encoded. In some cases, the data to be encoded may include sensor data from a sensor, which may be a vision sensor (for example, a camera, an infrared sensor), a microphone, a near field sensor (for example, an ultrasonic sensor, a radar), a position sensor, and a temperature sensor. Sensors, touch sensors, etc. In some cases, the data to be encoded may include information from the user, for example, biological information, which may include facial features, fingerprint scans, retinal scans, voice recordings, DNA sampling, and so on.
图2示出了本申请实施例的待编码数据的示意图。Figure 2 shows a schematic diagram of data to be encoded in an embodiment of the present application.
如图2所示,待编码数据202可以包括多个帧204。例如,多个帧204可以表示视频流中的连续的图像帧。每个帧204可以包括一个或多个条带(slice)或贴砖(tile)206。每个条带或tile206可以包括一个或多个图像块208。例如,该图像块208可以是编码单元208。每个图像块208可以包括一个或多个像素212。每个像素212可以包括一个或多个数据集,对应于一个 或多个数据部分,例如,亮度数据部分和色度数据部分。图像处理针对的数据单元可以为帧,条带,tile,编码单元,宏块,块,像素或以上任一种的组。在不同的实施例中,数据单元的大小可以变化。As shown in FIG. 2, the data to be encoded 202 may include a plurality of frames 204. For example, multiple frames 204 may represent consecutive image frames in a video stream. Each frame 204 may include one or more slices or tiles 206. Each strip or tile 206 may include one or more image blocks 208. For example, the image block 208 may be an encoding unit 208. Each image block 208 may include one or more pixels 212. Each pixel 212 may include one or more data sets corresponding to one or more data parts, for example, a luminance data part and a chrominance data part. The data unit for image processing can be a frame, a slice, a tile, a coding unit, a macroblock, a block, a pixel, or any group of the above. In different embodiments, the size of the data unit can vary.
编码对于高效和/或安全的传输或存储数据是必需的。对待编码数据的编码可以包括数据压缩,加密,纠错编码,格式转换等。例如,对多媒体数据(例如视频或音频)压缩可以减少在网络中传输的比特数量。敏感数据,例如金融信息和个人标识信息,在传输和存储前可以加密以保护机密和/或隐私。为了减少视频存储和传输所占用的带宽,需要对视频数据进行编码压缩处理。Encoding is necessary for efficient and/or secure transmission or storage of data. The encoding of the data to be encoded may include data compression, encryption, error correction encoding, format conversion, and so on. For example, compressing multimedia data (such as video or audio) can reduce the number of bits transmitted in the network. Sensitive data, such as financial information and personal identification information, can be encrypted before transmission and storage to protect confidentiality and/or privacy. In order to reduce the bandwidth occupied by video storage and transmission, video data needs to be encoded and compressed.
任何合适的编码技术都可以用于编码待编码数据。编码类型依赖于被编码的数据和具体的编码需求。Any suitable encoding technique can be used to encode the data to be encoded. The encoding type depends on the data being encoded and the specific encoding requirements.
在一些实施例中,编码器可以实现一种或多种不同的编解码器。每种编解码器可以包括实现不同编码算法的代码,指令或计算机程序。基于各种因素,包括待编码数据的类型和/或来源,编码数据的接收实体,可用的计算资源,网络环境,商业环境,规则和标准等,可以选择一种合适的编码算法编码给定的待编码数据。In some embodiments, the encoder may implement one or more different codecs. Each codec may include codes, instructions or computer programs that implement different encoding algorithms. Based on various factors, including the type and/or source of the data to be encoded, the receiving entity of the encoded data, available computing resources, network environment, business environment, rules and standards, etc., a suitable encoding algorithm can be selected to encode a given Data to be encoded.
例如,编码器可以被配置为编码一系列视频帧。编码每个帧中的数据可以采用一系列步骤。在一些实施例中,编码步骤可以包括预测、变换、量化、熵编码等处理步骤。For example, the encoder can be configured to encode a series of video frames. A series of steps can be used to encode the data in each frame. In some embodiments, the encoding step may include processing steps such as prediction, transformation, quantization, and entropy encoding.
预测包括帧内预测和帧间预测两种类型,其目的在于利用预测块信息去除当前待编码图像块的冗余信息。帧内预测利用本帧图像的信息获得预测块数据。帧间预测利用参考帧的信息获得预测块数据,其过程包括将待编码图像划分成若干个图像块;然后,针对每个图像块,在参考图像中搜索与当前图像块最匹配的图像块作为预测块;其后,将该图像块与预测块的相应像素值相减得到残差。Prediction includes two types of intra-frame prediction and inter-frame prediction, and its purpose is to use prediction block information to remove redundant information of the current image block to be encoded. Intra-frame prediction uses the information of the current frame to obtain prediction block data. Inter-frame prediction uses the information of the reference frame to obtain prediction block data. The process includes dividing the image to be encoded into several image blocks; then, for each image block, search for the image block that best matches the current image block in the reference image as Prediction block; after that, the corresponding pixel values of the image block and the prediction block are subtracted to obtain the residual.
使用变换矩阵对图像的残差块进行变换可以去除图像块的残差的相关性,即去除图像块的冗余信息,以便提高编码效率,图像块中的数据块的变换通常采用二维变换,即在编码端将数据块的残差信息分别与一个NxM的变换矩阵及其转置矩阵相乘,相乘之后得到的是变换系数。变换系数经量化可得到量化后的系数,最后将量化后的系数进行熵编码,最后将熵编码得到的比特流及进行编码后的编码模式信息,如帧内预测模式、运动矢量信息 等,进行存储或发送到解码端。在图像的解码端,首先获得熵编码比特流后进行熵解码,得到相应的残差,根据解码得到的运动矢量或帧内预测等信息图像块对应的预测图像块,根据预测图像块与图像块的残差得到当前子图像块中各像素点的值。Using a transformation matrix to transform the residual block of the image can remove the correlation of the residual of the image block, that is, to remove the redundant information of the image block in order to improve the coding efficiency. The transformation of the data block in the image block usually adopts two-dimensional transformation. That is, at the encoding end, the residual information of the data block is respectively multiplied by an NxM transformation matrix and its transposed matrix, and the transformation coefficients are obtained after the multiplication. The transform coefficients can be quantized to obtain quantized coefficients, and finally the quantized coefficients are entropy coded, and finally the bit stream obtained by entropy coding and the coding mode information after coding, such as intra prediction mode, motion vector information, etc. Store or send to the decoder. At the decoding end of the image, first obtain the entropy coded bitstream and then perform entropy decoding to obtain the corresponding residual. According to the decoded motion vector or intra prediction and other information, the predicted image block corresponding to the image block, according to the predicted image block and the image block The residual error of is obtained the value of each pixel in the current sub-image block.
图3示出了本申请实施例的编码框架示意图。Fig. 3 shows a schematic diagram of an encoding framework of an embodiment of the present application.
如图3所示,在采用帧间预测时,编码的流程可以如下所示:As shown in Figure 3, when using inter-frame prediction, the encoding process can be as follows:
在301中,获取当前帧图像。在302中,获取参考帧图像。在303a中,利用参考帧图像,进行运动估计,以得到当前帧图像的各个图像块的运动矢量(Motion Vector,MV)。在304a中,利用运动估计得到的运动矢量,进行运动补偿,以得到当前图像块的估计值/预测值。在305中,将当前图像块的估计值/预测值与当前图像块相减,得到残差。在306中,对残差进行变换,以得到变换系数。在307中,变换系数经量化可得到量化后的系数。在308中,将量化后的系数进行熵编码,最后将熵编码得到的比特流及进行编码后的编码模式信息进行存储或发送到解码端。在309中,对量化的结果进行反量化。在310中,对反量化结果进行反变换。在311中,利用反变换结果以及运动补偿结果,得到重建像素。在312中,对重建像素进行滤波(即环路滤波)。在313中,输出滤波后的重建像素。后续,重建后的图像可以作为其他帧图像的参考帧图像进行帧间预测。In 301, the current frame image is acquired. In 302, a reference frame image is obtained. In 303a, a reference frame image is used to perform motion estimation to obtain a motion vector (Motion Vector, MV) of each image block of the current frame image. In 304a, the motion vector obtained by the motion estimation is used to perform motion compensation to obtain the estimated value/predicted value of the current image block. In 305, the estimated value/predicted value of the current image block is subtracted from the current image block to obtain a residual. In 306, the residual is transformed to obtain transform coefficients. In 307, the transform coefficient is quantized to obtain the quantized coefficient. In 308, the quantized coefficients are entropy coded, and finally the bit stream obtained by entropy coding and the coding mode information after coding are stored or sent to the decoding end. In 309, the quantization result is dequantized. In 310, the inverse quantization result is inversely transformed. In 311, the reconstructed pixels are obtained by using the inverse transform result and the motion compensation result. In 312, the reconstructed pixels are filtered (ie, loop filtering). In 313, the reconstructed pixels after filtering are output. Subsequently, the reconstructed image can be used as a reference frame image for other frame images for inter-frame prediction.
在采用帧内预测时,编码的流程可以如下所示:When intra-frame prediction is used, the encoding process can be as follows:
在302中,获取当前帧图像。在303b中,对当前帧图像进行帧内预测选择。在304b中,当前帧中的当前图像块进行帧内预测。在305中,将当前图像块的估计值与当前图像块相减,得到残差。在306中,对图像块的残差进行变换,以得到变换系数。在307中,变换系数经量化可得到量化后的系数。在308中,将量化后的系数进行熵编码,最后将熵编码得到的比特流及进行编码后的编码模式信进行存储或发送到解码端。在309中,对量化结果进行反量化。在310中,对反量化结果进行反变换,在311中,利用反变换结果以及帧内预测结果,得到重建像素。重建后的图像块可以用于下一图像块的帧内预测。In 302, the current frame image is obtained. In 303b, intra-frame prediction selection is performed on the current frame image. In 304b, the current image block in the current frame performs intra-frame prediction. In 305, the estimated value of the current image block is subtracted from the current image block to obtain the residual. In 306, the residual of the image block is transformed to obtain transform coefficients. In 307, the transform coefficient is quantized to obtain the quantized coefficient. In 308, the quantized coefficients are entropy coded, and finally the bit stream obtained by the entropy coding and the coded coding mode information are stored or sent to the decoding end. In 309, the quantization result is dequantized. In 310, the inverse quantization result is inversely transformed, and in 311, the inverse transform result and the intra-frame prediction result are used to obtain reconstructed pixels. The reconstructed image block can be used for intra prediction of the next image block.
对于解码端,则进行与编码端相对应的操作。首先利用熵解码以及反量化和反变换得到残差信息,并根据解码码流确定当前图像块使用帧内预测还是帧间预测。如果是帧内预测,则利用当前帧中已重建图像块按照帧内预 测方法构建预测信息;如果是帧间预测,则需要解析出运动信息,并使用所解析出的运动信息在已重建的图像中确定参考块,得到预测信息;接下来,再将预测信息与残差信息进行叠加,并经过滤波操作便可以得到重建信息。For the decoding end, operations corresponding to the encoding end are performed. First, use entropy decoding, inverse quantization and inverse transformation to obtain residual information, and determine whether the current image block uses intra prediction or inter prediction according to the decoded bitstream. If it is intra-frame prediction, the reconstructed image block in the current frame is used to construct prediction information according to the intra-frame prediction method; if it is inter-frame prediction, it is necessary to parse out the motion information, and use the parsed motion information in the reconstructed image Determine the reference block to obtain the prediction information; then, superimpose the prediction information and the residual information, and pass the filtering operation to obtain the reconstruction information.
本申请实施例的技术方案可以应用于编码或解码的滤波过程中。本申请实施例的技术方案主要涉及滤波步骤,即,通过滤波步骤中的改进,提高压缩效率,其他步骤可以参考编码过程中的相关步骤。The technical solutions of the embodiments of the present application can be applied to the filtering process of encoding or decoding. The technical solutions of the embodiments of the present application mainly involve the filtering step, that is, the improvement in the filtering step can improve the compression efficiency, and other steps can refer to the relevant steps in the encoding process.
本申请实施例的技术方案可以应用于编码或解码中的自适应环路滤波。The technical solutions of the embodiments of the present application can be applied to adaptive loop filtering in encoding or decoding.
自适应环路滤波器是根据原始信号和编码后的失真信号来计算的均方意义下最优滤波器,本质是一种维纳滤波器。The adaptive loop filter is an optimal filter in the mean square sense calculated based on the original signal and the encoded distortion signal, and is essentially a Wiener filter.
如图4所示,X是原始信号,e是噪声或者说是失真,Y是失真信号,
Figure PCTCN2019078053-appb-000001
是滤波后的信号。滤波器满足:
As shown in Figure 4, X is the original signal, e is the noise or distortion, and Y is the distorted signal.
Figure PCTCN2019078053-appb-000001
Is the filtered signal. The filter meets:
Figure PCTCN2019078053-appb-000002
Figure PCTCN2019078053-appb-000002
在自适应环路滤波中,对于每一个像素点,使用周围像素点的加权平均来得到当前点滤波之后的结果。使用到的临近像素点的位置如图5所示,其中C12对应的点为当前待滤波的点,滤波过程使用图5中所有位置点的加权平均获得,滤波系数就是各个点的权重,共有13个滤波系数C0~C13。最终滤波的过程即为图5中所示点与其对应滤波系数的乘积再加和。此过程中使用到的点,都是自适应环路滤波之前得到的重构的点。In adaptive loop filtering, for each pixel, the weighted average of surrounding pixels is used to obtain the result after the current point is filtered. The positions of the neighboring pixels used are shown in Figure 5, where the point corresponding to C12 is the current point to be filtered. The filtering process is obtained by using the weighted average of all the position points in Figure 5. The filter coefficient is the weight of each point, a total of 13 A filter coefficient C0 ~ C13. The final filtering process is the sum of the products of the points shown in Figure 5 and their corresponding filter coefficients. The points used in this process are all reconstructed points obtained before adaptive loop filtering.
考虑到复杂度的问题,不可能为每个像素点设置一套滤波系数,因此需要对像素点进行分类。同一个类别的像素点使用同样一套滤波系数(一种滤波器)。像素分类的方式可以有很多种。例如,可以只对像素的Y分量进行分类,对UV分量不进行分类。例如,Y分量可分为25类,UV分量都是只有一类。这也就意味着,对于一帧图像来讲,Y分量最多可以有25套滤波器,UV分量只有一套。Considering the problem of complexity, it is impossible to set a set of filter coefficients for each pixel, so it is necessary to classify the pixels. Pixels of the same category use the same set of filter coefficients (a filter). There are many ways to classify pixels. For example, only the Y component of the pixel may be classified, and the UV component may not be classified. For example, the Y component can be divided into 25 categories, and the UV component is only one category. This means that for a frame of image, there can be up to 25 sets of filters for the Y component and only one set for the UV component.
应理解,在本申请实施例中,像素类别可以是对应于Y分量的类别,但本申请实施例对此并不限定,像素类别也可以是对应于其他分量或所有分量的类别。It should be understood that in the embodiment of the present application, the pixel category may be a category corresponding to the Y component, but the embodiment of the present application is not limited to this, and the pixel category may also be a category corresponding to other components or all components.
例如,每一个4x4的块都可以根据拉普拉斯方向进行分类:For example, each 4x4 block can be classified according to the Laplace direction:
Figure PCTCN2019078053-appb-000003
Figure PCTCN2019078053-appb-000003
C代表像素块所属类别。C represents the category of the pixel block.
Figure PCTCN2019078053-appb-000004
相当于是进行方向(Direction)分类之后的细分类结果,
Figure PCTCN2019078053-appb-000005
的获取可以有多种方式,这里只是代表细分类的结果。
Figure PCTCN2019078053-appb-000004
It is equivalent to the fine classification result after the direction classification,
Figure PCTCN2019078053-appb-000005
There are many ways to obtain. This is just the result of sub-categorization.
方向D(Direction)的计算方式如下,The calculation method of the direction D (Direction) is as follows,
Figure PCTCN2019078053-appb-000006
Figure PCTCN2019078053-appb-000006
Figure PCTCN2019078053-appb-000007
Figure PCTCN2019078053-appb-000007
Figure PCTCN2019078053-appb-000008
Figure PCTCN2019078053-appb-000008
Figure PCTCN2019078053-appb-000009
Figure PCTCN2019078053-appb-000009
(i,j)代表当前4x4块在整个图像中的坐标位置。(i,j) represents the coordinate position of the current 4x4 block in the entire image.
R(k,l)代表4x4块中位于(k,l)位置的像素值。R(k,l) represents the pixel value at the (k,l) position in the 4x4 block.
V k,l代表4x4块中位于(i,j)坐标的像素点在竖直方向的拉普拉斯梯度。 V k,l represents the vertical Laplacian gradient of the pixel at the (i,j) coordinate in the 4x4 block.
H k,l代表4x4块中位于(i,j)坐标的像素点在水平方向拉普拉斯梯度。 H k,l represents the Laplacian gradient of the pixel at the (i,j) coordinate in the 4x4 block in the horizontal direction.
D1 k,l代表4x4块中位于(i,j)坐标的像素点在135度方向拉普拉斯梯度。 D1 k,l represents the Laplacian gradient of the pixel at the (i,j) coordinate in the 4x4 block in the direction of 135 degrees.
D2 k,l代表4x4块中位于(i,j)坐标的像素点在45度拉普拉斯梯度。 D2 k,l represents the 45-degree Laplacian gradient of the pixel at the (i,j) coordinate in the 4x4 block.
g v代表4x4块在竖直方向的拉普拉斯梯度。 g v represents the Laplacian gradient of the 4x4 block in the vertical direction.
g h代表4x4块在水平方向的拉普拉斯梯度。 g h represents the Laplacian gradient of the 4x4 block in the horizontal direction.
g d1代表4x4块在135度方向的拉普拉斯梯度。 g d1 represents the Laplacian gradient of the 4x4 block at 135 degrees.
g d2代表4x4块在45度方向的拉普拉斯梯度。 g d2 represents the Laplacian gradient of the 4x4 block at 45 degrees.
i和j是4x4块的左上像素点的坐标。R(i,j)代表位于坐标(i,j)的重构像素值。i and j are the coordinates of the upper left pixel of the 4x4 block. R(i,j) represents the reconstructed pixel value at the coordinate (i,j).
Figure PCTCN2019078053-appb-000010
Figure PCTCN2019078053-appb-000010
Figure PCTCN2019078053-appb-000011
Figure PCTCN2019078053-appb-000011
Figure PCTCN2019078053-appb-000012
Figure PCTCN2019078053-appb-000012
Figure PCTCN2019078053-appb-000013
Figure PCTCN2019078053-appb-000013
Figure PCTCN2019078053-appb-000014
代表水平、竖直方向拉普拉斯梯度值的最大值。
Figure PCTCN2019078053-appb-000014
Represents the maximum value of the Laplacian gradient in the horizontal and vertical directions.
Figure PCTCN2019078053-appb-000015
代表水平、竖直方向拉普拉斯梯度值的最小值。
Figure PCTCN2019078053-appb-000015
Represents the minimum value of the Laplacian gradient in the horizontal and vertical directions.
Figure PCTCN2019078053-appb-000016
代表45、135方向拉普拉斯梯度值的最大值。
Figure PCTCN2019078053-appb-000016
Represents the maximum value of the Laplacian gradient in the 45 and 135 directions.
Figure PCTCN2019078053-appb-000017
代表45、135方向拉普拉斯梯度值的最小值。
Figure PCTCN2019078053-appb-000017
Represents the minimum value of the Laplacian gradient in the 45 and 135 directions.
R h,v代表水平、竖直方向拉普拉斯梯度的比值。 R h,v represents the ratio of the Laplacian gradient in the horizontal and vertical directions.
R d0,d1代表45、135方向拉普拉斯梯度的比值。 R d0, d1 represent the ratio of the Laplacian gradient in the 45 and 135 directions.
如果
Figure PCTCN2019078053-appb-000018
而且
Figure PCTCN2019078053-appb-000019
D设置为0。
in case
Figure PCTCN2019078053-appb-000018
and
Figure PCTCN2019078053-appb-000019
D is set to 0.
如果
Figure PCTCN2019078053-appb-000020
而且
Figure PCTCN2019078053-appb-000021
D设置为1。
in case
Figure PCTCN2019078053-appb-000020
and
Figure PCTCN2019078053-appb-000021
D is set to 1.
如果
Figure PCTCN2019078053-appb-000022
而且
Figure PCTCN2019078053-appb-000023
D设置为2。
in case
Figure PCTCN2019078053-appb-000022
and
Figure PCTCN2019078053-appb-000023
D is set to 2.
如果
Figure PCTCN2019078053-appb-000024
而且
Figure PCTCN2019078053-appb-000025
D设置为3。
in case
Figure PCTCN2019078053-appb-000024
and
Figure PCTCN2019078053-appb-000025
D is set to 3.
如果
Figure PCTCN2019078053-appb-000026
而且
Figure PCTCN2019078053-appb-000027
D设置为4。
in case
Figure PCTCN2019078053-appb-000026
and
Figure PCTCN2019078053-appb-000027
D is set to 4.
t1和t2代表预先设置的阈值。t1 and t2 represent preset thresholds.
Figure PCTCN2019078053-appb-000028
的计算方式如下,
Figure PCTCN2019078053-appb-000028
Is calculated as follows,
Figure PCTCN2019078053-appb-000029
Figure PCTCN2019078053-appb-000029
然后将A量化得到0~4之间的整数,得到
Figure PCTCN2019078053-appb-000030
Then quantize A to get an integer between 0 and 4 to get
Figure PCTCN2019078053-appb-000030
为了进一步提高压缩性能,减少编码系数所需比特(bit)数目,ALF可以采用系数合并技术,例如,不同种类像素点之间的系数合并,滤波系数置零操作,系数差分编码方式。In order to further improve compression performance and reduce the number of bits required for coding coefficients, ALF can use coefficient merging techniques, for example, coefficient merging between different types of pixels, filter coefficient zeroing operations, and coefficient differential coding methods.
不同种类像素点之间的系数合并,就是不同种类使用相同的滤波器。如果某些种类使用相同的滤波器,那么就可以在码流中少传递一些滤波系数。The combination of coefficients between different types of pixels means that different types use the same filter. If certain types use the same filter, then some filter coefficients can be transferred in the code stream.
滤波系数置零:有些种类的像素点,在不使用ALF滤波的情况下可能更好。也就是说,其不使用ALF滤波所节省的bit数与其带来的失真相比于使用ALF滤波器的增大来讲,更加显著。也就是这种情况下,有些种类的像素点,滤波系数可以直接置零。Set the filter coefficient to zero: some types of pixels may be better without ALF filtering. In other words, the number of bits saved by not using the ALF filter and the distortion caused by it are more significant than the increase in using the ALF filter. In this case, for some types of pixels, the filter coefficient can be directly set to zero.
系数差分编码方式:滤波系数可以选择两种编码方式,二选一,第一种是直接将滤波系数写入码流,另一种是,将第一套滤波系数写入码流,再将第二套减去第一套系数之后的结果写入码流,再将第三套减去第二套之后的系数写入码流,以此类推。这种方式为系数差分编码方式。编码端可以进行编码方式的选择。Coefficient differential coding method: filter coefficients can choose two coding methods, choose one of the two, the first is to directly write the filter coefficients into the code stream, the other is to write the first set of filter coefficients into the code stream, and then the first The second set of coefficients after subtracting the first set of coefficients is written into the code stream, and the third set of coefficients after subtracting the second set is written into the code stream, and so on. This method is the coefficient differential coding method. The encoding end can select the encoding method.
以上系数合并方式,都是需要在编码端进行决策,比如,决策哪几种类别进行系数合并比较好,决策每一种滤波器,系数置零还是不置零比较好,决策系数采用差分编码比较好还是直接编码比较好。The above coefficient merging methods require decision-making at the encoding end. For example, it is better to determine which categories are better to merge coefficients. It is better to decide whether to set the coefficients to zero or not to zero for each filter. It is better to use differential coding for the decision coefficients. It is better to code directly.
在采用滤波器系数合并的情况下,环路滤波采用的滤波器的种类的数目可能等于像素类别的数目,也可能不再等于像素类别的数目,即多种像素类别可能使用相同的滤波器。这样,每个像素类别使用哪种滤波器就需要在码流中进行标识。然而,目前的标识方式存在冗余,影响了压缩效率。鉴于此,本申请实施例提供了一种改进的技术方案。In the case of combining filter coefficients, the number of filter types used in loop filtering may be equal to the number of pixel types, or may no longer be equal to the number of pixel types, that is, multiple pixel types may use the same filter. In this way, which filter is used for each pixel category needs to be identified in the code stream. However, the current identification method has redundancy, which affects the compression efficiency. In view of this, the embodiments of the present application provide an improved technical solution.
本申请实施例的技术方案,既可以应用于编码端,也可以应用于解码端。下面分别从编码端和解码端描述本申请实施例的技术方案。The technical solutions of the embodiments of the present application can be applied to both the encoding end and the decoding end. The following describes the technical solutions of the embodiments of the present application from the encoding end and the decoding end respectively.
图6示出了本申请一个实施例的环路滤波的方法600的示意性流程图。该方法600可以由编码端执行。例如,可以由图1所示的系统100在进行编码操作时执行。FIG. 6 shows a schematic flowchart of a method 600 for loop filtering according to an embodiment of the present application. The method 600 may be executed by the encoding end. For example, it can be executed by the system 100 shown in FIG. 1 during the encoding operation.
610,确定环路滤波采用的滤波器的种类的数目。610: Determine the number of types of filters used in loop filtering.
如前所述,在自适应环路滤波中,对于每帧图像或每个slice或每个tile,可能会采用多种滤波器。在采用滤波器系数合并的情况下,环路滤波采用的滤波器的种类的数目可能等于像素类别的数目,也可能不再等于像素类别的数目。编码端可根据实际采用的滤波器的种类的数目进行码流写入。具体的,码流中包含滤波器种类数目这个语法元素。编码端在确认滤波器的种类数目后,将该种类数目写入到码流中。As mentioned earlier, in adaptive loop filtering, for each frame of image or each slice or each tile, multiple filters may be used. In the case of filter coefficient combination, the number of filter types used in loop filtering may be equal to the number of pixel types, or may no longer be equal to the number of pixel types. The encoding end can write code stream according to the number of types of filters actually used. Specifically, the code stream contains the syntax element of the number of filter types. After confirming the number of types of filters, the encoder writes the number of types into the code stream.
620,根据所述滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流。620. Determine, according to the number of types of filters, whether to write the filter label corresponding to the pixel category into the code stream.
由于环路滤波采用的滤波器的种类的数目可能等于像素类别的数目,也可能不再等于像素类别的数目,因此,可以根据滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流,例如,在解码端能够确定像素类别对应的滤波器标号的情况下,可以不将像素类别对应的滤波器标号写入所述码流。这样,可以避免统一将像素类别对应的滤波器标号写入所述码流而产生的冗余,节省编码比特,提高压缩效率。Since the number of filter types used in loop filtering may be equal to the number of pixel types, or may no longer be equal to the number of pixel types, the number of types of filters can be used to determine whether to label the filter corresponding to the pixel type. For writing the code stream, for example, in the case where the decoder can determine the filter label corresponding to the pixel category, the filter label corresponding to the pixel category may not be written into the code stream. In this way, redundancy caused by uniformly writing the filter labels corresponding to the pixel categories into the code stream can be avoided, coding bits are saved, and compression efficiency is improved.
具体而言,编码端在确定每一个像素类别对应的初始滤波器后,可以对不同像素类别对应的初始滤波器进行合并,得到每一个像素类别对应的滤波器。然后,根据对应的滤波器对每一个像素类别的像素进行环路滤波,并将采用的滤波器的种类的数目写入码率,以便解码端获知编码端采用的滤波器的种类的数目。Specifically, after determining the initial filter corresponding to each pixel category, the encoding end may combine the initial filters corresponding to different pixel categories to obtain a filter corresponding to each pixel category. Then, the pixels of each pixel category are loop-filtered according to the corresponding filter, and the number of filter types used is written into the code rate, so that the decoding end knows the number of filter types used by the encoding end.
可选地,编码端可以将所述滤波器的种类的数目减一后写入所述码流。因为滤波器种类数目一定是大于等于1的数值,编码端写码流的时候统一减一,解码端解析之后再统一加一即可。这样可以节省编码比特。例如,如果滤波器的种类的数目可以是1~25之间的任意数值,减一之后就是0~24之间的数值,0~24之间的数值相比1~25之间的数值所使用的比特数要少。Optionally, the encoding end may subtract one from the number of types of filters and write them into the code stream. Because the number of filter types must be a value greater than or equal to 1, when the encoding end writes the code stream, it is uniformly reduced by one, and the decoding end is analyzed and then uniformly increased by one. This saves coding bits. For example, if the number of filter types can be any value between 1-25, after subtracting one, the value between 0-24 is used, and the value between 0-24 is used compared to the value between 1-25 The number of bits is less.
例如,以一帧图像为例,ALF的编码参数写入码流时的顺序和步 骤可以如下:For example, taking a frame of image as an example, the sequence and steps when ALF encoding parameters are written into the code stream can be as follows:
将Y分量的帧级开关标识写入码流,来表征当前帧是否使用ALF。如果标识为0则代表当前帧不使用ALF。如果为1,则表示当前帧使用ALF,继续进行如下步骤。Write the frame-level switch identifier of the Y component into the code stream to characterize whether the current frame uses ALF. If the flag is 0, it means that the current frame does not use ALF. If it is 1, it means that the current frame uses ALF, continue with the following steps.
将UV分量的开关写入码流。Write the switch of the UV component into the code stream.
将当前帧Y分量的滤波器种类数-1之后写入码流。Write the number of filter types of the Y component of the current frame -1 to the code stream.
然后,确定是否将像素类别对应的滤波器标号写入码流。Then, it is determined whether to write the filter label corresponding to the pixel category into the code stream.
具体而言,除了滤波器的种类的数目,解码端还需要获知每一个像素类别对应的滤波器,以便对每一个像素类别的像素进行环路滤波。相应地,编码端可能需要将像素类别对应的滤波器标号写入码流。在本申请实施例中,编码端可以根据滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流。Specifically, in addition to the number of types of filters, the decoding end also needs to know the filter corresponding to each pixel category in order to perform loop filtering on the pixels of each pixel category. Correspondingly, the encoding end may need to write the filter label corresponding to the pixel category into the code stream. In the embodiment of the present application, the encoding end may determine whether to write the filter label corresponding to the pixel category into the code stream according to the number of filter types.
可选地,在本申请一个实施例中,若所述滤波器的种类的数目等于所述像素类别的数目,则不将所述像素类别对应的滤波器标号写入所述码流。Optionally, in an embodiment of the present application, if the number of filter types is equal to the number of pixel types, the filter label corresponding to the pixel type is not written into the code stream.
在所述滤波器的种类的数目等于所述像素类别的数目的情况下,解码端可能能够确定像素类别对应的滤波器标号。例如,若所述像素类别对应的滤波器标号与所述像素类别的标号相同或为默认对应关系,解码端不需要解析码流中的所述像素类别对应的滤波器标号就能够确定像素类别对应的滤波器标号。在这种情况下,编码端不将所述像素类别对应的滤波器标号写入所述码流。In the case where the number of the types of filters is equal to the number of the pixel types, the decoding end may be able to determine the filter label corresponding to the pixel type. For example, if the filter label corresponding to the pixel category is the same as the label of the pixel category or is a default correspondence, the decoder does not need to analyze the filter label corresponding to the pixel category in the code stream to determine the pixel category corresponding The filter label. In this case, the encoding end does not write the filter label corresponding to the pixel category into the code stream.
例如,以像素类别的数目为25为例,若滤波器的种类的数目也为25,即每种像素类别对应一种滤波器,在两者标号相同或为默认对应关系时,解码端直接就能够确定像素类别对应的滤波器标号。因此,编码端不需要将所述像素类别对应的滤波器标号写入所述码流。For example, if the number of pixel categories is 25, if the number of filter types is also 25, that is, each pixel category corresponds to a filter. When the two labels are the same or the default correspondence relationship, the decoder directly The filter label corresponding to the pixel category can be determined. Therefore, the encoding end does not need to write the filter label corresponding to the pixel category into the code stream.
可选地,在上述情况下,编码端还可以将第一指示信息写入所述码流,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。相应地,解码端解析到所述第一指示信息时,不解析所述码流中的所述像素类别对应的滤波器标号。Optionally, in the above case, the encoding end may also write first indication information into the code stream, where the first indication information is used to indicate that the code stream does not include filtering corresponding to the pixel category.器label. Correspondingly, when the decoding end parses the first indication information, it does not parse the filter label corresponding to the pixel category in the bitstream.
可选地,在本申请一个实施例中,若所述滤波器的种类的数目等于所述像素类别的数目,且所述像素类别对应的滤波器标号与所述像素类别 的标号不同或不为默认对应关系,则将所述像素类别对应的滤波器标号写入所述码流。Optionally, in an embodiment of the present application, if the number of filter types is equal to the number of pixel types, and the filter label corresponding to the pixel type is different from the pixel type label or is not By default, the filter label corresponding to the pixel category is written into the code stream.
在所述滤波器的种类的数目等于所述像素类别的数目,但所述像素类别对应的滤波器标号与所述像素类别的标号不同或不为默认对应关系的情况下,解码端不能直接确定像素类别对应的滤波器标号。在这种情况下,编码端将所述像素类别对应的滤波器标号写入所述码流。In the case that the number of types of filters is equal to the number of pixel categories, but the filter label corresponding to the pixel category is different from the label of the pixel category or is not a default correspondence, the decoder cannot directly determine The filter label corresponding to the pixel category. In this case, the encoding end writes the filter label corresponding to the pixel category into the code stream.
例如,在对滤波器系数进行编码时,如采用系数差分编码方式时,为了减少编码比特,可能会调整滤波器的顺序,这样,滤波器的标号(对应顺序)可能会与像素类别不一致或不为默认对应关系。解码端不能直接确定像素类别对应的滤波器标号。因此,编码端需要将所述像素类别对应的滤波器标号写入所述码流。For example, when encoding filter coefficients, such as the coefficient differential encoding method, in order to reduce the number of coding bits, the order of the filters may be adjusted. In this way, the label (corresponding order) of the filter may be inconsistent or different from the pixel type. It is the default correspondence. The decoder cannot directly determine the filter label corresponding to the pixel category. Therefore, the encoding end needs to write the filter label corresponding to the pixel category into the code stream.
可选地,在上述情况下,编码端还可以将第二指示信息写入所述码流,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。相应地,解码端解析到所述第二指示信息时,解析所述码流中的所述像素类别对应的滤波器标号。Optionally, in the above case, the encoding end may also write second indication information into the code stream, where the second indication information is used to indicate that the code stream includes the filter corresponding to the pixel category Label. Correspondingly, when the decoding end parses the second indication information, it parses the filter label corresponding to the pixel category in the code stream.
上述第一指示信息和第二指示信息可以作为码流中的滤波器标号指示信息,即,在不同的情况下,码流中的滤波器标号指示信息可以为第一指示信息或者第二指示信息。The above-mentioned first indication information and second indication information may be used as the filter label indication information in the code stream, that is, in different situations, the filter label indication information in the code stream may be the first indication information or the second indication information .
可选地,在本申请一个实施例中,若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则将所述像素类别对应的滤波器标号写入所述码流。Optionally, in an embodiment of the present application, if the number of filter types is greater than 1 and less than the number of pixel types, the filter label corresponding to the pixel type is written into the code stream.
在所述滤波器的种类的数目大于1且小于所述像素类别的数目时,像素类别与滤波器的种类的对应关系是不确定的,因此编码端需要将所述像素类别对应的滤波器标号写入所述码流。When the number of filter types is greater than 1 and less than the number of pixel types, the corresponding relationship between the pixel types and the filter types is uncertain, so the encoding end needs to label the filter corresponding to the pixel type Write the code stream.
可选地,在本申请一个实施例中,若所述滤波器的种类的数目为1,则不将所述像素类别对应的滤波器标号写入所述码流。Optionally, in an embodiment of the present application, if the number of types of filters is 1, the filter label corresponding to the pixel type is not written into the code stream.
所述滤波器的种类的数目为1,即仅采用了唯一一种滤波器。在这种情况下,编码端也不需要将所述像素类别对应的滤波器标号写入所述码流。在解码端,对所述像素类别的像素,可以采用所述码流中的唯一一种滤波器进行环路滤波。The number of the types of filters is 1, that is, only one filter is used. In this case, the encoding end does not need to write the filter label corresponding to the pixel category into the code stream. At the decoding end, for the pixels of the pixel category, the only filter in the code stream can be used for loop filtering.
本申请实施例的技术方案,根据滤波器的种类的数目,确定是否 将像素类别对应的滤波器标号写入码流,这样,可以避免统一将像素类别对应的滤波器标号写入码流而产生的冗余,节省编码比特,从而能够提高压缩效率。According to the technical solution of the embodiment of the present application, according to the number of filter types, it is determined whether to write the filter label corresponding to the pixel category into the code stream. In this way, it is possible to avoid uniformly writing the filter label corresponding to the pixel category into the code stream. Redundancy, saving coding bits, which can improve compression efficiency.
以上从编码端的角度描述了本申请实施例的技术方案,下面从解码端的角度描述本申请实施例的技术方案。应理解,除了以下描述外,编码端和解码端通用的描述可以参考前面的描述,为了简洁,不再赘述。The above describes the technical solutions of the embodiments of the present application from the perspective of the encoding end, and the following describes the technical solutions of the embodiments of the present application from the perspective of the decoding end. It should be understood that, in addition to the following description, the general description of the encoding end and the decoding end may refer to the foregoing description, and for brevity, details are not repeated.
图7示出了本申请另一个实施例的环路滤波的方法700的示意性流程图。该方法700可以由解码端执行。例如,可以由图1所示的系统100在进行解码操作时执行。FIG. 7 shows a schematic flowchart of a method 700 for loop filtering according to another embodiment of the present application. The method 700 may be executed by the decoding end. For example, it can be executed by the system 100 shown in FIG. 1 when performing a decoding operation.
710,确定环路滤波采用的滤波器的种类的数目。710: Determine the number of types of filters used in loop filtering.
编码端将环路滤波采用的滤波器的种类的数目写入码流,相应地,解码端可以通过解析所述码流,得到所述滤波器的种类的数目。The encoding end writes the number of types of filters used in loop filtering into the code stream, and accordingly, the decoding end can obtain the number of types of filters by analyzing the code stream.
可选地,在编码端将所述滤波器的种类的数目减一后写入所述码流的情况下,解码端解析之后再加一可得到所述滤波器的种类的数目。Optionally, in the case where the encoding end subtracts one from the number of filter types and writes it into the code stream, the decoding end adds one after parsing to obtain the number of filter types.
720,根据所述滤波器的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号。720: Determine, according to the number of types of filters, whether to parse the filter label corresponding to the pixel category in the bitstream.
在得到所述滤波器的种类的数目后,解码端针对不同的情况,进行不同的处理。After obtaining the number of types of the filters, the decoding end performs different processing for different situations.
可选地,在本申请一个实施例中,若所述滤波器的种类的数目等于所述像素类别的数目,则不解析所述码流中的所述像素类别对应的滤波器标号。Optionally, in an embodiment of the present application, if the number of filter types is equal to the number of pixel types, the filter label corresponding to the pixel type in the code stream is not parsed.
在这种情况下,解码端对所述像素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。In this case, for the pixels of the pixel category, the decoding end uses a filter with the same label as the pixel category or a label with a default corresponding relationship to perform loop filtering.
具体而言,在所述滤波器的种类的数目等于所述像素类别的数目的情况下,若所述像素类别对应的滤波器标号与所述像素类别的标号相同或为默认对应关系,解码端不需要解析码流中的所述像素类别对应的滤波器标号就能够确定像素类别对应的滤波器标号,因而可以直接采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。Specifically, when the number of filter types is equal to the number of pixel categories, if the filter label corresponding to the pixel category is the same as the pixel category label or there is a default correspondence, the decoding end The filter label corresponding to the pixel category can be determined without parsing the filter label corresponding to the pixel category in the code stream. Therefore, the filter label that is the same as the label of the pixel category or has a default corresponding relationship can be directly used for processing. Loop filtering.
可选地,在本申请一个实施例中,若所述滤波器的种类的数目等于所述像素类别的数目,先解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第一指示信息,其中,所述第一指示信息用于指示所 述码流中不包括所述像素类别对应的滤波器标号,则不解析所述码流中的所述像素类别对应的滤波器标号,对所述像素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。Optionally, in an embodiment of the present application, if the number of filter types is equal to the number of pixel types, the filter label indication information in the bitstream is parsed first, if the filter label indicates The information is the first indication information, where the first indication information is used to indicate that the filter label corresponding to the pixel category is not included in the code stream, and the filter label corresponding to the pixel category in the code stream is not parsed. The filter label uses a filter with the same label as the pixel label or a label with a default corresponding relationship for the pixels of the pixel category to perform loop filtering.
可选地,在本申请一个实施例中,若所述滤波器的种类的数目等于所述像素类别的数目,先解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第二指示信息,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号,则解析所述码流中的所述像素类别对应的滤波器标号。然后,对所述像素类别的像素,采用解析到的所述像素类别对应的滤波器标号的滤波器进行环路滤波。Optionally, in an embodiment of the present application, if the number of filter types is equal to the number of pixel types, the filter label indication information in the bitstream is parsed first, if the filter label indicates The information is second indication information, where the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category, then the filter corresponding to the pixel category in the code stream is parsed Label. Then, for the pixels of the pixel type, the filter with the filter label corresponding to the parsed pixel type is used to perform loop filtering.
可选地,在本申请一个实施例中,若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则解析所述码流中的所述像素类别对应的滤波器标号。然后,对所述像素类别的像素,采用解析到的所述像素类别对应的滤波器标号的滤波器进行环路滤波。Optionally, in an embodiment of the present application, if the number of filter types is greater than 1 and less than the number of pixel types, the filter label corresponding to the pixel type in the code stream is parsed. Then, for the pixels of the pixel type, the filter with the filter label corresponding to the parsed pixel type is used to perform loop filtering.
可选地,在本申请一个实施例中,若所述滤波器的种类的数目为1,则不解析所述码流中的所述像素类别对应的滤波器标号。对所述像素类别的像素,采用所述码流中的唯一一种滤波器进行环路滤波。Optionally, in an embodiment of the present application, if the number of the types of filters is 1, the filter label corresponding to the pixel type in the code stream is not parsed. For the pixels of the pixel category, the only filter in the code stream is used for loop filtering.
图8示出了本申请又一个实施例的环路滤波的方法800的示意性流程图。该方法800可以由编码端执行。例如,可以由图1所示的系统100在进行编码操作时执行。除以下描述外,该实施例可以参考前述编码端描述的实施例的相关描述,为了简洁,不再赘述。FIG. 8 shows a schematic flowchart of a loop filtering method 800 according to another embodiment of the present application. The method 800 may be executed by the encoding end. For example, it can be executed by the system 100 shown in FIG. 1 during the encoding operation. Except for the following description, for this embodiment, reference may be made to the relevant description of the embodiment described by the encoding end, which is not repeated for brevity.
810,采用像素类别对应的滤波器对所述像素类别的像素进行环路滤波。810: Perform loop filtering on the pixels of the pixel category by using a filter corresponding to the pixel category.
可选地,编码端可以先确定每一个像素类别对应的初始滤波器;再对不同像素类别对应的初始滤波器进行合并,得到每一个像素类别对应的滤波器。然后,采用各像素类别对应的滤波器对各像素类别的像素进行环路滤波。Optionally, the encoding end may first determine the initial filter corresponding to each pixel category; and then combine the initial filters corresponding to different pixel categories to obtain a filter corresponding to each pixel category. Then, the filter corresponding to each pixel category is used to loop filter the pixels of each pixel category.
820,生成编码后的码流,其中,若环路滤波采用的滤波器的种类的数目等于所述像素类别的数目,所述码流中不包括所述像素类别对应的滤波器标号。820. Generate an encoded code stream, where if the number of filter types used in loop filtering is equal to the number of pixel types, the code stream does not include the filter label corresponding to the pixel type.
在本申请实施例中,在环路滤波采用的滤波器的种类的数目等于所述像素类别的数目时,编码端生成的码流中不包括所述像素类别对应的滤 波器标号。也就是说,在编码端,若所述滤波器的种类的数目等于所述像素类别的数目,则不将所述像素类别对应的滤波器标号写入所述码流。In the embodiment of the present application, when the number of filter types used in loop filtering is equal to the number of pixel types, the code stream generated by the encoding end does not include the filter label corresponding to the pixel type. That is to say, at the encoding end, if the number of filter types is equal to the number of pixel types, the filter label corresponding to the pixel type is not written into the code stream.
在上述情况中,所述像素类别对应的滤波器标号与所述像素类别的标号相同或为默认对应关系。In the above case, the filter label corresponding to the pixel category is the same as the label of the pixel category or is a default correspondence.
可选地,编码端还可以将第一指示信息写入所述码流,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。Optionally, the encoding end may also write first indication information into the code stream, where the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
可选地,若环路滤波采用的滤波器的种类的数目等于像素类别的数目,且所述像素类别对应的滤波器标号与所述像素类别的标号不同或不为默认对应关系,编码端生成的码流中包括所述像素类别对应的滤波器标号。Optionally, if the number of filter types used in loop filtering is equal to the number of pixel categories, and the filter label corresponding to the pixel category is different from the pixel category label or is not in a default correspondence, the encoding end generates The code stream of includes the filter label corresponding to the pixel category.
可选地,若所述滤波器的种类的数目大于1且小于所述像素类别的数目,编码端生成的码流中包括所述像素类别对应的滤波器标号。也就是说,在编码端,若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则将所述像素类别对应的滤波器标号写入所述码流。Optionally, if the number of filter types is greater than 1 and less than the number of pixel types, the code stream generated by the encoding end includes the filter label corresponding to the pixel type. That is, at the encoding end, if the number of filter types is greater than 1 and less than the number of pixel types, the filter label corresponding to the pixel type is written into the code stream.
可选地,若所述滤波器的种类的数目为1,则不将所述像素类别对应的滤波器标号写入所述码流。Optionally, if the number of types of the filter is 1, the filter label corresponding to the pixel type is not written into the code stream.
可选地,编码端还可以将所述滤波器的种类的数目减一后写入所述码流。Optionally, the encoding end may also write the code stream after subtracting one from the number of filter types.
在本申请实施例的技术方案中,在环路滤波采用的滤波器的种类的数目等于像素类别的数目时,码流中不包括所述像素类别对应的滤波器标号,这样,可以避免统一将像素类别对应的滤波器标号写入码流而产生的冗余,节省编码比特,从而能够提高压缩效率。In the technical solution of the embodiment of the present application, when the number of filter types used in loop filtering is equal to the number of pixel types, the code stream does not include the filter label corresponding to the pixel type. In this way, it is possible to avoid uniform The redundancy generated by writing the filter label corresponding to the pixel category into the code stream saves coding bits, thereby improving compression efficiency.
图9示出了本申请又一个实施例的环路滤波的方法900的示意性流程图。该方法900可以由解码端执行。例如,可以由图1所示的系统100在进行解码操作时执行。除以下描述外,该实施例可以参考前述解码端描述的实施例的相关描述,为了简洁,不再赘述。FIG. 9 shows a schematic flowchart of a method 900 for loop filtering according to another embodiment of the present application. The method 900 may be executed by the decoding end. For example, it can be executed by the system 100 shown in FIG. 1 when performing a decoding operation. Except for the following description, this embodiment can refer to the relevant description of the embodiment described by the foregoing decoding end, and for brevity, the details are not repeated.
910,获取编码后的码流。910: Obtain an encoded code stream.
920,解析所述码流,得到环路滤波采用的滤波器的种类的数目。920. Parse the code stream to obtain the number of types of filters used in loop filtering.
编码端将环路滤波采用的滤波器的种类的数目写入码流,相应地,解码端可以通过解析所述码流,得到所述滤波器的种类的数目。The encoding end writes the number of types of filters used in loop filtering into the code stream, and accordingly, the decoding end can obtain the number of types of filters by analyzing the code stream.
930,若所述滤波器的种类的数目等于像素类别的数目,对所述像 素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。930. If the number of types of filters is equal to the number of pixel types, for pixels of the pixel type, use a filter with the same label as the pixel type or a label with a default corresponding relationship to perform loop filtering.
在所述滤波器的种类的数目等于所述像素类别的数目的情况下,编码端生成的码流中不包括所述像素类别对应的滤波器标号。解码端不需要解析码流中的所述像素类别对应的滤波器标号,可以直接采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。In the case where the number of the types of filters is equal to the number of the pixel types, the code stream generated by the encoding end does not include the filter label corresponding to the pixel type. The decoding end does not need to parse the filter label corresponding to the pixel category in the bitstream, and can directly use a filter with the same label as the pixel category or a label with a default corresponding relationship to perform loop filtering.
可选地,若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第一指示信息,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。Optionally, if the number of filter types is equal to the number of pixel types, the filter label indication information in the bitstream is parsed, and if the filter label indication information is the first indication information, use and Filters with the same label of the pixel category or labels with a default corresponding relationship perform loop filtering, wherein the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
可选地,若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第二指示信息,则解析所述码流中的所述像素类别对应的滤波器标号,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。然后,对所述像素类别的像素,采用解析到的所述像素类别对应的滤波器标号的滤波器进行环路滤波。Optionally, if the number of filter types is equal to the number of pixel types, parse the filter label indication information in the code stream, and if the filter label indication information is the second indication information, parse The filter label corresponding to the pixel category in the code stream, wherein the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category. Then, for the pixels of the pixel type, the filter with the filter label corresponding to the parsed pixel type is used to perform loop filtering.
可选地,若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则解析所述码流中的所述像素类别对应的滤波器标号。然后,对所述像素类别的像素,采用解析到的所述像素类别对应的滤波器标号的滤波器进行环路滤波。Optionally, if the number of filter types is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type in the code stream is parsed. Then, for the pixels of the pixel type, the filter with the filter label corresponding to the parsed pixel type is used to perform loop filtering.
可选地,若所述滤波器的种类的数目为1,对所述像素类别的像素,采用所述码流中的唯一一种滤波器进行环路滤波。Optionally, if the number of filter types is 1, for pixels of the pixel type, the only filter in the code stream is used to perform loop filtering.
上文中详细描述了本申请实施例的环路滤波的方法,下面将描述本申请实施例的环路滤波的装置、计算机系统和可移动设备。The loop filtering method of the embodiment of the present application is described in detail above, and the loop filtering device, computer system, and movable equipment of the embodiment of the present application will be described below.
图10示出了本申请一个实施例的环路滤波的装置1000的示意性框图。该装置1000可以执行上述本申请实施例的环路滤波的方法600。例如,该装置1000可以为编码器。FIG. 10 shows a schematic block diagram of a loop filtering apparatus 1000 according to an embodiment of the present application. The device 1000 can execute the loop filtering method 600 of the above embodiment of the present application. For example, the device 1000 may be an encoder.
如图10所示,该装置1000可以包括:As shown in FIG. 10, the apparatus 1000 may include:
确定模块1010,确定环路滤波采用的滤波器的种类的数目;The determining module 1010 determines the number of types of filters used in loop filtering;
处理模块1020,根据所述滤波器的种类的数目,确定是否将像素 类别对应的滤波器标号写入码流。The processing module 1020 determines whether to write the filter label corresponding to the pixel category into the code stream according to the number of the types of filters.
可选地,所述处理模块1020用于:Optionally, the processing module 1020 is used to:
若所述滤波器的种类的数目等于所述像素类别的数目,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of filter types is equal to the number of pixel types, then the filter label corresponding to the pixel type is not written into the code stream.
可选地,所述像素类别对应的滤波器标号与所述像素类别的标号相同或为默认对应关系。Optionally, the filter label corresponding to the pixel category is the same as the label of the pixel category or is a default correspondence.
可选地,所述处理模块1020还用于:Optionally, the processing module 1020 is further configured to:
将第一指示信息写入所述码流,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。The first indication information is written into the code stream, where the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
可选地,所述处理模块1020用于:Optionally, the processing module 1020 is used to:
若所述滤波器的种类的数目等于所述像素类别的数目,且所述像素类别对应的滤波器标号与所述像素类别的标号不同或不为默认对应关系,则将所述像素类别对应的滤波器标号写入所述码流。If the number of types of filters is equal to the number of pixel categories, and the filter label corresponding to the pixel category is different from the label of the pixel category or is not a default correspondence, then the pixel category corresponding to the The filter label is written into the code stream.
可选地,所述处理模块1020还用于:Optionally, the processing module 1020 is further configured to:
将第二指示信息写入所述码流,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。The second indication information is written into the code stream, where the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
可选地,所述处理模块1020用于:Optionally, the processing module 1020 is used to:
若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则将所述像素类别对应的滤波器标号写入所述码流。If the number of types of filters is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type is written into the code stream.
可选地,所述处理模块1020用于:Optionally, the processing module 1020 is used to:
若所述滤波器的种类的数目为1,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of types of the filter is 1, the filter label corresponding to the pixel type is not written into the code stream.
可选地,所述处理模块1020还用于:Optionally, the processing module 1020 is further configured to:
确定每一个像素类别对应的初始滤波器;Determine the initial filter corresponding to each pixel category;
对不同像素类别对应的初始滤波器进行合并,得到每一个像素类别对应的滤波器。The initial filters corresponding to different pixel categories are combined to obtain the filter corresponding to each pixel category.
可选地,所述处理模块1020还用于:Optionally, the processing module 1020 is further configured to:
将所述滤波器的种类的数目减一后写入所述码流。The number of types of filters is reduced by one and then written into the code stream.
图11示出了本申请另一个实施例的环路滤波的装置1100的示意性框图。该装置1100可以执行上述本申请实施例的环路滤波的方法700。例如,该装置1100可以为解码器。FIG. 11 shows a schematic block diagram of a loop filtering device 1100 according to another embodiment of the present application. The device 1100 can execute the loop filtering method 700 in the above embodiment of the present application. For example, the device 1100 may be a decoder.
如图11所示,该装置1100可以包括:As shown in FIG. 11, the apparatus 1100 may include:
确定模块1110,用于确定环路滤波采用的滤波器的种类的数目;The determining module 1110 is used to determine the number of types of filters used in loop filtering;
处理模块1120,用于根据所述滤波器的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号。The processing module 1120 is configured to determine whether to parse the filter label corresponding to the pixel category in the bitstream according to the number of the filter types.
可选地,所述处理模块1120用于:Optionally, the processing module 1120 is used to:
若所述滤波器的种类的数目等于所述像素类别的数目,则不解析所述码流中的所述像素类别对应的滤波器标号。If the number of types of filters is equal to the number of pixel types, the filter label corresponding to the pixel type in the code stream is not parsed.
可选地,所述处理模块1120用于:Optionally, the processing module 1120 is used to:
若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第一指示信息,则不解析所述码流中的所述像素类别对应的滤波器标号,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。If the number of filter types is equal to the number of pixel types, the filter label indication information in the code stream is parsed, and if the filter label indication information is the first indication information, the code is not parsed The filter label corresponding to the pixel category in the stream, wherein the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
可选地,所述处理模块1120还用于:Optionally, the processing module 1120 is further configured to:
对所述像素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。For the pixels of the pixel category, a filter with the same label as the pixel category or a label with a default corresponding relationship is used to perform loop filtering.
可选地,所述处理模块1120用于:Optionally, the processing module 1120 is used to:
若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第二指示信息,则解析所述码流中的所述像素类别对应的滤波器标号,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。If the number of filter types is equal to the number of pixel categories, parse the filter label indication information in the code stream, and if the filter label indication information is the second indication information, parse the code stream The filter label corresponding to the pixel category in, wherein the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
可选地,所述处理模块1120用于:Optionally, the processing module 1120 is used to:
若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则解析所述码流中的所述像素类别对应的滤波器标号。If the number of filter types is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type in the code stream is parsed.
可选地,所述处理模块1120还用于:Optionally, the processing module 1120 is further configured to:
对所述像素类别的像素,采用解析到的所述像素类别对应的滤波器标号的滤波器进行环路滤波。For the pixels of the pixel type, loop filtering is performed by using the parsed filter of the filter label corresponding to the pixel type.
可选地,所述处理模块1120用于:Optionally, the processing module 1120 is used to:
若所述滤波器的种类的数目为1,则不解析所述码流中的所述像素类别对应的滤波器标号。If the number of filter types is 1, the filter label corresponding to the pixel type in the code stream is not parsed.
可选地,所述处理模块1120还用于:Optionally, the processing module 1120 is further configured to:
对所述像素类别的像素,采用所述码流中的唯一一种滤波器进行 环路滤波。For the pixels of the pixel category, the only filter in the code stream is used for loop filtering.
可选地,所述确定模块1110用于:Optionally, the determining module 1110 is used to:
解析所述码流,得到所述滤波器的种类的数目。Parse the code stream to obtain the number of types of the filter.
图12示出了本申请又一个实施例的环路滤波的装置1200的示意性框图。该装置1200可以执行上述本申请实施例的环路滤波的方法800。例如,该装置1200可以为编码器。FIG. 12 shows a schematic block diagram of an apparatus 1200 for loop filtering according to another embodiment of the present application. The device 1200 can execute the method 800 of loop filtering in the above embodiment of the present application. For example, the device 1200 may be an encoder.
如图12所示,该装置1200可以包括:As shown in FIG. 12, the apparatus 1200 may include:
滤波模块1210,用于采用像素类别对应的滤波器对所述像素类别的像素进行环路滤波;The filtering module 1210 is configured to use a filter corresponding to the pixel category to perform loop filtering on the pixels of the pixel category;
处理模块1220,用于生成编码后的码流,其中,若环路滤波采用的滤波器的种类的数目等于所述像素类别的数目,所述码流中不包括所述像素类别对应的滤波器标号。The processing module 1220 is configured to generate an encoded code stream, wherein, if the number of filter types used in loop filtering is equal to the number of the pixel categories, the code stream does not include the filter corresponding to the pixel category Label.
可选地,所述处理模块1220用于:Optionally, the processing module 1220 is used to:
若所述滤波器的种类的数目等于所述像素类别的数目,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of filter types is equal to the number of pixel types, then the filter label corresponding to the pixel type is not written into the code stream.
可选地,所述像素类别对应的滤波器标号与所述像素类别的标号相同或为默认对应关系。Optionally, the filter label corresponding to the pixel category is the same as the label of the pixel category or is a default correspondence.
可选地,所述处理模块1220还用于:Optionally, the processing module 1220 is further configured to:
将第一指示信息写入所述码流,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。The first indication information is written into the code stream, where the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
可选地,所述处理模块1220用于:Optionally, the processing module 1220 is used to:
若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则将所述像素类别对应的滤波器标号写入所述码流。If the number of types of filters is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type is written into the code stream.
可选地,所述处理模块1220用于:Optionally, the processing module 1220 is used to:
若所述滤波器的种类的数目为1,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of types of the filter is 1, the filter label corresponding to the pixel type is not written into the code stream.
可选地,所述处理模块1220还用于:Optionally, the processing module 1220 is further configured to:
确定每一个像素类别对应的初始滤波器;Determine the initial filter corresponding to each pixel category;
对不同像素类别对应的初始滤波器进行合并,得到每一个像素类别对应的滤波器。The initial filters corresponding to different pixel categories are combined to obtain the filter corresponding to each pixel category.
可选地,所述处理模块1220还用于:Optionally, the processing module 1220 is further configured to:
将所述滤波器的种类的数目减一后写入所述码流。The number of types of filters is reduced by one and then written into the code stream.
图13示出了本申请另一个实施例的环路滤波的装置1300的示意性框图。该装置1300可以执行上述本申请实施例的环路滤波的方法900。例如,该装置1300可以为解码器。FIG. 13 shows a schematic block diagram of a loop filtering device 1300 according to another embodiment of the present application. The device 1300 may execute the method 900 of loop filtering in the above embodiment of the present application. For example, the device 1300 may be a decoder.
如图13所示,该装置1300可以包括:As shown in FIG. 13, the apparatus 1300 may include:
获取模块1310,用于获取编码后的码流;The obtaining module 1310 is used to obtain the coded stream;
处理模块1320,用于解析所述码流,得到环路滤波采用的滤波器的种类的数目;若所述滤波器的种类的数目等于像素类别的数目,对所述像素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。The processing module 1320 is used to parse the code stream to obtain the number of filter types used in loop filtering; if the number of filter types is equal to the number of pixel types, for the pixels of the pixel type, use and Filters with the same labels of the pixel categories or labels with a default corresponding relationship perform loop filtering.
可选地,所述处理模块1320用于:Optionally, the processing module 1320 is used to:
若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第一指示信息,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。If the number of types of filters is equal to the number of pixel categories, the filter label indication information in the code stream is parsed, and if the filter label indication information is the first indication information, the same as the pixel category Filters with the same label or a label with a default corresponding relationship perform loop filtering, wherein the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
可选地,所述处理模块1320用于:Optionally, the processing module 1320 is used to:
若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第二指示信息,则解析所述码流中的所述像素类别对应的滤波器标号,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。If the number of filter types is equal to the number of pixel categories, parse the filter label indication information in the code stream, and if the filter label indication information is the second indication information, parse the code stream The filter label corresponding to the pixel category in, wherein the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
可选地,所述处理模块1320用于:Optionally, the processing module 1320 is used to:
若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则解析所述码流中的所述像素类别对应的滤波器标号。If the number of filter types is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type in the code stream is parsed.
可选地,所述处理模块1320用于:Optionally, the processing module 1320 is used to:
对所述像素类别的像素,采用解析到的所述像素类别对应的滤波器标号的滤波器进行环路滤波。For the pixels of the pixel type, loop filtering is performed by using the parsed filter of the filter label corresponding to the pixel type.
可选地,所述处理模块1320用于:Optionally, the processing module 1320 is used to:
若所述滤波器的种类的数目为1,对所述像素类别的像素,采用所述码流中的唯一一种滤波器进行环路滤波。If the number of the types of filters is 1, for the pixels of the pixel type, the only filter in the code stream is used for loop filtering.
应理解,上述本申请实施例的环路滤波的装置可以是芯片,其具 体可以由电路实现,但本申请实施例对具体的实现形式不做限定。It should be understood that the loop filtering device in the above embodiment of the present application may be a chip, which may be specifically implemented by a circuit, but the embodiment of the present application does not limit the specific implementation form.
本申请实施例还提供了一种编码器,该编码器用于实现本申请实施例中编码端的功能,可以包括上述本申请实施例的用于编码端的环路滤波的装置。The embodiment of the present application also provides an encoder, which is used to implement the function of the encoding end in the embodiment of the present application, and may include the above-mentioned apparatus for loop filtering of the encoding end in the embodiment of the present application.
本申请实施例还提供了一种解码器,该解码器用于实现本申请实施例中解码端的功能,可以包括上述本申请实施例的用于解码端的环路滤波的装置。The embodiment of the present application also provides a decoder, which is used to implement the function of the decoder in the embodiment of the present application, and may include the above-mentioned device for loop filtering of the decoder in the embodiment of the present application.
本申请实施例还提供了一种编解码器,该编解码器包括上述本申请实施例的用于编码端的环路滤波的装置和用于解码端的环路滤波的装置。An embodiment of the present application also provides a codec, which includes the device for in-loop filtering on the encoding end and the device for in-loop filtering on the decoding end in the above embodiments of the present application.
图14示出了本申请实施例的计算机系统1400的示意性框图。FIG. 14 shows a schematic block diagram of a computer system 1400 according to an embodiment of the present application.
如图14所示,该计算机系统1400可以包括处理器1410和存储器1420。As shown in FIG. 14, the computer system 1400 may include a processor 1410 and a memory 1420.
应理解,该计算机系统1400还可以包括其他计算机系统中通常所包括的部件,例如,输入输出设备、通信接口等,本申请实施例对此并不限定。It should be understood that the computer system 1400 may also include components commonly included in other computer systems, such as input and output devices, communication interfaces, etc., which are not limited in the embodiment of the present application.
存储器1420用于存储计算机可执行指令。The memory 1420 is used to store computer executable instructions.
存储器1420可以是各种种类的存储器,例如可以包括高速随机存取存储器(Random Access Memory,RAM),还可以包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器,本申请实施例对此并不限定。The memory 1420 may be various types of memory, for example, it may include a high-speed random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The example does not limit this.
处理器1410用于访问该存储器1420,并执行该计算机可执行指令,以进行上述本申请实施例的环路滤波的方法中的操作。The processor 1410 is configured to access the memory 1420 and execute the computer-executable instructions to perform operations in the loop filtering method of the above embodiment of the present application.
处理器1410可以包括微处理器,现场可编程门阵列(Field-Programmable Gate Array,FPGA),中央处理器(Central Processing unit,CPU),图形处理器(Graphics Processing Unit,GPU)等,本申请实施例对此并不限定。The processor 1410 may include a microprocessor, a Field-Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), etc., which are implemented in this application The example does not limit this.
本申请实施例还提供了一种可移动设备,该可移动设备可以包括上述本申请各种实施例的环路滤波的装置或者计算机系统。An embodiment of the present application also provides a movable device, which may include the loop filtering apparatus or computer system of the various embodiments of the present application described above.
本申请实施例的环路滤波的装置、计算机系统和可移动设备可对应于本申请实施例的环路滤波的方法的执行主体,并且环路滤波的装置、计算机系统和可移动设备中的各个模块的上述和其它操作和/或功能分别为了 实现前述各个方法的相应流程,为了简洁,在此不再赘述。The loop filtering device, computer system, and movable equipment of the embodiment of the present application may correspond to the execution body of the loop filtering method of the embodiment of the present application, and each of the loop filtering device, computer system, and movable equipment The above-mentioned and other operations and/or functions of the modules are used to implement the corresponding procedures of the foregoing methods, and for brevity, they are not repeated here.
本申请实施例还提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述本申请实施例的环路滤波的方法。The embodiment of the present application also provides a computer storage medium, and the computer storage medium stores program code, and the program code may be used to instruct the execution of the loop filtering method of the foregoing embodiment of the present application.
应理解,在本申请实施例中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that, in the embodiments of the present application, the term "and/or" is merely an association relationship describing an associated object, indicating that there may be three relationships. For example, A and/or B can mean: A alone exists, A and B exist at the same time, and B exists alone. In addition, the character "/" in this text generally indicates that the associated objects before and after are in an "or" relationship.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the hardware and software Interchangeability. In the above description, the composition and steps of each example have been generally described in terms of function. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments of the present application.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集 成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of this application is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium It includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Anyone familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (70)

  1. 一种环路滤波的方法,其特征在于,包括:A method for loop filtering is characterized in that it includes:
    确定环路滤波采用的滤波器的种类的数目;Determine the number of types of filters used in loop filtering;
    根据所述滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流。According to the number of types of the filters, it is determined whether to write the filter label corresponding to the pixel category into the code stream.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流,包括:The method according to claim 1, wherein the determining whether to write a filter label corresponding to a pixel category into a code stream according to the number of types of the filter comprises:
    若所述滤波器的种类的数目等于所述像素类别的数目,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of filter types is equal to the number of pixel types, then the filter label corresponding to the pixel type is not written into the code stream.
  3. 根据权利要求2所述的方法,其特征在于,所述像素类别对应的滤波器标号与所述像素类别的标号相同或为默认对应关系。The method according to claim 2, wherein the filter label corresponding to the pixel category is the same as the label of the pixel category or is a default correspondence.
  4. 根据权利要求2或3所述的方法,其特征在于,所述方法还包括:The method according to claim 2 or 3, wherein the method further comprises:
    将第一指示信息写入所述码流,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。The first indication information is written into the code stream, where the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  5. 根据权利要求1所述的方法,其特征在于,所述根据所述滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流,包括:The method according to claim 1, wherein the determining whether to write a filter label corresponding to a pixel category into a code stream according to the number of types of the filter comprises:
    若所述滤波器的种类的数目等于所述像素类别的数目,且所述像素类别对应的滤波器标号与所述像素类别的标号不同或不为默认对应关系,则将所述像素类别对应的滤波器标号写入所述码流。If the number of filter types is equal to the number of pixel categories, and the filter label corresponding to the pixel category is different from the label of the pixel category or is not in the default correspondence, then the pixel category corresponding to the The filter label is written into the code stream.
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method of claim 5, wherein the method further comprises:
    将第二指示信息写入所述码流,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。The second indication information is written into the code stream, where the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
  7. 根据权利要求1所述的方法,其特征在于,所述根据所述滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流,包括:The method according to claim 1, wherein the determining whether to write a filter label corresponding to a pixel category into a code stream according to the number of types of the filter comprises:
    若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则将所述像素类别对应的滤波器标号写入所述码流。If the number of types of filters is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type is written into the code stream.
  8. 根据权利要求1所述的方法,其特征在于,所述根据所述滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流,包括:The method according to claim 1, wherein the determining whether to write a filter label corresponding to a pixel category into a code stream according to the number of types of the filter comprises:
    若所述滤波器的种类的数目为1,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of types of the filter is 1, the filter label corresponding to the pixel type is not written into the code stream.
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述方法 还包括:The method according to any one of claims 1 to 8, wherein the method further comprises:
    确定每一个像素类别对应的初始滤波器;Determine the initial filter corresponding to each pixel category;
    对不同像素类别对应的初始滤波器进行合并,得到每一个像素类别对应的滤波器。The initial filters corresponding to different pixel categories are combined to obtain the filter corresponding to each pixel category.
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 9, wherein the method further comprises:
    将所述滤波器的种类的数目减一后写入所述码流。The number of types of filters is reduced by one and then written into the code stream.
  11. 一种环路滤波的方法,其特征在于,包括:A method for loop filtering is characterized in that it includes:
    确定环路滤波采用的滤波器的种类的数目;Determine the number of types of filters used in loop filtering;
    根据所述滤波器的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号。According to the number of types of the filters, it is determined whether to parse the filter label corresponding to the pixel category in the bitstream.
  12. 根据权利要求11所述的方法,其特征在于,所述根据所述滤波器的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号,包括:The method according to claim 11, wherein the determining whether to parse the filter label corresponding to the pixel category in the code stream according to the number of types of the filter comprises:
    若所述滤波器的种类的数目等于所述像素类别的数目,则不解析所述码流中的所述像素类别对应的滤波器标号。If the number of types of filters is equal to the number of pixel types, the filter label corresponding to the pixel type in the code stream is not parsed.
  13. 根据权利要求11所述的方法,其特征在于,所述根据所述滤波器的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号,包括:The method according to claim 11, wherein the determining whether to parse the filter label corresponding to the pixel category in the code stream according to the number of types of the filter comprises:
    若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第一指示信息,则不解析所述码流中的所述像素类别对应的滤波器标号,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。If the number of filter types is equal to the number of pixel types, the filter label indication information in the code stream is parsed, and if the filter label indication information is the first indication information, the code is not parsed The filter label corresponding to the pixel category in the stream, wherein the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  14. 根据权利要求12或13所述的方法,其特征在于,所述方法还包括:The method according to claim 12 or 13, wherein the method further comprises:
    对所述像素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。For the pixels of the pixel category, a filter with the same label as the pixel category or a label with a default corresponding relationship is used to perform loop filtering.
  15. 根据权利要求11所述的方法,其特征在于,所述根据所述滤波器的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号,包括:The method according to claim 11, wherein the determining whether to parse the filter label corresponding to the pixel category in the code stream according to the number of types of the filter comprises:
    若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第二指示信息,则解析所述码流中的所述像素类别对应的滤波器标号,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。If the number of filter types is equal to the number of pixel categories, parse the filter label indication information in the code stream, and if the filter label indication information is the second indication information, parse the code stream The filter label corresponding to the pixel category in, wherein the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
  16. 根据权利要求11所述的方法,其特征在于,所述根据所述滤波器 的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号,包括:The method according to claim 11, wherein the determining whether to parse the filter label corresponding to the pixel category in the code stream according to the number of types of the filter comprises:
    若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则解析所述码流中的所述像素类别对应的滤波器标号。If the number of filter types is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type in the code stream is parsed.
  17. 根据权利要求15或16所述的方法,其特征在于,所述方法还包括:The method according to claim 15 or 16, wherein the method further comprises:
    对所述像素类别的像素,采用解析到的所述像素类别对应的滤波器标号的滤波器进行环路滤波。For the pixels of the pixel type, loop filtering is performed by using the parsed filter of the filter label corresponding to the pixel type.
  18. 根据权利要求11所述的方法,其特征在于,所述根据所述滤波器的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号,包括:The method according to claim 11, wherein the determining whether to parse the filter label corresponding to the pixel category in the code stream according to the number of types of the filter comprises:
    若所述滤波器的种类的数目为1,则不解析所述码流中的所述像素类别对应的滤波器标号。If the number of filter types is 1, the filter label corresponding to the pixel type in the code stream is not parsed.
  19. 根据权利要求18所述的方法,其特征在于,所述方法还包括:The method of claim 18, wherein the method further comprises:
    对所述像素类别的像素,采用所述码流中的唯一一种滤波器进行环路滤波。For the pixels of the pixel category, the only filter in the code stream is used for loop filtering.
  20. 根据权利要求11至19中任一项所述的方法,其特征在于,所述确定环路滤波采用的滤波器的种类的数目包括:The method according to any one of claims 11 to 19, wherein the determining the number of types of filters used in loop filtering comprises:
    解析所述码流,得到所述滤波器的种类的数目。Parse the code stream to obtain the number of types of the filter.
  21. 一种环路滤波的方法,其特征在于,包括:A method for loop filtering is characterized in that it includes:
    采用像素类别对应的滤波器对所述像素类别的像素进行环路滤波;Using a filter corresponding to the pixel category to perform loop filtering on the pixels of the pixel category;
    生成编码后的码流,其中,若环路滤波采用的滤波器的种类的数目等于所述像素类别的数目,所述码流中不包括所述像素类别对应的滤波器标号。Generate an encoded code stream, where if the number of filter types used in loop filtering is equal to the number of pixel types, the code stream does not include the filter label corresponding to the pixel type.
  22. 根据权利要求21所述的方法,其特征在于,所述生成编码后的码流,包括:The method according to claim 21, wherein said generating an encoded code stream comprises:
    若所述滤波器的种类的数目等于所述像素类别的数目,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of filter types is equal to the number of pixel types, then the filter label corresponding to the pixel type is not written into the code stream.
  23. 根据权利要求22所述的方法,其特征在于,所述像素类别对应的滤波器标号与所述像素类别的标号相同或为默认对应关系。The method according to claim 22, wherein the filter label corresponding to the pixel category is the same as the label of the pixel category or is a default correspondence.
  24. 根据权利要求22或23所述的方法,其特征在于,所述生成编码后的码流,还包括:The method according to claim 22 or 23, wherein said generating an encoded code stream further comprises:
    将第一指示信息写入所述码流,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。The first indication information is written into the code stream, where the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  25. 根据权利要求21所述的方法,其特征在于,所述生成编码后的码 流,包括:The method according to claim 21, wherein said generating an encoded code stream comprises:
    若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则将所述像素类别对应的滤波器标号写入所述码流。If the number of types of filters is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type is written into the code stream.
  26. 根据权利要求21所述的方法,其特征在于,所述生成编码后的码流,包括:The method according to claim 21, wherein said generating an encoded code stream comprises:
    若所述滤波器的种类的数目为1,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of types of the filter is 1, the filter label corresponding to the pixel type is not written into the code stream.
  27. 根据权利要求21至26中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 21 to 26, wherein the method further comprises:
    确定每一个像素类别对应的初始滤波器;Determine the initial filter corresponding to each pixel category;
    对不同像素类别对应的初始滤波器进行合并,得到每一个像素类别对应的滤波器。The initial filters corresponding to different pixel categories are combined to obtain the filter corresponding to each pixel category.
  28. 根据权利要求21至27中任一项所述的方法,其特征在于,所述生成编码后的码流,还包括:The method according to any one of claims 21 to 27, wherein said generating an encoded code stream further comprises:
    将所述滤波器的种类的数目减一后写入所述码流。The number of types of filters is reduced by one and then written into the code stream.
  29. 一种环路滤波的方法,其特征在于,包括:A method for loop filtering is characterized in that it includes:
    获取编码后的码流;Get the coded stream;
    解析所述码流,得到环路滤波采用的滤波器的种类的数目;Parse the code stream to obtain the number of types of filters used in loop filtering;
    若所述滤波器的种类的数目等于像素类别的数目,对所述像素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。If the number of the types of filters is equal to the number of pixel types, for the pixels of the pixel type, a filter with the same label as the pixel type or a label with a default corresponding relationship is used to perform loop filtering.
  30. 根据权利要求29所述的方法,其特征在于,若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第一指示信息,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。The method of claim 29, wherein if the number of types of filters is equal to the number of pixel types, the filter label indication information in the code stream is parsed, and if the filter label indicates The information is the first indication information, and a filter with the same label as the pixel category or a label with a default corresponding relationship is used to perform loop filtering, wherein the first indication information is used to indicate that the code stream does not include all The filter label corresponding to the pixel category.
  31. 根据权利要求29所述的方法,其特征在于,若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第二指示信息,则解析所述码流中的所述像素类别对应的滤波器标号,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。The method of claim 29, wherein if the number of types of filters is equal to the number of pixel types, the filter label indication information in the code stream is parsed, and if the filter label indicates If the information is the second indication information, then the filter label corresponding to the pixel category in the code stream is parsed, where the second indication information is used to indicate that the code stream includes the filter corresponding to the pixel category Label.
  32. 根据权利要求29所述的方法,其特征在于,若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则解析所述码流中的所述像素类别对应的滤波器标号。28. The method of claim 29, wherein if the number of filter types is greater than 1 and less than the number of pixel categories, then the filter label corresponding to the pixel category in the code stream is parsed .
  33. 根据权利要求31或32所述的方法,其特征在于,所述方法还包括:The method according to claim 31 or 32, wherein the method further comprises:
    对所述像素类别的像素,采用解析到的所述像素类别对应的滤波器标号的滤波器进行环路滤波。For the pixels of the pixel type, loop filtering is performed by using the parsed filter of the filter label corresponding to the pixel type.
  34. 根据权利要求29所述的方法,其特征在于,若所述滤波器的种类的数目为1,对所述像素类别的像素,采用所述码流中的唯一一种滤波器进行环路滤波。The method according to claim 29, wherein if the number of types of filters is 1, for the pixels of the pixel category, the only filter in the code stream is used for loop filtering .
  35. 一种环路滤波的装置,其特征在于,包括:A device for loop filtering is characterized by comprising:
    确定模块,确定环路滤波采用的滤波器的种类的数目;Determine the module to determine the number of types of filters used in loop filtering;
    处理模块,根据所述滤波器的种类的数目,确定是否将像素类别对应的滤波器标号写入码流。The processing module determines whether to write the filter label corresponding to the pixel category into the code stream according to the number of types of the filters.
  36. 根据权利要求35所述的装置,其特征在于,所述处理模块用于:The device according to claim 35, wherein the processing module is configured to:
    若所述滤波器的种类的数目等于所述像素类别的数目,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of filter types is equal to the number of pixel types, then the filter label corresponding to the pixel type is not written into the code stream.
  37. 根据权利要求36所述的装置,其特征在于,所述像素类别对应的滤波器标号与所述像素类别的标号相同或为默认对应关系。The device according to claim 36, wherein the filter label corresponding to the pixel category is the same as the label of the pixel category or has a default corresponding relationship.
  38. 根据权利要求36或37所述的装置,其特征在于,所述处理模块还用于:The device according to claim 36 or 37, wherein the processing module is further configured to:
    将第一指示信息写入所述码流,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。The first indication information is written into the code stream, where the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  39. 根据权利要求35所述的装置,其特征在于,所述处理模块用于:The device according to claim 35, wherein the processing module is configured to:
    若所述滤波器的种类的数目等于所述像素类别的数目,且所述像素类别对应的滤波器标号与所述像素类别的标号不同或不为默认对应关系,则将所述像素类别对应的滤波器标号写入所述码流。If the number of filter types is equal to the number of pixel categories, and the filter label corresponding to the pixel category is different from the label of the pixel category or is not in the default correspondence, then the pixel category corresponding to the The filter label is written into the code stream.
  40. 根据权利要求39所述的装置,其特征在于,所述处理模块还用于:The device according to claim 39, wherein the processing module is further configured to:
    将第二指示信息写入所述码流,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。The second indication information is written into the code stream, where the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
  41. 根据权利要求35所述的装置,其特征在于,所述处理模块用于:The device according to claim 35, wherein the processing module is configured to:
    若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则将所 述像素类别对应的滤波器标号写入所述码流。If the number of filter types is greater than 1 and less than the number of pixel types, the filter label corresponding to the pixel type is written into the code stream.
  42. 根据权利要求35所述的装置,其特征在于,所述处理模块用于:The device according to claim 35, wherein the processing module is configured to:
    若所述滤波器的种类的数目为1,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of types of the filter is 1, the filter label corresponding to the pixel type is not written into the code stream.
  43. 根据权利要求35至42中任一项所述的装置,其特征在于,所述处理模块还用于:The device according to any one of claims 35 to 42, wherein the processing module is further configured to:
    确定每一个像素类别对应的初始滤波器;Determine the initial filter corresponding to each pixel category;
    对不同像素类别对应的初始滤波器进行合并,得到每一个像素类别对应的滤波器。The initial filters corresponding to different pixel categories are combined to obtain the filter corresponding to each pixel category.
  44. 根据权利要求35至43中任一项所述的装置,其特征在于,所述处理模块还用于:The device according to any one of claims 35 to 43, wherein the processing module is further configured to:
    将所述滤波器的种类的数目减一后写入所述码流。The number of types of filters is reduced by one and then written into the code stream.
  45. 一种环路滤波的装置,其特征在于,包括:A device for loop filtering is characterized by comprising:
    确定模块,用于确定环路滤波采用的滤波器的种类的数目;The determining module is used to determine the number of types of filters used in loop filtering;
    处理模块,用于根据所述滤波器的种类的数目,确定是否解析码流中的像素类别对应的滤波器标号。The processing module is used to determine whether to parse the filter label corresponding to the pixel category in the code stream according to the number of types of the filters.
  46. 根据权利要求45所述的装置,其特征在于,所述处理模块用于:The device according to claim 45, wherein the processing module is configured to:
    若所述滤波器的种类的数目等于所述像素类别的数目,则不解析所述码流中的所述像素类别对应的滤波器标号。If the number of types of filters is equal to the number of pixel types, the filter label corresponding to the pixel type in the code stream is not parsed.
  47. 根据权利要求45所述的装置,其特征在于,所述处理模块用于:The device according to claim 45, wherein the processing module is configured to:
    若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第一指示信息,则不解析所述码流中的所述像素类别对应的滤波器标号,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。If the number of filter types is equal to the number of pixel types, the filter label indication information in the code stream is parsed, and if the filter label indication information is the first indication information, the code is not parsed The filter label corresponding to the pixel category in the stream, wherein the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  48. 根据权利要求46或47所述的装置,其特征在于,所述处理模块还用于:The device according to claim 46 or 47, wherein the processing module is further configured to:
    对所述像素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。For the pixels of the pixel category, a filter with the same label as the pixel category or a label with a default corresponding relationship is used to perform loop filtering.
  49. 根据权利要求45所述的装置,其特征在于,所述处理模块用于:The device according to claim 45, wherein the processing module is configured to:
    若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第二指示信息,则解 析所述码流中的所述像素类别对应的滤波器标号,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。If the number of filter types is equal to the number of pixel categories, parse the filter label indication information in the code stream, and if the filter label indication information is the second indication information, parse the code stream The filter label corresponding to the pixel category in, wherein the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
  50. 根据权利要求45所述的装置,其特征在于,所述处理模块用于:The device according to claim 45, wherein the processing module is configured to:
    若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则解析所述码流中的所述像素类别对应的滤波器标号。If the number of filter types is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type in the code stream is parsed.
  51. 根据权利要求49或50所述的装置,其特征在于,所述处理模块还用于:The device according to claim 49 or 50, wherein the processing module is further configured to:
    对所述像素类别的像素,采用解析到的所述像素类别对应的滤波器标号的滤波器进行环路滤波。For the pixels of the pixel type, loop filtering is performed by using the parsed filter of the filter label corresponding to the pixel type.
  52. 根据权利要求45所述的装置,其特征在于,所述处理模块用于:The device according to claim 45, wherein the processing module is configured to:
    若所述滤波器的种类的数目为1,则不解析所述码流中的所述像素类别对应的滤波器标号。If the number of filter types is 1, the filter label corresponding to the pixel type in the code stream is not parsed.
  53. 根据权利要求52所述的装置,其特征在于,所述处理模块还用于:The device according to claim 52, wherein the processing module is further configured to:
    对所述像素类别的像素,采用所述码流中的唯一一种滤波器进行环路滤波。For the pixels of the pixel category, the only filter in the code stream is used for loop filtering.
  54. 根据权利要求45至53.中任一项所述的装置,其特征在于,所述确定模块用于:The device according to any one of claims 45 to 53, wherein the determining module is configured to:
    解析所述码流,得到所述滤波器的种类的数目。Parse the code stream to obtain the number of types of the filter.
  55. 一种环路滤波的装置,其特征在于,包括:A device for loop filtering is characterized by comprising:
    滤波模块,用于采用像素类别对应的滤波器对所述像素类别的像素进行环路滤波;A filtering module, configured to perform loop filtering on the pixels of the pixel category by using a filter corresponding to the pixel category;
    处理模块,用于生成编码后的码流,其中,若环路滤波采用的滤波器的种类的数目等于所述像素类别的数目,所述码流中不包括所述像素类别对应的滤波器标号。A processing module for generating an encoded code stream, where if the number of filter types used in loop filtering is equal to the number of pixel categories, the code stream does not include the filter label corresponding to the pixel category .
  56. 根据权利要求55所述的装置,其特征在于,所述处理模块用于:The device according to claim 55, wherein the processing module is configured to:
    若所述滤波器的种类的数目等于所述像素类别的数目,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of filter types is equal to the number of pixel types, then the filter label corresponding to the pixel type is not written into the code stream.
  57. 根据权利要求56所述的装置,其特征在于,所述像素类别对应的滤波器标号与所述像素类别的标号相同或为默认对应关系。The device according to claim 56, wherein the filter label corresponding to the pixel category is the same as the label of the pixel category or has a default correspondence.
  58. 根据权利要求56或57所述的装置,其特征在于,所述处理模块还用于:The device according to claim 56 or 57, wherein the processing module is further configured to:
    将第一指示信息写入所述码流,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。The first indication information is written into the code stream, where the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  59. 根据权利要求55所述的装置,其特征在于,所述处理模块用于:The device according to claim 55, wherein the processing module is configured to:
    若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则将所述像素类别对应的滤波器标号写入所述码流。If the number of types of filters is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type is written into the code stream.
  60. 根据权利要求55所述的装置,其特征在于,所述处理模块用于:The device according to claim 55, wherein the processing module is configured to:
    若所述滤波器的种类的数目为1,则不将所述像素类别对应的滤波器标号写入所述码流。If the number of types of the filter is 1, the filter label corresponding to the pixel type is not written into the code stream.
  61. 根据权利要求55至60中任一项所述的装置,其特征在于,所述处理模块还用于:The device according to any one of claims 55 to 60, wherein the processing module is further configured to:
    确定每一个像素类别对应的初始滤波器;Determine the initial filter corresponding to each pixel category;
    对不同像素类别对应的初始滤波器进行合并,得到每一个像素类别对应的滤波器。The initial filters corresponding to different pixel categories are combined to obtain the filter corresponding to each pixel category.
  62. 根据权利要求55至61中任一项所述的装置,其特征在于,所述处理模块还用于:The device according to any one of claims 55 to 61, wherein the processing module is further configured to:
    将所述滤波器的种类的数目减一后写入所述码流。The number of types of filters is reduced by one and then written into the code stream.
  63. 一种环路滤波的装置,其特征在于,包括:A device for loop filtering is characterized by comprising:
    获取模块,用于获取编码后的码流;The acquisition module is used to acquire the encoded code stream;
    处理模块,用于解析所述码流,得到环路滤波采用的滤波器的种类的数目;若所述滤波器的种类的数目等于像素类别的数目,对所述像素类别的像素,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波。The processing module is used to analyze the code stream to obtain the number of filter types used in loop filtering; if the number of filter types is equal to the number of pixel types, for the pixels of the pixel type, use the same Filters with the same labels of the pixel categories or labels with a default corresponding relationship perform loop filtering.
  64. 根据权利要求63所述的装置,其特征在于,所述处理模块用于:The device according to claim 63, wherein the processing module is configured to:
    若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第一指示信息,采用与所述像素类别的标号相同或具有默认对应关系的标号的滤波器进行环路滤波,其中,所述第一指示信息用于指示所述码流中不包括所述像素类别对应的滤波器标号。If the number of types of filters is equal to the number of pixel categories, the filter label indication information in the code stream is parsed, and if the filter label indication information is the first indication information, the same as the pixel category Filters with the same label or a label with a default corresponding relationship perform loop filtering, wherein the first indication information is used to indicate that the code stream does not include the filter label corresponding to the pixel category.
  65. 根据权利要求63所述的装置,其特征在于,所述处理模块用于:The device according to claim 63, wherein the processing module is configured to:
    若所述滤波器的种类的数目等于所述像素类别的数目,解析所述码流中的滤波器标号指示信息,若所述滤波器标号指示信息为第二指示信息,则解 析所述码流中的所述像素类别对应的滤波器标号,其中,所述第二指示信息用于指示所述码流中包括所述像素类别对应的滤波器标号。If the number of filter types is equal to the number of pixel categories, parse the filter label indication information in the code stream, and if the filter label indication information is the second indication information, parse the code stream The filter label corresponding to the pixel category in, wherein the second indication information is used to indicate that the code stream includes the filter label corresponding to the pixel category.
  66. 根据权利要求63所述的装置,其特征在于,所述处理模块用于:The device according to claim 63, wherein the processing module is configured to:
    若所述滤波器的种类的数目大于1且小于所述像素类别的数目,则解析所述码流中的所述像素类别对应的滤波器标号。If the number of filter types is greater than 1 and less than the number of pixel types, then the filter label corresponding to the pixel type in the code stream is parsed.
  67. 根据权利要求65或66所述的装置,其特征在于,所述处理模块用于:The device according to claim 65 or 66, wherein the processing module is configured to:
    对所述像素类别的像素,采用解析到的所述像素类别对应的滤波器标号的滤波器进行环路滤波。For the pixels of the pixel type, loop filtering is performed by using the parsed filter of the filter label corresponding to the pixel type.
  68. 根据权利要求63所述的装置,其特征在于,所述处理模块用于:The device according to claim 63, wherein the processing module is configured to:
    若所述滤波器的种类的数目为1,对所述像素类别的像素,采用所述码流中的唯一一种滤波器进行环路滤波。If the number of the types of filters is 1, for the pixels of the pixel type, the only filter in the code stream is used for loop filtering.
  69. 一种计算机系统,其特征在于,包括:A computer system, characterized in that it comprises:
    存储器,用于存储计算机可执行指令;Memory, used to store computer executable instructions;
    处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行根据权利要求1至34中任一项所述的方法中的操作。The processor is configured to access the memory and execute the computer executable instructions to perform operations in the method according to any one of claims 1 to 34.
  70. 一种可移动设备,其特征在于,包括:A movable device, characterized in that it comprises:
    根据权利要求35至68中任一项所述的装置;或者,The device according to any one of claims 35 to 68; or,
    根据权利要求69所述的计算机系统。The computer system according to claim 69.
PCT/CN2019/078053 2019-03-13 2019-03-13 In-loop filtering method and apparatus, computer system, and mobile device WO2020181541A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/078053 WO2020181541A1 (en) 2019-03-13 2019-03-13 In-loop filtering method and apparatus, computer system, and mobile device
CN201980005266.6A CN111279706B (en) 2019-03-13 2019-03-13 Loop filtering method, device, computer system and mobile equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/078053 WO2020181541A1 (en) 2019-03-13 2019-03-13 In-loop filtering method and apparatus, computer system, and mobile device

Publications (1)

Publication Number Publication Date
WO2020181541A1 true WO2020181541A1 (en) 2020-09-17

Family

ID=70999808

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/078053 WO2020181541A1 (en) 2019-03-13 2019-03-13 In-loop filtering method and apparatus, computer system, and mobile device

Country Status (2)

Country Link
CN (1) CN111279706B (en)
WO (1) WO2020181541A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012092841A1 (en) * 2011-01-03 2012-07-12 Mediatek Inc. Method of filter-unit based in-loop filtering
CN103096054A (en) * 2011-11-04 2013-05-08 华为技术有限公司 Video image filtering processing method and device thereof
CN108293111A (en) * 2015-10-16 2018-07-17 Lg电子株式会社 For improving the filtering method and device predicted in image encoding system
CN109076228A (en) * 2016-05-09 2018-12-21 高通股份有限公司 The signalling of filtering information

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016204374A1 (en) * 2015-06-18 2016-12-22 엘지전자 주식회사 Image filtering method and device in image coding system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012092841A1 (en) * 2011-01-03 2012-07-12 Mediatek Inc. Method of filter-unit based in-loop filtering
CN103096054A (en) * 2011-11-04 2013-05-08 华为技术有限公司 Video image filtering processing method and device thereof
CN108293111A (en) * 2015-10-16 2018-07-17 Lg电子株式会社 For improving the filtering method and device predicted in image encoding system
CN109076228A (en) * 2016-05-09 2018-12-21 高通股份有限公司 The signalling of filtering information

Also Published As

Publication number Publication date
CN111279706A (en) 2020-06-12
CN111279706B (en) 2022-03-22

Similar Documents

Publication Publication Date Title
Kim et al. Hierarchical prediction and context adaptive coding for lossless color image compression
EP3987795A1 (en) Block partitioning methods for video coding
JP7308983B2 (en) Cross-component adaptive loop filter for chroma
WO2021134706A1 (en) Loop filtering method and device
WO2021203394A1 (en) Loop filtering method and apparatus
WO2019157717A1 (en) Motion compensation method and device, and computer system
US11394966B2 (en) Video encoding and decoding method and apparatus
JP2023504408A (en) Method and apparatus for chroma sampling
JP7302097B2 (en) Flexible partitioning of the loop filter block
WO2020258055A1 (en) Loop filtering method and device
CN114731440A (en) Lossless encoding of video data
US11659193B2 (en) Framework for video conferencing based on face restoration
WO2019191891A1 (en) Method and device for video processing
CN115836525A (en) Method and system for prediction from multiple cross components
CN106028031A (en) Video coding device, video coding method, video decoding device and video decoding method
JP2023514136A (en) Methods for processing chroma signals
EP3843399B1 (en) Video image component prediction method and apparatus, and computer storage medium
Xia et al. Visual sensitivity-based low-bit-rate image compression algorithm
WO2020181541A1 (en) In-loop filtering method and apparatus, computer system, and mobile device
WO2021196234A1 (en) Video encoding and decoding method and device, and storage medium
NO20200708A1 (en) Method, computer program and system for detecting changes and moving objects in a video view
WO2020147226A1 (en) Information processing method and apparatus, and device and storage medium
WO2019191888A1 (en) Loop filtering method and apparatus, and computer system
US20240129487A1 (en) Keypoints based video compression
WO2019191887A1 (en) Motion compensation method, device, and computer system

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19919154

Country of ref document: EP

Kind code of ref document: A1