CN115442636A - Live video stream conversion method, device, equipment and storage medium - Google Patents

Live video stream conversion method, device, equipment and storage medium Download PDF

Info

Publication number
CN115442636A
CN115442636A CN202210850922.6A CN202210850922A CN115442636A CN 115442636 A CN115442636 A CN 115442636A CN 202210850922 A CN202210850922 A CN 202210850922A CN 115442636 A CN115442636 A CN 115442636A
Authority
CN
China
Prior art keywords
live video
image data
video image
video stream
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210850922.6A
Other languages
Chinese (zh)
Inventor
徐懿
巢娅
袁浩期
黄俊森
于和新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Boguan Information Technology Co Ltd
Original Assignee
Guangzhou Boguan Information Technology Co Ltd
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 Guangzhou Boguan Information Technology Co Ltd filed Critical Guangzhou Boguan Information Technology Co Ltd
Priority to CN202210850922.6A priority Critical patent/CN115442636A/en
Publication of CN115442636A publication Critical patent/CN115442636A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration
    • H04N21/4854End-user interface for client configuration for modifying image parameters, e.g. image brightness, contrast

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to the technical field of computers, and discloses a live video stream conversion method, a live video stream conversion device, live video stream conversion equipment and a storage medium, which are used for improving video conversion speed and conversion effect and eliminating chrominance distortion of video coding. The live video stream conversion method comprises the following steps: acquiring a standard dynamic range live video stream, and decoding the standard dynamic range live video stream to obtain decoded live video image data; performing image format conversion processing on the decoded live video image data to obtain converted live video image data; mapping the converted live video image data based on a preset lookup table to obtain processed live video image data; the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; and coding the processed live video image data through a preset coder to obtain a high dynamic range live video stream.

Description

Live video stream conversion method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a live video stream conversion method, a live video stream conversion device, live video stream conversion equipment and a storage medium.
Background
The high dynamic range HDR is a technology emerging in the field of images and videos in recent years, and aims to present more vivid and fine pictures. Compared with the standard dynamic range SDR format, HDR has deeper color depth, wider color range and higher brightness contrast, so that HDR can convey high dynamic pictures and show more details, thereby creating an immersive viewing experience. With the development of mobile device hardware technology, the audience scope of HDR video is gradually expanded. Currently, the HDR technology is mainly applied to playing of movie and television works, the support for HDR image quality in the live broadcast field is small, and the demands of viewers on live broadcast, especially on live broadcast of game events, for enhancing image quality and viewing experience are continuously increased. However, most live game pictures are in the SDR format, and how to expand the main game picture in the SDR format into the high dynamic HDR format, and provide the main game picture to viewers for watching after real-time efficient encoding and transmission is a key and difficult point therein.
In the prior art, methods for converting SDR into HDR can be classified into two categories, one of which is to use a conventional inverse tone mapping algorithm, that is, to establish a function model to perform global mapping or local mapping on an image. Comparing a typical linear scaling model, a power function model, and an inverse tone mapping operator TMO, etc. In consideration of local information characteristics of the image, the protection of high-frequency details is enhanced, and some methods add bilateral filtering to separate out a detail layer in the image on the basis of a basic inverse tone mapping model. Another category utilizes artificial intelligence models based on deep learning for automatic SDR to HDR conversion. However, when the existing conversion method is applied to the video stream in the HDR format, the problems of low video conversion speed, poor conversion effect and chrominance distortion caused by video coding exist.
Disclosure of Invention
The invention provides a live video stream conversion method, a live video stream conversion device, live video stream conversion equipment and a storage medium, which are used for improving video conversion speed and conversion effect and eliminating chrominance distortion of video coding.
In order to achieve the above object, a first aspect of the present invention provides a live video stream conversion method, including: acquiring a standard dynamic range live video stream, and decoding the standard dynamic range live video stream to obtain decoded live video image data; performing image format conversion processing on the decoded live video image data to obtain converted live video image data; mapping the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein, the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range; and coding the processed live video image data through a preset coder to obtain a high dynamic range live video stream.
In a possible implementation, the decoding the standard dynamic range live video stream to obtain decoded live video image data includes: acquiring a video coding format corresponding to the standard dynamic range live video stream; and inputting the standard dynamic range live video stream into a decoder corresponding to the video coding format for decoding to obtain decoded live video image data.
In a possible implementation manner, the performing, by the image format conversion process, on the decoded live video image data to obtain converted live video image data includes: carrying out linearization processing on the decoded live video image data to obtain linear live video image data; performing color space conversion on the linear live video image data to obtain converted RGB color space image data; and converting the converted RGB color space image data into a brightness linear space through a perception quantization mapping function to obtain converted live video image data.
In a possible implementation manner, the linearizing the decoded live video image data to obtain linear live video image data includes: determining a target linear conversion function according to a nonlinear conversion function corresponding to the standard dynamic range live video stream; and converting the pixel color value in the decoded live video image data according to the target linear conversion function to obtain linear live video image data.
In one possible embodiment, the color space converting the linear live video image data to obtain converted RGB color space image data includes: and converting the RGB pixel values in the linear live video image data from a first color space to a second color space according to a preset color gamut conversion algorithm to obtain converted RGB color space image data, wherein the first color space is BT.709 color space, and the second color space is BT.2020 color space.
In a feasible implementation manner, the mapping processing, performed on the converted live video image data based on a preset lookup table, to obtain processed live video image data includes: extracting the mapping relation of the at least one image parameter from the preset lookup table, wherein the image parameter comprises: one or more of brightness, hue and saturation; and mapping the RGB pixel values in the converted live video image data according to the mapping relation of the at least one image parameter to obtain the processed live video image data.
In a possible implementation manner, the encoding processing, performed by a preset encoder, on the processed live video image data to obtain a high dynamic range live video stream includes: inputting the processed live video image data to a preset encoder, and extracting a chrominance component and a luminance component from the processed live video image data through the encoder; wherein the encoder is a graphics processor-based high-efficiency video encoder, and the encoder includes a luminance quantization parameter, a chrominance quantization parameter, and a chrominance quantization offset parameter, the chrominance quantization offset parameter being used to adjust a balance relationship between the luminance quantization parameter and the chrominance quantization parameter; and performing video coding processing on the chrominance component and the luminance component based on the luminance quantization parameter, the chrominance quantization parameter and the chrominance quantization offset parameter, and outputting a high dynamic range live video stream.
In a feasible implementation manner, before the obtaining a standard dynamic range live video stream, and decoding the standard dynamic range live video stream to obtain decoded live video image data, the live video stream conversion method further includes: constructing the preset lookup table based on scene video image data in a live game scene; and acquiring a video coding rate, and optimally setting a chroma quantization offset parameter for a high-efficiency video coder based on a graphic processor according to the video coding rate to obtain the preset coder.
In a possible embodiment, the constructing the preset lookup table based on scene video image data in a live game scene includes: acquiring scene video image data from a live game scene, and performing image format conversion processing on the scene video image data to obtain image data in a high dynamic range format; and performing brightness contrast enhancement and color adjustment on the image data in the high dynamic range format through preset color matching software to obtain the preset lookup table.
A second aspect of the present invention provides a live video stream conversion apparatus, including: the decoding module is used for acquiring a standard dynamic range live video stream and decoding the standard dynamic range live video stream to obtain decoded live video image data; the conversion module is used for carrying out image format conversion processing on the decoded live video image data to obtain converted live video image data; the mapping module is used for mapping the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range; and the encoding module is used for encoding the processed live video image data through a preset encoder to obtain a high dynamic range live video stream.
In a possible implementation manner, the decoding module is specifically configured to: acquiring a video coding format corresponding to the standard dynamic range live video stream; and inputting the standard dynamic range live video stream into a decoder corresponding to the video coding format for decoding to obtain decoded live video image data.
In a possible implementation, the conversion module further includes: the processing unit is used for carrying out linearization processing on the decoded live video image data to obtain linear live video image data; the first conversion unit is used for carrying out color space conversion on the linear live video image data to obtain converted RGB color space image data; and the second conversion unit is used for converting the converted RGB color space image data into a brightness linear space through a perception quantization mapping function to obtain converted live video image data.
In a possible implementation, the processing unit is specifically configured to: determining a target linear conversion function according to a nonlinear conversion function corresponding to the standard dynamic range live video stream; and converting the pixel color value in the decoded live video image data according to the target linear conversion function to obtain linear live video image data.
In a possible implementation manner, the second conversion unit is specifically configured to: converting the RGB pixel values in the linear live video image data from a first color space to a second color space according to a preset color gamut conversion algorithm to obtain converted RGB color space image data, wherein the first color space is BT.709 color space, and the second color space is BT.2020 color space.
In a possible implementation manner, the mapping module is specifically configured to: extracting the mapping relation of the at least one image parameter from the preset lookup table, wherein the image parameter comprises: one or more of brightness, hue and saturation; and mapping the RGB pixel values in the converted live video image data according to the mapping relation of the at least one image parameter to obtain the processed live video image data.
In a possible implementation, the encoding module is specifically configured to: inputting the processed live video image data to a preset encoder, and extracting a chrominance component and a luminance component from the processed live video image data through the encoder; wherein the encoder is a graphics processor-based high-efficiency video encoder, and the encoder includes a luminance quantization parameter, a chrominance quantization parameter, and a chrominance quantization offset parameter, the chrominance quantization offset parameter being used to adjust a balance relationship between the luminance quantization parameter and the chrominance quantization parameter; and performing video coding processing on the chrominance component and the luminance component based on the luminance quantization parameter, the chrominance quantization parameter and the chrominance quantization offset parameter, and outputting a high dynamic range live video stream.
In a possible implementation, the live video stream conversion apparatus further includes: the construction module is used for constructing the preset lookup table based on scene video image data in a live game scene; and the setting module is used for acquiring the video coding rate, and optimally setting the chroma quantization offset parameter for the high-efficiency video encoder based on the graphic processor according to the video coding rate to obtain the preset encoder.
In a possible embodiment, the building module is specifically configured to: acquiring scene video image data from a live game scene, and performing image format conversion processing on the scene video image data to obtain image data in a high dynamic range format; and carrying out brightness contrast enhancement and color adjustment on the image data in the high dynamic range format through preset color matching software to obtain the preset lookup table.
A third aspect of the present invention provides a live video stream conversion apparatus, including: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor invokes the instructions in the memory to cause the live video stream conversion device to perform the live video stream conversion method described above.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the live video stream conversion method described above.
In the technical scheme provided by the invention, a standard dynamic range live video stream is obtained, and the standard dynamic range live video stream is decoded to obtain decoded live video image data; performing image format conversion processing on the decoded live video image data to obtain converted live video image data; mapping the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein, the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range; and coding the processed live video image data through a preset coder to obtain a high dynamic range live video stream. In the embodiment of the invention, the standard dynamic range live video stream is decoded and image format conversion is carried out to obtain converted live video image data, at least one image parameter in the converted live video image data is mapped from a first parameter range to a second parameter range based on a preset lookup table to obtain the processed live video image data, the processed live video image data is encoded by a preset encoder to obtain the high dynamic range live video stream, the video conversion speed and the conversion effect are improved by the dynamic range expansion of the lookup table, and the chroma distortion of video coding is eliminated by the preset encoder.
Drawings
Fig. 1 is a schematic diagram of an embodiment of a live video stream conversion method in an embodiment of the present invention;
fig. 2 is a schematic diagram of another embodiment of a live video stream conversion method in the embodiment of the present invention;
fig. 3 is a schematic diagram of an embodiment of a live video stream conversion apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another embodiment of a live video stream conversion apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of a live video stream conversion device in the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a live video stream conversion method, a live video stream conversion device, live video stream conversion equipment and a storage medium, which are used for improving the video conversion speed and the conversion effect and eliminating the chrominance distortion of video coding.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be implemented in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of an embodiment of the present invention is described below, and referring to fig. 1, an embodiment of a live video stream conversion method in an embodiment of the present invention includes:
101. and acquiring a standard dynamic range live video stream, and decoding the standard dynamic range live video stream to obtain decoded live video image data.
It should be noted that the standard dynamic range live video stream is from a real-time live scene, where the real-time live scene includes a game live scene, an e-commerce live scene, an education live scene, and the like. The original live video data corresponding to the real-time live scene needs to be compressed before network transmission, the compression process is called encoding, and the encoding formats are various, such as H264 and H265. And when the image operation is carried out on the standard dynamic range live video stream, the server decodes according to the coding format corresponding to the standard dynamic range live video stream. In some real-time instances, the server obtains a standard dynamic range live video stream from a real-time live scene; the method comprises the steps that a server obtains a video coding format corresponding to a standard dynamic range live video stream, specifically, the server extracts video type data from the standard dynamic range live video stream through a preset video coding format recognition model and performs format analysis on the video type data to obtain the video coding format, wherein the video type data comprise I frames, B frames, P frames, NALU type frames and the like; and the server inputs the standard dynamic range live video stream into a decoder corresponding to the video coding format for decoding to obtain decoded live video image data. For example, a standard dynamic range live video stream with a video encoding format of H264, and the server invokes an H264 decoder to decode the standard dynamic range live video stream.
In this embodiment, a live game scene is taken as an example for explanation. Before step 101, the server constructs a preset lookup table based on scene video image data in a live game scene; and the server acquires the video coding rate, and optimally sets chroma quantization offset parameters for the efficient video encoder based on the graphic processor according to the video coding rate to obtain a preset encoder. The setting formula of the chrominance quantization parameter is as follows:
Figure BDA0003753443460000071
wherein bitrate represents video coding rate, unit is megagram (M), and chroma quantization offsetThe parameters include a first chrominance quantization offset parameter qp _ cb _ offset and a second chrominance quantization offset parameter qp _ cr _ offset, which respectively represent C b Chrominance quantization offset value of channel and C r The chrominance quantization offset value of the channel. For example, the server sets qp _ cb _ offset and qp _ cr _ offset to be negative numbers, the specific offset value may be determined according to the video coding rate, and if the video coding rate is less than 10M, the server is set to be the minimum value of-12, so as to achieve the maximum offset protection.
Further, when the server executes the steps of acquiring a standard dynamic range live video stream, decoding the standard dynamic range live video stream and obtaining decoded live video image data, the server acquires scene video image data from a live game scene and performs image format conversion processing on the scene video image data to obtain image data in a high dynamic range format, wherein the scene video image data comprises day image data, night image data, fighting image data, lawn image data and the like; and the server performs brightness contrast enhancement and color adjustment on the image data in the high dynamic range format through preset color matching software to obtain a preset lookup table. It should be noted that, in the process of constructing the lookup table, the enhancement of the human eye feeling effect is taken as a color matching target, and the main adjustment standard includes enhancing the brightness difference between the highlight and the dark in the image data in the high dynamic range format to improve the brightness contrast, so that the brightness which exceeds the standard dynamic range can be improved without overexposure; the color saturation and hue corresponding to the image data in the high dynamic range format are adjusted to enhance the color expression, and the characteristics of high dynamic range and wide color gamut are fully utilized, so that the image has more impact and more vivid impression. In practical application, the purpose of enhancing the human eye feeling effect is achieved by adjusting parameters such as color temperature, hue, exposure, contrast, highlight, shadow, white, black, natural saturation and saturation, and a preset lookup table should be matched with the basic tone atmosphere of a live game and can be applied to most live game scenes.
It is to be understood that the execution subject of the present invention may be a live video stream conversion device, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
102. And carrying out image format conversion processing on the decoded live video image data to obtain converted live video image data.
Specifically, firstly, the server performs linearization processing on the decoded live video image data to obtain linear live video image data. The linearization processing method (i.e., the inverse of the nonlinear conversion function) applied by the server to the decoded live video image data depends on the nonlinear conversion function used when the standard dynamic range live video stream is generated, for example, if the standard dynamic range live video stream in the bt.1886 format is produced by using the nonlinear conversion function gamma2.4 or gamma2.2, or the standard dynamic range live video stream in other special formats is subjected to log conversion, etc., the corresponding linearization processing method is the inverse of gamma2.4, gamma2.2 or log conversion. Secondly, the server performs color space conversion on the linear live video image data to obtain converted RGB color space image data, namely, the linear live video image data is converted from a BT.709 color gamut corresponding to a standard dynamic range to a BT.2020 color gamut corresponding to a high dynamic range, and further, the server performs color space conversion and color correction processing on the linear live video image data through a preset color gamut conversion model to obtain converted RGB color space image data, wherein the preset color gamut conversion model is a color space conversion model trained in advance. And finally, the server converts the converted RGB color space image data into a brightness linear space to obtain converted live broadcast video image data, and further converts the converted RGB color space image data into the brightness linear space through an electric-optical transfer function of the perception quantizer to obtain the converted live broadcast video image data. The server may also perform color space conversion and luminance linear space conversion processing in other manners, which is not limited herein.
103. Mapping the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein, the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range.
The look-up table is called a color look-up table in the field of color matching, that is, for the RGB values of the input pixels, the output RGB values are obtained through the look-up table. The lookup table comprises a mapping relation of at least one image parameter, the lookup table comprises a one-dimensional lookup table, a two-dimensional lookup table and a three-dimensional lookup table, RGB data in the one-dimensional lookup table are mutually independent, and only linear contrast brightness adjustment of R, G and B channels can be influenced. The two-dimensional look-up table can control two image parameters of the color, namely saturation and brightness, linear scaling is carried out in a complete color space, and the mapping relation of the color is recorded through two-dimensional coordinates. Each color component of RGB output by the three-dimensional lookup table is related to three input components of R, G and B, the three-dimensional lookup table comprises mapping relations corresponding to three image parameters of brightness, hue and saturation, and different lookup tables can be selected according to business requirements in practical application scenes. It follows that the mapping is used to map image parameters (i.e. luminance, hue and/or saturation) from a first parameter range to a second parameter range, the second parameter range being larger than the first parameter range. That is, the server maps the luminance, hue, and/or saturation in the converted live video image data from a first parameter range to a second parameter range having a higher luminance range, a wider color gamut range, and a deeper bit depth than the first parameter range based on a preset lookup table. In the embodiment, a three-dimensional lookup table is taken as an example for explanation, the server performs brightness range expansion and color enhancement on the converted live video image data based on the mapping relationship in the three-dimensional lookup table to obtain the processed live video image data, and further, the server accelerates the rendering of the lookup table through a graphic processing unit GPU in practical application, so that the consumed time can be controlled within 1ms, and the video conversion speed and the conversion effect are improved.
104. And carrying out encoding processing on the processed live video image data through a preset encoder to obtain a high dynamic range live video stream.
It should be noted that, compared with the standard dynamic range live video stream, the combination of the luminance linear space and the bt.2020 color primaries makes the values of the chrominance components in the processed live video image data more closely gather near zero, which is easily lost in the quantization process, and at this time, the bit allocation is shifted from the chrominance components to the luminance components. If not enough bits are allocated for the chrominance components, chrominance distortion occurs, e.g., cyan and magenta in the white region. Therefore, the preset encoder is a high efficiency video encoder HEVC based on a GPU, and coding parameter optimization is introduced into the HEVC based on the GPU, namely, a server presets a chroma quantization offset parameter in the encoder, and a luminance component (Y channel) and a chroma component (C channel) are adjusted through the chroma quantization offset parameter b Channel and C r Channels), i.e., control C b Channel and C r The channel is assigned a lower chroma component value than the Y channel to reduce or eliminate chroma distortion of the video encoding.
In the embodiment of the invention, the standard dynamic range live video stream is decoded and image format conversion is carried out to obtain converted live video image data, at least one image parameter in the converted live video image data is mapped from a first parameter range to a second parameter range based on a preset lookup table to obtain the processed live video image data, the processed live video image data is encoded by a preset encoder to obtain the high dynamic range live video stream, the video conversion speed and the conversion effect are improved by the dynamic range expansion of the lookup table, and the chroma distortion of video coding is eliminated by the preset encoder.
Referring to fig. 2, another embodiment of a live video stream conversion method according to an embodiment of the present invention includes:
201. and acquiring a standard dynamic range live video stream, and decoding the standard dynamic range live video stream to obtain decoded live video image data.
The specific execution process of step 201 is similar to the specific execution process of step 101, and details are not described here again.
202. And carrying out linearization processing on the decoded live video image data to obtain linear live video image data.
That is, the server restores the pixel color values in the decoded live video image data to the true color values in the natural scene. It can be understood that the perception of brightness by the human visual system is nonlinear, and when a picture in a natural scene is recorded as a digital image by a camera, color values in the natural scene need to be converted into nonlinear color values for transmission, so that the precision of picture storage simulates the sensitivity of human eyes as much as possible, and more bandwidth is allocated to areas with higher sensitivity of human eyes. For example, assuming that the luminance range is 0 to 1, the human eye does not perceive a change of 0.95 to 0.950001, and a less-point space can be allocated to a section with higher luminance and a more space can be allocated to a region with lower luminance when storing a digital image. And the server carries out linearization processing on the decoded live video image data through the inverse transformation of the nonlinear conversion function corresponding to the standard dynamic range live video stream to obtain linear live video image data.
In some embodiments, the server determines a target linear transfer function (i.e., the inverse of the nonlinear transfer function) from a nonlinear transfer function corresponding to a standard dynamic range live video stream; and the server converts the pixel color values in the decoded live video image data according to a target linear conversion function to obtain linear live video image data. The target linear conversion function and the nonlinear conversion function have a one-to-one correspondence relationship. For example, if the nonlinear conversion function is gamma2.4 in the BT.1886 standard, the specific formula is
Figure BDA0003753443460000101
The target linear transfer function corresponds to a specific formula of
Figure BDA0003753443460000111
Wherein, C linear Representing normalized linear R, G, B values, C non-linear Representing normalized nonlinear R, G, B values representing pixel values of a point in the decoded live video image data.
203. And carrying out color space conversion on the linear live video image data to obtain the converted RGB color space image data.
It can be understood that the color space corresponding to the image format standard in the standard dynamic range live broadcast video stream is generally a bt.709 color gamut (i.e., a color space), while the color space corresponding to the image format standard in the high dynamic range live broadcast video stream belongs to a bt.2020 color gamut, and in order to meet the image format standard of the high dynamic range live broadcast video stream, the color space standard of the high dynamic range of the display terminal is matched.
In some embodiments, the server converts the RGB pixel values in the linear live video image data from a first color space to a second color space according to a preset color gamut conversion algorithm, so as to obtain converted RGB color space image data, where the first color space is a bt.709 color space, and the second color space is a bt.2020 color space. The preset color gamut conversion algorithm for converting the RGB values of the bt.709 color space into the bt.2020 color space is as follows:
Figure BDA0003753443460000112
wherein, C rgb709 Representing BT.709 color space, C rgb2020 Representing bt.2020 color space.
204. And converting the converted RGB color space image data into a brightness linear space through a perception quantization mapping function to obtain converted live video image data.
That is, the server maps the converted RGB color space image data to the perceptual quantization curve PQ space according to the high dynamic range HDR format standard. It will be appreciated that unlike the non-linear mapping function (e.g., perceptual quantization mapping function) corresponding to a standard dynamic range live video stream, the HDR format employed by the high dynamic range live video stream is adapted to a wider range of luminance non-linear mapping functions, different HDR formats are adapted to different non-linear mapping functions, and the HDR10 format standard requires the use of PQ conversion. Specifically, the server converts the converted RGB color space image data into a luminance linear space through a perceptual quantization mapping function, so as to obtain converted live video image data. Wherein the perceptual quantization mapping function is
Figure BDA0003753443460000113
Where x represents the normalized linear R, G, B pixel values, m 1 =2610/4096×1/4=0.1593017578125,m 2 =2523/4096×128=78.84375,c 1 =3424/4096=0.8359375=c 3 -c 2 +1,c 2 =2413/4096×32=18.8515625,c 3 =2392/4096 × 32=18.6875, and the perceptual quantization mapping function describes the response of the human eye to different luminance and spatial frequencies.
205. Mapping the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein, the lookup table comprises the mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range.
The preset lookup table LUT is equivalent to a discrete function, and the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is larger than the first parameter range, the second parameter range is used for indicating the color quantity represented by the RGB pixel value in the processed live video image data, and the first parameter range is used for indicating the color quantity represented by the RGB pixel value in the converted live video image data. In some embodiments, the server extracts a mapping relationship of at least one image parameter from a preset lookup table, where the image parameter includes: one or more of brightness, hue and saturation; and the server maps the RGB pixel values in the converted live video image data according to the mapping relation of at least one image parameter to obtain the processed live video image data. The server improves the video conversion speed and conversion effect through the dynamic range expansion of the lookup table.
206. And carrying out encoding processing on the processed live video image data through a preset encoder to obtain a high dynamic range live video stream.
The high dynamic range live video stream has the characteristics of high dynamic, wide color gamut, high frame rate, high bit width and high resolution. In some embodiments, the server inputs the processed live video image data to a preset encoder, and extracts a chrominance component and a luminance component from the processed live video image data through the encoder; the encoder is an efficient video encoder based on a graphic processor, and comprises a brightness quantization parameter, a chrominance quantization parameter and a chrominance quantization offset parameter, wherein the chrominance quantization offset parameter is used for adjusting the balance relation between the brightness quantization parameter and the chrominance quantization parameter; and the server carries out video coding processing on the chrominance component and the luminance component based on the luminance quantization parameter, the chrominance quantization parameter and the chrominance quantization offset parameter, and outputs a high-dynamic-range live video stream. For example, for a live video stream of a game with a fierce fighting picture and a complex scene, the corresponding video coding rate is highly distributed, and if only the average coding rate is increased, the bandwidth load is too high due to the reduction of the brightness quantization parameter, and the blocking probability is increased. To solve the problem of chroma distortion, the server passes pair C b Channel and C r The channels are respectively and independently provided with a large chroma quantization offset parameter, so that the chroma quantization parameter is still maintained at a normal level when the corresponding brightness quantization parameter of the Y channel is higher under the condition of limited video coding code rate, the problem that more serious chroma information loss can not occur in the quantization period is effectively solvedThe problem of chromatic distortion.
In the embodiment of the invention, the standard dynamic range live video stream is decoded and image format conversion is carried out to obtain converted live video image data, at least one image parameter in the converted live video image data is mapped from a first parameter range to a second parameter range based on a preset lookup table to obtain the processed live video image data, the processed live video image data is encoded by a preset encoder to obtain the high dynamic range live video stream, the video conversion speed and the conversion effect are improved by the dynamic range expansion of the lookup table, and the chroma distortion of video coding is eliminated by the preset encoder.
With reference to fig. 3, the method for converting a live video stream in the embodiment of the present invention is described above, and a live video stream conversion device in the embodiment of the present invention is described below, where an embodiment of the live video stream conversion device in the embodiment of the present invention includes:
the decoding module 301 is configured to obtain a standard dynamic range live video stream, and decode the standard dynamic range live video stream to obtain decoded live video image data;
a conversion module 302, configured to perform image format conversion processing on the decoded live video image data to obtain converted live video image data;
a mapping module 303, configured to perform mapping processing on the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range;
and the encoding module 304 is configured to perform encoding processing on the processed live video image data through a preset encoder to obtain a high dynamic range live video stream.
In the embodiment of the invention, the standard dynamic range live video stream is decoded and image format conversion is carried out to obtain converted live video image data, at least one image parameter in the converted live video image data is mapped from a first parameter range to a second parameter range based on a preset lookup table to obtain the processed live video image data, the processed live video image data is encoded by a preset encoder to obtain the high dynamic range live video stream, the video conversion speed and the conversion effect are improved by the dynamic range expansion of the lookup table, and the chroma distortion of video coding is eliminated by the preset encoder.
Referring to fig. 4, another embodiment of a live video stream conversion apparatus according to the embodiment of the present invention includes:
the decoding module 301 is configured to obtain a standard dynamic range live video stream, and decode the standard dynamic range live video stream to obtain decoded live video image data;
a conversion module 302, configured to perform image format conversion processing on the decoded live video image data to obtain converted live video image data;
a mapping module 303, configured to perform mapping processing on the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range;
and the encoding module 304 is configured to perform encoding processing on the processed live video image data through a preset encoder to obtain a live video stream with a high dynamic range.
In a possible implementation manner, the decoding module 301 is specifically configured to:
acquiring a video coding format corresponding to the standard dynamic range live video stream;
and inputting the standard dynamic range live video stream into a decoder corresponding to the video coding format for decoding to obtain decoded live video image data.
In a possible implementation, the conversion module 302 further includes:
a processing unit 3021, configured to perform linearization processing on the decoded live video image data to obtain linear live video image data;
a first conversion unit 3022, configured to perform color space conversion on the linear live video image data to obtain RGB color space image data after conversion;
a second converting unit 3023, configured to convert the converted RGB color space image data into a luminance linear space through a perceptual quantization mapping function, so as to obtain converted live video image data.
In a possible implementation, the processing unit 3021 is specifically configured to:
determining a target linear conversion function according to a nonlinear conversion function corresponding to the standard dynamic range live video stream;
and converting the pixel color value in the decoded live video image data according to the target linear conversion function to obtain linear live video image data.
In a possible implementation manner, the second conversion unit 3022 is specifically configured to:
and converting the RGB pixel values in the linear live video image data from a first color space to a second color space according to a preset color gamut conversion algorithm to obtain converted RGB color space image data, wherein the first color space is BT.709 color space, and the second color space is BT.2020 color space.
In a possible implementation manner, the mapping module 303 is specifically configured to:
extracting the mapping relation of the at least one image parameter from the preset lookup table, wherein the image parameter comprises: one or more of brightness, hue and saturation;
and mapping the RGB pixel values in the converted live video image data according to the mapping relation of the at least one image parameter to obtain the processed live video image data.
In a possible implementation, the encoding module 304 is specifically configured to:
inputting the processed live video image data to a preset encoder, and extracting a chrominance component and a luminance component from the processed live video image data through the encoder; wherein the encoder is a graphics processor-based high-efficiency video encoder, and the encoder includes a luminance quantization parameter, a chrominance quantization parameter, and a chrominance quantization offset parameter, the chrominance quantization offset parameter being used to adjust a balance relationship between the luminance quantization parameter and the chrominance quantization parameter;
and performing video coding processing on the chrominance component and the luminance component based on the luminance quantization parameter, the chrominance quantization parameter and the chrominance quantization offset parameter, and outputting a high-dynamic-range live video stream.
In a possible implementation, the live video stream conversion apparatus further includes:
a building module 305, configured to build the preset lookup table based on scene video image data in a live game scene;
the setting module 306 is configured to obtain a video coding rate, and optimally set chroma quantization offset parameters for a graphics processor-based high-efficiency video encoder according to the video coding rate to obtain the preset encoder.
In a possible implementation, the building module 305 is specifically configured to:
acquiring scene video image data from a live game scene, and performing image format conversion processing on the scene video image data to obtain image data in a high dynamic range format;
and performing brightness contrast enhancement and color adjustment on the image data in the high dynamic range format through preset color matching software to obtain the preset lookup table.
In the embodiment of the invention, the standard dynamic range live video stream is decoded and image format conversion is carried out to obtain converted live video image data, at least one image parameter in the converted live video image data is mapped from a first parameter range to a second parameter range based on a preset lookup table to obtain the processed live video image data, the processed live video image data is encoded by a preset encoder to obtain the high dynamic range live video stream, the video conversion speed and the conversion effect are improved by the dynamic range expansion of the lookup table, and the chroma distortion of video coding is eliminated by the preset encoder.
Fig. 3 and fig. 4 describe the live video stream conversion device in the embodiment of the present invention in detail from the perspective of modularization, and the live video stream conversion device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 5 is a schematic structural diagram of a live video stream conversion apparatus according to an embodiment of the present invention, where the live video stream conversion apparatus 500 may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of computer program operations in the direct video stream conversion apparatus 500. Still further, the processor 510 may be arranged to communicate with the storage medium 530, execute a series of computer program operations in the storage medium 530 on the live video stream conversion apparatus 500, so as to cause the generation apparatus 500 of the library file to perform the steps of the live video stream conversion method, such as:
acquiring a standard dynamic range live video stream, and decoding the standard dynamic range live video stream to obtain decoded live video image data; performing image format conversion processing on the decoded live video image data to obtain converted live video image data; mapping the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range; and coding the processed live video image data through a preset coder to obtain a high dynamic range live video stream.
In the embodiment of the invention, the standard dynamic range live video stream is decoded and image format conversion is carried out to obtain converted live video image data, at least one image parameter in the converted live video image data is mapped from a first parameter range to a second parameter range based on a preset lookup table to obtain the processed live video image data, the processed live video image data is encoded by a preset encoder to obtain the high dynamic range live video stream, the video conversion speed and the conversion effect are improved by the dynamic range expansion of the lookup table, and the chroma distortion of video coding is eliminated by the preset encoder.
In a possible implementation, the decoding the standard dynamic range live video stream to obtain decoded live video image data includes: acquiring a video coding format corresponding to the standard dynamic range live video stream; and inputting the standard dynamic range live video stream into a decoder corresponding to the video coding format for decoding to obtain decoded live video image data.
In a possible implementation manner, the performing an image format conversion process on the decoded live video image data to obtain converted live video image data includes: carrying out linearization processing on the decoded live video image data to obtain linear live video image data; performing color space conversion on the linear live video image data to obtain converted RGB color space image data; and converting the converted RGB color space image data into a brightness linear space through a perception quantization mapping function to obtain converted live video image data.
In a possible implementation manner, the linearizing the decoded live video image data to obtain linear live video image data includes: determining a target linear conversion function according to a nonlinear conversion function corresponding to the standard dynamic range live video stream; and converting the pixel color value in the decoded live video image data according to the target linear conversion function to obtain linear live video image data.
In one possible embodiment, the color space converting the linear live video image data to obtain converted RGB color space image data includes: converting the RGB pixel values in the linear live video image data from a first color space to a second color space according to a preset color gamut conversion algorithm to obtain converted RGB color space image data, wherein the first color space is BT.709 color space, and the second color space is BT.2020 color space.
In a feasible implementation manner, the mapping processing, performed on the converted live video image data based on a preset lookup table, to obtain processed live video image data includes: extracting the mapping relation of the at least one image parameter from the preset lookup table, wherein the image parameter comprises: one or more of brightness, hue and saturation; and mapping the RGB pixel values in the converted live video image data according to the mapping relation of the at least one image parameter to obtain the processed live video image data.
In a possible implementation manner, the encoding processing, performed by a preset encoder, on the processed live video image data to obtain a high dynamic range live video stream includes: inputting the processed live video image data to a preset encoder, and extracting a chrominance component and a luminance component from the processed live video image data through the encoder; wherein the encoder is a graphics processor-based high-efficiency video encoder, and the encoder includes a luminance quantization parameter, a chrominance quantization parameter, and a chrominance quantization offset parameter, the chrominance quantization offset parameter being used to adjust a balance relationship between the luminance quantization parameter and the chrominance quantization parameter; and performing video coding processing on the chrominance component and the luminance component based on the luminance quantization parameter, the chrominance quantization parameter and the chrominance quantization offset parameter, and outputting a high dynamic range live video stream.
In a possible implementation manner, before the obtaining a standard dynamic range live video stream, and decoding the standard dynamic range live video stream to obtain decoded live video image data, the live video stream conversion method further includes: constructing the preset lookup table based on scene video image data in a live game scene; and acquiring a video coding rate, and optimally setting a chroma quantization offset parameter for the efficient video encoder based on the graphics processor according to the video coding rate to obtain the preset encoder.
In a possible implementation manner, the constructing the preset lookup table based on scene video image data in a live game scene includes: acquiring scene video image data from a live game scene, and performing image format conversion processing on the scene video image data to obtain image data in a high dynamic range format; and carrying out brightness contrast enhancement and color adjustment on the image data in the high dynamic range format through preset color matching software to obtain the preset lookup table.
The live video stream conversion apparatus 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input-output interfaces 560, and/or one or more operating systems 531, such as Windows server, mac OS X, unix, linux, freeBSD, and the like. Those skilled in the art will appreciate that the live video stream conversion device configuration shown in fig. 5 does not constitute a limitation of the live video stream conversion device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and which may also be a volatile computer readable storage medium, having stored therein instructions that, when executed on a computer, cause the computer to perform the steps of the live video stream conversion method, such as:
acquiring a standard dynamic range live video stream, and decoding the standard dynamic range live video stream to obtain decoded live video image data; performing image format conversion processing on the decoded live video image data to obtain converted live video image data; mapping the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range; and coding the processed live video image data through a preset coder to obtain a high dynamic range live video stream.
In the embodiment of the invention, the standard dynamic range live video stream is decoded and image format conversion is carried out to obtain converted live video image data, at least one image parameter in the converted live video image data is mapped from a first parameter range to a second parameter range based on a preset lookup table to obtain the processed live video image data, the processed live video image data is encoded by a preset encoder to obtain the high dynamic range live video stream, the video conversion speed and the conversion effect are improved by the dynamic range expansion of the lookup table, and the chroma distortion of video coding is eliminated by the preset encoder.
In a possible implementation, the decoding the standard dynamic range live video stream to obtain decoded live video image data includes: acquiring a video coding format corresponding to the standard dynamic range live video stream; and inputting the standard dynamic range live video stream into a decoder corresponding to the video coding format for decoding to obtain decoded live video image data.
In a possible implementation manner, the performing an image format conversion process on the decoded live video image data to obtain converted live video image data includes: carrying out linearization processing on the decoded live video image data to obtain linear live video image data; performing color space conversion on the linear live video image data to obtain converted RGB color space image data; and converting the converted RGB color space image data into a brightness linear space through a perception quantization mapping function to obtain converted live video image data.
In a possible implementation manner, the linearizing the decoded live video image data to obtain linear live video image data includes: determining a target linear conversion function according to a nonlinear conversion function corresponding to the standard dynamic range live video stream; and converting the pixel color value in the decoded live video image data according to the target linear conversion function to obtain linear live video image data.
In one possible embodiment, the color space converting the linear live video image data to obtain converted RGB color space image data includes: converting the RGB pixel values in the linear live video image data from a first color space to a second color space according to a preset color gamut conversion algorithm to obtain converted RGB color space image data, wherein the first color space is BT.709 color space, and the second color space is BT.2020 color space.
In a feasible implementation manner, the mapping processing, performed on the converted live video image data based on a preset lookup table, to obtain processed live video image data includes: extracting the mapping relation of the at least one image parameter from the preset lookup table, wherein the image parameter comprises: one or more of brightness, hue and saturation; and mapping the RGB pixel values in the converted live video image data according to the mapping relation of the at least one image parameter to obtain the processed live video image data.
In a possible embodiment, the encoding processing, performed by a preset encoder, on the processed live video image data to obtain a high dynamic range live video stream includes: inputting the processed live video image data to a preset encoder, and extracting a chrominance component and a luminance component from the processed live video image data through the encoder; wherein the encoder is a graphics processor-based high-efficiency video encoder, and the encoder includes a luminance quantization parameter, a chrominance quantization parameter, and a chrominance quantization offset parameter, the chrominance quantization offset parameter being used to adjust a balance relationship between the luminance quantization parameter and the chrominance quantization parameter; and performing video coding processing on the chrominance component and the luminance component based on the luminance quantization parameter, the chrominance quantization parameter and the chrominance quantization offset parameter, and outputting a high dynamic range live video stream.
In a possible implementation manner, before the obtaining a standard dynamic range live video stream, and decoding the standard dynamic range live video stream to obtain decoded live video image data, the live video stream conversion method further includes: constructing the preset lookup table based on scene video image data in a live game scene; and acquiring a video coding rate, and optimally setting a chroma quantization offset parameter for the efficient video encoder based on the graphics processor according to the video coding rate to obtain the preset encoder.
In a possible embodiment, the constructing the preset lookup table based on scene video image data in a live game scene includes: acquiring scene video image data from a live game scene, and performing image format conversion processing on the scene video image data to obtain image data in a high dynamic range format; and carrying out brightness contrast enhancement and color adjustment on the image data in the high dynamic range format through preset color matching software to obtain the preset lookup table.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a portable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. A live video stream conversion method is characterized by comprising the following steps:
acquiring a standard dynamic range live video stream, and decoding the standard dynamic range live video stream to obtain decoded live video image data;
performing image format conversion processing on the decoded live video image data to obtain converted live video image data;
mapping the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range;
and coding the processed live video image data through a preset coder to obtain a high dynamic range live video stream.
2. The live video stream conversion method of claim 1, wherein the decoding the standard dynamic range live video stream to obtain decoded live video image data comprises:
acquiring a video coding format corresponding to the standard dynamic range live video stream;
and inputting the standard dynamic range live video stream into a decoder corresponding to the video coding format for decoding to obtain decoded live video image data.
3. The live video stream conversion method according to claim 1, wherein the performing image format conversion processing on the decoded live video image data to obtain converted live video image data includes:
carrying out linearization processing on the decoded live video image data to obtain linear live video image data;
performing color space conversion on the linear live video image data to obtain converted RGB color space image data;
and converting the converted RGB color space image data into a brightness linear space through a perception quantization mapping function to obtain converted live video image data.
4. The live video stream conversion method according to claim 3, wherein the performing linearization processing on the decoded live video image data to obtain linear live video image data includes:
determining a target linear conversion function according to a nonlinear conversion function corresponding to the standard dynamic range live video stream;
and converting the pixel color value in the decoded live video image data according to the target linear conversion function to obtain linear live video image data.
5. The live video stream conversion method according to claim 3, wherein the performing color space conversion on the linear live video image data to obtain converted RGB color space image data includes:
and converting the RGB pixel values in the linear live video image data from a first color space to a second color space according to a preset color gamut conversion algorithm to obtain converted RGB color space image data, wherein the first color space is BT.709 color space, and the second color space is BT.2020 color space.
6. The live video stream conversion method according to claim 1, wherein the mapping processing is performed on the converted live video image data based on a preset lookup table to obtain processed live video image data, and the method comprises:
extracting the mapping relation of the at least one image parameter from the preset lookup table, wherein the image parameter comprises: one or more of brightness, hue and saturation;
and mapping the RGB pixel values in the converted live video image data according to the mapping relation of the at least one image parameter to obtain the processed live video image data.
7. The live video stream conversion method according to claim 1, wherein the step of encoding the processed live video image data by a preset encoder to obtain a high dynamic range live video stream includes:
inputting the processed live video image data to a preset encoder, and extracting a chrominance component and a luminance component from the processed live video image data through the encoder; wherein the encoder is a graphics processor-based high-efficiency video encoder, and the encoder includes a luminance quantization parameter, a chrominance quantization parameter, and a chrominance quantization offset parameter, the chrominance quantization offset parameter being used to adjust a balance relationship between the luminance quantization parameter and the chrominance quantization parameter;
and performing video coding processing on the chrominance component and the luminance component based on the luminance quantization parameter, the chrominance quantization parameter and the chrominance quantization offset parameter, and outputting a high dynamic range live video stream.
8. The live video stream conversion method according to any one of claims 1 to 7, wherein before the obtaining a standard dynamic range live video stream and decoding the standard dynamic range live video stream to obtain decoded live video image data, the live video stream conversion method further comprises:
constructing the preset lookup table based on scene video image data in a live game scene;
and acquiring a video coding rate, and optimally setting a chroma quantization offset parameter for a high-efficiency video coder based on a graphic processor according to the video coding rate to obtain the preset coder.
9. The live video stream conversion method of claim 8, wherein the constructing the preset lookup table based on scene video image data in a live game scene comprises:
acquiring scene video image data from a live game scene, and performing image format conversion processing on the scene video image data to obtain image data in a high dynamic range format;
and carrying out brightness contrast enhancement and color adjustment on the image data in the high dynamic range format through preset color matching software to obtain the preset lookup table.
10. A live video stream conversion apparatus, comprising:
the decoding module is used for acquiring a standard dynamic range live video stream and decoding the standard dynamic range live video stream to obtain decoded live video image data;
the conversion module is used for carrying out image format conversion processing on the decoded live video image data to obtain converted live video image data;
the mapping module is used for mapping the converted live video image data based on a preset lookup table to obtain processed live video image data; wherein the lookup table comprises a mapping relation of at least one image parameter; the mapping relation is used for mapping the image parameter from a first parameter range to a second parameter range; the second parameter range is greater than the first parameter range;
and the encoding module is used for encoding the processed live video image data through a preset encoder to obtain a high dynamic range live video stream.
11. A live video stream conversion apparatus, characterized in that the live video stream conversion apparatus comprises: a memory and at least one processor, the memory having a computer program stored therein;
the at least one processor invokes the computer program in the memory to cause the live video stream conversion device to perform the live video stream conversion method of any of claims 1-9.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a live video stream conversion method according to any one of claims 1 to 9.
CN202210850922.6A 2022-07-19 2022-07-19 Live video stream conversion method, device, equipment and storage medium Pending CN115442636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210850922.6A CN115442636A (en) 2022-07-19 2022-07-19 Live video stream conversion method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210850922.6A CN115442636A (en) 2022-07-19 2022-07-19 Live video stream conversion method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115442636A true CN115442636A (en) 2022-12-06

Family

ID=84240826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210850922.6A Pending CN115442636A (en) 2022-07-19 2022-07-19 Live video stream conversion method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115442636A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024159990A1 (en) * 2023-02-03 2024-08-08 华为技术有限公司 Transcoding method and apparatus, and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107154059A (en) * 2017-06-26 2017-09-12 杭州当虹科技有限公司 A kind of high dynamic range video processing method
CN108882028A (en) * 2018-07-05 2018-11-23 华为技术有限公司 The processing method and processing device of vision signal
US20190318448A1 (en) * 2018-04-17 2019-10-17 Grass Valley Canada System and method for mapped splicing of a three-dimensional look-up table for image format conversion
CN111918066A (en) * 2020-09-08 2020-11-10 北京字节跳动网络技术有限公司 Video encoding method, device, equipment and storage medium
CN113068034A (en) * 2021-03-25 2021-07-02 Oppo广东移动通信有限公司 Video encoding method and device, encoder, equipment and storage medium
CN113518185A (en) * 2020-12-30 2021-10-19 腾讯科技(深圳)有限公司 Video conversion processing method and device, computer readable medium and electronic equipment
CN114363702A (en) * 2021-12-28 2022-04-15 上海网达软件股份有限公司 Method, device and equipment for converting SDR video into HDR video and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107154059A (en) * 2017-06-26 2017-09-12 杭州当虹科技有限公司 A kind of high dynamic range video processing method
US20190318448A1 (en) * 2018-04-17 2019-10-17 Grass Valley Canada System and method for mapped splicing of a three-dimensional look-up table for image format conversion
CN108882028A (en) * 2018-07-05 2018-11-23 华为技术有限公司 The processing method and processing device of vision signal
CN111918066A (en) * 2020-09-08 2020-11-10 北京字节跳动网络技术有限公司 Video encoding method, device, equipment and storage medium
CN113518185A (en) * 2020-12-30 2021-10-19 腾讯科技(深圳)有限公司 Video conversion processing method and device, computer readable medium and electronic equipment
CN113068034A (en) * 2021-03-25 2021-07-02 Oppo广东移动通信有限公司 Video encoding method and device, encoder, equipment and storage medium
CN114363702A (en) * 2021-12-28 2022-04-15 上海网达软件股份有限公司 Method, device and equipment for converting SDR video into HDR video and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024159990A1 (en) * 2023-02-03 2024-08-08 华为技术有限公司 Transcoding method and apparatus, and electronic device

Similar Documents

Publication Publication Date Title
JP7114653B2 (en) Systems for Encoding High Dynamic Range and Wide Gamut Sequences
US11183143B2 (en) Transitioning between video priority and graphics priority
KR102488954B1 (en) Image processing device and image processing method thereof
JP6608067B2 (en) High dynamic range adaptive computation in video decoder
CN107211130B (en) Method and apparatus for encoding and decoding color picture
US10972759B2 (en) Color appearance preservation in video codecs
JP6694439B2 (en) Method and apparatus for encoding color mapping information and processing a picture based on the color mapping information
KR102176398B1 (en) A image processing device and a image processing method
KR102509504B1 (en) Coding and decoding methods and corresponding devices
KR102523233B1 (en) Method and device for decoding a color picture
EP3493150A1 (en) Tone mapping adaptation for saturation control
US20200296428A1 (en) A method and a device for encoding a high dynamic range picture, corresponding decoding method and decoding device
KR20120107429A (en) Zone-based tone mapping
WO2019092463A1 (en) Video image processing
US20090060324A1 (en) Image enhancement and compression
JP2018530031A (en) Method and device for tone mapping a picture using a parametric tone adjustment function
EP3453175B1 (en) Method and apparatus for encoding/decoding a high dynamic range picture into a coded bistream
TW201626801A (en) Video coding using a saliency map
CN115442636A (en) Live video stream conversion method, device, equipment and storage medium
WO2019203973A1 (en) Method and device for encoding an image or video with optimized compression efficiency preserving image or video fidelity
EP3026908A1 (en) Method and device for quantizing and de-quantizing a picture using scaling factors for chrominance based on luminance
CN114494051A (en) Image processing method and device, electronic equipment and readable storage medium
CN116167950B (en) Image processing method, device, electronic equipment and storage medium
Okuda et al. Raw image encoding based on polynomial approximation
JP2019004304A (en) Image encoding apparatus, image encoding method, and image encoding program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20221206