CN113542744A - Encoding method based on dynamic HDR scene switching - Google Patents
Encoding method based on dynamic HDR scene switching Download PDFInfo
- Publication number
- CN113542744A CN113542744A CN202110781643.4A CN202110781643A CN113542744A CN 113542744 A CN113542744 A CN 113542744A CN 202110781643 A CN202110781643 A CN 202110781643A CN 113542744 A CN113542744 A CN 113542744A
- Authority
- CN
- China
- Prior art keywords
- frame
- setting
- encoding
- image
- scene
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 230000009191 jumping Effects 0.000 claims description 3
- 241000023320 Luma <angiosperm> Species 0.000 claims 1
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical compound COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 claims 1
- 238000004364 calculation method Methods 0.000 description 7
- 238000004458 analytical method Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/142—Detection of scene cut or scene change
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses an encoding method based on dynamic HDR scene switching, which comprises the following steps: s1, initializing an encoder, setting a fixed maximum I frame interval keyMax, setting the distance of the last IDR frame as Ipos, setting the initial IDR frame as 0, and setting the IDR frame according to the maximum I frame interval under the condition that dynamic metadata does not intervene; s2, acquiring an encoding frame image, setting the encoding frame image as a frame to be encoded, judging whether the encoding frame image is an IDR frame or not according to the Ipos value, and setting the current frame as the IDR frame when the Ipos value is equal to 0; s3, acquiring dynamic HDR metadata information of a frame to be coded, and judging whether scene switching exists or not; s4, comparing the curve parameters with the previous frame, and comparing each curve parameter one by one; s5, if the curve parameter is not consistent with the previous frame, continuing to judge the image brightness statistical parameter, wherein the image brightness statistical parameter records the image brightness information of all frames in a scene, and the scene switching is considered to exist when the difference value exceeds a certain threshold value; s6, if a scene cut is detected, clearing the scene image brightness statistical parameter value.
Description
Technical Field
The invention belongs to the technical field of video coding and transcoding, and particularly relates to an encoding method based on dynamic HDR scene switching.
Background
In a Dynamic HDR (High-Dynamic Range, High Dynamic Range image) transcoding system, an image processing and Dynamic metadata extraction module and an encoding and compressing module of a general HDR are two independent modules, and work independently of each other. The conventional encoding and compressing module generally comprises an image pre-analysis stage and an encoding and compressing stage, wherein the image pre-analysis stage is generally used for judging frame types and scene switching so as to obtain better encoding quality. However, in the dynamic HDR encoding system, the HDR image preprocessing and dynamic metadata extraction module itself includes a scene switching process. The two modules run independently, and due to the fact that the algorithm and the logic for judging scene switching are different, the scene switching frame judged by coding and the scene judged by dynamic HDR analysis are not the same frame, the scene switching frame of the coding frame in the coding code stream and the scene switching of the HDR dynamic metadata are possibly not the same frame, and the decoding rendering processing efficiency at the rear end is affected. In addition, the switching calculation of the two scenes simultaneously and independently operates, and the whole coding efficiency is also influenced.
Disclosure of Invention
Aiming at the problems, the invention provides an encoding method based on dynamic HDR scene switching, which is used for realizing the consistency of the coded IDR frame and the dynamic HDR metadata scene switching, removing the original coding internal scene switching detection and calculation steps and saving repeated calculation.
In order to solve the technical problems, the invention adopts the following technical scheme:
an encoding method based on dynamic HDR scene switching comprises the following steps:
s1, initializing an encoder, setting a fixed maximum I frame interval keyMax, setting the distance of the last IDR frame as Ipos, setting the initial IDR frame as 0, and setting the IDR frame according to the maximum I frame interval under the condition that dynamic metadata does not intervene;
s2, acquiring an encoding frame image, setting the encoding frame image as a frame to be encoded, judging whether the encoding frame image is an IDR frame or not according to an Ipos value, setting a current frame as the IDR frame when Ipos is equal to 0, and setting Ipos as 0 when Ipos is larger than or equal to keyMax;
s3, acquiring dynamic HDR metadata information of a frame to be coded, and judging whether scene switching exists or not;
s4, comparing the curve parameters with the previous frame, and comparing each curve parameter one by one;
s5, if the curve parameter is not consistent with the previous frame, continuing to judge the image brightness statistical parameter, wherein the image brightness statistical parameter records the image brightness information of all frames in a scene, and the scene switching is considered to exist when the difference value exceeds a certain threshold value;
s6, if the scene switch is detected, clearing the scene image brightness statistic parameter value;
s7, recording the curve parameter and the brightness statistic parameter of the new frame;
s8, sending the metadata information, the frame type and the frame to be coded into the code, adding 1 to Ipos, jumping to S2 and continuously executing the steps circularly.
Preferably, the metadata information includes image luminance statistical data parameters, specifically including a minimum value among maximum values of RGB components, an average value among maximum values of RGB components, a variation range among maximum values of RGB components, and a maximum value among maximum values of RGB components.
Preferably, the metadata information comprises curve parameters, in particular base curve parameters, 3-th order spline parameters and color correction parameters.
Preferably, the above method is applied to an encoding apparatus of AVS2 format.
Preferably, the above method is applied to an encoding apparatus of AVS3 format.
Preferably, the above method is applied to an encoding device of H265 format.
Preferably, the above method is applied to an encoding apparatus of H264 format.
The invention has the following beneficial effects:
(1) according to the dynamic HDR calculation, the analysis and detection of image scenes are already carried out, an encoding end can carry out scene switching and IDR frame assignment by using the calculation result of the dynamic HDR, the setting of encoding IDR frames is carried out according to the calculation result of the dynamic HDR, the scene switching of dynamic metadata is on the IDR frames, the subsequent HDR non-encoding and decoding playing processing and the like are facilitated, and the next scene is quickly found.
(2) According to the characteristic of HDR Vivid dynamic metadata, whether curve parameters change or not can be judged firstly, then scene switching is detected according to the change amplitude of image statistical parameters, scene switching judgment is omitted by an encoding module, partial calculated amount is saved, and the overall utilization rate of equipment calculation resources is improved.
(3) The encoder removes the image characteristic pre-analysis process of the encoded frame data, presets the encoded frame type according to the fixed frame type and the fixed IDR length, and performs scene switching detection and frame type modification according to the dynamic metadata before the encoded frame data is sent.
Drawings
Fig. 1 is a flowchart illustrating steps of an encoding method based on dynamic HDR scene switching according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The related art terms appearing in the embodiments of the present invention are defined as follows:
the HDR Video is a dynamic HDR Video standard established by China Ultra HD Video Industry Alliance (CUVA Alliance).
The dynamic metadata is part 1 of the High Dynamic Range (HDR) video technology of CUVA005-2020 Standard of ultra high definition video industry alliance in China: metadata and Adaptation ″.
A video is generally composed of a plurality of scenes, a scene is composed of a plurality of video frames, and video scene detection refers to finding out the frame and frame position of a video where scene switching occurs.
An IDR (Instantaneous Decoding Refresh) frame is a special I-frame, and all frames following this frame will only refer to it, not to previous frames. In the encoder, upon receiving an IDR frame, the reference frame buffer is cleared and the IDR frame is used as a reference frame.
Referring to fig. 1, a flowchart illustrating steps of an encoding method based on dynamic HDR scene switching according to an embodiment of the present invention is shown, including the following steps:
s1, initializing an encoder, setting a fixed maximum I frame interval keyMax, setting the distance of the last IDR frame as Ipos, setting the initial IDR frame as 0, and setting the IDR frame according to the maximum I frame interval under the condition that dynamic metadata does not intervene;
s2, acquiring an encoding frame image, setting the encoding frame image as a frame to be encoded, judging whether the encoding frame image is an IDR frame or not according to an Ipos value, setting a current frame as the IDR frame when Ipos is equal to 0, and setting Ipos as 0 when Ipos is larger than or equal to keyMax;
s3, acquiring dynamic HDR metadata information of a frame to be coded, and judging whether scene switching exists or not;
s4, comparing the curve parameters with the previous frame, and comparing each curve parameter one by one;
s5, if the curve parameter is not consistent with the previous frame, continuing to judge the image brightness statistical parameter, wherein the image brightness statistical parameter records the image brightness information of all frames in a scene, and the scene switching is considered to exist when the difference value exceeds a certain threshold value; the image brightness information value range is 0-4096, and the difference value of the front and back sequences of the brightness information parameters at least meeting a certain parameter is more than 10%, namely the threshold value is set to be more than 400.
S6, if the scene switch is detected, clearing the scene image brightness statistic parameter value;
s7, recording the curve parameter and the brightness statistic parameter of the new frame;
s8, sending the metadata information, the frame type and the frame to be coded into the code, adding 1 to Ipos, jumping to S2 and continuously executing the steps circularly.
In a specific application example, the metadata information includes image luminance statistical data parameters, specifically including a minimum value among maximum values of RGB components, an average value among maximum values of RGB components, a variation range among maximum values of RGB components, and a maximum value among maximum values of RGB components.
In a specific application embodiment, the metadata information includes curve parameters, specifically, a base curve parameter, a 3-th-order spline parameter, and a color correction parameter.
For the above minimum value of the RGB component maximum values, the average value of the RGB component maximum values, the variation range of the RGB component maximum values, the maximum value of the RGB component maximum values, the base curve parameters, the 3-time spline parameters, and the color correction parameters, reference may be made to section 1 of the High Dynamic Range (HDR) video technology of CUVA 005-: metadata and Adaptation ″.
The method can be applied to encoding devices with AVS2, AVS3, H265, H264 and other formats, and realizes a dynamic HDR encoding device with dynamic metadata consistent with video code stream scene switching.
It is to be understood that the exemplary embodiments described herein are illustrative and not restrictive. Although one or more embodiments of the present invention have been described with reference to the accompanying drawings, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the following claims.
Claims (7)
1. An encoding method based on dynamic HDR scene switching is characterized by comprising the following steps:
s1, initializing an encoder, setting a fixed maximum I frame interval keyMax, setting the distance of the last IDR frame as Ipos, setting the initial IDR frame as 0, and setting the IDR frame according to the maximum I frame interval under the condition that dynamic metadata does not intervene;
s2, acquiring an encoding frame image, setting the encoding frame image as a frame to be encoded, judging whether the encoding frame image is an IDR frame or not according to an Ipos value, setting a current frame as the IDR frame when Ipos is equal to 0, and setting Ipos as 0 when Ipos is larger than or equal to keyMax;
s3, acquiring dynamic HDR metadata information of a frame to be coded, and judging whether scene switching exists or not;
s4, comparing the curve parameters with the previous frame, and comparing each curve parameter one by one;
s5, if the curve parameter is not consistent with the previous frame, continuing to judge the image brightness statistical parameter, wherein the image brightness statistical parameter records the image brightness information of all frames in a scene, and the scene switching is considered to exist when the difference value exceeds a certain threshold value;
s6, if the scene switch is detected, clearing the scene image brightness statistic parameter value;
s7, recording the curve parameter and the brightness statistic parameter of the new frame;
s8, sending the metadata information, the frame type and the frame to be coded into the code, adding 1 to Ipos, jumping to S2 and continuously executing the steps circularly.
2. The dynamic HDR scene cut based encoding method of claim 1, wherein the metadata information comprises image luma statistics parameters, in particular comprising minimum of RGB component maximum values, average of RGB component maximum values, variation range of RGB component maximum values and maximum of RGB component maximum values.
3. The dynamic HDR scene cut based encoding method of claim 1, wherein the metadata information comprises curve parameters, in particular base curve parameters, 3-th-order spline parameters and color correction parameters.
4. The dynamic HDR scene switching based encoding method as claimed in any one of claims 1 to 3, wherein the above method is applied to an AVS2 format encoding apparatus.
5. The dynamic HDR scene switching based encoding method as claimed in any one of claims 1 to 3, wherein the above method is applied to an AVS3 format encoding apparatus.
6. The dynamic HDR scene switching based encoding method as claimed in any one of claims 1 to 3, wherein the above method is applied to an H265 format encoding device.
7. The dynamic HDR scene switching based encoding method as claimed in any one of claims 1 to 3, wherein the above method is applied to an H264 format encoding device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110781643.4A CN113542744A (en) | 2021-07-09 | 2021-07-09 | Encoding method based on dynamic HDR scene switching |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110781643.4A CN113542744A (en) | 2021-07-09 | 2021-07-09 | Encoding method based on dynamic HDR scene switching |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113542744A true CN113542744A (en) | 2021-10-22 |
Family
ID=78098363
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110781643.4A Pending CN113542744A (en) | 2021-07-09 | 2021-07-09 | Encoding method based on dynamic HDR scene switching |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113542744A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1589770A2 (en) * | 2004-04-20 | 2005-10-26 | Kabushiki Kaisha Toshiba | Apparatus and method for decoding a moving picture sequence |
US20060215759A1 (en) * | 2005-03-23 | 2006-09-28 | Kabushiki Kaisha Toshiba | Moving picture encoding apparatus |
CN102630013A (en) * | 2012-04-01 | 2012-08-08 | 北京捷成世纪科技股份有限公司 | Bit rate control video compression method and device on basis of scene switching |
CN102883157A (en) * | 2011-07-12 | 2013-01-16 | 浙江大学 | Video coding method and video coder |
US20150358646A1 (en) * | 2013-02-21 | 2015-12-10 | Koninklijke Philips N.V. | Improved hdr image encoding and decoding methods and devices |
-
2021
- 2021-07-09 CN CN202110781643.4A patent/CN113542744A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1589770A2 (en) * | 2004-04-20 | 2005-10-26 | Kabushiki Kaisha Toshiba | Apparatus and method for decoding a moving picture sequence |
US20060215759A1 (en) * | 2005-03-23 | 2006-09-28 | Kabushiki Kaisha Toshiba | Moving picture encoding apparatus |
CN102883157A (en) * | 2011-07-12 | 2013-01-16 | 浙江大学 | Video coding method and video coder |
CN102630013A (en) * | 2012-04-01 | 2012-08-08 | 北京捷成世纪科技股份有限公司 | Bit rate control video compression method and device on basis of scene switching |
US20150358646A1 (en) * | 2013-02-21 | 2015-12-10 | Koninklijke Philips N.V. | Improved hdr image encoding and decoding methods and devices |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108322747B (en) | Coding unit division optimization method for ultra-high definition video | |
US20100080459A1 (en) | Content adaptive histogram enhancement | |
US8179961B2 (en) | Method and apparatus for adapting a default encoding of a digital video signal during a scene change period | |
EP2056587A1 (en) | Detecting scene transitions in digital video sequences | |
US20130114687A1 (en) | Fixed intra run-level mode for cavlc in hevc | |
US20040028139A1 (en) | Video encoding | |
CN110113610B (en) | Data transmission method and device | |
CN108737819B (en) | Flexible coding unit partitioning method based on quadtree binary tree structure | |
WO2016114788A1 (en) | Video encoder | |
CN113038127A (en) | ROI-based real-time video multi-path parallel transmission code rate control method | |
CN112188196A (en) | Method for rapid intra-frame prediction of general video coding based on texture | |
CN116708789A (en) | Video analysis coding system based on artificial intelligence | |
CA2689441C (en) | A system and method for time optimized encoding | |
CN113542804A (en) | Method for detecting static frame sequence based on code stream statistical characteristics | |
CN111372079B (en) | VVC inter-frame CU deep rapid dividing method | |
CN101540834B (en) | Method for removing noise of video image and video coding device | |
CN113542744A (en) | Encoding method based on dynamic HDR scene switching | |
EP3550834A1 (en) | Encoding of video cross-fades using weighted inter-prediction | |
CN108024111B (en) | Frame type judgment method and device | |
Chakraborty et al. | A novel video coding scheme using a scene adaptive non-parametric background model | |
US10880562B2 (en) | Image processing method and camera thereof | |
CN114189688B (en) | Chrominance component prediction method based on luminance template matching | |
JP2001076166A (en) | Encoding method of animation dynamic image | |
TWI703856B (en) | Image compression method and image compressor | |
CN109274970B (en) | Rapid scene switching detection method and system |
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 |