WO2023040753A1 - 一种视频编码、解码方法及装置 - Google Patents

一种视频编码、解码方法及装置 Download PDF

Info

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
Application number
PCT/CN2022/117938
Other languages
English (en)
French (fr)
Inventor
徐巍炜
周建同
余全合
文锦松
胡宇彤
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to KR1020247011327A priority Critical patent/KR20240055819A/ko
Publication of WO2023040753A1 publication Critical patent/WO2023040753A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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/186Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods 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/98Adaptive-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

本申请实施例提供一种视频编码、解码方法及装置,涉及图像处理技术领域。视频编码装置可获取源数据,源数据包括针对同一视频数据的第一高动态范围HDR数据和第一标准动态范围SDR码流;根据第一SDR码流的重构数据与第一HDR数据对应关系,将第一SDR码流的重构数据映射成第二HDR数据;确定第二HDR数据与第一HDR数据的目标残差值;目标残差值的位宽小于或等于第一位宽;第一位宽为第一SDR视频编码成第一SDR码流采用的数据位宽;将对应关系以及目标残差值进行编码处理,确定预设数据;传输添加预设数据的第一SDR码流。本申请通过使用预设数据和SDR码流可保证SDR视频解码设备和HDR视频解码设备的良好处理。

Description

一种视频编码、解码方法及装置
相关申请的交叉引用
本申请要求在2021年09月15日提交中国专利局、申请号为202111082879.5、申请名称为“一种视频编码、解码方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及图像处理技术领域,尤其涉及一种视频编码、解码方法及装置。
背景技术
在数字图像中,动态范围(dynamic range)可表示在图像可显示的范围内最大灰度值和最小灰度值之间的比率。动态范围在10 -3到10 6范围内为高动态范围(high dynamic range,HDR),普通图片的动态范围为标准动态范围(standard dynamic range,SDR)。数码相机的成像过程实际上就是高动态范围到相片标准动态范围的映射。
动态范围的映射主要应用于前端HDR信号和后端HDR的终端显示设备,例如,前端是采集到4000nit(尼特)的光照信号,而后端HDR的终端显示设备(电视机)的HDR显示能力只有500nit,将4000nit信号映射到500nit的设备上,是一种从高到低的动态范围映射。另外,前端是采集到100nit的SDR信号,而显示端是2000nit的电视信号,将100nit信号显示在2000nit的设备上,一种是从低到高的动态范围映射。
目前大量设备不支持HDR,HDR信号在这些设备上的显示效果较差,相关技术提出采用分层编码进行视频处理也即针对同一视频分成多个不同分辨率的视频进行分别编码处理,但是很多硬件设备并不支持分层编码,且分层编码的数据计算量大,会浪费大量的处理器资源。
发明内容
本申请提供一种视频编码、解码方法及装置,以在保证HDR显示效果的情况下,提高视频编码的效率。
第一方面,本申请提供一种视频编码方法,该方法可通过视频编码装置来执行,通常视频编码装置可以为摄像机、手机、平板电脑、笔记本电脑、电视等携带摄像头或处理器的设备,本申请在此不具体限定。
视频编码装置可获取源数据,源数据包括针对同一视频数据的第一高动态范围HDR数据和第一标准动态范围SDR码流;根据第一SDR码流的重构数据与第一HDR数据对应关系,将第一SDR码流的重构数据映射成第二HDR数据;确定第二HDR数据与第一HDR数据的目标残差值;目标残差值的位宽小于或等于第一位宽;第一位宽为第一SDR视频编码成第一SDR码流采用的数据位宽;将对应关系以及目标残差值进行编码处理,确定预设数据;传输添加预设数据的第一SDR码流。
需要说明的是,源数据中的第一HDR数据可以为视频编码装置从与其通信连接的设 备接收的,也可以为视频编码装置针对同一视频数据进行数据处理后得到的,本申请在此不作具体限定。通常视频数据较大,会占用大量的带宽资源,将视频数据编码后得到视频码流,传输视频码流不会占用大量的带宽资源,还可以保证数据的传输效率,因此视频编码装置不会直接传输视频数据,需要将视频数据进行编码后得到视频码流进行传输。此外,视频编码装置通常会获取HDR数据和SDR数据,对SDR数据编码处理可以得到SDR码流(也即第一SDR码流)。通常视频编码时,将视频数据转换成视频码流,需要符合设备或视频数据的数据位宽要求。数据位宽越大,视频码流展示的视频数据DR越高,图像的像素越高,数据位宽越小,视频码流展示的视频数据DR越低,图像的像素越低。通常SDR数据经过编码处理的到SDR码流采用的数据位宽为8bit,HDR数据经过编码处理的到HDR码流采用的数据位宽为10bit、12bit。此外,本申请不对SDR数据采用的编码算法进行限制,可以是MPEG1、MPEG2、MPEG4、H.263、H.264、H.265、JPEG等任意编解码算法。
上述的重构数据为对第一SDR码流进行解码得到的SDR数据,将重构数据与第一HDR数据进行比对,确定重构数据与第一HDR数据的对应关系,在实际应用时,可通过比对视频图像的灰度值、RGB值或YUV值来确定对应关系,本申请在此不具体限定。
需要说明的是,HDR数据和SDR数据对应的数据位宽的大小通常是不同的,如,HDR数据对应的数据位宽为10bit,SDR数据对应的数据位宽为8bit。视频编码装置可根据相减运算、归一化运算等将第一HDR数据和第二HDR数据的目标残差值转化为满足第一SDR码流传输需求的数据位宽,基于上述SDR数据对应的数据位宽为8bit,那么目标残差值的数据位宽也为8bit或者小于8bit。
本申请通过使用预设数据和SDR码流实现了对于SDR视频解码设备和HDR视频解码设备的良好支持。对于SDR视频解码设备,码流为SDR码流,会显式识别为SDR码流,从而保证SDR的效果。对于HDR设备,预设数据和SDR码流均会被正确的识别和解码,从而保证了HDR的效果。需要说明的是,目前高位宽的编码并不被所有编解码标准支持,如JPEG只支持8bit,目标残差和SDR都是8bit可以保证视频编码装置和视频解码装置可使用同一级别的编解码器,通常帧级切换硬件编码器或者硬件解码器复杂度比较高,设备处理能力要求高,通过将目标残差值调整为小于或等于SDR码流编码时的位宽,可避免编码和解码端在帧级切换硬件编码器或者硬件解码器。
在一种可选的方式中,对应关系可通过如下方式确定:确定重构数据与第一HDR数据的第一平均值;第一平均值为根据重构数据与第一HDR数据的第一位置的像素点的预设参数确定;将重构数据与第一HDR数据分成多个图像块;图像块的个数和位置相同;确定重构数据与第一HDR数据的各图像块对应的第二平均值;根据第一平均值或第二平均值确定对应关系。通过该方式确定的对应关系,准确度更高,确定的第二HDR数据更加可靠。
在一种可选的方式中,预设参数为灰度值,或RGB值,或YUV值。还可以为YUV中的Y,或Lab中的L,本申请并不具体限定。
在一种可选的方式中,视频编码装置可将第二HDR数据与第一HDR数据相减,确定初始残差值;根据初始残差值的取值范围的分布确定残差映射方式以及钳位方式;根据残差映射方式以及钳位方式将初始残差值映射成位宽小于或等于第一位宽的目标残差值。
需要说明的是,上述初始残差值,是将第二HDR数据和第一HDR数据的相同位置的灰度值,或者RGB值,或者YUV值相减得到的。相减后的值大小可能是不同的,可对初 始残差值进行统计分析,得到直方图,通过直方图展示初始残差值的取值范围的分布,在实际应用时,也可通过对不提供初始残差值进行描点获取曲线图来展示初始残差值的取值范围的分布,本申请在此不具体限定展示初始残差值的取值范围的分布的方式。
此外,在将初始残差值转换为目标残差值时,中间计算过程中某些误差较大的值可能会影响计算结果,可通过钳位方式去除误差较大的初始残差值在计算时带来的影响。之后,视频编码装置可根据初始残差值的取值范围的分布确定的残差映射方式以及钳位方式将初始残差值映射成目标残差值。
在一种可选的方式中,视频编码装置可根据初始残差值的取值确定直方图;确定直方图中心位置对应的残差值的取值;根据直方图中心位置对应的残差值的取值、第一位宽确定第一取值范围;根据初始残差值的取值范围的分布,确定位于第一取值范围的初始残差的目标比例值;将位于第一取值范围的初始残差进行残差映射,不位于第一取值范围的初始残差进行钳位处理。
需要说明的是,视频编码装置确定初始残差值取值范围的分布情况后,可根据第一位宽的取值,确定第一取值范围,该第一取值范围内的初始残差值可以映射为小于或等于第一位宽的目标残差值。
在一种可选的方式中,视频编码装置可根据目标比例值以及直方图中心位置对应的残差值的取值,确定第一残差值和第二残差值;第一残差值小于直方图中心位置对应的残差值;第二残值大于直方图中心位置对应的残差值;第一残差值至少为1个;第二残差值至少为1个;第一残差值与直方图中心位置对应的残差值对应第一比例值;第二残差值与直方图中心位置对应的残差值对应第二比例值;第一比例值与第二比例值的和为目标比例值;将位于第一残差值和第二残差值之间的初始残差值映射成目标残差值,将不位于第一残差值和第二残差值之间的初始残差值钳位处理成预设值。
其中,第一残差值小于直方图中心位置对应的残差值;第二残值大于直方图中心位置对应的残差值;第一残差值至少为1个;第二残差值至少为1个;第一残差值与直方图中心位置对应的残差值对应第一比例值;第二残差值与直方图中心位置对应的残差值对应第二比例值;第一比例值与第二比例值的和为目标比例值。
需要说明的是,目前高位宽的编码并不被所有编解码标准支持,如JPEG只支持8bit,目标残差和SDR都是8bit可以保证视频编码装置和视频解码装置可使用同一级别的编解码器,通常帧级切换硬件编码器或者硬件解码器复杂度比较高,设备处理能力要求高,通过将目标残差值调整为小于或等于SDR码流编码时的位宽,可避免编码和解码端在帧级切换硬件编码器或者硬件解码器。
第二方面,本申请提供一种视频解码方法,该方法可通过视频解码装置来执行,通常视频解码装置可为手机、平板电脑、笔记本电脑、电视等携带显示屏或处理器的设备,本申请在此不具体限定。
视频解码装置可接收第一SDR码流;第一SDR码流中包括预设数据;预设数据是通过对应关系和目标残差值编码处理得到的;根据对应关系将第一SDR码流的重构数据映射成第二HDR数据;根据目标残差值和第二HDR数据,确定第一HDR数据。
在一种可选的方式中,预设数据还包括:残差映射方式以及钳位方式。
在一种可选的方式中,视频解码装置可根据残差映射方式、钳位方式、目标残差值以及第一位宽,确定第一残差值和第二残差值;根据第一残差值、第二残差值以及钳位方式 确定初始残差值;初始残差值的位宽大于或等于第一位宽;根据初始残差值以及第二HDR数据,确定第一HDR数据。
第三方面,本申请提供一种视频编码装置,包括:
处理单元,用于获取源数据,源数据包括针对同一视频数据的第一高动态范围HDR数据和第一标准动态范围SDR码流;以及根据第一SDR码流的重构数据与第一HDR数据对应关系,将第一SDR码流的重构数据映射成第二HDR数据;确定第二HDR数据与第一HDR数据的目标残差值;目标残差值的位宽小于或等于第一位宽;第一位宽为第一SDR视频编码成第一SDR码流采用的数据位宽;将对应关系以及目标残差值进行编码处理,确定预设数据;输入输出单元,用于传输添加预设数据的第一SDR码流。
第四方面,本申请提供一种视频解码装置,包括:
输入输出单元,用于接收第一SDR码流;第一SDR码流中包括预设数据;预设数据是通过对应关系和目标残差值编码处理得到的;处理单元,用于根据对应关系将第一SDR码流的重构数据映射成第二HDR数据;根据目标残差值和第二HDR数据,确定第一HDR数据。
第五方面,本申请实施例提供一种视频编码装置包括:相互耦合的非易失性存储器和处理器,所述处理器调用存储在所述存储器中的程序代码以执行第一方面或者第一方面的任一设计所述的方法。
第六方面,本申请实施例提供一种视频解码装置包括:相互耦合的非易失性存储器和处理器,所述处理器调用存储在所述存储器中的程序代码以执行第二方面或者第二方面的任一设计所述的方法。需要说明的是,处理器不执行编码操作。
第七方面,本申请实施例提供一种图像处理系统,包括第五方面所述的视频编码装置和第六方面所述的视频解码装置。
第八方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储了程序代码,其中,所述程序代码包括用于执行第一方面或第二方面的任意一种方法的部分或全部步骤的指令。
第九方面,本申请实施例提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行第一方面或第二方面的任意一种方法的部分或全部步骤。
应当理解的是,本申请的第二至九方面的有益效果可以参见第一方面的相关描述,不再赘述。
附图说明
图1示出了本申请实施例提供的一种图像处理系统的示意图;
图2示出了本申请实施例提供的一种视频编码、解码方法的流程示意图;
图3示出了本申请实施例提供的一种重构数据和第一HDR数据的示意图;
图4示出了本申请实施例提供的另一重构数据和第一HDR数据的示意图;
图5示出了本申请实施例提供的一种图像处理装置的结构示意图;
图6示出了本申请实施例提供的一种图像处理装置的结构示意图;
图7示出了本申请实施例提供的一种图像处理装置的结构示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述。方法实施例中的具体操作方法也可以应用于装置实施例或系统实施例中。其中,在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。因此装置与方法的实施可以相互参见,重复之处不再赘述。
本申请中,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。以及,除非有相反的说明,本申请实施例提及“第一”、“第二”等序数词是用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或者重要程度。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
图1示出了本申请实施例可以应用的一种图像处理系统,该系统中包括:视频编码装置、HDR视频解码装置以及SDR视频解码装置。其中,视频编码装置和视频解码装置的可以为多个,本申请在此不作具体限制。其中,视频编码装置可以用于采集视频数据,并对视频数据进行编码处理得到HDR视频码流和SDR视频码流;HDR视频解码装置可以接收HDR视频码流,和/或,SDR视频码流,并将HDR视频码流,和/或,SDR视频码流解码成视频数据;SDR视频解码装置可以接收SDR视频码流,并将SDR视频码流解码成视频数据。其中,视频编码装置可以为摄像机、手机、平板电脑、笔记本电脑、电视等携带摄像头或处理器的设备;视频解码装置可为手机、平板电脑、笔记本电脑、电视等携带显示屏或处理器的设备。针对同一图像,视频编码装置通过调整图像的采集方式可以获取不同DR的图像,如通过拍摄参数1(4曝光值(exposure value,EV)~12EV)确定SDR(其中,SDR图像的DR一般在1nit到100nit之间)图像1,通过拍摄参数2(8EV~16EV)确定SDR图像2,根据图像1和图像2可以确定HDR(其中,HDR图像的DR一般在0.001nit到10000nit之间)图像,该HDR图像对应的拍摄参数可以为4EV~16EV。同理,由于视频是由多帧连续的图像构成的,视频采集装置可针对同一视频,确定HDR视频和SDR视频。此外,视频编码装置还可以通过其他方式确定HDR视频和SDR视频,如:基于人工智能的方法等,本申请在此不具体限定。图1中,以视频编码装置可以获取SDR数据(视频或图像)和HDR数据为例来说明。
其中,EV是反映曝光量多少的单位,当感光度为100、光圈系数为F1、曝光时间为1秒时,曝光量定义为0,在这个曝光量的基础上,曝光量减少一档(曝光时间减少一半或者光圈缩小一档),EV值增加1。
曝光方程1如下:
2 AV*2 TV=2 BV*2 SV
AV+TV=BV+SV    方程1
其中,镜头光圈数是A,快门时间是T秒,景物亮度是B,胶片感光度是S。在摄影学里用EV来表示AV+TV或BV+SV的和。EV值就是“曝光值”,是一个抽象的概念,代 表了光圈和快门的一种组合,光圈和快门的速度可以自由选择,光圈大快门时间就要缩短,光圈小快门时间就要放长,但只要光圈与快门的组合满足某些条件使EV值一定,则最终的曝光量一定是相同的。EV值每增加1.0,相当于摄入的光线量增加一倍。
需要说明的是,在H.265标准中视频编码支持的对位宽为10bit(比特)的HDR数据进行编码处理,并显示。但是大量的设备是不支持HDR的,软件应用不能识别HDR数据,在软件应用的客户端不能显示出HDR数据良好地效果。另外,在MPEG-2、MPEG-4、H.264、H.265的标准中,有分层编码相关的方案,也即针对同一视频分成多个不同分辨率的视频进行分别编码处理,但是很多硬件设备并不支持分层编码,且分层编码的数据计算量大,会浪费大量的处理器资源。
考虑到上述情况,本申请提出一种视频编码、解码方法,以提高视频编码的效率,并提高用户的体验度。可参见图2,该方法是通过视频编码装置和视频解码装置来执行的,其中,视频编码装置可执行视频编码的方法,视频解码装置可执行视频解码方法。具体执行如下:
步骤201,视频编码装置获取源数据,源数据包括针对同一视频数据的第一HDR数据和第一SDR码流。
需要说明的是,源数据中的第一HDR数据可以为视频编码装置从与其通信连接的设备接收的,也可以为视频编码装置针对同一视频数据进行数据处理后得到的,本申请在此不做具体限定。通常视频数据较大,会占用大量的带宽资源,将视频数据编码后得到视频码流,传输视频码流不会占用大量的带宽资源,还可以保证数据的传输效率,因此视频编码装置不会直接传输视频数据,需要将视频数据进行编码后得到视频码流进行传输。此外,视频编码装置通常会获取HDR数据和SDR数据,对SDR数据编码处理可以得到SDR码流(也即第一SDR码流)。通常视频编码时,将视频数据转换成视频码流,需要符合设备或视频数据的数据位宽要求。数据位宽越大,视频码流展示的视频数据DR越高,图像的像素越高,数据位宽越小,视频码流展示的视频数据DR越低,图像的像素越低。通常SDR数据经过编码处理的到SDR码流采用的数据位宽为8bit,HDR数据经过编码处理的到HDR码流采用的数据位宽为10bit、12bit。此外,本申请不对SDR数据采用的编码算法进行限制,可以是MPEG1、MPEG2、MPEG4、H.263、H.264、H.265、JPEG等任意编解码算法。
步骤202,视频编码装置根据第一SDR码流的重构数据与第一HDR数据对应关系,将第一SDR码流的重构数据映射成第二HDR数据。
上述的重构数据为对第一SDR码流进行解码得到的SDR数据,将重构数据与第一HDR数据进行比对,确定重构数据与第一HDR数据的对应关系,在实际应用时,可通过比对视频图像的灰度值、RGB值或YUV值来确定对应关系,本申请在此不具体限定。
在一种可选的实施例中,对应关系可通过如下方式确定:
视频编码装置可确定重构数据与第一HDR数据的第一平均值;第一平均值为根据重构数据与第一HDR数据的第一位置的像素点的预设参数确定;视频编码装置可将重构数据与第一HDR数据分成多个图像块;图像块的个数和位置相同;确定重构数据与第一HDR数据的各图像块对应的第二平均值;根据第一平均值或第二平均值确定对应关系。通过该方式确定的对应关系,准确度更高,确定的第二HDR数据更加可靠。
该预设参数可以为灰度值,或RGB值,或YUV中的Y,或Lab中的L,本申请并不具体限定,在此仅以灰度值为例进行示意。在实际执行时,视频编码装置可统计重构数据 某一位置的灰度值I对应第一HDR数据中对应位置的像素点的灰度值的统计直方图His[i]以及灰度值的平均值avg[i]和方差var[i],在实际应用中,重构数据和第一HDR数据对应位置的图像元素是相同的,仅像素或DR不同,如图3所示,重构数据和第一HDR数据的在位置A对应的图像元素均包括数字1,在计算时,可确定位置A对应的灰度值的平均值也即第一平均值。例如灰度值I在重构数据出现在位置1、2、3、4、5、6、7等7个位置,则查找第一HDR数据(或第一HDR数据的某个图像块)在位置1、2、3、4、5、6、7处的灰度值1、灰度值2……、灰度值7,则第一HDR数据(或第一HDR数据的某个图像块)对应灰度值I的灰度值的平均值就是(灰度值1+灰度值2+……+灰度值7)/7。图3中通过阴影示意第一HDR数据,无阴影示意SDR数据。
此外,若各个位置计算的方差小于总的方差(也即整帧图像的方差),且各个位置计算的方差大于第一预设值,视频编码装置可将重构数据和第一HDR数据对应的图像分成多个图像块,分别各个图像块的统计直方图subHis[i]以及灰度值的平均值subAvg[i]和方差subVar[i]。其中,第一预设值的大小可根据实际应用的需求设置,本申请在此不作具体限定,如:考虑到SDR数据的位宽为8bit,目标残差应限制在8bit,第一预设值为128。
例如,重构数据分成4*4个图像块,那么第一HDR数据也要分成4*4个图像块,且两个数据对应图像块的大小是相同的,如图4所示,重构数据对应的图像被分成4个图像块,第一HDR数据对应的图像也被分成4个图像块,且重构数据的图像块1和第一HDR数据的图像块1中的图像元素是相同的。在实际应用时,图像块也可以不均匀分配,也即重构数据的图像块1可与其他重构数据的图像块大小不同,只要保证重构数据的图像块1与第一HDR数据的图像块1的大小相同,且图像元素相同即可。
在实际应用时,可根据avg[i]或subAvg[i]获取局部的灰度/颜色映射关系;之后根据预设规则对于局部的灰度/颜色映射关系进行处理,得到近似全局的灰度/颜色映射关系也即对应关系。其中预设规则可以为针对局部的映射关系进行加权计算确定对应关系,也可以其他方法,本申请在此不作具体限定。例如,预设规则为将局部直方图和全局直方图的差异值为权重,对于局部的灰度/颜色映射值进行加权得到全局的灰度/颜色映射值。此外,灰度/颜色映射关系可通过任意曲线或矩阵参数指示,本申请在此不具体限定。
步骤203,视频编码装置确定第二HDR数据与第一HDR数据的目标残差值;目标残差值的位宽小于或等于第一位宽;第一位宽为第一SDR视频编码成第一SDR码流采用的数据位宽。
需要说明的是,HDR数据和SDR数据对应的数据位宽的大小通常是不同的,如,HDR数据对应的数据位宽为10bit,SDR数据对应的数据位宽为8bit。视频编码装置可根据相减运算、归一化运算等将第一HDR数据和第二HDR数据的目标残差值转化为满足第一SDR码流传输需求的数据位宽,基于上述SDR数据对应的数据位宽为8bit,那么目标残差值的数据位宽也为8bit或者小于8bit。
在一种可选的实施例中,视频编码装置可将第二HDR数据与第一HDR数据相减,确定初始残差值;根据初始残差值的取值范围的分布确定残差映射方式以及钳位方式;根据残差映射方式以及钳位方式将初始残差值映射成位宽小于或等于第一位宽的目标残差值。
需要说明的是,上述初始残差值,是将第二HDR数据和第一HDR数据的相同位置的灰度值,或者RGB值,或者YUV值相减得到的。相减后的值大小可能是不同的,可对初始残差值进行统计分析,得到直方图,通过直方图展示初始残差值的取值范围的分布,在 实际应用时,也可通过对不提供初始残差值进行描点获取曲线图来展示初始残差值的取值范围的分布,本申请在此不具体限定展示初始残差值的取值范围的分布的方式。
此外,在将初始残差值转换为目标残差值时,中间计算过程中某些误差较大的值可能会影响计算结果,可通过钳位方式去除误差较大的初始残差值在计算时带来的影响。之后,视频编码装置可根据初始残差值的取值范围的分布确定的残差映射方式以及钳位方式将初始残差值映射成目标残差值。
在一种可选的实施例中,视频编码装置可根据初始残差值的取值确定直方图;确定直方图中心位置对应的残差值的取值;根据直方图中心位置对应的残差值的取值、第一位宽确定第一取值范围;根据初始残差值的取值范围的分布,确定位于第一取值范围的初始残差的目标比例值;将位于第一取值范围的初始残差进行残差映射,不位于第一取值范围的初始残差进行钳位处理。
需要说明的是,视频编码装置确定初始残差值取值范围的分布情况后,可根据第一位宽的取值,确定第一取值范围,该第一取值范围内的初始残差值可以映射为小于或等于第一位宽的目标残差值。在实际执行时,可参照如下流程:
A、统计初始残差值的直方图。
B、确定直方图的中心位置对应的残差值的取值Y。
C、确定第一取值范围。通过中心位置的残差值Y向残差值小于Y的方向找到一个临界值Ylow,向残差值大于Y的方向找到另一个临界值Yhigh,两个临界值之间的初始残差值可映射为目标残差值,两个临界值可以界定为第一取值范围。在确定第一取值范围是可通过将取值Y减去或者加上第一位宽的移位值来确定,例如,第一位宽为8bit,对应2 8(0~255),1左移8减去1位后,得到128,也即第一取值范围的一个临界值为Y-128,相应地另一临界值为Y+128-1。
D、确定落在第一取值范围内的初始残差的比例值。如,确定落在第一取值范围内的初始残差值的比例为99%,可确定直方图1%对应的初始残差值是否在第一取值范围内,若在,确定直方图100%对应的初始残差中是否在第一取值范围内,那么可将1%~100%的初始残差进映射成目标残差值。也可以在确定比例值为99%在残值Y之前选择A%处对应的初始残差值,在残差值A之后选择B%处对应的初始残差值,A%到B%等于99%即可,如,A%为0%,B%为99%;A%为0.5%,B为99.5%等,其中,A%处对应的初始残差值和B%处对应的初始残差值均在第一取值范围内,本申请在此不具体限定。
E、将第一取值范围内的初始残差值映射成目标残差值。
在一种可选的实施例中,视频编码装置可根据目标比例值以及直方图中心位置对应的残差值的取值,确定第一残差值和第二残差值(可以理解为上述的两个临界值);将位于第一残差值和第二残差值之间的初始残差值映射成目标残差值,将不位于第一残差值和第二残差值之间的初始残差值钳位处理成预设值。
其中,第一残差值小于直方图中心位置对应的残差值;第二残值大于直方图中心位置对应的残差值;第一残差值至少为1个;第二残差值至少为1个;第一残差值与直方图中心位置对应的残差值对应第一比例值;第二残差值与直方图中心位置对应的残差值对应第二比例值;第一比例值与第二比例值的和为目标比例值。接下来通过具体示例来说明,若第一残差值为2个,那么第二残差值也为2个,第一残差值分别为Ylow、Ylow1,第二残差值分别为Yhigh、Yhigh1。假定目标比例值为98%,那么Ylow1可以选择直方图分布 K%的位置,如1%;Yhigh1可以选择直方图分布N%的位置,如99%。若目标比例值大于90%,Ylow可以选择直方图分布L%的位置,如5%;Yhigh可以选择直方图分布M%的位置,如95%。
在进行残差映射时,可参照如下方法:
方法一:
将位于(Ylow,Yhigh)之间的初始残差值等于原值+(1<<(Bitdepth-1))-Y;位于(Ylow1,Ylow)之间的残差映射到(0,Ylow+(1<<(Bitdepth-1))-Y);位于(Yhigh,Yhigh1)之间的残差映射到(Yhigh+(1<<(Bitdepth-1))-Y),(1<<Bitdepth)-1);小于Ylow1的钳位到0,大于Yhigh1的钳位到(1<<Bitdepth)-1。
方法二:
将位于(Y-(1<<(Bitdepth-1)),Y+(1<<(Bitdepth-1))-1)之间的残差等于原值+(1<<(Bitdepth-1))-Y;小于Y-(1<<(Bitdepth-1))的残差钳位到0;大于Y+(1<<(Bitdepth-1))-1的残差,钳位到(1<<Bitdepth)-1。
其中,上述Bitdepth指示第一位宽的值,如第一位宽为8bit,对应的Bitdepth为8,Y的值为0,Ylow为-100,Yhigh为90,在采用方法一时,可将(Ylow,Yhigh)之间的初始残差值如90,在进行映射时,可将90+(1<<(Bitdepth-1))-0,确定218(90+128-0)为90映射的目标残差值;可将(Ylow,Yhigh)之间的初始残差值如-100,在进行映射时,可将-100+(1<<(Bitdepth-1))-0,确定28(-100+128-0)为-100映射的目标残差值。如Ylow1为-300,将(Ylow,Ylow1)之间的初始残差值如(-300,-100)映射成(0,28),可将(Yhigh,Yhigh1)之间的初始残差值如(90,400)映射成(218,255),小于Ylow1的钳位到0,大于Yhigh1的钳位到255。
在采用方法二时,可将位于(Y-128,Y+127)之间的初始残差值直接加上128-Y得到目标残差值,可将小于Y-128的初始残差值直接钳位到0,将大于Y+127的初始残差值直接钳位到255。
需要说明的是,目前高位宽的编码并不被所有编解码标准支持,如JPEG只支持8bit,目标残差和SDR都是8bit可以保证视频编码装置和视频解码装置可使用同一级别的编解码器,通常帧级切换硬件编码器或者硬件解码器复杂度比较高,设备处理能力要求高,通过将目标残差值调整为小于或等于SDR码流编码时的位宽,可避免编码和解码端在帧级切换硬件编码器或者硬件解码器。
步骤204,视频编码装置将对应关系以及目标残差值进行编码处理,确定预设数据。
需要说明的是,预设数据可以理解为用户自定义数据,视频解码装置获取预设数据后可在码流解码时,将SDR数据转换成HDR数据。
步骤205,视频编码装置传输添加预设数据的第一SDR码流。相应地,视频解码装置会接收第一SDR码流。
步骤206,视频解码装置根据对应关系将第一SDR码流的重构数据映射成第二HDR数据。
步骤207,视频解码装置根据目标残差值和第二HDR数据,确定第一HDR数据。
在一种可选的实施例中,预设数据还包括:残差映射方式以及钳位方式;视频解码装置可根据残差映射方式、钳位方式、目标残差值以及第一位宽,确定第一残差值和第二残差值;根据第一残差值、第二残差值以及钳位方式确定初始残差值;初始残差值的位宽大 于或等于第一位宽;根据初始残差值以及第二HDR数据,确定第一HDR数据。
在具体执行时,可参照如下方法将目标残差值恢复成初始残差值,也即上述视频编码装置残差映射的逆运算:
方法一:
将位于(0,Ylow+(1<<(Bitdepth-1))-Y)的残差值映射到(Ylow1,Ylow)之间;位于(Yhigh+(1<<(Bitdepth-1))-Y),(1<<Bitdepth)-1)之间的残差映射到(Yhigh,Yhigh1)之间;位于(Ylow+(1<<(Bitdepth-1))-Y,Yhigh+(1<<(Bitdepth-1))-Y))之间的残差加上Y-(1<<(Bitdepth-1))。
方法二:
将所有目标残差值加上Y-(1<<(Bitdepth-1))。
其中,上述Bitdepth指示第一位宽的值,如第一位宽为8bit,对应的Bitdepth为8,Y的值为0,Ylow为-100,Yhigh为90,在采用方法一时,可将(0,28)之间的目标残差值映射到(-300,-100)之间,可将(90+128,255)之间的目标残差值映射到(90,400)之间,可将(-100+128,90+128)之间的目标残差值减去128确定初始残差值。
在采用方法二时,可将位于目标残差值加上Y-128得到初始残差值,也即位宽为10bit的初始位宽。
本申请通过使用预设数据和SDR码流实现了对于SDR视频解码设备和HDR视频解码设备的良好支持。对于SDR视频解码设备,码流为SDR码流,会显式识别为SDR码流,从而保证SDR的效果。对于HDR设备,预设数据和SDR码流均会被正确的识别和解码,从而保证了HDR的效果。
此外,如图5所示,为本申请还提供的一种图像处理装置,该装置可以为视频编码装置也可以为视频解码装置,本申请在此不具体限定,图像处理装置可包括输入输出单元501和处理单元502。
在图像处理装置为视频编码装置时,处理单元502,用于获取源数据,源数据包括针对同一视频数据的第一高动态范围HDR数据和第一标准动态范围SDR码流;以及根据第一SDR码流的重构数据与第一HDR数据对应关系,将第一SDR码流的重构数据映射成第二HDR数据;确定第二HDR数据与第一HDR数据的目标残差值;目标残差值的位宽小于或等于第一位宽;第一位宽为第一SDR视频编码成第一SDR码流采用的数据位宽;将对应关系以及目标残差值进行编码处理,确定预设数据;输入输出单元501,用于传输添加预设数据的第一SDR码流。
需要说明的是,源数据中的第一HDR数据可以为视频编码装置从与其通信连接的设备接收的,也可以为视频编码装置针对同一视频数据进行数据处理后得到的,本申请在此不作具体限定。通常视频数据较大,会占用大量的带宽资源,将视频数据编码后得到视频码流,传输视频码流不会占用大量的带宽资源,还可以保证数据的传输效率,因此视频编码装置不会直接传输视频数据,需要将视频数据进行编码后得到视频码流进行传输。此外,视频编码装置通常会获取HDR数据和SDR数据,对SDR数据编码处理可以得到SDR码流(也即第一SDR码流)。通常视频编码时,将视频数据转换成视频码流,需要符合设备或视频数据的数据位宽要求。数据位宽越大,视频码流展示的视频数据DR越高,图像的像素越高,数据位宽越小,视频码流展示的视频数据DR越低,图像的像素越低。通常SDR数据经过编码处理的到SDR码流采用的数据位宽为8bit,HDR数据经过编码处理的到HDR 码流采用的数据位宽为10bit、12bit。此外,本申请不对SDR数据采用的编码算法进行限制,可以是MPEG1、MPEG2、MPEG4、H.263、H.264、H.265、JPEG等任意编解码算法。
上述的重构数据为对第一SDR码流进行解码得到的SDR数据,将重构数据与第一HDR数据进行比对,确定重构数据与第一HDR数据的对应关系,在实际应用时,可通过比对视频图像的灰度值、RGB值或YUV值来确定对应关系,本申请在此不具体限定。
需要说明的是,HDR数据和SDR数据对应的数据位宽的大小通常是不同的,如,HDR数据对应的数据位宽为10bit,SDR数据对应的数据位宽为8bit。视频编码装置可根据相减运算、归一化运算等将第一HDR数据和第二HDR数据的目标残差值转化为满足第一SDR码流传输需求的数据位宽,基于上述SDR数据对应的数据位宽为8bit,那么目标残差值的数据位宽也为8bit或者小于8bit。
本申请通过使用预设数据和SDR码流实现了对于SDR视频解码设备和HDR视频解码设备的良好支持。对于SDR视频解码设备,码流为SDR码流,会显式识别为SDR码流,从而保证SDR的效果。对于HDR设备,预设数据和SDR码流均会被正确的识别和解码,从而保证了HDR的效果。需要说明的是,目前高位宽的编码并不被所有编解码标准支持,如JPEG只支持8bit,目标残差和SDR都是8bit可以保证视频编码装置和视频解码装置可使用同一级别的编解码器,通常帧级切换硬件编码器或者硬件解码器复杂度比较高,设备处理能力要求高,通过将目标残差值调整为小于或等于SDR码流编码时的位宽,可避免编码和解码端在帧级切换硬件编码器或者硬件解码器。
在一种可选的方式中,对应关系可通过如下方式确定:
确定重构数据与第一HDR数据的第一平均值;第一平均值为根据重构数据与第一HDR数据的第一位置的像素点的预设参数确定;将重构数据与第一HDR数据分成多个图像块;图像块的个数和位置相同;确定重构数据与第一HDR数据的各图像块对应的第二平均值;根据第一平均值或第二平均值确定对应关系。通过该方式确定的对应关系,准确度更高,确定的第二HDR数据更加可靠。
在一种可选的方式中,预设参数为灰度值,或RGB值,或YUV值。
在一种可选的方式中,处理单元502,具体用于:
将第二HDR数据与第一HDR数据相减,确定初始残差值;根据初始残差值的取值范围的分布确定残差映射方式以及钳位方式;根据残差映射方式以及钳位方式将初始残差值映射成位宽小于或等于第一位宽的目标残差值。
需要说明的是,上述初始残差值,是将第二HDR数据和第一HDR数据的相同位置的灰度值,或者RGB值,或者YUV值相减得到的。相减后的值大小可能是不同的,可对初始残差值进行统计分析,得到直方图,通过直方图展示初始残差值的取值范围的分布,在实际应用时,也可通过对不提供初始残差值进行描点获取曲线图来展示初始残差值的取值范围的分布,本申请在此不具体限定展示初始残差值的取值范围的分布的方式。
此外,在将初始残差值转换为目标残差值时,中间计算过程中某些误差较大的值可能会影响计算结果,可通过钳位方式去除误差较大的初始残差值在计算时带来的影响。之后,视频编码装置可根据初始残差值的取值范围的分布确定的残差映射方式以及钳位方式将初始残差值映射成目标残差值。
在一种可选的方式中,处理单元502,具体用于:
根据初始残差值的取值确定直方图;确定直方图中心位置对应的残差值的取值;根据 直方图中心位置对应的残差值的取值、第一位宽确定第一取值范围;根据初始残差值的取值范围的分布,确定位于第一取值范围的初始残差的目标比例值;将位于第一取值范围的初始残差进行残差映射,不位于第一取值范围的初始残差进行钳位处理。
需要说明的是,视频编码装置确定初始残差值取值范围的分布情况后,可根据第一位宽的取值,确定第一取值范围,该第一取值范围内的初始残差值可以映射为小于或等于第一位宽的目标残差值。
在一种可选的方式中,处理单元502,具体用于:
根据目标比例值以及直方图中心位置对应的残差值的取值,确定第一残差值和第二残差值;第一残差值小于直方图中心位置对应的残差值;第二残值大于直方图中心位置对应的残差值;第一残差值至少为1个;第二残差值至少为1个;第一残差值与直方图中心位置对应的残差值对应第一比例值;第二残差值与直方图中心位置对应的残差值对应第二比例值;第一比例值与第二比例值的和为目标比例值;将位于第一残差值和第二残差值之间的初始残差值映射成目标残差值,将不位于第一残差值和第二残差值之间的初始残差值钳位处理成预设值。
其中,第一残差值小于直方图中心位置对应的残差值;第二残值大于直方图中心位置对应的残差值;第一残差值至少为1个;第二残差值至少为1个;第一残差值与直方图中心位置对应的残差值对应第一比例值;第二残差值与直方图中心位置对应的残差值对应第二比例值;第一比例值与第二比例值的和为目标比例值。
需要说明的是,目前高位宽的编码并不被所有编解码标准支持,如JPEG只支持8bit,目标残差和SDR都是8bit可以保证视频编码装置和视频解码装置可使用同一级别的编解码器,通常帧级切换硬件编码器或者硬件解码器复杂度比较高,设备处理能力要求高,通过将目标残差值调整为小于或等于SDR码流编码时的位宽,可避免编码和解码端在帧级切换硬件编码器或者硬件解码器。
在图像处理装置为视频解码装置时,输入输出单元501,可用于接收第一SDR码流;第一SDR码流中包括预设数据;预设数据是通过对应关系和目标残差值编码处理得到的;处理单元502,可用于根据对应关系将第一SDR码流的重构数据映射成第二HDR数据;根据目标残差值和第二HDR数据,确定第一HDR数据。
在一种可选的方式中,预设数据还包括:残差映射方式以及钳位方式。
在一种可选的方式中,处理单元502,具体用于:根据残差映射方式、钳位方式、目标残差值以及第一位宽,确定第一残差值和第二残差值;根据第一残差值、第二残差值以及钳位方式确定初始残差值;初始残差值的位宽大于或等于第一位宽;根据初始残差值以及第二HDR数据,确定第一HDR数据。
此外,如图6所示,为本申请还提供的一种图像处理装置600。示例性地,图像处理装置600可以是芯片或芯片系统。可选的,在本申请实施例中芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
图像处理装置600可以包括至少一个处理器610,图像处理装置600还可以包括至少一个存储器620,用于存储计算机程序、程序指令和/或数据。存储器620和处理器610耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理器610可能和存储器620协同操作。处理器610可能执行存储器620中存储的计算机程序。可选的,所述至少一个 存储器620也可与处理器610集成在一起。
可选的,在实际应用中,图像处理装置600中可以包括收发器630也可不包括收发器630,图中以虚线框来示意,图像处理装置600可以通过收发器630和其它设备进行信息交互。收发器630可以是电路、总线、收发器或者其它任意可以用于进行信息交互的装置。
在一种可能的实施方式中,该图像处理装置600可以应用于前述的视频编码装置,也可以是前述的视频解码装置。存储器620保存实施上述任一实施例中的视频编码装置或视频解码装置的功能的必要计算机程序、程序指令和/或数据。所述处理器610可执行所述存储器620存储的计算机程序,完成上述任一实施例中的方法。
本申请实施例中不限定上述收发器630、处理器610以及存储器620之间的具体连接介质。本申请实施例在图6中以存储器620、处理器610以及收发器630之间通过总线连接,总线在图6中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。在本申请实施例中,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实施或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
在本申请实施例中,存储器可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实施存储功能的装置,用于存储计算机程序、程序指令和/或数据。
基于以上实施例,参见图7,本申请实施例还提供另一种图像处理装置700,包括:接口电路710和逻辑电路720;接口电路710,可以理解为输入输出接口,可用于执行与上述图5示意的输入输出单元或如图6示意的收发器同样的操作步骤,本申请在此不再赘述。逻辑电路720可用于运行所述代码指令以执行上述任一实施例中的方法,可以理解成上述图5中的处理单元或图6中的处理器,可以实现处理单元或处理器同样的功能,本申请在此不再赘述。
基于以上实施例,本申请实施例还提供一种可读存储介质,该可读存储介质存储有指令,当所述指令被执行时,使上述任一实施例中视频编码、解码方法执行的方法被实施。该可读存储介质可以包括:U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、紧凑型光盘只读储存器(compact disc read-only memory,CD-ROM)、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、装置(系统)、和计算机程序产品的流程图和/或 方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理装置的处理器以产生一个机器,使得通过计算机或其他可编程数据处理装置的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理装置以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理装置上,使得在计算机或其他可编程装置上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程装置上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。

Claims (21)

  1. 一种视频编码方法,其特征在于,包括:
    获取源数据,所述源数据包括针对同一视频数据的第一高动态范围HDR数据和第一标准动态范围SDR码流;
    根据所述第一SDR码流的重构数据与所述第一HDR数据对应关系,将所述第一SDR码流的重构数据映射成第二HDR数据;
    确定所述第二HDR数据与所述第一HDR数据的目标残差值,其中,所述目标残差值的位宽小于或等于第一位宽,所述第一位宽为第一SDR视频编码成所述第一SDR码流采用的数据位宽;
    将所述对应关系以及所述目标残差值进行编码处理,确定预设数据;
    传输添加所述预设数据的所述第一SDR码流。
  2. 根据权利要求1所述的方法,其特征在于,所述对应关系,通过如下方式确定:
    确定所述重构数据与所述第一HDR数据的第一平均值;所述第一平均值为根据所述重构数据与所述第一HDR数据的第一位置的像素点的预设参数确定;
    将所述重构数据与所述第一HDR数据分成多个图像块;所述图像块的个数和位置相同;
    确定所述重构数据与所述第一HDR数据的各图像块对应的第二平均值;
    根据所述第一平均值或所述第二平均值确定所述对应关系。
  3. 根据权利要求2所述的方法,其特征在于,所述预设参数为灰度值,或RGB值,或YUV值。
  4. 根据权利要求1-3中任一所述的方法,其特征在于,所述确定所述第二HDR数据与所述第一HDR数据的目标残差值,包括:
    将所述第二HDR数据与所述第一HDR数据相减,确定初始残差值;
    根据所述初始残差值的取值范围的分布确定残差映射方式以及钳位方式;
    根据所述残差映射方式以及所述钳位方式将所述初始残差值映射成位宽小于或等于所述第一位宽的目标残差值。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述初始残差值的取值范围的分布确定残差映射方式以及钳位方式,包括:
    根据所述初始残差值的取值确定直方图;
    确定所述直方图中心位置对应的残差值的取值;
    根据所述直方图中心位置对应的残差值的取值、所述第一位宽确定第一取值范围;
    根据所述初始残差值的取值范围的分布,确定位于所述第一取值范围的初始残差的目标比例值;
    将位于所述第一取值范围的初始残差进行残差映射,不位于所述第一取值范围的初始残差进行钳位处理。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述残差映射方式以及所述钳位方式将所述初始残差值映射成位宽小于或等于所述第一位宽的目标残差值,包括:
    根据所述目标比例值以及所述直方图中心位置对应的残差值的取值,确定第一残差值和第二残差值;所述第一残差值小于所述直方图中心位置对应的残差值;所述第二残值大 于所述直方图中心位置对应的残差值;所述第一残差值至少为1个;所述第二残差值至少为1个;所述第一残差值与所述直方图中心位置对应的残差值对应第一比例值;所述第二残差值与所述直方图中心位置对应的残差值对应第二比例值;所述第一比例值与所述第二比例值的和为所述目标比例值;
    将所述位于所述第一残差值和所述第二残差值之间的初始残差值映射成目标残差值,将不位于所述第一残差值和所述第二残差值之间的初始残差值钳位处理成预设值。
  7. 一种视频解码方法,其特征在于,包括:
    接收第一SDR码流;所述第一SDR码流中包括预设数据;所述预设数据是通过对应关系和目标残差值编码处理得到的;
    根据所述对应关系将所述第一SDR码流的重构数据映射成第二HDR数据;
    根据所述目标残差值和所述第二HDR数据,确定第一HDR数据。
  8. 根据权利要求7所述的方法,其特征在于,所述预设数据还包括:残差映射方式以及钳位方式。
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述目标残差值和所述第二HDR数据,确定第一HDR数据,包括:
    根据所述残差映射方式、所述钳位方式、所述目标残差值以及第一位宽,确定第一残差值和第二残差值;
    根据所述第一残差值、所述第二残差值以及所述钳位方式确定初始残差值;所述初始残差值的位宽大于或等于所述第一位宽;
    根据所述初始残差值以及所述第二HDR数据,确定所述第一HDR数据。
  10. 一种视频编码装置,其特征在于,包括:
    处理单元,用于获取源数据,所述源数据包括针对同一视频数据的第一高动态范围HDR数据和第一标准动态范围SDR码流;以及根据所述第一SDR码流的重构数据与所述第一HDR数据对应关系,将所述第一SDR码流的重构数据映射成第二HDR数据;确定所述第二HDR数据与所述第一HDR数据的目标残差值;所述目标残差值的位宽小于或等于第一位宽;所述第一位宽为第一SDR视频编码成所述第一SDR码流采用的数据位宽;将所述对应关系以及所述目标残差值进行编码处理,确定预设数据;
    输入输出单元,用于传输添加所述预设数据的所述第一SDR码流。
  11. 根据权利要求10所述的装置,其特征在于,所述对应关系,通过如下方式确定:
    确定所述重构数据与所述第一HDR数据的第一平均值;所述第一平均值为根据所述重构数据与所述第一HDR数据的第一位置的像素点的预设参数确定;
    将所述重构数据与所述第一HDR数据分成多个图像块;所述图像块的个数和位置相同;
    确定所述重构数据与所述第一HDR数据的各图像块对应的第二平均值;
    根据所述第一平均值或所述第二平均值确定所述对应关系。
  12. 根据权利要求11所述的装置,其特征在于,所述预设参数为灰度值,或RGB值,或YUV值。
  13. 根据权利要求10-12中任一所述的装置,其特征在于,所述处理单元,具体用于:
    将所述第二HDR数据与所述第一HDR数据相减,确定初始残差值;
    根据所述初始残差值的取值范围的分布确定残差映射方式以及钳位方式;
    根据所述残差映射方式以及所述钳位方式将所述初始残差值映射成位宽小于或等于所述第一位宽的目标残差值。
  14. 根据权利要求13所述的装置,其特征在于,所述处理单元,具体用于:
    根据所述初始残差值的取值确定直方图;
    确定所述直方图中心位置对应的残差值的取值;
    根据所述直方图中心位置对应的残差值的取值、所述第一位宽确定第一取值范围;
    根据所述初始残差值的取值范围的分布,确定位于所述第一取值范围的初始残差的目标比例值;
    将位于所述第一取值范围的初始残差进行残差映射,不位于所述第一取值范围的初始残差进行钳位处理。
  15. 根据权利要求14所述的装置,其特征在于,所述处理单元,具体用于:
    根据所述目标比例值以及所述直方图中心位置对应的残差值的取值,确定第一残差值和第二残差值;所述第一残差值小于所述直方图中心位置对应的残差值;所述第二残值大于所述直方图中心位置对应的残差值;所述第一残差值至少为1个;所述第二残差值至少为1个;所述第一残差值与所述直方图中心位置对应的残差值对应第一比例值;所述第二残差值与所述直方图中心位置对应的残差值对应第二比例值;所述第一比例值与所述第二比例值的和为所述目标比例值;
    将所述位于所述第一残差值和所述第二残差值之间的初始残差值映射成目标残差值,将不位于所述第一残差值和所述第二残差值之间的初始残差值钳位处理成预设值。
  16. 一种视频解码装置,其特征在于,包括:
    输入输出单元,用于接收第一SDR码流;所述第一SDR码流中包括预设数据;所述预设数据是通过对应关系和目标残差值编码处理得到的;
    处理单元,用于根据所述对应关系将所述第一SDR码流的重构数据映射成第二HDR数据;根据所述目标残差值和所述第二HDR数据,确定第一HDR数据。
  17. 根据权利要求16所述的装置,其特征在于,所述预设数据还包括:残差映射方式以及钳位方式。
  18. 根据权利要求16所述的装置,其特征在于,所述处理单元,具体用于:
    根据所述残差映射方式、所述钳位方式、所述目标残差值以及第一位宽,确定第一残差值和第二残差值;
    根据所述第一残差值、所述第二残差值以及所述钳位方式确定初始残差值;所述初始残差值的位宽大于或等于所述第一位宽;
    根据所述初始残差值以及所述第二HDR数据,确定所述第一HDR数据。
  19. 一种视频编码装置,其特征在于,包括:相互耦合的非易失性存储器和处理器,所述处理器调用存储在所述存储器中的程序代码以执行如权利要求1-6任一项所述的方法。
  20. 一种视频解码装置,其特征在于,包括:相互耦合的非易失性存储器和处理器,所述处理器调用存储在所述存储器中的程序代码以执行如权利要求7-9任一项所述的方法。
  21. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有程序代码,所述程序代码包括用于处理器执行如权利要求1-9任一项所述方法的指令。
PCT/CN2022/117938 2021-09-15 2022-09-08 一种视频编码、解码方法及装置 WO2023040753A1 (zh)

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)

* Cited by examiner, † Cited by third party
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 华为软件技术有限公司 视频编解码方法、解码器、编码器和相关设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
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