WO2025190039A1 - 图像处理方法、装置、存储介质、电子设备及程序产品 - Google Patents
图像处理方法、装置、存储介质、电子设备及程序产品Info
- Publication number
- WO2025190039A1 WO2025190039A1 PCT/CN2025/077524 CN2025077524W WO2025190039A1 WO 2025190039 A1 WO2025190039 A1 WO 2025190039A1 CN 2025077524 W CN2025077524 W CN 2025077524W WO 2025190039 A1 WO2025190039 A1 WO 2025190039A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image block
- color component
- image
- area
- block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/105—Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/159—Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
Definitions
- the original audio and video data must be encoded at the data transmitter to form a compressed data stream. After the data stream is transmitted to the data receiver, it is decoded to restore the predicted and reconstructed audio and video data.
- the present application provides an image processing method, an image processing device, a computer-readable storage medium, an electronic device, and a computer program product, the purpose of which is to improve the efficiency and accuracy of video encoding and decoding.
- an embodiment of the present application provides an image processing method, performed by an electronic device, the method comprising:
- the reconstructed value of the first color component of the target area is mapped according to the mapping relationship between the first color component and the second color component to obtain a predicted value of the second color component of the second image block.
- an image processing device comprising:
- a determination module configured to determine, based on a position of the second image block in the current video frame, a coding region associated with the position in the at least one first image block as a target region;
- a prediction module configured to predict and obtain a reconstructed value of the first color component of the target area according to a preset prediction mode
- a mapping module is configured to map the reconstructed value of the first color component of the target area according to a mapping relationship between the first color component and the second color component in response to a preset prediction condition being met, so as to obtain a predicted value of the second color component of the second image block.
- an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the image processing method in the above technical solution when executed by a processor.
- an embodiment of the present application provides a computer program product, including a computer program, which is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs the image processing method in the above technical solution.
- FIG1 schematically shows a diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
- FIG2 schematically shows how a video encoding device and a video decoding device are placed in a streaming environment.
- FIG4 shows a flowchart of an image processing method in one embodiment of the present application.
- FIG5 is a schematic diagram showing a process of sampling color components of a current block in one embodiment of the present application.
- FIG6 schematically shows the division results of various block division modes.
- FIG. 7 shows image blocks obtained by performing image segmentation on luminance components and chrominance components using different segmentation tree structures in an application scenario.
- FIG8 shows a flowchart of fitting a prediction model for representing a mapping relationship between color components in one embodiment of the present application.
- FIG9 is a schematic diagram showing the relationship between a designated pixel point and neighboring pixel points in one embodiment of the present application.
- FIG11 shows a schematic diagram of a region template in which some sub-regions are combined into a reference region in one embodiment of the present application.
- FIG12 is a schematic diagram showing a region template of a reference region selected for a current block in one embodiment of the present application.
- FIG. 13 is a schematic diagram showing a method of selecting a sampling position based on the position coordinates of a pixel point in one embodiment of the present application.
- FIG14 is a schematic diagram showing a method of selecting sampling positions based on a round-trip scanning method in one embodiment of the present application.
- FIG15 shows a schematic diagram of selecting sampling positions based on the ZigZag scanning method in one embodiment of the present application.
- FIG16 shows a schematic diagram of a sampling window for downsampling the first color component in one embodiment of the present application.
- FIG18 schematically shows a structural block diagram of an electronic device suitable for implementing an embodiment of the present application.
- module 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.
- a processor or multiple processors or memories
- each module or unit can be part of an overall module or unit that includes the function of the module or unit.
- Video coding refers to the processing of a sequence of pictures to form a video or video sequence.
- picture In the field of video coding, the terms “picture”, “frame” or “image” can be used as synonyms.
- the video coding (coding) used in the embodiments of the present application represents video encoding (encoding) or video decoding (decoding).
- video encoding (encoding) is performed on the source side, including processing (for example, compressing) the original video image to reduce the amount of data required to represent the video image, thereby more efficiently storing and/or transmitting.
- Video decoding is performed on the destination side, and performs inverse processing relative to the encoder to reconstruct the video image.
- the "coding" of video frames involved in the embodiments of the present application can also be understood as “encoding” or "decoding" a video image sequence.
- the combination of the encoding part and the decoding part is also called encoding and decoding.
- each image in a video image sequence is divided into a set of non-overlapping blocks and encoded at the block level.
- the encoder side encodes the video, that is, at the block (also called image block or video block) level, including generating a prediction block through spatial (intra-image) prediction and temporal (inter-image) prediction, subtracting the prediction block from the current block (the currently processed block or the block to be processed) to obtain a residual block, and transforming and quantizing the residual block in the transform domain to reduce the amount of data to be transmitted (or to be compressed).
- the decoder side applies the inverse processing part relative to the encoder to the encoded or compressed block to reconstruct the current block.
- the encoder replicates the loop process on the decoder side, so that the encoder and decoder generate the same predicted (eg, intra-frame predicted and inter-frame predicted) blocks and/or reconstructed blocks for encoding subsequent blocks.
- predicted eg, intra-frame predicted and inter-frame predicted
- block refers to a portion of an image or frame.
- the current block refers to the block currently being processed.
- encoding it refers to the block currently being encoded
- decoding it refers to the block currently being decoded.
- FIG1 schematically shows a diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied.
- a system architecture 100 includes a plurality of terminal devices that can communicate with each other via, for example, a network 150.
- the system architecture 100 may include a first terminal device 110 and a second terminal device 120 interconnected via the network 150.
- the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission.
- the first terminal device 110 may encode video data (e.g., a video picture stream captured by the terminal device 110) for transmission to the second terminal device 120 via the network 150.
- the encoded video data is transmitted in the form of at least one encoded video stream.
- the second terminal device 120 may receive the encoded video data from the network 150, decode the encoded video data to restore the video data, and display the video picture based on the restored video data.
- the system architecture 100 may include a third terminal device 130 and a fourth terminal device 140, which can perform bidirectional transmission of encoded video data.
- the bidirectional transmission can occur during a video conference.
- each of the third terminal device 130 and the fourth terminal device 140 can encode video data (e.g., a video image stream captured by the terminal device) for transmission to the other of the third terminal device 130 and the fourth terminal device 140 via the network 150.
- Each of the third terminal device 130 and the fourth terminal device 140 can also receive the encoded video data transmitted by the other of the third terminal device 130 and the fourth terminal device 140, decode the encoded video data to recover the video data, and display the video image on an accessible display device based on the recovered video data.
- the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140 may be servers, personal computers, and smartphones, but the present application is not limited thereto.
- the embodiments disclosed herein are applicable to laptop computers, tablet computers, media players, and/or dedicated video conferencing equipment.
- Network 150 represents any number of networks for transmitting encoded video data between the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140, including, for example, wired and/or wireless communication networks.
- the communication network 150 may exchange data using circuit-switched and/or packet-switched channels.
- the network may include a telecommunications network, a local area network, a wide area network, and/or the Internet.
- FIG2 schematically illustrates the placement of a video encoding device and a video decoding device in a streaming environment.
- the subject matter disclosed herein is equally applicable to other video-enabled applications, including, for example, video conferencing, digital television, and storing compressed video on digital media such as CDs, DVDs, and memory sticks.
- the streaming system may include an acquisition subsystem 213, which may include a video source 201, such as a digital camera.
- the video source creates an uncompressed video picture stream 202.
- the video picture stream 202 includes samples captured by the digital camera.
- the video picture stream 202 is depicted as a thick line to emphasize the high data volume of the video picture stream.
- the video picture stream 202 may be processed by an electronic device 220.
- the electronic device 220 includes a video encoding device 203 coupled to the video source 201.
- the video encoding device 203 may include hardware, software, or a combination of hardware and software to implement or embody various embodiments as described in more detail below.
- the encoded video data 204 (or the encoded video code stream 204) is depicted as a thin line to emphasize the lower amount of data of the encoded video data 204 (or the encoded video code stream 204), which can be stored on the streaming server 205 for future use.
- At least one streaming client subsystem such as the client subsystem 206 and the client subsystem 208 in FIG. 2 , can access the streaming server 205 to retrieve the copies 207 and 209 of the encoded video data 204.
- the client subsystem 206 may include, for example, a video decoding device 210 in an electronic device 230.
- the video decoding device 210 decodes an incoming copy of the encoded video data 207 and outputs a video picture stream 211, which may be presented on a display 212 (e.g., a screen) or another presentation device.
- the encoded video data 204, video data 207, and video data 209 may be encoded according to some video encoding/compression standard.
- the electronic device 220 and the electronic device 230 may include other components not shown in the figure.
- the electronic device 220 may include a video decoding device
- the electronic device 230 may also include a video encoding device.
- HEVC High Efficiency Video Coding
- VVC Very Video Coding
- AVS Analog Video Coding Standard
- CTU Coding Tree Unit
- LCU Large Coding Unit
- FIG3 schematically shows a basic flow chart of a video encoder, in which intra-frame prediction is taken as an example for explanation.
- the original image signal s k [x,y] and the predicted image signal Perform difference operation to obtain the residual signal u k [x,y].
- the quantized coefficient is obtained.
- the quantized coefficient is entropy coded to obtain the encoded bit stream; on the other hand, the quantized coefficient is inversely quantized and inversely transformed to obtain the reconstructed residual signal u′ k [x,y].
- the predicted image signal Superimposed with the reconstructed residual signal u'k [x,y] to generate the image signal
- the image signal Input to the intra-frame mode decision module and the intra-frame prediction module for intra-frame prediction processing; on the other hand, the image signal Perform loop filtering and output the reconstructed image signal s'k [x,y].
- the reconstructed image signal s'k [x,y] can be used as the reference image for the next frame for motion estimation and motion compensation prediction. Then, based on the motion compensation prediction result s'r [x+ mx ,y+ my ] and the intra-frame prediction result Get the predicted image signal of the next frame And continue to repeat the above process until the encoding is completed.
- Predictive Coding includes intra-frame prediction and inter-frame prediction.
- the original video signal is predicted by the selected reconstructed video signal to obtain a residual signal.
- the encoder needs to decide which prediction mode (also known as encoding mode) to select for the current CU and inform the decoder.
- intra-frame prediction Intra Prediction
- Inter Prediction means that the predicted signal comes from another image that has been encoded and different from the current image (called a reference image).
- Transform & Quantization After the residual signal undergoes transformations such as DFT (Discrete Fourier Transform) and DCT (Discrete Cosine Transform), it is converted to the transform domain, known as transform coefficients. The transform coefficients are then subjected to a lossy quantization operation, which loses some information, making the quantized signal more suitable for compression. In some video coding standards, more than one transform method may be available, so the encoder must select one for the current CU and inform the decoder. The level of quantization is determined by the quantization parameter (QP). A larger QP value means that coefficients with a larger value range will be quantized to the same output, resulting in greater distortion and a lower bitrate. Conversely, a smaller QP value means that coefficients with a smaller value range will be quantized to the same output, resulting in less distortion and a corresponding higher bitrate.
- QP quantization parameter
- Entropy Coding or Statistical Coding The quantized transform domain signal will be statistically compressed and encoded according to the frequency of occurrence of each value, and finally a binary (0 or 1) compressed code stream will be output. At the same time, other information generated by the encoding, such as the selected prediction mode, motion vector data, etc., also needs to be entropy encoded to reduce the bit rate.
- Statistical coding is a lossless coding method that can effectively reduce the bit rate required to express the same signal. Common statistical coding methods include variable length coding (VLC) or context-based binary arithmetic coding (CABAC).
- Bypass Coding Mode Instead of assigning a specific probability model to each binary bit, the input binary bit value is directly encoded using a simple bypass encoder, speeding up the entire encoding and decoding process.
- different syntax elements are not completely independent, and the same syntax element itself has a certain degree of memory. Therefore, according to conditional entropy theory, conditional encoding using other encoded syntax elements can further improve encoding performance compared to independent encoding or memoryless encoding. This encoded symbol information used as a condition is called context.
- the bins of syntax elements enter the context modeler sequentially.
- the encoder assigns an appropriate probability model to each input bin based on the value of the previously encoded syntax element or bin. This process is called context modeling.
- the context model corresponding to the syntax element can be located through ctxIdxInc (context index increment) and ctxIdxStart (context index Start).
- the context model needs to be updated according to the bin value, which is the adaptive process in encoding.
- Loop Filtering The changed and quantized signal will be reconstructed through inverse quantization, inverse transformation and prediction compensation operations to obtain a reconstructed image.
- the reconstructed image has some information that is different from the original image due to the influence of quantization, that is, the reconstructed image will produce distortion. Therefore, the reconstructed image can be filtered, such as deblocking filter (DB), SAO (Sample Adaptive Offset) or ALF (Adaptive Loop Filter) and other filters, which can effectively reduce the degree of distortion caused by quantization. Since these filtered reconstructed images will be used as a reference for subsequent encoded images to predict future image signals, the above filtering operation is also called loop filtering, that is, filtering operation within the encoding loop.
- DB deblocking filter
- SAO Sample Adaptive Offset
- ALF Adaptive Loop Filter
- the decoding end after obtaining the compressed code stream (i.e., bitstream), entropy decoding is performed on each CU to obtain various mode information and quantization coefficients. The quantization coefficients are then dequantized and inversely transformed to obtain a residual signal.
- the prediction signal corresponding to the CU can be obtained.
- the residual signal is then added to the prediction signal to obtain the reconstructed signal.
- the reconstructed signal then undergoes loop filtering and other operations to produce the final output signal.
- FIG 4 shows a flowchart of an image processing method in an embodiment of the present application.
- the image processing method can be executed by an electronic device, for example, by a terminal device or a server that sends or receives video encoding data.
- the embodiment of the present application uses the method executed by a terminal device as an example to illustrate the method.
- the terminal device can be, for example, the video decoding device 210 or the video encoding device 220 shown in Figure 2.
- the image processing method in the embodiment of the present application includes the following steps S410 to S440 .
- S410 Segment the current video frame to obtain at least one first image block and a second image block, wherein the first image block is a coding unit having a first color component, and the second image block is a coding unit having a second color component;
- S420 Determine, according to the position of the second image block in the current video frame, a coding region associated with the position in at least one first image block as a target region;
- S430 Predicting and obtaining a reconstruction value of the first color component of the target area according to a preset prediction mode
- the prediction modes preset in S430 include intra-frame prediction mode, inter-frame prediction mode or intra-frame block copy prediction mode.
- the predicted pixels used when using these prediction modes are obtained by searching in the reconstructed reference frame or the reconstructed area of the current frame or searching in its subpixel interpolated image.
- the embodiment of the present application adopts a color component mapping prediction method to predict the second color component, thereby realizing cross-component prediction for chrominance, overcoming the problem of poor prediction accuracy caused by independent prediction of different color components in traditional coding schemes, enabling cross-component prediction to be normally used in the luminance and chrominance separation tree, expanding the scope of use of cross-component prediction, and improving the performance of the cross-component prediction method, thereby improving the encoding and decoding efficiency and accuracy of the video.
- an image block may correspond to a color category.
- color component sampling may be performed on the current block in a color space to form a luminance block and a chrominance block.
- Color video images contain not only a luma component (Y) but also chroma components (U, V). Such images are also called YUV images.
- YUV images When encoding YUV images, in addition to encoding the luma component, the chroma components also need to be encoded. Because the human eye is more sensitive to brightness and less so to color, to save storage space and improve coding efficiency, the luma component can be sampled at full resolution, while the chroma components do not need to be sampled at full resolution.
- video sequences typically have various formats: 4:4:4 YUV images, 4:2:2 YUV images, 4:2:0 YUV images, and so on.
- Figure 5 shows a schematic diagram of the process of sampling the color components of the current block in one embodiment of the present application.
- the current block 501 is an image block of size 16 ⁇ 16.
- different resolution formats can be selected for sampling.
- the 4:4:4 format indicates that the chroma components are not downsampled.
- the 4:4:4 format has the highest resolution for chroma components.
- one Y component corresponds to a set of UV components.
- the data in four adjacent pixels contains 4 Y, 4 U, and 4 V components.
- the 4:2:2 format means that the chroma components are horizontally downsampled 2:1 relative to the luma components, with no vertical downsampling. For every two U or V samples, each row contains four Y samples. When sampling in the 4:2:2 format, every two Y components share a set of UV components, and the data in four adjacent pixels contains 4 Y, 2 U, and 2 V components.
- the 4:2:0 format means that the chroma components are horizontally downsampled 2:1 relative to the luma components, and vertically downsampled 2:1.
- the 4:2:0 format is the format with the lowest resolution for chroma components.
- the chroma samples are only half of the luma samples in each row (i.e. horizontally), and only half of the luma samples in each column (i.e. vertically).
- the U component and the Y component appear alternately. For example, if the three YUV components appear in a ratio of 4:2:0 in the first row, then in the second row, the ratio is 4:0:2; there are 4 Y, 1 U, and 1 V in 4 adjacent pixels.
- the chrominance component of the image block is an M ⁇ N image block. For example, if the resolution of the image block is 720*480, then the resolution of the luminance component of the image block is 720*480, and the resolution of the chrominance component of the image block is 360*240.
- the 4:2:0 format is used as an example.
- a luminance block 502 and a chrominance block 503 are obtained.
- the luminance block 502 is a 16 ⁇ 16 image block
- the corresponding chrominance block 503 is an 8 ⁇ 8 image block.
- the image area adjacent to the luminance block 502 and the chrominance block 503 is shown at 504.
- the current video frame is segmented to obtain multiple image regions, and each image region or a combination of multiple image regions can be regarded as an image block.
- the image blocks of the first color component and the image blocks of the second color component can be segmented according to the same segmentation tree structure (i.e., a single segmentation tree structure) to form image blocks in a merged mode, or can be segmented according to different segmentation tree structures to form image blocks in a separated mode.
- the first color component can be any one of the luminance component Y, the chrominance component U, and the chrominance component V
- the second color component can be another one of the luminance component Y, the chrominance component U, and the chrominance component V.
- the segmentation tree structure in AVS3 generally consists of a quadtree, a binary tree, and an extended quadtree.
- the luminance blocks and chrominance blocks follow the same block partitioning structure, and the luminance blocks and chrominance blocks are one-to-one corresponding, that is, one chrominance block corresponds to only one luminance block.
- the luminance and chrominance blocks are divided into blocks independently, and the luminance blocks and chrominance blocks are no longer one-to-one corresponding. That is, the luminance area corresponding to a chrominance block may be in different luminance blocks.
- a frame of image in a video signal can be divided into non-overlapping coding tree units (CTUs).
- the block size of a CTU can be set to 64 ⁇ 64, 128 ⁇ 128, etc.
- a CTU with a block size of 128 ⁇ 128 can be a matrix pixel array containing 128 columns, each column containing 128 pixels, and each pixel containing a luminance component and/or a chrominance component.
- the CTU can be divided into a finer granularity to obtain a group of coding units (CUs), each of which can contain at least one CU.
- CUs group of coding units
- the coding tree unit can be divided into one of the following division methods: QT (Quaternary Tree), BT (Binary Tree), and TT (Ternary Tree), or a combination of multiple division methods.
- BT can further include HBT (Horizontal Binary Tree) and VBT (Vertical Binary Tree)
- TT can further include HTT (Horizontal Ternary Tree) and VTT (Vertical Ternary Tree).
- the CTU can be used as the root node and divided into several nodes. Each node corresponds to an image region. If a node is no longer divided, it is called a leaf node, and the image region corresponding to it forms a CU. If the node is further divided, one or a combination of the above division methods can be used to divide the node into multiple sub-regions, each sub-region corresponding to a sub-node. It is then necessary to determine whether these sub-nodes will be further divided.
- the division level of the child node can be the division level of the parent node plus 1.
- the encoder sets a minimum block size for the CU. During the division process, if the block size of a node is equal to the minimum block size, the node will no longer be divided by default. For the sake of convenience, the "image area corresponding to the node" will be referred to as "node" below.
- the QT division mode can be used to divide the node into 4 child nodes. According to the QT division mode, the node can be divided into four child nodes of the same block size. The width and height of each child node are the same, and the width is half of the width of the node before the division, and the height is half of the height of the node before the division.
- Figure 6 schematically illustrates the results of various block partitioning modes. As shown in Figure 6, for a node 610 with a block size of 64 ⁇ 64, if the node 610 is not partitioned further, the node 610 is directly determined to be a CU with a block size of 64 ⁇ 64. If the node 610 is partitioned further, it can be partitioned into four nodes 621-624 with a block size of 32 ⁇ 32 according to the QT partitioning mode. For one of these four nodes 621-624 with a block size of 32 ⁇ 32, if the node is partitioned further, four nodes with a block size of 16 ⁇ 16 are generated.
- the BT partitioning mode can be used to divide the node into two child nodes.
- the BT partitioning mode includes two types: HBT partitioning mode and VBT partitioning mode.
- the HBT partitioning mode is to divide the node into two upper and lower child nodes of the same block size, and the width and height of each child node are the same, and the width is equal to the width of the node before the division, and the height is half of the height of the node before the division.
- VBT is to divide the node into two left and right child nodes of the same size, and the width and height of each child node are the same, and the width is half of the width of the node before the division, and the height is equal to the height of the node before the division.
- the node 610 can be divided into two nodes 631 and 632 with a block size of 64 ⁇ 32, or if the VBT partitioning mode is used, the node 610 can be divided into two nodes 641 and 642 with a block size of 32 ⁇ 64.
- the TT partitioning mode can be used to divide the node into three child nodes.
- the TT partitioning mode includes two types: HTT partitioning mode and VTT partitioning mode.
- the HTT partitioning mode is to divide the node into three child nodes: upper, middle and lower, as shown in 651-653 in Figure 6, wherein the width of the upper and lower child nodes 651 and 653 is equal to the width of the node 610 before the partition, and the height is one-quarter of the height of the node 610 before the partition, and the width of the middle node 652 is equal to the width of the node before the partition, and the height is half of the height of the node before the partition.
- VTT is to divide the node into three child nodes: left, middle and right, as shown in 661-663 in Figure 6, wherein the width of the left and right child nodes 661 and 663 is one-quarter of the width of the node 610 before the partition, and the height is equal to the height of the node 610 before the partition, and the width of the middle node 662 is half of the width of the node before the partition, and the height is equal to the width of the node before the partition.
- the current video frame can be segmented based on the single segmentation tree structure to obtain at least one first image block and a second image block.
- the entire area of a first image block corresponding to the second image block in at least one first image block can be determined as the target area.
- the entire area of the first image block is determined as the target area.
- the current video frame when the first image block and the second image block have different segmentation tree structures, can be segmented based on the first segmentation tree structure to obtain at least one first image block; and the current video frame can be segmented based on the second segmentation tree structure to obtain the second image block.
- a partial area or all areas of the at least one first image block corresponding to the second image block can be determined as the target area. That is, in at least one first image block, there is not only one first image block corresponding to the second image block, then a partial area or all areas of the at least one first image block corresponding to the second image block can be determined as the target area.
- the image segmentation scheme can support independent segmentation tree structures for the luminance block and chrominance block in a CTU.
- the luminance block and chrominance block in a CTU share the same segmentation tree structure, that is, the luminance-chrominance merge mode.
- the luminance block and chrominance block in a CTU can have different segmentation tree structures, that is, the luminance-chrominance separation mode.
- the luminance block can be segmented into luminance CUs (which may be smaller in size) based on one coding tree structure, while the chrominance block can be segmented into chrominance CUs based on another coding tree structure.
- the CU in the I frame can include a CU for the luminance component or a CU for two chrominance components, unless the video is monochrome;
- the CU in the P frame or B frame can always include CUs for all three color components, that is, a CU for the luminance component and two CUs for the chrominance components.
- a semi-decoupled tree (SDT) image segmentation scheme also known as a semi-separate tree (SST) or flexible block segmentation for chroma components
- SDT semi-decoupled tree
- the luma block and chroma block in a super block (SB) may have the same or different block segmentation schemes, depending on the block size of the luma block or the luma tree depth. For example, when the block size of the luma block is greater than a threshold T1 or the coding tree split depth of the luma block is less than or equal to a threshold T2, the chroma block associated with the luma block may use the same coding tree structure as the luma block.
- Figure 7 shows image blocks obtained by segmenting the luminance and chrominance components using different segmentation tree structures in an application scenario.
- the numbers 1, 2, and 3 indicate the order in which the segmentation is performed.
- T2 is set to 1, meaning that when the luminance split depth of the luminance block is greater than 1, the associated chrominance block uses a different segmentation data structure.
- 703 corresponds to 701 and 702 in the luminance block. Therefore, part or all of 701 and 702 can be identified as the target area.
- luma and chroma blocks can share a partial tree structure starting from the root node of the superblock.
- SDP semi-decoupled partitioning
- Intra-frame prediction uses the reconstructed values of neighboring blocks. This process applies a pre-set weighting to the encoded adjacent pixels to obtain a better estimate of the current pixel block.
- One-dimensional prediction uses the correlation between adjacent pixels in the same row. Because the next pixel value is close to the previous pixel value, the previous pixel value is used as the predicted value for the current pixel.
- Two-dimensional prediction uses not only the neighboring pixels in the current row but also the pixels in the previous row. By assigning corresponding weights to the pixel values in different rows, a predicted value is obtained.
- Inter-frame prediction uses the correlation between previous and next frames in a video sequence to predict the current frame.
- adjacent frames have a high degree of pixel similarity, so information from the previous or next frame can be used to predict the pixel values of the current frame.
- Inter-frame prediction is achieved through processes such as motion estimation, motion compensation, and residual coding.
- Motion estimation compares the differences between the current frame and the previous or next frame to find the optimal motion vector that describes the motion relationship between the two frames. Common motion estimation algorithms include full search and block matching.
- Motion compensation uses the found motion vector to modify the previous or next frame to predict the pixels of the current frame. Motion compensation can be achieved by applying the motion vector to a reference frame for pixel replication or interpolation.
- Residual coding encodes the difference between the pixel values of the current frame and the pixel values of the predicted frame to generate residual data. This residual data represents pixel information in the current frame that cannot be obtained through motion prediction and requires additional encoding and transmission.
- a prediction model for representing the mapping relationship between the first color component and the second color component can be fitted based on the current block and at least one image area in the reference area, and the reference area includes at least one decoded image area that is the nearest neighbor or the second nearest neighbor to the current block.
- the second color component is another color component different from the first color component in the color space.
- the second color component may be the chrominance component U or the chrominance component V.
- Figure 8 shows a flowchart of fitting a prediction model for representing the mapping relationship between color components in one embodiment of the present application.
- the method for obtaining the prediction model may include the following steps S810 to S830.
- the input item of the initial prediction model also includes the first color component of at least one neighborhood pixel point, and the neighborhood pixel point is the pixel point that is the nearest neighbor or the second nearest neighbor of the designated pixel point.
- FIG9 is a schematic diagram showing the relationship between a designated pixel point and neighboring pixel points in one embodiment of the present application.
- C represents a designated pixel point
- the designated pixel points in the first color component a and the second color component b may be pixel sample points at associated positions or the same position.
- the neighborhood pixels of the designated pixel point C may include multiple nearest neighboring pixels, such as the multiple pixels N, S, W, and E located above, below, to the left, and to the right of the designated pixel point C as shown in FIG9 .
- the neighborhood pixels of the designated pixel point C may include multiple next-nearest neighboring pixels, such as the multiple pixels NW, NE, SW and SE located at the upper left, upper right, lower left and lower right positions of the designated pixel point C as shown in FIG9 .
- Each such connection between the first color component a and the second color component b is called a cross-component matching pair, generating a mapping equation. Multiple such mapping equations can be used to solve the model's weighted parameters.
- the location of pixel C in Figure 9 is only an example; a wider range of pixel sample points can also be selected.
- the initial prediction model includes at least one combination item with independent weighting parameters, and the combination item takes the first color components of at least two pixels as input items.
- the initial prediction model in the embodiment of the present application can be composed of at least one monomial, wherein each monomial can have an independent weighting parameter.
- each monomial can have an independent weighting parameter.
- the monomial is called a combination item.
- the initial prediction model may include at least two combinations of different orders, where the order is the highest power of the input items in the combination.
- the power operation can introduce nonlinear factors to improve the model's fit to the color component mapping relationship.
- the initial prediction model can be obtained by weighted operation of at least one of the following monomials: x, mx ⁇ ny, xy, xk , (mx ⁇ ny) k , (mx ⁇ ny)(pz ⁇ qf), (mx ⁇ ny)x, B.
- m, n, p, and q represent weighting coefficients used to perform fixed weighting on the input items
- x, y, z, and f represent the input items, i.e., the first color component of a specified pixel or a neighboring pixel
- B represents a constant bias term
- k represents the order of the power operation on the input item, where k is an integer greater than 1.
- the initial prediction model may include at least one of the following multiple candidate models:
- p 0 , p 1 , p 2 , p 3 , p 3 , p 4 , p 5 , p 6 , and p 7 represent weights.
- S820 Acquire training sample pairs, where the training sample pairs include one or more of the following sample pairs:
- the reconstructed value of the first color component and the reconstructed value of the second color component of the sample pixel point located in the reference area, the reference area includes at least one image area adjacent to the second image block.
- a mapping relationship between the first color component and the second color component can be fitted based on the predicted values of the color components of the second image block and the corresponding target area.
- the training sample pair used for fitting the mapping relationship can include (the predicted value of the first color component of the sample pixel point located in the target area, and the predicted value of the second color component of the sample pixel point located in the second image block).
- the predicted value of the first color component of the sample pixel point located in the target area and the predicted value of the second color component of the sample pixel point located in the second image block are predicted according to a preset prediction mode, and the preset prediction mode includes an intra-frame prediction mode, an inter-frame prediction mode, or an intra-block copy prediction mode.
- a mapping relationship between the first color component and the second color component can be fitted based on the reconstructed values of the color components of the reference area.
- the training sample pair used for fitting the mapping relationship can include: (the reconstructed value of the first color component of a sample pixel located in the reference area, and the reconstructed value of the second color component of the sample pixel).
- the mapping relationship between the first color component and the second color component can be fitted based on the predicted values of the color components of the second image block and the target area itself and the reconstructed values of the color components of the reference area.
- the training sample pairs used to fit the mapping relationship can include the above two types, namely: (the predicted value of the first color component of the sample pixel point located in the target area, the predicted value of the second color component of the sample pixel point located in the second image block), and (the reconstructed value of the first color component of the sample pixel point located in the reference area, the reconstructed value of the second color component of the sample pixel point).
- the reference area corresponding to the current block (unless otherwise specified, the current block described below refers to the second image block) is composed of at least one nearest neighbor area or second nearest neighbor area, the nearest neighbor area includes an image area with a specified image size located above or to the left of the current block, and the second nearest neighbor area includes an image area with a specified image size located above, below, or above the current block.
- FIG10 shows a schematic diagram of the distribution of reference areas corresponding to the current block in one embodiment of the present application.
- the reference region corresponding to the current block 1001 may be composed of multiple sub-regions 1002, wherein each sub-region 1002 may be the nearest neighbor region or the next nearest neighbor region of the current block.
- the nearest neighbor region may, for example, include the image region B located above the current block 1001 or the image region D located to the left of the current block 1001, and the next nearest neighbor region may, for example, include the image region A located to the upper left of the current block 1001, the image region E located to the lower left of the current block 1001, or the image region C located to the upper right of the current block 1001.
- the reference area of the current block 1001 can be formed by combining at least one of the image areas A-E.
- the image sizes of the sub-regions constituting the reference region are specified as follows: the next-nearest neighboring region to the upper right of the second image block has the same image size as the second image block in the horizontal direction, and the next-nearest neighboring region to the upper right of the second image block has a specified image size in the vertical direction;
- next nearest neighboring area at the lower left of the second image block has the same image size as the second image block in the vertical direction, and the next nearest neighboring area at the upper right of the second image block has a specified image size in the horizontal direction;
- the nearest neighbor region D on the left side of the current block 1001 has the same image size as the current block 1001 in the vertical direction, and has a specified image size in the horizontal direction.
- the next neighboring region E below the left of the current block 1001 has the same image size as the current block 1001 in the vertical direction, and the next neighboring region below the left of the current block 1001 has a specified image size in the horizontal direction.
- the next neighboring area A at the upper left of the current block 1001 has a specified image size in both the horizontal and vertical directions.
- the width and/or height of the specified image size may be a preset value greater than or equal to one.
- the width of the specified image size may be set to 6.
- color component prediction may be performed using multiple layers of neighboring pixels, thereby improving the accuracy of color component prediction.
- the sub-regions of the reference region constituting the current block may have the same specified image size or different specified image sizes.
- the vertical size of image region C may be the same as or different from the horizontal size of image region E.
- pixels that have been decoded and reconstructed or pixels that are allowed to be used can be selected from the sub-region as reference pixels for color component prediction of the current block. For example, when some pixels in image region C have been decoded and reconstructed, while other pixels have not been decoded and reconstructed, pixels that have been decoded and reconstructed can be selected from image region C as reference pixels for color component prediction of the current block.
- the sub-neighboring region when the decoded and reconstructed pixels in a sub-region do not meet the aforementioned size requirements, the sub-neighboring region can be configured as unavailable.
- image region C when the lower right corner of image region C is not reconstructed or exceeds the image boundary, image region C can be configured as unavailable; for another example, when the lower right corner of image region E is not reconstructed or exceeds the image boundary, image region E can be configured as unavailable.
- all of the sub-regions shown in FIG. 8 may be combined to form a reference region of the current block, or a portion of the sub-regions may be combined to form a reference region of the current block.
- Figure 11 shows a schematic diagram of a region template that combines some subregions into a reference region in one embodiment of the present application. As shown in Figure 11, based on the combination of different subregions, ten exemplary candidate region templates can be formed. In this embodiment of the present application, one or more of these candidate region templates can be specified for the current block.
- Figure 12 shows a schematic diagram of a region template of a reference region selected for a current block in one embodiment of the present application.
- the reference region corresponding to the current block includes at least one of a full region combination, a left region combination, or an upper region combination.
- the full region combination includes the nearest neighbor regions located on the left and above the current block and the next nearest neighbor regions located on the upper left, lower left and upper right of the current block.
- the left region combination includes the nearest neighbor region located on the left side of the current block and the next nearest neighbor region located on the lower left side of the current block.
- the upper region combination includes the nearest neighbor region located above the current block and the next nearest neighbor region located above and to the right of the current block.
- an indicator field can be used in the video bitstream to identify the region template of the reference region used by the current block. For example, when the indicator field value is 1, it indicates that the reference region selected by the current block is the full region combination shown in Figure 12; when the indicator field value is 01, it indicates that the reference region selected by the current block is the left region combination shown in Figure 12; when the indicator field value is 00, it indicates that the reference region selected by the current block is the upper region combination shown in Figure 12.
- availability information of at least one sub-area constituting the reference area can be obtained, and then the area range of the reference area can be adjusted based on the availability information of at least one sub-area.
- adjusting the area range of the reference area based on the availability information of the at least one sub-area may further include: removing the sub-areas in an unavailable state from the reference area; when all sub-areas in the reference area are in an unavailable state, configuring the reference area to an unavailable state.
- the indicator field corresponding to the current block has a value of 1, indicating that the reference area used for color component prediction of the current block is the full area combination including the five sub-areas A-E shown in Figure 12.
- availability information of each sub-region in the reference region may be obtained, and the region range of the reference region may be adjusted according to the availability information.
- sub-regions A, B, and C are image regions of other image blocks located above the current block. If the image blocks where sub-regions A, B, and C are located have not yet completed encoding and reconstruction, sub-regions A, B, and C are in an unavailable state. At this time, the area range of the reference area can be adjusted from A+B+C+D+E to D+E.
- sub-regions D and E are image regions of other image blocks located to the left of the current block. If the image blocks containing sub-regions D and E have not yet been coded and reconstructed, sub-regions D and E are also unavailable. In this case, all five sub-regions A-E are unavailable, so the entire reference region based on this full region combination can be configured as unavailable.
- the sample pixels used to train the prediction model may be all or a portion of the pixels selected from at least one of the second image block and the reference area.
- pixel sampling may be performed within at least one of the second image block and the reference area according to a preset sampling rule.
- selecting a training sample pair from at least one image region of the second image block and the reference region may include:
- the sample pixel points located in the second image block refer to all pixel points in the second image block
- the sample pixel points located in the reference area refer to all pixel points in at least one image area in the reference area
- the sample pixel points located in the second image block refer to the partial pixel points at the specified sampling position
- the sample pixel points located in the reference area refer to the partial pixel points at the specified sampling position in at least one image area in the reference area.
- specifying the sampling location includes satisfying at least one of the following conditions.
- the first sampling location specifies the coordinates of the sampling location and satisfies the preset coordinate value conditions.
- the coordinate value condition includes: at least one of the horizontal position coordinate or the vertical position coordinate of the pixel point is an even number; or, at least one of the horizontal position coordinate or the vertical position coordinate of the pixel point is an odd number.
- FIG. 13 is a schematic diagram showing a method of selecting a sampling position based on the position coordinates of a pixel point in one embodiment of the present application.
- a coordinate system is established with the upper left corner as the coordinate origin (0, 0), the horizontal position coordinate x represents the sequential position of the pixel points arranged from left to right in the horizontal direction, and the vertical position coordinate y represents the sequential position of the pixel points arranged from top to bottom in the horizontal direction.
- even positions, odd positions or all positions can be selected as designated sampling positions in the horizontal direction, and even positions, odd positions or all positions can be selected as designated sampling positions in the vertical direction.
- the second sampling position select the specified sampling position along the preset pixel scanning direction.
- pixels in the reference area can be scanned using any scanning method, such as a round-trip scan or a ZigZag scan, so that designated sampling positions are selected along a preset pixel scanning direction in accordance with a sequence and a preset sampling rule.
- the preset sampling rule may be, for example, interval sampling, where a designated sampling position is selected after at least one scanned pixel interval.
- FIG14 is a schematic diagram showing a method of selecting sampling positions based on a round-trip scanning method in one embodiment of the present application.
- FIG15 shows a schematic diagram of selecting sampling positions based on the ZigZag scanning method in one embodiment of the present application.
- the third sampling position the reconstructed value of the first color component of the pixel point at the specified sampling position is within a preset value range.
- the embodiment of the present application can select the position of the pixel point whose brightness value is greater than or less than a certain threshold as the designated sampling position.
- a prediction model can be fitted by selecting sample pixel points in the reference area whose brightness values are greater than a set threshold, and another prediction model can be fitted by selecting sample pixel points whose brightness values are less than or equal to the set threshold; when generating a predicted image, the corresponding first prediction model can be used for pixel points whose brightness values are greater than the set threshold, and the corresponding second prediction model can be used for pixel points whose brightness values are less than or equal to the set threshold.
- S830 Perform parameter fitting on the initial prediction model according to the training sample pairs to obtain the prediction model.
- the prediction model can fit the model parameters through online training or offline training.
- A is a matrix with M rows and N columns, M and N represent the number of equations established according to the initial prediction model and the number of model parameters in the initial prediction model, respectively, and x represents a parameter vector composed of the model parameters in the initial prediction model as elements.
- the LDL decomposition method or the Gaussian elimination method can be selected to solve the above equation.
- the solution steps may include:
- the decomposition processes of ATA in the two chrominance component prediction processes can be merged at this time, thereby reducing the computational complexity and improving the encoding and decoding efficiency.
- the reconstructed value of the first color component of the target area can be used as an input item and input into the target prediction model, and the target prediction model outputs the predicted value of the second color component of the second image block.
- the color component prediction scheme provided in the above embodiment can be executed on a portion of the image blocks in the current video frame, while the color component prediction scheme provided in the above embodiment can be prohibited on another portion of the image blocks.
- the prediction conditions corresponding to the image blocks can be explicitly or implicitly identified, and when the prediction conditions are met, the color component prediction method for predicting the second color component based on the first color component is executed.
- the prediction condition when the first image block and the second image block have the same segmentation tree structure, the prediction condition includes: the number of non-zero coefficients of the first color component in the target area is greater than a preset threshold.
- the non-zero coefficient of the first color component refers to the quantization coefficient of the first color component in the first image block whose value is not zero.
- the quantity threshold can be a preset default value, or can also be parsed or implicitly derived through the video code stream.
- the luminance component when the chroma block and the luminance block have the same partition tree structure, that is, in the merged tree mode, if the number of non-zero coefficients in the luminance block corresponding to the chroma block is greater than or equal to the specified threshold, the luminance component is allowed to be used to predict the chroma component, otherwise the luminance component is prohibited from being used to predict the chroma component.
- the prediction conditions include one or more of the following conditions: the number of non-zero coefficients of the first color component in the target area is greater than a preset number threshold; the sum of the numbers of non-zero coefficients of the first color components of multiple first image blocks corresponding to the target area is greater than a preset number threshold.
- the chroma block and the luminance block have different segmentation tree structures, that is, in the separate tree mode, if the number of non-zero coefficients in the luminance area corresponding to the chroma block (that is, part of the area or all of the area in at least one luminance block corresponding to the chroma block) is greater than or equal to the specified threshold, the use of the luminance component to predict the chroma component is allowed, otherwise the use of the luminance component to predict the chroma component is prohibited.
- the luminance component when the chroma block and the luminance block have different segmentation tree structures, that is, in the separate tree mode, if the sum of the number of non-zero coefficients in all luminance blocks where the luminance area corresponding to the chroma block is located is greater than or equal to the specified threshold, the luminance component is allowed to be used to predict the chroma component, otherwise the luminance component is prohibited from being used to predict the chroma component.
- the prediction conditions include one or more of the following conditions: the first image block and the second image block have the same segmentation tree structure, and the number of non-zero coefficients of the first color component in the target area is greater than a preset number threshold; or, the first image block and the second image block have different segmentation tree structures.
- cross-component prediction can be used regardless of the number of non-zero coefficients in the corresponding luma block.
- the prediction condition may further include at least one of the following five conditions:
- the first prediction condition using a preset prediction mode to predict the second image block, the prediction mode includes one or more of an intra-frame prediction mode, an inter-frame prediction mode and an intra-block copy prediction mode.
- the second prediction condition the index corresponding to the second image block has a specified index value, and the index is used to indicate whether to execute: mapping the reconstructed value of the first color component to obtain the predicted value of the second color component of the second image block.
- an index can be decoded in the sequence header/image header/slice header/maximum coding block, which is used to indicate whether all image blocks in the current sequence/image/slice/maximum coding block perform a cross-component prediction method for predicting the second color component based on the first color component.
- the third prediction condition the image features of the target area meet the preset first feature condition.
- the first characteristic condition includes: a reconstruction parameter of a first color component in the target area is within a preset value range.
- the preset numerical range includes greater than zero or less than zero.
- the fourth color component prediction condition the image feature of the second image block satisfies a preset second feature condition.
- the second characteristic condition may include: the image size of the second image block is within a preset size range; or the position of the second image block in the current video frame is within a specified area range.
- whether the second image block is to be used for a cross-component prediction method for predicting the second color component based on the first color component may be indicated based on whether the position of the second image block meets a preset range limit. For example, if the second image block is located in the upper left corner of the current video frame, the cross-component prediction method for predicting the second color component based on the first color component is not used.
- the fifth color component prediction condition the image characteristics of the reference area corresponding to the second image block meet the preset third characteristic condition, and the reference area includes at least one image area adjacent to the second image block.
- the third characteristic condition includes: the area of the reference region corresponding to the second image block is greater than a specified area threshold; or the number of pixels at a specified sampling position in the reference region corresponding to the second image block is greater than a preset number threshold.
- the preset number threshold may be the number of model parameters in the prediction model.
- the cross-component prediction method of predicting the second color component based on the first color component is performed on the second image block only when the area of the reference region is greater than a specified area threshold.
- the cross-component prediction method of predicting the second color component based on the first color component is performed on the second image block only when the number of pixels at a specified sampling position in the reference area (i.e., the number of pixels included in a matching pair of the first color component and the second color component) is greater than the number of model parameters in the prediction model.
- the first color component before mapping the reconstructed value of the first color component of the target area according to the mapping relationship, the first color component may be downsampled to obtain a first color component that can form a matching pair with the second color component.
- the luma and chroma blocks obtained after color component sampling according to the 420 sampling format have different block sizes.
- the resolution of the luma component is twice that of the chroma components in both the horizontal and vertical directions. In this case, to form a matching pair of luma and chroma components, the luma component can be downsampled.
- a method for downsampling a first color component may include: determining a sampling window having a specified window size based on pixel locations of the second color component of a second image block; downsampling a reconstructed value of the first color component of a target area within the sampling window to obtain a reconstructed value of the first color component that matches the pixel location.
- the matching reconstructed value of the first color component may be mapped to obtain a predicted value of the second color component of the second image block.
- the sampling window determined according to the pixel position of the second color component is used to cover the four nearest first color components and the two next-nearest first color components on the left.
- FIG16 shows a schematic diagram of a sampling window for downsampling the first color component in one embodiment of the present application.
- the blocks arranged in an array represent first color components, including 16011-16016, and the five-pointed stars distributed within the array represent second color components, including 16021 and 16022.
- a sampling window 1603 having a specified window size corresponding to the pixel position of the second color component 16021 can be determined based on the pixel position of the second color component 16021.
- the sampling window 1603 can cover the four first color components 16011-16014 that are the closest neighbors to the second color component 16021, as well as the two first color components 16015 and 16016 that are the next closest neighbors to the left.
- the reconstructed value of the first color component of the target area is downsampled in a sampling window to obtain a reconstructed value of the first color component that matches the pixel position, including: obtaining the correspondence between the reconstructed value of the first color component of the target area and the pixel position in the sampling window; and performing a weighted operation on the reconstructed value of the first color component according to the correspondence to obtain a reconstructed value of the first color component that matches the pixel position.
- L and L′ represent the reconstructed value of the original first color component and the reconstructed value of the downsampled first color component, respectively.
- x and y represent the horizontal position coordinate and the vertical position coordinate of the first color component, respectively.
- the two first color components 16011 and 16013 located on the left side of the second color component 16021 have coordinates of (x, y) and (x, y+1), and can be assigned a weight coefficient of 1/4;
- the other four first color components 16012, 16014-16016 have coordinates of (x-1, y), x-1, y+1), (x+1, y) and (x+1, y+1), and can be assigned a weight coefficient of 1/8.
- the two first color components 16015 and 16016 of the next nearest neighbors on the left are unavailable, and the two first color components with coordinates (x-1, y) and (x-1, y+1) are unavailable
- the two first color components 16011 and 16013 of the nearest neighbors on the left can be used instead, that is, the two first color components with coordinates (x, y) or (x, y+1) can be used instead.
- the first color component of at least one image area in the reference area when downsampling the first color component of the target area during prediction model training, can be simultaneously downsampled. Specifically, within at least one image area in the reference area, a sampling window having a specified window size is determined based on the pixel locations of the second color component of a second image block, where the reference area includes at least one image area adjacent to the second image block. Within the sampling window, the reconstructed values of the first color component of the at least one image area are downsampled to obtain reconstructed values of the first color component that match the pixel locations.
- the first color component may be downsampled, or downsampling may not be performed, and the first color component having the same or corresponding position as the second color component may be selected for color component prediction.
- the first color component 1601 having a position coordinate (x, y) corresponding to the second color component 1602 may be selected for color component prediction.
- the first color component when the sampling format of the first color component and the second color component is the same, before the color component is predicted by the prediction model, the first color component can be filtered to reduce redundant information or interference information in the first color component, thereby further improving the prediction accuracy of the second color component, that is, improving the video encoding and decoding accuracy of the second image block.
- multiple filters can be selected at the same time to filter the sample data of the first color component, and then different first color component samples can be selected to train the fitting prediction model to improve the fitting training effect of the prediction model.
- the pixel position of the first color component can be boundary-extended as needed to obtain neighboring pixel points for the designated pixel point.
- the reference area includes a variety of different candidate area templates
- the prediction model also includes a variety of different candidate prediction models.
- different color component prediction schemes may be selected for image blocks with different block sizes.
- a plurality of different color component prediction schemes may be used for a current block, and then the prediction results of the plurality of schemes may be weighted to obtain a final color component prediction result.
- the final predicted image can be obtained by weighting the cross-component prediction results provided by the above embodiments and the prediction results of the common intra prediction mode, inter prediction mode or intra block copy prediction mode.
- a preset prediction mode for example, intra-frame prediction, inter-frame prediction or intra-block copy prediction is performed on the second image block to obtain an initial prediction value of the second color component of the second image block; after mapping the reconstructed value of the first color component of the target area according to the mapping relationship to obtain the prediction value of the second color component of the second image block, a weighted operation is performed on the initial prediction value and the prediction value of the second color component according to a preset weight coefficient to obtain an updated prediction value of the second color component.
- the luminance component reconstruction value of the luminance block and the luminance component reconstruction value of the reference area may be downsampled, for example, using the sampling window shown in FIG16 .
- pixels whose horizontal and vertical coordinates are not odd numbers are selected from the reference area as sample pixels to construct sample pairs including the reconstructed luma component value and the reconstructed chroma component value.
- pixels whose horizontal and vertical coordinates are at least one even number may be selected from the reference area as sample pixels.
- the values are input into the first prediction model and the second prediction model that have been fitted and trained, respectively, to obtain prediction results of the chrominance component U and the chrominance component V.
- the prediction results of the chrominance component U and the chrominance component V are weighted with the initial prediction results according to the following formula to obtain the final prediction results pred of the chrominance component U and the chrominance component V.
- pred 1 represents the predicted value of the chrominance component U or the chrominance component V obtained by predicting the luminance component Y
- pred 2 represents the initial predicted value of the chrominance component U or the chrominance component V obtained by predicting the inter-frame prediction mode or the intra-frame block copy prediction mode
- w represents the weight coefficient for weighted operation of the two prediction results, which can be, for example, 0.75.
- the cross-component prediction scheme provided by the embodiment of the present application is allowed to be used in either the luma-chroma merged tree or the luma-chroma separate tree.
- cross-component prediction is allowed if the number of non-zero coefficients of the chroma corresponding luma block is greater than or equal to 3; otherwise, cross-component prediction is prohibited.
- the number of non-zero coefficients of the corresponding luma block is not limited.
- the embodiment of the present application proposes a cross-component color component prediction method, which generates a cross-component prediction model based on the predicted image of the adjacent reconstructed pixels or the current block by utilizing the similarity of the mapping relationship between the components of the adjacent areas or the predicted image and the reconstructed image, and then uses the cross-component prediction model to generate the target predicted image of the current image block.
- the embodiment of the present application can further utilize the reconstructed pixels of the current block to improve the prediction accuracy of the color component, thereby improving the encoding and decoding efficiency.
- the embodiment of the present application expands the scope of use of cross-component prediction, that is, the luminance and chrominance separation tree mode can also adopt a cross-component color component prediction scheme.
- cross-component prediction is not allowed, so as to achieve the effect of saving bit rate and improving encoding and decoding efficiency.
- the following describes an apparatus embodiment of the present application, which can be used to execute the video encoding and decoding method in the above-mentioned embodiment of the present application.
- the segmentation module 1710 is configured to segment the current video frame to obtain at least one first image block and a second image block, wherein the first image block is a coding unit having a first color component and the second image block is a coding unit having a second color component;
- the prediction module 1730 is configured to predict and obtain a reconstructed value of the first color component of the target area according to a preset prediction mode
- the mapping module 1740 is configured to map the reconstructed value of the first color component of the target area according to the mapping relationship between the first color component and the second color component in response to a preset prediction condition being met, so as to obtain a predicted value of the second color component of the second image block.
- the segmentation module 1710 is configured to segment the current video frame based on a single segmentation tree structure to obtain the at least one first image block and the second image block;
- the prediction condition includes: the number of non-zero coefficients of the first color component of the target area is greater than a preset threshold value.
- the prediction conditions include one or more of the following conditions:
- the first segmentation tree structure is different from the second segmentation tree structure
- the number of non-zero coefficients of the first color component of the target area is greater than a preset number threshold
- the sum of the non-zero coefficients of the first color components of the plurality of first image blocks corresponding to the target area is greater than a preset threshold.
- the prediction conditions include one or more of the following conditions:
- an index corresponding to the second image block having a specified index value, where the index is used to indicate whether to perform: mapping the reconstructed value of the first color component to obtain a predicted value of the second color component of the second image block;
- the image feature of the target area satisfies a preset first feature condition
- the image feature of the second image block satisfies a preset second feature condition
- the image feature of the reference area corresponding to the second image block meets a preset third feature condition, and the reference area includes at least one image area adjacent to the second image block.
- the first characteristic condition includes: a reconstruction parameter of the first color component of the target area is within a preset value range.
- the second characteristic condition includes one or more of the following conditions:
- the image size of the second image block is within a preset size range
- the position of the second image block in the current video frame is within a specified area.
- the area of the reference region corresponding to the second image block is greater than a preset area threshold
- the number of pixels at the designated sampling position in the reference area corresponding to the second image block is greater than a preset number threshold.
- the mapping relationship is represented by a prediction model
- the quantity threshold is the number of model parameters in the prediction model
- the prediction device 1700 further includes:
- a weighting module 1750 configured to predict an initial prediction value of the second color component of the second image block according to a preset prediction mode, where the prediction mode includes an intra prediction mode, an inter prediction mode, or an intra block copy prediction mode;
- a weighted operation is performed on the initial prediction value and the prediction value of the second color component to obtain an updated prediction value of the second color component.
- mapping relationship is represented by a prediction model
- prediction device 1700 further includes:
- an initial model acquisition module 1760 configured to acquire an initial prediction model, wherein an input item of the initial prediction model includes the first color component of a specified pixel point, an output item of the initial prediction model is the second color component of the specified pixel point, and the initial prediction model includes at least one of a plurality of candidate models;
- the sample pair selection module 1770 is configured to obtain training sample pairs, wherein the training sample pairs include one or more of the following sample pairs:
- the model fitting module 1780 is configured to perform parameter fitting on the initial prediction model according to the training sample pairs to obtain the prediction model.
- the predicted value of the first color component of the sample pixel point located in the target area and the predicted value of the second color component of the sample pixel point located in the second image block are predicted according to a preset prediction mode, and the prediction mode includes an intra-frame prediction mode, an inter-frame prediction mode, or an intra-block copy prediction mode.
- the input item of the initial prediction model also includes the first color component of at least one neighborhood pixel point, and the neighborhood pixel point is the pixel point that is the nearest neighbor or the second nearest neighbor of the designated pixel point.
- the initial prediction model includes at least one combination item with an independent weighting parameter, and the combination item takes the first color components of at least two pixels as input items.
- the initial prediction model includes at least two combination terms with different orders, and the order is the highest power of the input terms in the combination terms.
- the reference area is composed of at least one nearest neighbor area or second nearest neighbor area
- the nearest neighbor area includes an image area with a specified image size located above or to the left of the second image block
- the second nearest neighbor area includes an image area with a specified image size located above, below, or above the second image block.
- next-nearest neighboring region at the lower left of the second image block has the same image size as the second image block in the vertical direction, and the next-nearest neighboring region at the upper right of the second image block has a specified image size in the horizontal direction;
- the next neighboring area at the upper left of the second image block has a specified image size in both the horizontal direction and the vertical direction.
- the reference area includes at least one of a full area combination, a left area combination, and an upper area combination;
- the full region combination includes the nearest neighbor regions located on the left and above the second image block and the next nearest neighbor regions located on the upper left, lower left, and upper right of the second image block;
- the left region combination includes a nearest neighbor region located on the left side of the second image block and a next nearest neighbor region located on the lower left side of the second image block;
- the upper region combination includes a nearest neighbor region located above the second image block and a next nearest neighbor region located to the upper right of the second image block.
- the prediction device 1700 further includes:
- the area adjustment module 1790 is configured to obtain availability information of at least one sub-area constituting the reference area; and adjust the area range of the reference area according to the availability information.
- the area adjustment module 1790 is configured to remove sub-areas in an unavailable state from the reference area; when all sub-areas in the reference area are in an unavailable state, the reference area is configured to be in an unavailable state.
- the sample pair acquisition module 1770 is configured to: acquire a pixel sampling pattern of the second image block, where the pixel sampling pattern includes full pixel sampling or partial pixel sampling;
- the sample pixel points located in the second image block refer to all pixel points in the second image block
- the sample pixel points located in the reference area refer to all pixel points in at least one image area in the reference area
- the sample pixel points located in the second image block refer to the partial pixel points at the specified sampling position
- the sample pixel points located in the reference area refer to the partial pixel points at the specified sampling position in at least one image area in the reference area.
- the designated sampling location satisfies at least one of the following conditions:
- the coordinates of the designated sampling position meet preset coordinate value conditions
- the reconstructed value of the first color component of the pixel point at the designated sampling position is within a preset value range.
- the coordinate numerical conditions include:
- At least one of the horizontal position coordinate and the vertical position coordinate is an even number; or,
- At least one of the horizontal position coordinate and the vertical position coordinate is an odd number.
- the prediction device 1700 further includes:
- a first downsampling module 1791 is configured to determine a sampling window with a specified window size based on the pixel positions of the second color component of the second image block; downsample the reconstructed value of the first color component of the target area within the sampling window to obtain a reconstructed value of the first color component that matches the pixel positions;
- the mapping module 1740 is configured to map the matched reconstructed value of the first color component to obtain a predicted value of the second color component of the second image block.
- the first downsampling module 1791 is configured to: obtain, in the sampling window, a correspondence between a reconstructed value of the first color component of the target area and the pixel position;
- a weighted operation is performed on the reconstructed value of the first color component of the target area to obtain a reconstructed value of the first color component that matches the pixel position.
- the prediction device 1700 further includes:
- the second downsampling module 1792 is configured to determine a sampling window with a specified window size in at least one image area in the reference area corresponding to the second image block according to the pixel position of the second color component of the second image block; in the sampling window, downsample the reconstructed value of the first color component of the at least one image area to obtain a reconstructed value of the first color component that matches the pixel position.
- FIG18 schematically shows a structural block diagram of an electronic device for implementing an embodiment of the present application.
- electronic device 1800 includes a central processing unit (CPU) 1801, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1802 or programs loaded from a storage unit 1808 into a random access memory (RAM) 1803. Various programs and data required for system operation are also stored in the random access memory 1803.
- the CPU 1801, the read-only memory 1802, and the random access memory 1803 are connected to each other via a bus 1804.
- An input/output interface 1805 i.e., an I/O interface
- I/O interface is also connected to the bus 1804.
- the following components are connected to the input/output interface 1805: an input section 1806 including a keyboard, a mouse, and the like; an output section 1807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 1808 including a hard disk and the like; and a communication section 1809 including a network interface card such as a local area network card or a modem.
- the communication section 1809 performs communication processing via a network such as the Internet.
- a drive 1810 is also connected to the input/output interface 1805 as needed.
- a removable medium 1811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like, is installed in the drive 1810 as needed so that a computer program read therefrom can be installed into the storage section 1808 as needed.
- an embodiment of the present application includes a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for executing the methods shown in the flow charts.
- the computer program can be downloaded and installed from a network via the communication section 1809 and/or installed from a removable medium 1811.
- the central processing unit 1801 the various functions defined in the system of the present application are performed.
- the computer-readable storage medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above.
- the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above.
- Computer-readable storage media may include, but are not limited to: an electrical connection with at least one wire, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
- a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device or device.
- a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
- a computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
- Program code embodied on a computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.
- each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code includes at least one executable instruction for realizing the specified logical function.
- the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
- each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
- the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
- a non-volatile storage medium which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
- a computing device which can be a personal computer, a server, a touch terminal, or a network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
L’(x,y)=(L(x-1,y)+2L(x,y)+L(x+1,y)+L(x-1,y+1)+2L(x,y+1)+L(x+1,y+1))/8
pred=w*pred1+(1-w)*pred2
L’(x,y)=(L(x-1,y)+2L(x,y)+L(x+1,y)+L(x-1,y+1)+2L(x,y+1)+L(x+1,y+1))/8
pred=w*pred1+(1-w)*pred2
Claims (31)
- 一种图像处理方法,由电子设备执行,包括:对当前视频帧进行分割,得到至少一个第一图像块和第二图像块,其中,所述第一图像块是具有第一颜色分量的编码单元,所述第二图像块是具有第二颜色分量的编码单元;根据所述第二图像块在所述当前视频帧中的位置,将所述至少一个第一图像块中与所述位置关联的编码区域,确定为目标区域;根据预设的预测模式,预测得到所述目标区域的所述第一颜色分量的重建值;及,响应于预设的预测条件被满足,根据所述第一颜色分量与所述第二颜色分量之间的映射关系,对所述目标区域的所述第一颜色分量的重建值进行映射,得到所述第二图像块的所述第二颜色分量的预测值。
- 根据权利要求1所述的方法,其中,所述对当前视频帧进行分割,得到至少一个第一图像块和第二图像块,包括:基于单个分割树结构,对所述当前视频帧进行分割,得到所述至少一个第一图像块和所述第二图像块;所述根据所述第二图像块在所述当前视频帧中的位置,将所述至少一个第一图像块中与所述位置关联的编码区域,确定为目标区域,包括:基于所述位置,将所述至少一个第一图像块中与所述第二图像块相对应的一个第一图像块的全部区域,确定为所述目标区域。
- 根据权利要求1所述的方法,其中,所述对当前视频帧进行分割,得到至少一个第一图像块和第二图像块,包括:基于第一分割树结构,对所述当前视频帧进行分割,得到所述至少一个第一图像块;基于第二分割树结构,对所述当前视频帧进行分割,得到所述第二图像块;所述根据所述第二图像块在所述当前视频帧中的位置,将所述至少一个第一图像块中与所述位置关联的编码区域,确定为目标区域,包括:基于所述位置,将所述至少一个第一图像块中与所述第二图像块相对应的部分区域或者全部区域,确定为所述目标区域。
- 根据权利要求2所述的方法,其中,所述预测条件包括:所述目标区域的所述第一颜色分量的非零系数的数量,大于预设的数量阈值。
- 根据权利要求3所述的方法,其中,所述预测条件包括以下条件中的一种或多种:所述第一分割树结构与所述第二分割树结构不同;所述目标区域的所述第一颜色分量的非零系数的数量,大于预设的数量阈值;所述目标区域对应的多个第一图像块的所述第一颜色分量的非零系数的数量之和,大于预设的数量阈值。
- 根据权利要求1-3中任一项所述的方法,其中,所述预测条件包括以下条件中的一种或多种:与所述第二图像块相对应的索引,具有指定的索引值,所述索引用于指示是否执行:对所述第一颜色分量的重建值进行映射,得到所述第二图像块的所述第二颜色分量的预测值;所述目标区域的图像特征,满足预设的第一特征条件;所述第二图像块的图像特征,满足预设的第二特征条件;与所述第二图像块相对应的参考区域的图像特征,满足预设的第三特征条件,所述参考区域包括与所述第二图像块相邻的至少一个图像区域。
- 根据权利要求6所述的方法,其中,所述第一特征条件包括:所述目标区域的所述第一颜色分量的重建参数,处于预设的数值范围内。
- 根据权利要求6或者7所述的方法,其中,所述第二特征条件包括以下条件中的一种或多种:所述第二图像块的图像尺寸,处于预设的尺寸范围内;所述第二图像块在所述当前视频帧中的所述位置,处于指定的区域范围内。
- 根据权利要求6-8中任一项所述的方法,其中,所述第三特征条件包括以下条件中的一种或多种:与所述第二图像块相对应的所述参考区域的区域面积,大于预设的面积阈值;与所述第二图像块相对应的所述参考区域中指定采样位置的像素数量,大于预设的数量阈值。
- 根据权利要求9所述的方法,其中,所述映射关系由预测模型表示,所述数量阈值是所述预测模型中的模型参数的数量。
- 根据权利要求1-10中任一项所述的方法,还包括:根据预设的预测模式,预测得到所述第二图像块的所述第二颜色分量的初始预测值,所述预测模式包括帧内预测模式、帧间预测模式或者帧内块复制预测模式;根据预设的权重系数,对所述初始预测值与所述第二颜色分量的预测值进行加权运算,得到所述第二颜色分量的更新后的预测值。
- 根据权利要求1-11中任一项所述的方法,其中,所述映射关系由预测模型表示,所述方法还包括:获取所述预测模型,包括:获取初始预测模型,所述初始预测模型的输入项包括指定像素点的所述第一颜色分量,所述初始预测模型的输出项为所述指定像素点的所述第二颜色分量,所述初始预测模型包括多种候选模型中的至少一种;获取训练样本对,所述训练样本对包括以下样本对中的一种或多种:位于所述目标区域内的样本像素点的所述第一颜色分量的预测值和位于所述第二图像块内的样本像素点的所述第二颜色分量的预测值;位于参考区域内的样本像素点的所述第一颜色分量的重建值和所述第二颜色分量的重建值,所述参考区域包括至少一个与所述第二图像块相邻的图像区域;根据所述训练样本对,对所述初始预测模型进行参数拟合,得到所述预测模型。
- 根据权利要求12所述的方法,其中,位于所述目标区域内的样本像素点的所述第一颜色分量的预测值和位于所述第二图像块内的样本像素点的所述第二颜色分量的预测值,是根据预设的预测模式预测得到的,所述预测模式包括帧内预测模式、帧间预测模式或者帧内块复制预测模式。
- 根据权利要求12或者13所述的方法,其中,所述初始预测模型的输入项还包括至少一个邻域像素点的所述第一颜色分量,所述邻域像素点是与所述指定像素点最近邻或次近邻的像素点。
- 根据权利要求14所述的方法,其中,所述初始预测模型包括至少一个具有独立的加权参数的组合项,所述组合项以至少两个像素点的所述第一颜色分量作为输入项。
- 根据权利要求15所述的方法,其中,所述初始预测模型包括至少两个具有不同阶数的所述组合项,所述阶数是所述组合项中输入项的最高次幂。
- 根据权利要求12-16中任一项所述的方法,其中,所述参考区域由至少一个最近邻区域或次近邻区域组合而成,所述最近邻区域包括位于所述第二图像块上方或左侧的具有指定图像尺寸的图像区域,所述次近邻区域包括位于所述第二图像块左上方、左下方或右上方的具有指定图像尺寸的图像区域。
- 根据权利要求17所述的方法,其中,所述第二图像块右上方的次近邻区域在水平方向上与所述第二图像块具有相同的图像尺寸,所述第二图像块右上方的次近邻区域在竖直方向上具有指定图像尺寸;所述第二图像块左下方的次近邻区域在竖直方向上与所述第二图像块具有相同的图像尺寸,所述第二图像块右上方的次近邻区域在水平方向上具有指定图像尺寸;所述第二图像块左上方的次近邻区域在水平方向上和竖直方向上均具有指定图像尺寸。
- 根据权利要求17所述的方法,其中,所述参考区域包括全量区域组合、左侧区域组合与上方区域组合中的至少一种;其中,所述全量区域组合包括位于所述第二图像块左侧和上方的最近邻区域以及位于所述第二图像块左上方、左下方和右上方的次近邻区域;所述左侧区域组合包括位于所述第二图像块左侧的最近邻区域以及位于所述第二图像块左下方的次近邻区域;所述上方区域组合包括位于所述第二图像块上方的最近邻区域以及位于所述第二图像块右上方的次近邻区域。
- 根据权利要求17-19中任一项所述的方法,还包括:获取组成所述参考区域的至少一个子区域的可用性信息;根据所述可用性信息,调整所述参考区域的区域范围。
- 根据权利要求20所述的方法,其中,所述根据所述可用性信息,调整所述参考区域的区域范围,包括:从所述参考区域中移除处于不可用状态的子区域;当所述参考区域中的所有子区域均处于不可用状态时,将所述参考区域配置为不可用状态。
- 根据权利要求12-21中任一项所述的方法,其中,所述获取训练样本对,包括:获取所述第二图像块的像素点采样模式,所述像素点采样模式包括全量像素点采样或者部分像素点采样;当所述第二图像块的像素点采样模式为所述全量像素点采样时,所述位于所述第二图像块内的样本像素点是指所述第二图像块内的所有像素点,所述位于所述参考区域内的样本像素点是指所述参考区域中的至少一个图像区域内的所有像素点;当所述第二图像块的像素点采样模式为所述部分像素点采样时,所述位于所述第二图像块内的样本像素点是指处于指定采样位置的部分像素点,所述位于所述参考区域内的样本像素点是指所述参考区域中的至少一个图像区域内处于指定采样位置的部分像素点。
- 根据权利要求22所述的方法,其中,所述指定采样位置满足以下条件中的至少一种:所述指定采样位置的坐标,满足预设的坐标数值条件;沿预设的像素点扫描方向,选取所述指定采样位置;所述指定采样位置的像素点的所述第一颜色分量的重建值,处于预设的数值范围内。
- 根据权利要求23所述的方法,其中,所述坐标数值条件包括:水平位置坐标与竖直位置坐标中的至少一个为偶数;或者,水平位置坐标与竖直位置坐标中的至少一个为奇数。
- 根据权利要求1-24中任一项所述的方法,还包括:根据所述第二图像块的所述第二颜色分量的像素点位置,确定具有指定窗口尺寸的采样窗口;在所述采样窗口中,对所述目标区域的所述第一颜色分量的重建值进行下采样,得到与所述像素点位置相匹配的所述第一颜色分量的重建值;所述响应于预设的预测条件被满足,根据所述第一颜色分量与所述第二颜色分量之间的映射关系,对所述目标区域的所述第一颜色分量的重建值进行映射,得到所述第二图像块的所述第二颜色分量的预测值,包括:对匹配的所述第一颜色分量的重建值进行映射,得到所述第二图像块的所述第二颜色分量的预测值。
- 根据权利要求25所述的方法,其中,所述将所述目标区域中的所述第一颜色分量的重建值在所述采样窗口中进行下采样,得到与所述像素点位置相匹配的所述第一颜色分量的重建值,包括:在所述采样窗口中,获取所述目标区域的第一颜色分量的重建值与所述像素点位置之间的对应关系;根据所述对应关系,对所述目标区域的所述第一颜色分量的重建值进行加权运算,得到与所述像素点位置相匹配的所述第一颜色分量的重建值。
- 根据权利要求25所述的方法,还包括:在与所述第二图像块相对应的参考区域中的至少一个图像区域内,根据所述第二图像块的所述第二颜色分量的像素点位置,确定具有指定窗口尺寸的采样窗口;在所述采样窗口中,对所述至少一个图像区域的所述第一颜色分量的重建值进行下采样,得到与所述像素点位置相匹配的所述第一颜色分量的重建值。
- 一种图像处理装置,包括:分割模块,被配置为对当前视频帧进行分割,得到至少一个第一图像块和第二图像块,其中,所述第一图像块是具有第一颜色分量的编码单元,所述第二图像块是具有第二颜色分量的编码单元;确定模块,被配置为根据所述第二图像块在所述当前视频帧中的位置,将所述至少一个第一图像块中与所述位置关联的编码区域,确定为目标区域;预测模块,被配置为根据预设的预测模式,预测得到所述目标区域的所述第一颜色分量的重建值;及,映射模块,被配置为响应于预设的预测条件被满足,根据所述第一颜色分量与所述第二颜色分量之间的映射关系,对所述目标区域的所述第一颜色分量的重建值进行映射,得到所述第二图像块的所述第二颜色分量的预测值。
- 一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至27中任意一项所述的方法。
- 一种电子设备,包括:处理器;以及存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为执行所述可执行指令以实现如权利要求1至27中任意一项所述的方法。
- 一种计算机程序产品,包括计算机程序,所述计算机程序存储在计算机可读存储介质中;当电子设备的处理器从所述计算机可读存储介质读取所述计算机程序时,所述处理器执行所述计算机程序,使得所述电子设备执行权利要求1-27中任一项所述方法的步骤。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020267019671A KR20260113116A (ko) | 2024-03-14 | 2025-02-17 | 이미지 프로세싱 방법 및 장치, 그리고 저장 매체, 전자 디바이스, 및 프로그램 제품 |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410297228.5 | 2024-03-14 | ||
| CN202410297228.5A CN120658875A (zh) | 2024-03-14 | 2024-03-14 | 颜色分量的预测方法、装置、介质及电子设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025190039A1 true WO2025190039A1 (zh) | 2025-09-18 |
Family
ID=96998646
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2025/077524 Pending WO2025190039A1 (zh) | 2024-03-14 | 2025-02-17 | 图像处理方法、装置、存储介质、电子设备及程序产品 |
Country Status (3)
| Country | Link |
|---|---|
| KR (1) | KR20260113116A (zh) |
| CN (1) | CN120658875A (zh) |
| WO (1) | WO2025190039A1 (zh) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220279170A1 (en) * | 2019-11-21 | 2022-09-01 | Nippon Hoso Kyokai | Intra prediction device, image encoding device, image decoding device and program |
| WO2023224290A1 (ko) * | 2022-05-18 | 2023-11-23 | 현대자동차주식회사 | 인트라 예측에서 성분간 관계 모델 유도를 위한 참조샘플 선택을 위한 방법 및 장치 |
| WO2023239676A1 (en) * | 2022-06-06 | 2023-12-14 | Beijing Dajia Internet Information Technology Co., Ltd. | Improved cross-component prediction for video coding |
| WO2024007165A1 (zh) * | 2022-07-05 | 2024-01-11 | Oppo广东移动通信有限公司 | 编解码方法、装置、编码设备、解码设备以及存储介质 |
| WO2024034849A1 (ko) * | 2022-08-09 | 2024-02-15 | 현대자동차주식회사 | 루마 성분 기반 크로마 성분 예측을 이용하는 비디오 코딩을 위한 방법 및 장치 |
-
2024
- 2024-03-14 CN CN202410297228.5A patent/CN120658875A/zh active Pending
-
2025
- 2025-02-17 WO PCT/CN2025/077524 patent/WO2025190039A1/zh active Pending
- 2025-02-17 KR KR1020267019671A patent/KR20260113116A/ko active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220279170A1 (en) * | 2019-11-21 | 2022-09-01 | Nippon Hoso Kyokai | Intra prediction device, image encoding device, image decoding device and program |
| WO2023224290A1 (ko) * | 2022-05-18 | 2023-11-23 | 현대자동차주식회사 | 인트라 예측에서 성분간 관계 모델 유도를 위한 참조샘플 선택을 위한 방법 및 장치 |
| WO2023239676A1 (en) * | 2022-06-06 | 2023-12-14 | Beijing Dajia Internet Information Technology Co., Ltd. | Improved cross-component prediction for video coding |
| WO2024007165A1 (zh) * | 2022-07-05 | 2024-01-11 | Oppo广东移动通信有限公司 | 编解码方法、装置、编码设备、解码设备以及存储介质 |
| WO2024034849A1 (ko) * | 2022-08-09 | 2024-02-15 | 현대자동차주식회사 | 루마 성분 기반 크로마 성분 예측을 이용하는 비디오 코딩을 위한 방법 및 장치 |
Also Published As
| Publication number | Publication date |
|---|---|
| KR20260113116A (ko) | 2026-07-21 |
| CN120658875A (zh) | 2025-09-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12556696B2 (en) | Video coding method and apparatus, medium, and electronic device | |
| JP7717267B2 (ja) | ループフィルタリング方法、ビデオ復号方法、ビデオ符号化方法、ループフィルタリング装置、ビデオ復号装置、ビデオ符号化装置、電子機器及びコンピュータプログラム | |
| CN117136540A (zh) | 残差编码方法及设备、视频编码方法及设备、存储介质 | |
| WO2023173809A1 (zh) | 视频编解码方法、装置、存储介质、电子设备及计算机程序产品 | |
| US20250071306A1 (en) | Video coding/decoding method and apparatus, computer-readable medium, and electronic device | |
| CN114979655B (zh) | 视频编解码方法、装置、计算机可读介质及电子设备 | |
| CN118984390B (zh) | 用于视频编解码的基于历史的莱斯编码参数推导 | |
| CN115209157B (zh) | 视频编解码方法、装置、计算机可读介质及电子设备 | |
| CN114979656B (zh) | 视频编解码方法、装置、计算机可读介质及电子设备 | |
| CN118803237A (zh) | 视频编解码方法、装置、计算机可读介质及电子设备 | |
| WO2025118926A1 (zh) | 视频编解码方法、装置、介质及电子设备 | |
| WO2025118925A1 (zh) | 视频编解码方法、装置、介质及电子设备 | |
| CN120658875A (zh) | 颜色分量的预测方法、装置、介质及电子设备 | |
| WO2025195257A1 (zh) | 视频处理方法、装置、介质及电子设备 | |
| CN115209146B (zh) | 视频编解码方法、装置、计算机可读介质及电子设备 | |
| CN114615497B (zh) | 视频解码方法、装置、计算机可读介质及电子设备 | |
| CN115086656B (zh) | 视频编解码方法、装置、计算机可读介质及电子设备 | |
| CN111770338B (zh) | 编码单元的索引值确定方法、装置、设备及存储介质 | |
| WO2026026351A1 (zh) | 视频编解码方法、装置及计算机可读介质 | |
| WO2025252185A1 (zh) | 视频编解码方法、装置、计算机可读介质及电子设备 | |
| WO2025241790A1 (zh) | 视频编解码方法、装置、计算机可读介质及电子设备 | |
| CN121967700A (zh) | 视频编解码方法、装置、计算机可读介质及电子设备 | |
| CN121099052A (zh) | 跨分量预测方法、视频编解码方法、装置、介质及设备 | |
| CN117834894A (zh) | 视频编解码方法、装置、介质及电子设备 | |
| HK40092646A (zh) | 视频编解码方法、装置、计算机可读介质及电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25769212 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 1020267019671 Country of ref document: KR Free format text: ST27 STATUS EVENT CODE: A-0-1-A10-A15-NAP-PA0105 (AS PROVIDED BY THE NATIONAL OFFICE) |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 1020267019671 Country of ref document: KR |
|
| WWP | Wipo information: published in national office |
Ref document number: 1020267019671 Country of ref document: KR |