Video coding and decoding method and apparatus, electronic device, and storage medium
By acquiring the information used for classification of image data, combining the category subsets of multiple classifier groups, accurately positioning the dynamic range and using intermediate information, the problem of insufficient classification accuracy of adaptive loop filtering in the prior art is solved, and the classification accuracy of adaptive loop filtering is improved. Video encoding and codec efficiency and quality.
Patent Information
- Application Number
- PCT/CN2024/102165
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-30
- Filing Date
- 2024-06-28
- Publication Date
- 2025-01-02
AI Technical Summary
In the existing video encoding and decoding technology, the accuracy of adaptive loop filter classification is insufficient, resulting in low video quality. It is mainly due to the maximum dynamic range that depends on the signal bit width and a single classifier, and the intermediate information is not fully utilized, which limits the ALF category. Determining accuracy.
By obtaining the information used for classification of image data, including target range, intermediate information or category subsets, determine the category of adaptive loop filters corresponding to the image data, and improve classification accuracy by using the category subset combined with multiple classifier groups. , precise positioning of dynamic range and utilization of intermediate information to improve the accuracy of ALF categories.
The efficiency and quality of video encoding and decoding are improved, and the reconstruction quality of video signals is improved through more accurate adaptive loop filtering classification, and the efficiency of the encoding and decoding process is enhanced.
Smart Images

Figure CN2024102165_02012025_PF_FP_ABST
Abstract
Description
Video encoding and decoding method, device, electronic device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 30, 2023, with application number 202310801736.8 and application name “Adaptive loop filtering classification method and related device in video coding and decoding”. The entire contents of the application are incorporated by reference into this application. Technical Field
[0002] This application relates to the fields of video coding and decoding technology, multimedia, cloud technology, artificial intelligence, etc. Specifically, it relates to a video coding and decoding method, device, electronic device and storage medium. Background Art
[0003] Various video codec technologies can be used to compress video data, so that one or more video codec standards can be executed to perform encoding and decoding of the video data. Exemplary video codec standards may include, but are not limited to, Versatile Video Codec (VVC), Joint Exploration Test Model (JEM), High Efficiency Video Codec (H.265 / HEVC), Advanced Video Codec (H.264 / AVC), Moving Picture Experts Group (MPEG) codec, etc. Video codecs can generally perform prediction methods (e.g., inter-frame prediction, intra-frame prediction, etc.) that utilize redundancy present in a sequence of image frames of a video. For example, by performing video codecs, redundancy present in image frames of a video can be reduced or removed from the video data.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a method, apparatus, electronic device, and storage medium for video encoding and decoding, which can improve the accuracy of determining the ALF category and thereby improve the efficiency of video encoding and decoding.
[0006] In one aspect, an embodiment of the present application provides a method for video encoding and decoding, including:
[0007] Acquiring information for classification of the image data, wherein the information for classification includes at least one of a target range, intermediate information, or a category subset;
[0008] determining, for the image data, a target category corresponding to the information for classification, the target category indicating a category of an adaptive loop filter used for encoding and decoding of the image data;
[0009] The target range includes at least one of a first dynamic range or a second dynamic range, the first dynamic range being a value range determined based on pixel information of the image data, and the second dynamic range being a preset range determined from one or more preset ranges, at least one of the preset ranges being smaller than a maximum range that can be represented by a signal bit width of the image data;
[0010] The intermediate information includes information generated during the encoding and decoding process of the image data;
[0011] The category subset includes at least two subcategories, and the at least two subcategories are categories of the image data respectively determined by each classifier in the classifier group.
[0012] On the other hand, an embodiment of the present application provides a video encoding and decoding apparatus, including:
[0013] an information acquisition module, configured to acquire information for classification of the image data, wherein the information for classification includes at least one of a target range, intermediate information, or a category subset;
[0014] a classification module, configured to determine, for the image data, a target category corresponding to the classification information, wherein the target category indicates a category of an adaptive loop filter used for encoding and decoding the image data;
[0015] The target range includes at least one of a first dynamic range or a second dynamic range, the first dynamic range being a value range determined based on pixel information of the image data, and the second dynamic range being a preset range determined from one or more preset ranges, at least one of the preset ranges being smaller than a maximum range that can be represented by a signal bit width of the image data;
[0016] The intermediate information includes information generated during the encoding and decoding process of the image data;
[0017] The category subset includes at least two subcategories, and the at least two subcategories are categories of the image data respectively determined by each classifier in the classifier group.
[0018] On the other hand, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the above methods.
[0019] On the other hand, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when the computer program is executed by a processor.
[0020] On the other hand, an embodiment of the present application provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] FIG1 is a schematic diagram of a system architecture for implementing encoding and decoding provided by an embodiment of the present application;
[0023] FIG2 is a flow chart of a video encoding and decoding method provided in an embodiment of the present application;
[0024] FIG3 is a schematic diagram of filtering an image provided by an embodiment of the present application;
[0025] FIG4 is a schematic diagram of a different type of diamond filter provided in an embodiment of the present application;
[0026] FIG5 is a schematic diagram of tap coefficients corresponding to various samples of an input filter provided in an embodiment of the present application;
[0027] FIG6 is a schematic diagram showing a comparison between image data and a first image provided by an embodiment of the present application;
[0028] FIG7 is a schematic diagram showing a comparison between image data and a second image provided in an embodiment of the present application;
[0029] FIG8 is a schematic diagram showing a comparison between image data and a third image provided by an embodiment of the present application;
[0030] FIG9 is a schematic flow chart of another video encoding and decoding method provided in an embodiment of the present application;
[0031] FIG10 is a schematic structural diagram of a video encoding and decoding apparatus provided in an embodiment of the present application;
[0032] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The following describes the embodiments of the present application in conjunction with the accompanying drawings. It should be understood that the embodiments described below in conjunction with the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0034] Those skilled in the art will understand that, unless otherwise specified, the singular forms "a," "an," and "the" used herein may also include the plural forms. It will be further understood that the terms "including" and "comprising" used in the embodiments of the present application mean that the corresponding features can be implemented as the features, information, data, steps, operations, components, and / or components presented, but do not exclude implementation as other features, information, data, steps, operations, components, components, and / or combinations thereof supported by the present technical field. It will be understood that when we refer to a component as being "connected" or "coupled" to another component, the component can be directly connected or coupled to the other component, or it can refer to the component and the other component establishing a connection relationship through an intermediate component. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" indicates implementation as "A," or implementation as "A," or implementation as "A and B." "Multiple" refers to "more than two."
[0035] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0036] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on, or combine with each other, and the same terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0037] First, several terms involved in the embodiments of this application are introduced and explained:
[0038] ALF: Adaptive Loop Filtering
[0039] APS: Adaptation Parameter Set
[0040] BIF: Bilateral filter, bilateral filter
[0041] CC-ALF: Cross-Component Adaptive Loop Filtering, cross-component adaptive loop filtering
[0042] CCSAO: Cross-Component Sample Adaptive Offset, cross-component sample adaptive compensation
[0043] CTB: Coding Tree Block, coding tree block
[0044] CTU: Coding Tree Unit, coding tree unit
[0045] DF: Deblocking Filter, deblocking filter
[0046] ECM: Enhanced Compression Model
[0047] PPS: Picture Parameter Set, image parameter set
[0048] RDO: Rate-Distortion Optimization
[0049] SAO: Sample Adaptive Offset, sample adaptive compensation
[0050] SPS: Sequence Parameter Set, sequence parameter set
[0051] VTM: VVC test model, universal video coding test model
[0052] VVC: Versatile Video Coding, universal video coding
[0053] Next, the system framework of the embodiment of the present application is illustrated.
[0054] Please refer to Figure 1, which is a schematic diagram of a system architecture for implementing encoding and decoding provided by an embodiment of the present application. As shown in Figure 1, system 10 includes an encoding end 12, which can provide encoded video data to a decoding end 14, which can then decode the encoded video data. The encoding end 12 and the decoding end 14 can include any of a variety of devices, including at least one of a desktop computer, a laptop computer, a tablet computer, a set-top box, an intelligent terminal (such as a so-called "smart" phone), a television, a camera, a display device, a digital media player, a video game console, or a video streaming device. In some cases, the encoding end 12 and the decoding end 14 are equipped for wireless communication. Therefore, the encoding end 12 and the decoding end 14 can be wireless communication devices. The technology described in the embodiments of the present disclosure can be applied to wireless and / or wired applications. The encoding end 12 is an exemplary video encoding device, that is, a device for encoding video data. The decoding end 14 is an exemplary video decoding device, that is, a device for decoding video data.
[0055] The system 10 shown in Figure 1 is merely an example. The technology for encoding, decoding and processing video data can be performed by any digital video encoding and / or decoding device. In some examples, the technology can be performed by a video encoder / decoder, which is commonly referred to as a "codec (CODEC)". The encoding end 12 and the decoding end 14 are examples of such codec devices, wherein the encoding end 12 generates encoded video data to send to the decoding end 14. In some examples, the encoding end 12 and the decoding end 14 operate in a substantially symmetrical manner, so that each of the encoding end 12 and the decoding end 14 includes a video encoding and decoding component. Therefore, the system 10 can support one-way or two-way video transmission between the encoding end 12 and the decoding end 14, for example, for video streaming, video playback, video broadcasting or video telephony.
[0056] In the example of FIG1 , the encoding end 12 includes a video source 121, a video encoder 122, and an output interface 123. The decoding end 14 includes an input interface 141, a video decoder 142, and a display device 143. In other examples, the encoding end 12 and the decoding end 14 include other components or arrangements. For example, the encoding end 12 can receive video data from an external video source (such as an external camera). Similarly, the decoding end 14 can interface with an external display device rather than including an integrated display device.
[0057] Video source 121 is a video data source. Video data may include a series of pictures. Video source 121 may include a video capture device (such as a camera), an archive containing previously captured video, and / or a video feed interface for receiving video data from a video content provider. In some examples, video source 121 generates computer-graphics-based video data, or a combination of live video, archived video, and computer-generated video. In each case, the captured, pre-captured, or computer-generated video may be encoded by video encoder 122.
[0058] In some examples, video encoder 122 and video decoder 142 encode and decode video data according to one or more video codec standards or specifications. For example, video encoder 122 and video decoder 142 can encode and decode video data according to ITU-T H.261, ISO / IEC MPEG-1 Visual, ITU-T H.262 or ISO / IEC MPEG-2 Visual, ITU-T H.263, ISO / IEC MPEG-4 Visual, and ITU-T H.264 (also known as ISO / IEC MPEG-4 AVC), including its Scalable Video Coding (SVC) and Multiview Video Coding (MVC) extensions, or another video codec standard or specification. In some examples, video encoder 122 and video decoder 142 encode and decode video data according to the High Efficiency Video Codec (HEVC) standard (referred to as ITU-T H.265, its range and screen content codec extension, its 3D video codec extension (3D-HEVC), its multi-view extension (MV-HEVC), or its scalable extension (SHVC)).
[0059] The technical solutions of the embodiments of the present application can be used in advanced video codecs (such as HEVC or extensions of the next-generation video codec standard (for example, H.266 / VVC)).
[0060] In the field of video coding and decoding, filtering (e.g., ALF) is often applied to enhance the quality of reconstructed and / or decoded video signals. In embodiments of the present application, a reconstructed video data block may refer to a video data block that has been reconstructed in a reconstruction loop of the video encoder 122, or may refer to a video data block decoded by the video decoder 142. In some examples, the filter may be applied as a post filter, where the filtered frame is not used to predict future frames, or the filter may be applied as a loop filter, where the filtered frame is used to predict future frames. For example, the filter may be designed by minimizing the error between the original signal and the reconstructed / decoded filtered signal.
[0061] In the related technologies of video coding and decoding, the video coding and decoding process generally requires the use of an adaptive loop filter (ALF). The ALF can adaptively determine the filter coefficients according to different video content, thereby reducing the mean square error (MSE) between the reconstructed component and the original component, thereby improving video quality.
[0062] However, it has been found in practice that the current video quality needs to be further improved.
[0063] In related technologies, the classification of adaptive loop filtering in video coding and decoding can be based on determining the ALF category within the maximum dynamic range that can be represented by the signal bit width of the video image. However, when determining the ALF category, intermediate information of the video image during the coding and decoding process is not utilized, or the ALF category is determined based on a single classifier.
[0064] In schemes that determine the ALF category based on the maximum dynamic range that can be represented by the signal bit width of the video image, video image signals are generally distributed within a limited dynamic range. Determining the ALF category based on this maximum dynamic range results in inaccurate ALF category determination, which in turn leads to poor video quality. Secondly, during the encoding and decoding process, various types of intermediate information are generated. While this intermediate information can, to a certain extent, serve as a reference for determining the ALF category, related technologies do not utilize this intermediate information, which also results in inaccurate ALF category determination, leading to poor video quality. Furthermore, the ALF category corresponding to a single classifier is limited, which in turn limits the determined ALF category to a certain extent, resulting in inaccurate ALF category determination, which in turn leads to poor video quality. The results of adaptive loop filtering classification have a certain impact on video quality. Therefore, to further improve video quality, improving the accuracy of adaptive loop filtering classification can be a starting point.
[0065] Please refer to Figure 2, which is a flow chart of a video encoding and decoding method provided in an embodiment of the present application. The method of this embodiment can be applied to an electronic device. The electronic device can be an encoding end or a decoding end, or can serve as both an encoding end and a decoding end, without limitation herein. The method shown in Figure 2 includes:
[0066] S210: Acquire information for classification corresponding to the image data, where the information for classification includes at least one of a target range, intermediate information, or a category subset.
[0067] The image data may include at least one of an image sequence, a frame of image, a slice in a frame of image, a tile or a block. In other words, the level of the image data is one of a sequence level, a frame level, a slice level, a tile level or a block level. Step S210 may obtain information for classification at at least one level. In this embodiment, the image sequence includes at least two frames of image. Optionally, the image sequence may include at least two consecutive frames of image. In this embodiment, the method may be to perform encoding and decoding in units of image data. Specifically, if the image data of this embodiment is an image sequence, it can be understood that the category of the adaptive loop filter to be applied is determined in units of the image sequence. Similarly, if the image data of this embodiment is a frame of image, it can be understood that the category of the adaptive loop filter to be applied is determined in units of a frame of image.
[0068] The target range includes at least one of a first dynamic range and a second dynamic range. The first dynamic range is a range determined based on pixel information of the image data. The second dynamic range is a preset range determined based on one or more preset ranges, at least one of which is smaller than the maximum range that can be represented by the signal bit width of the image data.
[0069] In this embodiment, the range determined based on the pixel information of the image data may be less than or equal to the maximum range that can be represented by the signal bit width of the image data, and is determined according to the actual calculation results and is not limited here. The target range can be understood as a subset of the maximum range. Specifically, the maximum range can be 0 to 2^(signal bit width-1). Exemplarily, taking the signal bit width of 10 bits as an example, the maximum range can be 0-1023. Another exemplary example, taking the signal bit width of 8 bits as an example, the maximum range can be 0-511. Specifically, the second dynamic range can be part or all of the range in the total range that can be formed by all preset ranges.
[0070] For information used for classification including a target range, the target range includes at least one of a first dynamic range or a second dynamic range, and the first dynamic range is a range determined based on pixel information of the image data, and the second dynamic range is a range determined based on one or more preset ranges, at least one of which is smaller than the maximum range that can be represented by the signal bit width of the image data; that is, the target range used to determine the category of the adaptive loop filter of the image data may be smaller than the maximum range, so the target range is more compatible with the image data than the maximum range (that is, the target range can more accurately represent the value range of the pixel information of the image data than a fixed maximum range), thereby improving the accuracy of determining the ALF category and thereby improving video quality.
[0071] The intermediate information includes information generated during the encoding and decoding process of the image data.
[0072] In this embodiment, image data generates some intermediate information during the encoding and decoding process. This intermediate information is valuable for determining the target category. Therefore, the intermediate information can be used to determine the target category of the adaptive loop filter corresponding to the image data.
[0073] Specifically, the intermediate information may be information that is not used in the solution for determining the adaptive loop filter in the related art.
[0074] It is understandable that, with the iteration of technology, the information used to determine the adaptive loop filter will change accordingly. This embodiment does not limit the specific intermediate information.
[0075] The information used for classification includes intermediate information, which includes information generated during the encoding and decoding process of the image data. In the embodiment of the present application, more valuable intermediate information can be used to determine the type of adaptive loop filter to be used, thereby improving the accuracy of determining the ALF type and further improving the efficiency of video encoding and decoding.
[0076] The category subset includes at least two subcategories, and the at least two subcategories are categories of image data (ie, categories of adaptive loop filters corresponding to the image data) respectively determined by respective classifiers in the classifier group, and each subcategory corresponds to a classifier.
[0077] In this embodiment, the classifier group includes at least two different classifiers, and each classifier in the classifier group can determine the subcategory corresponding to the image data from the corresponding multiple categories. Therefore, when the classifier group is used to classify the image data, the category corresponding to each classifier in the classifier group can be obtained, and then the target category can be determined based on the category corresponding to each classifier.
[0078] The classification information is used to determine the category of the adaptive loop filter corresponding to the image data through the category results output by at least two classifiers in the classifier group, thereby improving the accuracy of determining the ALF category and further improving the video encoding and decoding efficiency.
[0079] S220: Determine a target category corresponding to the classification information for the image data, where the target category indicates a category of an adaptive loop filter used for encoding and decoding the image data.
[0080] In this embodiment, the information used for classification includes at least one item of a target range, intermediate information, or a category subset, that is, this embodiment can determine the target category of the adaptive loop filter corresponding to the image data based on at least one item of the target range, intermediate information, or a category subset.
[0081] The technical solution of this embodiment obtains information for classification corresponding to the image data, and determines a target category of the adaptive loop filter corresponding to the image data based on the information for classification. The information for classification includes at least one of a target range, intermediate information, or a category subset. The target range includes at least one of a first dynamic range or a second dynamic range. The first dynamic range is a range determined based on pixel information of the image data, and the second dynamic range is a range determined based on one or more preset ranges, at least one of which is smaller than the maximum range that can be represented by the signal bit width of the image data. The intermediate information includes information generated during the encoding and decoding process of the image data (i.e., information related to the image data generated during the encoding and decoding process). The category subset includes at least two subcategories, and the at least two subcategories are categories of the image data determined by respective classifiers in the classifier group. Each subcategory corresponds to a classifier. This can improve the accuracy of determining the ALF category, thereby improving the efficiency of video encoding and decoding.
[0082] The following embodiments, based on any of the above embodiments, take VCC as an example to further illustrate how to classify and filter in video encoding and decoding.
[0083] As loop filters used in VVC, ALF and CCALF are Wiener filters that can adaptively determine filter coefficients based on different video content, thereby reducing the mean square error (MSE) between the reconstructed component (such as the reconstructed luminance component or the reconstructed chrominance component) and the original component. Among them, the input of ALF is, for example, the reconstructed pixel value before ALF processing, and the output is the enhanced reconstructed pixel value, such as the reconstructed luminance pixel value or the reconstructed chrominance pixel value. As an adaptive filter, the Wiener filter can generate different filter coefficients for video content with different characteristics. Therefore, ALF needs to first classify the video content and use corresponding filters for each category of video content. In the design of VVC, each 4x4 block is divided into one of 25 categories according to its own directionality and activity. The corresponding filter coefficients are calculated for each type of video content.
[0084] For the luminance component, in addition to 4x4 block-level adaptation, VVC also supports CTU-level ALF adaptive switching. Each CTU can use the filter group generated for the current slice, or use the filter group generated by the coded slice or a set of fixed filters from the 16 offline trained fixed filter groups. Within the CTU, each 4x4 block selects the filter of the corresponding category from the filter group for filtering according to its own category. The filter coefficients and the corresponding clipping index are transmitted to the decoding end by ALF_APS. An ALF_APS can contain a luminance filter group (including up to 25 filters) and up to 8 chroma filters.
[0085] CCALF uses the luma component to correct the chroma components. The ALF and CCALF processing flow is shown in Figure 3. CCALF uses the luma component as input and outputs the corrected values for the chroma components. The two chroma components can independently control whether to use their corresponding corrected values. These corrected values, along with the output of the chroma ALF, form the final chroma components.
[0086] In VVC, ALF uses different types of diamond filters as shown in Figure 4. The luminance component uses a 7x7 diamond filter, that is, a 7x7 diamond convolution kernel, and the chrominance component uses a 5x5 diamond filter.
[0087] For the luminance component, ALF will adaptively use different filters at the sub-block level (4x4), that is, each 4x4 pixel block needs to be divided into one of 25 categories. For the chrominance component, ALF does not need to classify the pixels at the sub-block level. All chrominance pixels in a CTU use the same filter. The classification index C of the luminance component pixel block is composed of the directionality feature D and the quantized activity feature of the block. The formula is as follows:
[0088] To calculate D and First, we need to calculate the horizontal, vertical, diagonal, and anti-diagonal gradient values for each pixel in the 4x4 pixel block:
[0089] H k,l =|2R(k,l)-R(k-1,l)-R(k+1,l)|#(2-2)
[0090] V k,l =|2R(k,l)-R(k,l-1)-R(k,l+1)|#(2-3)
[0091] D0 k,l=|2R(k,l)-R(k-1,l-1)-R(k+1,l+1)|#(2-4)
[0092] D1 k,l =|2R(k,l)-R(k-1,l+1)-R(k+1,l-1)|#(2-5)
[0093] Among them, H k,l Represents the horizontal gradient value of the pixel at position (k, l) in the 4x4 pixel block, V k,l Indicates the vertical gradient value of the pixel at position (k, l) in the 4x4 pixel block, D0 k,l Indicates the diagonal gradient value of the pixel at position (k, l) in the 4x4 pixel block, D1 k,l Represents the anti-diagonal gradient value of the pixel at position (k, l) in the 4x4 pixel block.
[0094] Based on pixel gradients, the horizontal, vertical, diagonal, and anti-diagonal gradients of each 4x4 block are calculated as follows:
[0095] Where i and j represent the coordinates of the upper left corner pixel of the 4x4 pixel block, and R(k,l) represents the reconstructed pixel value at position (k,l) before ALF filtering.
[0096] After obtaining the gradient value of the pixel block, the maximum and minimum values of the horizontal gradient value and the vertical gradient value are:
[0097] The maximum and minimum values of the diagonal gradient value and the anti-diagonal gradient value are:
[0098] The directional feature D is derived by comparing the maximum and minimum values of the gradient values in the four directions obtained by equations (2-8)-(2-9):
[0099] Step 1: If and If both are true, then D is set to 0.
[0100] Step 2: If Then go to Step 3, otherwise go to Step 4.
[0101] Step 3: If Then D is set to 2, otherwise D is set to 1.
[0102] Step 4: If Then D is set to 4, otherwise D is set to 3.
[0103] The activity characteristic A is calculated by the following formula:
[0104] Activity feature A will be quantized to the range of [0-4] as the quantized activity feature
[0105] Before filtering each 4x4 luma block, the filter coefficients and corresponding clipping values are geometrically transformed according to the gradient values of the current block, as specified in Table 1-1. These transformations include no transformation, diagonal transformation, vertical flip, and rotation transformations. Applying a geometric transformation to the filter coefficients is equivalent to applying a geometric transformation to the pixel values without changing the coefficients before filtering. The purpose of the geometric transformation is to align the directionality of the content of different blocks as much as possible, thereby reducing the number of categories required for the ALF and allowing different pixels to share the same filter coefficients. Using geometric transformations can increase the number of actual categories from 25 to 100 without increasing the number of ALF filters, thus improving its adaptability.
[0106] Table 1-1 Geometric transformation based on pixel block gradient values
[0107] For the ALF filtering process of VCC, at the decoding end, if the ALF flag at the CTU level is true, each pixel R(i,j) in the current CTU will be filtered. The filtering process and output are as follows:
[0108] Where f(k,l) represents the filter tap coefficient, K(x,y) is the limit function, and c(k,l) is the parameter related to the limit operation. The value range of k and l is to Where L is the filter length. The clipping function is defined as K(x, y) = min(y, max(-y, x)). Clipping adds nonlinearity to the ALF, reducing the impact of surrounding pixels with significant differences on the current pixel.
[0109] In ECM-8.0, the downsampling operation and virtual boundary restrictions in gradient calculation during ALF classification have been removed. Furthermore, the basic unit of the ALF classification operation has been changed from a 4x4 sub-block to a 2x2 sub-block. The shapes of the luma and chroma filters have also been changed accordingly.
[0110] For the luminance component, ECM-8.0 uses three different classifiers (C0, C1, and C2) and three different filter sets (F0, F1, and F2). Filter sets F0 and F1 contain fixed filters whose coefficients are generated based on offline training of classifiers C0 and C1. F2 contains filter coefficients generated from the content to be encoded and needs to be written into the bitstream for transmission to the decoder.
[0111] In ECM-8.0, each 2x2 sub-block is divided into two groups according to its directional characteristics D i and activity characteristics A i Generate the corresponding category index C i , as shown below:
[0112] Among them, i represents the classifier index, M D,i Represents the activity feature D used by the corresponding classifier i The total number of .
[0113] Similar to the calculation process in VVC, the horizontal, vertical, diagonal, and anti-diagonal gradients of each pixel are generated using the 1-D Laplacian operator. For classifier C0, the gradient of its sub-block is generated by adding the pixel gradient values of all positions in the 4x4 area covering the target 2x2 sub-block. For classifiers C1 and C2, the gradient of its sub-block is generated by adding the pixel gradient values of all positions in the 12x12 area covering the target 2x2 sub-block. The horizontal, vertical, diagonal, and anti-diagonal sub-block gradients are specified as Then the directional characteristic D i It is obtained by comparing the following two values with a set of thresholds:
[0114] Directional feature D2 uses the same thresholds of 2 and 4.5 as VVC. For D0 and D1, first calculate the horizontal / vertical edge strength and diagonal edge strength Use threshold Th = [1.25, 1.5, 2, 3, 4.5, 8]. When the edge strength Set to 0; otherwise, is satisfied The maximum integer of . When the edge strength Set to 0; otherwise To satisfy The maximum integer of . That is, when the horizontal / vertical edge is strong, the directional feature D i Generated by Table 1-2(a). Otherwise, the directional feature D i Generated from Table 1-2(b).
[0115] Table 1-2 Edge Strength With D i The mapping relationship
[0116] Activity characteristics It is the result of accumulating the horizontal and vertical gradients of the sub-block level A i The quantized value range is 0 to n. n is set to 4; for and n is set to 15. One ALF_APS can transmit up to 4 groups of luminance component filters, and each filter group contains up to 25 filters.
[0117] In ECM-8.0, the ALF classification process uses a new classifier. A flag is used to indicate whether the original classifier or the new classifier is used for the filter bank transmitted to the decoder. The new classifier cannot use geometric transformations. When using the new classifier, all pixels in a 2x2 subblock are summed, and classification is performed based on the sum of the pixel values.
[0118] class index =(sum×25)>>(sample bitdepth+2)#(2-13)
[0119] When filtering, ALF first uses two fixed filters F0 and F1, each using a 13x13 diamond filter, to generate two intermediate values R0(x,y) and R1(x,y) for the current pixel to be filtered. Then, the online filter F2 is applied to R0(x,y), R1(x,y), and the surrounding pixels to generate the filtered pixel, as shown in the following formula:
[0120] Among them, f i,j Indicates the difference between the surrounding pixels after the clipping operation and the current pixel R(x,y), g i Represents R after limiting operation i-20 The difference between (x,y) and the current pixel. Filter coefficient c i , i=0,…21, need to be transmitted to the decoding end.
[0121] In ECM-8.0, the luma filter generated by online training includes four types of input: spatially adjacent samples, reconstructed samples before deblocking, extended samples generated by fixed filter filtering, and residual components. As shown in Figure 5, the tap coefficients corresponding to various samples include spatial taps, fixed filter output-based taps, reconstructed samples before deblocking (recbefore DB-based taps), residual component taps (prediction-based taps), and prediction-filtered residual component taps. Among them, #0-#19 represent spatially adjacent samples, #20-#25, #28-#29 represent samples generated by fixed filter filtering, #26, #27, and #30 represent reconstructed samples before deblocking, and #31 and #32 represent residual components. Based on these various input types, the filtering process is as follows:
[0122] Among them, f i,j Indicates the difference between the limited spatial pixel samples and the current sample R(x,y), g i Represents the difference between the pixel sample generated by filtering with a fixed filter and the current sample R(x,y), h i,j Represents the difference between the reconstructed sample before the deblocking effect after clipping and the current sample R(x,y). i Represents the residual component after limiting, rFiltered i Represents the residual component generated by filtering with a fixed filter after clipping. The residual component and the reconstructed component use the same fixed filter.
[0123] In ALF_APS, a flag is used to indicate whether to use only the residual component or both the residual component and the residual component filtered by the fixed filter. In JVET-AD0219, a new classifier based on the luma residual component is proposed as the third classifier of ALF. For any 2x2 luma sub-block, the sum of the absolute values of the residual components of all positions in the 8x8 area covering the current 2x2 sub-block is first calculated. Then, the classification is performed based on the accumulated sum using the following formula:
[0124] classIdx=sum>>(sample bit depth-4)#(2-16)
[0125] The value range of the final class classIdx is 0 to 24. In ALF_APS, a classifier is required for each filter bank transmission.
[0126] In one possible implementation, the intermediate information includes at least one of the following:
[0127] a reconstructed signal before being filtered by a deblocking filter, wherein the reconstructed signal includes a reconstructed signal after being filtered by a fixed filter or a reconstructed signal not filtered by a fixed filter;
[0128] The signal to be processed is filtered by the fixed filter, and the signal to be processed includes a brightness signal.
[0129] The deblocking filter and the fixed filter may refer to the description of the above embodiments, and will not be elaborated here.
[0130] Optionally, the reconstructed signal before being filtered by the deblocking filter may include a reconstructed signal that has not been filtered by the fixed filter and has not been filtered by the deblocking filter, and may also include a reconstructed component before being filtered by the fixed filter and having not been filtered by the deblocking filter.
[0131] The following embodiments further illustrate how to determine the first dynamic range based on pixel information of image data based on any of the above embodiments.
[0132] In one possible implementation, determining the first dynamic range based on pixel information of the image data includes:
[0133] Determining a minimum signal value and a maximum signal value corresponding to the image based on pixel information of the image data;
[0134] A range minimum value of the first dynamic range is determined based on the minimum signal value and a range maximum value of the first dynamic range is determined based on the maximum signal value.
[0135] In this embodiment, pixel information may refer to pixel information of each pixel in the image data. The image data includes at least one of an original uncompressed signal, a reconstructed signal, a residual signal, or a predicted signal. It can also be understood that the pixel information includes at least one of the original uncompressed signal, the reconstructed signal, the residual signal, or the predicted signal.
[0136] The original uncompressed signal refers to a signal obtained by encoding and decoding the original uncompressed signal. The reconstructed signal can be a signal reconstructed from the original uncompressed signal after encoding and decoding. The residual signal can be a signal obtained by processing the original uncompressed signal using residual coding and decoding technology. The predicted signal can be a signal obtained by processing the original uncompressed signal using predictive coding and decoding technology.
[0137] In this embodiment, the minimum signal value and the maximum signal value are determined based on at least one of an original uncompressed signal, a reconstructed signal, a residual signal, or a predicted signal.
[0138] Specifically, for example, if the image data includes one signal, the minimum and maximum signal values in the image data can be determined based on the signal value corresponding to each pixel in the image data. For example, if the image data includes at least two signals, the signal value corresponding to each pixel can be calculated after normalizing the at least two signals to determine the first dynamic range.
[0139] Optionally, the range minimum value is not less than the minimum signal value, and the range maximum value is not greater than the maximum signal value.
[0140] It will be appreciated that in this embodiment, for example, if the image data corresponds to an image sequence, the signal value corresponding to each pixel in the image sequence is determined, and then the minimum and maximum signal values in the image sequence are determined to determine the target range corresponding to the image sequence. Similarly, if the image data corresponds to a single frame of image, the minimum and maximum signal values in the single frame of image are determined. Similarly, slices, tiles, or blocks can all be referred to in the description of image sequences and single frames of image, and are not further elaborated here.
[0141] The technical solution of this embodiment determines the minimum signal value and maximum signal value corresponding to the image based on the pixel information of the image data, and determines the minimum value of the first dynamic range based on the minimum signal value and determines the maximum value of the first dynamic range based on the maximum signal value. Therefore, it can be classified in combination with the actual image content, thereby improving the accuracy of the determined filter category.
[0142] The following embodiment describes the second dynamic range based on any of the above embodiments.
[0143] In one possible implementation, the number of preset ranges is N, where N is an integer not less than 1. That is, the number of preset ranges can be one, two or more, and can be set as needed, and is not limited here. Specifically, when N ≥ 2, any two preset ranges among the N preset ranges may have different numerical values. Optionally, when N ≥ 2, M preset ranges may be the maximum range, NM preset ranges may be smaller than the maximum range, and M may be a natural number smaller than 2. Optionally, if N ≥ 3, any two preset ranges among the NM preset ranges may not have the same numerical value.
[0144] It should be noted that if N is 1, that is, there is one preset range, then the one preset range is smaller than the maximum range. If N ≥ 2, that is, at least one of the N or more preset ranges is smaller than the maximum range, that is, some or all of the N or more preset ranges are smaller than the maximum range.
[0145] In a possible implementation, if there is only one preset range, the preset range may be used as the second preset range.
[0146] In this embodiment, by presetting a preset range, the target category can be directly determined based on the preset range, which can improve the efficiency of determining the target category and further improve the coding efficiency.
[0147] In another possible implementation, optionally, if N ≥ 2, that is, when the preset range is more than two, the second dynamic range can be selected from N preset ranges, wherein M preset ranges among the N preset ranges are the maximum range, and NM preset ranges among the N preset ranges are smaller than the maximum range; wherein M is a natural number less than 2.
[0148] Exemplarily, the N preset ranges are as follows:
[0149] [l0,h0],[l1,h1],…,[l n-1 , h n-1 ], each interval is different from each other, and at most one dynamic range is the maximum dynamic range that can be represented by the signal bit width, and the remaining dynamic ranges are sub-intervals of the maximum dynamic range that can be represented by the signal bit width, then one of the N preset ranges can be selected as the second dynamic range, that is, one of the following N preset ranges:
[0150] [l0,h0],[l1,h1],…,[l n-1 , h n-1 ].
[0151] In this embodiment, by presetting at least two preset ranges, different preset ranges can be selected according to different situations, thereby improving the flexibility and accuracy of the selected preset ranges, thereby improving the accuracy of determining the target category, and thus improving the video encoding and decoding efficiency.
[0152] The following embodiment further illustrates the case where the target range includes at least one of the first dynamic range or the second dynamic range based on any of the above embodiments.
[0153] In a possible implementation, when the target range includes a first dynamic range and a second dynamic range, the target range may be the union of the first dynamic range and the second dynamic range, or the intersection of the first dynamic range and the second dynamic range. This can be selected based on actual needs and is not limited here.
[0154] It can be understood that by combining the first dynamic range determined by pixel information and the second dynamic range determined based on the preset range, the determined target range takes into account more dimensions, and the target range is more accurate, further improving the accuracy of ALF classification.
[0155] Based on any of the above embodiments, the following embodiments further explain how to determine the target category based on the target range, how to determine the target category based on the intermediate information, how to determine the target category based on the category subset, and how to determine the target category based on the target range, intermediate information and category subset.
[0156] First, the target category is determined based on the target range for further explanation.
[0157] In a possible implementation, the target category may be determined by referring to the following formula 2-17.
[0158] Among them, input represents the information used for classification, range min ,range max They represent the minimum and maximum values of the true dynamic range respectively, and total_number represents the total number of categories of the corresponding classifier.
[0159] Optionally, the input information may be determined based on the signal value of each pixel in the image data, for example, the sum of the signal values of each pixel in the image data.
[0160] Next, the determination of the target category based on the intermediate information is further explained.
[0161] In a possible implementation, the target category may be determined by referring to the above formula 2-17.
[0162] In this embodiment, the input information for classification includes intermediate information. min ,range max They may represent the minimum value and the maximum value of the true dynamic range, or they may represent the minimum value and the maximum value of the maximum range, which is not limited here.
[0163] In addition, the determination of the target category based on the category subset is further described.
[0164] In a possible implementation, referring to the above formulas 2-17, the subcategory corresponding to each classifier in the classifier group may be determined respectively, and then the target category may be determined from L preset categories based on at least two subcategories.
[0165] Where L is the product of the number of categories corresponding to each classifier in the classifier group. In this embodiment, after combining at least two classifiers, the number of categories corresponding to the classifier group increases exponentially. Compared to a single classifier, this embodiment can select a target category from a more detailed L of preset categories, thereby improving the accuracy of the determined target category and enhancing video quality.
[0166] For example, assuming that a first classifier and a second classifier are currently provided, the number of categories corresponding to the first classifier is a, and the number corresponding to the second classifier is b. In the related art, the ALF classification can be determined using either the first classifier or the second classifier, that is, the determined ALF classification is one of a + b. However, this embodiment uses a classifier group to select a target classification from a*b = L preset classifications.
[0167] Specifically, each of the L preset categories in this embodiment is related to one of the categories corresponding to each classifier in the classifier group, and the number of preset categories corresponding to the classifier group obtained by the permutation and combination is the product of the number of categories corresponding to each classifier in the classifier group.
[0168] Optionally, the target filter coefficient corresponding to each preset category in the L preset categories may be related to the filter coefficient corresponding to one of the categories of each classifier. For example, the target filter coefficient corresponding to the fifth preset category in the L preset categories is respectively related to the filter coefficient corresponding to the first preset category in the first classifier and the filter coefficient corresponding to the second preset category in the second classifier. Exemplarily, it may be the average of the filter coefficient corresponding to the first preset category and the filter coefficient corresponding to the second preset category in the second classifier, which is not limited here.
[0169] In a possible implementation, the subcategory is represented by a category index, and a subcategory is a category in the category range corresponding to a classifier;
[0170] Determining a target category of an adaptive loop filter corresponding to the image data based on the information used for classification includes:
[0171] Based on the index of each subcategory in the category subset, the category index classIdx of the target category is determined by the following expression:
[0172] classIdx=(n1*n2*…*n k-1)*classIdx0+(n2*…*n k-1 )*classIdx1+…
[0173] +classIdx k-1 (2-18)
[0174] Where k represents the number of classifiers included in the classifier group, n k-1 Indicates the number of categories corresponding to the k-th classifier, classIdx k-1 Represents the index of the subcategory corresponding to the k-th classifier in the category subset.
[0175] In this embodiment, the category indexes in the L preset categories can be defined in the following manner:
[0176] You can first select one of the k classifiers as the current classifier, and keep the category index corresponding to each of the remaining k-1 classifiers the same. Then, the category index corresponding to the current classifier is used to define the category index in the L preset categories. Then, the current classifier is replaced, and the category index in the L preset categories is continued to be defined until any classifier among the k classifiers is polled as the current classifier.
[0177] For example, let's take k classifiers including a first classifier and a second classifier as an example. Assuming that the first classifier corresponds to 3 categories and the second classifier corresponds to 2 categories, the classifier group corresponds to 6 categories. The category index definition of the 6 categories can be as follows:
[0178] The 1st subclass index of the first classifier and the 1st subclass index of the second classifier define the 1st class index of the classifier group, the 1st subclass index of the first classifier and the 2nd subclass index of the second classifier define the 2nd class index of the classifier group, the 2nd subclass index of the first classifier and the 1st subclass index of the second classifier define the 3rd class index of the classifier group, the 2nd subclass index of the first classifier and the 2nd subclass index of the second classifier define the 4th class index of the classifier group, the 3rd class index of the first classifier and the 1st subclass index of the second classifier define the 5th class index of the classifier group, and the 3rd class index of the first classifier and the 2nd subclass index of the second classifier define the 6th class index of the classifier group.
[0179] At this point, the final category index of the combined classifier can be:
[0180] classIdx=25*classIdx0+classIdx1
[0181] Here, x0 and x1 represent the subcategory index corresponding to the first classifier and the subcategory index corresponding to the second classifier, respectively.
[0182] The technical solution of this embodiment can quickly determine the category index of the target category in L preset categories through the category index corresponding to each classifier in the k classifiers, which can improve the efficiency of determining the ALF category and thus improve the compression efficiency.
[0183] In addition, it is further explained by determining the target category based on the target range, intermediate information and category subsets.
[0184] In a possible implementation, for each classifier in the classifier group, the subcategory corresponding to each classifier can be determined by the above formula, and then the subcategory corresponding to each classifier can be used to determine the target category.
[0185] Specifically, assuming that the information used for classification includes two of the target range, intermediate information, or category subset, the information used for classification that is not included can refer to the description of the prior art and will not be described in detail here.
[0186] It can be understood that, generally speaking, the more specific information included in the information used for classification, the more accurate the corresponding ALF classification.
[0187] It should be noted that the methods of the above embodiments may be executed by default, that is, the encoder and decoder will execute the methods of the embodiments of the present application by default. In addition, the classification information used in the method for executing video encoding and decoding may also be pre-defined, such as specifying which information from the target range, intermediate information, or category subset to use for classification.
[0188] In one possible implementation, the method of the embodiment of the present application further includes at least one of the following:
[0189] Using the target category as an adaptive loop filter category corresponding to a first image, where the first image is a sub-image in the image data;
[0190] The target category is used as the adaptive loop filter category corresponding to the second image, and the image data is a sub-image of the second image;
[0191] The target category is used as the adaptive loop filter category corresponding to the third image. The third image and the image data are located in the same image, and the third image and the image data have the same size.
[0192] In this embodiment, after determining the target category corresponding to the image data, the target category can optionally be used as the ALF category corresponding to a first sub-image in the image data. Alternatively, the target category can be used as the ALF category corresponding to a second sub-image including the image data. Alternatively, the target category can be used as the ALF category corresponding to a third sub-image in the same sub-image as the image data.
[0193] It is understandable that at least one of the above situations can be selected for setting as needed, and no specific limitation is made here.
[0194] The technical solution of this embodiment, after calculating the target category corresponding to the image data, uses the target category as the adaptive loop filter category corresponding to the first image, where the first image is a sub-image in the image data; and / or uses the target category as the adaptive loop filter category corresponding to the second image, where the image data is a sub-image of the second image; and / or uses the target category as the adaptive loop filter category corresponding to the third image, where the third image and the image data are located in the same image and have the same image size as the image data. This can improve the efficiency of determining the ALF category, thereby improving encoding and decoding efficiency.
[0195] Please refer to Figures 6-8. Figure 6 is a schematic diagram of a comparison between image data and a first image provided in an embodiment of the present application. Figure 7 is a schematic diagram of a comparison between image data and a second image provided in an embodiment of the present application. Figure 8 is a schematic diagram of a comparison between image data and a third image provided in an embodiment of the present application.
[0196] The ALF category corresponding to the first image shown in FIG6 may be the same as the target category. The ALF category corresponding to the second image shown in FIG7 may be the same as the target category. The ALF category corresponding to the third image shown in FIG8 may be the same as the target category.
[0197] The technical solution of this embodiment, after determining the target category corresponding to the image data, uses the target category as the ALF category of other images related to the image data. In this way, the ALF classification of other images related to the image data can be determined without executing the process of determining the target category, which can improve the efficiency of determining the ALF classification and thus improve the efficiency of encoding and decoding.
[0198] It should be noted that in some example situations, there is no need to use an adaptive loop filter, or there is no need to use the method of the embodiment of the present application for classification. If classification is still performed according to the method of the embodiment of the present application at this time, the flexibility of the process of determining the target category is not high, and both the decoding end and the encoding end will perform some unnecessary processing.
[0199] Therefore, the following embodiments further illustrate how to improve the flexibility of the video encoding and decoding method based on any of the above embodiments.
[0200] Please refer to Figure 9, which is a flowchart of another video encoding and decoding method provided by an embodiment of the present application. The method shown in Figure 9 includes:
[0201] S910: The encoding end determines whether to use an adaptive loop filter.
[0202] How to determine whether to use the adaptive loop filter can be set as needed and is not limited here. In this embodiment, if the adaptive loop filter is used, it means that the process of determining the target category needs to be performed, so step S920 can be performed.
[0203] S920: The encoding end obtains information for classification corresponding to the image data.
[0204] It should be noted that the information used for classification in this embodiment can be the information used for ALF classification in related technologies, such as the maximum range, etc., or it can be the information used for classification mentioned in the embodiments of this application, which is not limited here.
[0205] If the information used for classification includes at least one of the target range, intermediate information, or category subset, the information used for classification may refer to the description of any of the above embodiments and will not be elaborated herein.
[0206] S930: The encoder determines a target category of an adaptive loop filter corresponding to the image data based on the classification information.
[0207] S940: The encoder sends a code stream corresponding to the image data to the decoder, where the code stream includes decoding instruction information.
[0208] The code stream may be obtained after the encoding end encodes the image data. The decoding indication information may indicate whether the decoding end performs a process of determining the target category, etc., which is not limited here.
[0209] S950: The decoding end determines whether to use an adaptive loop filter based on the decoding indication information.
[0210] In this embodiment, if the decoding end determines to use the adaptive loop filter based on the decoding indication information, step S960 is executed.
[0211] S960: The decoding end obtains information for classification corresponding to the image data;
[0212] In this embodiment, generally speaking, the information used for classification obtained by the decoding end and the information obtained by the encoding end are the same.
[0213] S970: The decoding end determines a target category of the adaptive loop filter corresponding to the image data based on the information used for classification.
[0214] The technical solution of this embodiment determines whether an adaptive loop filter is required at the encoder end. When the encoder determines that an adaptive loop filter is required, it obtains classification information corresponding to the image data and sends a bitstream including decoding indication information to the decoder end. After receiving the bitstream, the decoder end can determine whether an adaptive loop filter is required based on the decoding indication information and, when the decoder determines that an adaptive loop filter is required, execute the target classification determination process (i.e., the video encoding and decoding method described above). The decoder end can choose to enable or disable the target classification determination process as needed, thereby improving the flexibility of ALF classification.
[0215] In a possible implementation manner, the decoding indication information includes at least one of first indication information, second indication information, third indication information, fourth indication information, fifth indication information, or sixth indication information.
[0216] The first indication information may indicate whether to use an adaptive loop filter. In this embodiment, the encoder may determine whether to use an adaptive loop filter, and then send the first indication information to the decoder based on the determination result of whether to use the adaptive loop filter. The decoder may then simultaneously use or not use the adaptive loop filter, and then determine whether to perform the ALF target category determination process.
[0217] In this embodiment, the first indication information can improve the flexibility of whether to execute the ALF process of determining the target category.
[0218] The second indication information may indicate the classification information used in the process of determining the target category. In this embodiment, the encoder can select one or more items of the classification information to use as needed, and then notify the decoder via the second indication information. The decoder can then use the classification information used by the encoder when performing the process of determining the target category.
[0219] It should be noted that the second indication information can implicitly inform the decoder of the information used for classification, for example, implicitly informing the decoder whether to use a target range, intermediate information, or a category subset. The decoder can then calculate the specific target range, intermediate information, and category subset according to the above embodiment. Furthermore, the second indication information can explicitly inform the decoder of the specific target range, intermediate information, or category subset used. For example, explicitly informing the decoder that the target range used is 64-940. The decoder can then omit the calculation process of the information used for classification and directly use the explicit classification information for ALF classification.
[0220] In this embodiment, by explicitly notifying the decoding end of the classification information used, the encoding and decoding efficiency can be improved.
[0221] The third indication information indicates executing a process for determining a target category. The target level includes at least one of an image sequence level, an image level, or a sub-image level. The image sequence level indicates that the process for determining the target category is executed in units of at least two frames of images. The image level indicates that the process for determining the target category is executed in units of one frame of image. The sub-image level indicates that the process for determining the target category is executed in units of sub-images in one frame of image. The sub-image level includes at least one of a slice level, a tile level, or a block level.
[0222] In this embodiment, the encoder can determine the target level at which the process of determining the target category needs to be performed, as needed, such as performing the process of determining the target category at the image sequence level, performing the process of determining the target category at the image level, performing the process of determining the target category at the slice level, performing the process of determining the target category at the tile level, or performing the process of determining the target category at the block level. The encoder can then inform the decoder of the target level at which the encoder performs the process of determining the target category, so that the encoder and decoder can perform the process of determining the target category at the same target level.
[0223] It will be appreciated that, in this embodiment, the level corresponding to the specific classification information indicated by the second indication information may be the same as or different from the level at which the decoding end performs the target category determination process indicated by the third indication information. For example, the third indication information may instruct the decoding end to perform the target category determination process at the sub-image level, while the second indication information may indicate the specific target range corresponding to the sub-image level or the image level, without limitation herein.
[0224] In this embodiment, the target level of the process of determining the target category is indicated by the third indication information, which can improve the flexibility of the level applicable to the adaptive loop filtering classification.
[0225] The fourth indication information indicates a target sub-image in a frame image for executing the process of determining the target category, and the target sub-image is at least one of the sub-images divided into the frame image. In this embodiment, the frame image can be divided into multiple sub-images.
[0226] In some example situations, the important content of a video is generally located in the middle of the video image. Therefore, a partial sub-image of a frame of image may be selected to perform the process of determining the target category.
[0227] In this embodiment, the encoder can determine the target sub-image in each frame that requires adaptive loop filtering and perform the target category determination process for this target sub-image. The encoder can then notify the encoder via fourth indication information, so that the decoder can also be informed of the target sub-image and perform the target category determination process for this target sub-image. Optionally, the target sub-image in this embodiment can reflect the main content of a frame.
[0228] In this embodiment, the fourth indication information indicates the target sub-image in a frame image for executing the process of determining the target category, and some sub-images of a frame image can be selected to execute the process of determining the target category, thereby taking into account both video quality and encoding and decoding efficiency.
[0229] The fifth indication information indicates the size of a sub-image in a frame of image for performing the process of determining the target category.
[0230] In some cases, if the size is too large or too small, it will have a certain impact on the filtering effect, and thus have a certain impact on the encoding and decoding efficiency and video quality of the video codec. Therefore, sub-images of different sizes can be selected for adaptive loop filtering according to actual conditions.
[0231] In this embodiment, the encoder can determine the target size of the sub-image for adaptive loop filtering as needed, and then perform the target category determination process for the sub-image of the target size. The encoder can then inform the decoder of the target size via fifth indication information, allowing the decoder to also know the target size and perform the target category determination process for the sub-image of the target size. Optionally, the sub-image of the target size can reflect the main content of a frame of image. Optionally, the size can include shape and size, etc.
[0232] In this embodiment, the size of the sub-image for executing the process of determining the target category in a frame of image is indicated by the fifth indication information, and the size of the sub-image for executing the process of determining the target category can be selected, thereby taking into account both video quality and encoding and decoding efficiency.
[0233] The sixth indication information indicates the number of images in the image sequence for performing the process of determining the target category.
[0234] In some exemplary scenarios, within a video, the content differences between some consecutive image frames are generally small, while the content differences between some consecutive image frames are large. Therefore, at least two frames in the image sequence used to perform the object classification process may have a certain impact on video quality. Therefore, the number of images in the image sequence used to perform the object classification process can be selected based on actual circumstances.
[0235] In this embodiment, the encoder can, as needed, determine at least two frames of images for performing the target category determination process, form an image sequence with these at least two frames of images, and then perform the target category determination process on the image sequence. The decoder can then be notified of this information via sixth indication information, so that the decoder can also perform the target category determination process on the image sequence using the same image sequence. Optionally, the image sequence can include at least two frames of images with minimal content differences.
[0236] For example, if the encoder considers the first, second, and third frames as a set of image sequences, the encoder may send sixth indication information indicating that the number of images is 3. In this case, the decoder may count from the first frame of the bitstream to the third frame. Then, if the encoder considers the fourth and fifth frames as a set of image sequences, the encoder may send sixth indication information indicating that the number of images is 2. In this case, the decoder may count from the fourth frame of the bitstream to the fifth frame.
[0237] In this embodiment, the sixth indication information indicates the number of images in the image sequence for performing the process of determining the target category, thereby improving the video quality.
[0238] It is understandable that if the decoding end receives one of the second indication information, the third indication information, the fourth indication information, the fifth indication information and the sixth indication information, it indicates that the video encoding and decoding needs to use an adaptive loop filter.
[0239] For ease of understanding, the following embodiments are respectively directed to the target range, the intermediate range, and the classification subset, in combination with the technical solution of decoding indication information.
[0240] First, the technical solution for combining the target range with the decoding indication information is described. In the following examples, the target range may also be referred to as the true dynamic range.
[0241] This embodiment proposes using the true dynamic range during ALF classification. The so-called true dynamic range means that the dynamic range of the classified content does not necessarily match the maximum range that can be represented by the signal bit width. For example, for a signal with a 10-bit bit width, the maximum range that can be represented is 0-1023. The true dynamic range of a certain content segment is a subset of this maximum range.
[0242] In embodiment 1.1, the true dynamic range is generated by analyzing the content to be classified, which may be from an image sequence, a frame, a slice, a tile, or a block.
[0243] In embodiment 1.1.1, the real dynamic range is generated by the content of the entire video sequence. By analyzing the entire image sequence, the minimum and maximum values of the sequence signal values are found and used as the real dynamic range for ALF classification of the image sequence.
[0244] In embodiment 1.1.2, the real dynamic range is generated by the content of a frame. By analyzing the content of a frame of image, the minimum and maximum values of the image signal are found and used as the real dynamic range for ALF classification of the frame content.
[0245] In embodiment 1.1.3, the real dynamic range is generated by the content of a slice. By analyzing the image content of a slice, the minimum and maximum signal values within the slice are found and used as the real dynamic range for ALF classification of the slice content.
[0246] In embodiment 1.1.4, the real dynamic range is generated by the content of a tile. By analyzing the image content of a tile, the minimum and maximum signal values within the tile are found and used as the real dynamic range for ALF classification of the tile content.
[0247] In Example 1.1.5, the true dynamic range is determined by the content of a block. By analyzing the image content within a block, the minimum and maximum signal values within the block are found, which serve as the true dynamic range for ALF classification of the block. Block sizes can be 256x256, 128x128, 64x64, 32x32, and so on.
[0248] In embodiment 1.2, the real dynamic range used for ALF classification is an interval predefined at both the encoding end and the decoding end, and the interval is a sub-interval of the maximum dynamic range that can be represented by the signal bit width.
[0249] In Example 1.2.1, the real dynamic range may use the dynamic range specified by ITU-R BT.2020, that is, for content represented by a 10-bit bit width, the effective dynamic range is [64,940].
[0250] In Example 1.3, whether to use the true dynamic range during ALF classification needs to be transmitted at the HLS (i.e., VPS, SPS, PPS, APS, Picture Header, Slice Header) or block level (i.e., 256x256, 128x128, 64x64, 32x32, etc.).
[0251] In embodiment 1.4, the real dynamic range used in ALF classification is transmitted to the decoding end along with the ALF filter bank. When the filter bank is selected for ALF filtering, the corresponding real dynamic range is used for classification.
[0252] In Example 1.5, the actual dynamic range used in ALF classification needs to be transmitted at the HLS (i.e., VPS, SPS, PPS, APS, Picture Header, Slice Header) or block level (i.e., 256x256, 128x128, 64x64, 32x32, etc.).
[0253] In embodiment 1.6, when a switch with multiple levels of real dynamic range is used in ALF classification, the switch of each level needs to be explicitly transmitted to the decoding end.
[0254] In Example 1.6.1, when whether to use the true dynamic range in ALF classification can be determined at the block level of different sizes (e.g., at the block level of 256x256, 128x128, 64x64, and 32x32), the optimal block-level switch size needs to be transmitted to the decoder.
[0255] In Example 1.6.2, when whether to use the true dynamic range in ALF classification can be determined at both the non-block level (sequence level, frame level, slice level, tile level, etc.) and the block level (256x256, 128x128, 64x64, 32x32, etc.), it is necessary to first transmit a flag indicating whether it is a block-level switch (or non-block-level switch). If the flag is true, then the optimal block-level switch size (or optimal non-block-level switch level) is further transmitted. Otherwise, if it is a non-block-level switch (or block-level switch), the optimal non-block-level switch level (or optimal block-level switch size) is further transmitted.
[0256] In embodiment 1.7, when the real dynamic range used in ALF classification can be generated by multiple levels of content, whether each level of content is used to generate the real dynamic range needs to be explicitly transmitted to the decoding end.
[0257] In Example 1.7.1, when the true dynamic range used in ALF classification can be generated by block-level content of different sizes (for example, it can be generated by block-level content of four different sizes: 256x256, 128x128, 64x64, and 32x32), the optimal block-level size needs to be transmitted to the decoder.
[0258] In Example 1.7.2, when the true dynamic range used in ALF classification can be generated at both the non-block level (sequence level, frame level, slice level, tile level, etc.) and the block level (256x256, 128x128, 64x64, 32x32, etc.), it is necessary to first transmit a flag indicating whether block-level content generation (or non-block-level content generation) is used. If the flag is true, the optimal block-level size (or optimal non-block-level level) is further transmitted. Otherwise, non-block-level content generation (or block-level content generation) is used, and the optimal non-block-level level (or optimal block-level size) is further transmitted.
[0259] In embodiment 1.8, when multiple real dynamic ranges predefined at both the encoding end and the decoding end can be used for ALF classification, the best real dynamic range needs to be transmitted to the decoding end.
[0260] In Example 1.8.1, when n predefined real dynamic ranges are used in ALF classification, the dynamic ranges are [l0,h0], [l1,h1],…, [l n-1 ,h n-1 Each interval is unique, and at most one dynamic range is the maximum dynamic range that can be represented by the signal bit width. The remaining dynamic ranges are sub-intervals of the maximum dynamic range that can be represented by the signal bit width. The encoder selects the optimal true dynamic range through comparison and transmits it to the decoder.
[0261] In Example 1.9, when the true dynamic range is used for ALF classification, the final category is generated according to the following formula:
[0262] Among them, input represents the information used for classification, range min ,range max They represent the minimum and maximum values of the true dynamic range respectively, and total_number represents the total number of categories of the corresponding classifier.
[0263] In Example 1.9.1, a true dynamic range classifier is used to classify a single sample. The classifier classifies each sample and generates a corresponding category. In this case, the information of the single sample serves as the input of the classifier.
[0264] In Example 1.9.2, a true dynamic range classifier is used to classify sub-blocks. This classifier classifies each N×N sub-block (e.g., 2×2, 4×4, etc.), with all samples (pixels) within the sub-block using the same category. In this case, information about an M×M region (where M ≥ N) encompassing the N×N sub-block is used as input to the classifier, and the true dynamic range needs to be modified to the true dynamic range corresponding to the M×M region.
[0265] Next, a technical solution for combining intermediate information with decoding instruction information is described.
[0266] In this embodiment, the ALF classification uses the intermediate information generated by other encoding and decoding processes as the input of the classifier for classification. The so-called intermediate information generated by the encoding and decoding process refers to other information in addition to the information currently used by the ALF classifier.
[0267] In embodiment 2.1, the reconstructed component before the deblocking filter is used as the input of the classifier for classification.
[0268] In embodiment 2.2, the reconstructed component before the deblocking filter that has been filtered by a fixed filter is used as the input of the classifier for classification. This method first requires filtering the reconstructed component before the deblocking filter using a fixed filter, and then using the filtered output for classification.
[0269] In embodiment 2.3, the current signal to be processed, which has been filtered by a fixed filter, is used as the input of the classifier for classification. This method first requires filtering the current signal to be processed using a fixed filter, and then using the filtered output for classification.
[0270] In embodiment 2.4, whether to use the intermediate information generated by other encoding and decoding processes for classification during ALF classification needs to be transmitted at the HLS (i.e., VPS, SPS, PPS, APS, Picture Header, Slice Header) or block level (i.e., 256x256, 128x128, 64x64, 32x32, etc.).
[0271] It can be understood that the classifier proposed in this embodiment that uses intermediate information generated by other encoding and decoding processes for classification can be applied to a single sample or to the block level (for example, 2x2, 4x4, etc.), and all samples in the block use the same category.
[0272] The classification using the intermediate information generated by other encoding and decoding processes proposed in this embodiment is applicable to any process of determining the target category, and only the corresponding intermediate information needs to be used as the input of the classifier.
[0273] In addition, a technical solution for combining category subsets with decoding indication information is described.
[0274] In this embodiment, a combined classifier combining multiple individual classifiers is used for ALF classification. The combined classifier can be any classifier, such as the gradient-based classifier used in 2.1.1 and 2.1.2, the 2x2 block-based classifier, the residual component-based classifier, etc.
[0275] Assume that there are k separate classifiers (classifier0, classifier1, ..., classifier k-1 ) are combined into a classifier, and the number of categories corresponding to each individual classifier is n0, n1, ..., n k-1 The final category index of the combined classifier is generated as follows:
[0276] classIdx=(n1*n2*…*n k-1 )*classIdx0+(n2*…*n k-1 )*classIdx1+…+classIdx k-1
[0277] Among them, classIdx0, classIdx1,…, classIdx k-1 The category index corresponding to each individual classifier.
[0278] Example 3.1: ALF classification is performed using a classifier that combines a gradient-based classifier and a sample-based classifier. In this example, there are two separate classifiers, each with n0 = 25 and n1 = 25 categories. The final category index of the combined classifier is:
[0279] classIdx=25*classIdx0+classIdx1
[0280] Whether to use a combined classifier when ALF classification needs to be transmitted at the HLS (i.e. VPS, SPS, PPS, APS, Picture Header, Slice Header) or block level (i.e. 256x256, 128x128, 64x64, 32x32, etc.).
[0281] The combined classifier proposed in the embodiment of the present application can be applied to a single sample or to the block level (eg, 2x2, 4x4, etc.), where all samples in the block use the same category.
[0282] Please refer to Figure 10, which is a schematic diagram of the structure of a video encoding and decoding device 100 provided in an embodiment of the present application. The video encoding and decoding device 100 shown in Figure 10 includes an information acquisition module 1010 and a classification module 1020, wherein:
[0283] An information acquisition module 1010 is configured to acquire information for classification of image data, wherein the information for classification includes at least one of a target range, intermediate information, or a category subset;
[0284] a classification module 1020, configured to determine, for the image data, a target category corresponding to the classification information, the target category indicating a category of an adaptive loop filter used in a coding and decoding process of the image data;
[0285] The target range includes at least one of a first dynamic range or a second dynamic range, the first dynamic range being a value range determined based on pixel information of the image data, and the second dynamic range being a preset range determined from one or more preset ranges, at least one of the preset ranges being smaller than a maximum range that can be represented by a signal bit width of the image data;
[0286] The intermediate information includes information generated during the encoding and decoding process of the image data;
[0287] The category subset includes at least two subcategories, and the at least two subcategories are categories of the image data respectively determined by each classifier in the classifier group.
[0288] In a possible implementation, a minimum value of the first dynamic range is determined based on a minimum signal value corresponding to the image data, and a maximum value of the first dynamic range is determined based on a maximum signal value corresponding to the image data.
[0289] In one possible implementation, the image data includes at least one of an original uncompressed signal, a reconstructed signal, a residual signal, or a predicted signal; and the minimum signal value and the maximum signal value are determined based on at least one of the original uncompressed signal, the reconstructed signal, the residual signal, or the predicted signal.
[0290] In a possible implementation, the second dynamic range is selected from N preset ranges, wherein M preset ranges among the N preset ranges are maximum ranges, and NM preset ranges among the N preset ranges are smaller than the maximum range;
[0291] Wherein, M is a natural number less than 2, and N≥2.
[0292] In one possible implementation, the classification module 1020 is further configured to perform at least one of the following:
[0293] Using the target category as an adaptive loop filter category corresponding to a first image, where the first image is a sub-image in the image data;
[0294] The target category is used as the adaptive loop filter category corresponding to the second image, and the image data is a sub-image of the second image;
[0295] The target category is used as the adaptive loop filter category corresponding to the third image. The third image and the image data are located in the same image, and the third image and the image data have the same size.
[0296] In one possible implementation, the intermediate information includes at least one of the following:
[0297] a reconstructed signal before being filtered by a deblocking filter, wherein the reconstructed signal includes a reconstructed signal after being filtered by a fixed filter or a reconstructed signal not filtered by a fixed filter;
[0298] The signal to be processed is filtered by the fixed filter, and the signal to be processed includes a brightness signal.
[0299] In one possible implementation, the information used for classification includes a category subset; the target category is determined from L preset categories based on at least two subcategories, where L is the product of the number of categories corresponding to each classifier in the classifier group.
[0300] In a possible implementation, the subcategory is represented by a category index, and a subcategory is one of the multiple categories corresponding to a classifier;
[0301] Determining a target category of an adaptive loop filter corresponding to the image data based on the information used for classification includes:
[0302] Based on the index of each subcategory in the category subset, the category index classIdx of the target category is determined by the following expression:
[0303] classIdx=(n1*n2*…*n k-1 )*classIdx0+(n2*…*n k-1 )*classIdx1+…+classIdx k-1
[0304] Where k represents the number of classifiers included in the classifier group, n k-1 Indicates the number of categories corresponding to the k-th classifier, classIdx k-1 Represents the index of the subcategory corresponding to the k-th classifier in the category subset.
[0305] In a possible implementation, the video coding and decoding apparatus 100 is applied to an encoding end, and the video coding and decoding apparatus 100 is further used to determine whether to use an adaptive loop filter;
[0306] If it is determined to use the adaptive loop filter, a process for determining the target category is performed, and a code stream corresponding to the image data is sent to the decoding end, where the code stream includes decoding indication information, where the decoding indication information includes at least one of first indication information, second indication information, third indication information, fourth indication information, fifth indication information, or sixth indication information;
[0307] The first indication information indicates whether to use an adaptive loop filter;
[0308] The second indication information indicates information used for classification;
[0309] The third indication information indicates a target level of a process for determining the target category, where the target level includes at least one of a sequence level, a frame level, a slice level, a tile level, or a block level;
[0310] The fourth indication information indicates a target sub-image in a frame of image for executing the video encoding and decoding method, where the target sub-image is at least one of the sub-images divided from the frame of image;
[0311] The fifth indication information indicates the size of a sub-image in a frame of image for executing the video encoding and decoding method;
[0312] The sixth indication information indicates the number of images in an image sequence for performing the video encoding and decoding method.
[0313] In a possible implementation, the video encoding and decoding apparatus 100 is applied to a decoding end, and the video encoding and decoding apparatus 100 is further configured to receive a bit stream, where the bit stream includes decoding indication information;
[0314] If it is determined based on the decoding indication information that an adaptive loop filter is used, the above-mentioned video encoding and decoding method is executed;
[0315] The decoding indication information includes at least one of first indication information, second indication information, third indication information, fourth indication information, fifth indication information, or sixth indication information;
[0316] The first indication information indicates whether to use an adaptive loop filter;
[0317] The second indication information indicates information used for classification;
[0318] The third indication information indicates determining a target level for the target category, where the target level includes at least one of a sequence level, a frame level, a slice level, a tile level, or a block level;
[0319] The fourth indication information indicates a target sub-image in a frame of image for executing the video encoding and decoding method, where the target sub-image is at least one of the sub-images divided from the frame of image;
[0320] The fifth indication information indicates the size of a sub-image in a frame of image for executing the video encoding and decoding method;
[0321] The sixth indication information indicates the number of images in an image sequence for performing the video encoding and decoding method.
[0322] The video coding and decoding apparatus 100 of this embodiment can execute the steps of adaptive loop filtering classification shown in the aforementioned embodiments of this application. The implementation principles are similar and will not be repeated here.
[0323] The beneficial effects of the apparatus 100 for video coding in video coding can be found in the description of the video coding method above, which also applies to the description of the effects of the electronic device, computer-readable storage medium, and computer program product below.
[0324] An embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, and the processor executes the above computer program to implement the steps of the method of any of the above embodiments.
[0325] In an optional embodiment, an electronic device is provided, as shown in FIG11 , and the electronic device 1100 shown in FIG11 includes: a processor 1101 and a memory 1103. The processor 1101 and the memory 1103 are connected, such as through a bus 1102. Optionally, the electronic device 1100 may further include a transceiver 1104, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 1104 is not limited to one, and the structure of the electronic device 1100 does not constitute a limitation on the embodiments of the present application.
[0326] Processor 1101 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 1101 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0327] Bus 1102 may include a path for transmitting information between the aforementioned components. Bus 1102 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, for example. Bus 1102 may be divided into an address bus, a data bus, a control bus, and so on. For ease of illustration, FIG11 shows only one thick line, but this does not indicate that there is only one bus or only one type of bus.
[0328] The memory 1103 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation here.
[0329] The memory 1103 is used to store the computer program for executing the embodiments of the present application, and the execution is controlled by the processor 1101. The processor 1101 is used to execute the computer program stored in the memory 1103 to implement the steps shown in the above method embodiments.
[0330] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0331] An embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.
[0332] It will be appreciated that, although the flowcharts of the embodiments of the present application indicate each operating step by arrows, the order of implementation of these steps is not limited to the order indicated by the arrows. Unless otherwise clearly stated herein, in some implementation scenarios of the embodiments of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. Under different scenarios at the execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiments of the present application do not limit this.
[0333] The terms "first", "second", etc. in the claims, specification and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or electronic device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or electronic devices. Mentioning "embodiments" in this article means that the specific features, structures or characteristics described in conjunction with the embodiments may be included in at least one embodiment of the present application. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein may be combined with other embodiments. The term "and / or" used in this application specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0334] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the above description generally describes the components and steps of each example according to their functions. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0335] The above disclosure is only a preferred embodiment of the present application and cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
[0336] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
Claims
1. A video encoding and decoding method, comprising: Acquiring information for classification of the image data, wherein the information for classification includes at least one of a target range, intermediate information, or a category subset; determining, for the image data, a target category corresponding to the information for classification, the target category indicating a category of an adaptive loop filter used for encoding and decoding of the image data; The target range includes at least one of a first dynamic range or a second dynamic range, the first dynamic range is a value range determined based on pixel information of the image data, the second dynamic range is a preset range determined from one or more preset ranges, and at least one of the preset ranges is smaller than a maximum range that can be represented by a signal bit width of the image data; The intermediate information includes information generated by the encoding and decoding process of the image data; The category subset includes at least two subcategories, and the at least two subcategories are categories of the image data respectively determined by each classifier in the classifier group. 2 . The method according to claim 1 , wherein the level of the image data is one of a sequence level, a frame level, a slice level, a tile level or a block level.
3. According to the method of claim 1 or 2, a minimum value of the first dynamic range is determined based on a minimum signal value of the image data, and a maximum value of the first dynamic range is determined based on a maximum signal value of the image data.
4. The method according to claim 3, wherein the image data comprises at least one of an original uncompressed signal, a reconstructed signal, a residual signal or a predicted signal; The minimum signal value and the maximum signal value are determined based on at least one of the original uncompressed signal, the reconstructed signal, the residual signal, or the predicted signal.
5. The method according to any one of claims 1 to 4, wherein the second dynamic range is selected from N preset ranges, wherein: M preset ranges among the N preset ranges are the maximum range, and NM preset ranges among the N preset ranges are smaller than the maximum range; Wherein, M is a natural number less than 2, and N≥2.
6. The method according to any one of claims 1 to 5, further comprising at least one of the following: Using the target category as a category of an adaptive loop filter corresponding to a first image, where the first image is a sub-image in the image data; Using the target category as the category of an adaptive loop filter corresponding to a second image, and the image data being a sub-image of the second image; or The target category is used as the category of an adaptive loop filter corresponding to a third image, the third image and the image data are located in the same image, and the third image and the image data have the same image size.
7. The method according to any one of claims 1 to 6, wherein the intermediate information comprises at least one of the following: a reconstructed signal before being filtered by a deblocking filter, wherein the reconstructed signal includes a reconstructed signal after being filtered by a fixed filter or a reconstructed signal not filtered by a fixed filter; The signal to be processed is filtered by a fixed filter, wherein the signal to be processed includes a brightness signal.
8. According to the method described in any one of claims 1-7, the information used for classification includes the category subset; the target category is determined from L preset categories based on the at least two subcategories, and L is the product of the number of categories corresponding to each classifier in the classifier group.
9. The method according to claim 8, wherein the subcategory is characterized by a category index, and a subcategory is a category in a category range of a classifier; The step of determining, for the image data, a target category corresponding to the information for classification comprises: Based on the indexes of each subcategory in the category subset, the category index classIdx of the target category is determined by the following expression: classIdx=(n1*n2*…*n k-1 )*classIdx0+(n2*…*n k-1 )*classIdx1+…+classIdx k-1 Where k represents the number of classifiers included in the classifier group, n k-1 Indicates the number of categories corresponding to the kth classifier, classIdx k-1 Represents the index of the subcategory corresponding to the kth classifier in the category subset.
10. The method according to any one of claims 1 to 9, performed at an encoding end, further comprising: determining whether to use an adaptive loop filter; If it is determined to use an adaptive loop filter, the video encoding and decoding method is executed, and a bit stream corresponding to the image data is sent to a decoding end, wherein the bit stream includes decoding indication information, and the decoding indication information includes at least one of first indication information, second indication information, third indication information, fourth indication information, fifth indication information, or sixth indication information; The first indication information indicates whether to use an adaptive loop filter; The second indication information indicates information used for classification; The third indication information indicates a target level for executing the video encoding and decoding method, where the target level includes at least one of a sequence level, a frame level, a slice level, a tile level, or a block level; The fourth indication information indicates a target sub-image in a frame of image for executing the video encoding and decoding method, and the target sub-image is at least one of the sub-images divided from the frame of image; The fifth indication information indicates the size of a sub-image in a frame of image for executing the video encoding and decoding method; The sixth indication information indicates the number of images in an image sequence for performing the video encoding and decoding method.
11. The method according to any one of claims 1 to 10, performed at a decoding end, further comprising: receiving a code stream, wherein the code stream includes decoding indication information; If it is determined to use an adaptive loop filter based on the decoding indication information, then executing the video encoding and decoding method; The decoding indication information includes at least one of first indication information, second indication information, third indication information, fourth indication information, fifth indication information or sixth indication information; The first indication information indicates whether to use an adaptive loop filter; The second indication information indicates information used for classification; The third indication information indicates a target level for executing the video encoding and decoding method, where the target level includes at least one of a sequence level, a frame level, a slice level, a tile level, or a block level; The fourth indication information indicates a target sub-image in a frame of image for executing the video encoding and decoding method, and the target sub-image is at least one of the sub-images divided from the frame of image; The fifth indication information indicates the size of a sub-image in a frame of image for executing the video encoding and decoding method; The sixth indication information indicates the number of images in an image sequence for performing the video encoding and decoding method.
12. A video encoding and decoding device, comprising: An information acquisition module, used to acquire information used for classification of the image data, wherein the information used for classification includes at least one of a target range, intermediate information, or a category subset; a classification module, configured to determine, for the image data, a target category corresponding to the information for classification, wherein the target category indicates a category of an adaptive loop filter used for encoding and decoding of the image data; The target range includes at least one of a first dynamic range or a second dynamic range, the first dynamic range is a value range determined based on pixel information of the image data, the second dynamic range is a preset range determined from one or more preset ranges, and at least one of the preset ranges is smaller than a maximum range that can be represented by a signal bit width of the image data; The intermediate information includes information generated by the encoding and decoding process of the image data; The category subset includes at least two subcategories, and the at least two subcategories are categories of the image data respectively determined by each classifier in the classifier group.
13. An electronic device comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 11.
14. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.
15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Method and device for for encoding and decoding video data, computer equipment and storage medium
CN112543335A
Method and system for reconstructing frame based on adaptive loop filtering, and storage medium
CN113132740A
Loop filtering method and device, equipment and storage medium
CN115412729A
An adaptive loop filter
GB201903187D0
Method and Apparatus of Cross-Component Adaptive Loop Filtering for Video Coding
US20220256145A1