KR0147938B1 - Bit allocation circuit for keeping uniform peak signal noise ratio - Google Patents

Bit allocation circuit for keeping uniform peak signal noise ratio

Info

Publication number
KR0147938B1
KR0147938B1 KR1019940018827A KR19940018827A KR0147938B1 KR 0147938 B1 KR0147938 B1 KR 0147938B1 KR 1019940018827 A KR1019940018827 A KR 1019940018827A KR 19940018827 A KR19940018827 A KR 19940018827A KR 0147938 B1 KR0147938 B1 KR 0147938B1
Authority
KR
South Korea
Prior art keywords
noise ratio
bit allocation
frame
image
peak signal
Prior art date
Application number
KR1019940018827A
Other languages
Korean (ko)
Other versions
KR960006581A (en
Inventor
이민섭
Original Assignee
배순훈
대우전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 배순훈, 대우전자주식회사 filed Critical 배순훈
Priority to KR1019940018827A priority Critical patent/KR0147938B1/en
Publication of KR960006581A publication Critical patent/KR960006581A/en
Application granted granted Critical
Publication of KR0147938B1 publication Critical patent/KR0147938B1/en

Links

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/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/124Quantisation
    • H04N19/126Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
    • 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
    • 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/15Data rate or code amount at the encoder output by monitoring actual compressed data size at the memory before deciding storage at 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/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/172Methods 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 picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Landscapes

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

Abstract

본 발명은 디지탈 영상신호를 그룹단위(GOP)로 전송이 가능하도록 부호화하는 영상부호화장치에 있어서 이전에 엔코드된 프레임영상의 첨두신호대 잡음비(PSNR)를 고려하여 현재 엔코드될 프레임영상의 비트할당량을 계산하는 비트할당회로를 제공하기 위한 것으로, 본 발명에 따른 비트할당회로는, 엔코더된 영상을 복원하는 영상복원부; 인가되는 디지탈 영상신호를 프레임단위로 저장하는 메모리; 영상복원부로부터 출력되는 프레임 영상신호와 메모리로부터 독출된 프레임 영상신호를 이용하여 현재 엔코드된 프레임 영상의 첨두신호대 잡음비(PSNR)를 측정하는 첨두신호대 잡음비 측정부; 첨두신호대 잡음비 측정부로부터 출력되는 첨두신호대 잡음비와 엔코더로부터 출력되는 양자화파라미터와 출력비트를 카운트한 값을 이용하여 계산한 제1비트할당량(Ti, Tp, Tb)을 연산하여 구해진 현재 전송될 프레임영상의 제2비트할당량(Ti , Tp , Tb )을 엔코더로 제공하는 비트할당량 계산부를 포함하도록 구성된다. 따라서 연속적으로 재생되는 영상의 화질을 균일하게 제공할 수 있다.The present invention relates to a video encoding apparatus for encoding a digital video signal to be transmitted in a group unit (GOP), so that a bit allocation amount of a frame image to be currently encoded in consideration of the peak signal-to-noise ratio (PSNR) of a previously encoded frame image In order to provide a bit allocation circuit for computing a bit allocation circuit according to the present invention, an image restoring unit for restoring the encoded image; A memory for storing the applied digital video signal in units of frames; A peak signal-to-noise ratio measurement unit for measuring the peak signal-to-noise ratio (PSNR) of the currently encoded frame image by using the frame image signal output from the image restoration unit and the frame image signal read out from the memory; The current transmission obtained by calculating the first bit allocation (T i , T p , T b ) calculated using the peak signal-to-noise ratio output from the peak-to-noise ratio measurement unit, the quantization parameter output from the encoder, and the value of the output bit. And a bit allocation calculator for providing a second bit allocation (T i , T p , T b ) of the frame image to be encoded. Therefore, it is possible to uniformly provide the image quality of a continuously reproduced image.

Description

영상의 균일한 첨두신호대 잡음비를 유지하기 위한 비트할당회로Bit Allocation Circuit for Maintaining Uniform Peak Signal-to-Noise Ratio of Image

제1도는 본 발명에 따른 비트할당회로를 구비한 영상부호화장치의 블럭도이고,1 is a block diagram of an image encoding apparatus having a bit allocation circuit according to the present invention.

제2도는 제1도에 도시된 비트할당량 계산부의 상세한 회로도이고,FIG. 2 is a detailed circuit diagram of the bit allocation calculator shown in FIG.

제3도는 엔코드된 영상의 프레임단위 전송순서 예시도이다.3 illustrates an example of a frame-by-frame transmission sequence of an encoded image.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

10 : 엔코더 20 : 양자화파라미터 카운터10: encoder 20: quantization parameter counter

30 : 비트 카운터 40 : 영상복원부30: Beat Counter 40: Video Restoration Unit

50 : PSNR 측정부 60 : 프레임메모리50: PSNR measurement unit 60: frame memory

70 : 비트할당량 계산부 51 : 인트라(I)프레임 평균검출기70 bit allocation calculator 51 intra frame I detector

52 : 예측(P)프레임 평균검출기 53 : 양방향(B)프레임 평균검출기52: predictive (P) frame average detector 53: bidirectional (B) frame average detector

54~56 : 제1~3 선택기 57 : 계산부54 to 56: first to third selectors 57: calculation unit

본 발명은 영상신호를 압축하기 위한 부호화장치에 구비되는 비트할당회로에 관한 것으로, 특히 부호화되어 전송되는 영상의 첨두신호대 잡음비(Peak Signal to Noise Ratio, 이하 PSNR이라 약함)가 균일하게 유지되도록 비트를 할당하는 비트할당회로에 관한 것이다.The present invention relates to a bit allocation circuit provided in an encoding apparatus for compressing an image signal. In particular, the present invention relates to a bit allocation circuit so that a peak signal to noise ratio (hereinafter, referred to as PSNR) of an encoded image is uniformly maintained. The bit allocation circuit to allocate.

기존의 영상 부호화장치는 입력소스의 포맷에 따라 12 프레임 혹은 15 프레임을 하나의 프레임 그룹(일명 GOP(Group Of Picture)라고 함)으로하여 그룹단위 전송에 적합한 압축처리가 이루어진다. 이러한 압축처리로 전송되는 그룹내에는 잘 알려진 바와 같이 인트라(Intra 또는 I) 프레임(또는 픽쳐라고도 함), 예측(Predicted 또는 P) 프레임, 보간(Interpolated 또는 B 또는 Bidirectionally) 프레임들이 존재한다.Conventional video encoding apparatuses perform compression processing suitable for group-by-group transmission by making 12 or 15 frames into one frame group (called GOP (Group Of Picture)) according to the format of the input source. Within the group transmitted in this compression process, there are intra (I or I) frames (also called pictures), predicted (P or P) frames, interpolated (B or Bidirectionally) frames, as is well known.

인트라 프레임(이하 I 프레임이라 함)은 움직임보상을 하지 않고 모든 데이터를 이산여현변환하고 부호화하여 전송하는 프레임으로서, 대부분 각 그룹의 첫 번째 프레임으로 전송된다. 이는 이전 그룹의 움직임보상에 의한 예측오차가 해당 그룹에 누적되는 것을 방지하기 위한 것이다. 예측 프레임(이하 P프레임이라 함)은 이전의 I 프레임 혹은 P 프레임으로 부터 구해진 움직임벡터에 의하여 예측된 오차를 이산여현변환하고 부호화한 프레임이고, 보간 프레임(이하 B 프레임이라 함)은 앞과 뒤의 I 또는 P 프레임들로부터 양방향으로 구해진 움직임벡터에 의하여 예측된 오차를 이산여현변환하고 부호화한 프레임이다. 이러한 각 프레임들의 전송비트량은 지금까지 수학식 1에 의해 구해져 할당되었다.An intra frame (hereinafter, referred to as an I frame) is a frame for performing discrete cosine transform, encoding, and transmitting all data without motion compensation, and is mostly transmitted as the first frame of each group. This is to prevent the prediction error due to the motion compensation of the previous group from accumulating in the group. A prediction frame (hereinafter referred to as P frame) is a frame obtained by performing discrete cosine transform and encoding of an error predicted by a motion vector obtained from a previous I frame or P frame, and an interpolation frame (hereinafter referred to as B frame) It is a frame obtained by performing discrete cosine transform and encoding of an error predicted by a motion vector obtained bidirectionally from I or P frames. The transmission bit amount of each of these frames has been calculated and allocated by Equation 1 so far.

수학식 1에서 Ti, Tp, Tb는 각각 I프레임, P프레임 및 B프레임의 목표비트량(Target bit amount)으로서, R은 남은 GOP(Group Of Picture) 비트할당량이고, Np는 남은 P프레임의 갯수이고, Nb는 남은 B프레임의 갯수이고, Kp및 Kb는 일반 상수로서 Kp=1.0이고, Kb=1.4이다. 그리고 Xi, Xp, Xb는 초기에 각각 160×(비트레이트/115), 60×(비트레이트/115), 42×(비트레이트/115) 연산한 값이 이용되고, 그 다음부터는 해당 프레임을 코딩하여 발생된 총 비트량(S)과 양자화 계수의 평균값(AQ)을 곱한 값(S×AQ)을 해당 프레임내의 매크로 블록(MBNO)의 개수로 나눈 값((S×AQ)/MBNO)이 이용된다. 이와 같은 변수들을 이용하여 구해진 각 프레임별 목표비트량이 수학식 1의 우측 연산식(비트레이트/(8×프레임 레이트))에 의한 연산 결과값보다 작은 경우에는 우측 연산식에 의한 연산결과값을 해당 프레임의 목표 비트량으로 제공한다.In Equation 1, T i , T p , and T b are target bit amounts of I frames, P frames, and B frames, respectively, where R is the remaining Group Of Picture (GOP) bit allocation, and N p is the remaining bit amount. The number of P frames, N b is the number of remaining B frames, K p and K b are general constants, K p = 1.0 and K b = 1.4. X i , X p , and X b are the values of 160 × (bitrate / 115), 60 × (bitrate / 115), 42 × (bitrate / 115), respectively. A value obtained by multiplying the total bit amount S generated by coding a frame by the average value AQ of the quantization coefficients S × AQ divided by the number of macroblocks MBNO in the frame (S × AQ) / MBNO ) Is used. If the target bit amount obtained for each frame obtained using these variables is smaller than the result value calculated by the right expression (bitrate / (8x frame rate)) of Equation 1, the result value calculated by the right expression is applied. Provided as the target bit amount of the frame.

이처럼 기존에는 이전 프레임의 양자화 파라미터를 카운트한 값과 이전 프레임의 엔코딩되어 출력되는 데이터(또는 출력비트)를 카운트한 값을 이용하여 해당그룹에 남은 비트할당량을 계산하여 현재 엔코딩할 프레임의 비트할당량을 제공하였다. 즉, GOP에 할당된 총비트량이 GOP를 이루는 각 프레임에 분할되도록 할당하는데 있어서, 예를 들어 I 프레임, P 프레임, B 프레임 순으로 프레임이 전송될 때, I 프레임이 부호화된 후 발생된 비트량을 GOP에 할당된 총비트량(R)에서 감산한 값을 이용하여 그 다음에 이어지는 P 프레임의 비트할당량을 제공하고, 할당된 비트량에 따라 P 프레임이 부호화되어 발생된 비트량을 이전 프레임에 대한 비트할당후 남은 GOP의 비트할당량에서 감산한 값을 이용하여 다음에 이어지는 B 프레임의 비트할당량을 제공하는 방식으로 이루어진다. 그러나 이러한 비트할당방식은 그룹내에서 연속되는 프레임 영상의 화질에 대한 균일성이 전혀 고려되지 않고 있어 연속적으로 재생되는 화질의 첨두신호대 잡음비가 균일하게 유지되지 않는 문제가 있다.As described above, the bit allocation of the frame to be encoded currently is calculated by calculating the bit allocation remaining in the group by using the value of counting the quantization parameter of the previous frame and the data (or output bit) encoded and output of the previous frame. Provided. That is, in allocating so that the total amount of bits allocated to the GOP is divided into the frames forming the GOP, for example, when the frames are transmitted in the order of I frames, P frames, and B frames, the amount of bits generated after the I frames are encoded. Using the value subtracted from the total bit amount R allocated to the GOP to provide the bit allocation amount of the next P frame, and according to the allocated bit amount, the P frame is encoded and the generated bit amount is transferred to the previous frame. The bit allocation of the next B frame is provided by using a value subtracted from the bit allocation of the remaining GOP after bit allocation. However, this bit allocation method does not consider the uniformity of the image quality of successive frame images in the group at all, which causes a problem that the peak signal-to-noise ratio of the image quality continuously reproduced is not maintained uniformly.

따라서 본 발명은 상술한 문제를 해결하기 위하여 안출한 것으로, 이전에 엔코딩된 프레임 영상의 첨두신호대 잡음비(PSNR)를 측정한 값을 이용하여 현재 엔코딩될 프레임 영상의 할당 비트량을 계산하여 제공함으로써, 연속적으로 재생되는 화질의 첨두신호대 잡음비가 균일하게 유지되도록 하는 비트할당회로를 제공하는데 그 목적이 있다.Accordingly, the present invention has been made to solve the above-described problem, by calculating the amount of bits allocated to the frame image to be currently encoded using a value measured from the peak signal-to-noise ratio (PSNR) of the previously encoded frame image, An object of the present invention is to provide a bit allocation circuit for maintaining a peak signal-to-noise ratio of a continuously reproduced image quality uniformly.

상기 목적을 달성하기 위하여 본 발명에 따른 비트할당회로는,Bit allocation circuit according to the present invention in order to achieve the above object,

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세하게 설명하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

제1도는 본 발명에 따른 비트할당회로를 구비한 영상부호화장치의 블록도로서, 인가되는 디지탈 영상신호를 압축하기 위하여 엔코드하는 엔코더(10), 엔코더(10)로부터 출력되는 양자화파라미터를 카운트하기 위한 양자화파라미터 카운터(20), 엔코더(10)로부터 출력되는 비트를 카운트하기 위한 비트 카운터(30), 엔코더(10)로부터 출력되는 압축된 영상신호를 원래의 상태로 복원하기 위한 영상 복원부(40), 영상 복원부(40)로부터 출력되는 신호에 의하여 각 프레임 영상의 첨두신호대 잡음비(Peak Signal to Noise Ratio, 이하 PSNR이라 약함)를 측정하기 위한 PSNR 측정부(50), 디지탈 영상신호를 프레임단위로 저장하였다가 PSNR측정부(50)로 제공하기 위한 프레임 메모리(60), 양자화 파라미터 카운터(20) 및 비트 카운터(30)로부터 출력되는 카운트값에 의하여 해당 프레임의 목표비트량을 계산한 값과 PSNR측정부(50)로부터 제공되는 해당 프레임의 PSNR값에 의하여 해당 프레임의 목표비트량을 계산하여 엔코더(10)로 제공하기 위한 비트할당량 계산부(70)로 이루어진다.1 is a block diagram of an image encoding apparatus having a bit allocation circuit according to an embodiment of the present invention, in which an encoder 10 for encoding an applied digital image signal is compressed and a quantization parameter output from the encoder 10 is counted. The quantization parameter counter 20 for reproducing, the bit counter 30 for counting bits output from the encoder 10, and the image reconstructor 40 for reconstructing the compressed video signal output from the encoder 10 to an original state. PSNR measurement unit 50 for measuring the peak signal to noise ratio (hereinafter, referred to as PSNR) of each frame image by the signal output from the image reconstructor 40, and digital image signal in units of frames. Frame counts 60 to be stored and provided to the PSNR measurement unit 50 by the count values output from the frame memory 60, the quantization parameter counter 20, and the bit counter 30. Calculates a target bit amount of the frame based on the calculated value of the target bit amount and the PSNR value of the frame provided from the PSNR measuring unit 50 to the bit allocation calculator 70 for providing the encoder 10 to the encoder 10. Is done.

제2도는 본 발명에 따라 제1도에 도시된 비트할당량 계산부(70)에 구비되는 회로도로서, PSNR 측정부(50)로부터 전송되는 I 프레임의 PSNR(이하 PSNRi라 함)에 대한 평균을 구하는 I 프레임 평균검출기(51), PSNR 측정부(50)로부터 출력되는 PSNRi와 I 프레임 평균검출기(51)로부터 출력되는 값을 선택적으로 출력하는 제1선택기(54), PSNR 측정부(50)로부터 전송되는 P 프레임의 PSNR(이하 PSNRp)에 대한 평균을 구하는 P 프레임 평균검출기(52), PSNR 측정부(50)로부터 전송되는 PSNRp와 P 프레임 평균검출기(52)로부터 출력되는 데이터를 선택적으로 출력하는 제2선택기(55), PSNR 측정부(50)로부터 전송되는 B 프레임의 PSNR(이하 PSNRb라 함)에 대한 평균을 구하는 B 프레임 평균검출기(53), PSNR 측정부(50)로부터 전송되는 PSNRb와 B 프레임 평균검출기(53)로부터 출력되는 신호를 선택적으로 출력하기 위한 제3선택기(56), 양자화 파라미터 카운터(20)로부터 전송되는 카운트 결과값과 비트 카운터(30)로부터 전송되는 카운트 결과값을 이용하여 수학식 1에 의해 구해진 각 프레임의 목표비트 할당량(Ti, Tp, Tb)과 제1~3선택기(54~56)로부터 출력되는 신호를 연산하여 각 프레임별 비트할당량(Ti*, Tp*, Tb*)을 엔코더(10)로 출력하는 계산부(57)로 구성된다.FIG. 2 is a circuit diagram provided in the bit allocation calculator 70 shown in FIG. 1 according to the present invention. The average of PSNRs (hereinafter referred to as PSNR i ) of I frames transmitted from the PSNR measurement unit 50 is shown in FIG. The first selector 54 and the PSNR measuring unit 50 for selectively outputting the PSNR i output from the I frame average detector 51 and the PSNR measuring unit 50 and the values output from the I frame average detector 51. P-frame average detector 52, which calculates an average of PSNRs (hereinafter referred to as PSNR p ) of P frames transmitted from the P-frame average detector 52 and PSNR p transmitted from the PSNR measurement unit 50, and data output from the P-frame average detector 52 are selectively selected. From the second frame selector 55 and PSNR measurement unit 50 to obtain the average of the PSNR (hereinafter referred to as PSNR b ) of the B frame transmitted from the PSNR measurement unit 50 Selects the signal output from the transmitted PSNR b and B frame average detector 53 The target bit of each frame obtained by Equation 1 using the count result value transmitted from the third selector 56 and the quantization parameter counter 20 and the count result value transmitted from the bit counter 30. By calculating the signals output from the quotas (T i , T p , T b ) and the first to third selectors 54 to 56, the bit allocations (T i *, T p *, T b *) for each frame are calculated. And a calculation unit 57 for outputting to 10).

제3도는 GOP단위로 엔코드되어 전송되는 프레임영상의 전송순서에 대한 예로서, 2개의 B 프레임이 I 프레임보다 먼저 전송되는 구조이다. 여기서 B프레임은 해당 그룹의 I 프레임에 대한 움직임벡터를 고려한 프레임이다.FIG. 3 is an example of a transmission sequence of frame images encoded and transmitted in a GOP unit, and two B frames are transmitted before I frames. Here, the B frame is a frame considering the motion vector of the I frame of the group.

그러면 첨부된 도면을 참조하여 본 실시예의 동작을 상세하게 설명하기로 한다. 종래와 같이 동작되는 양자화 파라미터 카운터(20), 비트 카운터(30), 영상복원부(40), 프레임 메모리(60) 및 엔코더(10) 등에 대해서는 간략하게 설명하기로 한다.Next, the operation of the present embodiment will be described in detail with reference to the accompanying drawings. The quantization parameter counter 20, the bit counter 30, the image restoring unit 40, the frame memory 60, the encoder 10, and the like, which are operated in the related art, will be briefly described.

우선, 엔코더(10)에서 인가된 디지탈 영상신호에 대한 엔코딩이 이루어져 출력되면, 양자화 파라미터 카운터(20)는 엔코딩시 발생되는 양자화 파라미터를 카운트하고, 비트 카운터(30)는 엔코더(10)로부터 출력되는 데이터 비트를 카운트한다. 양자화 파라미터 카운터(20) 및 비트 카운터(30)에서 카운트된 결과는 비트할당량 계산부(70)로 각각 전송된다.First, when encoding is performed on the digital video signal applied by the encoder 10, the quantization parameter counter 20 counts the quantization parameter generated during encoding, and the bit counter 30 is output from the encoder 10. Count the data bits. The results counted by the quantization parameter counter 20 and the bit counter 30 are transmitted to the bit allocation calculator 70, respectively.

비트할당량 계산부(70)는 양자화 파라미터 카운트(20)와 비트 카운터(30)로부터 카운트된 결과가 전송되면, 상술한 수학식 1에 의하여 종래와 같이 프레임별 목표비트량(Ti, Tp, Tb)을 계산한다.When the bit allocation calculator 70 transmits the result counted from the quantization parameter count 20 and the bit counter 30, the target bit amount T i , T p , Calculate T b ).

한편, 엔코더(10)로부터 출력된 압축된 영상신호는 미도시된 수신장치로 전송하기 위한 전송로로 전송됨과 동시에 영상복원부(40)로 전송되어 복원처리된다. 복원처리된 프레임 영상신호는 PSNR 측정부(50)로 전송된다.On the other hand, the compressed video signal output from the encoder 10 is transmitted to the transmission path for transmission to the receiver not shown, and at the same time it is transmitted to the image restoration unit 40 is restored. The reconstructed frame video signal is transmitted to the PSNR measurement unit 50.

PSNR 측정부(50)는 영상복원부(40)로부터 전송된 프레임 영상신호와 프레임메모리(60)로부터 독출된 프레임 영상신호를 이용하여 해당 프레임영상의 화질의 척도로 사용되는 PSNR을 구하여 비트할당량 계산부(70)로 전송한다. 이 때, 해당 프레임이 I 프레임인 경우에 비트 할당량 계산부(70)로 전송되는 PSNR은 PSNRi가 되고, P프레임인 경우에 전송되는 PSNR은 PSNRp가 되고, B프레임인 경우에 전송되는 PSNR은 PSNRb가 된다. 이와 같이 어떤 프레임의 PSNR이 전송되는 지는 해당 GOP층에 분포되어 있는 프레임순에 의해 결정된다. 예를 들어 GOP층에 분포되어 있는 프레임순서가 제3도에 도시된 바와 같다면, PSNR 측정부(50)로부터 PSNRb, PSNRb, PSNRi, PSNRb, PSNRb, PSNRp, PSNRb,... 순의 PSNR이 출력된다.The PSNR measurement unit 50 calculates the bit allocation by using the frame image signal transmitted from the image restoration unit 40 and the frame image signal read out from the frame memory 60 to obtain the PSNR used as a measure of the image quality of the frame image. Transfer to section 70. At this time, when the corresponding frame is an I frame, the PSNR transmitted to the bit allocation calculator 70 becomes PSNR i , and the PSNR transmitted when the P frame is PSNR p , and the PSNR transmitted when the B frame is B frame. Becomes PSNR b . The PSNR of which frame is transmitted in this way is determined by the frame order distributed in the corresponding GOP layer. For example, if the frame order distributed in the GOP layer is as shown in FIG. 3, PSNR b , PSNR b , PSNR i , PSNR b , PSNR b , PSNR p , PSNR b , ... PSNR is output in order.

비트할당량 계산부(70)는 양자화파라미터 카운터(20) 및 비트카운터(30)로부터 전송된 신호를 이용하여 계산한 각 프레임별 비트할당량(Ti, Tp, Tb)과 PSNR 측정부(50)로부터 전송되는 PSNR를 이용하여 현재 엔코딩할 프레임의 비트할당량(Ti′, Tp′, Tb′)을 계산한다.The bit allocation calculator 70 calculates the bit allocation amount T i , T p , T b and the PSNR measurement unit 50 for each frame calculated using the signals transmitted from the quantization parameter counter 20 and the bit counter 30. The bit allocations (T i ′, T p ′, T b ′) of the current frame to be encoded are calculated by using the PSNR transmitted from the C 1.

즉, 제3도에 도시된 순번에 의해 PSNR 측정부(50)로부터 PSNRb가 인가되면, 비트할당량 계산부(70)는 인가된 PSNRb를 제3선택기(56) 및 B프레임 평균검출기(53)로 동시에 전송한다.That is, when PSNR b is applied from the PSNR measurement unit 50 by the sequence shown in FIG. 3, the bit allocation calculator 70 converts the applied PSNR b to the third selector 56 and the B frame average detector 53. To send simultaneously.

B 프레임 평균검출기(53)는 인가되는 PSNRb를 제3누산기(531)로 전송하여 누산되도록 하고, 제3카운터(532)는 PSNRb의 입력횟수를 카운트한다. 제3도에 도시된 예에 의하면, 연속해서 2개의 B프레임이 인가되므로, 제3카운터(532)의 카운트값은 2가 되고, 제3누산기(531)에서 누산된 값은 2개의 B프레임에 대해 발생된 PSNR을 누산한 결과가 된다. 이와 같이 누산한 결과값 및 카운트값은 제3평균값 검출부(533)로 전송되어 현재 전송된 B프레임의 평균값을 검출한다.The B frame average detector 53 transmits the applied PSNR b to the third accumulator 531 to accumulate, and the third counter 532 counts the number of times the PSNR b is input. According to the example shown in FIG. 3, since two B frames are applied successively, the count value of the third counter 532 becomes two, and the value accumulated by the third accumulator 531 is divided into two B frames. This is the result of accumulating the PSNR generated for. The accumulated result value and count value are transmitted to the third average value detector 533 to detect the average value of the currently transmitted B frame.

제3평균값 검출부(533)에서 이루어지는 평균값 검출방식은 일반적인 평균값 검출방식과 동일하다. 즉, 제3카운터(532)로부터 출력되는 카운트된 값으로 제3누산기(531)로부터 출력되는 누산된 결과값을 나누어 평균값을 검출한다. 이 때, 평균값 검출은, 상술한 누산되는 프레임에서 알수 있는 바와 같이, 다른 성분의 프레임영상이 출력되기 전까지 엔코더(10)로부터 출력된 프레임영상에 대해 이루어진다.The average value detection method performed by the third average value detector 533 is the same as the general average value detection method. That is, the average value is detected by dividing the accumulated result value output from the third accumulator 531 by the counted value output from the third counter 532. At this time, the average value detection is performed on the frame image output from the encoder 10 until the frame image of the other component is output, as can be seen in the accumulated frame described above.

제3선택기(56)는 PSNR 측정부(50)로부터 전송되는 PSNRb와 제3평균값 검출부(533)로부터 출력되는 평균값을 선택적으로 출력한다. 제3선택기(56)의 선택을 제어하는 신호는 연속되는 정상영상신호가 인가되는 경우와 급격하게 변화되는 경우를 검출하여 발생된 신호이다. 즉, 정상적인 영상신호가 전송되는 경우에는 제3선택기(56)를 통해 제3평균값 검출부(533)로부터 출력되는 평균값이 선택되어 전송되도록 제어신호가 발생되고, 급격하게 화면이 변화되는 경우에는 이전에 만들어진 평균 PSNR로 대처하기가 어려우므로 바로 앞서 처리된 영상의 PSNR을 이용하기 위하여 인가되는 PSNRb가 선택되어 전송되도록 제어신호가 발생된다. 이 때, 제3누산기(531) 및 제3카운터(532)는 새로 인가되는 PSNRb를 위하여 리셋된다. 그리고 제3선택기(56)를 통해 전송되는 PSNRb는 계산부(57)로 전송된다.The third selector 56 selectively outputs the PSNR b transmitted from the PSNR measurement unit 50 and the average value output from the third average value detection unit 533. The signal for controlling the selection of the third selector 56 is a signal generated by detecting a case where a continuous normal video signal is applied and a case where it suddenly changes. That is, when a normal video signal is transmitted, a control signal is generated so that the average value output from the third average value detector 533 is selected and transmitted through the third selector 56, and when the screen changes abruptly, Since it is difficult to cope with the generated average PSNR, a control signal is generated so that the PSNR b applied to use the PSNR of the immediately processed image is selected and transmitted. At this time, the third accumulator 531 and the third counter 532 are reset for the newly applied PSNR b . The PSNR b transmitted through the third selector 56 is transmitted to the calculator 57.

계산부(57)는 제3선택기(56)로부터 PSNRb가 인가되면, 하기 수학식 2와 같이 연산한다.When the PSNR b is applied from the third selector 56, the calculation unit 57 calculates the following equation (2).

수학식 2에서 Tb는 상술한 비트할당량 계산부(70)에서 언급한 바와 같이 사전에 구해진 것이고, PSNRi와 PSNRp는 이전에 후술할 제1선택기(54) 및 제2선택기(55)로부터 전송된 값이다. 수학식 2에 의해 얻어진 Tb 는 현재 엔코더(10)에서 엔코딩될 프레임의 비트할당량으로 제공된다.In Equation 2, T b is previously obtained as mentioned in the bit allocation calculator 70 described above, and PSNR i and PSNR p are obtained from the first selector 54 and the second selector 55 which will be described later. The value sent. T b obtained by Equation 2 is provided as a bit allocation of a frame to be encoded in the current encoder 10.

엔코더(10)에서 I 프레임이 엔코딩되어 출력되면, PSNR 측정부(50)로부터 PSNRi가 출력된다. 이에 따라 비트할당량 계산부(70)는 인가된 PSNRi를 I 프레임 평균 검출기(51) 및 제1선택기(54)로 전송한다. I 프레임 평균검출기(51) 및 제1선택기(54)의 동작은 상술한 제3선택기(56)와 B 프레임 평균검출기(53)와 동일하게 동작하게 해당되는 PSNRi를 계산부(57)로 전송된다.When the I frame is encoded and output from the encoder 10, the PSNR i is output from the PSNR measuring unit 50. Accordingly, the bit allocation calculator 70 transmits the applied PSNR i to the I frame average detector 51 and the first selector 54. The operation of the I frame average detector 51 and the first selector 54 transmits the corresponding PSNR i to the calculation unit 57 in the same manner as the above-described third selector 56 and the B frame average detector 53. do.

계산부(57)는 제1선택기(54)로부터 PSNRi가 인가되면, 수학식 3과 같이 연산하여 Ti 를 엔코더(10)에서 엔코드될 프레임의 비트할당량으로 제공한다.When PSNR i is applied from the first selector 54, the calculation unit 57 calculates T i as a bit allocation amount of a frame to be encoded by the encoder 10 by calculating as in Equation 3 below.

수학식 3에서 PSNRi만 현재 인가된 값이고, 나머지는 사전에 구해진 값으로 계산부(57)가 보유하고 있는 값이다.In Equation 3, only PSNR i is a currently applied value, and the rest are values previously obtained by the calculation unit 57.

한편, 엔코더(10)에서 엔코드되어 출력되는 영상이 P프레임인 경우에, PSNR 측정부(50)로부터 PSNRp가 출력된다. 비트할당량 계산부(70)는 인가된 PSNRp를 제2선택기(55)와 P 프레임 평균검출기(52)로 각각 전송한다. 제2선택기(55) 및 P 프레임 평균검출기(52) 역시 상술한 선택기들(54, 56)와 프레임 평균검출기들(51, 53)과 동일하게 구동되어 해당되는 PSNRp를 출력한다. 출력된 PSNRp는 계산부(57)로 전송된다.On the other hand, when the video encoded and output by the encoder 10 is a P frame, the PSNR p is output from the PSNR measurement unit 50. The bit allocation calculator 70 transmits the applied PSNR p to the second selector 55 and the P frame average detector 52, respectively. The second selector 55 and the P frame average detector 52 are also driven in the same manner as the above-described selectors 54 and 56 and the frame average detectors 51 and 53 to output corresponding PSNR p . The output PSNR p is transmitted to the calculator 57.

계산부(57)는 PSNRp가 인가되면, 수학식 4와 같이 연산하여 Tp 를 현재 엔코더(10)에서 엔코딩될 프레임의 비트할당량으로 제공한다.When the PSNR p is applied, the calculation unit 57 calculates P p ' as a bit allocation amount of the frame to be encoded by the current encoder 10 by calculating as in Equation 4.

수학식 4도 수학식 3에서와 같이 PSNRp는 제2선택기(55)로부터 현재 출력된 값이고, 나머지는 사전에 보유하고 있던 값을 이용한다. 예를 들어 제3도에 도시된 바와 같은 순서로 프레임이 전송될 때, 계산부(57)에서 인가되는 PSNRp를 이용하여 비트할당량을 계산할 때, PSNRi는 3프레임 이전에 존재하는 I 프레임에 대한 엔코딩시 발생되었던 PSNRi을 이용하고, PSNRb는 P프레임 바로 이전에 전송된 2개의 B프레임에 대한 엔코딩시 발생되었던 PSNRb을 이용한다.In Equation 4, as in Equation 3, PSNR p is a value currently output from the second selector 55, and the rest uses a value previously held. For example, when the frames are transmitted in the order as shown in FIG. 3, when calculating the bit allocation using the PSNR p applied by the calculation unit 57, the PSNR i is applied to the I frame existing three frames earlier. using the PSNR for i which was generated during the encoding and, b PSNR is used in the PSNR b that was generated during the encoding for the two B frames transmitted in the immediately preceding P frame.

이와 같이 제1~3선택기(54~56)로부터 동시에 PSNR 이 출력되는 것이 아니라 전송되는 프레임순서대로 출력된다. 즉, 제3도에 도시된 예에 의하면, 먼저 제3선택기(56)로부터 PSNR이 출력되어 계산부(57)로 전송되고, 그 다음에는 제1선택기(54)로부터 PSNR이 출력되어 계산부(57)로 전송되고, 그 다음에는 제3선택기(56)로부터 PSNR이 출력되어 계산부(57)로 전송되고, 또 그 다음에는 제2선택기(55)로부터 PSNR이 출력되어 계산부(57)로 전송된다. 이와 같이 인가되는 PSNR에 대해 계산부(57)는 새로운 비트할당량을 계산하여 엔코더(10)로 출력한다.In this way, the PSNRs are not simultaneously output from the first to third selectors 54 to 56, but are output in the order of the transmitted frames. That is, according to the example shown in FIG. 3, the PSNR is first outputted from the third selector 56 to the calculation unit 57, and then the PSNR is outputted from the first selector 54 to calculate the calculation unit ( 57, and then the PSNR is output from the third selector 56 to the calculation unit 57, and then the PSNR is output from the second selector 55 to the calculation unit 57. Is sent. The calculation unit 57 calculates a new bit allocation for the PSNR applied in this way and outputs the new bit allocation to the encoder 10.

이상, 상술한 바와 같이 본 발명에 따른 비트할당회로는 이전에 엔코드된 프레임 영상의 첨두신호대 잡음비(PSNR)와 이전에 비트할당시 이용되었던 값들(Ti, Tp, Tb다른 2 프레임종류의 PSNR값)을 연산하여 현재 엔코드될 프레임의 목표비트를 할당하도록 구현함으로써, 연속되는 영상신호 재생시 균등한 화질을 제공할 수 있는 효과가 있다.As described above, in the bit allocation circuit according to the present invention, the peak signal-to-noise ratio (PSNR) of a previously encoded frame image and the values (T i , T p , and T b ) used in the previous bit allocation are different. By assigning the target bit of the frame to be currently encoded by calculating the PSNR value of), there is an effect that can provide an equal picture quality during continuous video signal reproduction.

Claims (4)

인가되는 디지탈 영상신호를 압축하기 위한 엔코더를 구비한 영상 부호화 장치의 비트할당회로에 있어서, 상기 엔코더로부터 출력되는 영상을 원래의 상태로 복원하기 위한 영상복원부; 상기 인가되는 디지탈 영상신호를 프레임단위로 저장하는 메모리; 상기 영상복원부로부터 출력되는 프레임 영상신호와 상기 메모리로부터 독출된 프레임 영상신호를 이용하여 현재 엔코드된 프레임 영상의 첨두신호대 잡음비(PSNR)를 측정하는 첨두신호대 잡음비 측정부; 상기 첨두신호대 잡음비 측정부로부터 출력되는 첨두신호대 잡음비와 상기 엔코더로부터 출력되는 양자화파라미터와 출력비트를 카운트한 값을 이용하여 계산한 제1비트할당량(Ti, Tp, Tb)을 연산하여 구해진 현재 전송될 프레임영상의 제2비트할당량(Ti , Tp , Tb )을 상기 엔코더로 제공하는 비트할당량 계산부를 포함하는 것을 특징으로 하는 영상의 균일한 첨두신호대 잡음비(PSNR) 를 유지하기 위한 비트할당회로.A bit allocation circuit of an image encoding apparatus having an encoder for compressing an applied digital image signal, comprising: an image restoring unit for restoring an image output from the encoder to an original state; A memory for storing the applied digital video signal in units of frames; A peak signal-to-noise ratio measurement unit for measuring a peak signal-to-noise ratio (PSNR) of the currently encoded frame image by using the frame image signal output from the image restorer and the frame image signal read out from the memory; The first bit allocation (T i , T p , T b ) calculated using the peak signal-to-noise ratio output from the peak signal-to-noise ratio measurement unit, the quantization parameter output from the encoder, and the value of the output bit is calculated. And a bit allocation calculator for providing a second bit allocation (T i , T p , T b ) of the frame image to be transmitted to the encoder. Bit allocation circuit for holding. 제1항에 있어서, 상기 비트할당량 계산부는 상기 첨두신호대 잡음비 측정부로부터 출력되는 첨두신호대 잡음비에 대한 평균값을 검출하는 평균검출기, 상기 첨두신호대 잡음비 측정부로부터 출력되는 첨두신호대 잡음비와 상기 평균검출기로부터 출력되는 신호를 전송하는 영상신호의 급격한 변화여부에 따라 선택적으로 출력하는 선택기, 상기 선택기로부터 출력되는 신호와 상기 제1비트할당량을 연산하여 상기 제2비트할당량을 구하기 위한 계산부를 포함하는 것을 특징으로 하는 영상의 균일한 첨두신호대 잡음비(PSNR)을 유지하기 위한 비트할당회로.2. The apparatus of claim 1, wherein the bit allocation calculator detects an average value of the peak signal-to-noise ratio output from the peak signal-to-noise ratio measurement unit, and outputs the peak signal-to-noise ratio output from the peak signal-to-noise ratio measurement unit and the average detector. And a selector for selectively outputting according to a sudden change of an image signal for transmitting a signal, and a calculator for calculating the second bit allocation by calculating the signal output from the selector and the first bit allocation. Bit allocation circuitry to maintain a uniform peak signal-to-noise ratio (PSNR) of the image. 제2항에 있어서, 상기 평균검출기는 상기 첨두신호대 잡음비 측정부로부터 출력되는 첨두신호대 잡음비를 누적하기 위한 누산기, 상기 첨두신호대 잡음비 측정부로부터 전송되는 첨두신호대 잡음비의 발생 개수를 카운트하기 위한 카운터, 상기 카운트값으로 상기 누산기에 누적된 값을 나누어 해당 프레임의 평균값을 검출하여 상기 계산부로 출력하기 위한 평균값 검출부를 포함하는 것을 특징으로 하는 영상의 균일한 첨두신호대 잡음비를 유지하기 위한 비트할당회로.3. The apparatus of claim 2, wherein the average detector comprises: an accumulator for accumulating the peak signal-to-noise ratio output from the peak signal-to-noise ratio measurement unit, a counter for counting the number of occurrences of the peak signal-to-noise ratio transmitted from the peak signal-to-noise ratio measurement unit, and And a mean value detector for dividing a value accumulated in the accumulator by a count value and detecting an average value of a corresponding frame and outputting the average value of the corresponding frame to the calculator. 제2항에 있어서, 상기 비트할당량 계산부는 상기 첨두신호대 잡음비 측정부로부터 전송되는 인트라 프레임, 예측 프레임, 양방향 프레임의 첨두신호대 잡음비에 대하여 별도 처리가 이루어지도록 상기 평균검출기와 상기 선택기를 구비하는 것을 특징으로 하는 영상의 균일한 첨두신호대 잡음비를 유지하기 위한 비트할당회로.3. The apparatus of claim 2, wherein the bit allocation calculator comprises the average detector and the selector to separately process the peak signal-to-noise ratios of the intra frame, the predicted frame, and the bi-directional frame transmitted from the peak-to-noise ratio measurement unit. Bit allocation circuit for maintaining a uniform peak signal-to-noise ratio of an image.
KR1019940018827A 1994-07-30 1994-07-30 Bit allocation circuit for keeping uniform peak signal noise ratio KR0147938B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019940018827A KR0147938B1 (en) 1994-07-30 1994-07-30 Bit allocation circuit for keeping uniform peak signal noise ratio

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019940018827A KR0147938B1 (en) 1994-07-30 1994-07-30 Bit allocation circuit for keeping uniform peak signal noise ratio

Publications (2)

Publication Number Publication Date
KR960006581A KR960006581A (en) 1996-02-23
KR0147938B1 true KR0147938B1 (en) 1998-09-15

Family

ID=19389476

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019940018827A KR0147938B1 (en) 1994-07-30 1994-07-30 Bit allocation circuit for keeping uniform peak signal noise ratio

Country Status (1)

Country Link
KR (1) KR0147938B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101087109B1 (en) * 2005-03-28 2011-11-25 엘지전자 주식회사 Video encoder and its method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101087109B1 (en) * 2005-03-28 2011-11-25 엘지전자 주식회사 Video encoder and its method

Also Published As

Publication number Publication date
KR960006581A (en) 1996-02-23

Similar Documents

Publication Publication Date Title
KR100756596B1 (en) Video data encoder and video data encoding method
KR0176448B1 (en) Image coding method and apparatus
JP3934712B2 (en) Video signal encoding method and apparatus
EP0689360B1 (en) Variable transfer rate video coding apparatus and method
EP0881836B1 (en) Pre-processing device for MPEG 2 coding
US5956426A (en) Multi-coding apparatus
KR0153671B1 (en) Rate controller of hdtv encoder
US5694171A (en) Moving image encoding apparatus
JP4619479B2 (en) Statistical multiplexing system
KR20000023504A (en) Variable bit rate coding apparatus
KR0147938B1 (en) Bit allocation circuit for keeping uniform peak signal noise ratio
JP3812267B2 (en) Video encoding apparatus and method
JP3480067B2 (en) Image coding apparatus and method
JP3313118B2 (en) Complexity judgment device
JPH0662393A (en) Multiplexed dynamic image encoding method and device
JP3858520B2 (en) Video encoding apparatus and method
JP3812269B2 (en) Video encoding apparatus and method
JPH09512400A (en) A system for dynamically allocating scarce resources
KR100337103B1 (en) Complexity Determination Device of Data Signal
JPH11252572A (en) Code amount distribution device
KR0124174B1 (en) Bit allocation circuit for keeping uniform peak signal noise ratio
JP2999568B2 (en) Video coding method for storage
JP3307367B2 (en) Variable transfer rate coding device
KR100357089B1 (en) Frame reconstruction device of mpeg video encoder
JPH02222388A (en) Moving picture encoding method

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20120503

Year of fee payment: 15

FPAY Annual fee payment

Payment date: 20130502

Year of fee payment: 16

EXPY Expiration of term