US8948242B2 - Encoding device and method and multimedia apparatus including the encoding device - Google Patents

Encoding device and method and multimedia apparatus including the encoding device Download PDF

Info

Publication number
US8948242B2
US8948242B2 US13/256,846 US201013256846A US8948242B2 US 8948242 B2 US8948242 B2 US 8948242B2 US 201013256846 A US201013256846 A US 201013256846A US 8948242 B2 US8948242 B2 US 8948242B2
Authority
US
United States
Prior art keywords
macroblock
gop
bit amount
assigning
based bit
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.)
Expired - Fee Related, expires
Application number
US13/256,846
Other versions
US20120002724A1 (en
Inventor
Seong Hee Kim
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.)
Core Logic Inc
Original Assignee
Core Logic Inc
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 Core Logic Inc filed Critical Core Logic Inc
Assigned to CORE LOGIC INC. reassignment CORE LOGIC INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: KIM, SEONG HEE
Publication of US20120002724A1 publication Critical patent/US20120002724A1/en
Application granted granted Critical
Publication of US8948242B2 publication Critical patent/US8948242B2/en
Expired - Fee Related legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods 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 an image region, e.g. an object
    • H04N19/176Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock
    • H04N19/0009
    • H04N19/0006
    • H04N19/00193
    • H04N19/00278
    • H04N19/00284
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/114Adapting the group of pictures [GOP] structure, e.g. number of B-frames between two anchor frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/115Selection of the code volume for a coding unit prior to coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods 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/146Data rate or code amount at the encoder output
    • H04N19/152Data rate or code amount at the encoder output by measuring the fullness of the transmission buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/177Methods 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 group of pictures [GOP]

Definitions

  • the present invention relates to a digital multimedia apparatus, and more particularly, to an encoding device and method capable of efficiently performing video encoding in a multimedia apparatus.
  • Video encoders refer to devices which convert video signals conveying a huge amount of data into compressed formats, i.e., bitstreams before storage or transmission of the video signals.
  • the video encoders use quantization for video signal compression; the quantization technique converts a value in a particular range by using a quantization parameter in such a way that the value has a smaller range than its original range.
  • a constant bit rate (CBR) or a variable bit rate (VBR) may be used according to purpose of use.
  • the CBR involves encoding into a predetermined number of bits during a predetermined time.
  • the CBR is used when a limited bandwidth or storage medium is used. With the CBR, however, good quality is not guaranteed for an image having a large motion or a complicated image.
  • the VBR involves encoding into a predetermined quality regardless of the characteristics of an image.
  • the VBR is used when a sufficient bandwidth is used or such a storage medium as a digital video disk (DVD) is used.
  • DVD digital video disk
  • a bit rate control method is used for encoding into a predetermined number of bits, and a bit rate, i.e., a bit amount, is controlled by properly using a quantization parameter and a frame skip.
  • the frame skip means skipping encoding with respect to a particular frame, when necessary.
  • bit rate control method for determining a quantization parameter has not yet been standardized. As a result, a bit rate control method may vary from encoder to encoder and the performance of an encoder is much affected by a bit rate control method.
  • a conventional bit rate control method may be roughly classified into two methods: one is determining a quantization parameter in proportional to a fullness of a buffer, that is, an occupancy rate of the buffer, and the other is calculating a complexity of an input image and assigning bits in proportional to the calculated complexity.
  • the former involves controlling a quantization parameter based on a current buffer state, by taking account of a remaining buffer capacity and a bandwidth of a transmission medium.
  • This bit rate control method is generally used in test model 5 (TM5), which pertains to the moving picture experts group (MPEG), and video codec test model, near-term, version 8 (TMN8), which pertains to the video coding experts group (VCEG).
  • TM5 test model 5
  • TNN8 video codec test model
  • VCEG video coding experts group
  • the latter involves assigning bits to each unit of encoding and controlling a quantization value depending on a complexity of an image.
  • the former method which controls a quantization parameter based on a current buffer state, can be simply implemented, but does not consider an image.
  • a target bit amount may be suitable for a certain image, but not for another.
  • the large quality change of an image may be offensive to the eyes.
  • the latter method which assigns bits considering a complexity of an input image provides good quality while maintaining a desired bit rate, but requires complex pixel-based computations, such as calculation of an average and a variance, to analyze the complexity of the image, thereby lowering encoding speed and increasing memory consumption.
  • complex pixel-based computations such as calculation of an average and a variance
  • the present invention provides an encoding device and method of using a bit rate control method which accurately predicts a target bit amount, provides excellent quality, and is applicable to a real-time environment based on its simple mechanism, and a multimedia apparatus including the encoding device.
  • an encoding device including a group-of-pictures (GOP)-based bit assigning unit assigning a GOP-based bit amount target GOP , a macroblock-based bit assigning unit assigning a macroblock-based bit amount for all macroblocks included in the GOP, a quantizing device checking a current buffer state, determining a quantization parameter (QP) by using an alternating current (AC) coefficient obtained by transforming a macroblock if a buffer occupancy rate is lower than a predetermined limit rate, and performing quantization by using the determined QP, and a variable length coding (VLC) unit performing VLC.
  • GOP group-of-pictures
  • AAC alternating current
  • VLC variable length coding
  • the GOP-based bit assigning unit may divide a target bit rate per second target sec by a frame per second fps and multiply a result of the division by a key frame interval I interval , thereby calculating the GOP-based bit amount target GOP .
  • the macroblock-based bit assigning unit may assign a bit amount in units of a macroblock each time encoding on the GOP starts, and the macroblock-based bit assigning unit may assign a bit amount to each intra macroblock and each inter macroblock, which are two modes of the macroblock.
  • a bit amount target inter — MB of the inter macroblock may be calculated by dividing the GOP-based bit amount target GOP by a sum of the key frame interval I interval and the bit amount ratio Ratio Itop and dividing a result of the division by the number of macroblocks MB_Num present in a single frame.
  • the quantizing device may include a predicting and transforming unit for performing intra prediction, inter prediction, and transformation on the macroblock, a QP determining unit for analyzing the AC coefficient obtained by the transformation and for determining the QP, a QP adjusting unit for comparing a current QP with a neighbor QP and adjusting the current QP such that a difference between the current QP and the neighbor QP is within a predetermined threshold, and a quantizing unit for performing quantizing by using the QP.
  • a multimedia apparatus including an input unit to which a signal to be encoded is input, an encoding device for performing encoding by quantizing the signal being input to the input unit according to group-of-pictures (GOP)-based bit assignment, macroblock-based bit assignment, and a buffer state, a transmitting unit for transmitting a bitstream encoded by the encoding device, a storing unit for storing the bitstream encoded by the encoding device, and a control unit for controlling the input unit, the encoding device, the transmitting unit, and the storing unit.
  • GOP group-of-pictures
  • an encoding method including a group-of-pictures (GOP)-based bit assigning operation of assigning a GOP-based bit amount target GOP , a macroblock-based bit assigning operation of assigning a macroblock-based bit amount for all macroblocks included in the GOP according to a mode, a quantizing operation of checking a current buffer state, determining a quantization parameter (QP) by using an alternating current (AC) coefficient obtained by transforming a macroblock if a buffer occupancy rate is lower than a predetermined limit rate, and performing quantization by using the determined QP, and a variable length coding (VLC) operation of performing VLC.
  • GOP group-of-pictures
  • AAC alternating current
  • VLC variable length coding
  • the encoding method may further include a buffer checking operation of checking a buffer state prior to the quantizing operation. Subsequently, if the buffer occupancy rate is higher than a predetermined limit rate, the VLC operation is performed skipping the quantization operation.
  • the encoding device and method and the multimedia apparatus including the encoding device according to the present invention calculate a GOP-based bit amount target GOP in a simple way, that is, by using a target bit rate per second target sec , a frame per second fps, and a key frame interval I interval , and calculate a macroblock-based bit amount by using a bit amount ratio Ratio Itop of an intra macroblock to an inter macroblock, thereby providing superior bit amount prediction and excellent quality.
  • the encoding device and method and the multimedia apparatus according to the present invention predict a bit amount as described above and skip coding in units of a macroblock, when necessary, by checking a buffer state, thereby preventing overflow and thus enabling stable encoding. Consequently, the encoding device and method and the multimedia apparatus according to the present invention can be effectively and stably used in a video encoder which uses a limited bandwidth or a storage medium as an application.
  • FIG. 1 is a block diagram of a multimedia apparatus according to an embodiment of the present invention
  • FIG. 2 is a detailed block diagram of an encoding device included in the multimedia apparatus shown in FIG. 1 , according to an embodiment of the present invention
  • FIG. 3 is a detailed block diagram of a quantizing unit included in the encoding device shown in FIG. 2 , according to an embodiment of the present invention
  • FIG. 4 is a flowchart illustrating an encoding method according to another embodiment of the present invention.
  • FIG. 5 is a flowchart illustrating in detail an operation of assigning a bit amount in units of a macroblock in the encoding method shown in FIG. 4 , according to an embodiment of the present invention.
  • FIG. 6 is a flowchart illustrating in detail an operation of performing quantization in the encoding method shown in FIG. 4 , according to an embodiment of the present invention.
  • FIG. 1 is a block diagram of a multimedia apparatus according to an embodiment of the present invention.
  • the multimedia apparatus includes an input unit 200 , an encoding device 100 , a transmitting unit 300 , a storing unit 400 , and a control unit 500 .
  • a signal to be encoded is input to the input unit 200 by the encoding device 100 .
  • the transmitting unit 300 transmits a bitstream, which is output after being encoded by the encoding device 100 .
  • the encoding device 100 After controlling a bit amount through group-of-pictures (GOP)-based bit assignment and macroblock-based bit assignment with respect to the signal input to the input unit 200 , the encoding device 100 performs quantization based on a buffer state and performs variable length coding (VLD), thereby performing frame-based encoding.
  • the encoding device 100 controls the bit amount by using a target bit rate per second target sec , a frame per second fps, a key frame interval I interval , and a bit amount ratio Ratio Itop of an intra macroblock to an inter macroblock.
  • the encoding device 100 can accurately predict a bit amount without suffering from complex computations for analyzing complexity. Moreover, the buffer state is checked before quantization, and the quantization is performed based on a buffer occupancy rate, thereby preventing overflow from occurring due to excessive buffer occupancy and thus enabling smooth encoding.
  • the encoding device 100 will be described later in more detail with reference to FIG. 2 .
  • the storing unit 400 stores the bitstream which is output after being encoded by the encoding device 100 or stores data required during encoding.
  • the control unit 500 controls overall operations of the input unit 200 , the encoding device 100 , the transmitting unit 300 , and the storing unit 400 .
  • the encoding device 100 is included in the multimedia apparatus as shown in FIG. 1
  • a decoding device may also be included in the multimedia apparatus.
  • the multimedia apparatus may also include an output unit (not shown) corresponding to the input unit and a receiving unit (not shown) corresponding to the transmitting unit.
  • the multimedia apparatus may accurately predict and control a bit amount, and enable smooth encoding by preventing overflow due to the encoding device 100 which may assign a bit amount in units of a GOP (a GOP-based bit amount) and a bit amount in units of a macroblock (a macroblock-based bit amount) by using several parameters, that is, target sec , fps, I interval , and Ratio Itop , and check a buffer state and performs quantization.
  • FIG. 2 is a detailed block diagram of the encoding device 100 included in the multimedia apparatus shown in FIG. 1 , according to an embodiment of the present invention.
  • the encoding device 100 includes a GOP-based bit assigning unit 120 , a macroblock-based bit assigning unit 140 , a buffer state checking unit 150 , a quantizing device 160 , and a variable length coding (VLC) unit 170 .
  • a GOP-based bit assigning unit 120 the encoding device 100 according to the current embodiment includes a GOP-based bit assigning unit 120 , a macroblock-based bit assigning unit 140 , a buffer state checking unit 150 , a quantizing device 160 , and a variable length coding (VLC) unit 170 .
  • VLC variable length coding
  • target sec /fps refers to a bit amount per frame and a product of target sec /fps and I interval is a bit amount of all frames within a GOP.
  • target GOP represents a bit amount assigned to a single GOP including a key frame.
  • the macroblock-based bit assigning unit 140 assigns a bit amount in units of a macroblock after GOP-based bit assignment is performed by the GOP-based bit assigning unit 120 .
  • the macroblock-based bit assigning unit 140 assigns a bit amount to each intra macroblock and each inter macroblock in every start of a GOP.
  • the bit amount is calculated as below.
  • target inter — MB target GOP /( I interval +Ratio Itop ) ⁇ 1/MB_Num (Equation 2)
  • target intra — MB target inter — MB ⁇ Ratio Itop (Equation 3)
  • target inter — MB represents a bit amount assigned to an inter macroblock
  • target intra — MB represents a bit amount assigned to an intra macroblock
  • Ratio Itop represents a bit amount ratio of the intra macroblock to the inter macroblock
  • MB_Num represents the number of macroblocks included in a frame.
  • target GOP /(I interval +Ratio Itop ) is a bit amount per frame determined based on Ratio Itop , and the bit amount per frame is divided by the total number of macroblocks included in a frame, resulting in a bit amount per macroblock.
  • Equation 2 is an equation for calculating a bit amount per inter macroblock.
  • Equation 3 is an equation for calculating a bit amount per intra macroblock. The calculation of a bit amount per intra macroblock can be easily performed by multiplying the bit amount per inter macroblock, calculated by Equation 2, by Ratio Itop .
  • Ratio Itop is first set by using an initial value determined experimentally, and then updated by using an average bit amount ratio of previous inter and intra macroblocks and current Ratio Itop in every start of encoding of a GOP.
  • Ratio Itop has to be 1 at a strict constant bit rate, but if an identical bit amount is assigned to an intra mode, that is, an intra macroblock, and an inter mode, that is, an inter macroblock, the quality of an intra frame largely degrades and all the other inter frames in the same GOP may be affected by such quality degradation of the intra frame, thereby deteriorating the quality of all frames. Therefore, it is desirable to assign a larger bit amount to the intra mode than the inter mode.
  • Ratio Itop may be preferably 3 ⁇ 4.
  • a GOP may be divided into an intra frame or a key frame composed of macroblocks, all of which are intra macroblocks, and an inter frame composed of macroblocks, most of which are inter macroblocks and some of which are intra macroblcoks.
  • the buffer state checking unit 150 checks a buffer occupancy rate during encoding.
  • the quantizing device 160 performs or does not perform quantization depending on a current buffer state checked by the buffer state checking unit 150 . That is, if a current buffer occupancy rate is lower than a predetermined limit rate, the quantizing device 160 performs transformation on a macroblock to obtain an alternating current (AC) coefficient, determines a quantization parameter (QP) by using the obtained AC coefficient, and then performs quantization by using the determined QP. If the current buffer occupancy rate is higher than the predetermined limit rate, the quantizing device 160 does not perform quantization. In this way, by performing or skipping quantization depending on the buffer state, overflow caused by excessive buffer occupancy can be prevented.
  • the quantizing device 160 will be described later in more detail with reference to FIG. 3 .
  • the VLC unit 180 performs VLC on the macroblock on which the quantization is performed or skipped, thereby completing encoding with respect to a single macroblock.
  • the encoding device 100 calculates a bit amount by using several parameters and checking a buffer state to perform or skip quantization depending on the buffer state, thereby accurately predicting a bit amount and thus providing superior quality, together with stable encoding. Accordingly, the encoding device 100 smartly combines a method of controlling a bit amount based on a buffer state and a method of controlling a bit amount according to a complexity of an input image, and calculates a bit amount by using several parameters, which can be easily predicted and changed, instead of analyzing the complexity for a bit amount calculation, thereby simplifying calculations and thus solving problems related to encoding speed and memory consumption.
  • FIG. 3 is a detailed block diagram of the quantizing device 160 included in the encoding device 100 shown in FIG. 2 , according to an embodiment of the present invention.
  • the quantizing device 160 includes a predicting and transforming unit 162 , a QP determining unit 164 , a QP adjusting unit 166 , and a quantizing unit 168 .
  • the predicting and transforming unit 162 performs intra prediction and inter prediction on a macroblock for motion compensation.
  • inter prediction representative examples of which are motion estimation and motion compensation, compresses an image by removing temporal redundancy between pictures.
  • Intra prediction reduces spatial redundancy in a frame and is performed to improve the compression efficiency of an intra frame.
  • Intra prediction/inter prediction is well known in the technical field of the present invention, and thus will not be described in detail.
  • the predicting and transforming unit 162 performs domain transformation prior to quantization.
  • the prediction and transforming unit 162 may perform discrete cosine transformation (DCT) or wavelet transformation as domain transformation.
  • DCT discrete cosine transformation
  • JPEG joint photographic experts group
  • MJPEG motion joint photographic experts group
  • MPEG moving picture experts group
  • DV digital versatile
  • the QP determining unit 164 determines a QP by using the AC coefficient obtained through DCT. That is, by performing DCT, a direct current (DC) coefficient and the AC coefficient may be obtained, where the DC coefficient refers to a first coefficient of a low frequency located at the top leftmost of a coefficient block obtained by DCT, that is, a DC component, and the other coefficients of the coefficient block are coefficients of a high frequency, that is, AC coefficients.
  • DC coefficient refers to a first coefficient of a low frequency located at the top leftmost of a coefficient block obtained by DCT, that is, a DC component
  • the other coefficients of the coefficient block are coefficients of a high frequency, that is, AC coefficients.
  • the AC coefficient has, as a variance component, Laplacian distribution which is proportional to a bit amount.
  • a macroblock-based bit amount is predicted and a QP is determined based on the predicted macroblock-based bit amount.
  • the AC coefficient may be obtained by other transformations, such as wavelet transformation, as well as DCT.
  • the QP adjusting unit 166 compares a QP determined by the QP determining unit 164 with a neighbor QP and adjusts the determined QP in such a way that a difference between the determined QP and the neighbor QP is within a predetermined threshold. Even though the QP determining unit 164 determines the QP by using the AC coefficient, a large difference in QP between macroblocks may cause a blocking phenomenon. Therefore, the QP adjusting unit 166 compares the QP of a current macroblock with a QP of a neighbor macroblock and adjust the QP determined by the QP determining unit 164 in such a way that a difference between the determined QP and the QP of the neighbor macroblock is within the predetermined threshold. Macroblock-based QP calculation may increase system complexity, and thus complexity may be properly controlled by periodically changing a QP.
  • the quantizing unit 168 performs quantization by using a QP finally determined by the adjustment of the QP adjusting unit 166 .
  • the quantization is widely known in this field and thus will not be described in detail.
  • the quantizing device 160 may continue or stop quantization on a macroblock depending on a buffer occupancy rate during encoding. Therefore, it is possible to minimize a possibility of overflow due to excessive buffer occupancy.
  • FIG. 4 is a flowchart illustrating an encoding method according to another embodiment of the present invention.
  • a bit amount is assigned in units of a GOP by using predetermined parameters, for example, target sec , fps, and I interval in operation S 100 .
  • the GOP-based bit amount assignment may be performed using Equation 1. After the GOP-based bit amount assignment, a bit amount is assigned in units of a macroblock in operation S 110 .
  • the macroblock-based bit amount assignment will be described later in more detail with reference to FIG. 5 .
  • a buffer state is checked to determine whether a buffer occupancy rate exceeds a predetermined limit rate. If so, the quantization of operation S 130 is skipped and a macroblock is determined to be a non-coded type in operation S 160 and then VLC is performed on the macroblock in operation S 140 . The quantization of operation S 130 will be described later in more detail with reference to FIG. 6 .
  • VLC of operation S 140 it is determined whether the current macroblock is the last macroblock in operation S 150 . If so, encoding of a GOP is ended; otherwise, the process proceeds to operation S 110 to assign a bit amount in units of a macroblock.
  • the encoding method easily calculates a bit amount in units of a GOP and a bit amount in units of a macroblock by using several parameters such as target sec , fps, and I interval and performs or skips quantization by checking a buffer state, thereby accurately predicting a bit amount and allowing stable encoding.
  • FIG. 5 is a flowchart illustrating in detail operation S 110 of assigning a bit amount in units of a macroblock in the encoding method shown in FIG. 4 , according to an embodiment of the present invention.
  • a current macroblock is a first macroblock in a GOP in operation S 112 . If so, a bit amount is assigned in units of a macroblock according to a mode, that is, an intra mode or an inter mode, by using parameters such as target GOP and Ratio Itop in operation S 114 .
  • the macroblock-based bit amount assignment may be performed using Equation 2 and Equation 3.
  • the process proceeds to operation S 120 of checking a buffer state. That is, the macroblock-based bit amount assignment is performed on all macroblocks included in a GOP at the start of the GOP. After completion of VLC of operation S 140 in FIG. 4 , it is determined whether a current macroblock is the last macroblock in operation S 150 . If not, the process proceeds to operation S 112 where the current macroblock is the first macroblock in the GOP,
  • FIG. 6 is a flowchart illustrating in detail operation S 130 of performing quantization in the encoding method shown in FIG. 4 , according to an embodiment of the present invention.
  • inter prediction/intra prediction and transformation are performed in operation S 132 .
  • a QP is determined in operation S 134 .
  • a current QP is adjusted in such a way that a difference between the current QP and a neighbor QP is within a predetermined threshold in operation S 136 .
  • Quantization is performed by using the determined QP in operation S 138 . Such quantization has already been described with reference to FIG. 3 , and thus will not be described in detail. Operation S 130 of performing quantization may be skipped depending on a buffer occupancy rate as described above.
  • the present invention relates to a digital multimedia apparatus, and more particularly, to an encoding device and method capable of efficiently performing video encoding in a multimedia apparatus.
  • the encoding device and method and the multimedia apparatus including the encoding device according to the present invention calculate a GOP-based bit amount target GOP in a simple way, that is, by using a target bit rate per second target sec , a frame per second fps, and a key frame interval I interval , and calculate a macroblock-based bit amount by using a bit amount ratio Ratio Itop of an intra macroblock to an inter macroblock, thereby providing superior bit amount prediction and excellent quality.

Landscapes

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

Abstract

An encoding device and method of using a bit rate control method which accurately predicts a target bit amount, provides excellent quality, and is applicable to a real-time environment through a simple mechanism, and a multimedia apparatus including the encoding device. The encoding device includes a group-of-pictures (GOP)-based bit assigning unit for assigning a GOP-based bit amount targetGOP, a macroblock-based bit assigning unit for assigning a macroblock-based bit amount for all macroblocks included in the GOP, a quantizing device for checking a current buffer state, determining a quantization parameter (QP) by using an alternating current (AC) coefficient obtained by transforming a macroblock if a buffer occupancy rate is lower than a predetermined limit rate, and performing quantization by using the determined QP, and a variable length coding (VLC) unit for performing VLC.

Description

This is a National Phase Application filed under 35 U.S.C. 371 as a national stage of PCT/KR2010/001634, filed Mar. 17, 2010, and claiming the benefit from Korean Application No. 10-2009-0023547, filed Mar. 19, 2009, the content of which is hereby incorporated by reference in its entirety.
TECHNICAL FIELD
The present invention relates to a digital multimedia apparatus, and more particularly, to an encoding device and method capable of efficiently performing video encoding in a multimedia apparatus.
BACKGROUND ART
Video encoders refer to devices which convert video signals conveying a huge amount of data into compressed formats, i.e., bitstreams before storage or transmission of the video signals. The video encoders use quantization for video signal compression; the quantization technique converts a value in a particular range by using a quantization parameter in such a way that the value has a smaller range than its original range.
For example, when a large quantization parameter is used in quantization, a range of quantized values is small and thus compression performance is high, but leading to large differences between the quantized values and original signal values and thus resulting in quality degradation. On the other hand, for a small quantization parameter, the quantized values become closer to the original signal values, but compression performance is not good because of a large range of the quantized values.
For output bitstreams of video encoders, a constant bit rate (CBR) or a variable bit rate (VBR) may be used according to purpose of use. The CBR involves encoding into a predetermined number of bits during a predetermined time. The CBR is used when a limited bandwidth or storage medium is used. With the CBR, however, good quality is not guaranteed for an image having a large motion or a complicated image. On the other hand, the VBR involves encoding into a predetermined quality regardless of the characteristics of an image. The VBR is used when a sufficient bandwidth is used or such a storage medium as a digital video disk (DVD) is used.
In the CBR scheme, a bit rate control method is used for encoding into a predetermined number of bits, and a bit rate, i.e., a bit amount, is controlled by properly using a quantization parameter and a frame skip. The frame skip means skipping encoding with respect to a particular frame, when necessary.
To reduce a bit amount, a large quantization parameter and a frame skip may be used; to increase a bit amount, a small quantization parameter may be used. Since the quantization parameter has a great influence upon quality as well as a bit amount, it is important to use a proper quantization parameter. A bit rate control method for determining a quantization parameter has not yet been standardized. As a result, a bit rate control method may vary from encoder to encoder and the performance of an encoder is much affected by a bit rate control method.
A conventional bit rate control method may be roughly classified into two methods: one is determining a quantization parameter in proportional to a fullness of a buffer, that is, an occupancy rate of the buffer, and the other is calculating a complexity of an input image and assigning bits in proportional to the calculated complexity.
The former involves controlling a quantization parameter based on a current buffer state, by taking account of a remaining buffer capacity and a bandwidth of a transmission medium. This bit rate control method is generally used in test model 5 (TM5), which pertains to the moving picture experts group (MPEG), and video codec test model, near-term, version 8 (TMN8), which pertains to the video coding experts group (VCEG). The latter involves assigning bits to each unit of encoding and controlling a quantization value depending on a complexity of an image.
The former method, which controls a quantization parameter based on a current buffer state, can be simply implemented, but does not consider an image. As a result, a target bit amount may be suitable for a certain image, but not for another. Moreover, the large quality change of an image may be offensive to the eyes.
On the other hand, the latter method which assigns bits considering a complexity of an input image provides good quality while maintaining a desired bit rate, but requires complex pixel-based computations, such as calculation of an average and a variance, to analyze the complexity of the image, thereby lowering encoding speed and increasing memory consumption. Although many algorithms related to complexity analysis have already been developed, they are not viable for real-time applications due to complex computations and are hardly used in practice.
DISCLOSURE OF INVENTION Technical Problem
The present invention provides an encoding device and method of using a bit rate control method which accurately predicts a target bit amount, provides excellent quality, and is applicable to a real-time environment based on its simple mechanism, and a multimedia apparatus including the encoding device.
Solution to Problem
According to an aspect of the present invention, there is provided an encoding device including a group-of-pictures (GOP)-based bit assigning unit assigning a GOP-based bit amount targetGOP, a macroblock-based bit assigning unit assigning a macroblock-based bit amount for all macroblocks included in the GOP, a quantizing device checking a current buffer state, determining a quantization parameter (QP) by using an alternating current (AC) coefficient obtained by transforming a macroblock if a buffer occupancy rate is lower than a predetermined limit rate, and performing quantization by using the determined QP, and a variable length coding (VLC) unit performing VLC.
In the present invention, the GOP-based bit assigning unit may divide a target bit rate per second targetsec by a frame per second fps and multiply a result of the division by a key frame interval Iinterval, thereby calculating the GOP-based bit amount targetGOP. The macroblock-based bit assigning unit may assign a bit amount in units of a macroblock each time encoding on the GOP starts, and the macroblock-based bit assigning unit may assign a bit amount to each intra macroblock and each inter macroblock, which are two modes of the macroblock. For example, a bit amount targetinter MB of the inter macroblock may be calculated by dividing the GOP-based bit amount targetGOP by a sum of the key frame interval Iinterval and the bit amount ratio RatioItop and dividing a result of the division by the number of macroblocks MB_Num present in a single frame.
In the present invention, the quantizing device may include a predicting and transforming unit for performing intra prediction, inter prediction, and transformation on the macroblock, a QP determining unit for analyzing the AC coefficient obtained by the transformation and for determining the QP, a QP adjusting unit for comparing a current QP with a neighbor QP and adjusting the current QP such that a difference between the current QP and the neighbor QP is within a predetermined threshold, and a quantizing unit for performing quantizing by using the QP.
According to another aspect of the present invention, there is provided a multimedia apparatus including an input unit to which a signal to be encoded is input, an encoding device for performing encoding by quantizing the signal being input to the input unit according to group-of-pictures (GOP)-based bit assignment, macroblock-based bit assignment, and a buffer state, a transmitting unit for transmitting a bitstream encoded by the encoding device, a storing unit for storing the bitstream encoded by the encoding device, and a control unit for controlling the input unit, the encoding device, the transmitting unit, and the storing unit.
According to another aspect of the present invention, there is provided an encoding method including a group-of-pictures (GOP)-based bit assigning operation of assigning a GOP-based bit amount targetGOP, a macroblock-based bit assigning operation of assigning a macroblock-based bit amount for all macroblocks included in the GOP according to a mode, a quantizing operation of checking a current buffer state, determining a quantization parameter (QP) by using an alternating current (AC) coefficient obtained by transforming a macroblock if a buffer occupancy rate is lower than a predetermined limit rate, and performing quantization by using the determined QP, and a variable length coding (VLC) operation of performing VLC.
In the present invention, the encoding method may further include a buffer checking operation of checking a buffer state prior to the quantizing operation. Subsequently, if the buffer occupancy rate is higher than a predetermined limit rate, the VLC operation is performed skipping the quantization operation.
Advantageous Effects of Invention
The encoding device and method and the multimedia apparatus including the encoding device according to the present invention calculate a GOP-based bit amount targetGOP in a simple way, that is, by using a target bit rate per second targetsec, a frame per second fps, and a key frame interval Iinterval, and calculate a macroblock-based bit amount by using a bit amount ratio RatioItop of an intra macroblock to an inter macroblock, thereby providing superior bit amount prediction and excellent quality.
Furthermore, the encoding device and method and the multimedia apparatus according to the present invention predict a bit amount as described above and skip coding in units of a macroblock, when necessary, by checking a buffer state, thereby preventing overflow and thus enabling stable encoding. Consequently, the encoding device and method and the multimedia apparatus according to the present invention can be effectively and stably used in a video encoder which uses a limited bandwidth or a storage medium as an application.
BRIEF DESCRIPTION OF DRAWINGS
The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:
FIG. 1 is a block diagram of a multimedia apparatus according to an embodiment of the present invention;
FIG. 2 is a detailed block diagram of an encoding device included in the multimedia apparatus shown in FIG. 1, according to an embodiment of the present invention;
FIG. 3 is a detailed block diagram of a quantizing unit included in the encoding device shown in FIG. 2, according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an encoding method according to another embodiment of the present invention;
FIG. 5 is a flowchart illustrating in detail an operation of assigning a bit amount in units of a macroblock in the encoding method shown in FIG. 4, according to an embodiment of the present invention; and
FIG. 6 is a flowchart illustrating in detail an operation of performing quantization in the encoding method shown in FIG. 4, according to an embodiment of the present invention.
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description, when it is described that an element is connected to another element, it may be connected directly to another element, but a third element may also be interposed therebetween. Additionally, in the drawings, the structure or size of each element is exaggerated for convenience and clarity of illustration and portions unrelated to description are omitted. Like reference numerals indicate like elements throughout the drawings. Terms used therein are used only for illustrative purposes and are not intended to limit the scope of the present invention defined in the claims.
FIG. 1 is a block diagram of a multimedia apparatus according to an embodiment of the present invention.
Referring to FIG. 1, the multimedia apparatus according to an embodiment of the present invention includes an input unit 200, an encoding device 100, a transmitting unit 300, a storing unit 400, and a control unit 500.
A signal to be encoded is input to the input unit 200 by the encoding device 100. The transmitting unit 300 transmits a bitstream, which is output after being encoded by the encoding device 100.
After controlling a bit amount through group-of-pictures (GOP)-based bit assignment and macroblock-based bit assignment with respect to the signal input to the input unit 200, the encoding device 100 performs quantization based on a buffer state and performs variable length coding (VLD), thereby performing frame-based encoding. The encoding device 100 controls the bit amount by using a target bit rate per second targetsec, a frame per second fps, a key frame interval Iinterval, and a bit amount ratio RatioItop of an intra macroblock to an inter macroblock.
In this way, the encoding device 100 can accurately predict a bit amount without suffering from complex computations for analyzing complexity. Moreover, the buffer state is checked before quantization, and the quantization is performed based on a buffer occupancy rate, thereby preventing overflow from occurring due to excessive buffer occupancy and thus enabling smooth encoding. The encoding device 100 will be described later in more detail with reference to FIG. 2.
The storing unit 400 stores the bitstream which is output after being encoded by the encoding device 100 or stores data required during encoding. The control unit 500 controls overall operations of the input unit 200, the encoding device 100, the transmitting unit 300, and the storing unit 400. Although the encoding device 100 is included in the multimedia apparatus as shown in FIG. 1, a decoding device (not shown) may also be included in the multimedia apparatus. The multimedia apparatus may also include an output unit (not shown) corresponding to the input unit and a receiving unit (not shown) corresponding to the transmitting unit.
The multimedia apparatus according to the current embodiment may accurately predict and control a bit amount, and enable smooth encoding by preventing overflow due to the encoding device 100 which may assign a bit amount in units of a GOP (a GOP-based bit amount) and a bit amount in units of a macroblock (a macroblock-based bit amount) by using several parameters, that is, targetsec, fps, Iinterval, and RatioItop, and check a buffer state and performs quantization.
FIG. 2 is a detailed block diagram of the encoding device 100 included in the multimedia apparatus shown in FIG. 1, according to an embodiment of the present invention.
Referring to FIG. 2, the encoding device 100 according to the current embodiment includes a GOP-based bit assigning unit 120, a macroblock-based bit assigning unit 140, a buffer state checking unit 150, a quantizing device 160, and a variable length coding (VLC) unit 170.
The GOP-based bit assigning unit 120 assigns a bit amount in units of a GOP, and uses several parameters such as targetsec, fps, Iinterval, and RatioItop for GOP-based bit assignment. Letting a GOP-based bit amount be targetGOP, then targetGOP may be expressed as follows:
targetGOP=(targetsec/fps)×I interval  (Equation 1),
where parameters targetsec, fps, and Iinterval are set by a user according to an image. targetsec/fps refers to a bit amount per frame and a product of targetsec/fps and Iinterval is a bit amount of all frames within a GOP. Eventually, targetGOP represents a bit amount assigned to a single GOP including a key frame.
The macroblock-based bit assigning unit 140 assigns a bit amount in units of a macroblock after GOP-based bit assignment is performed by the GOP-based bit assigning unit 120. The macroblock-based bit assigning unit 140 assigns a bit amount to each intra macroblock and each inter macroblock in every start of a GOP. The bit amount is calculated as below.
targetinter MB=targetGOP/(I interval+RatioItop)×1/MB_Num  (Equation 2)
targetintra MB=targetinter MB×RatioItop  (Equation 3)
targetinter MB represents a bit amount assigned to an inter macroblock, and targetintra MB represents a bit amount assigned to an intra macroblock. RatioItop represents a bit amount ratio of the intra macroblock to the inter macroblock, and MB_Num represents the number of macroblocks included in a frame.
Reviewing Equation 2, targetGOP/(Iinterval+RatioItop) is a bit amount per frame determined based on RatioItop, and the bit amount per frame is divided by the total number of macroblocks included in a frame, resulting in a bit amount per macroblock. In particular, Equation 2 is an equation for calculating a bit amount per inter macroblock. Equation 3 is an equation for calculating a bit amount per intra macroblock. The calculation of a bit amount per intra macroblock can be easily performed by multiplying the bit amount per inter macroblock, calculated by Equation 2, by RatioItop.
RatioItop is first set by using an initial value determined experimentally, and then updated by using an average bit amount ratio of previous inter and intra macroblocks and current RatioItop in every start of encoding of a GOP. RatioItop has to be 1 at a strict constant bit rate, but if an identical bit amount is assigned to an intra mode, that is, an intra macroblock, and an inter mode, that is, an inter macroblock, the quality of an intra frame largely degrades and all the other inter frames in the same GOP may be affected by such quality degradation of the intra frame, thereby deteriorating the quality of all frames. Therefore, it is desirable to assign a larger bit amount to the intra mode than the inter mode. For example, RatioItop may be preferably 3˜4.
For reference, a GOP may be divided into an intra frame or a key frame composed of macroblocks, all of which are intra macroblocks, and an inter frame composed of macroblocks, most of which are inter macroblocks and some of which are intra macroblcoks.
The buffer state checking unit 150 checks a buffer occupancy rate during encoding.
The quantizing device 160 performs or does not perform quantization depending on a current buffer state checked by the buffer state checking unit 150. That is, if a current buffer occupancy rate is lower than a predetermined limit rate, the quantizing device 160 performs transformation on a macroblock to obtain an alternating current (AC) coefficient, determines a quantization parameter (QP) by using the obtained AC coefficient, and then performs quantization by using the determined QP. If the current buffer occupancy rate is higher than the predetermined limit rate, the quantizing device 160 does not perform quantization. In this way, by performing or skipping quantization depending on the buffer state, overflow caused by excessive buffer occupancy can be prevented. The quantizing device 160 will be described later in more detail with reference to FIG. 3.
The VLC unit 180 performs VLC on the macroblock on which the quantization is performed or skipped, thereby completing encoding with respect to a single macroblock.
The encoding device 100 according to the current embodiment calculates a bit amount by using several parameters and checking a buffer state to perform or skip quantization depending on the buffer state, thereby accurately predicting a bit amount and thus providing superior quality, together with stable encoding. Accordingly, the encoding device 100 smartly combines a method of controlling a bit amount based on a buffer state and a method of controlling a bit amount according to a complexity of an input image, and calculates a bit amount by using several parameters, which can be easily predicted and changed, instead of analyzing the complexity for a bit amount calculation, thereby simplifying calculations and thus solving problems related to encoding speed and memory consumption.
FIG. 3 is a detailed block diagram of the quantizing device 160 included in the encoding device 100 shown in FIG. 2, according to an embodiment of the present invention.
Referring to FIG. 3, the quantizing device 160 according to the current embodiment includes a predicting and transforming unit 162, a QP determining unit 164, a QP adjusting unit 166, and a quantizing unit 168.
The predicting and transforming unit 162 performs intra prediction and inter prediction on a macroblock for motion compensation. Generally, inter prediction, representative examples of which are motion estimation and motion compensation, compresses an image by removing temporal redundancy between pictures. Intra prediction reduces spatial redundancy in a frame and is performed to improve the compression efficiency of an intra frame. Intra prediction/inter prediction is well known in the technical field of the present invention, and thus will not be described in detail.
The predicting and transforming unit 162 performs domain transformation prior to quantization. For example, the prediction and transforming unit 162 may perform discrete cosine transformation (DCT) or wavelet transformation as domain transformation. Such transformations are often used in joint photographic experts group (JPEG) image compression and motion joint photographic experts group (MJPEG), moving picture experts group (MPEG), and digital versatile (DV) video compressions. In the following description, DCT will be taken as an example. DCT is also widely known in the technical field of the present invention and thus will not be described in detail.
The QP determining unit 164 determines a QP by using the AC coefficient obtained through DCT. That is, by performing DCT, a direct current (DC) coefficient and the AC coefficient may be obtained, where the DC coefficient refers to a first coefficient of a low frequency located at the top leftmost of a coefficient block obtained by DCT, that is, a DC component, and the other coefficients of the coefficient block are coefficients of a high frequency, that is, AC coefficients.
The AC coefficient has, as a variance component, Laplacian distribution which is proportional to a bit amount. By using such AC coefficient distribution, a macroblock-based bit amount is predicted and a QP is determined based on the predicted macroblock-based bit amount. The AC coefficient may be obtained by other transformations, such as wavelet transformation, as well as DCT.
The QP adjusting unit 166 compares a QP determined by the QP determining unit 164 with a neighbor QP and adjusts the determined QP in such a way that a difference between the determined QP and the neighbor QP is within a predetermined threshold. Even though the QP determining unit 164 determines the QP by using the AC coefficient, a large difference in QP between macroblocks may cause a blocking phenomenon. Therefore, the QP adjusting unit 166 compares the QP of a current macroblock with a QP of a neighbor macroblock and adjust the QP determined by the QP determining unit 164 in such a way that a difference between the determined QP and the QP of the neighbor macroblock is within the predetermined threshold. Macroblock-based QP calculation may increase system complexity, and thus complexity may be properly controlled by periodically changing a QP.
The quantizing unit 168 performs quantization by using a QP finally determined by the adjustment of the QP adjusting unit 166. The quantization is widely known in this field and thus will not be described in detail.
In the current embodiment, the quantizing device 160 may continue or stop quantization on a macroblock depending on a buffer occupancy rate during encoding. Therefore, it is possible to minimize a possibility of overflow due to excessive buffer occupancy.
FIG. 4 is a flowchart illustrating an encoding method according to another embodiment of the present invention.
Referring to FIG. 4, in the encoding method according to the current embodiment, a bit amount is assigned in units of a GOP by using predetermined parameters, for example, targetsec, fps, and Iinterval in operation S100. The GOP-based bit amount assignment may be performed using Equation 1. After the GOP-based bit amount assignment, a bit amount is assigned in units of a macroblock in operation S110. The macroblock-based bit amount assignment will be described later in more detail with reference to FIG. 5.
Thereafter, in operation S120, a buffer state is checked to determine whether a buffer occupancy rate exceeds a predetermined limit rate. If so, the quantization of operation S130 is skipped and a macroblock is determined to be a non-coded type in operation S160 and then VLC is performed on the macroblock in operation S140. The quantization of operation S130 will be described later in more detail with reference to FIG. 6. After completion of VLC of operation S140, it is determined whether the current macroblock is the last macroblock in operation S150. If so, encoding of a GOP is ended; otherwise, the process proceeds to operation S110 to assign a bit amount in units of a macroblock.
The encoding method according to the current embodiment easily calculates a bit amount in units of a GOP and a bit amount in units of a macroblock by using several parameters such as targetsec, fps, and Iinterval and performs or skips quantization by checking a buffer state, thereby accurately predicting a bit amount and allowing stable encoding.
FIG. 5 is a flowchart illustrating in detail operation S110 of assigning a bit amount in units of a macroblock in the encoding method shown in FIG. 4, according to an embodiment of the present invention.
Referring to FIG. 5, it is determined whether a current macroblock is a first macroblock in a GOP in operation S112. If so, a bit amount is assigned in units of a macroblock according to a mode, that is, an intra mode or an inter mode, by using parameters such as targetGOP and RatioItop in operation S114. The macroblock-based bit amount assignment may be performed using Equation 2 and Equation 3.
If the current macroblock is not the first macroblock in a GOP, the process proceeds to operation S120 of checking a buffer state. That is, the macroblock-based bit amount assignment is performed on all macroblocks included in a GOP at the start of the GOP. After completion of VLC of operation S140 in FIG. 4, it is determined whether a current macroblock is the last macroblock in operation S150. If not, the process proceeds to operation S112 where the current macroblock is the first macroblock in the GOP,
FIG. 6 is a flowchart illustrating in detail operation S130 of performing quantization in the encoding method shown in FIG. 4, according to an embodiment of the present invention.
Referring to FIG. 6, inter prediction/intra prediction and transformation are performed in operation S132. By using an AC coefficient obtained by the transformation, a QP is determined in operation S134. A current QP is adjusted in such a way that a difference between the current QP and a neighbor QP is within a predetermined threshold in operation S136. Quantization is performed by using the determined QP in operation S138. Such quantization has already been described with reference to FIG. 3, and thus will not be described in detail. Operation S130 of performing quantization may be skipped depending on a buffer occupancy rate as described above.
While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, 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.
INDUSTRIAL APPLICABILITY
The present invention relates to a digital multimedia apparatus, and more particularly, to an encoding device and method capable of efficiently performing video encoding in a multimedia apparatus. The encoding device and method and the multimedia apparatus including the encoding device according to the present invention calculate a GOP-based bit amount targetGOP in a simple way, that is, by using a target bit rate per second targetsec, a frame per second fps, and a key frame interval Iinterval, and calculate a macroblock-based bit amount by using a bit amount ratio RatioItop of an intra macroblock to an inter macroblock, thereby providing superior bit amount prediction and excellent quality.

Claims (17)

The invention claimed is:
1. An encoding device, comprising:
a group-of-pictures (GOP)-based bit assigning unit configured to assign a GOP-based bit amount targetGOP;
a macroblock-based bit assigning unit configured to assign a macroblock-based bit amount for all macroblocks included in the GOP;
a quantizing device configured to
check a current buffer state,
determine a quantization parameter (QP) by using an alternating current (AC) coefficient obtained by transforming a macroblock, and
perform quantization by using the determined QP when a buffer occupancy rate is lower than a predetermined limit rate; and
a variable length coding (VLC) unit configured to perform VLC,
wherein the GOP-based bit assigning unit is configured to
divide a target bit rate per second targetsec by a frame per second fps, and
multiply a result of the division by a key frame interval Iinterval, thereby calculating the GOP-based bit amount targetGOP, and
wherein the macroblock-based bit assigning unit is configured to determine whether the macroblock is a first macroblock in the GOP when encoding on the GOP starts, and
when the macroblock is the first macroblock, the macroblock-based bit assigning unit assigns a bit amount to each intra macroblock and each inter macroblock, which are two modes of the macroblock.
2. The encoding device of claim 1, wherein the macroblock-based bit assigning unit is configured to calculate a bit amount targetInter MB of the inter macroblock by using the GOP-based bit amount targetGOP and a bit amount ratio RatioItop of the intra macroblock to the inter macroblock.
3. The encoding device of claim 2, wherein the macroblock-based bit assigning unit is configured to
calculate the bit amount targetinter MB of the inter macroblock by dividing the GOP-based bit amount targetGOP by a sum of the key frame interval Iinterval and the bit amount ratio RatioItop and
divide a result of the division by the number of macroblocks MB_Num present in a single frame.
4. The encoding device of claim 2, wherein the bit amount ratio RatioItop is first set to an experimentally obtained initial value and then updated by a previously used average bit amount ratio and a current bit amount ratio at every start of encoding of each GOP.
5. The encoding device of claim 1, wherein the quantizing device comprises:
a predicting and transforming unit configured to perform intra prediction, inter prediction, and transformation on the macroblock;
a QP determining unit configured to analyze the AC coefficient obtained by the transformation and determine the QP;
a QP adjusting unit configured to compare a current QP with a neighbor QP and adjust the current QP such that a difference between the current QP and the neighbor QP is within a predetermined threshold; and
a quantizing unit configured to perform quantizing by using the adjusted QP.
6. The encoding device of claim 1, wherein when the buffer occupancy rate is higher than the predetermined limit rate, the quantizing unit is configured to not perform quantization and the VLC unit is configured to perform the VLC.
7. A multimedia apparatus, comprising:
an input unit configured to receive a signal to be encoded;
an encoding device configured to perform encoding by quantizing the signal received at-the input unit according to a group-of-pictures (GOP)-based bit assignment, a macroblock-based bit assignment, and a buffer state;
a transmitting unit configured to transmit a bitstream encoded by the encoding device;
a storing unit configured to store the bitstream encoded by the encoding device; and
a control unit configured to control the input unit, the encoding device, the transmitting unit, and the storing unit,
wherein the encoding device includes (i) a group-of-pictures (GOP)-based bit assigning unit configured to assign a GOP-based bit amount targetGOP, and (ii) a macroblock-based bit assigning unit configured to assign a macroblock-based bit amount for all macroblocks included in the GOP;
wherein the GOP-based bit assigning unit is configured to
divide a target bit rate per second targetsec by a frame per second fps, and
multiply a result of the division by a key frame interval Iinterval, thereby calculating the GOP-based bit amount targetGOP; and
wherein the macroblock-based bit assigning unit is configured to determine whether the macroblock is a first macroblock in the GOP when encoding on the GOP starts, and
when the macroblock is the first macroblock, the macroblock-based bit assigning unit assigns a bit amount to each intra macroblock and each inter macroblock, which are two modes of the macroblock.
8. The multimedia apparatus of claim 7, wherein the encoding device further comprises:
a quantizing device configured to
check a current buffer state,
determine a quantization parameter (QP) by using an alternating current (AC) coefficient obtained by transforming a macroblock, and
perform quantization by using the determined QP when a buffer occupancy rate is lower than a predetermined limit rate; and
a variable length coding (VLC) unit configured to perform VLC.
9. The multimedia apparatus of claim 8, wherein the macroblock-based bit assigning unit is configured to calculate a bit amount targetinter MB by dividing the GOP-based bit amount targetGOP by a sum of the key frame interval Iinterval and the bit amount ratio RatioItop and dividing a result of the division by the number of macroblocks MB_Num present in a single frame.
10. The multimedia apparatus of claim 8, wherein the quantizing device comprises:
a predicting and transforming unit configured to perform for performing intra prediction, inter prediction, and transformation on the macroblock;
a QP determining unit configured to analyze the AC coefficient obtained by the transformation and determining the QP;
a QP adjusting unit configured to compare a current QP with a neighbor QP and adjusting the current QP such that a difference between the current QP and the neighbor QP is within a predetermined threshold; and
a quantizing unit configured to perform quantizing by using the adjusted QP.
11. An encoding method performed by an encoding device, the encoding method comprising:
assigning a group-of-pictures (GOP)-based bit amount targetGOP;
assigning a macroblock-based bit amount for all macroblocks included in the GOP according to a mode;
checking a current buffer state;
determining a quantization parameter (QP) by using an alternating current (AC) coefficient obtained by transforming a macroblock;
performing quantization by using the determined QP when a buffer occupancy rate is lower than a predetermined limit rate; and
performing variable length coding (VLC),
wherein the assigning of the GOP-based bit amount targetGOP comprises
dividing a target bit rate per second targetsec by a frame per second fps, and
multiplying a result of the division by a key frame interval IInterval, thereby calculating the GOP-based bit amount targetGOP, and
wherein the assigning of the macroblock-based bit amount comprises
determining whether the macroblock is a first macroblock in the GOP when encoding on the GOP starts and an assigning operation of assigning a bit amount in units of a macroblock, and
when the macroblock is the first macroblock in the determining operation, assigning a bit amount to each intra macroblock and each inter macroblock, which are two modes of the macroblock.
12. The encoding method of claim 11, wherein the assigning of the macroblock-based bit amount comprises
calculating a bit amount targetinter MB by (i) dividing the GOP-based bit amount target GOP by a sum of the key frame interval IInterval and the bit amount ratio RatioItop and (ii) dividing a result of the division by the number of macroblocks MB_Num present in a single frame.
13. The encoding method of claim 12, wherein the bit amount ratio RatioItop is first set to an experimentally obtained initial value and then updated by a previously used average bit amount ratio and a current bit amount ratio at every start of encoding of each GOP.
14. The encoding method of claim 11,
wherein in the determining of whether the macroblock is a first macroblock in the GOP, when the macroblock is not the first macroblock, the checking of the current buffer state is performed.
15. The encoding method of claim 11, wherein the quantization comprises:
performing intra prediction, inter prediction, and transformation on the macroblock;
analyzing the AC coefficient obtained by the transformation and determining the QP;
comparing a current QP with a neighbor QP and adjusting the current QP such that a difference between the current QP and the neighbor QP is within a predetermined threshold; and
performing quantizing by using the adjusted QP.
16. The encoding method of claim 15, wherein in the determining of the QP, a bit amount of the macroblock is predicted by using a distribution of the AC coefficient, thereby determining the QP.
17. The encoding method of claim 11, wherein when the buffer occupancy rate is higher than a predetermined limit rate, the VLC is performed while skipping the quantization.
US13/256,846 2009-03-19 2010-03-17 Encoding device and method and multimedia apparatus including the encoding device Expired - Fee Related US8948242B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR10-2009-0023547 2009-03-19
KR1020090023547A KR101060495B1 (en) 2009-03-19 2009-03-19 Encoding device and method and multimedia device including the encoding device
PCT/KR2010/001634 WO2010107237A2 (en) 2009-03-19 2010-03-17 Encoding device and method and multimedia apparatus including the encoding device

Publications (2)

Publication Number Publication Date
US20120002724A1 US20120002724A1 (en) 2012-01-05
US8948242B2 true US8948242B2 (en) 2015-02-03

Family

ID=42740118

Family Applications (1)

Application Number Title Priority Date Filing Date
US13/256,846 Expired - Fee Related US8948242B2 (en) 2009-03-19 2010-03-17 Encoding device and method and multimedia apparatus including the encoding device

Country Status (5)

Country Link
US (1) US8948242B2 (en)
JP (1) JP2012521141A (en)
KR (1) KR101060495B1 (en)
CN (1) CN102356636A (en)
WO (1) WO2010107237A2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140003498A1 (en) * 2012-07-02 2014-01-02 Microsoft Corporation Use of chroma quantization parameter offsets in deblocking
US10250882B2 (en) 2012-07-02 2019-04-02 Microsoft Technology Licensing, Llc Control and use of chroma quantization parameter values

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5570846B2 (en) * 2010-03-04 2014-08-13 株式会社メガチップス Image encoding device
US9661323B2 (en) * 2012-01-11 2017-05-23 Hitachi Maxell, Ltd. Method of encoding picture and picture encoding device
US20150063461A1 (en) * 2013-08-27 2015-03-05 Magnum Semiconductor, Inc. Methods and apparatuses for adjusting macroblock quantization parameters to improve visual quality for lossy video encoding
US10356405B2 (en) 2013-11-04 2019-07-16 Integrated Device Technology, Inc. Methods and apparatuses for multi-pass adaptive quantization
FR3024313B1 (en) * 2014-07-25 2017-12-08 Allegro Dvt VARIABLE RATE VIDEO ENCODER
JP2017126896A (en) * 2016-01-14 2017-07-20 株式会社東芝 Monitoring system, monitoring device, and reproducer
CN107027030B (en) * 2017-03-07 2018-11-09 腾讯科技(深圳)有限公司 A kind of code rate allocation method and its equipment
CN113365061B (en) * 2020-03-03 2024-02-09 炬芯科技股份有限公司 H264 macro block level code rate control method, device and readable storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04369191A (en) 1991-06-18 1992-12-21 Toshiba Corp Picture compression/decoding device
US5890102A (en) * 1995-10-24 1999-03-30 Georgia Tech Research Corporation Jointly optimized subband coding system and method
US6134374A (en) * 1995-05-17 2000-10-17 Victor Company Of Japan, Ltd. Method and apparatus for processing picture information, and recording medium
JP2003174648A (en) 2001-12-04 2003-06-20 Kddi Research & Development Laboratories Inc Moving picture encoder
US20050175090A1 (en) * 2004-02-11 2005-08-11 Anthony Vetro Rate-distortion models for errors resilient video transcoding
US20060008006A1 (en) * 2004-07-07 2006-01-12 Samsung Electronics Co., Ltd. Video encoding and decoding methods and video encoder and decoder
KR20060083297A (en) 2005-01-14 2006-07-20 엘지전자 주식회사 Apparatus and method for encoding of real-time moving image
JP2007116655A (en) 2005-09-20 2007-05-10 Victor Co Of Japan Ltd Moving picture coding apparatus
KR20070053642A (en) 2005-11-21 2007-05-25 한국전자통신연구원 Method and apparatus for controlling bitrate of scalable video stream
KR20070061105A (en) 2005-12-08 2007-06-13 한국전자통신연구원 Method and device for controlling transcoding bit-rate using complexity of macroblock
US20080298702A1 (en) * 2007-06-04 2008-12-04 Aricent Inc. Fixed rate JPEG encoding
KR20080107867A (en) 2007-06-08 2008-12-11 삼성전자주식회사 Method for rate control in video encoding
US20080304564A1 (en) 2007-06-11 2008-12-11 Samsung Electronics Co., Ltd. Bitrate control method and apparatus for intra-only video sequence coding
US20090252233A1 (en) * 2008-04-02 2009-10-08 Microsoft Corporation Adaptive error detection for mpeg-2 error concealment
US20100061461A1 (en) * 2008-09-11 2010-03-11 On2 Technologies Inc. System and method for video encoding using constructed reference frame

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002262294A (en) * 2001-03-06 2002-09-13 Nec Corp System and method for controlling generated code quantity from image signal coder

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04369191A (en) 1991-06-18 1992-12-21 Toshiba Corp Picture compression/decoding device
US6134374A (en) * 1995-05-17 2000-10-17 Victor Company Of Japan, Ltd. Method and apparatus for processing picture information, and recording medium
US5890102A (en) * 1995-10-24 1999-03-30 Georgia Tech Research Corporation Jointly optimized subband coding system and method
JP2003174648A (en) 2001-12-04 2003-06-20 Kddi Research & Development Laboratories Inc Moving picture encoder
US20050175090A1 (en) * 2004-02-11 2005-08-11 Anthony Vetro Rate-distortion models for errors resilient video transcoding
US20060008006A1 (en) * 2004-07-07 2006-01-12 Samsung Electronics Co., Ltd. Video encoding and decoding methods and video encoder and decoder
KR20060083297A (en) 2005-01-14 2006-07-20 엘지전자 주식회사 Apparatus and method for encoding of real-time moving image
JP2007116655A (en) 2005-09-20 2007-05-10 Victor Co Of Japan Ltd Moving picture coding apparatus
KR20070053642A (en) 2005-11-21 2007-05-25 한국전자통신연구원 Method and apparatus for controlling bitrate of scalable video stream
US20090067493A1 (en) 2005-11-21 2009-03-12 Dong-San Jun Method and apparatus for controlling bitrate of scalable video stream
KR20070061105A (en) 2005-12-08 2007-06-13 한국전자통신연구원 Method and device for controlling transcoding bit-rate using complexity of macroblock
US20080298702A1 (en) * 2007-06-04 2008-12-04 Aricent Inc. Fixed rate JPEG encoding
KR20080107867A (en) 2007-06-08 2008-12-11 삼성전자주식회사 Method for rate control in video encoding
US20080304564A1 (en) 2007-06-11 2008-12-11 Samsung Electronics Co., Ltd. Bitrate control method and apparatus for intra-only video sequence coding
KR20080108775A (en) 2007-06-11 2008-12-16 삼성전자주식회사 Rate control method and apparatus for intra-only video sequence coding
CN101325698A (en) 2007-06-11 2008-12-17 三星电子株式会社 Bit rate control method and apparatus for intra-only video sequence coding
US20090252233A1 (en) * 2008-04-02 2009-10-08 Microsoft Corporation Adaptive error detection for mpeg-2 error concealment
US20100061461A1 (en) * 2008-09-11 2010-03-11 On2 Technologies Inc. System and method for video encoding using constructed reference frame

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140003498A1 (en) * 2012-07-02 2014-01-02 Microsoft Corporation Use of chroma quantization parameter offsets in deblocking
US9591302B2 (en) * 2012-07-02 2017-03-07 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US20170134728A1 (en) * 2012-07-02 2017-05-11 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US9781421B2 (en) * 2012-07-02 2017-10-03 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US20170353725A1 (en) * 2012-07-02 2017-12-07 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US10097832B2 (en) * 2012-07-02 2018-10-09 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US10250882B2 (en) 2012-07-02 2019-04-02 Microsoft Technology Licensing, Llc Control and use of chroma quantization parameter values
US10313670B2 (en) * 2012-07-02 2019-06-04 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US20190289291A1 (en) * 2012-07-02 2019-09-19 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US10652542B2 (en) * 2012-07-02 2020-05-12 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US10972735B2 (en) * 2012-07-02 2021-04-06 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US20210211669A1 (en) * 2012-07-02 2021-07-08 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US11595651B2 (en) * 2012-07-02 2023-02-28 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US20230156194A1 (en) * 2012-07-02 2023-05-18 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking
US11943442B2 (en) * 2012-07-02 2024-03-26 Microsoft Technology Licensing, Llc Use of chroma quantization parameter offsets in deblocking

Also Published As

Publication number Publication date
WO2010107237A2 (en) 2010-09-23
WO2010107237A3 (en) 2010-12-09
JP2012521141A (en) 2012-09-10
KR20100104864A (en) 2010-09-29
CN102356636A (en) 2012-02-15
KR101060495B1 (en) 2011-08-30
US20120002724A1 (en) 2012-01-05

Similar Documents

Publication Publication Date Title
US8948242B2 (en) Encoding device and method and multimedia apparatus including the encoding device
JP5180294B2 (en) Buffer-based rate control that utilizes frame complexity, buffer level, and intra-frame location in video encoding
KR100329892B1 (en) Control strategy for dynamically encoding multiple streams of video data in parallel for multiplexing onto a constant bit rate channel
KR101012600B1 (en) Rate control with picture-based lookahead window
KR101418950B1 (en) An improved video rate control for video coding standards
EP1446952B1 (en) Method and system for rate control during video transcoding
KR100343352B1 (en) Two-pass encoding method of digital motion video sequences for constant-or variable bit rate
US5598213A (en) Transmission bit-rate controlling apparatus for high efficiency coding of moving picture signal
KR100601615B1 (en) Apparatus for compressing video according to network bandwidth
US9955168B2 (en) Constraining number of bits generated relative to VBV buffer
JP2001148858A (en) Image information converter and image information conversion method
KR20030009669A (en) multi channel image encoding apparatus and encording method thereof
KR100394014B1 (en) Apparatus for transcoding video
JP4586340B2 (en) Encoding apparatus, encoding method, and program
US20090290636A1 (en) Video encoding apparatuses and methods with decoupled data dependency
JP4346732B2 (en) Method and system for processing multiple streams of video frames
JP2004241879A (en) Apparatus and method for image processing, recording medium, and program
JP3852442B2 (en) Data encoding method and apparatus
Lee Channel-Adaptive Rate Control for Low Delay Video Coding
Abdullah et al. Constant Bit Rate For Video Streaming Over Packet Switching Networks
Khamiss et al. Constant Bit Rate For Video Streaming Over Packet Switching Networks
JP2004072144A (en) Encoder and encoding method, program, and recording medium
JPH10155155A (en) Image signal transmitter

Legal Events

Date Code Title Description
AS Assignment

Owner name: CORE LOGIC INC., KOREA, REPUBLIC OF

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:KIM, SEONG HEE;REEL/FRAME:026940/0234

Effective date: 20110908

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: SMALL ENTITY

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: SMALL ENTITY

Free format text: PAYER NUMBER DE-ASSIGNED (ORIGINAL EVENT CODE: RMPN); ENTITY STATUS OF PATENT OWNER: SMALL ENTITY

FEPP Fee payment procedure

Free format text: MAINTENANCE FEE REMINDER MAILED (ORIGINAL EVENT CODE: REM.); ENTITY STATUS OF PATENT OWNER: SMALL ENTITY

LAPS Lapse for failure to pay maintenance fees

Free format text: PATENT EXPIRED FOR FAILURE TO PAY MAINTENANCE FEES (ORIGINAL EVENT CODE: EXP.); ENTITY STATUS OF PATENT OWNER: SMALL ENTITY

STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20190203