CN115118982A - Video processing method, video processing equipment, storage medium and computer program product - Google Patents
Video processing method, video processing equipment, storage medium and computer program product Download PDFInfo
- Publication number
- CN115118982A CN115118982A CN202210730782.9A CN202210730782A CN115118982A CN 115118982 A CN115118982 A CN 115118982A CN 202210730782 A CN202210730782 A CN 202210730782A CN 115118982 A CN115118982 A CN 115118982A
- Authority
- CN
- China
- Prior art keywords
- chroma
- coding
- coded
- component
- decoded
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 49
- 238000012545 processing Methods 0.000 title claims abstract description 39
- 238000004590 computer program Methods 0.000 title claims abstract description 19
- 238000000034 method Methods 0.000 claims abstract description 57
- 238000012937 correction Methods 0.000 claims description 60
- 230000015654 memory Effects 0.000 claims description 43
- 241000023320 Luma <angiosperm> Species 0.000 claims description 24
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical compound COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 claims description 24
- 230000004927 fusion Effects 0.000 claims description 21
- 238000013473 artificial intelligence Methods 0.000 abstract description 5
- 238000005516 engineering process Methods 0.000 abstract description 5
- 230000000875 corresponding effect Effects 0.000 description 88
- 230000008569 process Effects 0.000 description 29
- 238000010586 diagram Methods 0.000 description 15
- 230000004048 modification Effects 0.000 description 11
- 238000012986 modification Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 230000003993 interaction Effects 0.000 description 5
- 239000013598 vector Substances 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 2
- 230000002596 correlated effect Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Images
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/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The application provides a video processing method, video processing equipment, a storage medium and a computer program product, which are applied to various video coding and decoding scenes such as cloud technology, artificial intelligence, intelligent traffic, vehicle-mounted video and the like; the video processing method comprises the following steps: in a video to be coded, determining a prediction unit matched with a unit to be coded in a frame image to be coded from a reference frame image corresponding to the frame image to be coded, wherein the unit to be coded comprises a luminance component to be coded and a chrominance component to be coded, and the prediction unit comprises a predicted luminance component and a predicted chrominance component; coding the difference between the predicted brightness component and the brightness component to be coded to obtain a brightness coding result; correcting the predicted chrominance component by combining the preset associated parameters and the luminance coding result to obtain a target chrominance component; and coding the difference between the chrominance component to be coded and the target chrominance component to obtain a chrominance coding result. By the method and the device, the chroma coding accuracy can be improved, and the performance of video coding can be improved.
Description
Technical Field
The present application relates to video processing technologies in the field of computer applications, and in particular, to a video processing method, a video processing apparatus, a storage medium, and a computer program product.
Background
Video refers to various technologies for capturing, recording, processing, storing, transmitting, and reproducing a series of still images as electrical signals; since a video includes a plurality of images, the video is generally encoded in order to reduce the amount of data for storing or transmitting the video. Wherein the video coding comprises chroma coding.
Generally, when inter-frame coding is performed on a video, in order to perform chroma coding, a prediction unit is usually determined first, and then a chroma difference between the prediction unit and a unit to be coded is coded; as such, the accuracy of chroma coding is low, resulting in poor performance of video coding.
Disclosure of Invention
Embodiments of the present application provide a video processing method, an apparatus, a device, a computer-readable storage medium, and a computer program product, which can improve the accuracy of chroma coding and further improve the performance of video coding.
The technical scheme of the embodiment of the application is realized as follows:
an embodiment of the present application provides a video processing method, including:
in a video to be coded, determining a prediction unit matched with a unit to be coded in a frame image to be coded from a reference frame image corresponding to the frame image to be coded, wherein the unit to be coded comprises a luminance component to be coded and a chrominance component to be coded, and the prediction unit comprises a predicted luminance component and a predicted chrominance component;
encoding the brightness difference between the predicted brightness component and the brightness component to be encoded to obtain a brightness encoding result;
correcting the predicted chrominance component by combining a preset associated parameter and the luminance coding result to obtain a target chrominance component, wherein the preset associated parameter represents an associated relation between coding luminance and coding chrominance;
and coding the first chrominance difference between the chrominance component to be coded and the target chrominance component to obtain a chrominance coding result of the unit to be coded.
An embodiment of the present application further provides a video processing method, including:
in a video to be decoded, decoding a chroma coding result corresponding to a unit to be decoded of a frame image to be decoded to obtain a first chroma difference, wherein the video to be decoded is a coding result of the video to be coded, the frame image to be decoded is a coding result of the frame image to be coded in the video to be coded, and the unit to be decoded is a coding result of the unit to be coded in the frame image to be coded;
determining a prediction unit from a reference frame image corresponding to the frame image to be decoded, wherein the prediction unit comprises a prediction brightness component and a prediction chrominance component;
correcting the predicted chrominance component by combining a preset associated parameter and a luminance coding result to obtain a target chrominance component, wherein the preset associated parameter represents an associated relation between coding luminance and coding chrominance, the luminance coding result is a coding result of luminance difference between the predicted luminance component and a luminance component to be coded, and the unit to be coded comprises the luminance component to be coded;
and determining the fusion result of the first chrominance difference and the target chrominance unit as the chrominance component to be coded of the unit to be coded.
An embodiment of the present application provides an encoding apparatus for video processing, including:
the encoding and predicting module is used for determining a predicting unit matched with a unit to be encoded in a frame image to be encoded from a reference frame image corresponding to the frame image to be encoded in a video to be encoded, wherein the unit to be encoded comprises a luminance component to be encoded and a chrominance component to be encoded, and the predicting unit comprises a predicted luminance component and a predicted chrominance component;
the video coding module is used for coding the brightness difference between the predicted brightness component and the brightness component to be coded to obtain a brightness coding result;
the chroma correction module is used for correcting the predicted chroma component by combining a preset associated parameter and the brightness coding result to obtain a target chroma component, wherein the preset associated parameter represents the association relation between the coding brightness and the coding chroma;
the video coding module is further configured to code the first chroma difference between the chroma component to be coded and the target chroma component to obtain a chroma coding result of the unit to be coded.
In this embodiment of the present application, the chrominance correction module is further configured to determine, based on the preset associated parameter, correction information corresponding to the luminance coding result on chrominance, where the correction information is used to correct the predicted chrominance component; and determining a fusion result between the predicted chrominance component and the correction information as the target chrominance component.
In this embodiment of the present application, the encoding apparatus further includes a parameter obtaining module, configured to obtain, from the frame image to be encoded, an encoding block to be referred to, where the encoding block to be referred to is adjacent to the unit to be encoded, where the encoding block to be referred to includes multiple encoded pixel points; selecting at least two reference pixel points from the plurality of encoded pixel points, and determining the reference encoding brightness and the reference encoding chromaticity corresponding to each reference pixel point; and determining the preset associated parameters based on the reference coding brightness and the reference coding chroma corresponding to each reference pixel point.
In this embodiment of the present application, the parameter obtaining module is further configured to construct at least two-dimensional coordinate points corresponding to at least two reference pixel points based on the reference coding brightness and the reference coding chromaticity corresponding to each reference pixel point; and performing linear fitting on the association relation between the reference coding brightness and the reference coding chromaticity based on at least two-dimensional coordinate points to obtain the preset association parameter.
In this embodiment of the present application, the encoding apparatus further includes an encoding determining module, configured to determine an encoding cost corresponding to the chroma encoding result as a first encoding cost, where the encoding cost is obtained through at least one of an encoding bit and an encoding quality loss, the encoding bit is an encoded data amount, and the encoding quality loss is a difference between a predicted chroma and an actual chroma; determining the coding cost corresponding to a target coding chromaticity as a second coding cost, wherein the target coding chromaticity is obtained by coding a second chromaticity difference, and the second chromaticity difference is the difference between the predicted chromaticity component and the chromaticity component to be coded; when the first coding cost is lower than the second coding cost, determining the chroma coding result as chroma to be decoded, and determining a coding identifier of the chroma to be decoded as a correction identifier, wherein the correction identifier represents that the chroma to be decoded is obtained by coding the first chroma difference; and obtaining the video to be decoded based on the chroma to be decoded carrying the correction identifier.
In this embodiment, the encoding apparatus further includes an encoding determining module, configured to determine, when the first encoding cost is higher than or equal to the second encoding cost, the target encoded chroma as the chroma to be decoded, and determine the encoded identifier of the chroma to be decoded as an unmodified identifier, where the unmodified identifier indicates that the chroma to be decoded is obtained by encoding the second chroma difference; and obtaining the video to be decoded based on the chroma to be decoded carrying the unmodified identifier.
In this embodiment of the present application, the encoding prediction module is further configured to determine, in the video to be encoded, at least one of the luminance component to be encoded and the chrominance component to be encoded as data to be searched; searching a pixel unit with the minimum difference with the data to be searched in the reference frame image corresponding to the frame image to be coded; and determining the searched pixel unit as the prediction unit matched with the unit to be coded in the frame image to be coded.
An embodiment of the present application provides a decoding apparatus for video processing, including:
the video decoding module is used for decoding a chroma coding result corresponding to a unit to be decoded of a frame image to be decoded in a video to be decoded to obtain a first chroma difference, wherein the video to be decoded is a coding result of the video to be coded, the frame image to be decoded is a coding result of the frame image to be coded in the video to be coded, and the unit to be decoded is a coding result of the unit to be coded in the frame image to be coded;
the decoding prediction module is used for determining a prediction unit from a reference frame image corresponding to the frame image to be decoded, wherein the prediction unit comprises a prediction brightness component and a prediction chroma component;
the decoding correction module is used for correcting the predicted chrominance component by combining a preset associated parameter and a luminance coding result to obtain a target chrominance component, wherein the preset associated parameter represents an associated relation between coding luminance and coding chrominance, the luminance coding result is a coding result of luminance difference between the predicted luminance component and a luminance component to be coded, and the unit to be coded comprises the luminance component to be coded;
the video decoding module is further configured to determine the first chroma difference and the fusion result of the target chroma unit as a chroma component to be encoded of the unit to be encoded.
In this embodiment of the present application, the decoding correction module is further configured to determine, based on the preset associated parameter, correction information corresponding to the luminance coding result on chrominance, where the correction information is used to correct the predicted chrominance component; and determining a fusion result between the predicted chrominance component and the correction information as the target chrominance component.
In this embodiment, the decoding apparatus further includes an identifier obtaining module, configured to obtain an encoded identifier of a chroma to be decoded in the video to be decoded.
In this embodiment of the present application, the video decoding module is further configured to determine, when the encoding identifier is a modification identifier, that the chroma to be decoded in the video to be decoded is the chroma encoding result corresponding to the unit to be decoded of the frame image to be decoded, where the modification identifier indicates that the chroma to be decoded is obtained by modifying a luma encoding result; and decoding the chrominance coding result to obtain the first chrominance difference.
In this embodiment of the present application, the video decoding module is further configured to determine, when the encoding identifier is an unmodified identifier, that the chroma to be decoded in the video to be decoded is a target encoding chroma corresponding to the unit to be decoded of the frame image to be decoded, where the target encoding chroma is obtained by encoding a second chroma difference, and the second chroma difference is a difference between the predicted chroma component and the chroma component to be encoded; decoding the target coding chroma in the video to be decoded to obtain a second chroma difference; determining the chroma component to be encoded of the unit to be encoded based on the second chroma difference and a fusion result of the predicted chroma components.
An embodiment of the present application provides an encoding apparatus for video processing, including:
a first memory for storing executable instructions;
and the first processor is used for realizing the video processing method applied to the encoding device side when executing the executable instructions stored in the first memory.
An embodiment of the present application provides a decoding device for video processing, including:
a second memory for storing executable instructions;
and the second processor is used for realizing the video processing method applied to the decoding device side provided by the embodiment of the application when the executable instructions stored in the second memory are executed.
The embodiment of the application provides a computer-readable storage medium, which stores executable instructions, and the executable instructions are used for realizing the video processing method applied to the encoding device side provided by the embodiment of the application when being executed by a first processor; or, the executable instructions are used for implementing the video processing method applied to the decoding device side provided by the embodiment of the application when being executed by the second processor.
The embodiment of the present application provides a computer program product, which includes a computer program or an instruction, and when the computer program or the instruction is executed by a first processor, the computer program or the instruction implements the video processing method applied to the encoding device side provided by the embodiment of the present application; alternatively, when the computer program or the instruction is executed by the second processor, the video processing method applied to the decoding device side provided by the embodiment of the present application is implemented.
The embodiment of the application has at least the following beneficial effects: when chroma coding is carried out on a unit to be coded on a frame image to be coded in a video to be coded, a luminance coding result is obtained based on the luminance difference between the luminance component to be coded and the predicted luminance component of the unit to be coded by combining the correlation between the coding luminance and the coding chroma, and then the predicted chroma component is corrected by combining the preset correlation parameter between the coding luminance and the coding chroma and the luminance coding result, so that a target chroma component can be accurately predicted; furthermore, when the chroma coding result of the unit to be coded is obtained by coding the first chroma difference between the chroma component to be coded and the target chroma component, the chroma coding accuracy can be improved, and the video coding performance can be improved.
Drawings
Fig. 1 is a first schematic block diagram of a video processing system according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a terminal in fig. 1 according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of another terminal in fig. 1 according to an embodiment of the present disclosure;
fig. 4 is a schematic block diagram illustrating a video processing system according to an embodiment of the present application;
fig. 5 is a first flowchart illustrating a video processing method according to an embodiment of the present application;
fig. 6 is a schematic flowchart illustrating a video processing method according to an embodiment of the present application;
fig. 7 is a third schematic flowchart of a video processing method according to an embodiment of the present application;
fig. 8 is a fourth schematic flowchart of a video processing method according to an embodiment of the present application;
fig. 9 is a fifth flowchart illustrating a video processing method according to an embodiment of the present application;
fig. 10 is a schematic diagram illustrating a distribution of an exemplary pixel block provided in an embodiment of the present application;
fig. 11 is a schematic diagram of an exemplary chroma encoding process provided in an embodiment of the present application;
fig. 12 is a schematic diagram of an exemplary motion search provided in an embodiment of the present application.
Detailed Description
In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the attached drawings, the described embodiments should not be considered as limiting the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first", "second", and the like, are only to distinguish similar objects and do not denote a particular order, but rather the terms "first", "second", and the like may be used interchangeably with the order specified, where permissible, to enable embodiments of the present application described herein to be practiced otherwise than as specifically illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used in the examples of this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the embodiments of the present application is for the purpose of describing the embodiments of the present application only and is not intended to be limiting of the present application.
Before further detailed description of the embodiments of the present application, terms and expressions referred to in the embodiments of the present application will be described, and the terms and expressions referred to in the embodiments of the present application will be used for the following explanation.
1) Artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer controlled machine to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In the embodiment of the present application, the prediction unit and the like may be determined in an artificial intelligence manner.
2) Chroma (Chroma), which describes the color and saturation of an image, is used to specify the color of a pixel. In video in "YUV" video format, "U" and "V" denote chrominance, while "Y" denotes brightness (Luma), also known as Luminance, i.e., gray scale value.
3) Inter-frame prediction, which refers to a method of predicting a pixel block in a current frame image by using a previously encoded frame image as a reference frame image; the sample points of the reference frame picture are often used as predictors for blocks of pixels in the current picture by compensation of motion vectors. The intra prediction is a method of performing prediction by using pixels on the left and upper sides of the current pixel block (based on the placement mode when the frame image is displayed) in the same frame image by using the correlation between adjacent pixels. In the video coding process, the difference value between an actual value and a predicted value is coded for both inter prediction and intra prediction. In addition, the prediction method according to the video encoding of the embodiment of the present application is inter prediction.
In order to implement chroma encoding, embodiments of the present application provide a video processing method, an apparatus, a device, a computer-readable storage medium, and a computer program product, which can improve the accuracy of chroma prediction and video encoding performance. The following describes an exemplary application of the device provided in the embodiment of the present application, and the device provided in the embodiment of the present application may be implemented as various types of terminals, such as a smart phone, a smart watch, a notebook computer, a tablet computer, a desktop computer, an intelligent appliance, a set-top box, an intelligent in-vehicle device, a portable music player, a personal digital assistant, a dedicated messaging device, an intelligent voice interaction device, a portable game device, and an intelligent sound box, and may also be implemented as a server. In the following, an exemplary application will be explained when the device is implemented as a terminal.
Referring to fig. 1, fig. 1 is a first schematic diagram of an architecture of a video processing system according to an embodiment of the present application; as shown in fig. 1, in order to support a video processing application, in the video processing system 100, a terminal 400 (called an encoding device) and a terminal 200 (called a decoding device) are connected to a server 600 through a network 300, and the network 300 may be a wide area network or a local area network, or a combination of the two. In addition, the video processing system 100 further includes a database 500 for providing data support to the server 600; fig. 1 shows a case where the database 500 is independent of the server 600, and the database 500 may also be integrated in the server 600, which is not limited in this embodiment of the present application.
The terminal 400 is configured to determine, in a video to be encoded, a prediction unit matched with a unit to be encoded in a frame image to be encoded from a reference frame image corresponding to the frame image to be encoded, where the unit to be encoded includes a luminance component to be encoded and a chrominance component to be encoded, and the prediction unit includes a predicted luminance component and a predicted chrominance component; encoding the brightness difference between the predicted brightness component and the brightness component to be encoded to obtain a brightness encoding result; correcting the predicted chrominance component by combining a preset association parameter and a luminance coding result to obtain a target chrominance component, wherein the preset association parameter represents the association relationship between the coding luminance and the coding chrominance; coding a first chrominance difference between the chrominance component to be coded and the target chrominance component to obtain a chrominance coding result of the unit to be coded; and also for transmitting a video to be decoded to the terminal 200 based on the chrominance encoding result through the network 300 and the server 600.
A terminal 200 for receiving a video to be decoded transmitted by the terminal 400 through the network 300 and the server 600; in a video to be decoded, decoding a chrominance coding result corresponding to a unit to be decoded of a frame image to be decoded to obtain a first chrominance difference, wherein the video to be decoded is a coding result of the video to be coded, the frame image to be decoded is a coding result of a frame image to be coded in the video to be coded, and the unit to be decoded is a coding result of the unit to be coded in the frame image to be coded; determining a prediction unit from a reference frame image corresponding to a frame image to be decoded, wherein the prediction unit comprises a prediction brightness component and a prediction chroma component; correcting the predicted chrominance component by combining a preset associated parameter and a luminance coding result to obtain a target chrominance component, wherein the preset associated parameter represents an associated relation between coding luminance and coding chrominance, the luminance coding result is a coding result of luminance difference between the predicted luminance component and a luminance component to be coded, and a unit to be coded comprises the luminance component to be coded; and determining the fusion result of the first chroma difference and the target chroma unit as the chroma component to be coded of the unit to be coded.
Referring to fig. 2, fig. 2 is a schematic diagram of a constituent structure of a terminal in fig. 1 according to an embodiment of the present disclosure, where the terminal 400 shown in fig. 2 includes: at least one first processor 410, a first memory 450, at least one first network interface 420, and a first user interface 430. The various components in the terminal 400 are coupled together by a first bus system 440. It is understood that the first bus system 440 is used to enable connection communications between these components. The first bus system 440 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as a first bus system 440 in fig. 2.
The first Processor 410 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The first user interface 430 includes one or more first output devices 431, including one or more speakers and/or one or more visual display screens, that enable the presentation of media content. The first user interface 430 also includes one or more first input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The first memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. The first memory 450 optionally includes one or more storage devices physically located remote from the first processor 410.
The first memory 450 includes either volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a Random Access Memory (RAM). The first memory 450 described in embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, the first memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
A first operating system 451 including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
a first network communication module 452 for communicating to other computing devices via one or more (wired or wireless) first network interfaces 420, an exemplary first network interface 420 comprising: bluetooth, wireless-compatibility authentication (Wi-Fi), and Universal Serial Bus (USB), etc.;
a first rendering module 453 for enabling the rendering of information (e.g., a user interface for operating peripherals and displaying content and information) via one or more first output devices 431 (e.g., a display screen, a speaker, etc.) associated with the first user interface 430;
a first input processing module 454 for detecting one or more user inputs or interactions from one of the one or more first input devices 432 and translating the detected inputs or interactions.
In some embodiments, an encoding apparatus for video processing provided by the embodiments of the present application may be implemented in software, and fig. 2 illustrates an encoding apparatus 455 stored in the first memory 450, which may be software in the form of programs and plug-ins, and includes the following software modules: a code prediction module 4551, a video coding module 4552, a chrominance correction module 4553, a parameter acquisition module 4554, and a code determination module 4555, which are logical and thus may be arbitrarily combined or further divided according to the functions implemented. The functions of the respective modules will be explained below.
Referring to fig. 3, fig. 3 is a schematic diagram of a structure of another terminal in fig. 1 according to an embodiment of the present disclosure, where the terminal 200 shown in fig. 3 includes: at least one second processor 210, a second memory 250, at least one second network interface 220, and a second user interface 230. The various components in the terminal 200 are coupled together by a second bus system 240. It is understood that the second bus system 240 is used to enable connection communication between these components. The second bus system 240 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various buses are labeled as the second bus system 240 in figure 3.
The second processor 210 may be an integrated circuit chip having signal processing capabilities, such as a general purpose processor, a digital signal processor, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general purpose processor may be a microprocessor or any conventional processor, etc.
The second user interface 230 includes one or more second output devices 231, including one or more speakers and/or one or more visual displays, that enable the presentation of media content. The second user interface 230 also includes one or more second input devices 232, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The second memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. The second memory 250 optionally includes one or more storage devices physically located remote from the second processor 210.
The second memory 250 includes either volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory and the volatile memory may be a random access memory. The second memory 250 described in embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, the second memory 250 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
A second operating system 251 including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
a second network communication module 252 for communicating to other computing devices via one or more (wired or wireless) second network interfaces 220, an exemplary second network interface 220 comprising: bluetooth, wireless compatibility authentication, universal serial bus, and the like;
a second presentation module 253 for enabling presentation of information (e.g., a user interface for operating peripherals and displaying content and information) via one or more second output devices 231 (e.g., a display screen, speakers, etc.) associated with the second user interface 230;
a second input processing module 254 for detecting one or more user inputs or interactions from one of the one or more second input devices 232 and translating the detected inputs or interactions.
In some embodiments, a decoding apparatus for video processing provided by the embodiments of the present application may be implemented in software, and fig. 3 shows a decoding apparatus 255 for video processing stored in the second memory 250, which may be software in the form of programs and plug-ins, and includes the following software modules: the video decoding module 2551, the decoding prediction module 2552, the decoding modification module 2553 and the identification acquisition module 2554 are logical and thus can be arbitrarily combined or further divided according to the functions implemented. The functions of the respective modules will be explained below.
In some embodiments, the encoding apparatus and the decoding apparatus provided in the embodiments of the present Application may be implemented in hardware, and by way of example, the encoding apparatus and the decoding apparatus provided in the embodiments of the present Application may be a processor in the form of a hardware decoding processor, which is programmed to execute the video processing method provided in the embodiments of the present Application, for example, the processor in the form of the hardware decoding processor may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating an architecture of a video processing system according to an embodiment of the present application; as shown in fig. 4, in order to support a video processing application, in the video processing system 100, a terminal 700 (illustratively, a terminal 700-1 and a terminal 700-2, referred to as an encoding device and a decoding device) is connected to a server 600 through a network 300, and the server 600 is used to provide a computing service to the terminal 700 through the network 300. Among them, the terminal 700 is integrated with the encoding function of the terminal 400 in fig. 1 and is also integrated with the decoding function of the terminal 200.
In some embodiments, the server 600 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. The terminal 200, the terminal 400, and the terminal 700 may be, but are not limited to, a smart phone, a smart watch, a notebook computer, a tablet computer, a desktop computer, a smart television, a set-top box, a smart car device, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device, a smart speaker, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the embodiment of the present application is not limited.
In some embodiments, the terminal or the server may implement the video processing method provided by the embodiment of the present application by running a computer program. For example, the computer program may be a native program or a software module in an operating system; the Application program may be a local (Native) Application program (APP), that is, a program that needs to be installed in an operating system to run, such as a shooting APP, a live APP, or an instant messaging APP; or may be an applet, i.e. a program that can be run only by downloading it to the browser environment; but also an applet that can be embedded into any APP. In general, the computer programs described above may be any form of application, module or plug-in.
In the following, the video processing method provided by the embodiment of the present application will be described in conjunction with exemplary applications and implementations of the apparatus provided by the embodiment of the present application. In addition, the video processing method provided by the embodiment of the application is applied to various video processing scenes such as cloud technology, artificial intelligence, intelligent transportation and vehicle-mounted video processing scenes.
Referring to fig. 5, fig. 5 is a first flowchart illustrating a video processing method according to an embodiment of the present application; as shown in fig. 5, the video processing method is performed by an encoding apparatus, and will be described below with reference to the steps shown in fig. 5.
In the embodiment of the application, in the process of coding a video to be coded, when the coding of a reference frame image is completed and a unit to be coded in the frame image to be coded is coded, a coding device firstly predicts the unit to be coded; here, since the encoding apparatus predicts the unit to be encoded in the manner of inter prediction, a pixel block matching the unit to be encoded is selected as a prediction unit from a reference frame image.
It should be noted that the video to be encoded refers to a video to be subjected to video encoding, and may be a video acquired in real time, a video obtained historically, a combination of the two, and the like, which is not limited in this embodiment of the present application. Here, when encoding a video to be encoded, the encoding apparatus divides a frame image to be encoded into encoding units and encodes the frame image in units of the encoding units; each coding unit comprises a pixel block with a specified size, and the unit to be coded is a coding unit to be coded; in addition, the prediction unit may refer to a coding unit with the smallest difference with a unit to be coded in each coding unit of the reference frame image, and may also refer to a pixel block (which may include partial regions of a plurality of coding units) with the smallest difference with the unit to be coded in the reference frame image, wherein the measure of the difference may be implemented based on at least one of chroma and brightness; and, the prediction unit and the unit to be encoded may be uniform in size.
It should also be noted that the unit to be encoded and the prediction unit both include corresponding chrominance components and luminance components, where the chrominance component corresponding to the unit to be encoded is the chrominance component to be encoded, the luminance component corresponding to the unit to be encoded is the luminance component to be encoded, the luminance component corresponding to the prediction unit is the prediction luminance component, and the chrominance component corresponding to the prediction unit is the prediction chrominance component.
In the embodiment of the application, the encoding device firstly obtains the difference between the predicted luminance component and the luminance component to be encoded, determines the obtained difference as the luminance difference, and then encodes the luminance difference, wherein the obtained encoding result is the luminance encoding result of the unit to be encoded. The luminance difference between the predicted luminance component and the luminance component to be encoded is, for example, a difference between the luminance component to be encoded and the predicted luminance component.
It should be noted that the luminance coding result is used as a coding result of the luminance component to be coded, and is used to obtain the luminance component to be coded through decoding, and is also used to correct the predicted chrominance component corresponding to the unit to be coded, so as to improve the accuracy of chrominance prediction of the unit to be coded, and further improve the chrominance coding performance.
In the embodiment of the present application, there are correlations such as a linear relationship between luminance and chrominance, for example, luminance and chrominance are positively correlated in a variation trend, and for example, luminance and chrominance are positively correlated in a value, and the like; therefore, there is also a correlation such as a linear relationship between the encoded luminance (simply referred to as encoded luminance) and the encoded chrominance (simply referred to as encoded chrominance); therefore, the encoding device may preset a preset associated parameter between the encoding luminance and the encoding chrominance, and may also obtain the preset associated parameter between the encoding luminance and the encoding chrominance through an associated relationship between a reference encoding luminance and a reference encoding chrominance corresponding to the unit to be encoded, and the like, which is not limited in the embodiment of the present application. Here, the encoding device corrects the predicted chrominance component by combining the preset associated parameter and the luminance encoding result, so as to realize the cross component prediction of the chrominance component to be encoded; and the coding equipment takes the target chroma component as a final chroma prediction result corresponding to the unit to be coded.
It should be noted that the preset association parameter represents an association relationship between the coded luminance and the coded chrominance, for example, a linear parameter between the coded luminance and the coded chrominance: a slope corresponding to the encoded luminance and the encoded chrominance, or a slope and an intercept corresponding to the encoded luminance and the encoded chrominance; the reference coding brightness is a brightness coding result of a coded pixel point which is selected by the pointer to the unit to be coded and used as a reference, and the reference coding chromaticity is a chromaticity coding result of the coded pixel point which is selected by the pointer to the unit to be coded and used as the reference; in addition, the encoded pixel points selected by the encoding device for the unit to be encoded as a reference may be pixel points adjacent to the unit to be encoded in the frame image to be encoded, or pixel points whose distance from the unit to be encoded in the frame image to be encoded is smaller than a distance threshold, and the like, which is not limited in this embodiment of the present application.
In the embodiment of the application, after obtaining the target chroma component, the coding device takes the target chroma component as a final chroma prediction result corresponding to the chroma component to be coded of the unit to be coded; therefore, the encoding device firstly obtains the difference between the chrominance component to be encoded and the target chrominance component, determines the obtained difference as a first chrominance difference, and then encodes the first chrominance difference, wherein the obtained encoding result is the chrominance encoding result of the unit to be encoded.
It can be understood that, when chroma coding is performed on a unit to be coded on a frame image to be coded in a video to be coded, a luminance coding result is obtained based on a luminance difference between a luminance component to be coded and a predicted luminance component of the unit to be coded by combining correlation between coding luminance and coding chroma, and then the predicted chrominance component is corrected by combining a preset correlation parameter between the coding luminance and the coding chroma, so that a target chroma component can be accurately predicted; furthermore, when the chroma coding result of the unit to be coded is obtained by coding the first chroma difference between the chroma component to be coded and the target chroma component, the accuracy of chroma coding can be improved, and the performance of video coding can be improved.
Referring to fig. 6, fig. 6 is a schematic flowchart diagram of a video processing method according to an embodiment of the present application; as shown in fig. 6, in the embodiment of the present application, step 503 can be implemented by step 5031 and step 5032; that is, the encoding device corrects the predicted chrominance component by combining the preset correlation parameter and the luminance encoding result to obtain the target chrominance component, including step 5031 and step 5032, which will be described below.
In the embodiment of the application, the encoding device determines information corresponding to the luminance encoding result on the chrominance based on the preset associated parameter, and takes the determined information corresponding to the luminance encoding result on the chrominance as the correction information; wherein the correction information is used to correct the predicted chrominance component. Here, the encoding apparatus may determine a result of fusion between the preset correlation parameter and the luminance encoding result as the correction information.
In step 5032, the encoding device determines the fusion result between the predicted chrominance component and the correction information as the target chrominance component.
It should be noted that the encoding apparatus modifies the predicted chrominance component based on the correction information by obtaining a fusion result between the predicted chrominance component and the correction information, so that the fusion result between the predicted chrominance component and the correction information is the target chrominance component.
It can be understood that, the encoding device determines correction information corresponding to the luminance encoding result on the chrominance based on the preset associated parameter, and reduces the difference between the final chrominance prediction result corresponding to the unit to be encoded and the actual chrominance component to be encoded based on the correction information, so that the accuracy of chrominance prediction is improved, and further the chrominance encoding performance can be improved, and the video encoding performance can also be improved.
In this embodiment of the present application, step 503 further includes a process of obtaining a preset correlation parameter, and when the encoding device obtains the preset correlation parameter between the encoded luminance and the encoded chrominance through a correlation between a reference encoded luminance and a reference encoded chrominance corresponding to the unit to be encoded, step 503 further includes step 505 to step 507 (not shown in the figure); that is, before the encoding device modifies the predicted chrominance component according to the preset associated parameter and the luminance encoding result to obtain the target chrominance component, the video processing method further includes steps 505 to 507, which are described below.
And 505, the coding device acquires a coding block to be referred adjacent to the unit to be coded from the frame image to be coded.
In the embodiment of the application, when the encoded pixel point selected by the encoding device as a reference for the unit to be encoded is a pixel point adjacent to the unit to be encoded in the frame image to be encoded, the encoding device obtains the reference encoded pixel point by obtaining the encoded block to be referenced adjacent to the unit to be encoded in the frame image to be encoded. The coding block to be referred comprises a plurality of coded pixel points, and the plurality of coded pixel points are adjacent to the unit to be coded; for example, the coding block to be referred to includes a plurality of adjacent coded pixel points on at least one of upper, lower, left, and right sides adjacent to the unit to be coded.
Step 506, the encoding device selects at least two reference pixel points from the plurality of encoded pixel points, and determines the reference encoding brightness and the reference encoding chromaticity corresponding to each reference pixel point.
In this embodiment of the present application, after obtaining a plurality of encoded pixel points, an encoding device may select at least two reference pixel points from the plurality of encoded pixel points at will, or may select at least two reference pixel points from the plurality of encoded pixel points according to a specified pixel point position, or may select at least two reference pixel points from the plurality of encoded pixel points based on a preset selection rule (for example, a selection policy for achieving uniform selection), and so on, which is not limited in this embodiment of the present application. Here, as for the selected at least two reference pixel points, each reference pixel point is already encoded, the encoding device can obtain a luminance encoding result and a chrominance encoding result of each reference pixel point, wherein the luminance encoding result of each reference pixel point is reference encoding luminance, and the chrominance encoding result of each reference pixel point is reference encoding chrominance.
It should be noted that one reference pixel point of the at least two reference pixel points selected by the encoding device is an encoded pixel point of the encoded pixel points included in the encoding block to be referred to.
Step 507, the encoding device determines preset associated parameters based on the reference encoding brightness and the reference encoding chromaticity corresponding to each reference pixel point.
In the embodiment of the application, the encoding device determines the association relationship between the encoding brightness and the encoding chromaticity based on the reference encoding brightness and the reference encoding chromaticity corresponding to each reference pixel point in at least two reference pixel points, so that the preset association parameter is obtained.
In this embodiment of the present application, the step 507 determining, by the encoding device, a preset associated parameter based on the reference encoding luminance and the reference encoding chrominance corresponding to each reference pixel point includes: the encoding device constructs at least two-dimensional coordinate points corresponding to at least two reference pixel points based on the reference encoding brightness and the reference encoding chroma corresponding to each reference pixel point; and performing linear fitting on the association relationship between the reference coding brightness and the reference coding chromaticity based on at least two-dimensional coordinate points to obtain a preset association parameter.
It should be noted that, the encoding device uses the reference encoding brightness and the reference encoding chromaticity corresponding to each reference pixel point as coordinate values of each space in the two-dimensional space, and can obtain a corresponding two-dimensional coordinate point for each reference pixel point, so that at least two-dimensional coordinate points can be obtained for at least two reference pixel points.
It can be understood that, since the linear relationship can be obtained by two reference pixel points, here, when the at least two reference pixel points are at least three reference pixel points, the encoding device obtains the preset associated parameter based on the at least three reference pixel points, so as to improve the accuracy of the preset associated parameter, and when performing the chromaticity prediction based on the preset associated parameter, the accuracy of the chromaticity prediction can be improved.
Referring to fig. 7, fig. 7 is a schematic flowchart illustration three of a video processing method provided in the embodiment of the present application; as shown in fig. 7, in the embodiment of the present application, step 504 is followed by step 508 to step 511; that is to say, after the encoding device encodes the first chroma difference between the chroma component to be encoded and the target chroma component to obtain the chroma encoding result of the unit to be encoded, the video processing method further includes steps 508 to 511, which are described below.
And step 508, the coding device determines the coding cost corresponding to the chroma coding result as a first coding cost.
In the embodiment of the application, after the coding device obtains the chroma coding result by correcting the predicted chroma component, the coding cost corresponding to the chroma coding result is also obtained, namely the first coding cost; chroma encoding is performed in a manner that determines whether to apply a modification based on the first encoding cost.
It should be noted that the coding cost is obtained by at least one of a coding bit and a coding quality loss, wherein the coding bit is a data amount to be coded, and the coding quality loss is a difference between the predicted chroma and the actual chroma.
In step 509, the encoding device determines the encoding cost corresponding to the target encoding chroma as the second encoding cost.
In this embodiment of the present application, the encoding device further performs chroma encoding on the difference between the predicted chroma component and the chroma component to be encoded, and obtains a corresponding encoding cost, that is, an encoding cost corresponding to the target encoded chroma, where the encoding cost corresponding to the target encoded chroma is referred to as a second encoding cost.
It should be noted that the target coding chroma is obtained by coding a second chroma difference, where the second chroma difference is a difference between the predicted chroma component and the chroma component to be coded; that is, the target encoded chroma is a result obtained by the encoding apparatus by chroma-encoding the difference between the predicted chroma component and the chroma component to be encoded.
And step 510, when the first coding cost is lower than the second coding cost, the coding device determines the chroma coding result as the chroma to be decoded, and determines the coding identifier of the chroma to be decoded as the correction identifier.
In the embodiment of the present application, the encoding device determines the final chroma encoding mode by comparing the first encoding cost and the second encoding cost. When the first coding cost is lower than the second coding cost, the chroma coding mode for obtaining the chroma coding result by correcting the predicted chroma component is superior to the chroma coding mode for carrying out chroma coding on the difference between the predicted chroma component and the chroma component to be coded; therefore, at this time, the encoding device determines to adopt a chroma encoding mode for correcting the predicted chroma component to obtain a chroma encoding result, so that the encoding device determines the chroma encoding result as the chroma to be decoded and determines the encoding identifier of the chroma to be decoded as the correction identifier, so that the chroma decoding is carried out based on the correction identifier and adopting a chroma decoding mode adaptive to the chroma encoding mode during decoding. Wherein, the correction identifier indicates that the chroma to be decoded is obtained by encoding the first chroma difference.
And 511, the coding equipment obtains the video to be decoded based on the chroma to be decoded carrying the correction identifier.
In the embodiment of the application, after the encoding device completes the chroma encoding of the unit to be encoded and obtains the chroma to be decoded carrying the correction identifier, the encoding device continues to perform the encoding of the next unit to be encoded until the encoding of the video to be encoded is completed, and then the video to be decoded is obtained; it is easy to know that the video to be decoded is the encoding result of the video to be encoded, and the video to be decoded includes the chroma to be decoded carrying the correction identifier.
With continued reference to fig. 7, in the present embodiment, step 509 is followed by step 512 and step 513; that is, after the encoding device determines the encoding cost corresponding to the target encoding chroma as the second encoding cost, the video processing method further includes steps 512 and 513, which are described below.
And step 512, when the first coding cost is higher than or equal to the second coding cost, the coding device determines the target coding chroma as the chroma to be decoded, and determines the coding identifier of the chroma to be decoded as an unmodified identifier.
In the embodiment of the present application, when the first coding cost is higher than or equal to the second coding cost, it indicates that the chroma coding method of performing chroma coding on the difference between the predicted chroma component and the chroma component to be coded is better than the chroma coding method of obtaining a chroma coding result by correcting the predicted chroma component; therefore, at this time, the encoding device determines to adopt a chroma encoding mode for chroma encoding of the difference between the predicted chroma component and the chroma component to be encoded, so that the encoding device determines the target encoded chroma as the chroma to be decoded and determines the encoding identifier of the chroma to be decoded as an unmodified identifier, so that the chroma decoding is carried out based on the unmodified identifier in a chroma decoding mode adaptive to the chroma encoding mode during decoding. Wherein the unmodified flag indicates that the chroma to be decoded is obtained by encoding the second chroma difference.
And 513, the coding device obtains the video to be decoded based on the chroma to be decoded carrying the uncorrected identifier.
In the embodiment of the application, after the encoding device completes the chroma encoding of the unit to be encoded and obtains the chroma to be decoded carrying the unmodified identifier, the encoding device continues to perform the encoding of the next unit to be encoded until the encoding of the video to be encoded is completed, and the video to be decoded is also obtained; it is easy to know that the video to be decoded includes the chroma to be decoded carrying the uncorrected identifier.
It can be understood that the coding device obtains the chroma coding mode with the lowest coding cost for chroma coding by comparing different chroma coding modes, and can improve the chroma coding performance.
In this embodiment of the present application, in step 501, an encoding apparatus determines, in a video to be encoded, a prediction unit that matches a unit to be encoded in a frame image to be encoded from a reference frame image corresponding to the frame image to be encoded, including: the encoding equipment determines at least one of a luminance component to be encoded and a chrominance component to be encoded as data to be searched in a video to be encoded; searching a pixel unit with the minimum difference with the data to be searched in a reference frame image corresponding to the frame image to be coded; and determining the searched pixel unit as a prediction unit matched with the unit to be coded in the frame image to be coded.
It should be noted that the encoding apparatus performs inter-frame search based on at least one of the luminance component to be encoded and the chrominance component to be encoded, and determines the searched best matching pixel unit as the prediction unit.
Referring to fig. 8, fig. 8 is a fourth schematic flowchart of a video processing method according to an embodiment of the present application; as shown in fig. 8, the video processing method is performed by a decoding apparatus, and will be described below with reference to the steps shown in fig. 8.
It should be noted that the frame image to be decoded is the encoding result of the frame image to be encoded in the video to be encoded, and the unit to be decoded is the encoding result of the unit to be encoded in the frame image to be encoded; in addition, the process of decoding the chroma encoding result by the decoding apparatus to obtain the first chroma difference is the inverse process of the process of encoding the first chroma difference by the encoding apparatus in step 504 to obtain the chroma encoding result.
It should be noted that the decoding apparatus is capable of determining the prediction unit from the reference frame image corresponding to the frame image to be encoded according to the encoding information (e.g., including information indicating a pixel unit for reference encoding) of the unit to be decoded.
And 516, correcting the predicted chrominance component of the prediction unit by the decoding equipment according to the preset associated parameter and the luminance coding result to obtain a target chrominance component.
It should be noted that the decoding device can obtain the luminance coding result of the unit to be decoded, so that after the predicted chrominance component of the prediction unit is obtained, the predicted chrominance component is corrected by combining the preset associated parameter and the luminance coding result to obtain the target chrominance component; since the process of the decoding device modifying the predicted chrominance component to obtain the target chrominance component in combination with the preset associated parameter and the luminance coding result is similar to the process of the encoding device modifying the predicted chrominance component to obtain the target chrominance component in combination with the preset associated parameter and the luminance coding result in step 503, the description of the embodiment of the present application is not repeated here. The luminance coding result is a coding result of the luminance difference between the predicted luminance component and the luminance component to be coded, and the unit to be coded comprises the luminance component to be coded.
And 517, determining the first chroma difference and the fusion result of the target chroma unit as the chroma component to be coded of the unit to be coded by the decoding equipment.
It should be noted that the process of the decoding device fusing the first chroma difference and the target chroma unit into the chroma component to be encoded is the inverse process of the encoding device obtaining the first chroma difference between the chroma component to be encoded and the target chroma component, which is described in step 504.
In this embodiment, in step 516, the decoding device corrects the predicted chroma component by combining the preset associated parameter and the luma coding result, so as to obtain a target chroma component, including: the decoding device determines correction information corresponding to the luminance coding result on the chrominance based on the preset correlation parameter, and determines a fusion result between the predicted chrominance component and the correction information as a target chrominance component.
It should be noted that, a process of determining, by the decoding device, the correction information based on the preset correlation parameter and the luminance encoding result, and correcting the predicted chrominance component based on the correction information to obtain the target chrominance component is similar to the implementation process corresponding to the step 5031 and the step 5032, and a description of the embodiment of the present application is not repeated here.
Referring to fig. 9, fig. 9 is a schematic flowchart illustration five of a video processing method provided in the embodiment of the present application; as shown in fig. 9, in the embodiment of the present application, step 518 is further included before step 514; that is to say, before the decoding device decodes the chroma encoding result corresponding to the unit to be decoded of the frame image to be decoded in the video to be decoded to obtain the first chroma difference, the video processing method further includes step 518, which is described below.
It should be noted that the coding identifier is used to determine a chroma coding mode of the chroma to be decoded, and then the chroma decoding can be performed on the chroma to be decoded based on the determined chroma coding mode. The encoding identifier may be a modified identifier or an unmodified identifier, and is an identifier stored in the video to be decoded by the encoding end.
With reference to fig. 9, in this embodiment of the application, in step 514, the decoding device decodes the chroma encoding result corresponding to the to-be-decoded unit of the to-be-decoded frame image in the to-be-decoded video to obtain the first chroma difference, including step 5141 and step 5142, which are described below.
It should be noted that, when the coding flag is the modified flag, it indicates that the adopted chroma coding mode is: obtaining a chroma coding mode of a chroma coding result by correcting the predicted chroma component, so that the decoding equipment determines the chroma to be decoded as the chroma coding result; wherein, the correction mark indicates that the chroma to be decoded is obtained by correcting the brightness coding result.
The first chroma difference is a target of chroma encoding and is also a result of chroma decoding.
With reference to fig. 9, step 518 further includes step 519, that is, after the decoding apparatus acquires the encoded identifier of the chroma to be decoded in the video to be decoded, the video processing method further includes steps 519 to 521, which are described below.
And step 519, when the coding identifier is an unmodified identifier, the decoding device determines that the chroma to be decoded in the video to be decoded is the target coding chroma corresponding to the unit to be decoded of the frame image to be decoded.
It should be noted that, when the coding flag is the modification flag, it indicates that the adopted chroma coding mode is: the decoding apparatus determines the chroma to be decoded as the target encoded chroma by a chroma encoding method of chroma encoding a difference between the predicted chroma component and the chroma component to be encoded.
And step 520, decoding the target coding chromaticity in the video to be decoded by the decoding equipment to obtain a second chromaticity difference.
It should be noted that the process of decoding the target encoded chroma by the decoding apparatus to obtain the second chroma difference is the inverse process of the process of encoding the second chroma difference by the encoding apparatus, which is described in correspondence to step 509, to obtain the target encoded chroma.
In step 521, the decoding apparatus determines the chroma component to be encoded of the unit to be encoded based on the second chroma difference and the fusion result of the predicted chroma components.
It should be noted that the process of obtaining the chrominance component to be encoded based on the second chrominance difference and the predicted chrominance component by the decoding apparatus is the inverse process of the process of obtaining the second chrominance difference based on the predicted chrominance component and the chrominance component to be encoded by the encoding apparatus, which is described corresponding to step 509.
Next, an exemplary application of the embodiment of the present application in a practical application scenario will be described. The exemplary application describes that when a video is encoded by adopting an inter-frame coding mode, in combination with a correlation existing between a luminance Component (called to-be-encoded luminance Component) and a chrominance Component (called to-be-encoded chrominance Component) in a coding block (called to-be-encoded unit), a predicted chrominance block (called to-be-predicted chrominance Component) corresponding to the coding block is corrected based on a residual result (called to-be-encoded luminance Component) of encoding reconstruction of the luminance Component, that is, Cross-Component Linear Model (CCLM) prediction (called Cross-Component prediction) is performed on a residual of the chrominance Component of the inter-coding block, so that the accuracy of prediction of the chrominance Component in the inter-coding block can be improved.
It should be noted that CCLM prediction is used to realize prediction of chroma based on brightness, and is realized by using α and β in the CCLM prediction process; wherein α and β are chroma prediction linear parameters (referred to as preset associated parameters), which are linear coefficients determined by comparing luminance coding values and chroma coding values of adjacent reference pixel points; for example, α and β can be calculated from the chrominance code values (referred to as reference coded luminance) of 4 adjacent reference pixels (referred to as at least two reference pixels) and the corresponding down-sampled luminance code values (referred to as reference coded chrominance).
The acquisition process of α and β is explained below. Referring to fig. 10, fig. 10 is a schematic diagram illustrating a distribution of an exemplary pixel block provided in an embodiment of the present application; as shown in fig. 10, the pixel block 10-11 is a chrominance component (referred to as a chrominance component to be encoded) of the coding block 10-1, and the pixel block 10-12 is a luminance component (referred to as a luminance component to be encoded) of the coding block; the black circles adjacent to the pixel blocks 10-11 and 10-12, respectively, are the reconstructed pixel values (i.e., the encoded values, where the black circle adjacent to the pixel block 10-1 is the chroma encoded value (referred to as the reference encoded chroma) and the black circle adjacent to the pixel block 10-11 is the downsampled luma encoded value (referred to as the reference encoded luma)). In addition, the pixel block 10-11 includes N × N pixel points, and the pixel block 10-12 includes 2N × 2N pixel points, so that the number of pixel points included in the pixel block 10-12 is four times the number of pixel points included in the pixel block 10-11, and thus, the reconstructed pixel values adjacent to the pixel block 10-12 are down-sampled to accurately compare the luminance code value and the chrominance code value.
It should be noted that, according to the difference of the selected reference pixels when calculating the α and β parameters, the CCLM prediction can be divided into three modes, i.e., an LM mode, an LM-a mode, and an LM-L mode. When the size of the chrominance component is W × H, if the width W 'for selecting the reference pixel point is W and the height H' for selecting the reference pixel point is H, the mode of the CCLM prediction is the LM mode; if W ═ W + H, then the mode predicted by CCLM is the LM-a mode; if H' ═ H + W, then the pattern predicted by CCLM is the LM-L pattern. When the position of the adjacent pixel strip above the chrominance component is denoted as S0, -1 … S W '-1, -1 and the position of the left adjacent pixel strip (where the adjacent pixel strip above the chrominance component and the left adjacent pixel strip are collectively referred to as a coding block to be referred to) is denoted as S-1, 0 … S-1, H' -1, the selection manner of the reference pixel point in each mode is described below.
In the LM mode, when the adjacent pixel points above and on the left side of the coding block are available, the selected reference pixel points are as follows: s [ W '/4, -1], S [ 3W'/4, -1], S [ -1, H '/4 ], and S [ -1, 3H'/4 ]. Wherein available means that encoding has been completed.
In the LM-a mode, or when the upper neighboring pixel is available, the selected reference pixels are: s [ W '/8, -1], S [ 3W'/8, -1], S [ 5W '/8, -1], and S [ 7W'/8, -1 ].
In the LM-L mode, or when the left neighboring pixel is available, the selected reference pixels are: s [ -1, H '/8 ], S [ -1, 3H'/8 ], S [ -1, 5H '/8 ], and S [ -1, 7H'/8 ].
After the positions of the adjacent 4 reference pixel points are obtained, two maximum values are determined from four down-sampling brightness coding values corresponding to the positions of the 4 reference pixel points:andand two minimum valuesAndthus, the chroma prediction linear parameter α can be realized by the equation (1), and the chroma prediction linear parameter β can be realized by the equation (2), where the equations (1) and (2) are shown below.
α=(Y a –Y b )/(X a –X b ) (1);
β=Y b -α*X b (2);
Wherein, X a Is the 2 largest luminance value of the four downsampled luminance code values ((And) Average value of (A), Y a Is two chroma code values corresponding to 2 maximum luminance values: (And) Average value of (a). X b Is two minimum luma coding values of four downsampled luma coding values: (And) Average value of (A), Y b Is the two chroma code values corresponding to the two minimum luma code values (And) Average value of (a).
It should be noted that, in the encoding process, the best CCLM prediction mode is generally selected for encoding through the encoding cost. In addition, since the CCLM prediction modes are three in total, the mode selected by the encoding end (called encoding device) needs to be encoded and transmitted, and the decoding end (called decoding device) obtains the selected mode by decoding the code stream information.
Referring to fig. 11, fig. 11 is a schematic diagram of an exemplary chroma encoding process provided in an embodiment of the present application; as shown in fig. 11, the exemplary chroma encoding process includes steps 1101 to 1103, which are executed by an encoding side, and each step is described below.
It should be noted that the designated mode may be any one of CCLM modes, such as an LM mode; the method may further select the one with the highest accuracy from the CCLM modes, and the like, which is not limited in this embodiment of the present application. Among them, the chroma prediction linear parameters α and β can be obtained by the above formulas (1) and (2).
It should be noted that, for an inter-frame coding block, matching the coding block in a reference frame based on a motion search strategy to obtain a prediction block with the minimum coding cost; the motion search process may perform a search based on a luma block, or may perform a simultaneous search by combining the luma block and a chroma block (referred to as a luma component to be coded and a chroma component to be coded), which is not limited in the embodiment of the present application. Next, when the current coding block is D, the luminance block corresponding to the coding block D is Y, and the chrominance block corresponding to the coding block D is C, an optimal Motion Vector (MV) can be obtained through inter-frame motion search, and the coding block pointed by the optimal motion vector is a prediction block (referred to as a prediction unit) of the coding block D. Referring to fig. 12, fig. 12 is a schematic diagram of an exemplary motion search provided by an embodiment of the present application, and as shown in fig. 12, a coding block to which a best motion vector corresponding to a current coding block 12-21 in a coding frame picture 12-2 points is a coding block 12-11 in a reference frame picture 12-1; thus, the coding block 12-11 is a prediction block of the current coding block 12-21.
Here, when the prediction (referred to as a predicted luma component) of the luma block of the coding block D is Pred _ Y and the prediction (referred to as a predicted chroma component) of the chroma block is Pred _ C (i.e., the luma block of the prediction block is Pred _ Y and the chroma block is Pred _ C), the residual Resi _ Y (referred to as a luma difference) of the luma block of the coding block D can be described by equation (3), and equation (3) is as follows.
Resi_Y=Y-Pred_Y (3);
Then, based on the obtained chroma prediction linear parameters, predicting the prediction residual of the chroma block of the coding block D, namely correcting the prediction of the chroma block of the coding block D; the process of the correction can be described by equation (4), and equation (4) is shown below.
Pred_C’=Pred_C+α×Resi_Y’+β (4);
Wherein Pred _ C' is a prediction of the chroma block of the modified coded block D (referred to as a target chroma component); resi _ Y 'is a luminance encoding result, and is obtained by encoding the residual Resi _ Y of the luminance block of the encoded block D, and α × Resi _ Y' + β is referred to as correction information.
In step 1103, chroma coding is performed based on the flag (referred to as a coding flag) and the prediction of the modified chroma block.
When chroma coding is performed, the residual Resi _ C of the chroma block of the coding block D can be described by equation (5), where equation (5) is shown below.
Resi_C=C-Pred_C’ (5);
In the encoding process of the encoding block D, the residual Resi _ C (referred to as a first chroma difference) may be encoded, and thus the chroma encoding of the encoding block D is completed. Because the brightness and the chroma value of the adjacent reconstructed pixel of the coding unit can be obtained at the decoding end, and the decoding end can obtain the correction of chroma block prediction based on the reconstructed brightness residual error, the calculation process of the linear parameter is carried out at the coding end, and the decoding end also carries out the same operation, so the parameters alpha and beta are not required to be recorded in the code stream, and the parameters alpha and beta do not need to be coded and transmitted.
It should be further noted that, in the encoding process, the CCLM prediction may be directly performed on the chroma block of the encoding block D in steps 1101 to 1103 for chroma block prediction of the encoding block D, and at this time, the encoding end does not need to store or transmit a flag bit to the decoding end; whether the chroma block of the coding block D is subjected to CCLM prediction can be indicated through a flag bit, the flag bit can be indicated through a 1-bit flag bit (flag), if the flag bit is 1, the chroma block of the coding block D is subjected to CCLM prediction, and at the moment, the final prediction of the chroma block of the coding block D is the prediction of the chroma block of the modified coding block D; if the flag bit is 0, it indicates that CCLM prediction is not performed on the chroma block of the coding block D, and at this time, the final prediction of the chroma block of the coding block D is the chroma block of the prediction block.
It can be understood that, in the video processing method provided in the embodiment of the present application, based on the correlation between the chroma and the luma, the prediction of the chroma block of the coding block is modified by combining the luma coding result, so as to improve the accuracy of the chroma prediction, and thus the chroma coding performance can be improved.
Continuing with the exemplary structure provided by the present application for implementing the encoding apparatus 455 for video processing as software modules, in some embodiments, as shown in fig. 2, the software modules stored in the encoding apparatus 455 of the first memory 450 may include:
a coding prediction module 4551, configured to determine, in a video to be coded, a prediction unit that matches a unit to be coded in a frame image to be coded from a reference frame image corresponding to the frame image to be coded, where the unit to be coded includes a luminance component to be coded and a chrominance component to be coded, and the prediction unit includes a predicted luminance component and a predicted chrominance component;
a video coding module 4552, configured to code a luminance difference between the predicted luminance component and the luminance component to be coded, so as to obtain a luminance coding result;
a chroma correction module 4553, configured to correct the predicted chroma component by combining a preset associated parameter and the luma coding result, so as to obtain a target chroma component, where the preset associated parameter represents an associated relationship between coding luma and coding chroma;
the video encoding module 4552 is further configured to encode the first chroma difference between the chroma component to be encoded and the target chroma component, so as to obtain a chroma encoding result of the unit to be encoded.
In this embodiment of the application, the chrominance correction module 4553 is further configured to determine, based on the preset associated parameter, correction information corresponding to the luminance coding result in chrominance, where the correction information is used to correct the predicted chrominance component; and determining a fusion result between the predicted chrominance component and the correction information as the target chrominance component.
In this embodiment of the present application, the encoding apparatus 455 further includes a parameter obtaining module 4554, configured to obtain, from the frame image to be encoded, an encoding block to be referred to that is adjacent to the unit to be encoded, where the encoding block to be referred to includes multiple encoded pixel points; selecting at least two reference pixel points from the plurality of encoded pixel points, and determining the reference encoding brightness and the reference encoding chromaticity corresponding to each reference pixel point; and determining the preset associated parameters based on the reference coding brightness and the reference coding chroma corresponding to each reference pixel point.
In this embodiment of the application, the parameter obtaining module 4554 is further configured to construct at least two-dimensional coordinate points corresponding to at least two reference pixel points based on the reference coding brightness and the reference coding chromaticity corresponding to each reference pixel point; and performing linear fitting on the association relation between the reference coding brightness and the reference coding chromaticity based on at least two-dimensional coordinate points to obtain the preset association parameter.
In this embodiment, the encoding apparatus 455 further includes an encoding determining module 4555, configured to determine, as the first encoding cost, an encoding cost corresponding to the chroma encoding result, where the encoding cost is obtained by at least one of an encoding bit and an encoding quality loss, the encoding bit is an encoded data amount, and the encoding quality loss is a difference between a predicted chroma and an actual chroma; determining the coding cost corresponding to a target coding chroma as a second coding cost, wherein the target coding chroma is obtained by coding a second chroma difference, and the second chroma difference is the difference between the prediction chroma component and the chroma component to be coded; when the first coding cost is lower than the second coding cost, determining the chroma coding result as chroma to be decoded, and determining a coding identifier of the chroma to be decoded as a correction identifier, wherein the correction identifier represents that the chroma to be decoded is obtained by coding the first chroma difference; and obtaining the video to be decoded based on the chroma to be decoded carrying the correction identifier.
In this embodiment of the present application, the encoding device 455 further includes an encoding determining module 4555, further configured to determine the target encoded chroma as the chroma to be decoded and determine the encoded identifier of the chroma to be decoded as an unmodified identifier when the first encoding cost is higher than or equal to the second encoding cost, where the unmodified identifier indicates that the chroma to be decoded is obtained by encoding the second chroma difference; and obtaining the video to be decoded based on the chroma to be decoded carrying the unmodified identifier.
In this embodiment of the present application, the encoding prediction module 4551 is further configured to determine, in the video to be encoded, at least one of the luminance component to be encoded and the chrominance component to be encoded as data to be searched; searching a pixel unit with the minimum difference with the data to be searched in the reference frame image corresponding to the frame image to be coded; and determining the searched pixel unit as the prediction unit matched with the unit to be coded in the frame image to be coded.
Continuing with the exemplary structure of the decoding apparatus 255 for video processing provided by the embodiment of the present application implemented as software modules, in some embodiments, as shown in fig. 3, the software modules stored in the decoding apparatus 255 of the second memory 250 may include:
the video decoding module 2551 is configured to, in a video to be decoded, decode a chroma coding result corresponding to a unit to be decoded of a frame image to be decoded to obtain a first chroma difference, where the video to be decoded is a coding result of the video to be coded, the frame image to be decoded is a coding result of a frame image to be coded in the video to be coded, and the unit to be decoded is a coding result of the unit to be coded in the frame image to be coded;
a decoding prediction module 2552, configured to determine a prediction unit from a reference frame image corresponding to the frame image to be decoded, where the prediction unit includes a predicted luminance component and a predicted chrominance component;
a decoding and modifying module 2553, configured to modify the predicted chrominance component by combining a preset association parameter and a luminance coding result, so as to obtain a target chrominance component, where the preset association parameter represents an association relationship between a coded luminance and a coded chrominance, the luminance coding result is a coding result of a luminance difference between the predicted luminance component and a luminance component to be coded, and the unit to be coded includes the luminance component to be coded;
the video decoding module 2551 is further configured to determine the first chroma difference and the fusion result of the target chroma unit as a chroma component to be encoded of the unit to be encoded.
In this embodiment of the application, the decoding modification module 2553 is further configured to determine, based on the preset associated parameter, modification information corresponding to the luminance coding result on chrominance, where the modification information is used to modify the predicted chrominance component; and determining a fusion result between the predicted chrominance component and the correction information as the target chrominance component.
In this embodiment of the present application, the decoding apparatus 255 further includes an identifier obtaining module 2554, configured to obtain an encoding identifier of a chroma to be decoded in the video to be decoded.
In this embodiment of the application, the video decoding module 2551 is further configured to determine, when the encoding identifier is a modification identifier, that the chroma to be decoded in the video to be decoded is the chroma encoding result corresponding to the unit to be decoded of the frame image to be decoded, where the modification identifier indicates that the chroma to be decoded is obtained by modifying a luma encoding result; and decoding the chroma coding result to obtain the first chroma difference.
In this embodiment of the application, the video decoding module 2551 is further configured to determine, when the encoding identifier is an unmodified identifier, that the chroma to be decoded in the video to be decoded is a target encoded chroma corresponding to the unit to be decoded of the frame image to be decoded, where the target encoded chroma is obtained by encoding a second chroma difference, and the second chroma difference is a difference between the predicted chroma component and the chroma component to be encoded; decoding the target coding chroma in the video to be decoded to obtain a second chroma difference; determining the chroma component to be encoded of the unit to be encoded based on the second chroma difference and a fusion result of the predicted chroma components.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The first processor of the encoding device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the encoding device executes the video processing method applied to the encoding device side in the embodiment of the present application; the second processor of the decoding apparatus reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the decoding apparatus executes the video processing method applied to the decoding apparatus side described above in the embodiments of the present application.
The embodiment of the present application provides a computer-readable storage medium storing executable instructions, which, when executed by a first processor, will cause the first processor to execute the video processing method applied to the encoding device side provided by the embodiment of the present application, for example, the video processing method as shown in fig. 5; alternatively, when the executable instructions are executed by the second processor, the second processor will be caused to execute the video processing method applied to the decoding device side provided by the embodiments of the present application, for example, the video processing method as shown in fig. 8.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
As an example, the executable instructions may be deployed to be executed on one computing device (at which point the one computing device is at least one of an encoding device and a decoding device), or on multiple computing devices located at one site (at which point the multiple computing devices are at least one of an encoding device and a decoding device), or distributed across multiple sites and interconnected by a communication network (at which point the multiple computing devices are at least one of an encoding device and a decoding device distributed across the multiple sites and interconnected by a communication network).
It is understood that, in the embodiments of the present application, related data to be encoded video and the like need to be approved or approved by users when the embodiments of the present application are applied to specific products or technologies, and the collection, use and processing of the related data need to comply with relevant laws and regulations and standards of relevant countries and regions.
In summary, when chroma coding is performed on a unit to be coded on a frame image to be coded in a video to be coded, due to the fact that correlation exists between brightness and chroma, a brightness coding result is obtained based on a brightness difference between a brightness component to be coded and a predicted brightness component of the unit to be coded, and then the predicted chroma component is corrected by combining a preset correlation parameter between reference coding brightness and reference coding chroma and the brightness coding result, so that a target chroma component can be predicted accurately; furthermore, when the chroma coding result of the unit to be coded is obtained by coding the first chroma difference between the chroma component to be coded and the target chroma component, the accuracy of chroma coding can be improved, and the performance of video coding can be improved.
The above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims (15)
1. A method of video processing, the method comprising:
in a video to be coded, determining a prediction unit matched with a unit to be coded in a frame image to be coded from a reference frame image corresponding to the frame image to be coded, wherein the unit to be coded comprises a luminance component to be coded and a chrominance component to be coded, and the prediction unit comprises a predicted luminance component and a predicted chrominance component;
encoding the brightness difference between the predicted brightness component and the brightness component to be encoded to obtain a brightness encoding result;
correcting the predicted chrominance component by combining a preset associated parameter and the luminance coding result to obtain a target chrominance component, wherein the preset associated parameter represents an associated relation between coding luminance and coding chrominance;
and coding the first chrominance difference between the chrominance component to be coded and the target chrominance component to obtain a chrominance coding result of the unit to be coded.
2. The method of claim 1, wherein the modifying the predicted chroma component by combining the predetermined associated parameter and the luma coding result to obtain a target chroma component comprises:
determining correction information corresponding to the brightness coding result on chroma based on the preset correlation parameter, wherein the correction information is used for correcting the predicted chroma component;
and determining a fusion result between the predicted chrominance component and the correction information as the target chrominance component.
3. The method according to claim 1 or 2, wherein before the modifying the predicted chroma component by combining the preset associated parameter and the luma coding result to obtain the target chroma component, the method further comprises:
acquiring a coding block to be referred adjacent to the unit to be coded from the frame image to be coded, wherein the coding block to be referred comprises a plurality of coded pixel points;
selecting at least two reference pixel points from the plurality of coded pixel points, and determining reference coding brightness and reference coding chroma corresponding to each reference pixel point;
and determining the preset associated parameters based on the reference coding brightness and the reference coding chroma corresponding to each reference pixel point.
4. The method according to claim 3, wherein the determining the preset correlation parameter based on the reference encoded luminance and the reference encoded chrominance corresponding to each of the reference pixel points comprises:
constructing at least two-dimensional coordinate points corresponding to at least two reference pixel points based on the reference coding brightness and the reference coding chroma corresponding to each reference pixel point;
and performing linear fitting on the association relation between the reference coding brightness and the reference coding chromaticity based on at least two-dimensional coordinate points to obtain the preset association parameter.
5. The method according to claim 1 or 2, wherein after the first chroma difference between the chroma component to be encoded and the target chroma component is encoded to obtain the chroma encoding result of the unit to be encoded, the method further comprises:
determining a coding cost corresponding to the chrominance coding result as a first coding cost, wherein the coding cost is obtained by at least one of a coding bit and a coding quality loss, the coding bit is a coded data volume, and the coding quality loss is a difference between a predicted chrominance and an actual chrominance;
determining the coding cost corresponding to a target coding chroma as a second coding cost, wherein the target coding chroma is obtained by coding a second chroma difference, and the second chroma difference is the difference between the prediction chroma component and the chroma component to be coded;
when the first coding cost is lower than the second coding cost, determining the chroma coding result as a chroma to be decoded, and determining a coding identifier of the chroma to be decoded as a correction identifier, wherein the correction identifier indicates that the chroma to be decoded is obtained by coding the first chroma difference;
and obtaining the video to be decoded based on the chroma to be decoded carrying the correction identifier.
6. The method of claim 5, wherein after determining the coding cost corresponding to the target coding chroma as the second coding cost, the method further comprises:
when the first coding cost is higher than or equal to the second coding cost, determining the target coding chroma as the chroma to be decoded, and determining the coding identifier of the chroma to be decoded as an unmodified identifier, wherein the unmodified identifier indicates that the chroma to be decoded is obtained by coding the second chroma difference;
and obtaining the video to be decoded based on the chroma to be decoded carrying the unmodified identifier.
7. The method according to claim 1 or 2, wherein the determining, in the video to be encoded, the prediction unit matching the unit to be encoded in the frame image to be encoded from the reference frame image corresponding to the frame image to be encoded comprises:
in the video to be coded, determining at least one of the luminance component to be coded and the chrominance component to be coded as data to be searched;
searching a pixel unit with the minimum difference with the data to be searched in the reference frame image corresponding to the frame image to be coded;
and determining the searched pixel unit as the prediction unit matched with the unit to be coded in the frame image to be coded.
8. A method of video processing, the method comprising:
in a video to be decoded, decoding a chroma coding result corresponding to a unit to be decoded of a frame image to be decoded to obtain a first chroma difference, wherein the video to be decoded is a coding result of the video to be coded, the frame image to be decoded is a coding result of the frame image to be coded in the video to be coded, and the unit to be decoded is a coding result of the unit to be coded in the frame image to be coded;
determining a prediction unit from a reference frame image corresponding to the frame image to be decoded, wherein the prediction unit comprises a prediction brightness component and a prediction chroma component;
correcting the predicted chrominance component by combining a preset associated parameter and a luminance coding result to obtain a target chrominance component, wherein the preset associated parameter represents an associated relation between coding luminance and coding chrominance, the luminance coding result is a coding result of luminance difference between the predicted luminance component and a luminance component to be coded, and the unit to be coded comprises the luminance component to be coded;
and determining the first chroma difference and the fusion result of the target chroma unit as the chroma component to be coded of the unit to be coded.
9. The method of claim 8, wherein the modifying the predicted chroma component in combination with the predetermined associated parameters and the luma coding result to obtain the target chroma component comprises:
determining correction information corresponding to the brightness coding result on chroma based on the preset correlation parameter, wherein the correction information is used for correcting the predicted chroma component;
and determining a fusion result between the predicted chrominance component and the correction information as the target chrominance component.
10. The method according to claim 8 or 9, wherein before decoding the chroma coding result corresponding to the unit to be decoded of the frame image to be decoded in the video to be decoded to obtain the first chroma difference, the method further comprises:
acquiring a coding identifier of the chroma to be decoded in the video to be decoded;
in the video to be decoded, decoding a chroma coding result corresponding to a unit to be decoded of a frame image to be decoded to obtain a first chroma difference, including:
when the coding identifier is a correction identifier, determining that the chroma to be decoded in the video to be decoded is the chroma coding result corresponding to the unit to be decoded of the frame image to be decoded, wherein the correction identifier represents that the chroma to be decoded is obtained by correcting a brightness coding result;
and decoding the chroma coding result to obtain the first chroma difference.
11. The method of claim 10, wherein after obtaining the encoded identification of the chroma to be decoded in the video to be decoded, the method further comprises:
when the encoding identifier is an unmodified identifier, determining that the chroma to be decoded in the video to be decoded is a target encoding chroma corresponding to the unit to be decoded of the frame image to be decoded, wherein the target encoding chroma is obtained by encoding a second chroma difference, and the second chroma difference is a difference between the predicted chroma component and the chroma component to be encoded;
decoding the target coding chroma in the video to be decoded to obtain a second chroma difference;
determining the chroma component to be encoded of the unit to be encoded based on the second chroma difference and a fusion result of the predicted chroma components.
12. An encoding device for video processing, characterized in that the encoding device comprises:
a first memory for storing executable instructions;
a first processor, configured to implement the video processing method of any one of claims 1 to 7 when executing the executable instructions stored in the first memory.
13. A decoding device for video processing, the decoding device comprising:
a second memory for storing executable instructions;
a second processor, configured to implement the video processing method of any one of claims 8 to 11 when executing the executable instructions stored in the second memory.
14. A computer-readable storage medium storing executable instructions for implementing the video processing method of any one of claims 1 to 7 when executed by a first processor; alternatively, the executable instructions are adapted to implement the video processing method of any of claims 8 to 11 when executed by the second processor.
15. A computer program product comprising a computer program or instructions which, when executed by a first processor, implements the video processing method of any of claims 1 to 7; alternatively, the computer program or instructions, when executed by the second processor, implement the video processing method of any of claims 8 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210730782.9A CN115118982B (en) | 2022-06-24 | 2022-06-24 | Video processing method, device, storage medium and computer program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210730782.9A CN115118982B (en) | 2022-06-24 | 2022-06-24 | Video processing method, device, storage medium and computer program product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115118982A true CN115118982A (en) | 2022-09-27 |
CN115118982B CN115118982B (en) | 2024-05-24 |
Family
ID=83329290
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210730782.9A Active CN115118982B (en) | 2022-06-24 | 2022-06-24 | Video processing method, device, storage medium and computer program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115118982B (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103327324A (en) * | 2013-05-13 | 2013-09-25 | 深圳市云宙多媒体技术有限公司 | Method and system for coding and decoding light sudden change video |
WO2019198997A1 (en) * | 2018-04-11 | 2019-10-17 | 엘지전자 주식회사 | Intra-prediction-based image coding method and apparatus thereof |
CN111050178A (en) * | 2018-10-11 | 2020-04-21 | 腾讯美国有限责任公司 | Video decoding method and device, electronic equipment and storage medium |
WO2020149630A1 (en) * | 2019-01-15 | 2020-07-23 | 엘지전자 주식회사 | Method and device for decoding image on basis of cclm prediction in image coding system |
US20200296380A1 (en) * | 2017-09-14 | 2020-09-17 | Sharp Kabushiki Kaisha | Image encoding device and image decoding device |
US20210092413A1 (en) * | 2017-09-15 | 2021-03-25 | Sony Corporation | Image processing device and method |
CN113545083A (en) * | 2019-03-18 | 2021-10-22 | 腾讯美国有限责任公司 | Video coding and decoding method and device |
CN113678441A (en) * | 2019-09-16 | 2021-11-19 | 腾讯美国有限责任公司 | Cross-component filtering method and device |
WO2021238540A1 (en) * | 2020-05-29 | 2021-12-02 | Oppo广东移动通信有限公司 | Image encoding method, image decoding method, and related apparatuses |
US20220030257A1 (en) * | 2019-05-08 | 2022-01-27 | Beijing Bytedance Network Technology Co., Ltd. | Conditions for applicability of cross-component coding |
CN113992913A (en) * | 2021-12-29 | 2022-01-28 | 康达洲际医疗器械有限公司 | Intra-frame cross-component prediction method and system applicable to VVC (variable value code) coding standard |
-
2022
- 2022-06-24 CN CN202210730782.9A patent/CN115118982B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103327324A (en) * | 2013-05-13 | 2013-09-25 | 深圳市云宙多媒体技术有限公司 | Method and system for coding and decoding light sudden change video |
US20200296380A1 (en) * | 2017-09-14 | 2020-09-17 | Sharp Kabushiki Kaisha | Image encoding device and image decoding device |
US20210092413A1 (en) * | 2017-09-15 | 2021-03-25 | Sony Corporation | Image processing device and method |
WO2019198997A1 (en) * | 2018-04-11 | 2019-10-17 | 엘지전자 주식회사 | Intra-prediction-based image coding method and apparatus thereof |
CN111050178A (en) * | 2018-10-11 | 2020-04-21 | 腾讯美国有限责任公司 | Video decoding method and device, electronic equipment and storage medium |
WO2020149630A1 (en) * | 2019-01-15 | 2020-07-23 | 엘지전자 주식회사 | Method and device for decoding image on basis of cclm prediction in image coding system |
CN113545083A (en) * | 2019-03-18 | 2021-10-22 | 腾讯美国有限责任公司 | Video coding and decoding method and device |
US20220030257A1 (en) * | 2019-05-08 | 2022-01-27 | Beijing Bytedance Network Technology Co., Ltd. | Conditions for applicability of cross-component coding |
CN113678441A (en) * | 2019-09-16 | 2021-11-19 | 腾讯美国有限责任公司 | Cross-component filtering method and device |
WO2021238540A1 (en) * | 2020-05-29 | 2021-12-02 | Oppo广东移动通信有限公司 | Image encoding method, image decoding method, and related apparatuses |
CN113992913A (en) * | 2021-12-29 | 2022-01-28 | 康达洲际医疗器械有限公司 | Intra-frame cross-component prediction method and system applicable to VVC (variable value code) coding standard |
Non-Patent Citations (2)
Title |
---|
CHE-WEIKUO ET AL.: "AHG12: Enhanced CCLM", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29 26TH MEETING, BY TELECONFERENCE, 20–29APRIL 2022,JVET-Z0140-V1, 14 April 2022 (2022-04-14), pages 1 - 5 * |
RAMIN GHAZNAVI-YOUVALARI ET AL.: "Joint Cross-Component Linear Model For Chroma Intra Prediction", 2020 IEEE 22ND INTERNATIONAL WORKSHOP ON MULTIMEDIA SIGNAL PROCESSING (MMSP), 16 December 2020 (2020-12-16), pages 1 - 5 * |
Also Published As
Publication number | Publication date |
---|---|
CN115118982B (en) | 2024-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019134557A1 (en) | Method and device for processing video image | |
US20160100161A1 (en) | Decoder, encoder, decoding method, encoding method, and codec system | |
CN112218092B (en) | Encoding method, apparatus and storage medium for string encoding technique | |
WO2018001208A1 (en) | Encoding and decoding method and device | |
US11949853B2 (en) | Data decoding method and apparatus, and data coding method and apparatus | |
US20190141324A1 (en) | Encoding data arrays | |
CN109587491A (en) | A kind of intra-frame prediction method, device and storage medium | |
CN110620924A (en) | Method and device for processing coded data, computer equipment and storage medium | |
CN111526370A (en) | Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment | |
CN111510643B (en) | System and method for splicing panoramic image and close-up image | |
CN112437301B (en) | Code rate control method and device for visual analysis, storage medium and terminal | |
KR20230025879A (en) | Adaptation of the transformation process to the neural network-based intra prediction mode | |
CN112004114A (en) | Video processing method, system, device, readable storage medium and electronic equipment | |
CN115293994B (en) | Image processing method, image processing device, computer equipment and storage medium | |
CN115118982B (en) | Video processing method, device, storage medium and computer program product | |
US20220368889A1 (en) | Method for encoding and decoding an image of a video sequence, and associated device | |
US11350134B2 (en) | Encoding apparatus, image interpolating apparatus and encoding program | |
US10764578B2 (en) | Bit rate optimization system and method | |
CN113596453A (en) | Video compression and decompression method, device, equipment and storage medium | |
CN114402616A (en) | Prediction method and device of current block, equipment and storage medium | |
CN115706808B (en) | Video processing method and device | |
CN115150370B (en) | Image processing method | |
US11190774B1 (en) | Screen content encoding mode evaluation including intra-block evaluation of multiple potential encoding modes | |
CN110662060B (en) | Video encoding method and apparatus, video decoding method and apparatus, and storage medium | |
JP2024525927A (en) | Bitstream processing method, device, terminal device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |