CN110753242B - Method and system for adjusting quantization parameters of transcoding slice source frame layer - Google Patents

Method and system for adjusting quantization parameters of transcoding slice source frame layer Download PDF

Info

Publication number
CN110753242B
CN110753242B CN201911061721.2A CN201911061721A CN110753242B CN 110753242 B CN110753242 B CN 110753242B CN 201911061721 A CN201911061721 A CN 201911061721A CN 110753242 B CN110753242 B CN 110753242B
Authority
CN
China
Prior art keywords
frame
transcoding
current
complexity change
complexity
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.)
Active
Application number
CN201911061721.2A
Other languages
Chinese (zh)
Other versions
CN110753242A (en
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.)
Shenzhen Mengwang Video Co ltd
Original Assignee
Shenzhen Mengwang Video 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 Shenzhen Mengwang Video Co ltd filed Critical Shenzhen Mengwang Video Co ltd
Priority to CN201911061721.2A priority Critical patent/CN110753242B/en
Publication of CN110753242A publication Critical patent/CN110753242A/en
Application granted granted Critical
Publication of CN110753242B publication Critical patent/CN110753242B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • 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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities

Landscapes

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

Abstract

The invention provides a method and a system for adjusting a quantization parameter of a source frame layer of a transcoding slice. According to the method, according to the prior coding information of the input code stream, a frame with changed complexity is found firstly, then the influence timeliness of the frame with changed complexity is determined, and then the quantization parameters of the input code stream are adjusted in a self-adaptive mode on the basis of the influence timeliness of the frame at a transcoding end, so that the rate distortion performance of a transcoded video is improved while the calculated amount is reduced.

Description

Method and system for adjusting quantization parameters of transcoding slice source frame layer
Technical Field
The invention relates to the field of video coding, in particular to a method and a system for adjusting quantization parameters of a source frame layer of a transcoding slice.
Background
The current transcoding technology adopts a quantization parameter multiplexing mechanism simply, but can restrict the improvement of rate distortion performance; or the rate-distortion performance is improved by recalculating new quantization parameters through rate control. Because the input end of the transcoder is a compressed code stream and has prior coding information of the input code stream, if a quantization strategy is specially designed and adjusted based on the compressed information, the transcoding performance can be further improved.
Disclosure of Invention
The embodiment of the invention aims to provide a transcoding slice source frame layer quantization parameter adjusting method, and aims to solve the problems of large calculation amount or low transcoding performance of a transcoding method in the prior art.
The embodiment of the invention is realized in such a way that a method for adjusting the quantization parameters of the source frame layer of a transcoding slice comprises the following steps:
identifying complexity change frames in the transcoded frames and calculating influence timeliness of the complexity change frames;
and adaptively adjusting the quantization parameters of the transcoded frames according to the influence timeliness of the complexity change frames, and then transcoding.
Further, before the identifying the complexity change frame in the transcoded frame and calculating the influence aging of the complexity change frame, the method further includes:
assigning initial values to the quantization parameters of the transcoding frames according to the threshold range of the absolute value of the difference value between the original bit and the target bit of the transcoding code stream in advance;
presetting current transcoding frame as initial frame
The self-adaptive adjustment of the transcoding frame quantization parameter according to the influence timeliness of the complexity change frame, and then the transcoding further comprises:
if the next frame to be transcoded of the end frame of the complexity change frame stage exists, the comp is ordered2=comp1Setting the next transcoding frame of the complexity change frame stage ending frame as the current transcoding frame and the previous complexity change frame as the current complexity change frame, and then returning the complexity change frame in the identification transcoding frame and calculating the influence aging of the complexity change frame; otherwise, ending;
therein, comp1Representing the complexity of the current complexity change frame; comp2Representing the complexity of the previous complexity change frame.
Another objective of the embodiments of the present invention is to provide a system for adjusting quantization parameters of a source frame layer of a transcoding slice. The system comprises:
the complexity change frame identification and influence timeliness calculation device is used for identifying complexity change frames in the transcoding frames and calculating influence timeliness of the complexity change frames;
and the transcoding frame quantization parameter adjusting device is used for adaptively adjusting the transcoding frame quantization parameters according to the influence timeliness of the complexity change frame and then transcoding.
Further, the system comprises:
the transcoding frame quantization parameter initial value assigning module is used for assigning an initial value to the transcoding frame quantization parameter in advance according to a threshold range of an absolute value of a difference value between an original bit and a target bit of a transcoding code stream;
the current transcoding frame initial value assigning module is connected with the complexity change frame identifier and the influence timeliness calculating device and is used for presetting the current transcoding frame as an initial frame;
a first judgment processing module connected with the transcoding frame quantization parameter adjusting device and used for judging the existence of the next frame to be transcoded of the complexity change frame stage ending frame,make comp2=comp1Setting the next transcoding frame of the complexity change frame stage ending frame as the current transcoding frame, setting the previous complexity change frame as the current complexity change frame, and then returning the complexity change frame identification and the influence aging calculation device; otherwise, ending;
therein, comp2Representing the complexity of a previous complexity change frame; comp1Representing the complexity of the current complexity change frame.
The invention has the advantages of
The invention provides a method and a system for adjusting a quantization parameter of a source frame layer of a transcoding slice. According to the method, according to the prior coding information of the input code stream, a frame with changed complexity is found firstly, then the influence timeliness of the frame with changed complexity is determined, and then the quantization parameters of the input code stream are adjusted in a self-adaptive mode on the basis of the influence timeliness of the frame at a transcoding end, so that the rate distortion performance of a transcoded video is improved while the calculated amount is reduced.
Drawings
Fig. 1 is a flowchart of a method for adjusting quantization parameters of a source frame layer of a transcoding source frame according to a preferred embodiment of the present invention;
fig. 2 is a diagram of a system for adjusting quantization parameters of a source frame layer of a transcoding source frame according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and examples, and for convenience of description, only parts related to the examples of the present invention are shown. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a method and a system for adjusting a quantization parameter of a source frame layer of a transcoding slice. According to the method, according to the prior coding information of an input code stream, a frame with changed complexity is found firstly, then the influence timeliness of the frame with changed complexity is determined, and then the quantization parameters of the input code stream are adjusted in a self-adaptive mode at a transcoding end based on the influence timeliness of the frame, so that the rate distortion performance of a transcoded video is improved while the calculated amount is reduced.
Example one
Fig. 1 is a flowchart of a method for adjusting quantization parameters of a source frame layer of a transcoding source frame according to a preferred embodiment of the present invention; the method comprises the following steps:
step 0: assigning initial values to the quantization parameters of the transcoding frames according to the threshold range of the absolute value of the difference value between the original bit and the target bit of the transcoding code stream in advance;
the method specifically comprises the following steps: if bito-bit|<Thres1Then, the quantization parameter QP of each transcoding frame is assigned with an initial value as the quantization parameter QP of the current transcoding frame corresponding to the original code streamo(ii) a Otherwise, each frame quantization parameter QP is transcoded, and an initial value is assigned to be the current transcoding frame quantization value output by the rate control module.
Wherein bitoBit represents the original bit of the code stream and the target bit of the code stream respectively; thres1Representing a first threshold, typically Thres1<10%*bito
Step 1: and presetting the current transcoding frame as an initial frame.
Step 2: identifying a complexity change frame in a transcoding frame and calculating an influence aging compl of the complexity change frame;
specifically, in an embodiment, first, the current transcoded frame is identified as the current complexity change frame, and the start sequence number cur1 is the play sequence number of the current transcoded frame. Then, judging that if the playing sequence number is larger than that of the frame of the current transcoding frame, the number of prediction blocks in the frame is not larger than Thres2In the frame of wb hb, let comp numF-cur1, and set a stage end frame (i.e., a complexity change frame stage end frame, abbreviated as a stage end frame) as the last frame of the transcoding slice source; otherwise, in the frames with the playing sequence number greater than the current transcoding frame, the frame with the minimum playing sequence number is set as the next complexity change frame, and the minimum playing sequence number is recorded as cur2, so that comp is cur2-cur1 and note is 1, and the stage ending frame is set as the previous frame of the next complexity change frame.
Wherein wb and hb represent the column width and row width of the image in units of blocks; numF represents the frame number of the current transcoding source; thres2Representing a second threshold, typically Thres2Is more than 0.8; note represents the next complexity changeThe frame presence identifier.
Step 3: and adaptively adjusting the quantization parameters of the transcoded frames according to the influence timeliness of the complexity change frames, and then transcoding.
Specifically, if compl < Thres3Directly transcoding (without adjusting the quantization parameters of each frame from the current complexity change frame to the phase end frame); otherwise, calculating the complexity of the current complexity change frame by using the compression information of the current transcoding frame in the frame corresponding to the original code stream; and then, according to the calculated value of the complexity change identifier delta, adjusting the quantization parameters of each frame from the current complexity change frame to the stage ending frame, and then carrying out transcoding.
Wherein, Thres3Representing a third threshold, typically Thres3The sampling frame rate of the film source is more than 2; the transcoding method adopts a conventional method in the technical field, and is not described herein again.
The compression information of the current transcoding frame in the frame corresponding to the original code stream comprises the fluctuation of the current transcoding frame in the frame code rate corresponding to the original code stream, the proportion of the current transcoding frame in the motion vector of the frame corresponding to the original code stream, and the proportion of the current transcoding frame in the Skip block of the frame corresponding to the original code stream.
In the embodiment of the invention, the complexity of the current complexity change frame is calculated by using the compression information of the current transcoding frame in the frame corresponding to the original code stream by any one of the following methods 1 to 3:
the method comprises the following steps: utilizing the fluctuation of the current transcoding frame in the code rate of the corresponding frame of the original code stream
comp1=int(bitcur1/bitnext1);
The method 2 comprises the following steps: the proportion of motion vectors in the frames corresponding to the original code stream is utilized to carry out transcoding at present
Figure BDA0002258139770000041
The method 3 comprises the following steps: utilizing the ratio of Skip blocks in the frames corresponding to the original code stream of the current transcoding frame
Figure BDA0002258139770000042
Therein, comp1Representing the complexity of the current complexity change frame; bitcur1、bitnext1Respectively representing the bit of the current complexity change frame in the frame corresponding to the original code stream and the bit of the current complexity change frame in the frame next to the playing sequence of the frame corresponding to the original code stream; mvbitcur1、mvbitnext1To indicate bitcur1、bitnext1The code rate occupied by the medium motion vector; numb, numkipcur1、numskipnext1Respectively representing the number of blocks of a current transcoding frame in a frame corresponding to an original code stream, the number of Skip blocks of a current complexity change frame in a frame corresponding to the original code stream, and the number of Skip blocks of the current complexity change frame in a frame after the playing sequence of the frame corresponding to the original code stream; int denotes a rounding operation.
Specifically, adjusting the quantization parameter of each frame from the current complexity change frame to the phase end frame according to the calculated value of the complexity change identifier δ is as follows: if delta is calculated and is equal to 0, acquiring a quantization parameter; otherwise, adjusting the quantization parameter according to the complexity change frame type;
specifically, the calculation formula of the obtained quantization parameter is as follows:
Figure BDA0002258139770000051
wherein, QPp、dQPoAnd respectively representing the quantization parameter of the previous complexity change frame, the difference value of the quantization parameter of the previous complexity change frame corresponding to the original code stream and the quantization parameter of the current transcoding frame. clip (x) represents a quantization parameter defining function known in the art; complexity change identifier
Figure BDA0002258139770000052
comp1/comp2>Thres4And condition 2: comp2/comp1>Thres4,Thres4Represents a fourth threshold;
specifically, the quantization parameter is adjusted according to the complexity change frame type as follows:
case 1: when the current complexity change frame is an I frame or a P frame,
Figure BDA0002258139770000053
case 2: when the current complexity change frame is a B frame,
Figure BDA0002258139770000054
wherein dQP is weight1*weight2
weight1=(compl>(4*Thres3))+(compl>(2*Thres3))+1;
weight2=(comp1<Thres5)+(comp1<2*Thres5);Thres5Representing a fifth threshold having a value equal to the mean of the computed complexity of the complexity change frames; the first type of frame represents the current complexity change frame to a frame that is prior to the first P frame after the current complexity change frame.
Step 4: if the next frame to be transcoded of the end frame of the complexity change frame stage exists, the comp is ordered2=comp1Setting the next transcoding frame of the complexity change frame stage ending frame as the current transcoding frame, setting the previous complexity change frame as the current complexity change frame, and then returning to Step 2; otherwise, ending.
Therein, comp2Representing the complexity of a previous complexity change frame;
example two
Fig. 2 is a diagram of a system for adjusting quantization parameters of a source frame layer of a transcoding source frame according to a preferred embodiment of the present invention. The system comprises:
the transcoding frame quantization parameter initial value assigning module is used for assigning an initial value to the transcoding frame quantization parameter in advance according to a threshold range of an absolute value of a difference value between an original bit and a target bit of a transcoding code stream;
and the current transcoding frame initial value assigning module is used for presetting the current transcoding frame as an initial frame.
The complexity change frame identification and influence timeliness calculation device is used for identifying complexity change frames in the transcoding frames and calculating influence timeliness of the complexity change frames;
and the transcoding frame quantization parameter adjusting device is used for adaptively adjusting the transcoding frame quantization parameters according to the influence timeliness of the complexity change frame and then transcoding.
A first judgment processing module, configured to judge that a next frame to be transcoded of the end frame of the complexity change frame stage exists, and command comp2=comp1Setting the next transcoding frame of the complexity change frame stage ending frame as the current transcoding frame, setting the previous complexity change frame as the current complexity change frame, and then returning to Step 2; otherwise, ending.
Therein, comp2Representing the complexity of a previous complexity change frame;
further, the "assigning an initial value to the quantization parameter of the transcoded frame according to the threshold range of the absolute value of the difference between the original bit and the target bit of the transcoded code stream in advance" specifically includes: if bito-bit|<Thres1Then, the quantization parameter QP of each transcoding frame is assigned with an initial value as the quantization parameter QP of the current transcoding frame corresponding to the original code streamo(ii) a Otherwise, each frame quantization parameter QP is transcoded, and an initial value is assigned to be the current transcoding frame quantization value output by the rate control module.
Wherein bitoBit represents the original bit of the code stream and the target bit of the code stream respectively; thres1Representing a first threshold, typically Thres1<10%*bito
Further, the "identifying a complexity change frame in a transcoded frame and calculating an influence age compl of the complexity change frame" specifically includes: first, identify the current transcoding frame as the current complexity change frame, and make the starting sequence number cur1 be the playing sequence number of the current transcoding frame. Then, judging that if the playing sequence number is larger than that of the frame of the current transcoding frame, the number of prediction blocks in the frame is not larger than Thres2Wb hb frame, let comp numF-cur1, set the end-of-phase frame (i.e., complexity change)A framing phase end frame, referred to as a phase end frame for short) as the last frame of the transcoding slice source; otherwise, in the frames with the playing sequence number greater than the current transcoding frame, the frame with the minimum playing sequence number is set as the next complexity change frame, and the minimum playing sequence number is recorded as cur2, so that comp is cur2-cur1 and note is 1, and the stage ending frame is set as the previous frame of the next complexity change frame.
Wherein wb and hb represent the column width and row width of the image in units of blocks; numF represents the frame number of the current transcoding source; thres2Representing a second threshold, typically Thres2Is more than 0.8; note indicates that the next complexity change frame exists identifier.
Further, the "adaptively adjusting the transcoding frame quantization parameter according to the influence aging of the complexity change frame, and then transcoding" specifically includes: if comp < Thres3Directly transcoding (without adjusting the quantization parameters of each frame from the current complexity change frame to the phase end frame); otherwise, calculating the complexity of the current complexity change frame by using the compression information of the current transcoding frame in the frame corresponding to the original code stream; and then, according to the calculated value of the complexity change identifier delta, adjusting the quantization parameters of each frame from the current complexity change frame to the stage ending frame, and then carrying out transcoding.
Wherein, Thres3Representing a third threshold, typically Thres3The sampling frame rate of the film source is more than 2; the transcoding method adopts a conventional method in the technical field, and is not described herein again.
The compression information of the current transcoding frame in the frame corresponding to the original code stream comprises the fluctuation of the current transcoding frame in the frame code rate corresponding to the original code stream, the proportion of the current transcoding frame in the motion vector of the frame corresponding to the original code stream, and the proportion of the current transcoding frame in the Skip block of the frame corresponding to the original code stream.
In the embodiment of the invention, the complexity of the current complexity change frame is calculated by using the compression information of the current transcoding frame in the frame corresponding to the original code stream by any one of the following methods 1 to 3:
the method comprises the following steps: utilizing the fluctuation of the current transcoding frame in the code rate of the corresponding frame of the original code stream
comp1=int(bitcur1/bitnext1);
The method 2 comprises the following steps: the proportion of motion vectors in the frames corresponding to the original code stream is utilized to carry out transcoding at present
Figure BDA0002258139770000071
The method 3 comprises the following steps: utilizing the ratio of Skip blocks in the frames corresponding to the original code stream of the current transcoding frame
Figure BDA0002258139770000072
Therein, comp1Representing the complexity of the current complexity change frame; bitcur1、bitnext1Respectively representing the bit of the current complexity change frame in the frame corresponding to the original code stream and the bit of the current complexity change frame in the frame next to the playing sequence of the frame corresponding to the original code stream; mvbitcur1、mvbitnext1To indicate bitcur1、bitnext1The code rate occupied by the medium motion vector; numb, numkipcur1、numskipnext1Respectively representing the number of blocks of a current transcoding frame in a frame corresponding to an original code stream, the number of Skip blocks of a current complexity change frame in a frame corresponding to the original code stream, and the number of Skip blocks of the current complexity change frame in a frame after the playing sequence of the frame corresponding to the original code stream; int denotes a rounding operation.
Specifically, adjusting the quantization parameter of each frame from the current complexity change frame to the phase end frame according to the calculated value of the complexity change identifier δ is as follows: if delta is calculated and is equal to 0, acquiring a quantization parameter; otherwise, adjusting the quantization parameter according to the complexity change frame type;
specifically, the calculation formula of the obtained quantization parameter is as follows:
Figure BDA0002258139770000081
wherein, QPp、dQPoIndividual watchAnd displaying the difference value of the quantization parameter of the previous complexity change frame, the quantization parameter of the previous complexity change frame corresponding to the original code stream and the quantization parameter of the current transcoding frame. clip (x) represents a quantization parameter defining function known in the art; complexity change identifier
Figure BDA0002258139770000082
comp1/comp2>Thres4And condition 2: comp2/comp1>Thres4,Thres4Represents a fourth threshold;
specifically, the quantization parameter is adjusted according to the complexity change frame type as follows:
case 1: when the current complexity change frame is an I frame or a P frame,
Figure BDA0002258139770000083
case 2: when the current complexity change frame is a B frame,
Figure BDA0002258139770000084
wherein dQP is weight1*weight2
weight1=(compl>(4*Thres3))+(compl>(2*Thres3))+1;
weight2=(comp1<Thres5)+(comp1<2*Thres5);Thres5Representing a fifth threshold having a value equal to the mean of the computed complexity of the complexity change frames; the first type of frame represents the current complexity change frame to a frame that is prior to the first P frame after the current complexity change frame.
It will be understood by those skilled in the art that all or part of the steps in the method according to the above embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, such as ROM, RAM, magnetic disk, optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (8)

1. A method for adjusting quantization parameters of a source frame layer of a transcoded slice comprises
Identifying a complexity change frame in a transcoding frame and calculating an influence aging compl of the complexity change frame;
adaptively adjusting quantization parameters of the transcoded frames according to the influence timeliness of the complexity change frames, and then transcoding;
before the identifying the complexity change frame in the transcoded frame and calculating the influence aging of the complexity change frame, the method further comprises the following steps:
assigning initial values to the quantization parameters of the transcoding frames according to the threshold range of the absolute value of the difference value between the original bit and the target bit of the transcoding code stream in advance;
presetting current transcoding frame as initial frame
The self-adaptive adjustment of the transcoding frame quantization parameter according to the influence timeliness of the complexity change frame, and then the transcoding further comprises:
if the next frame to be transcoded of the end frame of the complexity change frame stage exists, the comp is ordered2=comp1Setting the next transcoding frame of the complexity change frame stage ending frame as a current transcoding frame, setting the current complexity change frame as a previous complexity change frame, and then returning the complexity change frame in the marked transcoding frame and calculating the influence timeliness of the complexity change frame; otherwise, ending;
therein, comp1Representing the complexity of the current complexity change frame; comp2Representing the complexity of a previous complexity change frame;
the method for assigning initial values to the quantization parameters of the transcoding frame in advance according to the threshold range of the absolute value of the difference value between the original bit and the target bit of the transcoding code stream specifically comprises the following steps:
if bito-bit|<Thres1Then, the quantization parameter QP of each transcoding frame is assigned with an initial value as the quantization parameter QP of the current transcoding frame corresponding to the original code streamo(ii) a Otherwise, transcoding each frame quantization parameter QP and assigning an initial value as the current transcoding frame quantization value output by the rate control module;
wherein bitoBit represents the original bit of the code stream and the target bit of the code stream respectively; thres1Denotes a first threshold value, Thres1<10%*bito
The identifying the complexity change frame in the transcoding frame and calculating the influence timeliness of the complexity change frame specifically include:
firstly, identifying a current transcoding frame as a current complexity change frame, and enabling an initial sequence number cur1 to be a playing sequence number of the current transcoding frame;
then, judging that if the playing sequence number is larger than that of the frame of the current transcoding frame, the number of prediction blocks in the frame is not larger than Thres2In the frame of wb hb, command comp numF-cur1, and set the end-of-stage frame as the last frame of the transcoding film source; otherwise, in the frames with the playing sequence number larger than the current transcoding frame, setting the frame with the minimum playing sequence number as the next complexity change frame, marking the minimum playing sequence number as cur2, making comp (cur 2-cur1 and note (1), and setting the stage ending frame as the previous frame of the next complexity change frame;
wherein wb and hb represent the column width and row width of the image in units of blocks; numF represents the frame number of the current transcoding source; thres2Denotes a second threshold value, Thres2Is more than 0.8; note indicates that the next complexity change frame exists identifier.
2. The method of transcoding source frame layer quantization parameter adjustment of claim 1,
the self-adaptive adjustment of the transcoding frame quantization parameter according to the influence timeliness of the complexity change frame, and then the transcoding specifically comprises the following steps:
if comp < Thres3Then transcoding directly; otherwise, calculating the current complexity by using the compression information of the current transcoding frame in the frame corresponding to the original code streamChanging the complexity of the frame; then, according to the calculated value of the complexity change identifier delta, adjusting the quantization parameters of each frame from the current complexity change frame to the stage ending frame, and then carrying out transcoding;
the compression information of the current transcoding frame in the frame corresponding to the original code stream comprises the fluctuation of the current transcoding frame in the frame code rate corresponding to the original code stream, the proportion of the current transcoding frame in the motion vector of the frame corresponding to the original code stream or the proportion of the current transcoding frame in the Skip block of the frame corresponding to the original code stream;
wherein, Thres3Denotes a third threshold value, Thres3> slice source sample frame rate/2.
3. The method for adjusting quantization parameters of a transcoding source frame layer of claim 2, wherein the calculating the complexity of the current complexity change frame is performed by any one of the following methods 1 to 3:
the method comprises the following steps: utilizing the fluctuation of the current transcoding frame in the code rate of the corresponding frame of the original code stream
comp1=int(bitcur1/bitnext1);
The method 2 comprises the following steps: the proportion of motion vectors in the frames corresponding to the original code stream is utilized to carry out transcoding at present
Figure FDA0003225888350000021
The method 3 comprises the following steps: utilizing the ratio of Skip blocks in the frames corresponding to the original code stream of the current transcoding frame
Figure FDA0003225888350000022
Therein, comp1Representing the complexity of the current complexity change frame; bitcur1、bitnext1Respectively representing the bit of the current complexity change frame in the frame corresponding to the original code stream and the bit of the current complexity change frame in the frame next to the playing sequence of the frame corresponding to the original code stream; mvbitcur1、mvbitnext1To indicate bitcur1、bitnext1The code rate occupied by the medium motion vector; numb, numkipcur1、numskipnext1Respectively representing the number of blocks of a current transcoding frame in a frame corresponding to an original code stream, the number of Skip blocks of a current complexity change frame in a frame corresponding to the original code stream, and the number of Skip blocks of the current complexity change frame in a frame after the playing sequence of the frame corresponding to the original code stream; int denotes a rounding operation.
4. The method for adjusting quantization parameters of a source frame layer of a transcoding slice of claim 3, wherein the adjusting of the quantization parameters of each frame from a current complexity change frame to a phase end frame according to the calculated value of the complexity change identifier δ is: if delta is calculated and is equal to 0, acquiring a quantization parameter; otherwise, adjusting the quantization parameter according to the complexity change frame type;
the calculation formula of the acquired quantization parameter is as follows:
Figure FDA0003225888350000031
wherein, QPp、dQPoRespectively representing the quantization parameter of the previous complexity change frame, the difference value of the quantization parameter of the previous complexity change frame corresponding to the original code stream and the quantization parameter of the current transcoding frame, and clip (x) representing the quantization parameter limiting function known in the industry; complexity change identifier
Figure FDA0003225888350000032
Condition 1: comp1/comp2>Thres4And condition 2: comp2/comp1>Thres4,Thres4Represents a fourth threshold;
the adjusting the quantization parameter according to the complexity change frame type is as follows:
case 1: when the current complexity change frame is an I frame or a P frame,
Figure FDA0003225888350000033
case 2: when the current complexity change frame is a B frame,
Figure FDA0003225888350000034
wherein dQP is weight1*weight2
weight1=(compl>(4*Thres3))+(compl>(2*Thres3))+1;
weight2=(comp1<Thres5)+(comp1<2*Thres5);Thres5Representing a fifth threshold having a value equal to the mean of the computed complexity of the complexity change frames; the first type of frame represents the current complexity change frame to a frame that is prior to the first P frame after the current complexity change frame.
5. A system for transcoding slice source frame layer quantization parameter adjustment, the system comprising:
the complexity change frame identification and influence timeliness calculation device is used for identifying the complexity change frame in the transcoding frame and calculating the influence timeliness compl of the complexity change frame;
the transcoding frame quantization parameter adjusting device is used for adaptively adjusting the quantization parameters of the transcoding frame according to the influence timeliness of the complexity change frame and then transcoding;
the system comprises:
the transcoding frame quantization parameter initial value assigning module is used for assigning an initial value to the transcoding frame quantization parameter in advance according to a threshold range of an absolute value of a difference value between an original bit and a target bit of a transcoding code stream;
the current transcoding frame initial value assigning module is connected with the complexity change frame identifier and the influence timeliness calculating device and is used for presetting the current transcoding frame as an initial frame;
a first judgment processing module connected with the transcoding frame quantization parameter adjusting device and used for judging the next frame to be transcoded of the complexity change frame stage end frameIf present, make comp2=comp1Setting the next transcoding frame of the complexity change frame stage ending frame as the current transcoding frame, setting the current complexity change frame as the previous complexity change frame, and then returning the complexity change frame identification and the influence aging calculation device; otherwise, ending;
therein, comp2Representing the complexity of a previous complexity change frame; comp1Representing the complexity of the current complexity change frame;
the "assigning an initial value to the quantization parameter of the transcoded frame according to the threshold range of the absolute value of the difference between the original bit and the target bit of the transcoded code stream in advance" specifically includes:
if bito-bit|<Thres1Then, the quantization parameter QP of each transcoding frame is assigned with an initial value as the quantization parameter QP of the current transcoding frame corresponding to the original code streamo(ii) a Otherwise, transcoding each frame quantization parameter QP and assigning an initial value as the current transcoding frame quantization value output by the rate control module;
wherein bitoBit represents the original bit of the code stream and the target bit of the code stream respectively; thres1Denotes a first threshold value, Thres1<10%*bito
The "identifying a complexity change frame in a transcoded frame and calculating an influence timeliness of the complexity change frame" specifically includes:
firstly, identifying a current transcoding frame as a current complexity change frame, and enabling an initial sequence number cur1 to be a playing sequence number of the current transcoding frame; then, judging that if the playing sequence number is larger than that of the frame of the current transcoding frame, the number of prediction blocks in the frame is not larger than Thres2In the frame of wb hb, command comp numF-cur1, and set the end-of-stage frame as the last frame of the transcoding film source; otherwise, in the frames with the playing sequence number larger than the current transcoding frame, setting the frame with the minimum playing sequence number as the next complexity change frame, marking the minimum playing sequence number as cur2, making comp (cur 2-cur1 and note (1), and setting the stage ending frame as the previous frame of the next complexity change frame;
wherein wb and hb represent the column width and row width of the image in units of blocks; numF represents the frame number of the current transcoding source; thres2Denotes a second threshold value, Thres2Is more than 0.8; note indicates that the next complexity change frame exists identifier.
6. The system of claim 5, wherein the system for transcoding source frame layer quantization parameter adjustment,
the step of adaptively adjusting the transcoding frame quantization parameter according to the influence timeliness of the complexity change frame and then transcoding specifically comprises the following steps:
if comp < Thres3Then transcoding directly; otherwise, calculating the complexity of the current complexity change frame by using the compression information of the current transcoding frame in the frame corresponding to the original code stream; then, according to the calculated value of the complexity change identifier delta, adjusting the quantization parameters of each frame from the current complexity change frame to the stage ending frame, and then carrying out transcoding;
the compression information of the current transcoding frame in the frame corresponding to the original code stream comprises the fluctuation of the current transcoding frame in the frame code rate corresponding to the original code stream, the proportion of the current transcoding frame in the motion vector of the frame corresponding to the original code stream or the proportion of the current transcoding frame in the Skip block of the frame corresponding to the original code stream;
wherein, Thres3Denotes a third threshold value, Thres3> slice source sample frame rate/2.
7. The system of claim 6,
the method for calculating the complexity of the current complexity change frame by utilizing the compression information of the current transcoding frame in the frame corresponding to the original code stream is any one of the following methods 1 to 3:
the method comprises the following steps: utilizing the fluctuation of the current transcoding frame in the code rate of the corresponding frame of the original code stream
comp1=int(bitcur1/bitnext1);
The method 2 comprises the following steps: the proportion of motion vectors in the frames corresponding to the original code stream is utilized to carry out transcoding at present
Figure FDA0003225888350000051
The method 3 comprises the following steps: utilizing the ratio of Skip blocks in the frames corresponding to the original code stream of the current transcoding frame
Figure FDA0003225888350000052
Therein, comp1Representing the complexity of the current complexity change frame; bitcur1、bitnext1Respectively representing the bit of the current complexity change frame in the frame corresponding to the original code stream and the bit of the current complexity change frame in the frame next to the playing sequence of the frame corresponding to the original code stream; mvbitcur1、mvbitnext1To indicate bitcur1、bitnext1The code rate occupied by the medium motion vector; numb, numkipcur1、numskipnext1Respectively representing the number of blocks of a current transcoding frame in a frame corresponding to an original code stream, the number of Skip blocks of a current complexity change frame in a frame corresponding to the original code stream, and the number of Skip blocks of the current complexity change frame in a frame after the playing sequence of the frame corresponding to the original code stream; int denotes a rounding operation.
8. The system of claim 7, wherein the system for transcoding source frame layer quantization parameter adjustment,
adjusting the quantization parameter of each frame from the current complexity change frame to the phase ending frame according to the calculated value of the complexity change identifier delta as follows: if delta is calculated and is equal to 0, acquiring a quantization parameter; otherwise, adjusting the quantization parameter according to the complexity change frame type;
the calculation formula of the acquired quantization parameter is as follows:
Figure FDA0003225888350000061
wherein, QPp、dQPoRespectively representing the quantization parameter of the previous complexity change frame, the difference value of the quantization parameter of the previous complexity change frame corresponding to the original code stream and the quantization parameter of the current transcoding frameClip (x) represents a quantization parameter defining function known in the art; complexity change identifier
Figure FDA0003225888350000062
Condition 1: comp1/comp2>Thres4And condition 2: comp2/comp1>Thres4,Thres4Represents a fourth threshold;
the adjusting the quantization parameter according to the complexity change frame type is as follows:
case 1: when the current complexity change frame is an I frame or a P frame,
Figure FDA0003225888350000063
case 2: when the current complexity change frame is a B frame,
Figure FDA0003225888350000064
wherein dQP is weight1*weight2;weight1=(compl>(4*Thres3))+(compl>(2*Thres3))+1;weight2=(comp1<Thres5)+(comp1<2*Thres5);Thres5Representing a fifth threshold having a value equal to the mean of the computed complexity of the complexity change frames; the first type of frame represents the current complexity change frame to a frame that is prior to the first P frame after the current complexity change frame.
CN201911061721.2A 2019-11-01 2019-11-01 Method and system for adjusting quantization parameters of transcoding slice source frame layer Active CN110753242B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911061721.2A CN110753242B (en) 2019-11-01 2019-11-01 Method and system for adjusting quantization parameters of transcoding slice source frame layer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911061721.2A CN110753242B (en) 2019-11-01 2019-11-01 Method and system for adjusting quantization parameters of transcoding slice source frame layer

Publications (2)

Publication Number Publication Date
CN110753242A CN110753242A (en) 2020-02-04
CN110753242B true CN110753242B (en) 2021-10-12

Family

ID=69281874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911061721.2A Active CN110753242B (en) 2019-11-01 2019-11-01 Method and system for adjusting quantization parameters of transcoding slice source frame layer

Country Status (1)

Country Link
CN (1) CN110753242B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1315118A (en) * 1998-08-27 2001-09-26 通用仪器公司 Dynamic bit allocation for statistical multiplexing of compressed and uncompressed digital divdeo signals
CN1393109A (en) * 2000-10-10 2003-01-22 皇家菲利浦电子有限公司 Video bitrate control method and device for digital video recording
CN1726709A (en) * 2002-12-10 2006-01-25 Tut系统公司 Rate control with picture-based lookahead window
CN101102494A (en) * 2007-07-23 2008-01-09 武汉大学 A control method for macro block code rate in video code conversion
CN101594525A (en) * 2008-05-31 2009-12-02 华为技术有限公司 The acquisition methods of quantization parameter, device and transcoder
CN104202660A (en) * 2014-09-15 2014-12-10 乐视网信息技术(北京)股份有限公司 Video dividing and transcoding method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7263126B2 (en) * 2003-09-15 2007-08-28 Sharp Laboratories Of America, Inc. System and method for transcoding with adaptive bit rate control

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1315118A (en) * 1998-08-27 2001-09-26 通用仪器公司 Dynamic bit allocation for statistical multiplexing of compressed and uncompressed digital divdeo signals
CN1393109A (en) * 2000-10-10 2003-01-22 皇家菲利浦电子有限公司 Video bitrate control method and device for digital video recording
CN1726709A (en) * 2002-12-10 2006-01-25 Tut系统公司 Rate control with picture-based lookahead window
CN101102494A (en) * 2007-07-23 2008-01-09 武汉大学 A control method for macro block code rate in video code conversion
CN101594525A (en) * 2008-05-31 2009-12-02 华为技术有限公司 The acquisition methods of quantization parameter, device and transcoder
CN104202660A (en) * 2014-09-15 2014-12-10 乐视网信息技术(北京)股份有限公司 Video dividing and transcoding method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Temporal Video Transcoding Based on Frame Complexity Analysis for Mobile Video Communication;C. Yeh等;《 IEEE Transactions on Broadcasting》;20130331;第59卷(第1期);38-46 *
基于H.264的转码初始量化参数自适应选择;张安娜等;《计算机工程》;20170531;281-285 *

Also Published As

Publication number Publication date
CN110753242A (en) 2020-02-04

Similar Documents

Publication Publication Date Title
EP3179720B1 (en) Quantization method and apparatus in encoding/decoding
US7925108B2 (en) Encoding device and dynamic image recording system having the encoding device
CN110178374B (en) Segment-based shaping for encoding high dynamic range video
KR20180100368A (en) Image decoding and encoding method, decoding and encoding device, decoder and encoder
KR20220013024A (en) Decoding device, method, and program
JP2003018603A (en) Method and device for encoding moving image
US11330263B1 (en) Machine learning based coded size estimation in rate control of video encoding
US11012698B2 (en) Image encoding apparatus and method for controlling the same
US20080075164A1 (en) Motion picture encoding apparatus and method
US7961787B2 (en) Method of video content complexity estimation, scene change detection and video encoding
US10536696B2 (en) Image encoding device and image encoding method
US20090096878A1 (en) Digital image stabilization method
JP2019110376A (en) Decode error detection estimation device, video decoding device, and program for the devices
US9014255B2 (en) System and method for identifying unique portions of videos with validation and predictive scene changes
US20100027617A1 (en) Method and apparatus for compressing a reference frame in encoding/decoding moving images
CN110753242B (en) Method and system for adjusting quantization parameters of transcoding slice source frame layer
JP2004040811A (en) Method and apparatus for controlling amount of dct computation performed to encode motion image
JP2000059792A (en) High efficiency encoding device of dynamic image signal
CN110636330B (en) Film source scene complexity analysis method and system based on compressed information
US20090185620A1 (en) Video encoding apparatus and method for the same
CN112822493A (en) Adaptively encoding video frames based on complexity
KR101461365B1 (en) A method and apparatus for encoding and decoding image for controlling quantization parameter considering contents type
JP4793150B2 (en) Video signal processing apparatus, video signal information processing method, and program
US20230269380A1 (en) Encoding method, decoding method, encoder, decoder and storage medium
CN104837015B (en) Low latency coding adaptation QP Offset adjusting methods

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 Guangdong city of Shenzhen province Nanshan District Guangdong streets high in the four Longtaili Technology Building Room 325 No. 30

Applicant after: Shenzhen mengwang video Co., Ltd

Address before: 518000 Guangdong city of Shenzhen province Nanshan District Guangdong streets high in the four Longtaili Technology Building Room 325 No. 30

Applicant before: SHENZHEN MONTNETS ENCYCLOPEDIA INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant