WO2023040753A1 - 一种视频编码、解码方法及装置 - Google Patents
一种视频编码、解码方法及装置 Download PDFInfo
- Publication number
- WO2023040753A1 WO2023040753A1 PCT/CN2022/117938 CN2022117938W WO2023040753A1 WO 2023040753 A1 WO2023040753 A1 WO 2023040753A1 CN 2022117938 W CN2022117938 W CN 2022117938W WO 2023040753 A1 WO2023040753 A1 WO 2023040753A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- value
- data
- residual value
- residual
- hdr
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 89
- 238000012545 processing Methods 0.000 claims abstract description 55
- 238000013507 mapping Methods 0.000 claims description 56
- 238000009826 distribution Methods 0.000 claims description 29
- 238000003860 storage Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 description 14
- 238000004364 calculation method Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 13
- 230000005540 biological transmission Effects 0.000 description 12
- 230000000694 effects Effects 0.000 description 9
- 238000004422 calculation algorithm Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 101000969688 Homo sapiens Macrophage-expressed gene 1 protein Proteins 0.000 description 3
- 102100021285 Macrophage-expressed gene 1 protein Human genes 0.000 description 3
- 238000010606 normalization Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/30—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/44—Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/98—Adaptive-dynamic-range coding [ADRC]
Definitions
- the embodiments of the present application relate to the technical field of image processing, and in particular, to a video encoding and decoding method and device.
- the dynamic range can represent the ratio between the maximum gray value and the minimum gray value within the displayable range of the image.
- a dynamic range in the range of 10 -3 to 10 6 is a high dynamic range (high dynamic range, HDR), and a dynamic range of an ordinary picture is a standard dynamic range (standard dynamic range, SDR).
- HDR high dynamic range
- SDR standard dynamic range
- the imaging process of digital cameras is actually the mapping from high dynamic range to photo standard dynamic range.
- Dynamic range mapping is mainly applied to the front-end HDR signal and the back-end HDR terminal display device.
- the front-end is to collect 4000 nit (nit) light signal, while the HDR display capability of the back-end HDR terminal display device (TV) is only 500nit
- mapping a 4000nit signal to a 500nit device is a dynamic range mapping from high to low.
- the front end collects 100nit SDR signals, while the display end uses 2000nit TV signals, displaying 100nit signals on 2000nit equipment, one is the dynamic range mapping from low to high.
- the present application provides a video encoding and decoding method and device, so as to improve the efficiency of video encoding while ensuring the HDR display effect.
- the present application provides a video coding method, which can be executed by a video coding device.
- the video coding device can be a camera, a mobile phone, a tablet computer, a notebook computer, a TV, etc., which carry a camera or a processor.
- the application is not specifically limited here.
- the video encoding device can obtain source data, the source data includes the first high dynamic range HDR data and the first standard dynamic range SDR code stream for the same video data; according to the corresponding relationship between the reconstructed data of the first SDR code stream and the first HDR data , mapping the reconstructed data of the first SDR code stream into the second HDR data; determining the target residual value between the second HDR data and the first HDR data; the bit width of the target residual value is less than or equal to the first bit width; the second One bit width is the data bit width used to encode the first SDR video into the first SDR code stream; encode the corresponding relationship and the target residual value to determine the preset data; transmit the first SDR code stream added with the preset data.
- the first HDR data in the source data may be received by the video encoding device from a device communicatively connected to it, or may be obtained by the video encoding device after performing data processing on the same video data, and this application will not elaborate here. limited.
- the video data is relatively large, which will occupy a large amount of bandwidth resources.
- the transmission of the video code stream will not occupy a large amount of bandwidth resources, and can also ensure the transmission efficiency of the data. Therefore, the video encoding device will not directly To transmit video data, it is necessary to encode the video data to obtain a video code stream for transmission.
- the video encoding device usually acquires HDR data and SDR data, and encodes the SDR data to obtain an SDR code stream (that is, the first SDR code stream).
- SDR code stream that is, the first SDR code stream.
- converting video data into a video code stream needs to meet the data bit width requirements of the device or video data.
- the data bit width used for SDR data encoded to SDR code stream is 8 bits
- the data bit width used for HDR data encoded to HDR code stream is 10 bits and 12 bits.
- this application does not limit the encoding algorithm adopted by the SDR data, and may be any encoding and decoding algorithm such as MPEG1, MPEG2, MPEG4, H.263, H.264, H.265, JPEG, etc.
- the above-mentioned reconstructed data is the SDR data obtained by decoding the first SDR code stream.
- the reconstructed data is compared with the first HDR data to determine the corresponding relationship between the reconstructed data and the first HDR data.
- the corresponding relationship can be determined by comparing the gray value, RGB value or YUV value of the video image, which is not specifically limited in this application.
- the data bit widths corresponding to the HDR data and the SDR data are usually different.
- the data bit width corresponding to the HDR data is 10 bits
- the data bit width corresponding to the SDR data is 8 bits.
- the video encoding device can convert the target residual value of the first HDR data and the second HDR data into a data bit width that satisfies the transmission requirements of the first SDR code stream according to the subtraction operation, normalization operation, etc., based on the above SDR data corresponding to If the data bit width is 8 bits, then the data bit width of the target residual value is also 8 bits or less than 8 bits.
- This application achieves good support for SDR video decoding devices and HDR video decoding devices by using preset data and SDR code streams.
- the code stream is an SDR code stream, which will be explicitly identified as an SDR code stream, so as to ensure the effect of SDR.
- the preset data and SDR code stream will be correctly identified and decoded, thus ensuring the effect of HDR. It should be noted that currently high-bit-width encoding is not supported by all encoding and decoding standards.
- JPEG only supports 8 bits, and the target residual and SDR are both 8 bits, which can ensure that the video encoding device and video decoding device can use the same level of codec , usually the complexity of frame-level switching hardware encoder or hardware decoder is relatively high, and the processing capability of the device is high.
- the target residual value By adjusting the target residual value to be less than or equal to the bit width of the SDR code stream encoding, it is possible to avoid encoding and decoding.
- the corresponding relationship can be determined in the following manner: determine the first average value of the reconstructed data and the first HDR data; the first average value is based on the first position of the reconstructed data and the first HDR data The preset parameters of the pixel points are determined; the reconstruction data and the first HDR data are divided into a plurality of image blocks; the number and position of the image blocks are the same; Average value; determine the corresponding relationship according to the first average value or the second average value.
- the correspondence relationship determined in this manner has higher accuracy, and the determined second HDR data is more reliable.
- the preset parameter is a gray value, or an RGB value, or a YUV value. It can also be Y in YUV, or L in Lab, which is not specifically limited in this application.
- the video encoding device may subtract the second HDR data from the first HDR data to determine the initial residual value; determine the residual mapping method and the clamping method according to the distribution of the value range of the initial residual value bit mode; according to the residual mapping mode and the clamping mode, the initial residual value is mapped to a target residual value whose bit width is less than or equal to the first bit width.
- the above initial residual value is obtained by subtracting the gray value, RGB value, or YUV value of the same position of the second HDR data and the first HDR data.
- the value after subtraction may be different.
- the initial residual value can be statistically analyzed to obtain a histogram, and the histogram can be used to display the distribution of the value range of the initial residual value.
- the initial residual value is provided to obtain a curve graph to show the distribution of the value range of the initial residual value, and the present application does not specifically limit the manner of displaying the distribution of the value range of the initial residual value.
- the video encoding device may map the initial residual value to the target residual value according to the residual mapping mode and the clamping mode determined by the distribution of the value range of the initial residual value.
- the video coding device may determine the histogram according to the value of the initial residual value; determine the value of the residual value corresponding to the center position of the histogram; determine the value of the residual value corresponding to the center position of the histogram; The value and the first bit width determine the first value range; according to the distribution of the value range of the initial residual value, determine the target ratio value of the initial residual in the first value range; The initial residual is residual mapped, and the initial residual that is not in the first value range is clamped.
- the video coding device determines the distribution of the value range of the initial residual value, it can determine the first value range according to the value of the first bit width, and the initial residual value within the first value range Can be mapped to a target residual value less than or equal to the first bit width.
- the video encoding device may determine the first residual value and the second residual value according to the target ratio value and the value of the residual value corresponding to the central position of the histogram; the first residual value is less than The residual value corresponding to the center position of the histogram; the second residual value is greater than the residual value corresponding to the center position of the histogram; the first residual value is at least 1; the second residual value is at least 1; the first residual value The residual value corresponding to the center position of the histogram corresponds to the first scale value; the second residual value corresponds to the residual value corresponding to the center position of the histogram corresponds to the second scale value; the sum of the first scale value and the second scale value is the target Scale value; maps the initial residual value between the first residual value and the second residual value to the target residual value, and the initial residual value not between the first residual value and the second residual value The value is clamped to the preset value.
- the first residual value is smaller than the residual value corresponding to the center position of the histogram; the second residual value is greater than the residual value corresponding to the central position of the histogram; the first residual value is at least one; the second residual value is at least 1; the residual value corresponding to the first residual value and the center position of the histogram corresponds to the first proportional value; the residual value corresponding to the second residual value and the central position of the histogram corresponds to the second proportional value; the first proportional value and The sum of the second proportional values is the target proportional value.
- the present application provides a video decoding method, which can be executed by a video decoding device.
- the video decoding device can be a mobile phone, a tablet computer, a notebook computer, a TV, and other devices with display screens or processors.
- the present application It is not specifically limited here.
- the video decoding device can receive the first SDR code stream; the first SDR code stream includes preset data; the preset data is obtained through the encoding process of the corresponding relationship and the target residual value; according to the corresponding relationship, the first SDR code stream The structural data is mapped to the second HDR data; and the first HDR data is determined according to the target residual value and the second HDR data.
- the preset data further includes: a residual mapping manner and a clamping manner.
- the video decoding device may determine the first residual value and the second residual value according to the residual mapping mode, the clamping mode, the target residual value and the first bit width; according to the first residual value The difference, the second residual value and the clamping method determine the initial residual value; the bit width of the initial residual value is greater than or equal to the first bit width; according to the initial residual value and the second HDR data, determine the first HDR data.
- the present application provides a video encoding device, including:
- the processing unit is used to obtain source data, the source data includes the first high dynamic range HDR data and the first standard dynamic range SDR code stream for the same video data; and the reconstructed data and the first HDR data according to the first SDR code stream Correspondence, mapping the reconstructed data of the first SDR code stream to the second HDR data; determining the target residual value of the second HDR data and the first HDR data; the bit width of the target residual value is less than or equal to the first bit width ;
- the first bit width is the data bit width used by encoding the first SDR video into the first SDR code stream; encoding the corresponding relationship and the target residual value to determine the preset data; the input and output unit is used to transmit and add presets The first SDR code stream of the data.
- the present application provides a video decoding device, including:
- the input and output unit is used to receive the first SDR code stream; the first SDR code stream includes preset data; the preset data is obtained through encoding processing of the corresponding relationship and the target residual value; the processing unit is used to encode the corresponding relationship according to the corresponding relationship
- the reconstructed data of the first SDR code stream is mapped to the second HDR data; and the first HDR data is determined according to the target residual value and the second HDR data.
- the embodiment of the present application provides a video encoding device including: a non-volatile memory and a processor coupled to each other, and the processor calls the program code stored in the memory to execute the first aspect or the first The method described in any design of the aspect.
- the embodiment of the present application provides a video decoding device including: a non-volatile memory and a processor coupled to each other, and the processor invokes the program code stored in the memory to execute the second aspect or the second The method described in any design of the aspect. It should be noted that the processor does not perform encoding operations.
- the embodiment of the present application provides an image processing system, including the video encoding device described in the fifth aspect and the video decoding device described in the sixth aspect.
- the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores program code, wherein the program code includes any one of the first aspect or the second aspect Instructions for some or all steps of a method.
- the embodiment of the present application provides a computer program product, which, when the computer program product is run on a computer, causes the computer to execute part or all of the steps of any one of the methods of the first aspect or the second aspect.
- FIG. 1 shows a schematic diagram of an image processing system provided by an embodiment of the present application
- FIG. 2 shows a schematic flowchart of a video encoding and decoding method provided by an embodiment of the present application
- FIG. 3 shows a schematic diagram of reconstructed data and first HDR data provided by an embodiment of the present application
- Fig. 4 shows a schematic diagram of another reconstructed data and first HDR data provided by the embodiment of the present application
- FIG. 5 shows a schematic structural diagram of an image processing device provided by an embodiment of the present application
- FIG. 6 shows a schematic structural diagram of an image processing device provided by an embodiment of the present application.
- FIG. 7 shows a schematic structural diagram of an image processing device provided by an embodiment of the present application.
- references to "one embodiment” or “some embodiments” or the like in the specification of the present application means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
- appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
- the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
- FIG. 1 shows an image processing system to which the embodiment of the present application can be applied, and the system includes: a video encoding device, an HDR video decoding device, and an SDR video decoding device.
- the video encoding device can be used to collect video data, and encode the video data to obtain HDR video code stream and SDR video code stream
- the HDR video decoding device can receive HDR video code stream, and/or, SDR video code stream, And decode the HDR video code stream, and/or, the SDR video code stream into video data
- the SDR video decoding device can receive the SDR video code stream, and decode the SDR video code stream into video data.
- the video encoding device can be a camera, a mobile phone, a tablet computer, a notebook computer, a TV, etc. that carry a camera or a processor;
- the video decoding device can be a mobile phone, a tablet computer, a notebook computer, a TV, etc. that carry a display screen or a processor. .
- the video encoding device can obtain images with different DRs by adjusting the image acquisition method, such as determining the SDR by shooting parameters 1 (4 exposure value (exposure value, EV) ⁇ 12EV) (wherein, the DR of the SDR image is generally within 1nit to 100nit) image 1, determine SDR image 2 by shooting parameter 2 (8EV ⁇ 16EV), and determine HDR image according to image 1 and image 2 (wherein, the DR of HDR image is generally between 0.001nit and 10000nit) image, the The shooting parameters corresponding to the HDR image may be 4EV-16EV.
- the video acquisition device can determine the HDR video and the SDR video for the same video.
- the video encoding device may also determine the HDR video and the SDR video in other ways, such as a method based on artificial intelligence, which is not specifically limited in this application.
- FIG. 1 it is illustrated by taking a video encoding device that can acquire SDR data (video or image) and HDR data as an example.
- EV is the unit that reflects the amount of exposure.
- the aperture coefficient is F1
- the exposure time is 1 second
- the exposure amount is defined as 0.
- the exposure amount is reduced by one stop (exposure The time is halved or the aperture is reduced by one stop), and the EV value is increased by 1.
- the exposure equation 1 is as follows:
- the aperture number of the lens is A
- the shutter time is T seconds
- the brightness of the scene is B
- the film sensitivity is S.
- EV is used to represent the sum of AV+TV or BV+SV.
- EV value is "exposure value", which is an abstract concept and represents a combination of aperture and shutter speed. The speed of aperture and shutter can be freely selected. The shutter time should be shortened for large apertures and extended for small apertures. But as long as the combination of aperture and shutter meets certain conditions to make the EV value constant, the final exposure must be the same. Every 1.0 increase in the EV value is equivalent to doubling the amount of light taken in.
- the HDR data with a bit width of 10 bits (bits) supported by video coding in the H.265 standard is coded and displayed.
- a large number of devices do not support HDR, the software application cannot recognize the HDR data, and the client of the software application cannot display the good effect of the HDR data.
- there are schemes related to layered encoding that is, the same video is divided into multiple videos with different resolutions for separate encoding, but many The hardware device does not support layered encoding, and the amount of data calculation of the layered encoding is large, which will waste a lot of processor resources.
- the present application proposes a video coding and decoding method to improve video coding efficiency and user experience.
- the method is implemented by a video encoding device and a video decoding device, wherein the video encoding device can implement the video encoding method, and the video decoding device can implement the video decoding method.
- the specific implementation is as follows:
- the video encoding device acquires source data, where the source data includes first HDR data and a first SDR code stream for the same video data.
- the first HDR data in the source data may be received by the video encoding device from a device communicatively connected to it, or may be obtained by the video encoding device after data processing on the same video data, which is not discussed here in this application.
- Usually the video data is relatively large, which will occupy a large amount of bandwidth resources.
- the transmission of the video code stream will not occupy a large amount of bandwidth resources, and can also ensure the transmission efficiency of the data. Therefore, the video encoding device will not directly To transmit video data, it is necessary to encode the video data to obtain a video code stream for transmission.
- the video encoding device usually acquires HDR data and SDR data, and encodes the SDR data to obtain an SDR code stream (that is, the first SDR code stream).
- SDR code stream that is, the first SDR code stream.
- converting video data into a video code stream needs to meet the data bit width requirements of the device or video data.
- the data bit width used for SDR data encoded to SDR code stream is 8 bits
- the data bit width used for HDR data encoded to HDR code stream is 10 bits and 12 bits.
- this application does not limit the encoding algorithm adopted by the SDR data, and may be any encoding and decoding algorithm such as MPEG1, MPEG2, MPEG4, H.263, H.264, H.265, JPEG, etc.
- step 202 the video encoding device maps the reconstructed data of the first SDR code stream to the second HDR data according to the corresponding relationship between the reconstructed data of the first SDR code stream and the first HDR data.
- the above-mentioned reconstructed data is the SDR data obtained by decoding the first SDR code stream.
- the reconstructed data is compared with the first HDR data to determine the corresponding relationship between the reconstructed data and the first HDR data.
- the corresponding relationship can be determined by comparing the gray value, RGB value or YUV value of the video image, which is not specifically limited in this application.
- the corresponding relationship can be determined in the following manner:
- the video encoding device can determine the first average value of the reconstructed data and the first HDR data; the first average value is determined according to the preset parameters of the pixels at the first position of the reconstructed data and the first HDR data; the video encoding device can Divide the reconstruction data and the first HDR data into a plurality of image blocks; the number and position of the image blocks are the same; determine the second average value corresponding to each image block of the reconstruction data and the first HDR data; according to the first average value or The second average determines the correspondence.
- the correspondence relationship determined in this manner has higher accuracy, and the determined second HDR data is more reliable.
- the preset parameter may be a gray value, or an RGB value, or Y in YUV, or L in Lab, which is not specifically limited in this application, and only the gray value is used as an example for illustration.
- the video encoding device can statistically calculate the gray value I of a certain position of the reconstructed data corresponding to the statistical histogram His[i] of the gray value of the pixel at the corresponding position in the first HDR data and the average value of the gray value
- the value avg[i] and variance var[i] in practical applications, the reconstructed data and the image elements corresponding to the first HDR data are the same, only the pixels or DR are different, as shown in Figure 3, the reconstructed data and The image elements corresponding to the position A of the first HDR data all include the number 1, and the average value of the gray value corresponding to the position A, ie, the first average value, can be determined during calculation.
- the gray value I appears in 7 positions such as 1, 2, 3, 4, 5, 6, and 7 in the reconstructed data, then find the first HDR data (or a certain image block of the first HDR data) in the position 1, 2, 3, 4, 5, 6, 7 grayscale value 1, grayscale value 2..., grayscale value 7, then the first HDR data (or a certain image block of the first HDR data) corresponds to
- the average value of the grayscale values of the grayscale value 1 is (grayscale value 1+grayscale value 2+...+grayscale value 7)/7.
- the first HDR data is indicated by shading
- the SDR data is indicated without shading.
- the video encoding device may combine the reconstruction data and the first HDR data corresponding to The image is divided into multiple image blocks, respectively the statistical histogram subHis[i] of each image block and the average value subAvg[i] and variance subVar[i] of the gray value.
- the size of the first preset value can be set according to the needs of practical applications, and the present application does not make specific limitations here, such as: considering that the bit width of SDR data is 8 bits, the target residual should be limited to 8 bits, the first preset value for 128.
- the reconstructed data is divided into 4*4 image blocks
- the first HDR data should also be divided into 4*4 image blocks, and the size of the image blocks corresponding to the two data is the same, as shown in Figure 4, the reconstructed data
- the corresponding image is divided into 4 image blocks, and the image corresponding to the first HDR data is also divided into 4 image blocks, and image elements in image block 1 of the reconstructed data and image block 1 of the first HDR data are the same.
- the image blocks can also be unevenly distributed, that is, the image block 1 of the reconstructed data can be different in size from the image blocks of other reconstructed data, as long as the image block 1 of the reconstructed data is consistent with the image of the first HDR data Block 1 has the same size and the same image elements.
- the local grayscale/color mapping relationship can be obtained according to avg[i] or subAvg[i]; then the local grayscale/color mapping relationship can be processed according to preset rules to obtain an approximate global grayscale/color mapping relationship
- the color mapping relationship is also the corresponding relationship.
- the preset rule may be to determine the corresponding relationship through weighted calculation for the local mapping relationship, or other methods, which are not specifically limited in this application.
- the preset rule is to weight the difference value between the local histogram and the global histogram, and weight the local grayscale/color mapping value to obtain the global grayscale/color mapping value.
- the grayscale/color mapping relationship may be indicated by any curve or matrix parameter, which is not specifically limited in this application.
- Step 203 the video encoding device determines the target residual value of the second HDR data and the first HDR data; the bit width of the target residual value is less than or equal to the first bit width; the first bit width is the first SDR video encoded into the first The data bit width used by the SDR code stream.
- the data bit widths corresponding to the HDR data and the SDR data are usually different.
- the data bit width corresponding to the HDR data is 10 bits
- the data bit width corresponding to the SDR data is 8 bits.
- the video encoding device can convert the target residual value of the first HDR data and the second HDR data into a data bit width that satisfies the transmission requirements of the first SDR code stream according to the subtraction operation, normalization operation, etc., based on the above SDR data corresponding to If the data bit width is 8 bits, then the data bit width of the target residual value is also 8 bits or less than 8 bits.
- the video encoding device may subtract the second HDR data from the first HDR data to determine the initial residual value; determine the residual mapping method and Clamping method: according to the residual mapping method and the clamping method, the initial residual value is mapped to a target residual value whose bit width is less than or equal to the first bit width.
- the above initial residual value is obtained by subtracting the gray value, RGB value, or YUV value of the same position of the second HDR data and the first HDR data.
- the value after subtraction may be different.
- the initial residual value can be statistically analyzed to obtain a histogram, and the histogram can be used to display the distribution of the value range of the initial residual value.
- the initial residual value is provided to obtain a curve graph to show the distribution of the value range of the initial residual value, and the present application does not specifically limit the manner of displaying the distribution of the value range of the initial residual value.
- the video encoding device may map the initial residual value to the target residual value according to the residual mapping mode and the clamping mode determined by the distribution of the value range of the initial residual value.
- the video encoding device may determine the histogram according to the value of the initial residual value; determine the value of the residual value corresponding to the center position of the histogram; The value and the first bit width determine the first value range; according to the distribution of the value range of the initial residual value, determine the target ratio value of the initial residual in the first value range; it will be in the first value range Residual mapping is performed on the initial residual of , and the initial residual that is not in the first value range is clamped.
- the video coding device determines the distribution of the value range of the initial residual value, it can determine the first value range according to the value of the first bit width, and the initial residual value within the first value range Can be mapped to a target residual value less than or equal to the first bit width.
- the following process can be referred to:
- C. Determine the first value range. Find a critical value Ylow from the residual value Y at the center to the direction where the residual value is smaller than Y, and find another critical value Yhigh to the direction where the residual value is greater than Y.
- the initial residual value between the two critical values can be mapped is the target residual value, and two critical values can be defined as the first value range.
- the first value range it can be determined by subtracting or adding the shift value of the first bit width to the value Y, for example, the first bit width is 8bit, corresponding to 2 8 (0 ⁇ 255), 1 left After shifting 8 and subtracting 1 bit, 128 is obtained, that is, one critical value of the first value range is Y-128, and the other critical value is Y+128-1 accordingly.
- D. Determine the proportion value of the initial residual error falling within the first value range. For example, if it is determined that the proportion of initial residual values falling within the first value range is 99%, it can be determined whether the initial residual value corresponding to 1% of the histogram is within the first value range, and if so, determine the histogram 100 If the initial residual corresponding to % is within the first value range, then the initial residual of 1% to 100% can be mapped into the target residual value.
- the initial residual value corresponding to A% before the residual value Y is determined to be 99% select the corresponding initial residual value at B% after the residual value A, and A% to B% is equal to 99% That is, for example, A% is 0%, B% is 99%; A% is 0.5%, B is 99.5%, etc., where the initial residual value corresponding to A% and the initial residual value corresponding to B% are all within the first value range, which is not specifically limited in this application.
- the video encoding device may determine the first residual value and the second residual value according to the target ratio value and the value of the residual value corresponding to the center position of the histogram (which can be understood as the above-mentioned Two critical values); map the initial residual value between the first residual value and the second residual value to the target residual value, and map the initial residual value that is not between the first residual value and the second residual value The initial residual value is clamped to a preset value.
- the first residual value is smaller than the residual value corresponding to the center position of the histogram; the second residual value is greater than the residual value corresponding to the central position of the histogram; the first residual value is at least one; the second residual value is at least 1; the residual value corresponding to the first residual value and the center position of the histogram corresponds to the first proportional value; the residual value corresponding to the second residual value and the central position of the histogram corresponds to the second proportional value; the first proportional value and The sum of the second proportional values is the target proportional value.
- the first residual value is 2, then the second residual value is also 2, the first residual value is Ylow, Ylow1, and the second residual value is Yhigh, Yhigh1 .
- the target ratio value is 98%
- Ylow1 can choose the position of K% of the histogram distribution, such as 1%
- Yhigh1 can select the position of N% of the histogram distribution, such as 99%.
- the target ratio is greater than 90%
- Ylow can choose the position of L% of the histogram distribution, such as 5%
- Yhigh can select the position of M% of the histogram distribution, such as 95%.
- the initial residual value between (Ylow, Yhigh) is equal to the original value + (1 ⁇ (Bitdepth-1))-Y; the residual between (Ylow1, Ylow) is mapped to (0, Ylow+(1 ⁇ (Bitdepth-1))-Y); the residual between (Yhigh, Yhigh1) is mapped to (Yhigh+(1 ⁇ (Bitdepth-1))-Y), (1 ⁇ Bitdepth)-1) ; Clamp to 0 if it is less than Ylow1, and clamp to (1 ⁇ Bitdepth)-1 if it is greater than Yhigh1.
- the residual between (Y-(1 ⁇ (Bitdepth-1)), Y+(1 ⁇ (Bitdepth-1))-1) is equal to the original value + (1 ⁇ (Bitdepth-1))- Y; residuals less than Y-(1 ⁇ (Bitdepth-1)) are clamped to 0; residuals greater than Y+(1 ⁇ (Bitdepth-1))-1 are clamped to (1 ⁇ Bitdepth) -1.
- the above-mentioned Bitdepth indicates the value of the first bit width, such as the first bit width is 8bit, the corresponding Bitdepth is 8, the value of Y is 0, Ylow is -100, and Yhigh is 90.
- (Ylow , Yhigh) between the initial residual value such as 90 when mapping, you can use 90+(1 ⁇ (Bitdepth-1))-0 to determine 218(90+128-0) as the target residual value of 90 mapping Difference; the initial residual value between (Ylow, Yhigh) can be such as -100, and when mapping, you can use -100+(1 ⁇ (Bitdepth-1))-0 to determine 28(-100+ 128-0) is the target residual value mapped to -100.
- Ylow1 is -300
- the initial residual value between (Ylow, Ylow1) such as (-300, -100) is mapped to (0, 28)
- the initial residual value between (Yhigh, Yhigh1) such as (90, 400) is mapped to (218, 255)
- the value smaller than Ylow1 is clamped to 0
- the value greater than Yhigh1 is clamped to 255.
- the initial residual value between (Y-128, Y+127) can be directly added to 128-Y to obtain the target residual value, and the initial residual value smaller than Y-128 can be directly clamped Bit to 0, the initial residual value greater than Y+127 is directly clamped to 255.
- step 204 the video encoding device encodes the corresponding relationship and the target residual value to determine preset data.
- the preset data can be understood as user-defined data
- the video decoding device can convert SDR data into HDR data when decoding the code stream after acquiring the preset data.
- Step 205 the video encoding device transmits the first SDR code stream with preset data added.
- the video decoding device will receive the first SDR code stream.
- Step 206 the video decoding device maps the reconstructed data of the first SDR code stream into the second HDR data according to the corresponding relationship.
- Step 207 the video decoding device determines the first HDR data according to the target residual value and the second HDR data.
- the preset data further includes: a residual mapping method and a clamping method; the video decoding device may determine according to the residual mapping method, the clamping method, the target residual value and the first bit width The first residual value and the second residual value; determine the initial residual value according to the first residual value, the second residual value and the clamping method; the bit width of the initial residual value is greater than or equal to the first bit width; according to The initial residual value and the second HDR data determine the first HDR data.
- the target residual value can be restored to the initial residual value by referring to the following method, that is, the inverse operation of the residual mapping of the above-mentioned video encoding device:
- the above-mentioned Bitdepth indicates the value of the first bit width, such as the first bit width is 8bit, the corresponding Bitdepth is 8, the value of Y is 0, Ylow is -100, and Yhigh is 90.
- the target residual value between 28) is mapped to (-300, -100)
- the target residual value between (90+128, 255) can be mapped to (90, 400)
- the The target residual value between (-100+128, 90+128) minus 128 determines the initial residual value.
- the initial residual value can be obtained by adding Y-128 to the target residual value, that is, the initial bit width is 10 bits.
- This application achieves good support for SDR video decoding devices and HDR video decoding devices by using preset data and SDR code streams.
- the code stream is an SDR code stream, which will be explicitly identified as an SDR code stream, so as to ensure the effect of SDR.
- the preset data and SDR code stream will be correctly identified and decoded, thus ensuring the effect of HDR.
- the device may be a video encoding device or a video decoding device.
- the present application does not specifically limit it here.
- the image processing device may include an input and output unit 501 and processing unit 502.
- the processing unit 502 is configured to obtain source data, the source data includes the first high dynamic range HDR data and the first standard dynamic range SDR code stream for the same video data; and according to the first SDR The corresponding relationship between the reconstructed data of the code stream and the first HDR data, mapping the reconstructed data of the first SDR code stream into the second HDR data; determining the target residual value of the second HDR data and the first HDR data; the target residual The bit width of the value is less than or equal to the first bit width; the first bit width is the data bit width used to encode the first SDR video into the first SDR code stream; the corresponding relationship and the target residual value are encoded to determine the preset data ;
- the input and output unit 501 is used to transmit the first SDR code stream with preset data added.
- the first HDR data in the source data may be received by the video encoding device from a device communicatively connected to it, or may be obtained by the video encoding device after performing data processing on the same video data, and this application will not elaborate here. limited.
- the video data is relatively large, which will occupy a large amount of bandwidth resources.
- the transmission of the video code stream will not occupy a large amount of bandwidth resources, and can also ensure the transmission efficiency of the data. Therefore, the video encoding device will not directly To transmit video data, it is necessary to encode the video data to obtain a video code stream for transmission.
- the video encoding device usually acquires HDR data and SDR data, and encodes the SDR data to obtain an SDR code stream (that is, the first SDR code stream).
- SDR code stream that is, the first SDR code stream.
- converting video data into a video code stream needs to meet the data bit width requirements of the device or video data.
- the data bit width used by the SDR data encoded to the SDR code stream is 8 bits
- the data bit width used by the HDR data encoded to the HDR code stream is 10 bits or 12 bits.
- this application does not limit the encoding algorithm adopted by the SDR data, and may be any encoding and decoding algorithm such as MPEG1, MPEG2, MPEG4, H.263, H.264, H.265, JPEG, etc.
- the above-mentioned reconstructed data is the SDR data obtained by decoding the first SDR code stream.
- the reconstructed data is compared with the first HDR data to determine the corresponding relationship between the reconstructed data and the first HDR data.
- the corresponding relationship can be determined by comparing the gray value, RGB value or YUV value of the video image, which is not specifically limited in this application.
- the data bit widths corresponding to the HDR data and the SDR data are usually different.
- the data bit width corresponding to the HDR data is 10 bits
- the data bit width corresponding to the SDR data is 8 bits.
- the video encoding device can convert the target residual value of the first HDR data and the second HDR data into a data bit width that satisfies the transmission requirements of the first SDR code stream according to the subtraction operation, normalization operation, etc., based on the above SDR data corresponding to If the data bit width is 8 bits, then the data bit width of the target residual value is also 8 bits or less than 8 bits.
- This application achieves good support for SDR video decoding devices and HDR video decoding devices by using preset data and SDR code streams.
- the code stream is an SDR code stream, which will be explicitly identified as an SDR code stream, so as to ensure the effect of SDR.
- the preset data and SDR code stream will be correctly identified and decoded, thus ensuring the effect of HDR. It should be noted that currently high-bit-width encoding is not supported by all encoding and decoding standards.
- JPEG only supports 8 bits, and the target residual and SDR are both 8 bits, which can ensure that the video encoding device and video decoding device can use the same level of codec , usually the complexity of frame-level switching hardware encoder or hardware decoder is relatively high, and the processing capability of the device is high.
- the target residual value By adjusting the target residual value to be less than or equal to the bit width of the SDR code stream encoding, it is possible to avoid encoding and decoding.
- the corresponding relationship can be determined in the following manner:
- the first average value of the reconstructed data and the first HDR data is determined according to the preset parameters of the pixels at the first position of the reconstructed data and the first HDR data; combine the reconstructed data and the first HDR data
- the data is divided into multiple image blocks; the number and position of the image blocks are the same; the second average value corresponding to each image block of the reconstructed data and the first HDR data is determined; and the corresponding relationship is determined according to the first average value or the second average value.
- the correspondence relationship determined in this manner has higher accuracy, and the determined second HDR data is more reliable.
- the preset parameter is a gray value, or an RGB value, or a YUV value.
- processing unit 502 is specifically configured to:
- the initial residual value is mapped to a target residual value with a bit width less than or equal to the first bit width.
- the above initial residual value is obtained by subtracting the gray value, RGB value, or YUV value of the same position of the second HDR data and the first HDR data.
- the value after subtraction may be different.
- the initial residual value can be statistically analyzed to obtain a histogram, and the histogram can be used to display the distribution of the value range of the initial residual value.
- the initial residual value is provided to obtain a curve graph to show the distribution of the value range of the initial residual value, and the present application does not specifically limit the manner of displaying the distribution of the value range of the initial residual value.
- the video encoding device may map the initial residual value to the target residual value according to the residual mapping mode and the clamping mode determined by the distribution of the value range of the initial residual value.
- processing unit 502 is specifically configured to:
- the video coding device determines the distribution of the value range of the initial residual value, it can determine the first value range according to the value of the first bit width, and the initial residual value within the first value range Can be mapped to a target residual value less than or equal to the first bit width.
- processing unit 502 is specifically configured to:
- the target ratio value and the value of the residual value corresponding to the center position of the histogram determine the first residual value and the second residual value; the first residual value is smaller than the residual value corresponding to the histogram center position; the second residual value The value is greater than the residual value corresponding to the center position of the histogram; the first residual value is at least 1; the second residual value is at least 1; the residual value corresponding to the first residual value and the histogram center position corresponds to the first Proportional value; the residual value corresponding to the second residual value and the center position of the histogram corresponds to the second proportional value; the sum of the first proportional value and the second proportional value is the target proportional value; it will be located between the first residual value and the second
- the initial residual values among the residual values are mapped to target residual values, and the initial residual values not between the first residual value and the second residual value are clamped to preset values.
- the first residual value is smaller than the residual value corresponding to the center position of the histogram; the second residual value is greater than the residual value corresponding to the central position of the histogram; the first residual value is at least one; the second residual value is at least 1; the residual value corresponding to the first residual value and the center position of the histogram corresponds to the first proportional value; the residual value corresponding to the second residual value and the central position of the histogram corresponds to the second proportional value; the first proportional value and The sum of the second proportional values is the target proportional value.
- the input and output unit 501 can be used to receive the first SDR code stream; the first SDR code stream includes preset data; the preset data is obtained by encoding the corresponding relationship and the target residual value
- the processing unit 502 may be configured to map the reconstructed data of the first SDR code stream into second HDR data according to the corresponding relationship; and determine the first HDR data according to the target residual value and the second HDR data.
- the preset data further includes: a residual mapping manner and a clamping manner.
- the processing unit 502 is specifically configured to: determine the first residual value and the second residual value according to the residual mapping mode, the clamping mode, the target residual value and the first bit width; Determine the initial residual value according to the first residual value, the second residual value and the clamping method; the bit width of the initial residual value is greater than or equal to the first bit width; according to the initial residual value and the second HDR data, determine the first residual value - HDR data.
- the image processing apparatus 600 may be a chip or a system on a chip.
- the system-on-a-chip may be composed of chips, or may include chips and other discrete devices.
- the image processing device 600 may include at least one processor 610, and the image processing device 600 may further include at least one memory 620 for storing computer programs, program instructions and/or data.
- the memory 620 is coupled to the processor 610 .
- the coupling in the embodiments of the present application is an indirect coupling or a communication connection between devices, units or modules, which may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
- Processor 610 may cooperate with memory 620 .
- Processor 610 may execute computer programs stored in memory 620 .
- the at least one memory 620 may also be integrated with the processor 610.
- the image processing apparatus 600 may or may not include the transceiver 630 , which is indicated by a dotted box in the figure, and the image processing apparatus 600 may perform information exchange with other devices through the transceiver 630 .
- the transceiver 630 may be a circuit, a bus, a transceiver or any other device that can be used for information exchange.
- the image processing device 600 may be applied to the aforementioned video encoding device, or may be the aforementioned video decoding device.
- the memory 620 stores necessary computer programs, program instructions and/or data for implementing the functions of the video encoding device or the video decoding device in any of the above-mentioned embodiments.
- the processor 610 may execute the computer program stored in the memory 620 to complete the method in any of the foregoing embodiments.
- a specific connection medium among the transceiver 630, the processor 610, and the memory 620 is not limited.
- the memory 620, the processor 610, and the transceiver 630 are connected through a bus.
- the bus is represented by a thick line in FIG. 6, and the connection mode between other components is only for schematic illustration. It is not limited.
- the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 6 , but it does not mean that there is only one bus or one type of bus.
- the processor may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or Execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application.
- a general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
- the memory may be a non-volatile memory, such as a hard disk (hard disk drive, HDD) or a solid-state drive (solid-state drive, SSD), etc., and may also be a volatile memory (volatile memory), such as Random-access memory (RAM).
- the memory may also be, but is not limited to, any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
- the memory in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing computer programs, program instructions and/or data.
- the embodiment of the present application also provides another image processing device 700, including: an interface circuit 710 and a logic circuit 720; the interface circuit 710, which can be understood as an input and output interface, can be used to perform 5 or the same operation steps as the transceiver shown in FIG. 6 , the present application will not repeat them here.
- the logic circuit 720 can be used to run the code instructions to execute the method in any of the above-mentioned embodiments, and can be understood as the processing unit in FIG. 5 or the processor in FIG. 6 above, which can realize the same function as the processing unit or processor, This application will not go into details here.
- the embodiments of the present application also provide a readable storage medium, the readable storage medium stores instructions, and when the instructions are executed, the video encoding and decoding methods in any of the above embodiments are executed.
- the readable storage medium may include various mediums capable of storing program codes such as U disk, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk.
- the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application may employ one or more computer-usable storage media (including but not limited to disk storage, compact disc read-only memory (CD-ROM)) having computer-usable program code embodied therein. , optical memory, etc.) in the form of a computer program product.
- CD-ROM compact disc read-only memory
- These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising the instruction device, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
Abstract
Description
Claims (21)
- 一种视频编码方法,其特征在于,包括:获取源数据,所述源数据包括针对同一视频数据的第一高动态范围HDR数据和第一标准动态范围SDR码流;根据所述第一SDR码流的重构数据与所述第一HDR数据对应关系,将所述第一SDR码流的重构数据映射成第二HDR数据;确定所述第二HDR数据与所述第一HDR数据的目标残差值,其中,所述目标残差值的位宽小于或等于第一位宽,所述第一位宽为第一SDR视频编码成所述第一SDR码流采用的数据位宽;将所述对应关系以及所述目标残差值进行编码处理,确定预设数据;传输添加所述预设数据的所述第一SDR码流。
- 根据权利要求1所述的方法,其特征在于,所述对应关系,通过如下方式确定:确定所述重构数据与所述第一HDR数据的第一平均值;所述第一平均值为根据所述重构数据与所述第一HDR数据的第一位置的像素点的预设参数确定;将所述重构数据与所述第一HDR数据分成多个图像块;所述图像块的个数和位置相同;确定所述重构数据与所述第一HDR数据的各图像块对应的第二平均值;根据所述第一平均值或所述第二平均值确定所述对应关系。
- 根据权利要求2所述的方法,其特征在于,所述预设参数为灰度值,或RGB值,或YUV值。
- 根据权利要求1-3中任一所述的方法,其特征在于,所述确定所述第二HDR数据与所述第一HDR数据的目标残差值,包括:将所述第二HDR数据与所述第一HDR数据相减,确定初始残差值;根据所述初始残差值的取值范围的分布确定残差映射方式以及钳位方式;根据所述残差映射方式以及所述钳位方式将所述初始残差值映射成位宽小于或等于所述第一位宽的目标残差值。
- 根据权利要求4所述的方法,其特征在于,所述根据所述初始残差值的取值范围的分布确定残差映射方式以及钳位方式,包括:根据所述初始残差值的取值确定直方图;确定所述直方图中心位置对应的残差值的取值;根据所述直方图中心位置对应的残差值的取值、所述第一位宽确定第一取值范围;根据所述初始残差值的取值范围的分布,确定位于所述第一取值范围的初始残差的目标比例值;将位于所述第一取值范围的初始残差进行残差映射,不位于所述第一取值范围的初始残差进行钳位处理。
- 根据权利要求5所述的方法,其特征在于,所述根据所述残差映射方式以及所述钳位方式将所述初始残差值映射成位宽小于或等于所述第一位宽的目标残差值,包括:根据所述目标比例值以及所述直方图中心位置对应的残差值的取值,确定第一残差值和第二残差值;所述第一残差值小于所述直方图中心位置对应的残差值;所述第二残值大 于所述直方图中心位置对应的残差值;所述第一残差值至少为1个;所述第二残差值至少为1个;所述第一残差值与所述直方图中心位置对应的残差值对应第一比例值;所述第二残差值与所述直方图中心位置对应的残差值对应第二比例值;所述第一比例值与所述第二比例值的和为所述目标比例值;将所述位于所述第一残差值和所述第二残差值之间的初始残差值映射成目标残差值,将不位于所述第一残差值和所述第二残差值之间的初始残差值钳位处理成预设值。
- 一种视频解码方法,其特征在于,包括:接收第一SDR码流;所述第一SDR码流中包括预设数据;所述预设数据是通过对应关系和目标残差值编码处理得到的;根据所述对应关系将所述第一SDR码流的重构数据映射成第二HDR数据;根据所述目标残差值和所述第二HDR数据,确定第一HDR数据。
- 根据权利要求7所述的方法,其特征在于,所述预设数据还包括:残差映射方式以及钳位方式。
- 根据权利要求8所述的方法,其特征在于,所述根据所述目标残差值和所述第二HDR数据,确定第一HDR数据,包括:根据所述残差映射方式、所述钳位方式、所述目标残差值以及第一位宽,确定第一残差值和第二残差值;根据所述第一残差值、所述第二残差值以及所述钳位方式确定初始残差值;所述初始残差值的位宽大于或等于所述第一位宽;根据所述初始残差值以及所述第二HDR数据,确定所述第一HDR数据。
- 一种视频编码装置,其特征在于,包括:处理单元,用于获取源数据,所述源数据包括针对同一视频数据的第一高动态范围HDR数据和第一标准动态范围SDR码流;以及根据所述第一SDR码流的重构数据与所述第一HDR数据对应关系,将所述第一SDR码流的重构数据映射成第二HDR数据;确定所述第二HDR数据与所述第一HDR数据的目标残差值;所述目标残差值的位宽小于或等于第一位宽;所述第一位宽为第一SDR视频编码成所述第一SDR码流采用的数据位宽;将所述对应关系以及所述目标残差值进行编码处理,确定预设数据;输入输出单元,用于传输添加所述预设数据的所述第一SDR码流。
- 根据权利要求10所述的装置,其特征在于,所述对应关系,通过如下方式确定:确定所述重构数据与所述第一HDR数据的第一平均值;所述第一平均值为根据所述重构数据与所述第一HDR数据的第一位置的像素点的预设参数确定;将所述重构数据与所述第一HDR数据分成多个图像块;所述图像块的个数和位置相同;确定所述重构数据与所述第一HDR数据的各图像块对应的第二平均值;根据所述第一平均值或所述第二平均值确定所述对应关系。
- 根据权利要求11所述的装置,其特征在于,所述预设参数为灰度值,或RGB值,或YUV值。
- 根据权利要求10-12中任一所述的装置,其特征在于,所述处理单元,具体用于:将所述第二HDR数据与所述第一HDR数据相减,确定初始残差值;根据所述初始残差值的取值范围的分布确定残差映射方式以及钳位方式;根据所述残差映射方式以及所述钳位方式将所述初始残差值映射成位宽小于或等于所述第一位宽的目标残差值。
- 根据权利要求13所述的装置,其特征在于,所述处理单元,具体用于:根据所述初始残差值的取值确定直方图;确定所述直方图中心位置对应的残差值的取值;根据所述直方图中心位置对应的残差值的取值、所述第一位宽确定第一取值范围;根据所述初始残差值的取值范围的分布,确定位于所述第一取值范围的初始残差的目标比例值;将位于所述第一取值范围的初始残差进行残差映射,不位于所述第一取值范围的初始残差进行钳位处理。
- 根据权利要求14所述的装置,其特征在于,所述处理单元,具体用于:根据所述目标比例值以及所述直方图中心位置对应的残差值的取值,确定第一残差值和第二残差值;所述第一残差值小于所述直方图中心位置对应的残差值;所述第二残值大于所述直方图中心位置对应的残差值;所述第一残差值至少为1个;所述第二残差值至少为1个;所述第一残差值与所述直方图中心位置对应的残差值对应第一比例值;所述第二残差值与所述直方图中心位置对应的残差值对应第二比例值;所述第一比例值与所述第二比例值的和为所述目标比例值;将所述位于所述第一残差值和所述第二残差值之间的初始残差值映射成目标残差值,将不位于所述第一残差值和所述第二残差值之间的初始残差值钳位处理成预设值。
- 一种视频解码装置,其特征在于,包括:输入输出单元,用于接收第一SDR码流;所述第一SDR码流中包括预设数据;所述预设数据是通过对应关系和目标残差值编码处理得到的;处理单元,用于根据所述对应关系将所述第一SDR码流的重构数据映射成第二HDR数据;根据所述目标残差值和所述第二HDR数据,确定第一HDR数据。
- 根据权利要求16所述的装置,其特征在于,所述预设数据还包括:残差映射方式以及钳位方式。
- 根据权利要求16所述的装置,其特征在于,所述处理单元,具体用于:根据所述残差映射方式、所述钳位方式、所述目标残差值以及第一位宽,确定第一残差值和第二残差值;根据所述第一残差值、所述第二残差值以及所述钳位方式确定初始残差值;所述初始残差值的位宽大于或等于所述第一位宽;根据所述初始残差值以及所述第二HDR数据,确定所述第一HDR数据。
- 一种视频编码装置,其特征在于,包括:相互耦合的非易失性存储器和处理器,所述处理器调用存储在所述存储器中的程序代码以执行如权利要求1-6任一项所述的方法。
- 一种视频解码装置,其特征在于,包括:相互耦合的非易失性存储器和处理器,所述处理器调用存储在所述存储器中的程序代码以执行如权利要求7-9任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有程序代码,所述程序代码包括用于处理器执行如权利要求1-9任一项所述方法的指令。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020247011327A KR20240055819A (ko) | 2021-09-15 | 2022-09-08 | 비디오 인코딩 방법과 장치, 및 비디오 디코딩 방법과 장치 |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111082879.5 | 2021-09-15 | ||
CN202111082879.5A CN115811616A (zh) | 2021-09-15 | 2021-09-15 | 一种视频编码、解码方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023040753A1 true WO2023040753A1 (zh) | 2023-03-23 |
Family
ID=85482097
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/117938 WO2023040753A1 (zh) | 2021-09-15 | 2022-09-08 | 一种视频编码、解码方法及装置 |
Country Status (4)
Country | Link |
---|---|
KR (1) | KR20240055819A (zh) |
CN (1) | CN115811616A (zh) |
TW (1) | TW202315399A (zh) |
WO (1) | WO2023040753A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101371583A (zh) * | 2006-01-23 | 2009-02-18 | 马普科技促进协会 | 高动态范围编解码器 |
US20160301959A1 (en) * | 2013-11-13 | 2016-10-13 | Lg Electronics Inc. | Broadcast signal transmission method and apparatus for providing hdr broadcast service |
CN108293141A (zh) * | 2015-12-28 | 2018-07-17 | 索尼公司 | 用于高动态范围视频数据的发送装置、发送方法、接收装置以及接收方法 |
EP3454294A1 (en) * | 2017-09-08 | 2019-03-13 | Interdigital VC Holdings, Inc | Apparatus and method to convert image data |
CN111491168A (zh) * | 2019-01-29 | 2020-08-04 | 华为软件技术有限公司 | 视频编解码方法、解码器、编码器和相关设备 |
-
2021
- 2021-09-15 CN CN202111082879.5A patent/CN115811616A/zh active Pending
-
2022
- 2022-09-07 TW TW111133827A patent/TW202315399A/zh unknown
- 2022-09-08 KR KR1020247011327A patent/KR20240055819A/ko active Search and Examination
- 2022-09-08 WO PCT/CN2022/117938 patent/WO2023040753A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101371583A (zh) * | 2006-01-23 | 2009-02-18 | 马普科技促进协会 | 高动态范围编解码器 |
US20160301959A1 (en) * | 2013-11-13 | 2016-10-13 | Lg Electronics Inc. | Broadcast signal transmission method and apparatus for providing hdr broadcast service |
CN108293141A (zh) * | 2015-12-28 | 2018-07-17 | 索尼公司 | 用于高动态范围视频数据的发送装置、发送方法、接收装置以及接收方法 |
EP3454294A1 (en) * | 2017-09-08 | 2019-03-13 | Interdigital VC Holdings, Inc | Apparatus and method to convert image data |
CN111491168A (zh) * | 2019-01-29 | 2020-08-04 | 华为软件技术有限公司 | 视频编解码方法、解码器、编码器和相关设备 |
Also Published As
Publication number | Publication date |
---|---|
TW202315399A (zh) | 2023-04-01 |
KR20240055819A (ko) | 2024-04-29 |
CN115811616A (zh) | 2023-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11638003B2 (en) | Video coding and decoding methods and devices using a library picture bitstream | |
RU2737507C2 (ru) | Способ и устройство для кодирования изображения высокого динамического диапазона, соответствующий способ декодирования и устройство декодирования | |
US20180005357A1 (en) | Method and device for mapping a hdr picture to a sdr picture and corresponding sdr to hdr mapping method and device | |
US20230156202A1 (en) | Chroma block prediction method and apparatus | |
RU2726290C2 (ru) | Способ и устройство для тонального отображения изображения посредством использования параметрической функции тональной регулировки | |
JP6529504B2 (ja) | ハイダイナミックレンジ画像を符号化する、および/または、ビットストリームを復号するための方法およびデバイス | |
BR102013020622B1 (pt) | Codificador e método | |
US20150365698A1 (en) | Method and Apparatus for Prediction Value Derivation in Intra Coding | |
US20220337820A1 (en) | Encoding method and encoder | |
BR112016023955B1 (pt) | Método para codificação de dados de vídeo, aparelho para codificar informações de vídeo e memória legível por computador | |
BR112016023956B1 (pt) | Método e aparelho para codificar dados de vídeo, e memória legível por computador | |
US20220329818A1 (en) | Encoding method and encoder | |
CN106412595B (zh) | 用于编码高动态范围帧以及施加的低动态范围帧的方法和设备 | |
WO2020038378A1 (zh) | 色度块预测方法及装置 | |
WO2023040753A1 (zh) | 一种视频编码、解码方法及装置 | |
US10609411B1 (en) | Cross color prediction for image/video compression | |
US10750182B2 (en) | Embedded codec circuitry for visual quality based allocation of refinement bits | |
JP2019514290A (ja) | ディスプレイストリーム圧縮用の知覚的量子化パラメータ(qp)重み付けのための装置および方法 | |
CN116916066A (zh) | 一种视频转码方法及装置、电子设备及存储介质 | |
EP3051487A1 (en) | Method and device for mapping a HDR picture to a SDR picture and corresponding SDR to HDR mapping method and device | |
WO2023092256A1 (zh) | 一种视频编码方法及其相关装置 | |
WO2021168624A1 (zh) | 视频图像编码方法、设备及可移动平台 | |
WO2024051299A1 (zh) | 一种编解码方法及装置 | |
US11706444B2 (en) | Inter prediction method and apparatus | |
WO2024051331A1 (zh) | 图像编解码方法、装置、编码器、解码器和系统 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22869122 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2401001707 Country of ref document: TH |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2022869122 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2022869122 Country of ref document: EP Effective date: 20240321 |
|
ENP | Entry into the national phase |
Ref document number: 20247011327 Country of ref document: KR Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |