Encoding method, decoding method, and related device
By acquiring the HDR image and basic layer data during the transcoding process of HDR images or HDR videos, determining the enhancement layer data according to the encoding scheme, and encoding the metadata with the data, solving the problem of abnormalities in the transcoding process in the prior art in the prior art , realizes flexible format conversion and improves encoding and decoding efficiency.
Patent Information
- Application Number
- PCT/CN2024/111115
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-06
- Filing Date
- 2024-08-09
- Publication Date
- 2025-02-20
AI Technical Summary
Existing HDR images or HDR videos may cause abnormalities during the transcoding process, affect the user experience, and lack flexible and effective encoding/decoding solutions.
By acquiring the HDR image and the corresponding basic layer data, the enhancement layer data is determined according to the encoding scheme, and the metadata is encoded together with the data to generate a code stream. The decoding end determines the decoding scheme based on the metadata, realizes flexible format conversion and improves encoding and decoding efficiency.
This method realizes flexible format conversion, improves encoding and decoding efficiency, ensures improvement of the final synthesis effect, and avoids abnormal phenomena during the transcoding process.
Smart Images

Figure CN2024111115_20022025_PF_FP_ABST
Abstract
Description
Coding method, decoding method and related devices
[0001] This application claims priority to the Chinese patent application with application number 202311035466.0 filed with the State Intellectual Property Office of China on August 15, 2023, priority to the Chinese patent application with invention name “Encoding method and related equipment”, priority to the Chinese patent application with application number 202411079347.X filed with the State Intellectual Property Office of China on August 6, 2024, and priority to the Chinese patent application with invention name “Encoding method, decoding method and related equipment”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of coding and decoding, and more specifically, to a coding method, a decoding method and related devices. Background Art
[0003] Dynamic range is used in many fields to express the ratio of the maximum value to the minimum value of a variable. In digital images, dynamic range represents the ratio between the maximum grayscale value and the minimum grayscale value within the displayable range of the image. The dynamic range in nature is quite large. The brightness of the night scene under the starry sky is about 0.001cd / m2, and the brightness of the sun itself is as high as 1,000,000,000cd / m2. Such a dynamic range reaches the order of 1,000,000,000 / 0.001=1013. However, in real scenes in nature, the brightness of the sun and the brightness of starlight will not be obtained at the same time. For natural scenes in the real world, the dynamic range is between 10 -3 to 10 6 In most color digital images, each channel of red (R), green (G), and blue (B) is stored in an 8-bit byte. That is, the range of each channel is 0 to 255 gray levels. Here, 0 to 255 is the dynamic range of the image. In the real world, the dynamic range of the same scene is between 10 -3 to 10 6 The dynamic range of an ordinary picture or video is called low dynamic range (LDR).
[0004] HDR images or HDR videos may need to be transcoded during the distribution or transmission process. The current HDR transcoding solution is to directly transcode HDR images or HDR videos. After decoding, the HDR image or HDR video obtains HDR pixel values and HDR format identifiers and information. HDR pixel values usually need to be processed (such as image up- and down sampling, enhancement, etc.). The HDR format identifier and information, as well as the processed HDR pixel values are then sent to the encoder for re-encoding. The re-encoded HDR image or HDR video is distributed to other devices. This solution of directly transcoding HDR images or HDR videos (which can be called a "single-layer transcoding solution") may cause abnormalities in the transcoded HDR image or HDR video, affecting the user experience.
[0005] Therefore, how to provide a more flexible and effective encoding / decoding solution is a problem that needs to be solved urgently in this field.
[0006] Summary of the Invention
[0007] The present application provides an encoding method, a decoding method and related devices, which can achieve flexible format conversion, improve encoding and decoding efficiency and the final synthesis effect.
[0008] In a first aspect, an embodiment of the present application provides an encoding method, the method comprising: acquiring a first HDR image and N first base layer data corresponding to the first HDR image; determining N first enhancement layer data based on the first HDR image, the N first base layer data, and at least one encoding scheme, where N is a positive integer greater than or equal to 1; encoding the N first enhancement layer data, the N first base layer data, and first metadata to obtain a code stream, the first metadata including first indication information, the first indication information being used to indicate the at least one encoding scheme or a decoding scheme corresponding to the at least one encoding scheme.
[0009] In the above-mentioned technical approach, the information required for decoding is carried in the first metadata, which is then encoded together with the HDR image data to produce a bitstream. This allows the decoding device to determine a decoding scheme based on the first metadata and then use that scheme to decode the received data. Because the decoding device knows the decoding scheme, the encoder can flexibly select the encoding scheme as needed, thereby improving encoding efficiency and the final synthesis effect.
[0010] In combination with the first aspect, in a possible implementation of the first aspect, determining N first enhancement layer data based on the first HDR image, the N first base layer data, and at least one encoding scheme includes: determining N intermediate enhancement data based on the first HDR image and the N first base layer data; and encoding the N intermediate enhancement data according to the at least one encoding scheme to obtain the N first enhancement layer data.
[0011] In combination with the first aspect, in a possible implementation of the first aspect, encoding the N intermediate enhancement data according to the at least one encoding scheme to obtain the N first enhancement layer data includes: using N i The encoding scheme is used to encode the i-th intermediate enhancement data in the N intermediate enhancement data to obtain the i-th first enhancement layer data in the N first enhancement layer data, and the i-th first enhancement layer data includes N i area, use N i The encoding scheme for encoding the i-th intermediate enhanced data includes: using the N i The coding scheme has an effect on the N i Regions are encoded, N i is a positive integer greater than or equal to 2, i=1,…,N.
[0012] The above technical solution divides the enhancement layer data into multiple regions and encodes each region using a corresponding encoding scheme. In this way, appropriate encoding schemes can be selected based on the characteristics of different regions, thereby further improving encoding efficiency and the final synthesis effect.
[0013] In combination with the first aspect, in a possible implementation of the first aspect, the at least one coding scheme includes M groups of coding schemes, and the i-th group of coding schemes in the M groups of coding schemes includes N i A coding scheme, M is a positive integer greater than or equal to 1.
[0014] In combination with the first aspect, in a possible implementation of the first aspect, the at least one encoding scheme includes M encoding schemes, and encoding the N intermediate enhancement data according to the at least one encoding scheme to obtain the N first enhancement layer data includes: using the i-th encoding scheme among the M encoding schemes to encode the i-th intermediate enhancement data among the N intermediate enhancement data to obtain the i-th first enhancement layer data among the N first enhancement layer data, where M is a positive integer greater than or equal to 1, i=1,…,N.
[0015] Through the above technical solution, a suitable coding scheme can be selected for different intermediate enhancement layer data, thereby improving the coding efficiency and the final synthesis result.
[0016] In combination with the first aspect, in a possible implementation of the first aspect, the determining N intermediate enhancement data based on the first HDR image and the N first basic layer data includes: determining N reference intermediate enhancement data based on the first HDR image and the N first basic layer data, wherein the reference intermediate enhancement data is multi-channel data; determining the i-th intermediate enhancement data among the N intermediate enhancement data based on the i-th reference intermediate enhancement data among the N reference intermediate enhancement data, wherein the intermediate enhancement data is single-channel data, i=1,…,N.
[0017] In combination with the first aspect, in a possible implementation of the first aspect, determining the i-th intermediate enhancement data among the N intermediate enhancement data based on the i-th reference intermediate enhancement data among the N reference intermediate enhancement data includes: determining that the i-th intermediate enhancement data includes data of a channel of the i-th reference intermediate enhancement data.
[0018] The above technical solution selects the encoding scheme based on the channel in the multi-channel data as the granularity, thereby improving the encoding efficiency and the final synthesis result.
[0019] In combination with the first aspect, in a possible implementation of the first aspect, determining, based on the i-th reference intermediate enhancement data among the N reference intermediate enhancement data, the i-th intermediate enhancement data among the N intermediate enhancement data includes: transforming multi-channel data of the i-th reference intermediate enhancement data respectively to obtain multiple transformation results, where the multiple transformation results correspond one-to-one to the multi-channel data, and each transformation result in the multiple transformation results is obtained after transforming a corresponding channel; and determining that the i-th intermediate enhancement data is one of the multiple transformation results.
[0020] By changing the multi-channel data and then encoding it, the coding efficiency and the final synthesis result can be further improved.
[0021] In combination with the first aspect, in a possible implementation of the first aspect, determining the i-th intermediate enhancement data among the N intermediate enhancement data based on the i-th reference intermediate enhancement data among the N reference intermediate enhancement data includes: determining the i-th intermediate enhancement data based on a relationship function and multi-channel data of the i-th reference intermediate enhancement data.
[0022] In combination with the first aspect, in a possible implementation of the first aspect, the i-th intermediate enhancement data includes values of multiple pixels, each pixel in the multiple pixels corresponds to multiple groups of pixels, and the multiple groups of pixels respectively belong to multi-channel data of the i-th reference intermediate enhancement data. Each group of pixels in the multiple groups of pixels includes at least one pixel, and the pixel value of each pixel in the multiple pixels is determined based on the pixel values of the corresponding multiple groups of pixels and the relationship function.
[0023] In combination with the first aspect, in a possible implementation manner of the first aspect, the at least one coding scheme includes one or more of the following coding schemes: PQ coding, HLG coding, gamma coding, log coding, or arbitrary curve coding.
[0024] In combination with the first aspect, in a possible implementation of the first aspect, the first indication information is used to indicate: at least one encoding function; the at least one encoding function and the parameters of each encoding function in the at least one encoding function; the at least one decoding function; or, the at least one decoding function and the parameters of each decoding function in the at least one decoding function.
[0025] In a second aspect, an embodiment of the present application provides a decoding method, the method comprising: decoding an acquired code stream to obtain N first enhancement layer data, N first base layer data, and first metadata, wherein the first metadata includes first indication information, the first indication information is used to determine at least one decoding scheme, N is a positive integer greater than or equal to 1; according to the at least one decoding scheme, the N first base layer data and the N first enhancement layer data, determine a second HDR image.
[0026] In the above-mentioned technical approach, the information required for decoding is carried in the first metadata, which is then encoded together with the HDR image data to produce a bitstream. This allows the decoding device to determine a decoding scheme based on the first metadata and then use that scheme to decode the received data. Because the decoding device knows the decoding scheme, the encoder can flexibly select the encoding scheme as needed, thereby improving encoding efficiency and the final synthesis effect.
[0027] In combination with the second aspect, in a possible implementation of the second aspect, determining the second HDR image according to the at least one decoding scheme, the N first base layer data and the N first enhancement layers, includes: decoding the N first enhancement layer data according to the at least one decoding scheme to obtain N second enhancement layer data; and determining the second HDR image according to the N first base layer data and the N second enhancement layer data.
[0028] In combination with the second aspect, in a possible implementation of the second aspect, decoding the N first enhancement layer data according to the at least one decoding scheme to obtain N second enhancement layer data includes: using N i A decoding scheme is used to decode the i-th first enhancement data in the N first enhancement data to obtain the i-th second enhancement layer data in the N second enhancement layer data, wherein the i-th first enhancement layer data includes N i area, use N iThe decoding scheme for decoding the i-th first enhanced data includes: using the N i The decoding scheme for the Nth first enhanced data i regions to be decoded, N i is a positive integer greater than or equal to 2, i=1,…,N.
[0029] The above technical solution divides the enhancement layer data into multiple regions and encodes each region using a corresponding encoding scheme. In this way, appropriate encoding schemes can be selected based on the characteristics of different regions, thereby further improving encoding efficiency and the final synthesis effect.
[0030] In conjunction with the second aspect, in a possible implementation of the second aspect, the at least one decoding scheme includes M groups of decoding schemes, and the i-th group of decoding schemes in the M groups of decoding schemes includes the N i decoding schemes, and M is a positive integer greater than or equal to 1.
[0031] In combination with the second aspect, in a possible implementation of the second aspect, the at least one decoding scheme includes M decoding schemes, and according to the at least one decoding scheme, the N first enhancement layer data are decoded to obtain N second enhancement layer data, including: using the i-th decoding scheme among the M decoding schemes to decode the i-th first enhancement layer data among the N first enhancement layer data to obtain the i-th second enhancement layer data among the N second enhancement layer data, where M is a positive integer greater than or equal to 1, i=1,…,N.
[0032] Through the above technical solution, a suitable coding scheme can be selected for different intermediate enhancement layer data, thereby improving the coding efficiency and the final synthesis result.
[0033] In combination with the second aspect, in a possible implementation of the second aspect, the at least one decoding scheme includes a decoding scheme corresponding to one or more of the following coding schemes: PQ coding, HLG coding, gamma coding, log coding, or arbitrary curve coding.
[0034] In combination with the second aspect, in a possible implementation of the second aspect, the first indication information is used to indicate: at least one encoding function; the at least one encoding function and the parameters of each encoding function in the at least one encoding function; the at least one decoding function; or, the at least one decoding function and the parameters of each decoding function in the at least one decoding function.
[0035] In a third aspect, an embodiment of the present application provides an electronic device, which includes a unit for implementing the first aspect or any possible implementation manner of the first aspect.
[0036] Exemplarily, the electronic device may be an encoder.
[0037] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a unit for implementing the second aspect or any possible implementation method of the second aspect.
[0038] Exemplarily, the electronic device may be a decoder.
[0039] In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a processor, which is used to couple with a memory, read and execute instructions and / or program codes in the memory to execute the first aspect or any possible implementation of the first aspect.
[0040] In a sixth aspect, an embodiment of the present application provides an electronic device, which includes a processor, which is used to couple with a memory, read and execute instructions and / or program codes in the memory to execute the second aspect or any possible implementation of the second aspect.
[0041] In the seventh aspect, an embodiment of the present application provides a chip system, which includes a logic circuit, which is used to couple with an input / output interface and transmit data through the input / output interface to execute the first aspect or any possible implementation method of the first aspect.
[0042] In an eighth aspect, an embodiment of the present application provides a chip system, which includes a logic circuit, which is used to couple with an input / output interface and transmit data through the input / output interface to execute the second aspect or any possible implementation method of the second aspect.
[0043] In the ninth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program code. When the program code stored in the computer storage medium is run on a computer, the computer executes the first aspect or any possible implementation of the first aspect.
[0044] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program code. When the program code stored in the computer storage medium is run on a computer, the computer executes the second aspect or any possible implementation of the second aspect.
[0045] In the eleventh aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, which, when running on a computer, enables the computer to execute the second aspect or any possible implementation of the second aspect.
[0046] In a twelfth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, which, when running on a computer, enables the computer to execute the second aspect or any possible implementation of the second aspect.
[0047] In a thirteenth aspect, an embodiment of the present application provides a code stream, which is determined according to the first aspect or any possible implementation manner of the first aspect.
[0048] In a fourteenth aspect, an embodiment of the present application provides a code stream, which includes N base layer data, N enhancement layer data and first metadata corresponding to a first HDR image, and the first metadata is used to indicate at least one encoding scheme for encoding the N enhancement layer data or a decoding scheme corresponding to the at least one encoding scheme.
[0049] In a fifteenth aspect, an embodiment of the present application provides a device for storing a code stream, which is used to store the code stream of the thirteenth aspect or the fourteenth aspect.
[0050] In the sixteenth aspect, an embodiment of the present application provides a device for transmitting a code stream, the device comprising: a transmitter and a receiver, the receiver being used to receive the code stream generated by the encoding method described in the first aspect above, and the transmitter being used to send the code stream to a client device via a transmission medium.
[0051] In the seventeenth aspect, an embodiment of the present application provides a device for transmitting a code stream, the device comprising: a transmitter and at least one storage medium, the at least one storage medium being used to store the code stream generated according to the encoding method described in the first aspect above, the transmitter being used to obtain the code stream from the storage medium and send the code stream to a client device via a transmission medium.
[0052] In aspect 18, an embodiment of the present application provides a system for distributing code streams, the system comprising: at least one storage medium for storing code streams generated according to the encoding method described in aspect 1 above, a streaming media server for obtaining a target code stream from the at least one storage medium and sending the target code stream to a client device, wherein the streaming media server comprises a content server or a content distribution server. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] FIG1 is a schematic diagram of dynamic range mapping.
[0054] Figure 2 is an image of the PQ photoelectric transfer function.
[0055] Figure 3 is an image of the HLG photoelectric transfer function.
[0056] FIG4 is an image of the SLF photoelectric transfer function.
[0057] FIG5 is a schematic block diagram of a coding solution system used in an embodiment of the present application.
[0058] FIG6 is a block diagram of a content providing system for implementing content distribution services used in an embodiment of the present application.
[0059] FIG7 is a schematic diagram of a workflow of a streaming media system applicable to an embodiment of the present application.
[0060] FIG8 is a schematic diagram illustrating an exemplary end-to-end process of the present application.
[0061] FIG9 describes an exemplary streaming media system architecture of the present application.
[0062] FIG10 is a schematic diagram of a possible system architecture applicable to an embodiment of the present application.
[0063] FIG11 is a schematic diagram of a method for processing a digital signal according to an embodiment of the present application.
[0064] FIG12 is a schematic flowchart of an encoding method provided according to an embodiment of the present application.
[0065] FIG13 is a schematic flowchart of a decoding method provided according to an embodiment of the present application.
[0066] FIG14 is a schematic structural block diagram of an electronic device provided according to an embodiment of the present application.
[0067] FIG15 is a schematic structural block diagram of another electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0068] The technical solution in this application will be described below with reference to the accompanying drawings.
[0069] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0070] First, in order to facilitate understanding of the embodiments of the present application, some concepts or terms involved in the embodiments of the present application are explained.
[0071] Color value: A numerical value corresponding to a specific image primary color component (such as R, G, B, or Y).
[0072] Digital code value: A digital representation of an image signal. Digital code value is used to represent nonlinear primary color values.
[0073] Linear color value: A linear color value that is proportional to the light intensity. In an optional case, its value should be normalized to [0,1], referred to as E.
[0074] Nonlinear primary color value: A nonlinear primary color value is a normalized digital expression of image information, which is proportional to the digital coding value. In an optional case, its value should be normalized to [0,1], referred to as E′.
[0075] Electro-optical transfer function (EOTF): A conversion relationship from nonlinear primary color values to linear primary color values.
[0076] Metadata: Data that describes the video source information carried in the video signal.
[0077] Dynamic metadata: metadata associated with each frame of an image that changes from frame to frame.
[0078] Static metadata: Metadata associated with an image sequence that remains unchanged within the image sequence.
[0079] Luminance signal (luma): represents the combination of nonlinear primary color signals, symbolized by Y'.
[0080] Luminance mapping: The luminance of the source image is mapped to the luminance of the target system.
[0081] Display adaptation: Processing of the video signal to adapt it to the display characteristics of the target display.
[0082] Source picture: The image input to the HDR pre-processing stage.
[0083] Mastering display: A reference display used when editing and producing video signals to determine the effects of video editing and production.
[0084] Linear scene light signal: In HDR video technology, the HDR video signal with content as scene light refers to the scene light captured by the camera / camera sensor, which is generally a relative value; the linear scene light signal is encoded by hybrid log-gamma (HLG) to obtain the HLG signal, which is a scene light signal and is nonlinear; the scene light signal generally needs to be converted into a display light signal through OOTF before being displayed on the display device.
[0085] Linear display light signal: In HDR video technology, the HDR video signal with content as display light refers to the display light emitted by the display device, generally expressed as an absolute value, measured in nits. The linear display light signal is encoded using perceptual quantization (PQ) to obtain a PQ signal, which is a nonlinear display light signal. The display light signal is generally displayed on the display device according to its absolute brightness.
[0086] Opto-optical transfer function (OOTF): In video technology, the curve that converts one optical signal into another.
[0087] Dynamic range: The ratio of the maximum brightness to the minimum brightness in a video signal.
[0088] Luma-chroma-chroma (LCC) separates the three components of a video signal into luminance and chrominance.
[0089] The optical-electro transfer function (OETF) represents the conversion relationship between linear signals and nonlinear signals of image pixels. Currently, the commonly used OETFs include the following three:
[0090] The perceptual quantizer (PQ), hybrid log-gamma (HLG), and scene luminance fidelity (SLF) OTFs are defined by the audio and video coding standard (AVS).
[0091] Dynamic range is used in many fields to express the ratio of the maximum value to the minimum value of a variable. In digital images, dynamic range represents the ratio between the maximum grayscale value and the minimum grayscale value within the displayable range of the image. The dynamic range in nature is quite large. The brightness of the night scene under the starry sky is about 0.001cd / m2, and the brightness of the sun itself is as high as 1,000,000,000cd / m2. Such a dynamic range reaches the order of 1,000,000,000 / 0.001=1013. However, in real scenes in nature, the brightness of the sun and the brightness of starlight will not be obtained at the same time. For natural scenes in the real world, the dynamic range is between 10 -3 to 10 6 In most color digital images, each channel of R, G, and B is stored in an 8-bit byte. That is, the range of each channel is 0 to 255 gray levels. Here, 0 to 255 is the dynamic range of the image. In the real world, the dynamic range of the same scene is between 10 and 255. -3 to 10 6 The range of real-world dynamic range is called high dynamic range (HDR), while the dynamic range of ordinary images is called low dynamic range (LDR). The imaging process of a digital camera is actually a mapping from the high dynamic range of the real world to the low dynamic range of the photograph. This is often a nonlinear process.
[0092] FIG1 is a schematic diagram of dynamic range mapping.
[0093] The PQ photoelectric transfer function (PQPTF) is a perceptually quantized PQPTF based on the human eye's brightness perception model. See Figure 2, which shows an image of the PQPTF. The PQPTF represents the conversion of linear signal values from image pixels to nonlinear signal values in the PQ domain.
[0094] The HLG photoelectric transfer function (PTF) is an improvement on the traditional gamma curve. See Figure 3, which shows an image of the HLG PTF. The HLG PTF uses a traditional gamma curve in the low-frequency range and supplements it with a logarithmic curve in the high-frequency range. The HLG PTF represents the conversion between linear signal values in an image pixel and nonlinear signal values in the HLG domain.
[0095] The SLF photoelectric transfer function (SLF) is an optimal curve obtained based on the HDR scene brightness distribution, while satisfying the optical characteristics of the human eye. See Figure 4, which shows an image of the SLF photoelectric transfer function. The SLF photoelectric transfer curve represents the conversion relationship between the linear signal value of an image pixel and the nonlinear signal value in the SLF domain.
[0096] Linear space: In this application, linear space refers to the space where linear light signals are located.
[0097] Nonlinear space: In this application, nonlinear space refers to the space resulting from the conversion of linear light signals using nonlinear curves. Commonly used nonlinear curves for HDR include the PQ EOTF-1 curve and the HLG OETF curve, while common nonlinear curves for SDR include the gamma curve. It is generally believed that linear light signals encoded using these nonlinear curves are visually linear relative to the human eye. It should be understood that nonlinear space can be considered a visually linear space.
[0098] Gamma correction: Gamma correction is a method of nonlinearly editing the tonal range of an image. It detects dark and light portions of the image signal and increases their ratio, thereby improving image contrast. The photoelectric conversion characteristics of current display screens, photographic film, and many electronic cameras can be nonlinear. The relationship between the output and input of these nonlinear components can be expressed as a power function: output = (input)γ.
[0099] The nonlinear conversion of the color values output by the device is due to the nonlinear nature of the human visual system. Humans perceive visual stimuli through comparison. External stimuli are intensified at a certain rate, resulting in a uniform increase in the stimulus. Therefore, physical quantities that increase in geometric progression appear uniform to human perception. To display input colors in accordance with human visual principles, the aforementioned nonlinear conversion using the power function is necessary, converting linear color values to nonlinear ones. The gamma value, γ, can be determined based on the photoelectric conversion curve in the color space.
[0100] Color space: Color can be the different perceptions of the eye for light of different frequencies, or it can represent objectively existing light of different frequencies. A color space is a range of colors defined by a coordinate system established by humans to represent colors. A color gamut and a color model together define a color space. A color model is an abstract mathematical model that represents color using a set of color components. Color models can include, for example, the three primary color modes (red, green, and blue, RGB) and the four-color mode (cyan, magenta, and yellow keyplate, CMYK). A color gamut refers to the total number of colors that a system can produce. For example, Adobe RGB and sRGB are two different color spaces based on the RGB model. Each device, such as a monitor or printer, has its own color space and can only generate colors within its color gamut. When an image is moved from one device to another, the color of the image may change on different devices because each device converts and displays RGB or CMYK according to its own color space.
[0101] RGB space refers to a space that uses the brightness of the three primary colors of red, green, and blue to quantitatively represent video signals; YCC space is a color space that represents the separation of brightness and color. The three components of the YCC space video signal represent brightness, chroma, and chroma, respectively. Common YCC space video signals include YUV, YCbCr, ICtCp, etc.
[0102] To obtain images with a higher dynamic range, the image bit width is usually greater than or equal to 10 bits. Common coding standards that support HDR include H.266, H.265, and the High Efficiency Image Format (HEIF). The common Joint Photographic Experts Group (JPEG) and H.264 only support 8-bit encoding, so they cannot well support HDR video and HDR images.
[0103] HDR images or videos may require transcoding during distribution or transmission. Current HDR transcoding solutions directly transcode HDR images or videos. After decoding, the HDR image or video is decoded to obtain HDR pixel values, along with HDR format identifiers and information. These HDR pixel values typically undergo processing (such as image upsampling, downsampling, and enhancement). The HDR format identifier and information, along with the processed HDR pixel values, are then sent to the encoder for re-encoding. The re-encoded HDR image or video is then distributed to other devices. This direct transcoding solution (referred to as a "single-layer transcoding solution") can cause anomalies in the transcoded HDR image or video, impacting the user experience. This is because transcoding (decoding and then re-encoding) a single-layer HDR stream relies on the transcoding system to correctly transmit all HDR information obtained by the decoder to the encoder. If this information is lost, the transcoding system may not re-encode the video in the correct format, resulting in an erroneous bitstream. This can cause visual anomalies when viewed by users, severely impacting the user experience. Because many of the distribution and transcoding systems on the market have not been upgraded to support the correct transmission of HDR information from decoding to encoding, mainstream mobile phone and application manufacturers have received many user complaints in this regard.
[0104] For ease of description, the term "HDR object" is used in some embodiments of this application. An HDR object can be a static HDR image (also known as an HDR image, HDR photo, HDR picture, etc.), an HDR video, or other types of dynamic HDR images, or a frame within an HDR video or dynamic HDR image.
[0105] It is understood that for ease of description, some embodiments of the present application use HDR images as an example to introduce the technical solutions of the present application. However, it is understood that these embodiments can be applied not only to HDR images, but also to other HDR objects, such as HDR videos, dynamic HDR images, and a frame of an HDR video or dynamic HDR image.
[0106] The following describes the codec system used in the present application in conjunction with FIG5 , which is a schematic block diagram of a codec system used in an embodiment of the present application, such as a video codec system 10 (or simply codec system 10) that can utilize the techniques of the present application. The video encoder 20 (or simply encoder 20) and video decoder 30 (or simply decoder 30) in the video codec system 10 represent devices that can be used to perform various techniques according to the various examples described in this application.
[0107] As shown in FIG5 , the codec system 10 includes a source device 12 , which is configured to provide coded data such as coded image data 21 to a target device 14 for decoding the coded data.
[0108] The source device 12 includes an encoder 20 . Optionally, the source device 12 may further include an image source 16 , a pre-processor 18 (or a pre-processing unit), and a communication interface or a communication unit 22 .
[0109] The image source 16 may include or may be any type of image capture device for capturing real-world images, etc., and / or any type of image generation device, such as a computer graphics processor for generating computer-animated images, or any type of device for acquiring and / or providing real-world images, computer-generated images (e.g., screen content, virtual reality (VR) images, and / or any combination thereof (e.g., augmented reality (AR) images). The image source may be any type of memory or storage that stores any of the above images.
[0110] In order to distinguish the processing performed by the pre-processor 18 or the pre-processing unit 18 , the image or image data 17 may also be referred to as a raw image or raw image data 17 .
[0111] The preprocessor 18 is configured to receive (raw) image data 17 and preprocess the image data 17 to obtain preprocessed image data 19 or preprocessed image data 19. For example, the preprocessing performed by the preprocessor 18 may include cropping, color format conversion (e.g., from RGB to YCbCr), color grading, or denoising. It will be appreciated that the preprocessor 18 may be an optional component.
[0112] The video encoder 20 is configured to receive the pre-processed image data 19 and provide encoded image data 21 .
[0113] The communication interface 22 in the source device 12 can be used to receive the encoded image data 21 and send the encoded image data 21 (or any other processed version) to another device such as the target device 14 or any other device through the communication channel 13 for storage or reconstruction.
[0114] Target device 14 includes a decoder 30 (eg, video decoder 30 ) and, in addition or optionally, may include a communication interface or communication unit 28 , a post-processor 32 (or post-processing unit 32 ), and a display device 34 .
[0115] The communication interface 28 in the target device 14 is used to receive the encoded image data 21 (or any other processed version) directly from the source device 12 or from any other source device such as a storage device, for example, the storage device is an encoded image data storage device, and provide the encoded image data 21 to the decoder 30.
[0116] Communication interface 22 and communication interface 28 may be used to transmit or receive encoded image data 21 or encoded data via a direct communication link between source device 12 and destination device 14, such as a direct wired or wireless connection, or via any type of network, such as a wired network, a wireless network, any combination thereof, any type of private network, a public network, or any combination thereof. For example, communication interface 22 may be used to encapsulate encoded image data 21 into a suitable format, such as a message, and / or process the encoded image data using any type of transport coding or processing for transmission over a communication link or network. Communication interface 28 corresponds to communication interface 22 and may, for example, be used to receive the transmitted data and process the transmitted data using any type of corresponding transport decoding or processing and / or decapsulation to obtain the encoded image data 21. Both the communication interface 22 and the communication interface 28 may be configured as a unidirectional communication interface as indicated by the arrow pointing from the source device 12 to the corresponding communication channel 13 of the target device 14 in FIG5 , or a bidirectional communication interface, and may be used to send and receive messages, etc., to establish a connection, confirm and exchange any other information related to the communication link and / or data transmission, such as the transmission of encoded image data, etc.
[0117] The decoder 30 is configured to receive the encoded image data 21 and provide decoded image data 31 or a decoded image 31 .
[0118] The post-processor 32 in the target device 14 is configured to post-process the decoded image data 31 (also referred to as reconstructed image data), such as the decoded image, to obtain post-processed image data 33, such as the post-processed image. The post-processing performed by the post-processor 32 may include, for example, color format conversion (e.g., from YCbCr to RGB), color grading, cropping, or resampling, or any other processing for generating the decoded image data 31 for display on a display device 34 or the like.
[0119] The display device 34 in the target device 14 is configured to receive the post-processed image data 33 and display the image to a user or viewer. The display device 34 may be or include any type of display for displaying the reconstructed image, such as an integrated or external display screen or monitor. For example, the display screen may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro-LED display, a liquid crystal on silicon (LCoS) display, a digital light processor (DLP), or any other type of display screen.
[0120] Although FIG5 shows the source device 12 and the target device 14 as separate devices, device embodiments may also include both the source device 12 and the target device 14 or the functions of both the source device 12 and the target device 14, that is, both the source device 12 or the corresponding functions and the target device 14 or the corresponding functions. In these embodiments, the source device 12 or the corresponding functions and the target device 14 or the corresponding functions may be implemented using the same hardware and / or software or through separate hardware and / or software or any combination thereof.
[0121] According to the description, the existence and (accurate) division of different units or functions in the source device 12 and / or the target device 14 shown in FIG. 5 may vary depending on actual devices and applications, which is obvious to those skilled in the art.
[0122] The content providing system of the content distribution service used in the present application is described below in conjunction with Figure 6. Figure 6 is a block diagram of a content providing system for implementing the content distribution service used in an embodiment of the present application. The content providing system 2100 includes a capture device 2102, a terminal device 2106, and an (optional) display 2126. The capture device 2102 communicates with the terminal device 2106 via a communication link 2104. The communication link may include the above-mentioned communication channel 13. The communication link 2104 includes but is not limited to WiFi, Ethernet, wired, wireless (3G / 4G / 5G), USB, or any combination thereof.
[0123] The capture device 2102 may encode the captured data using the encoding method described in the embodiments of the present application. Alternatively, the capture device 2102 may distribute the captured data to a streaming media server (not shown), which encodes the data and transmits the encoded data to the terminal device 2106. The capture device 2102 includes, but is not limited to, a camera, a smartphone or tablet computer, a computer or laptop computer, a video conferencing system, a personal digital assistant (PDA), an in-vehicle device, or any combination thereof. In some embodiments, the capture device 2102 may include the source device 12 described above.
[0124] The terminal device 2106 in the content providing system 2100 receives and regenerates the decoded data. The terminal device 2106 can be a device with data reception and recovery capabilities, such as a smart phone or tablet computer, a computer / laptop 2110, a network video recorder (NVR) / digital video recorder (DVR) 2112, a television 2114, a set-top box (STB) 2116, a video conferencing system 2118, a video surveillance system 2120, a personal digital assistant 2122, an in-vehicle device 2124, or any combination thereof, or such a device capable of decoding the above-mentioned encoded data. In some embodiments, the terminal device 2106 can include the above-mentioned target device 14. The terminal device 2106 can decode the received data. In some embodiments, the terminal device 2106 can be a video playback application, a streaming media playback application, a streaming media playback platform, or a live broadcast platform running on the terminal device.
[0125] For end devices with displays, such as smartphones or tablets, computers or laptops 2110, NVRs / DVRs 2112, TVs 2114, PDAs 2122, or in-vehicle devices 2124, the end device can send the decoded data to its display. For end devices without displays, such as STBs 2116, video conferencing systems 3118, or video surveillance systems 2120, the device can be connected to an external display 2126 to receive and display the decoded data.
[0126] When each device in this system performs encoding or decoding, the image encoding device or image decoding device shown in the embodiments of the present application can be used.
[0127] The following describes a streaming media system applicable to the embodiment of the present application in conjunction with Figure 7. Figure 7 is a schematic diagram of a workflow of a streaming media system applicable to the embodiment of the present application.
[0128] The streaming media system includes a content creation module that generates the required content data, such as video or audio. The streaming media system also includes a video encoding module that encodes the generated content through an encoder. The streaming media system also includes a video stream transmission module that transmits the encoded video in the form of a code stream. Optionally, the format of the video stream can be converted into a code stream format of a commonly used transmission protocol for OTT (over-the-top) devices, for example, the protocol includes but is not limited to Real Time Streaming Protocol (RTSP), Hyper Text Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG HTTP Dynamic Adaptive Streaming over HTTP (MPEG-DASH), Real-time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP) or any combination thereof. Optionally, the video stream can be stored to store the original format of the video stream and / or the converted multiple code stream formats for easy use. Furthermore, the streaming system also includes a video stream encapsulation module for encapsulating the video stream to generate an encapsulated video stream. The encapsulated video stream can be referred to as a video streaming package. Exemplarily, the video streaming package can be generated based on a transcoded video stream or a stored video stream. Furthermore, the streaming system also includes a content distribution network (CDN) for distributing the video streaming package to multiple OTT devices, such as mobile phones, computers, tablets, and home projectors.
[0129] It should be noted that video encoding, video streaming transmission, video stream transcoding, video stream storage, video streaming package generation and content distribution network can all be implemented on cloud servers.
[0130] An exemplary end-to-end process diagram of the present application is described below with reference to FIG8 .
[0131] As shown in Figure 8, the original video file (also known as the master file) is obtained through procedures such as material production (e.g., shooting a video, producing a computer graphics (CG) video, etc.), editing, and color grading. Then, based on the original video file, the corresponding dynamic metadata is obtained. After encoding the original video file and the dynamic metadata, a compressed video is obtained. The compressed video is distributed / transmitted to a terminal device (e.g., a computer, set-top box, mobile phone, tablet computer, etc.). The terminal device decodes the compressed video to obtain a decompressed video, which is then displayed to the user through a display device (e.g., a monitor, a TV, etc.).
[0132] An exemplary streaming media system architecture of the present application is described below in conjunction with FIG9 . The streaming media system architecture includes: a client device, a content distribution network, and a cloud server.
[0133] The user on the client device sends a play or playback request to the cloud platform.
[0134] The cloud platform makes a decision, responds to the client device, and sends the address of the client-requested content on the CDN to the client device.
[0135] The client device then requests the CDN to play the content based on the address, and the CDN provides the content to the client device, ultimately completing the client device's request.
[0136] The following describes the system architecture applicable to the embodiment of the present application in conjunction with Figure 10. Figure 10 is a schematic diagram of a possible system architecture applicable to the embodiment of the present application. The system architecture of the embodiment of the present application includes: front-end equipment, transmission links, and terminal display equipment.
[0137] Among them, the front-end equipment is used to capture or produce HDR / SDR content (for example, HDR / SDR video or images).
[0138] In a possible embodiment, the front-end device can also be used to extract corresponding metadata from the HDR content. The metadata may include global mapping information, local mapping information, and dynamic metadata and static metadata corresponding to the HDR content. The front-end device can send the HDR content and metadata to the terminal display device via a transmission link. Specifically, the HDR content and metadata can be transmitted in the form of one data packet, or respectively in two data packets, which is not specifically limited in the embodiment of the present application.
[0139] Optionally, the terminal display device can be used to receive metadata and HDR content, and extract the global mapping information, local mapping information, and the terminal display device information contained in the corresponding metadata according to the HDR content, obtain a mapping curve to perform global tone mapping and local tone mapping on the HDR content, convert it into display content adapted for the HDR display device or SDR device in the terminal display device, and display it. It should be understood that in different embodiments, the terminal display device may include a display device with a display capability of a lower dynamic range or a higher dynamic range than the HDR content generated by the front-end device, and this application is not limited thereto.
[0140] Optionally, the front-end device and the terminal display device in this application can be independent and different physical devices. For example, the front-end device can be a video capture device or a video production device, where the video capture device can be a video camera, a camera, an image rendering machine, etc. The terminal display device can be a device with video playback function, such as virtual reality (VR) glasses, a mobile phone, a tablet, a television, a projector, etc.
[0141] Optionally, the transmission link between the front-end device and the terminal display device can be a wireless connection or a wired connection, wherein the wireless connection can adopt technologies such as long term evolution (LTE), fifth generation (5G) mobile communications, and future mobile communications. Wireless connections can also include wireless fidelity (WiFi), Bluetooth, near field communication (NFC), and other technologies. Wired connections can include Ethernet connections, local area network connections, etc. There is no specific limitation on this.
[0142] The present application may also integrate the functions of the front-end device and the terminal display device into the same physical device, for example, a terminal device such as a mobile phone or tablet with a video capture function. The present application may also integrate some functions of the front-end device and some functions of the terminal display device into the same physical device. This is not specifically limited.
[0143] Figure 11 is a schematic diagram of a method for processing a digital signal according to an embodiment of the present application. As shown in Figure 11, the method for processing a digital signal according to an embodiment of the present application can be applied at a decoding end.
[0144] The decoding module (also called decoder) can obtain base layer data, enhancement layer data and metadata from the received bitstream. Then, the decoding module can synthesize the base layer data and enhancement layer data to obtain an HDR image.
[0145] The graphics processing module can process the HDR image and then send the processed HDR image to the display module. The graphics processing module can also process the base layer data and then send the processed base layer data to the display module. The graphics processing module can also process the base layer data and the HDR image and then send the processed HDR image and the processed base layer data to the display module.
[0146] The display module may present an HDR image based on the received data (eg, the processed HDR image, or the processed HDR image and processed base layer data, etc.).
[0147] For the sake of convenience of description, the HDR image obtained by the decoding module based on the basic layer data and the enhancement layer data can be called HDR image 1, the HDR image obtained after the graphics processing module processes the HDR image 1 can be called HDR image 2, and the HDR image displayed by the display module can be called HDR image 3.
[0148] The base layer data, which may also be referred to as a base layer image, a base image or a basic image, may be an SDR image or an HDR image with a lower dynamic range.
[0149] The enhancement layer data, also known as enhancement data, enhancement layer image, or enhancement image, may include some image detail information. The image detail information contained in the enhancement layer data is then used to supplement the base layer data, thereby synthesizing an HDR image with better contrast (i.e., HDR image 1 mentioned above).
[0150] The dynamic range of the base layer data is smaller than the dynamic range of the HDR image (ie, HDR image 1) determined based on the base layer data and the enhancement layer data.
[0151] For example, in some embodiments, the base layer data may be an SDR image, and HDR image 1 may be an HDR image.
[0152] For another example, in some other embodiments, the base layer data may be an HDR image, but the dynamic range of the HDR image is smaller than the dynamic range of the HDR image 1 .
[0153] For example, assuming the dynamic range of the base layer data is DR x1 to DR x2 , the dynamic range of HDR image 1 is DR y1 to DR y2 In some embodiments, DR y1 Less than DR x1 , DR y2 Greater than DR x2 In other embodiments, DR y1 Less than DRx1 , DR y2 Equal to DR x2 In other embodiments, DR y1 Equal to DR x1 , DR y2 Greater than DR x2 In other words, the base layer data can be considered to be an image with a smaller dynamic range than the HDR image 1.
[0154] Figure 12 is a schematic flow chart of an encoding method provided according to an embodiment of the present application. The method shown in Figure 12 can be performed by an electronic device or a component in an electronic device (e.g., a chip, a system on chip (SoC), etc.). The electronic device can be the source device 12 shown in Figure 5, the capture device 2102 shown in Figure 6, or the front-end device shown in Figure 10. For ease of description, the following embodiments assume that the method shown in Figure 12 is performed by an electronic device.
[0155] 1201. Acquire a first HDR image and N first basic layer data corresponding to the first HDR image.
[0156] The first HDR image can be directly acquired by the device camera, or it can be obtained by synthesizing multiple low dynamic range images with different exposure values. The embodiment of the present application does not limit the method of obtaining the first HDR image. The embodiment of the present application also does not limit the data format of the first HDR image. In terms of color space, the color space of the first HDR image can be YUV or RGB. In terms of the bit width of the data, the bit width of the first HDR image can be 8 bits, 10 bits, or 12 bits, etc. The photoelectric conversion characteristics of the first HDR image can be PQ, gamma, log, HLG, etc.
[0157] The first base layer data may also be referred to as first base layer image data. The first base layer data corresponds to the first HDR image.
[0158] In some embodiments, the camera may simultaneously capture the first HDR image and the corresponding base layer image data.
[0159] In other embodiments, the corresponding base layer image data can be obtained by processing the first HDR image. For example, the first HDR image is acquired by a camera or synthesized from multiple SDR images. In this case, the first HDR image is subjected to tone mapping, neural network processing, etc. to obtain the base layer image data corresponding to the first HDR image.
[0160] For ease of description, capturing base layer image data corresponding to the first HDR image via a camera can be referred to as base layer acquisition scheme 1, and processing the first HDR image to obtain base layer image data corresponding to the first HDR image can be referred to as base layer acquisition scheme 2. It should be understood that base layer acquisition scheme 1 and base layer acquisition scheme 2 are merely examples of acquisition schemes for obtaining base layer image data, and are not intended to limit base layer image data acquisition schemes. For ease of description, base layer image data acquired via acquisition schemes such as base layer acquisition scheme 1 or base layer acquisition scheme 2 can be referred to as reference base layer data.
[0161] In some embodiments, the reference base layer data may be directly used as the first base layer data.
[0162] In other embodiments, the first base layer data may be obtained by processing the reference base layer data. The specific process of determining the first base layer data based on the reference base layer data is similar to the process of determining the first enhancement layer data based on the intermediate enhancement data. For example, the reference base layer data may be encoded using a coding scheme such as PQ coding, HLG coding, gamma coding, log coding, or arbitrary curve coding to obtain the first base layer data. For the specific determination method, reference may be made to the description in the following embodiments. It is understood that, in the case where the first base layer data is obtained by encoding the reference base layer data, the first metadata may also carry a decoding scheme for decoding the first base layer data and / or a coding scheme for encoding the first basic layer data.
[0163] Similarly, the embodiments of the present application do not limit the format of the first base layer data. For example, the color space of the first base layer data can be YUV or RGB. The bit width of the first base layer data can be 8 bits, 10 bits, or 12 bits, etc. The photoelectric conversion characteristics of the first base layer data can be PQ, gamma, log, HLG, etc.
[0164] N is a positive integer greater than or equal to 1. That is, in some embodiments, a first HDR image and a first base layer data may be acquired. In other embodiments, a first HDR image and a plurality of first base layer data may be acquired.
[0165] 1202. Determine N first enhancement layer data according to the first HDR image, the N first base layer data, and at least one first coding scheme.
[0166] As described above, N is a positive integer greater than or equal to 1. The number of first enhancement layer data is the same as the number of first base layer data. For example, if a first HDR image and a first base layer data are acquired in step 1201, then a first enhancement layer data can be determined based on the acquired first HDR image and the acquired first base layer data and at least one first coding scheme. If a first HDR image and a plurality of base layer data (e.g., two) are acquired in step 1201, then a plurality of first enhancement layer data can be determined based on the acquired first HDR image, the two base layer data, and the at least one coding scheme.
[0167] 1203 : Encode the N first enhancement layer data, the N first base layer data, and the first metadata to obtain a code stream.
[0168] The first metadata includes first indication information, which is used to indicate the at least one encoding scheme or a decoding scheme corresponding to the at least one encoding scheme. The decoding end device can decode the received encoded data based on the first indication information. Therefore, in some embodiments, the first indication information can also be referred to as decoding indication information.
[0169] In some embodiments, N intermediate enhancement data may be determined first, and then the N first enhancement layer data may be determined based on the N intermediate enhancement data.
[0170] In some embodiments, the N intermediate enhancement data may be determined based on the first HDR image and the N first base layer data.
[0171] In other embodiments, N data may be first determined based on the first HDR image and the N first base layer data, and then the N data may be processed to obtain the N intermediate enhancement data. For ease of description, the N data may be referred to as N reference intermediate enhancement data. In other words, in some embodiments, the N intermediate enhancement data are the N reference intermediate enhancement data. In other embodiments, the N intermediate enhancement data correspond one-to-one to the N reference intermediate enhancement data, and each of the N intermediate enhancement data is determined based on the corresponding reference intermediate enhancement data.
[0172] First, we introduce how to determine the reference intermediate enhancement data.
[0173] In some embodiments, the first HDR image may have a first base layer data (i.e., N is equal to 1). In this case, a reference intermediate enhancement data may be determined based on the first HDR image and the first base layer data. For ease of description, HDRα[j] is used to represent the value of the j-th pixel in the first HDR image, baseα[j] is used to represent the value of the j-th pixel in the first base layer data, and Enhanceα[j] is used to represent the value of the j-th pixel in the reference intermediate enhancement data. Then in some embodiments, HDRα[j], baseα[j], and Enhanceα[j] satisfy the following relationship:
[0174] Enhance α[j]=HDR α[j] / f(base α[j]), (Formula 2.1).
[0175] In some other embodiments, HDRα[j], baseα[j] and Enhanceα[j] satisfy the following relationship:
[0176] Enhanceα[j]=HDRα[j]-f(baseα[j]), (Formula 2.2).
[0177] The f() in Formula 2.1 and Formula 2.2 can be a default conversion function or a conversion function specified by metadata, which is not limited in the embodiments of the present application. In addition, the embodiments of the present application do not limit the analytical expression of the conversion function. For example, in some embodiments, f(baseα[j])=baseα[j]. For another example, in other embodiments, f(baseα[j])=A×baseα[j], where parameter A can be a preset value or a value determined according to baseα[j]. For another example, in other embodiments, f(baseα[j])=baseα[j]+B, where parameter B can be a preset value or a value determined according to baseα[j].
[0178] In some other embodiments, the first HDR image may have multiple first base layer data (i.e., N is a positive integer greater than or equal to 2). In this case, multiple reference intermediate enhancement data can be determined based on the first HDR image and the multiple first base layer data. For ease of description, HDRα[j] is used to represent the value of the jth pixel in the first HDR image, and baseα is used to represent the pixel value of the jth pixel in the first HDR image. i [j] represents the value of the jth pixel in the i-th first basic layer data among the multiple first basic layer data, using Enhanceα i[j] represents the value of the jth pixel in the i-th intermediate enhancement data in the multiple reference intermediate enhancement data, where i is a positive integer greater than or equal to 1 and less than or equal to N, that is, i=1, ..., N. HDRα[j], baseα i [j] and Enhanceα i [j] may satisfy the above formula 2.1 or formula 2.2. In other words, in some embodiments, HDRα[j], baseα i [j] and Enhanceα i [j] satisfies the following relationship:
[0179] Enhanceα i [j] = HDRα [j] / f (base α i [j]), (Formula 2.3).
[0180] In other embodiments, HDRα[j], baseα i [j] and Enhanceα i [j] satisfies the following relationship:
[0181] Enhanceα i [j] = HDRα[j]-f(baseα i [j]), (Formula 2.4).
[0182] For the description of f(), please refer to the scenario where N is equal to 1 and will not be repeated here.
[0183] As described above, in some embodiments, the reference intermediate enhancement data is equal to the intermediate enhancement data. In this case, determining N reference intermediate enhancement data is equivalent to determining N intermediate enhancement data. Therefore, N first enhancement layer data can be directly determined based on the N reference intermediate enhancement data. The method for determining N first enhancement layer data based on N reference intermediate enhancement data is the same as the method for determining N first enhancement layer data based on N intermediate enhancement data.
[0184] The following describes how to determine the intermediate enhancement data based on the reference intermediate enhancement data.
[0185] In some embodiments, a numerical range of the reference intermediate enhancement data can be obtained. For example, a minimum value and / or a maximum value of the reference intermediate enhancement data can be obtained. The reference intermediate enhancement data is then mapped based on the obtained data to obtain the intermediate enhancement data. For example, the minimum value can be mapped to a first preset value, and / or the maximum value can be mapped to a second preset value. Based on the mapping relationship between the minimum value and / or the maximum value, other values of the reference intermediate enhancement data are then mapped to obtain the intermediate enhancement data. The first preset value is different from the second preset value. The first preset value can be smaller than the second preset value. For example, the first preset value is 0 and the second preset value is 1.
[0186] In other embodiments, a histogram of the reference intermediate enhancement data may be obtained, and then a mapping relationship TME() may be obtained using a histogram equalization method. The intermediate enhancement data is determined based on the mapping relationship. Enhanceα[j] is used to represent the value of the j-th pixel in the reference intermediate enhancement data, and EnhanceAfterα[j] is used to represent the value of the j-th pixel in the intermediate enhancement data. In some embodiments, Enhanceα[j] and EnhanceAfterα[j] satisfy the following relationship:
[0187] EnhanceAfterα[j]=TME(Enhanceα[j]), (Formula 3.1).
[0188] In some other embodiments, Enhanceα[j] and EnhanceAfterα[j] satisfy the following relationship:
[0189] EnhanceAfterα[j]=TME()×Enhanceα[j], (Formula 3.2).
[0190] In some embodiments, the reference intermediate enhanced data may be multi-channel data. In this case, the single-channel data may be determined based on the multi-channel data to obtain the intermediate enhanced data.
[0191] In some embodiments, the intermediate enhancement data may be data of one channel of the corresponding reference intermediate enhancement data. For example, assuming that the reference intermediate enhancement data includes data of three channels (R channel data, G channel data, and B channel data), the corresponding intermediate enhancement data may be data of one of the three channels. For example, the intermediate enhancement data may be R channel data. In other words, the reference intermediate data and the intermediate enhancement data satisfy the following relationship:
[0192] EnhanceAfter[Single-Channel]=Enhance[Channel 1 / 2 / … / P], (Formula 4.1)
[0193] Among them, EnhanceAfter[Single-Channel] represents the intermediate enhancement data, Enhance[Channel 1 / 2 / … / P] represents the data of one channel among channels 1 / 2 / … / P in the reference intermediate enhancement data, and P is a positive integer greater than or equal to 2.
[0194] In other embodiments, the multi-channel data of the reference intermediate enhanced data can be transformed separately to obtain multiple transformation results, and one of the transformation results is determined to be the intermediate enhanced data corresponding to the reference intermediate enhanced data. For example, assuming that the reference intermediate enhanced data includes data of three channels (R channel data, G channel data, and B channel data), the reference intermediate enhanced data can be transformed using a conversion function to obtain the transformed reference intermediate enhanced data. Then, the value of one channel in the transformed reference intermediate enhanced data is selected as the intermediate enhanced data. The relationship between the first intermediate enhanced data, the second intermediate enhanced data, and the reference intermediate enhanced data can be expressed by Formula 4.2 and Formula 4.3:
[0195] Enhance2[Multi-Channel]=f(Enhance[Multi-Channel]), (Formula 4.2)
[0196] EnhanceAfter[Single-Channel]=Enhance2[Channel 1 / … / P], (Formula 4.3)
[0197] Wherein, Enhance2[Multi-Channel] represents the reference intermediate enhancement data after the transformation, f() represents the conversion function, Enhance[Multi-Channel] represents the reference intermediate enhancement data, EnhanceAfter[Single-Channel] represents the intermediate enhancement data, Enhance2[Channel 1 / … / P] represents the data of one channel from channel 1 to channel P in the transformed reference intermediate enhancement data, and P is a positive integer greater than or equal to 2.
[0198] In some embodiments, the reference intermediate enhancement data may be determined according to the relationship function and the reference intermediate enhancement data.
[0199] In some embodiments, the intermediate enhancement data includes values of multiple pixels, each pixel in the multiple pixels corresponds to multiple groups of pixels, and the multiple groups of pixels respectively belong to multi-channel data of the corresponding reference intermediate enhancement data. Each group of pixels in the multiple groups of pixels includes at least one pixel, and the pixel value of each pixel in the multiple pixels is determined based on the pixel values of the corresponding multiple groups of pixels and the relationship function.
[0200] For example, assuming that the reference intermediate enhancement data includes three channel data, pixel k is the kth pixel in the intermediate data. Then pixel k has three groups of corresponding pixels, and these three groups of pixels correspond one to one to the three channels. If the size of the reference intermediate enhancement data is the same as the size of the reference intermediate data, then each group of pixels in the three groups of pixels includes a pixel value. In other words, the three groups of pixels include a total of three pixel values, and these three pixel values belong to the three groups of pixels respectively. These three pixel values are the pixel values of the kth pixel of the reference intermediate enhancement data in the three channels. The pixel value of pixel k can be determined based on these three pixel values and the relationship function. The pixel value of pixel k and these three pixel values can be expressed by the following relationship:
[0201] EnhanceAfter k [Single-Channel]=C(Enhance k [Channel 1], Enhance k [Channel2], Enhance k [Channel3]), (Formula 5.1)
[0202] Among them EnhanceAfter k [Single-Channel] represents the pixel value of pixel k, Enhance k [Channel 1] refers to the pixel value of the kth pixel in channel 1 of the reference intermediate enhancement data. k [Channel 2] refers to the pixel value of the kth pixel in channel 2 of the reference intermediate enhancement data. k [Channel 3] represents the pixel value of the k-th pixel in channel 3 of the reference intermediate enhanced data, and C() represents the relationship function.
[0203] In some embodiments, the relationship function may be to take all element eigenvalues, such as maximum value, minimum value, average value, variance, etc. In other embodiments, the relationship function may be to transform or combine the above eigenvalues, such as weighted summation, etc.
[0204] In some embodiments, part of the N intermediate enhancement data may be determined according to corresponding reference intermediate enhancement data, while another part of the intermediate enhancement data may directly use the corresponding reference intermediate enhancement data.
[0205] After the N intermediate enhancement data are determined, the N first enhancement layer data may be determined according to the N intermediate enhancement data. The N first enhancement layer data may be obtained by encoding the N intermediate enhancement data.
[0206] In some embodiments, the N intermediate enhancement data may be encoded using at least one encoding scheme to obtain the N first enhancement layer data. The N first enhancement layer data correspond one-to-one to the N intermediate enhancement data, and each first enhancement layer data is the result of encoding the corresponding intermediate enhancement data.
[0207] In some embodiments, the at least one coding scheme may include only one coding scheme. In this case, the N intermediate enhancement data may be encoded using the one coding scheme to obtain the N first enhancement layer data.
[0208] In other embodiments, the number of coding schemes is the same as the number of intermediate enhancement data. In other words, there may be N coding schemes. These N coding schemes correspond one-to-one to the N intermediate enhancement data. Each coding scheme is used to encode the corresponding intermediate enhancement data to obtain first enhancement layer data. In other words, the i-th coding scheme among the N coding schemes may be used to encode the i-th intermediate enhancement data among the N intermediate enhancement data to obtain the i-th first enhancement layer data among the N first enhancement layer data, where i = 1, ..., N.
[0209] In some other embodiments, the number of encoding schemes may be smaller than the number of intermediate enhancement data. In this case, multiple intermediate enhancement data may use the same encoding scheme.
[0210] If N is equal to 1, then the N coding schemes can be any one of the following coding schemes: PQ coding, HLG coding, gamma coding, log coding, or arbitrary curve coding.
[0211] If N is a positive integer greater than or equal to 2, then the N coding schemes can be one or more of the above coding schemes (i.e., PQ coding, HLG coding, gamma coding, log coding, arbitrary curve coding). For example, if N is equal to 2, then the two coding schemes can be PQ coding and log coding, respectively. For another example, if N is equal to 2, then the two coding schemes can both be log coding and the parameters of the two coding schemes are different. For example, one of the two coding schemes is log coding with a base of 2, and the other coding scheme is log coding with a base of 3.
[0212] In some embodiments, the encoding scheme and specific parameters used by the encoding scheme (eg, the base in log encoding) may be pre-set.
[0213] In other embodiments, the encoding scheme may be determined by the encoding side. In this case, the encoding scheme to be used may be indicated to the decoding side via the first indication information, so that the decoding side selects the corresponding decoding scheme to decode the received code stream. Alternatively, the decoding scheme may be indicated to the decoding side via the first indication information, so that the decoding side can directly use the decoding scheme indicated by the first indication information to decode the received code stream.
[0214] For example, in some embodiments, the first indication information is used to indicate at least one decoding scheme, and the at least one decoding scheme corresponds one-to-one with the at least one encoding scheme. Each decoding scheme in the at least one decoding scheme is used to decode data encoded using the corresponding encoding scheme.
[0215] For another example, in some embodiments, the first indication information is used to indicate at least one decoding function and decoding parameters of each of the at least one decoding function. The at least one decoding function corresponds one-to-one to the at least one coding scheme. The i-th decoding function in the at least one decoding function is used to decode the i-th first enhancement layer data in the at least one first enhancement layer data.
[0216] In some embodiments, the encoding scheme may be any function curve. In this case, the intermediate enhancement data may be compressed and encoded using the function curve. In some embodiments, different intermediate enhancement data may be compressed and encoded using different curve shapes and parameters. In other embodiments, different intermediate enhancement data may be compressed and encoded using the same curve shape and parameters. The first indication information may indicate the curve shape and parameters used to compress the intermediate enhancement data.
[0217] In some embodiments, the encoding scheme may be a logarithmic (log) or exponential function. Taking the logarithmic function as an example, the logarithmic function may be used to compress and encode the intermediate enhancement data to obtain the first enhancement layer data.
[0218] In some embodiments, the parameters of the function used for compression coding (e.g., the base of a logarithmic function) are pre-set or pre-negotiated. In this case, the first metadata indicates the type of function used for compression coding. Exemplarily, the function type used for compression coding may be a logarithmic function or an exponential function.
[0219] In other embodiments, the parameters of the function used for compression coding are determined during compression. In this case, the first metadata may indicate the function used for compression coding and the parameters used by the function.
[0220] In other embodiments, the function used for compression coding and the parameters of the function may be pre-set or pre-negotiated.
[0221] In some embodiments, one piece of intermediate enhancement data may be divided into multiple regions, and then the multiple regions may be encoded using multiple encoding schemes respectively.
[0222] In some embodiments, if N is a positive integer greater than or equal to 2, each of the N intermediate enhanced data may be divided into a plurality of regions.
[0223] In other embodiments, if N is a positive integer greater than or equal to 2, some of the N intermediate enhancement data may be divided into multiple regions, while the remaining intermediate enhancement data may not be divided. The undivided intermediate enhancement data may be encoded according to the above scheme to obtain corresponding first enhancement layer data.
[0224] For ease of description, the following description is made by taking the division of each intermediate enhancement data as an example.
[0225] Assume that the i-th intermediate enhanced data among N intermediate enhanced data can be divided into N i Use N areas respectively. i The coding scheme for this N i The regions are encoded to obtain the i-th first enhancement layer data among the N first enhancement layer data. The i-th first enhancement layer data includes N i For the convenience of description, the area before encoding can be called the first area, and the area after encoding can be called the second area. In other words, the i-th intermediate enhancement data can be divided into N i The first region, the i-th first enhancement layer data includes N i Second area. Use N i The coding scheme for this N i The first area code is obtained i In other words, the N i The j-th second region in the second regions is i The jth coding scheme among the N coding schemes is used to calculate the i The first region is obtained after encoding. i is a positive integer greater than or equal to 2.
[0226] For example, assuming N=3, the first intermediate enhancement data can be divided into N1 first regions. The N1 first regions are encoded using N1 coding schemes to obtain N1 second regions. The first first enhancement layer data includes the N1 second regions. Similarly, the second intermediate enhancement data can be divided into N2 first regions. The N2 first regions are encoded using N2 coding schemes to obtain N2 second regions. The second first enhancement layer data includes the N2 second regions. The third intermediate enhancement data can be divided into N3 first regions. The N3 first regions are encoded using N3 coding schemes to obtain N3 second regions. The third first enhancement layer data includes the N3 second regions.
[0227] In some embodiments, the number of regions divided into any two intermediate enhanced data may be the same. Also taking N=3 as an example, in this case, N1=N2=N3.
[0228] In some embodiments, the number of regions divided into any two intermediate enhancement data can be the same or different. Taking N=3 as an example, in this case, the relationship between N1, N2, and N3 can be any of the following: N1=N2≠N3, N1≠N2=N3, or N1≠N2≠N3.
[0229] In some embodiments, the N i Any two of the N coding schemes can be different coding schemes. For example, assuming that coding scheme 1 and coding scheme 2 are i There are two encoding schemes in the encoding scheme, encoding scheme 1 uses function curve encoding, and encoding scheme 2 uses logarithmic function encoding.
[0230] In other embodiments, the N i Any two coding schemes in the N coding schemes can be the same coding scheme but with different parameters. For example, suppose coding scheme 1 and coding scheme 2 are the N i There are two encoding schemes in the encoding scheme. Encoding scheme 1 and encoding scheme 2 both use logarithmic functions for encoding, but the base of encoding scheme 1 is 2, and the base of encoding scheme 2 is 3.
[0231] In other embodiments, the N i Any two coding schemes in the N coding schemes can be the same coding scheme and have the same parameters. For example, assuming that coding scheme 1 and coding scheme 2 are the N i Two coding schemes in the N coding schemes. Coding scheme 1 and coding scheme 2 both use logarithmic functions for coding, and the bases of coding scheme 1 and coding scheme 2 are both 2. In this case, it can also be considered that the N i An encoding scheme is an encoding scheme.
[0232] In some embodiments, the first indication information may be used to indicate M groups of coding schemes. Each group of coding schemes in the M groups of coding schemes corresponds to one or more of the N intermediate enhancement data. A group of coding schemes corresponding to the i-th intermediate enhancement data in the N intermediate enhancement data includes N i The N i The coding schemes can be used to encode N i The regions are encoded to obtain the i-th first enhancement layer data of N first enhancement layer data. M can be a positive integer greater than 1.
[0233] If M is equal to N, the first indication information can be used to indicate N groups of coding schemes. The N groups of coding schemes correspond one-to-one to the N intermediate enhancement data. The i-th group of coding schemes in the N groups of coding schemes includes N i The N i The coding schemes are used to encode N i Encode the area.
[0234] In the above embodiment, the first indication information indicates the encoding scheme. The decoding end device can determine the corresponding decoding scheme according to the encoding scheme. Accordingly, in other embodiments, the first indication information can directly indicate the decoding scheme. In this way, the decoding end device can directly decode the corresponding data according to the decoding scheme indicated by the first indication information. For example, the first indication information can be used to indicate M groups of decoding schemes. Each group of decoding schemes in the M groups of decoding schemes corresponds to one or more of the N first enhancement layer enhancement data. A group of decoding schemes corresponding to the i-th first enhancement layer data in the N first enhancement layer data includes N i decoding scheme. i The decoding schemes can be used to decode N of the i-th first enhancement layer data. i Encode the area.
[0235] If M is equal to N, the first indication information may be used to indicate N groups of decoding schemes, wherein the i-th group of decoding schemes in the N groups of decoding schemes includes N i decoding scheme, the N i The decoding scheme and the N i There is a one-to-one correspondence between the N i The decoding schemes are respectively used to decode the N i Decode the area.
[0236] In some embodiments, the intermediate enhancement data is not processed and / or encoded, but is directly used as the first enhancement layer data.
[0237] It should be noted that this application does not limit the first enhancement layer data, intermediate enhancement data, and reference intermediate enhancement data to any domain, which can be a linear domain, a PQ domain, or a log domain. This application also does not limit the color space of the first enhancement layer data, intermediate enhancement data, and reference intermediate enhancement data, which can be a YUV, RGB, Lab, HSV, or other color space.
[0238] Furthermore, before and / or after determining the intermediate enhancement data and / or first enhancement layer data, or after determining the reference intermediate enhancement data, color gamut mapping may be performed to convert the data from the current color gamut to the target color gamut. The data in the target color gamut is then processed. The current color gamut and the target color gamut include, but are not limited to, BT.2020, BT.709, DCI-P3, sRGB, and the like.
[0239] The embodiment of the present application does not limit the codec. For example, codecs such as versatile video coding (VVC), joint photographic experts group (JPEG), high efficiency image format (HEIF), advanced video coding (AVC) / H.264, audio video coding standard (AVS), and high efficiency video coding (HEVC) can be used. The embodiment of the present application does not limit the location of the first metadata. For example, the first metadata can be placed in supplemental enhancement information (SEI), network abstraction layer (NAL) unit, reserved packet unit, application (APP) extension information, etc.
[0240] Each of the at least one coding schemes may be a coding function. In some embodiments, the first indication information may indicate at least one coding function. For example, the first indication information may carry the at least one coding function. As another example, in some embodiments, each coding function may have an index. The first indication information may carry at least one index, and the at least one index corresponds one-to-one with the at least one coding function. In this way, the decoding end may determine the at least one coding function corresponding to the at least one index, and further determine the decoding function based on the coding function.
[0241] In some embodiments, the encoding function may further include one or more parameters. The first indication information may indicate the at least one encoding function and the parameters of each encoding function. Similarly, the first indication information may carry the at least one encoding function and the parameters of each encoding function. The first indication information also carries the index of each encoding function and the parameters of each encoding function. In this way, the decoding end can determine the encoding function by the index in the first indication information, and determine the parameters of the encoding function based on the parameters in the first indication information. In other embodiments, the parameters of the encoding function may also have corresponding indexes. In this case, the first indication information may carry at least one first index and at least one second index, the at least one first index corresponding one-to-one to the at least one encoding function, and the at least one second index corresponding one-to-one to the parameters of the at least one encoding function. In this way, the decoding end device can determine the encoding function by the first index and determine the parameters of the encoding function by the second index.
[0242] In some embodiments, the first indication information may indicate a decoding function. In this way, the decoding end device no longer needs to determine the corresponding decoding function through the encoding function, thereby reducing the overhead of the decoding end device. For example, in some embodiments, the first indication information may carry at least one decoding function, and the at least one decoding function corresponds one-to-one with the at least one encoding scheme, and each decoding function is used to decode the code stream encoded using the corresponding encoding scheme. Similarly, in some embodiments, the first indication information may carry at least one index, and the at least one index corresponds one-to-one with the at least one decoding function. In this case, the decoding end device can determine the at least one decoding function through the at least one index carried by the first indication information.
[0243] In some embodiments, the decoding function may further include one or more parameters. The first indication information may carry at least one decoding function and the parameters of each decoding function. The first indication information may also carry the index of each decoding function and the parameters of each decoding function. In this way, the decoding end device may determine the decoding function based on the index of the decoding function and determine the parameters of the decoding function based on the parameters carried in the first indication information. Similarly, in some embodiments, the parameters of each decoding function may also have a corresponding index. In this case, the first indication information may carry at least one third index and at least one fourth index, the at least one third index corresponding one-to-one with the at least one decoding function, and the at least one fourth index corresponding one-to-one with the parameters of the at least one decoding function. In this way, the decoding end device may determine the decoding function through the third index and determine the parameters of the decoding function through the third index.
[0244] Figure 13 is a schematic flow chart of a decoding method provided according to an embodiment of the present application. The method shown in Figure 13 can be performed by an electronic device or a component in an electronic device (such as a chip, SoC, etc.). The electronic device can be the target device 14 in Figure 5, the terminal device 2106 as shown in Figure 6, or the terminal display device as shown in Figure 10. For ease of description, the following embodiments assume that the method shown in Figure 13 is performed by an electronic device.
[0245] 1301. Decode the acquired bitstream to obtain N first enhancement layer data, N first base layer data, and first metadata, where the first metadata includes first indication information, where the first indication information is used to indicate at least one decoding scheme. N is a positive integer greater than or equal to 1.
[0246] The code stream may be encoded by the encoding end device using the method shown in Figure 12. For ease of description, it is assumed that the method shown in Figure 12 is executed by the first electronic device and the method shown in Figure 13 is executed by the second electronic device.
[0247] In some embodiments, the first electronic device and the second electronic device may be different electronic devices. For example, in some embodiments, after completing the encoding, the first electronic device may send the code stream to the second electronic device through a transmission link (e.g., optical fiber, WiFI, 3G / 4G / 5G network, etc.). The second electronic device may receive the code stream through the communication link. The first electronic device may also store the code stream in a storage device (e.g., a mobile hard disk, a USB flash drive, etc.). The second electronic device may read the storage device and obtain the code stream stored in the storage device.
[0248] In other embodiments, the first electronic device and the second electronic device may be the same electronic device. For example, a smartphone may capture a video using a camera assembly and then obtain corresponding first metadata based on the original video file. The original video file and the first metadata are encoded to obtain a bitstream. The bitstream is encapsulated into a video file and stored in the smartphone's built-in memory. The smartphone can read the video file and obtain the bitstream. In this case, the first electronic device and the second electronic device are both the smartphone.
[0249] The encapsulation position of the first metadata is determined by the first electronic device when encoding. For example, in some embodiments, if the code stream is obtained by encoding using HEVC or VVC, then the second electronic device can obtain the first metadata from the SEI of HEVC or VVC. For another example, in some embodiments, if the code stream is obtained by encoding using AVC / H.264, then the second electronic device can obtain the first metadata from the NAL unit or the reserved packet unit. For another example, in some embodiments, the second electronic device can obtain the first metadata from the APP extension information encapsulated in the JPEG file interchange format. For another example, in some embodiments, the second electronic device can obtain the first metadata from the data segment encapsulated by the Moving Picture Experts Group (MPEG)-Part 14 (MPEG-4part 14, MP4).
[0250] The first metadata may carry some general information, such as data format, region division information, region traversal order information, or image features, encoding compression format, curve parameters, etc., as well as one or more metadata information units. Metadata information units may include coordinate information, image features, curve parameters, etc.
[0251] The first metadata may also include first indication information. The first indication information may indicate the at least one encoding scheme in two ways, directly or indirectly. For example, in some embodiments, the first indication information may include the at least one decoding scheme. In this way, the second electronic device may directly obtain the at least one decoding scheme from the first indication information. For example, in some other embodiments, the first indication information may include at least one encoding scheme, and each encoding scheme has a corresponding decoding scheme. In this way, the second electronic device can determine the at least one decoding scheme based on the at least one encoding scheme.
[0252] The second electronic device can decode the code stream based on the first metadata to obtain the first base layer data. In some embodiments, the first base layer data is the base layer data obtained after decoding. In other words, the second electronic device obtains N base layer data after decoding the code stream, and the N base layer data can be used as the N first base layer data. In other embodiments, the second electronic device can also convert the N base layer data after decoding the code stream to obtain N base layer data, and the converted base layer data is the first base layer data. The conversion method of the base layer data can refer to the conversion method of the first enhancement layer data in the following embodiments. For the sake of brevity, it will not be repeated here.
[0253] The embodiment of the present application does not limit the code stream format of the base layer data and the enhancement layer data (including the first enhancement layer data and the second enhancement layer data mentioned later). In terms of color space, it can be YUV, RGB, Lab, HSV, etc. In terms of data bit width, it can be 8 bits, 10 bits or 12 bits, etc. In terms of value domain, it can be PQ, HLG, gamma or log, etc.
[0254] 1302. Determine a second HDR image based on the N first base layer data and the N first enhancement layer data according to at least one decoding scheme.
[0255] Optionally, in some embodiments, the N first enhancement layer data may be first decoded according to the at least one decoding scheme to obtain N second enhancement layer data. Then, a second HDR image is determined based on the N first base layer data and the N second enhancement layer data. The N first enhancement layer data correspond one-to-one to the N second enhancement layer data, and each second enhancement layer data in the N second enhancement layer data is obtained by decoding the corresponding first enhancement layer data.
[0256] In some embodiments, the at least one decoding scheme may include N decoding schemes. The N decoding schemes correspond one-to-one to the N first enhancement layer data. Each decoding scheme in the N decoding schemes is used to decode the corresponding first enhancement layer data to obtain the second enhancement layer data. For example, the i-th decoding scheme in the N decoding schemes may be used to decode the i-th first enhancement layer data in the N first enhancement layer data to obtain the i-th second enhancement layer data in the N second enhancement layer data.
[0257] For example, in some embodiments, the first enhancement layer data may be encoded using PQ / HLG / gamma / log compression. Then the second electronic device may use the corresponding decoding function to decode the first enhancement layer data to obtain the second enhancement layer data. As described above, in some embodiments, the coding scheme and the parameters in the coding scheme (such as the base of the log function) may be pre-agreed or preset by the encoding side and the decoding side. In this case, the second electronic device may directly decode the first enhancement layer data to obtain the second enhancement layer data. In other embodiments, the coding scheme and / or the parameters in the coding scheme are not predetermined or preset. The first metadata may carry the coding scheme and / or the parameters in the coding scheme. The second electronic device may determine the coding scheme and / or the parameters in the coding scheme from the metadata, and then decode the first enhancement layer data based on the determined coding scheme and / or the parameters in the coding scheme to obtain the second enhancement layer data.
[0258] For another example, in some embodiments, the first enhancement layer data may be compressed and encoded using an arbitrary function curve. The first metadata may carry the inverse function of the corresponding function. The second electronic device may use the inverse function carried by the first metadata to decode the first enhancement layer data to obtain the corresponding second enhancement layer data. Of course, in other embodiments, the function curve used for compression encoding may also be agreed upon or preset in advance by both parties (i.e., the encoding side and the decoding side). In this case, the second electronic device may directly use the inverse function to decode the first enhancement layer data to obtain the second enhancement layer data.
[0259] For example, in some embodiments, the first enhancement layer data may be encoded and compressed using a parameter-configurable format such as a logarithm or exponential function. In this case, in addition to specifying the specific format, the first metadata also includes function parameter information that can be flexibly configured according to different scenarios, such as the base of the logarithm function and the power of the exponential function. In this case, the second electronic device may determine the format and function parameter information based on the first metadata, and then decode the first enhancement layer data based on the determined format and parameter information to obtain the second enhancement layer data. Of course, in other embodiments, the function format and / or function parameters may be pre-agreed or preset. If both the function format and function parameters are pre-agreed or preset, the second electronic device may directly decode the first enhancement layer data to obtain the second enhancement layer data. If one of the function format or function parameters is pre-agreed or preset, the other is carried by the first metadata. For example, in some embodiments, the function format is pre-agreed or preset. In this case, the second electronic device can obtain function parameters from the first metadata, and then decode the first enhancement layer data based on the implementation agreement or preset function format and the function parameters obtained from the first metadata to obtain the second enhancement layer data.
[0260] In some embodiments, if N is a positive integer greater than or equal to 2, any two decoding schemes among the N decoding schemes may be different decoding schemes. Different decoding schemes may include different schemes and / or different parameters. For example, it is assumed that decoding scheme A and decoding scheme B are two decoding schemes among the N decoding schemes. Decoding scheme A is used to decode enhancement layer data encoded using a logarithmic function; decoding scheme B is used to decode enhancement layer data compressed and encoded using a function curve. For another example, decoding scheme A and decoding scheme B are both used to decode enhancement layer data encoded using a logarithmic function, but the base of the encoded logarithmic function corresponding to decoding scheme A is 2, and the base of the encoded logarithmic function corresponding to decoding scheme B is 3.
[0261] In other embodiments, if N is a positive integer greater than or equal to 2, any two decoding schemes among the N decoding schemes may be the same decoding scheme. For example, decoding scheme A and decoding scheme B are any two decoding schemes among the N decoding schemes. Both decoding schemes are used to decode enhancement layer data encoded using a logarithmic function with a base of 2.
[0262] In some embodiments, when encoding, the first electronic device divides the data to be encoded into multiple regions, and then encodes the multiple regions using multiple encoding schemes. Correspondingly, the second electronic device can use multiple decoding schemes to decode the multiple regions of the first enhancement layer data to obtain the second enhancement layer data. The second enhancement layer data also includes multiple regions. For ease of description, the region of the first enhancement layer can be referred to as the third region, and the region of the second enhancement layer data can be the fourth region. In other words, the first enhancement layer data can include multiple third regions, and the second enhancement layer data can include multiple fourth regions. The multiple third regions correspond one-to-one to the multiple fourth regions, and the multiple third regions also correspond one-to-one to the multiple decoding schemes. Each fourth region in the multiple fourth regions is obtained after the corresponding third region is decoded using the corresponding decoding scheme.
[0263] For example, assuming that the i-th first enhancement layer data among N first enhancement layer data includes N i The third area, N i is a positive integer greater than or equal to 2. Then we can use N i The decoding scheme includes N i The third region is decoded to obtain the i-th second enhanced data among the N second enhanced data. The i-th second enhanced data includes N i The fourth area. i The fourth area is to use the N i In other words, the N i The j-th fourth area in the fourth area is the i The jth encoding scheme among the N decoding schemes i Obtained after decoding the third region. N i is a positive integer greater than or equal to 2.
[0264] For example, assuming N=3, the first first enhancement layer data can be divided into N1 third regions. The N1 third regions are decoded using N1 decoding schemes to obtain N1 fourth regions. The first second enhancement layer data includes the N1 fourth regions. Similarly, the second first enhancement layer data can be divided into N2 third regions. The N2 third regions are decoded using N2 decoding schemes to obtain N2 fourth regions. The second second enhancement layer data includes the N2 fourth regions. The third first enhancement layer data can be divided into N3 third regions. The N3 third regions are decoded using N3 decoding schemes to obtain N3 fourth regions. The third second enhancement layer data includes the N3 fourth regions.
[0265] In some embodiments, the number of regions divided into any two first enhancement layer data can be the same. Also taking N=3 as an example, in this case, N1=N2=N3.
[0266] In some embodiments, the number of regions divided into any two first enhancement layer data can be the same or different. Taking N=3 as an example, in this case, the relationship among N1, N2, and N3 can be any of the following: N1=N2≠N3, N1≠N2=N3, or N1≠N2≠N3.
[0267] Similarly, in some embodiments, the N i Any two decoding schemes in the N decoding schemes can be different decoding schemes. For example, assuming that decoding scheme 1 and decoding scheme 2 are the N i Two decoding schemes are provided in the decoding schemes. Decoding scheme 1 is for decoding the first enhancement layer data encoded using a function curve, and decoding scheme 2 is for decoding the first enhancement layer data encoded using a logarithmic function.
[0268] In other embodiments, the N i Any two decoding schemes in the N decoding schemes can be the same decoding scheme but with different parameters. For example, assuming that decoding scheme 1 and decoding scheme 2 are the N i Two decoding schemes are provided. Decoding scheme 1 and decoding scheme 2 both decode the first enhancement layer data encoded using a logarithmic function, but the base of the logarithmic function corresponding to decoding scheme 1 is 2, and the base of the logarithmic function corresponding to decoding scheme 2 is 3.
[0269] In other embodiments, the N i Any two decoding schemes in the N decoding schemes can be the same decoding scheme and have the same parameters. For example, assuming that decoding scheme 1 and decoding scheme 2 are the same decoding schemes in the N decoding schemes, iTwo decoding schemes in the decoding schemes. Decoding scheme 1 and decoding scheme 2 are both decoding the first enhancement layer data encoded using a logarithmic function, and the base of the logarithmic function corresponding to encoding scheme 1 and encoding scheme 2 is 2. In this case, it can also be considered that the N i An encoding scheme is an encoding scheme.
[0270] In this case, the first indication information may be used to indicate N groups of decoding schemes, wherein the i-th group of decoding schemes in the N groups of decoding schemes includes N i decoding scheme, the N i The decoding scheme and the N i There is a one-to-one correspondence between the N i The decoding schemes are respectively used to decode the N i Decode the area.
[0271] Optionally, in some embodiments, the second HDR image may be determined directly according to the N second enhancement layer data and the N first base layer data.
[0272] Assuming N is 1, HDRβ[j] represents the value of the j-th pixel in the second HDR image, baseβ[j] represents the value of the j-th pixel in the first base layer data, and Enhanceβ[j] represents the value of the j-th pixel in the second enhancement layer data. Then, in some embodiments, HDRβ[j], baseβ[j], and Enhanceβ[j] satisfy the following relationship:
[0273] HDRβ[j]=baseβ[j]×f(Enhanceβ[j]), (Formula 6.1).
[0274] In some other embodiments, HDRβ[j], baseβ[j] and Enhanceβ[j] satisfy the following relationship:
[0275] HDRβ[j]=baseβ[j]+f(Enhanceβ[j]), (Formula 6.2).
[0276] f() in Formula 6.1 and Formula 6.2 can be a default conversion function or a conversion function specified by metadata, and the embodiments of the present application do not limit this. In addition, the embodiments of the present application do not limit the analytical expression of the conversion function. For example, in some embodiments, f(Enhanceβ[j])=Enhanceβ[j]. For another example, in other embodiments, f(Enhanceβ[j])=C×Enhanceβ[j], where the parameter C can be a preset value or a value determined according to Enhanceβ[j]. For another example, in other embodiments, f(Enhanceβ[j])=Enhanceβ[j]+D, and the parameter D can be a preset value or a value determined according to Enhanceβ[j].
[0277] If N is a positive integer greater than or equal to 2, then HDRβ[j] can be used to represent the value of the j-th pixel in the second HDR image, and baseβ i [j] represents the value of the jth pixel in the i-th first basic layer data among the N first basic layer data, using Enhanceβ i [j] represents the value of the jth pixel in the i-th second enhancement layer data in the N second enhancement layer data, where i is a positive integer greater than or equal to 1 and less than or equal to N, that is, i=1, ..., N. Then in some embodiments, HDRβ[j], baseβ i [j] and Enhanceβ i [j] satisfies the following relationship:
[0278] HDRβ[j]=A1×baseβ1[j]×f1(Enhanceβ1[j])+A2×baseβ2[j]×f2(Enhanceβ2[j])+…+A N ×baseβ N [j]×f N (Enhanceβ N [j]), (Formula 6.3).
[0279] In other embodiments, HDRβ[j], baseβ i [j] and Enhanceβ i [j] satisfies the following relationship:
[0280] HDRβ[j]=A1×baseβ1[j]+B1×f1(Enhanceβ1[j])+A2×baseβ2[j]+B2×f2(Enhanceβ2[j])+…+A N ×baseβ N [j]+B N×f N (Enhanceβ N [j]), (Formula 6.4).
[0281] f1(), f2(), ..., f in Formula 6.3 and Formula 6.4 N () represents a conversion function. In some embodiments, the conversion function may be a default or pre-negotiated function. In other embodiments, the conversion function may be indicated by the first metadata.
[0282] A1, A2, ..., A in Formula 6.3 and Formula 6.4 N The representation may be a constant or a numerical value indicated in the first metadata.
[0283] B1, B2, ..., B in Formula 6.4 N The representation may be a constant or a numerical value indicated in the first metadata.
[0284] Optionally, in some embodiments, determining the second HDR image based on the N second enhancement layer data and the N first base layer data may include: processing the N second enhancement layer data to obtain N third enhancement layer data; and determining the second HDR image based on the N third enhancement layer data and the N first base layer data. The manner of determining the second HDR image based on the N third enhancement layer data and the N first base layer data is the same as the manner of directly determining the second HDR image based on the N second enhancement layer data and the N first base layer data, and for the sake of brevity, is not further described here.
[0285] Similarly, in some embodiments, before determining the second HDR image based on the N second enhancement layer data and the N first base layer data, the N first base layer data may be processed to obtain N second base layer data, and then the second HDR image may be determined based on the N third enhancement layer data (or N second enhancement layer data) and the N second base layer data. The method for determining the second HDR image based on the N third enhancement layer data (or N second enhancement layer data) and the N second base layer data is the same as the method for directly determining the second HDR image based on the N second enhancement layer data and the N first base layer data. For the sake of brevity, this will not be described in detail here. The process for determining the second base layer data may refer to the process for determining the third enhancement layer data. The following mainly describes how to determine the N third enhancement layer data based on the N second enhancement layer data.
[0286] The N pieces of second enhancement layer data correspond one-to-one to the N pieces of third enhancement layer data, and each piece of the N pieces of third enhancement layer data is determined based on the corresponding piece of second enhancement layer data. In other words, the i-th piece of third enhancement layer data in the N pieces of third enhancement layer data is determined based on the i-th piece of second enhancement layer data in the N pieces of second enhancement layer data, where i=1, ..., N.
[0287] The following uses a second enhancement layer as an example to describe how to determine the third enhancement layer data. Each third enhancement layer data can be determined by referring to the following method.
[0288] In some embodiments, the first metadata may include a first value and a second value. THH represents the first value, THL represents the second value, Enhanceβ[j] represents the value of the j-th pixel in the second enhancement layer data, and EnhanceAfterβ[j] represents the value of the j-th pixel in the third enhancement layer data. In this case, THH, THL, Enhanceβ[j], and EnhanceAfterβ[j] satisfy the following relationship:
[0289] EnhanceAfterβ[j]=Enhanceβ[j]×THH+(A-Enhanceβ[j])×THL, (Formula 7.1)
[0290] Wherein, A is the maximum value of the normalized interval corresponding to the second enhanced data. For example, if the normalized interval is [0, 1], then A is 1.
[0291] During the encoding process, the intermediate enhancement data can be remapped based on the maximum value and / or minimum value and the corresponding preset value, and the intermediate enhancement data can be mapped to another numerical range interval (such as the above-mentioned normalized interval). For ease of description, the numerical range interval of the intermediate enhancement data can be referred to as the first interval, and the numerical range interval remapped based on the preset value can be referred to as the second interval. The numerical range of the second enhancement layer data is within the second interval. Through the above technical solution, the second enhancement data can be remapped to the first interval. The above-mentioned first value and second value are the maximum value and minimum value of the intermediate enhancement data within the first interval.
[0292] In some other embodiments, a mapping function TMB() can be determined based on the first metadata. The third enhancement data can be determined based on the mapping function. Enhanceβ[j] is used to represent the second enhancement layer data, and EnhanceAfterβ[j] is used to represent the third enhancement layer data. In this case, Enhanceβ[j] and EnhanceAfterβ[j] satisfy the following relationship:
[0293] EnhanceAfterβ[j]=TMB(Enhanceβ[j]), (Formula 8.1).
[0294] In some other embodiments, Enhanceβ[j] and EnhanceAfterβ[j] satisfy the following relationship:
[0295] EnhanceAfterβ[j]=TMB()×Enhanceβ[j], (Formula 8.2).
[0296] During the encoding process, a mapping relationship can be determined based on the histogram of the intermediate enhanced data, and then the intermediate enhanced data can be mapped to another numerical range interval based on the mapping relationship. The first interval is still used to represent the numerical range interval of the intermediate enhanced data, and the second interval is used to represent the numerical range interval after mapping. The numerical range of the second enhanced layer data is within the second interval. Through the above technical solution, the second enhanced data can be remapped to the first interval. TMB() is the inverse function of the mapping relationship. In some embodiments, TMB() can be directly carried in the first metadata. In other embodiments, the first metadata can carry the mapping relationship. The second electronic device can infer TMB() based on the mapping relationship.
[0297] In some other embodiments, the second enhancement layer data may be processed through some signal processing process to obtain the third enhancement layer data. In this case, Enhanceβ[j] and EnhanceAfterβ[j] satisfy the following relationship:
[0298] EnhanceAfterβ[j]=F(Enhanceβ[j]), (Formula 9.1)
[0299] Wherein F() represents a signal processing process. The signal processing may be filtering (such as bilateral filtering, interpolation filtering, nearest neighbor filtering, etc.), denoising or other image processing methods, which are not limited in this application.
[0300] In other embodiments, the second enhancement layer data may be first remapped back to the first interval using Formula 7.1, Formula 7.2, or Formula 8.2 to obtain third enhancement layer data, and then the third enhancement layer data may be processed using Formula 9.1 to obtain fourth enhancement layer data. In this case, the second HDR image is determined based on the N fourth enhancement layer data and the N first base layer data. The method for determining the second HDR image based on the N fourth enhancement layer data and the N first base layer data is the same as the method for directly determining the second HDR image based on the N second enhancement layer data and the N first base layer data, and for the sake of brevity, it will not be repeated here.
[0301] In some embodiments, after acquiring the second HDR image, the second HDR image may be further transformed to obtain a third HDR image. For example, the second HDR image may be subjected to color space conversion, color gamut conversion, color compensation, etc. to obtain the third HDR image.
[0302] FIG14 is a schematic structural block diagram of an electronic device according to an embodiment of the present application. As shown in FIG14 , the electronic device 1400 includes an acquisition unit 1401 , a processing unit 1402 , and an encoding unit 1403 .
[0303] The acquiring unit 1401 is configured to acquire a first HDR image and N first base layer data corresponding to the first HDR image.
[0304] Processing unit 1402: A user determines N first enhancement layer data according to the first HDR image, the first base layer data, and at least one coding scheme, where N is a positive integer greater than or equal to 1.
[0305] The encoding unit 1403 is configured to encode the N first enhancement layer data, the N first base layer data, and first metadata to obtain a codestream, where the first metadata includes first indication information, where the first indication information is used to indicate the at least one encoding scheme or a decoding scheme corresponding to the at least one encoding scheme.
[0306] The specific functions and beneficial effects of the acquisition unit 1401, the processing unit 1402 and the encoding unit 1403 can be referred to the above embodiments, and for the sake of brevity, they are not repeated here.
[0307] In some embodiments, the acquiring unit 1401 , the processing unit 1402 , and the encoding unit 1403 may be implemented by a processor.
[0308] FIG15 is a schematic block diagram of another electronic device according to an embodiment of the present application. As shown in FIG15 , the electronic device 1500 includes a decoding unit 1501 and a processing unit 1502 .
[0309] The decoding unit 1501 is configured to decode the acquired code stream to obtain N first enhancement layer data, N first base layer data, and first metadata, wherein the first metadata includes first indication information, the first indication information is used to determine at least one decoding scheme, and N is a positive integer greater than or equal to 1.
[0310] The processing unit 1502 is configured to determine a second HDR image according to the at least one decoding scheme, the N first base layer data, and the N first enhancement layer data.
[0311] The specific functions and beneficial effects of the decoding unit 1501 and the processing unit 1502 can be found in the above embodiments, and for the sake of brevity, they will not be repeated here.
[0312] In some embodiments, the decoding unit 1501 and the processing unit 1502 may be implemented by a processor.
[0313] An embodiment of the present application also provides an electronic device. The electronic device can be used to implement the above-mentioned encoding method embodiment. The electronic device includes a processor and a memory. The processor is used to execute the computer program or instructions stored in the memory, or read the data / signaling stored in the memory to execute the method in the above method embodiments. The memory can be coupled to the processor, or can also be set separately. The memory can also be used to store the code stream determined by the processor. Optionally, there are one or more processors. Optionally, there are one or more memories. Optionally, the electronic device may also include a transceiver (or communication interface), which is used to receive and / or send signals. For example, the transceiver can be used to send the code stream determined by the processor to another electronic device.
[0314] An embodiment of the present application also provides an electronic device. The electronic device can be used to implement the above-mentioned decoding method embodiment. The electronic device includes a processor and a memory. The processor is used to execute the computer program or instructions stored in the memory, or read the data / signaling stored in the memory to execute the methods in the above method embodiments. The memory can be coupled to the processor, or can also be set separately. Optionally, there are one or more processors. Optionally, there are one or more memories. Optionally, the electronic device may also include a transceiver (or communication interface), which is used to receive and / or send signals. For example, the transceiver can be used to receive a code stream.
[0315] It should be understood that the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0316] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory and / or a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM). For example, RAM can be used as an external cache. By way of example and not limitation, RAM includes the following forms: static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0317] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) can be integrated into the processor.
[0318] It should also be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0319] Optionally, the above-mentioned electronic device may be a chip.
[0320] The embodiment of the present application further provides a chip system. The chip system (or also referred to as a processing system) includes a logic circuit and an input / output interface.
[0321] The logic circuit may be a processing circuit in a chip system. The logic circuit may be coupled to a storage unit and call instructions in the storage unit so that the chip system can implement the methods and functions of each embodiment of the present application. The input / output interface may be an input / output circuit in a chip system that outputs information processed by the chip system or inputs data or signaling information to be processed into the chip system for processing.
[0322] As a solution, the chip system is used to implement the embodiments of the above encoding methods. For example, the chip system is used to implement the processing-related operations performed by the source device, capture device or front-end device in the above method embodiments.
[0323] As a solution, the chip system is used to implement the embodiments of the above decoding methods. For example, the chip system is used to implement the processing-related operations performed by the target device, terminal device or terminal display device in the above method embodiments.
[0324] An embodiment of the present application also provides a computer-readable storage medium on which computer instructions are stored for implementing the methods executed by an encoding end device (such as a source device, a capture device, or a front-end device) in the above-mentioned method embodiments.
[0325] An embodiment of the present application also provides a computer-readable storage medium on which computer instructions are stored for implementing the methods executed by a decoding end device (such as a target device, a terminal device, or a terminal display device) in the above-mentioned method embodiments.
[0326] An embodiment of the present application also provides a computer program product, comprising instructions, which, when executed by a computer, implement the methods performed by the encoding end device in the above-mentioned method embodiments.
[0327] An embodiment of the present application further provides a computer program product comprising instructions, which, when executed by a computer, implement the methods performed by a decoding end device in the above-mentioned method embodiments.
[0328] An embodiment of the present application also provides a communication system, including the aforementioned encoding end device and decoding end device.
[0329] The embodiment of the present application also provides a code stream, which is determined by the above encoding method.
[0330] An embodiment of the present application further provides a device for storing a code stream, which is used to store the code stream determined by the above encoding method.
[0331] The present application also provides a computer device, which includes a memory for storing a code stream determined by the above encoding method.
[0332] The explanation of the relevant contents and beneficial effects of any of the above-mentioned devices can be referred to the corresponding method embodiments provided above, which will not be repeated here.
[0333] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0334] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. For example, the computer can be a personal computer, a server, or a network device, etc. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)). For example, the aforementioned available medium includes, but is not limited to, various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0335] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A coding method, characterized in that: The method comprises: Acquire a first HDR image and N first basic layer data corresponding to the first HDR image; Determine N first enhancement layer data according to the first HDR image, the N first base layer data and at least one encoding scheme, where N is a positive integer greater than or equal to 1; The N first enhancement layer data, the N first base layer data, and first metadata are encoded to obtain a code stream, where the first metadata includes first indication information, and the first indication information is used to indicate the at least one encoding scheme or a decoding scheme corresponding to the at least one encoding scheme.
2. The method according to claim 1, characterized in that The determining, according to the first HDR image, the N first base layer data and at least one coding scheme, N first enhancement layer data comprises: Determine N intermediate enhancement data according to the first HDR image and the N first basic layer data; The N intermediate enhancement data are encoded according to the at least one encoding scheme to obtain the N first enhancement layer data.
3. The method according to claim 2, characterized in that The step of encoding the N intermediate enhancement data according to the at least one encoding scheme to obtain the N first enhancement layer data includes: Use N respectively i The i-th intermediate enhancement data in the N intermediate enhancement data is encoded by a coding scheme to obtain the i-th first enhancement layer data in the N first enhancement layer data, wherein the i-th first enhancement layer data includes N i Regions, The use of N i The encoding scheme for encoding the i-th intermediate enhancement data comprises: Use the N i The N encoding schemes for the i-th intermediate enhanced data i Regions are encoded, N i is a positive integer greater than or equal to 2, i=1,…,N.
4. The method according to claim 3, characterized in that The at least one coding scheme includes M groups of coding schemes, and a group of coding schemes corresponding to the i-th intermediate enhanced data in the M groups of coding schemes includes N i A coding scheme, M is a positive integer greater than or equal to 1.
5. The method according to claim 2, characterized in that: The at least one coding scheme comprises M coding schemes, The step of encoding the N intermediate enhancement data according to the at least one encoding scheme to obtain the N first enhancement layer data includes: The i-th intermediate enhancement data is encoded using a coding scheme corresponding to the i-th intermediate enhancement data among the N intermediate enhancement data among M coding schemes to obtain the i-th first enhancement layer data among the N first enhancement layer data, where M is a positive integer greater than or equal to 1, i=1,…,N.
6. The method according to any one of claims 2 to 5, characterized in that The determining N intermediate enhancement data according to the first HDR image and the N first basic layer data includes: Determine N reference intermediate enhanced data according to the first HDR image and the N first base layer data, wherein the reference intermediate enhanced data is multi-channel data; According to the i-th reference intermediate enhancement data among the N reference intermediate enhancement data, the i-th intermediate enhancement data among the N intermediate enhancement data is determined, the intermediate enhancement data is single-channel data, i=1, . . . , N.
7. The method according to claim 6, characterized in that The determining, according to the i-th reference intermediate enhancement data among the N reference intermediate enhancement data, the i-th intermediate enhancement data among the N reference intermediate enhancement data comprises: It is determined that the i-th intermediate enhanced data includes data of one channel of the i-th reference intermediate enhanced data.
8. The method according to claim 6, characterized in that The determining, according to the i-th reference intermediate enhancement data among the N reference intermediate enhancement data, the i-th intermediate enhancement data among the N reference intermediate enhancement data comprises: Transforming the multi-channel data of the i-th reference intermediate enhanced data respectively to obtain a plurality of transformation results, wherein the plurality of transformation results correspond to the multi-channel data one by one, and each of the plurality of transformation results is obtained after the corresponding channel is transformed; It is determined that the i-th intermediate enhanced data is a transformation result among the plurality of transformation results.
9. The method according to claim 6, characterized in that The determining, according to the i-th reference intermediate enhancement data among the N reference intermediate enhancement data, the i-th intermediate enhancement data among the N reference intermediate enhancement data comprises: The i-th intermediate enhanced data is determined according to the relationship function and the multi-channel data of the i-th reference intermediate enhanced data.
10. The method according to claim 9, characterized in that The i-th intermediate enhancement data includes values of multiple pixels, each of the multiple pixels corresponds to multiple groups of pixels, the multiple groups of pixels respectively belong to multi-channel data of the i-th reference intermediate enhancement data, each group of pixels in the multiple groups of pixels includes at least one pixel, and the pixel value of each pixel in the multiple pixels is determined according to the pixel values of the corresponding multiple groups of pixels and the relationship function.
11. The method according to any one of claims 1 to 10, characterized in that The at least one encoding scheme includes one or more of the following encoding schemes: PQ coding, HLG coding, gamma coding, log coding, or any curve coding.
12. The method according to any one of claims 1 to 11, characterized in that The first indication information is used to indicate: at least one encoding function; the at least one encoding function and parameters of each of the at least one encoding function; the at least one decoding function; or The at least one decoding function and parameters of each of the at least one decoding function.
13. A decoding method, characterized in that: The method comprises: Decoding the acquired bitstream to obtain N first enhancement layer data, N first base layer data, and first metadata, wherein the first metadata includes first indication information, and the first indication information is used to determine at least one decoding scheme, where N is a positive integer greater than or equal to 1; According to the at least one decoding scheme, the N first base layer data and the N first enhancement layer data, a second HDR image is determined.
14. The method according to claim 13, characterized in that The determining, according to the at least one decoding scheme, the N first base layer data and the N first enhancement layers, a second HDR image comprises: Decoding the N first enhancement layer data according to the at least one decoding scheme to obtain N second enhancement layer data; The second HDR image is determined according to the N first basic layer data and the N second enhanced layer data.
15. The method according to claim 14, characterized in that The decoding of the N first enhancement layer data according to the at least one decoding scheme to obtain N second enhancement layer data includes: Use N respectively i The i-th first enhancement data in the N first enhancement data is decoded by a decoding scheme to obtain the i-th second enhancement layer data in the N second enhancement layer data, wherein the i-th first enhancement layer data includes N i Regions, The use of N i The decoding scheme for decoding the i-th first enhanced data includes: Use the N i The decoding scheme for the Nth first enhanced data i regions to decode, N i is a positive integer greater than or equal to 2, i=1,…,N.
16. The method according to claim 15, characterized in that The at least one decoding scheme includes M sets of decoding schemes, and a set of decoding schemes corresponding to the i-th first enhancement layer data in the M sets of decoding schemes includes N i decoding schemes, and M is a positive integer greater than or equal to 1.
17. The method according to claim 14, characterized in that The at least one decoding scheme comprises M decoding schemes, According to the at least one decoding scheme, decoding the N first enhancement layer data to obtain N second enhancement layer data includes: Use M decoding schemes and the decoding scheme corresponding to the i-th first enhancement layer data among the N first enhancement layer data to decode the i-th first enhancement layer data to obtain the i-th second enhancement layer data among the N second enhancement layer data, where M is a positive integer greater than or equal to 1, i=1,…,N.
18. The method according to any one of claims 13 to 17, characterized in that The at least one decoding scheme includes a decoding scheme corresponding to one or more encoding schemes of the following encoding schemes: PQ coding, HLG coding, gamma coding, log coding, or any curve coding.
19. The method according to any one of claims 13 to 18, characterized in that The first indication information is used to indicate: at least one encoding function; the at least one encoding function and parameters of each of the at least one encoding function; the at least one decoding function; or The at least one decoding function and parameters of each of the at least one decoding function.
20. An electronic device, characterized in that: The electronic device comprises a unit for implementing the method according to any one of claims 1 to 12, or comprises a unit for implementing the method according to any one of claims 13 to 19.
21. A computer device, characterized in that: include: A processor, the processor being used to be coupled to a memory, read and execute instructions and / or program codes in the memory to execute the method as claimed in any one of claims 1 to 12, or to execute the method as claimed in any one of claims 13 to 19.
22. A chip system, characterized in that: include: A logic circuit, the logic circuit is used to couple with an input / output interface and transmit data through the input / output interface to execute the method as claimed in any one of claims 1 to 12, or to execute the method as claimed in any one of claims 13 to 19.
23. A computer readable medium, characterized in that The computer-readable medium stores a program code, and when the computer program code is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 12, or the computer is caused to execute the method according to any one of claims 13 to 19.
24. A code stream, characterized in that The code stream is determined according to the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Coding method, decoding method and related equipment
CN119496907A
Enhancement layer masking for high-dynamic range video coding
CN109314787A
Systems and methods for signaling and constraining a high dynamic range (HDR) video system with dynamic metadata
CN109983772A
Method and device of encoding / decoding a HDR and a SDR picture in / from a scalable bitstream
EP3099073A1
Multi-Layer Backwards-Compatible Video Delivery for Enhanced Dynamic Range and Enhanced Resolution Formats
US20130314495A1