KR102003048B1 - Method and apparatus for video encoding, and method and apparatus for video decoding - Google Patents

Method and apparatus for video encoding, and method and apparatus for video decoding Download PDF

Info

Publication number
KR102003048B1
KR102003048B1 KR1020180088861A KR20180088861A KR102003048B1 KR 102003048 B1 KR102003048 B1 KR 102003048B1 KR 1020180088861 A KR1020180088861 A KR 1020180088861A KR 20180088861 A KR20180088861 A KR 20180088861A KR 102003048 B1 KR102003048 B1 KR 102003048B1
Authority
KR
South Korea
Prior art keywords
value
video signal
bit depth
transform
unit
Prior art date
Application number
KR1020180088861A
Other languages
Korean (ko)
Other versions
KR20180089350A (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 삼성전자주식회사
Publication of KR20180089350A publication Critical patent/KR20180089350A/en
Application granted granted Critical
Publication of KR102003048B1 publication Critical patent/KR102003048B1/en

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/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • 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/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • H04N19/36Scalability techniques involving formatting the layers as a function of picture distortion after decoding, e.g. signal-to-noise [SNR] scalability
    • 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/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/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • 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/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • 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/18Methods 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 set of transform coefficients
    • 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/184Methods 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 bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission
    • 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
    • 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
    • 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/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
    • 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/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/98Adaptive-dynamic-range coding [ADRC]
    • 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/174Methods 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 slice, e.g. a line of blocks or a group of blocks

Landscapes

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

Abstract

비디오 신호의 부호화 방법 및 장치, 그 복호화 방법 및 장치가 개시된다. 본 발명에 따른 비디오 신호의 부호화 방법은 변환 과정에서 발생하는 중간값의 최대 비트와 비디오 신호가 갖을 수 있는 최대 비트 정밀도를 고려하여 비디오 신호의 최적 스케일링 비트 뎁스를 결정하고, 결정된 최적 스케일링 비트 뎁스의 값 및 비디오 신호의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 비디오 신호를 스케일링하여 변환을 수행하는 것을 특징으로 한다.A video signal coding method and apparatus, a decoding method and an apparatus therefor are disclosed. The method of encoding a video signal according to the present invention determines an optimal scaling bit depth of a video signal in consideration of a maximum bit of an intermediate value and a maximum bit precision of a video signal generated in a conversion process, And scaling the video signal according to a local shift value that is a difference value of the original bit depth of the video signal.

Figure R1020180088861
Figure R1020180088861

Description

비디오 신호의 부호화 방법과 그 장치, 및 비디오 복호화 방법과 그 장치{Method and apparatus for video encoding, and method and apparatus for video decoding}TECHNICAL FIELD The present invention relates to a video signal encoding method and apparatus, a video decoding method, and a video decoding apparatus,

본 발명은 비디오의 부호화 및 복호화에 관한 것이다.The present invention relates to encoding and decoding of video.

고해상도 또는 고화질 비디오 컨텐트를 재생, 저장할 수 있는 하드웨어의 개발 및 보급에 따라, 고해상도 또는 고화질 비디오 컨텐트를 효과적으로 부호화하거나 복호화하는 비디오 코덱의 필요성이 증대하고 있다. 기존의 비디오 코덱에 따르면, 비디오는 소정 크기의 매크로블록에 기반하여 제한된 부호화 방식에 따라 부호화되고 있다. Background of the Invention [0002] As the development and dissemination of hardware capable of playing back and storing high-resolution or high-definition video content increases the need for video codecs to effectively encode or decode high-definition or high-definition video content. According to the conventional video codec, video is encoded according to a limited encoding method based on a macroblock of a predetermined size.

디스플레이되는 영상의 화질은 영상 데이터 값을 표현하는 비트수에 영향을 받는다. 영상 데이터의 정밀도를 나타내는 비트 뎁스(bit depth), 즉 영상 데이터 값을 표현하는 비트 수가 증가할수록 더욱 다양한 레벨로 데이터를 표현할 수 있기 때문이다. 그러나, 영상 데이터의 정밀도를 증가시키기 위해서 비트 뎁스를 무작정 증가시키는 경우, 영상 데이터 처리시 오버플로우(overflow)가 발생하거나 고정 소수점 연산으로 인해 반올림 에러(rounding error)가 발생할 수 있다.The image quality of the displayed image is affected by the number of bits representing the image data value. This is because the bit depth representing the precision of the image data, that is, the number of bits representing the image data value, can be expressed at a more various levels. However, if the bit depth is increased in order to increase the precision of the image data, an overflow may occur in processing the image data or a rounding error may occur due to the fixed-point operation.

본 발명이 해결하고자 하는 기술적 과제는 비디오 신호의 변환 및 역변환시에 비디오 신호의 비트 뎁스를 증가시킴으로써 연산 정밀도를 향상시키는 한편, 비트 뎁스의 증가에도 불구하고 연산 과정에서 허용가능한 비트 뎁스를 초과하는 오버플로우가 발생되지 않도록 비디오 신호 처리를 수행하는 비디오 신호의 부호화 방법 및 장치, 그 복호화 방법 및 장치를 제공하는 것이다.SUMMARY OF THE INVENTION It is an object of the present invention to improve the precision of a video signal by increasing the bit depth of a video signal during conversion and inverse transformation of a video signal, A method and an apparatus for decoding a video signal for performing a video signal process so that no flow occurs, and a decoding method and apparatus therefor.

본 발명의 일 실시예에 따른 비디오 신호의 부호화 방법은 상기 비디오 신호의 변환 과정에서 발생하는 중간값의 최대 비트와 상기 비디오 신호가 갖을 수 있는 최대 비트 정밀도를 고려하여 상기 비디오 신호의 최적 스케일링 비트 뎁스를 결정하는 단계; 상기 결정된 최적 스케일링 비트 뎁스의 값 및 상기 비디오 신호의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 상기 비디오 신호를 스케일링하는 단계; 및 상기 스케일링된 비디오 신호에 대한 변환을 수행하는 단계를 포함하는 것을 특징으로 한다.A method of encoding a video signal according to an exemplary embodiment of the present invention includes calculating a best bit rate of the video signal by considering a maximum bit of an intermediate value generated in the process of converting the video signal and a maximum bit precision that the video signal can have, ; Scaling the video signal according to a value of the determined optimal scaling bit depth and a local shift value which is a difference value of a source bit depth of the video signal; And performing a conversion on the scaled video signal.

본 발명의 일 실시예에 따른 비디오 신호의 복호화 방법은 수신된 비트스트림을 파싱하여 비디오 신호의 부호화된 데이터를 추출하는 단계; 상기 추출된 부호화된 데이터에 대해 엔트로피 복호화를 수행하여 엔트로피 복호화된 데이터를 복원하는 단계; 상기 엔트로피 복호화된 데이터의 역변환 과정에서 발생하는 중간값의 최대 비트와 상기 엔트로피 복호화된 데이터가 갖을 수 있는 최대 비트 정밀도를 고려하여 상기 엔트로피 복호화된 데이터의 최적 스케일링 비트 뎁스를 결정하는 단계; 상기 결정된 최적 스케일링 비트 뎁스의 값 및 상기 엔트로피 복호화된 데이터의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 상기 엔트로피 복호화된 데이터를 스케일링하는 단계; 및 상기 스케일링된 엔트로피 복호화된 데이터에 대한 역변환을 수행하는 단계를 포함하는 것을 특징으로 한다.A method of decoding a video signal according to an exemplary embodiment of the present invention includes parsing a received bit stream to extract encoded data of the video signal; Performing entropy decoding on the extracted encoded data to recover entropy-decoded data; Determining an optimal scaling bit depth of the entropy-decoded data in consideration of a maximum bit value of an intermediate value generated in an inverse process of the entropy-decoded data and a maximum bit precision of the entropy-decoded data; Scaling the entropy decoded data according to a value of the determined optimal scaling bit depth and a local shift value which is a difference value of a one-bit depth of the entropy decoded data; And performing inverse transform on the scaled entropy-decoded data.

본 발명의 다른 실시예에 따른 비디오 신호의 복호화 방법은 상기 비디오 신호의 변환 과정에서 발생하는 중간값의 최대 비트와 상기 비디오 신호가 갖을 수 있는 최대 비트 정밀도를 고려하여 결정된 최적 스케일링 비트 뎁스의 값 및 상기 비디오 신호의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 스케일링되어 부호화된 비디오 신호를 수신하는 단계; 상기 수신된 비디오 신호에 대한 엔트로피 복호화, 양자화 및 역변환을 수행하여 복호화된 비디오 신호를 생성하는 단계; 상기 복호화된 비디오 신호에 대한 디스케일링을 수행하기 위한 상기 로컬 쉬프트 값을 결정하는 단계; 및 상기 결정된 로컬 쉬프트 값에 따라서 상기 복호화된 비디오 신호에 대한 디스케일링을 수행하는 단계를 포함하는 것을 특징으로 한다.A method of decoding a video signal according to another exemplary embodiment of the present invention includes decoding a value of an optimal scaling bit depth determined in consideration of a maximum bit of an intermediate value generated in a process of converting the video signal and a maximum bit precision of the video signal, Receiving a scaled and encoded video signal according to a local shift value which is a difference value of a source bit depth of the video signal; Performing entropy decoding, quantization, and inverse transform of the received video signal to generate a decoded video signal; Determining the local shift value to perform descaling on the decoded video signal; And performing descaling on the decoded video signal according to the determined local shift value.

본 발명의 일 실시예에 따른 비디오 신호의 부호화 장치는 상기 비디오 신호의 변환 과정에서 발생하는 중간값의 최대 비트와 상기 비디오 신호가 갖을 수 있는 최대 비트 정밀도를 고려하여 상기 비디오 신호의 최적 스케일링 비트 뎁스를 결정하고, 결정된 최적 스케일링 비트 뎁스의 값 및 상기 비디오 신호의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 상기 비디오 신호를 스케일링하는 스케일링부; 및 상기 스케일링된 비디오 신호에 대한 변환을 수행하는 변환부를 포함하는 것을 특징으로 한다.The apparatus for encoding a video signal according to an exemplary embodiment of the present invention calculates an optimal scaling bit depth of the video signal in consideration of a maximum bit value of an intermediate value generated in a process of converting the video signal, A scaling unit for scaling the video signal according to a value of a determined optimum scaling bit depth and a local shift value which is a difference value of a source bit depth of the video signal; And a conversion unit for performing conversion on the scaled video signal.

본 발명의 일 실시예에 따른 비디오 신호의 복호화 장치는 수신된 비트스트림을 파싱하여 비디오 신호의 부호화된 데이터를 추출하는 파싱부; 상기 추출된 부호화된 데이터에 대해 엔트로피 복호화를 수행하여 엔트로피 복호화된 데이터를 복원하는 엔트로피 복호화부; 상기 엔트로피 복호화된 데이터의 역변환 과정에서 발생하는 중간값의 최대 비트와 상기 엔트로피 복호화된 데이터가 갖을 수 있는 최대 비트 정밀도를 고려하여 상기 엔트로피 복호화된 데이터의 최적 스케일링 비트 뎁스를 결정하고, 상기 결정된 최적 스케일링 비트 뎁스의 값 및 상기 엔트로피 복호화된 데이터의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 상기 엔트로피 복호화된 데이터를 스케일링하는 스케일링부; 및 상기 스케일링된 엔트로피 복호화된 데이터에 대한 역변환을 수행하는 단계를 역변환부를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided an apparatus for decoding a video signal, including: a parser for parsing a received bit stream to extract encoded data of the video signal; An entropy decoding unit for performing entropy decoding on the extracted encoded data to recover entropy-decoded data; Determining an optimal scaling bit depth of the entropy-decoded data in consideration of a maximum bit value of an intermediate value generated in an inverse process of the entropy-decoded data and a maximum bit precision of the entropy-decoded data, A scaling unit for scaling the entropy-decoded data according to a value of a bit depth and a local shift value which is a difference value of a one-bit depth of the entropy-decoded data; And performing an inverse transform on the scaled entropy-decoded data.

본 발명의 다른 실시예에 따른 비디오 신호의 복호화 장치는 상기 비디오 신호의 변환 과정에서 발생하는 중간값의 최대 비트와 상기 비디오 신호가 갖을 수 있는 최대 비트 정밀도를 고려하여 결정된 최적 스케일링 비트 뎁스의 값 및 상기 비디오 신호의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 스케일링되어 부호화된 비디오 신호에 대한 엔트로피 복호화, 양자화 및 역변환을 수행하여 복호화된 비디오 신호를 생성하는 복호화부; 및 상기 복호화된 비디오 신호에 대한 디스케일링을 수행하기 위한 상기 로컬 쉬프트 값을 결정하고, 상기 결정된 로컬 쉬프트 값에 따라서 상기 복호화된 비디오 신호에 대한 디스케일링을 수행하는 디스케일링부를 포함하는 것을 특징으로 한다.The apparatus for decoding a video signal according to another embodiment of the present invention decodes a value of an optimal scaling bit depth determined in consideration of a maximum bit of an intermediate value generated in the process of converting the video signal and a maximum bit precision that the video signal can have, A decoding unit for performing entropy decoding, quantization, and inverse transform of a scaled and encoded video signal according to a local shift value, which is a difference value of a source bit depth of the video signal, to generate a decoded video signal; And a descaling unit for determining the local shift value for performing descaling on the decoded video signal and performing descaling on the decoded video signal according to the determined local shift value .

본 발명에 따르면, 현재 코덱에서 허용 가능한 비트 뎁스를 초과하지 않는 범위 내에서, 즉 오버 플로우를 발생시키지 않으면서 비디오 신호 처리시 연산 정밀도를 향상시킬 수 있다.According to the present invention, it is possible to improve the calculation precision in the video signal processing within a range not exceeding the allowable bit depth in the current codec, that is, without causing an overflow.

도 1 은 본 발명의 일 실시예에 따른 비디오 부호화 장치의 블록도를 도시한다.
도 2는 도 1의 변환부(130)의 구체적인 구성을 나타낸 블록도이다.
도 3은 본 발명의 제 2 실시예에 따른 부호화 장치의 구성을 나타낸 블록도이다.
도 4는 본 발명의 제 3 실시예에 따른 부호화 장치의 구성을 나타낸 블록도이다.
도 5는 본 발명의 제 4 실시예에 따른 부호화 장치의 구성을 나타낸 블록도이다.
도 6은 본 발명의 제 5 실시예에 따른 부호화 장치의 구성을 나타낸 블록도이다.
도 7은 본 발명의 일 실시예에 따른 비디오 신호의 변환 과정을 설명하기 참조도이다.
도 8은 본 발명의 다른 실시예에 따른 스케일링 동작을 설명하기 위한 참조도이다.
도 9는 본 발명의 실시예에 따른 비디오 신호의 부호화 방법을 나타낸 플로우 차트이다.
도 10은 본 발명의 일 실시예에 따른 비디오 신호의 복호화 장치를 나타낸 블록도이다.
도 11은 본 발명의 다른 실시예에 따른 비디오 신호의 복호화 장치의 구성을 나타낸 블록도이다.
도 12는 본 발명의 일 실시예에 따른 비디오 신호의 복호화 방법을 나타낸 플로우 차트이다.
도 13은 본 발명의 다른 실시예에 따른 비디오 신호의 복호화 방법을 나타낸 플로우 차트이다.
1 shows a block diagram of a video encoding apparatus according to an embodiment of the present invention.
2 is a block diagram showing a specific configuration of the conversion unit 130 of FIG.
3 is a block diagram showing a configuration of an encoding apparatus according to a second embodiment of the present invention.
4 is a block diagram showing a configuration of an encoding apparatus according to a third embodiment of the present invention.
5 is a block diagram showing a configuration of an encoding apparatus according to a fourth embodiment of the present invention.
6 is a block diagram showing a configuration of an encoding apparatus according to a fifth embodiment of the present invention.
FIG. 7 is a diagram illustrating a process of converting a video signal according to an exemplary embodiment of the present invention. Referring to FIG.
8 is a reference diagram for explaining a scaling operation according to another embodiment of the present invention.
9 is a flowchart illustrating a method of encoding a video signal according to an embodiment of the present invention.
10 is a block diagram illustrating an apparatus for decoding a video signal according to an embodiment of the present invention.
11 is a block diagram illustrating a configuration of an apparatus for decoding a video signal according to another embodiment of the present invention.
12 is a flowchart illustrating a method of decoding a video signal according to an embodiment of the present invention.
13 is a flowchart illustrating a method of decoding a video signal according to another embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예들에 대하여 구체적으로 설명한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1 은 본 발명의 일 실시예에 따른 비디오 부호화 장치의 블록도를 도시한다.1 shows a block diagram of a video encoding apparatus according to an embodiment of the present invention.

일 실시예에 따른 비디오 부호화 장치(100)는 예측부(110), 스케일링부(120), 변환부(130), 디스케일링부(140), 양자화부(150) 및 엔트로피 부호화부(160)를 포함한다.The video encoding apparatus 100 according to an embodiment includes a predictor 110, a scaling unit 120, a transform unit 130, a descaling unit 140, a quantization unit 150, and an entropy encoding unit 160 .

예측부(110)는, 입력 비디오 신호를 소정 크기의 블록들로 분할하고, 분할된 각 블록에 대하여 인터 예측 또는 인트라 예측을 통해 예측 블록을 생성한다. 구체적으로, 예측부(110)는 이전에 부호화된 후 복원된 참조 픽처의 소정 탐색 범위 내에서 현재 블록과 유사한 영역을 가리키는 움직임 벡터를 생성하는 인터 예측 및 현재 블록에 인접한 주변 블록의 데이터를 이용하여 예측 블록을 생성하는 인트라 예측을 수행하고, 예측 블록과 원 입력 블록 사이의 차이값이 레지듀얼 신호를 생성하여 출력한다.The prediction unit 110 divides the input video signal into blocks of a predetermined size, and generates prediction blocks through inter prediction or intra prediction for each of the divided blocks. Specifically, the prediction unit 110 uses inter prediction to generate a motion vector indicating an area similar to the current block within the predetermined search range of the reference picture reconstructed after being encoded and data of neighboring blocks adjacent to the current block Performs intra prediction to generate a prediction block, and generates a residual signal by outputting a difference value between the prediction block and the original input block.

스케일링부(120)는 레지듀얼 신호의 비트 뎁스를 변경하는 스케일링을 수행한다. 변환부(130)는 비트 뎁스가 변경된 레지듀얼 신호를 주파수 영역으로 변환하는 주파수 변환을 수행한다. 디스케일링부(140)는 주파수 영역으로 변환된 변환 신호의 변경된 비트 뎁스를 복원하는 디스케일링을 수행한다. 양자화부(150)는 디스케일링된 변환 신호에 대한 양자화를 수행한다. 미도시되었으나, 본 발명의 일 실시예에 따른 비디오 부호화 장치(100)는 예측부(110)에서 참조 데이터로 이용하기 위해서 양자화된 신호를 역양자화 및 역변환하는 역양자화부 및 역변환부를 포함할 수 있다. 엔트로피 부호화부(160)는 양자화된 변환 신호에 대하여 가변 길이 부호화를 수행하여 비트스트림을 생성한다.The scaling unit 120 performs scaling to change the bit depth of the residual signal. The conversion unit 130 performs frequency conversion for converting the residual signal having the changed bit depth into the frequency domain. The descaling unit 140 performs descaling to recover the changed bit depth of the converted signal in the frequency domain. The quantization unit 150 performs quantization on the descaled transform signal. The video coding apparatus 100 according to an embodiment of the present invention may include an inverse quantization unit and an inverse transform unit for dequantizing and inverse transforming the quantized signal for use as reference data in the prediction unit 110 . The entropy encoding unit 160 performs variable length encoding on the quantized transformed signal to generate a bitstream.

이하, 본 발명에 따른 비디오 신호의 스케일링 및 디스케일링 동작에 대하여 구체적으로 설명한다.Hereinafter, a scaling and descaling operation of a video signal according to the present invention will be described in detail.

일 실시예에 따른 비디오 신호의 부호화 장치(100)는 입력 비디오 신호를 2차원 블록들로 나누며, 변환부(130)에서는 공간-주파수 분석을 행하는 선형 변환을 통해 분할된 블록들을 주파수 영역으로 변환한다. 이러한 선형 변환의 예로는 Karhuhen-Loeve Transform(KLT), Singular Value Decomposition(SVD), 및 이산 여현 변환(Discrete Cosine Transform, 이하 "DCT"라 함), 이산 웨이블릿 변환(Discrete Wavelet Transform) 등이 있다. 이러한 선형 변환 과정은 입력 블록과 소정의 계수들로 구성된 변환 행렬 사이의 행렬 곱으로 표현될 수 있다. 이하의 설명에서 선형 변환의 예로서 가장 대표적인 DCT를 중심으로 본 발명의 실시예들에 대하여 설명하지만, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 사상은 이러한 DCT 변환 과정 이외에 다른 선형 변환 과정에도 적용될 수 있음을 본 발명의 상세한 설명을 통해 이해할 수 있을 것이다.The apparatus 100 for encoding a video signal according to an embodiment divides an input video signal into two-dimensional blocks, and the transforming unit 130 transforms the divided blocks into a frequency domain through linear transformation to perform spatial-frequency analysis . Examples of such linear transformations include Karhuhen-Loeve Transform (KLT), Singular Value Decomposition (SVD), Discrete Cosine Transform (DCT), and Discrete Wavelet Transform. This linear transformation process can be expressed as a matrix multiplication between an input block and a transformation matrix composed of predetermined coefficients. In the following description, embodiments of the present invention will be described with the DCT being the most representative as an example of the linear transformation. However, those skilled in the art will understand that, It will be understood by those skilled in the art that the present invention can be applied to other linear transformation processes.

도 7은 본 발명의 일 실시예에 따른 비디오 신호의 변환 과정을 설명하기 참조도이다.FIG. 7 is a diagram illustrating a process of converting a video signal according to an exemplary embodiment of the present invention. Referring to FIG.

전술한 바와 같이, 일 실시예에 따른 변환부(130)는 비디오 신호를 주파수 영역으로 변환한다. 예를 들어, 변환부(130)는 NxN(N은 정수) 입력 블록에 대해서 열 방향 변환(column-wise transform) 및 행 방향 변환(row-wise transform)을 수행하여 NxN 변환 계수 블록을 생성한다. NxN 입력 블록을 Input, 행 방향의 DCT 변환 행렬을 Transform_hor, 열 방향의 DCT 변환 행렬을 Transform_ver, 변환 결과에 따른 출력값을 Output이라고 한다면, 도 7에 도시된 바와 같이 변환 과정은 다음의 수학식; Output=Transform_hor x Input x Transform_ver 과 같은 행렬곱으로 표현될 수 있다. 여기서, 첫 번째 행렬 곱셈 Transform_hor x Input는 N×N 입력 블록인 Input의 각 행에 대해서 1차원 DCT를 수행하는 것에 해당되며, Transform_hor x Input에 Transform_ver 를 곱하는 것은 각 열에 대해 1차원 DCT를 수행하는 것에 해당된다. 행 방향의 DCT 변환 행렬 Transform_hor과 열 방향의 DCT 변환 행렬 Transform_ver 는 서로 이항(transpose) 행렬 관계이다. As described above, the transform unit 130 according to an embodiment transforms a video signal into a frequency domain. For example, the transform unit 130 performs a column-wise transform and a row-wise transform on an NxN (N is an integer) input block to generate an NxN transform coefficient block. If the NxN input block is input, the row direction DCT transformation matrix is Transform_hor, the column direction DCT transformation matrix is Transform_ver, and the output value according to the conversion result is Output, the conversion process is expressed by the following equation: Output = Transform_hor x Input x Transform_ver. Here, the first matrix multiplication Transform_hor x Input corresponds to performing a one-dimensional DCT on each row of an N × N input block, and multiplying Transform_hor x Input by Transform_ver is performed by performing one-dimensional DCT on each column . The row-direction DCT transformation matrix Transform_hor and the column-direction DCT transformation matrix Transform_ver are transpose matrix relations.

행 방향의 변환 행렬 Transform_hor의 (i,k)번째(i,k는 정수)에 위치한 계수값을 Hik, 입력 블록 Input의 (i,k)번째 위치한 값을 Iik, 열 방향의 변환 행렬 Transform_ver의 (i,k)번째에 위치한 계수값을 Vik라고 정의한다. 행 방향의 DCT 변환 행렬을 Transform_hor의 (i,k)번째의 성분 Hik 는 다음의 수학식 1과 같이 정의될 수 있다. Let Hi k be the coefficient value located at the (i, k is an integer) of the transformation matrix of the row direction Transform_hor, I ik the value located at the (i, k) th position of the input block Input, Transform_ver Is defined as Vi k . The DCT transform matrix in the row direction is transformed into the (i, k) -th component H ik Can be defined as the following equation (1).

Figure 112018075421417-pat00001
Figure 112018075421417-pat00001

(i,k=0,...,N-1 ,

Figure 112018075421417-pat00002
,
Figure 112018075421417-pat00003
)(i, k = 0, ..., N-1,
Figure 112018075421417-pat00002
,
Figure 112018075421417-pat00003
)

열 방향의 DCT 변환 행렬 Transform_ver의 (i,k)번째의 성분 Vik는 이항 행렬인 행 방향의 DCT 변환 행렬 Transform_hor의 성분 Hik 와 유사하게 코사인 함수를 이용한 값으로 표현된다. 일반적으로, 변환 과정에서 이러한 변환 행렬의 계수값은 그대로 이용되지 않고, 덧셈과 쉬프트 연산만으로 변환 과정을 수행하기 위해서 소정의 스케일링 계수를 곱한 값을 이용한다. 수학식 1에서는 유동 소수점(floating point)를 이용하는 DCT 변환인 경우이지만, DCT 변환은 유동 소수점을 이용한 변환 이외에 고정 소숫점 변환(fixed point transform)을 이용할 수 있다. 본 발명에 따른 사상은 모든 변환 행렬에 적용될 수 있으며, 변환의 유형에 제한되지 않는다.The (i, k) -th component V ik of the column direction DCT transform matrix Transform_ver is a component of the row direction DCT transform matrix Transform_hor which is a binary matrix H ik And is represented by a value using a cosine function. Generally, the coefficient values of such a transformation matrix are not directly used in the conversion process, but a value obtained by multiplying a predetermined scaling coefficient by the addition and the shift operation is used to perform the conversion process. In Equation (1), the DCT transform is a DCT transform using a floating point, but a DCT transform can use a fixed point transform in addition to a transform using a floating point. The mapping according to the present invention can be applied to all transformation matrices and is not limited to the type of transformation.

입력 블록(730)에 대하여 행 방향의 1차원 DCT를 수행하는 경우, 즉 첫 번째 행렬 곱셈 Transform_hor x Input을 계산하는 경우, 행렬 곱셈 Transform_hor x Input의 연산에 따른 중간값 행렬의 각 성분은 HabxIcd(a,b,c,d는 1에서 4까지의 정수 중 임의의 값)와 같은 곱셉값들을 더한 값을 갖게 된다. 일 예로, Transform_hor x Input의 연산 결과에 따른 중간값 행렬의 (1,1) 번째 성분은 H11xI11+H12xI21+H13xI31 +H14xI41 이다. 만약, 현재 변환되는 입력 블록의 입력값의 비트 뎁스를 m(m은 정수)이라고 한다면, 입력값 Icd의 절대값은 2^m 이하의 값을 갖는다. 즉 Icd≤2m이다. 또한, 변환 블록을 구성하는 각 성분 Hab의 절대값이 2p(p는 정수) 이하의 값을 갖는다고 가정한다면, 행 방향의 1차원 변환, 즉 Transform_hor x Input의 연산 결과에 따른 행렬의 각 성분은 4x2mx2p, 즉 2m+p+2 이하의 값을 갖게 된다. 이러한 결과를 다른 측면에서 살펴보면, 행 방향의 1차원 DCT를 수행함으로써, m의 비트 뎁스를 갖었던 입력값이 최대 p+2 만큼 비트 뎁스가 증가할 수 있는 것으로 이해할 수 있다. 즉, 변환 과정에서는 곱셈과 덧셈 연산을 통해서 입력값에 소정의 값이 곱해진 것과 같이 비트 뎁스가 증가한다. 유사하게, 열 방향의 1차원 DCT를 수행하는 경우에도, 변환 과정에서 곱셈과 덧셈 연산으로 인해서, 연산 과정 중의 중간값은 입력값에 비하여 큰 값을 갖게 되어 비트 뎁스가 증가한다.When performing the one-dimensional DCT in the row direction with respect to the input block 730, that is, when calculating the first matrix multiplication Transform_hor x Input, each component of the intermediate value matrix according to the operation of matrix multiplication Transform_hor x Input is H ab xI and cd (a, b, c, and d are any of integers from 1 to 4). For example, the (1,1) th component of the intermediate value matrix according to the calculation result of Transform_hor x Input is H 11 x I 11 + H 12 x I 21 + H 13 x I 31 + H 14 x I 41 to be. If the bit depth of the input value of the current input block is m (m is an integer), the absolute value of the input value I cd is less than 2 m. That is, I cd ≤2 m . Assuming that the absolute value of each component H ab constituting the transform block has a value equal to or smaller than 2 p (p is an integer), the one-dimensional transformation in the row direction, that is, the angle of the matrix according to the operation result of Transform_hor x Input The component has a value of 4 x 2 m x 2 p , that is, 2 m + p + 2 or less. From another aspect, it can be understood that by performing one-dimensional DCT in the row direction, an input value having a bit depth of m can increase the bit depth by a maximum of p + 2. That is, in the conversion process, the bit depth increases as the input value is multiplied by a predetermined value through multiplication and addition operations. Likewise, even in the case of performing one-dimensional DCT in the column direction, the intermediate value during the calculation process has a larger value than the input value due to the multiplication and addition operations in the conversion process, thereby increasing the bit depth.

따라서, 본 발명은 이러한 변환 과정에서 발생하는 중간값이 부호화 장치 및 복호화 장치 내에서 이용가능한 최대 비트 정밀도 이하의 값을 갖게 함으로써 연산 과정에서 발생할 수 있는 오버 플로우를 방지하는 한편, 변환 과정에서 증가하는 비트 뎁스를 고려하여 비디오 신호의 비트 뎁스를 증가시킴으로써 연산의 정밀도를 향상시키는 스케일링 방식을 제공한다.Therefore, the present invention prevents an overflow that may occur in the calculation process by making the intermediate value generated in the conversion process have a value equal to or less than the maximum bit precision available in the encoding apparatus and the decoding apparatus, And provides a scaling method that increases the precision of computation by increasing the bit depth of the video signal in consideration of the bit depth.

1차원의 변환 과정에서 발생하는 비트 뎁스 증가량을 TransformBitIncreasement, 변환부(110)에 입력되는 입력 비디오 신호의 비트 뎁스를 m, 디스케일링부(140)에 의하여 감소하는 비트 뎁스 감소량을 de_scaling_bits , 도 7에 도시된 바와 같은 행 방향과 열 방향의 2번의 1차원 변환 과정을 통해서 각각 TransformBitIncreasement 만큼의 비트 뎁스가 증가한다고 하면, 디스케일링부(140)을 통해 출력되는 신호의 비트 뎁스의 최대값은 m+2xTransformBitIncreasement-de_scaling_bits 이다. 즉, 디스케일링부(140)을 통해 출력되는 신호의 절대값은 2^(m+2xTransformBitIncreasement-de_scaling_bits) 이하의 값을 갖게 된다. 따라서, 오버 플로우를 방지하기 위해서는 이러한 연산 과정에서 발생하는 중간값이 갖을 수 있는 최대값인 2^(m+2xTransformBitIncreasement-de_scaling_bits)가 부호화 장치(100)에서 이용가능한 최대값 이하가 되어야 한다. 즉, 비트 뎁스 측면에서 중간값이 갖을 수 있는 최대 비트 m+2xTransformBitIncreasement-de_scaling_bits가 부호화 장치(100)에서 이용가능한 최대 비트 정밀도 이하가 되어야 한다.The bit depth of the input video signal input to the conversion unit 110 is denoted by m, the bit depth reduction amount by which the descaling unit 140 reduces the bit depth is denoted by de_scaling_bits, Assuming that the bit depths of the TransformBitIncreasement are increased through two one-dimensional conversion processes in the row direction and the column direction, the maximum bit depth of the signal output through the descaling unit 140 is m + 2xTransformBitIncreasement -de_scaling_bits. That is, the absolute value of the signal output through the descaling unit 140 has a value equal to or less than 2 (m + 2xTransformBitIncreasement-de_scaling_bits). Therefore, in order to prevent the overflow, the maximum value 2 ^ (m + 2xTransformBitIncreasement-de_scaling_bits) that the intermediate value generated in the calculation process can have is less than the maximum value available in the encoding apparatus 100. [ That is, the maximum bit m + 2xTransformBitIncreasement-de_scaling_bits that the intermediate value can have in terms of bit depth should be equal to or less than the maximum bit precision available in the encoding apparatus 100. [

따라서, 스케일링부(120)는 이러한 중간값이 갖을 수 있는 최대값을 고려하여 예측부(110)에서 출력되는 레지듀얼 신호의 최적 스케일링 비트 뎁스를 결정한다. 구체적으로, 스케일링부(120)에서 비트 뎁스가 변경되어 변환부(130)로 입력되는 레지듀얼 신호의 비트 뎁스를 최적 스케일링 비트 뎁스인 mopt라고 가정해 보면, 변환부(130) 및 디스케일링부(140)에 의해 변환 및 디스케일링 과정을 거친 중간값은 2^(mopt+2xTransformBitIncreasement-de_scaling_bits) 이므로 중간값의 비트 뎁스는 mopt+2xTransformBitIncreasement-de_scaling_bits 이다. 부호화 장치(100)에서 이용가능한 최대 비트 정밀도를 Maxbit라고 할 때, 오버 플로우를 방지하기 위해서는 다음의 수학식 2의 조건을 만족하여야 한다.Therefore, the scaling unit 120 determines the optimal scaling bit depth of the residual signal output from the predicting unit 110 in consideration of the maximum value that the intermediate value can have. Assuming that the bit depth of the residual signal which is changed by the scaling unit 120 and is input to the transform unit 130 is m opt which is the optimal scaling bit depth, the transform unit 130 and the descaling unit 130, (M opt + 2xTransformBitIncreasement-de_scaling_bits), the bit depth of the intermediate value is m opt + 2xTransformBitIncreasement-de_scaling_bits. Assuming that the maximum bit precision available in the encoding apparatus 100 is Maxbit, the following Equation 2 must be satisfied in order to prevent overflow.

Figure 112018075421417-pat00004
Figure 112018075421417-pat00004

스케일링부(120)는 수학식 2를 만족시키는 최대값인 mopt를 결정하고, 이러한 최대 mopt값을 최적 스케일링 비트 뎁스 mopt를 결정한다. 스케일링부(120)는 결정된 최적 스케일링 비트 뎁스 mopt와 예측부(110)로부터 입력되는 레지듀얼 신호의 비트 뎁스 m을 비교하여, 최적 스케일링 비트 뎁스 mopt와 레지듀얼 신호의 비트 뎁스 m의 차이값인 로컬 쉬프트값(local_shift)을 다음의 수학식 3과 같이 결정한다.The scaling unit 120 determines m opt , which is the maximum value satisfying Equation (2), and determines the optimal scaling bit depth m opt as the maximum m opt value. The scaling unit 120 compares the determined optimal scaling bit depth m opt with the bit depth m of the residual signal input from the predictor 110 and calculates a difference value between the optimal scaling bit depth m opt and the bit depth m of the residual signal (Local_shift) is determined as shown in the following Equation 3. " (3) "

Figure 112018075421417-pat00005
Figure 112018075421417-pat00005

스케일링부(120)는 로컬 쉬프트값(local_shift)이 0보다 큰 경우, 즉 결정된 최적 스케일링 비트 뎁스 mopt가 레지듀얼 신호의 비트 뎁스 m보다 큰 경우, 로컬 쉬프트값만큼 레지듀얼 신호를 좌향 쉬프트('<<')하여 레지듀얼 신호의 비트 뎁스를 증가시킴으로써 레지듀얼 신호의 비트 정밀도를 증가시킨다. 즉, 원 레지듀얼 신호를 Input, 비트 뎁스가 변경된 레지듀얼 신호를 Adjusted_Input이라고 할 때, 스케일링부(120)는 다음의 수학식 4와 같이 레지듀얼 신호의 비트 뎁스를 변경한다.The scaling unit 120 scales the residual signal by a local shift value when the local shift value local_shift is greater than 0, that is, when the determined optimal scaling bit depth m opt is larger than the bit depth m of the residual signal, <<') to increase the bit precision of the residual signal, thereby increasing the bit precision of the residual signal. That is, when the original residual signal is input and the residual signal whose bit depth is changed is called Adjusted_Input, the scaling unit 120 changes the bit depth of the residual signal according to Equation (4).

Figure 112018075421417-pat00006
Figure 112018075421417-pat00006

예를 들어, 레지듀얼 신호의 비트 뎁스가 5, 최적 스케일링 비트 뎁스 mopt 가 8인 경우 레지듀얼 신호를 3비트만큼 좌향 쉬프트하여 레지듀얼 신호의 비트 뎁스를 8로 증가시킨다.For example, when the bit depth of the residual signal is 5 and the optimal scaling bit depth m opt is 8, the residual signal is shifted leftward by 3 bits to increase the bit depth of the residual signal to 8.

또한, 스케일링부(120)는 로컬 쉬프트값(local_shift)이 0보다 작은 경우, 즉 결정된 최적 스케일링 비트 뎁스 mopt가 레지듀얼 신호의 비트 뎁스 m보다 작은 경우, 로컬 쉬프트의 절대값만큼 레지듀얼 신호를 우향 쉬프트('>>')하여 레지듀얼 신호의 비트 뎁스를 감소시킨다. 즉, 스케일링부(120)는 다음의 수학식 5와 같이 레지듀얼 신호의 비트 뎁스를 변경한다.If the local shift value (local_shift) is smaller than 0, that is, if the determined optimal scaling bit depth m opt is smaller than the bit depth m of the residual signal, the scaling unit 120 outputs a residual signal as an absolute value of the local shift ('>>') to reduce the bit depth of the residual signal. That is, the scaling unit 120 changes the bit depth of the residual signal according to Equation (5).

Figure 112018075421417-pat00007
Figure 112018075421417-pat00007

수학식 5에서

Figure 112018075421417-pat00008
으로써, 스케일링부(120)는 로컬 쉬프트값(local_shift)이 0보다 작은 경우에는 수학식 5와 같이 반올림 및 부호 정보를 고려하여 좌향 쉬프트 연산을 수행하여 비트 뎁스를 감소시킨다. 로컬 쉬프트값(local_shift)이 0인 경우, 스케일링부(120)는 스케일링 과정을 스킵한다.In Equation (5)
Figure 112018075421417-pat00008
When the local shift value (local_shift) is less than 0, the scaling unit 120 performs a left shift operation in consideration of rounding and sign information as shown in Equation (5) to reduce the bit depth. When the local shift value (local_shift) is 0, the scaling unit 120 skips the scaling process.

한편, 디스케일링부(140)는 스케일링부(120)에서 변경된 비트 뎁스를 원 비트 뎁스로 복원하는 스케일링의 역과정을 수행한다. 구체적으로, 로컬 쉬프트값(local_shift)이 0보다 큰 경우, 즉 결정된 최적 스케일링 비트 뎁스 mopt가 레지듀얼 신호의 비트 뎁스 m보다 큰 경우, 디스케일링부(140)는 변환된 비디오 신호에 소정 오프셋을 더한 값을 우향 쉬프트하여 변환된 비디오 신호의 비트 정밀도를 감소시킨다. 로컬 쉬프트값(local_shift)이 0보다 작은 경우, 즉 결정된 최적 스케일링 비트 뎁스 mopt가 레지듀얼 신호의 비트 뎁스 m보다 작은 경우, 디스케일링부(140)는 변환된 비디오 신호를 좌향 쉬프트하여 변환된 비디오 신호의 비트 정밀도를 증가시킨다. 변환부(130)에서 출력되는 스케일링되어 변환된 신호를 Adjusted_Output, 디스케일링부(140)에서 원래 스케일로 복원된 비디오 신호를 Output이라고 하면, 디스케일링 알고리즘은 다음과 같다.Meanwhile, the descaling unit 140 performs an inverse process of scaling to restore the changed bit depth to the original bit depth in the scaling unit 120. [ Specifically, if the local shift value (local_shift) is greater than 0, that is, if the determined optimal scaling bit depth m opt is larger than the bit depth m of the residual signal, the descaling unit 140 applies a predetermined offset to the converted video signal And further shifts the added value to the right to reduce the bit precision of the converted video signal. If the local shift value (local_shift) is smaller than 0, that is, if the determined optimal scaling bit depth m opt is smaller than the bit depth m of the residual signal, the descaling unit 140 shifts the converted video signal leftward, Thereby increasing the bit precision of the signal. The scaled transformed signal output from the transforming unit 130 is referred to as Adjusted_Output. The descaling unit 140 outputs the originally scaled video signal as Output. The descaling algorithm is as follows.

{{

If (local_shift>0)If (local_shift> 0)

{ If (Adjusted_output≥0){If (Adjusted_output≥0)

Output=(Adjusted_output+Offset)>>local_shiftOutput = (Adjusted_output + Offset) >> local_shift

elseelse

Output=-((-Adjusted_output+Offset)>>local_shiftOutput = - ((- Adjusted_output + Offset) >> local_shift

}}

elseelse

Output=Adjusted_output << local_shiftOutput = Adjusted_output << local_shift

}}

이러한 알고리즘에서 off_set=(1<<(local_shift-1)) 과 같이 정의된다.In this algorithm, off_set = (1 << (local_shift-1)) is defined.

도 2는 도 1의 변환부(130)의 구체적인 구성을 나타낸 블록도이다.2 is a block diagram showing a specific configuration of the conversion unit 130 of FIG.

일반적으로 변환부(240)는 도 2에 도시된 바와 같이 a(a는 정수) 단계의 변환부들을 포함할 수 있다. 전술한 도 7에서와 같이, DCT 변환 과정 역시 행 방향의 1차원 변환 및 열 방향의 1차원 변환의 2 단계의 변환 과정으로 구성된다. a 단계의 변환부들(241 내지 243) 각각에 의하여 증가되는 비트 뎁스를 TransformBitIncreasementk(k는 1부터 a까지의 정수)라고 하면, 도 2의 변환부(240)에 의하여 증가되는 비트 뎁스량은

Figure 112018075421417-pat00009
이다.In general, the conversion unit 240 may include a (a is an integer) conversion unit as shown in FIG. As shown in FIG. 7, the DCT conversion process also includes a two-step conversion process of one-dimensional conversion in the row direction and one-dimensional conversion in the column direction. Assuming that the bit depth increased by each of the converters 241 to 243 of the step a is TransformBitIncrease k (k is an integer from 1 to a), the bit depth amount increased by the conversion unit 240 of FIG. 2 is
Figure 112018075421417-pat00009
to be.

따라서, 도 1의 변환부(130)가 도 2에 도시된 바와 같은 a 단계의 변환부들(241 내지 243)로 구성된 경우, 스케일링부(120)는 전술한 수학식 2와 유사하게

Figure 112018075421417-pat00010
을 만족시키는 최대값인 mopt를 결정하고, 최대 mopt값을 최적 스케일링 비트 뎁스로 결정한다. 유사하게 만약 디스케일링부(140)가 b(b는 정수) 단계의 디스케일링부들로 구성되며 각 단계의 디스케일링에 의하여 감소되는 비트 뎁스를 de_scaling_bitsk(k는 1부터 b까지의 정수)라고 한다면, 스케일링부(120)는 다음의 수학식 6을 만족시키는 최대값인 mopt를 결정하고, 이러한 최대 mopt값을 최적 스케일링 비트 뎁스로 결정한다.Therefore, when the converting unit 130 of FIG. 1 is composed of the converting units 241 to 243 of the a-stage as shown in FIG. 2, the scaling unit 120 is similar to the above-
Figure 112018075421417-pat00010
Determining a maximum value of m which satisfies opt, and determines the maximum value to an optimum m opt scaled bit depth. Similarly, if the descaling unit 140 is composed of descrambling units of b (b is an integer) step and de_scaling_bits k (k is an integer from 1 to b), the bit depth reduced by the descaling of each step , The scaling unit 120 determines m opt , which is the maximum value satisfying Equation (6), and determines the maximum m opt value as the optimal scaling bit depth.

Figure 112018075421417-pat00011
Figure 112018075421417-pat00011

일반적으로 a 단계의 변환을 거치는 경우, 디스케일링 단계는 최대 a-1 단계까지 수행될 수 있으므로 b=a-1이다.In general, when a step is transformed, the descaling step can be performed up to the step a-1, so that b = a-1.

도 3은 본 발명의 제 2 실시예에 따른 부호화 장치의 구성을 나타낸 블록도이다.3 is a block diagram showing a configuration of an encoding apparatus according to a second embodiment of the present invention.

도 3을 참조하면, 본 발명의 제 2 실시예에 따른 부호화 장치(300)는 예측부(310), 스케일링부(320), 변환부(330), 양자화부(340) 및 엔트로피 부호화부(350)를 포함한다. 본 발명의 제 2 실시예에 따른 부호화 장치(300)는 도 1과 비교하여, 변환부(330)가 a(a는 정수)개의 변환부들(331,332,333)을 포함하며 어느 하나의 변환부 다음에 하나의 디스케일링부(334)를 포함하는 차이점이 있다. 도 3에서 디스케일링부(334)는 제 1 변환부(331) 다음에 위치하는 경우를 도시하였으나, 이에 한정되지 않고 디스케일링부(334)는 변환부들 사이의 어떤 위치에든 배치될 수 있다. 스케일링부(320)는 변환부(330)에 포함된 변환부들(331,332,333) 각각에 의하여 증가하는 비트 뎁스 증가량을 고려하여 전술한 수학식 6과 같은 조건을 만족시키는 최대값 mopt를 결정하고, 이러한 최대 mopt값을 최적 스케일링 비트 뎁스 mopt으로 결정한다. 제 2 실시예에 따른 부호화 장치(300)의 나머지 구성 요소는 전술한 제 1 실시예와 중복되므로 구체적인 설명은 생략한다.3, the encoding apparatus 300 according to the second embodiment of the present invention includes a predictor 310, a scaling unit 320, a transform unit 330, a quantization unit 340, and an entropy encoding unit 350 ). The encoding apparatus 300 according to the second embodiment of the present invention is different from the encoding apparatus 300 of FIG. 1 in that the transforming unit 330 includes a transforming units 331, 332, and 333 (a is an integer) And a descaling unit 334 of the second embodiment. 3, the descaling unit 334 is located after the first conversion unit 331, but the descaling unit 334 may be disposed at any position between the conversion units. The scaling unit 320 determines a maximum value m opt that satisfies the condition of Equation (6), taking into account the increase in the bit depth by the transform units 331, 332, 333 included in the transform unit 330, The maximum m opt value is determined as the optimal scaling bit depth m opt . The remaining components of the encoding apparatus 300 according to the second embodiment are the same as those of the first embodiment described above, so a detailed description thereof will be omitted.

도 4는 본 발명의 제 3 실시예에 따른 부호화 장치의 구성을 나타낸 블록도이다.4 is a block diagram showing a configuration of an encoding apparatus according to a third embodiment of the present invention.

도 4를 참조하면, 본 발명의 제 3 실시예에 따른 부호화 장치(400)는 예측부(410), a개의 변환 처리부들(420, 430, 440), 양자화부(450) 및 엔트로피 부호화부(460)를 포함한다. a개의 변환 처리부들(420, 430, 440) 각각은 도시된 바와 같이 스케일링부(421,431,441), 변환부(422,432,442) 및 디스케일링부(423,433,443)를 포함한다. 본 발명의 제 3 실시예에 따른 부호화 장치(400)의 a개의 변환 처리부들(420, 430, 440) 각각은 전술한 제 1 실시예와 유사하게 레지듀얼 신호의 각 변환 단계에서 발생하는 중간값의 최대 비트와 최대 비트 정밀도를 고려하여 최적 스케일링 비트 뎁스를 결정하고, 결정된 최적 스케일링 비트 뎁스의 값 및 레지듀얼 신호의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 스케일링을 수행하는 한편, 스케일링된 신호에 대한 변환 처리를 수행한 후 변환된 신호를 원 비트 뎁스로 복원하는 디스케일링을 수행한다. 예를 들어, 제 1 변환부(422)에 의하여 증가되는 비트 뎁스를 TransformBitIncreasement, 제 1 디스케일링부(423)에 의하여 감소되는 비트 뎁스를 de_scaling_bits, 제 1 스케일링부(421)에서 출력되는 신호의 mopt라고 할 때, 제 1 스케일링부(421)는 mopt+TransformBitIncreasement-de_scaling_bits≤Maxbits를 만족하는 최적 스케일링 비트 뎁스 mopt를 결정하고, 전술한 수학식 3과 같이 최적 스케일링 비트 뎁스 mopt와 레지듀얼 신호의 비트 뎁스 m의 차이값인 로컬 쉬프트값(local_shift)을 계산한다. 4, an encoding apparatus 400 according to the third embodiment of the present invention includes a predictor 410, a number of transformers 420, 430, and 440, a quantizer 450, and an entropy encoder 460). Each of the a conversion processing units 420, 430, and 440 includes scaling units 421, 431, 441, conversion units 422, 432, 442, and descaling units 423, 433, 443. Each of the a conversion processing units 420, 430, and 440 of the encoding apparatus 400 according to the third embodiment of the present invention includes an intermediate value generated in each conversion step of the residual signal Scaling is performed in accordance with a local shift value which is a difference between a value of the optimal scaling bit depth determined and a source bit depth of a residual signal in consideration of a maximum bit and a maximum bit precision of the scaled And performs descaling to restore the converted signal to the original bit depth. For example, the bit depths increased by the first conversion unit 422 may be transformed by TransformBitIncreasing, the bit depths reduced by the first descaling unit 423 may be de_scaling_bits, the mth of the signals output from the first scaling unit 421, opt , the first scaling unit 421 determines an optimal scaling bit depth m opt that satisfies m opt + TransformBitIncrease-de_scaling_bits &lt; max bits, and determines an optimal scaling bit depth m opt and a residual And calculates a local shift value (local_shift) which is a difference value of the bit depth m of the signal.

그리고, 제 1 스케일링부(421)는 로컬 쉬프트값(local_shift)이 0보다 큰 경우 로컬 쉬프트값만큼 레지듀얼 신호를 좌향 쉬프트('<<')하여 레지듀얼 신호의 비트 뎁스를 증가시키고, 로컬 쉬프트값(local_shift)이 0보다 작은 경우 레지듀얼 신호를 우향 쉬프프트하여 레지듀얼 신호의 비트 뎁스를 감소시킨다. 제 1 스케일링부(421)에 의하여 비트 뎁스가 변경된 신호는 제 1 변환부(422)로 출력되고, 제 1 변환부(422)에 의하여 주파수 영역으로 변환된 신호는 제 1 디스케일링부(423)에 의하여 원 비트 뎁스로 복원된다. 다른 변환 처리부(430, 440)에 의하여 수행되는 스케일링, 변환 및 디스케일링 과정은 입력 신호로써 이전 변환 처리부에서 출력되는 신호를 이용한다는 차이만 있을 뿐, 구체적인 동작은 제 1 변환 처리부(420)와 동일하다.If the local shift value (local_shift) is greater than 0, the first scaling unit 421 shifts the residual signal leftward ('<<') by the local shift value to increase the bit depth of the residual signal, If the value (local_shift) is less than 0, the residual signal is shifted to the right to reduce the bit depth of the residual signal. The signal whose bit depth is changed by the first scaling unit 421 is output to the first conversion unit 422 and the signal converted into the frequency domain by the first conversion unit 422 is input to the first descaling unit 423, And is restored to the original bit depth. The scaling, conversion, and descaling processes performed by the other conversion processing units 430 and 440 differ only in that the signals output from the previous conversion processing unit are used as input signals. The specific operation is the same as that of the first conversion processing unit 420 Do.

도 5는 본 발명의 제 4 실시예에 따른 부호화 장치의 구성을 나타낸 블록도이다.5 is a block diagram showing a configuration of an encoding apparatus according to a fourth embodiment of the present invention.

도 5를 참조하면, 본 발명의 제 4 실시예에 따른 부호화 장치(500)는 예측부(510), 스케일링부(520), 변환부(530), 양자화부(540), 디스케일링부(550) 및 엔트로피 부호화부(560)를 포함한다. 본 발명의 제 4 실시예에 따른 부호화 장치(500)는 디스케일링부(550)에 의한 디스케일링 동작이 양자화부(540)에 의한 양자화 이후에 수행된다는 차이점을 제외하고는 제 1 실시예에 따른 부호화 장치(100)의 동작과 동일한 바 구체적인 설명은 생략한다.5, an encoding apparatus 500 according to the fourth embodiment of the present invention includes a predictor 510, a scaling unit 520, a transform unit 530, a quantization unit 540, a descaling unit 550 And an entropy encoding unit 560. The encoding apparatus 500 according to the fourth embodiment of the present invention is similar to the encoding apparatus 500 according to the first embodiment except for the difference that the descaling operation by the descaling unit 550 is performed after the quantization by the quantization unit 540 The operation of the encoding apparatus 100 is the same as that of the encoding apparatus 100, and a detailed description thereof will be omitted.

도 6은 본 발명의 제 5 실시예에 따른 부호화 장치의 구성을 나타낸 블록도이다.6 is a block diagram showing a configuration of an encoding apparatus according to a fifth embodiment of the present invention.

도 6을 참조하면, 본 발명의 제 5 실시예에 따른 부호화 장치(600)는 예측부(610), 스케일링부(620), 변환부(630), 양자화부(640) 및 엔트로피 부호화부(650)를 포함한다. 본 발명의 제 5 실시예에 따른 부호화 장치(600)는 디스케일링부를 구비하고 있지 않다는 점을 제외하고는 제 1 실시예에 따른 부호화 장치(100)와 유사하게 동작한다. 본 발명의 제 5 실시예에 따른 부호화 장치(600)에서 디스케일링 동작이 수행되지 않는 대신에, 후술되는 도 11의 본 발명의 다른 실시예에 따른 복호화 장치(1100)에서 디스케일링 동작이 수행되어 복호화측에서 복원된 신호가 부호화된 원 비디오 신호와 동일한 비트 뎁스를 갖도록 한다. 본 발명의 제 5 실시예에 따른 부호화 장치(600)에는 디스케일링부가 구비되어 있지 않기 때문에, 스케일링부(620)는 다음의 수학식 7과 같이 변환부(630)에 의한 변환 과정에서 발생하는 중간값(Temp)의 최대값을 계산할 수 있다.6, an encoding apparatus 600 according to the fifth embodiment of the present invention includes a predictor 610, a scaling unit 620, a transform unit 630, a quantization unit 640, and an entropy encoding unit 650 ). The encoding apparatus 600 according to the fifth embodiment of the present invention operates similarly to the encoding apparatus 100 according to the first embodiment except that it does not include a descaling unit. The descaling operation is not performed in the encoding apparatus 600 according to the fifth embodiment of the present invention and a descaling operation is performed in the decoding apparatus 1100 according to another embodiment of the present invention shown in Fig. So that the reconstructed signal on the decoding side has the same bit depth as the encoded original video signal. Since the descrambling unit is not provided in the encoding apparatus 600 according to the fifth embodiment of the present invention, the scaling unit 620 may calculate the intermediate The maximum value of the value (Temp) can be calculated.

Figure 112018075421417-pat00012
Figure 112018075421417-pat00012

수학식 7에서 중간값은 변환부(630)가 a 단계의 변환부들을 구비하며, 각 a개의 변환부들에 의하여 증가되는 비트 뎁스를 TransformBitIncreasementk(k는 1부터 a까지의 정수)라고 가정한 경우이다.In the case of the intermediate value in Equation (7), when the converting unit 630 includes the converting units of the a stage, and the bit depths increased by the a converting units are TransformBitIncreasing k (k is an integer from 1 to a) to be.

스케일링부(620)는 다음의 수학식 8을 만족시키는 최대값인 mopt를 결정하고, 이러한 최대 mopt값을 최적 스케일링 비트 뎁스 mopt로 결정한다.The scaling unit 620 determines m opt , which is a maximum value satisfying the following expression (8), and determines the maximum m opt value as the optimal scaling bit depth m opt .

Figure 112018075421417-pat00013
Figure 112018075421417-pat00013

스케일링부(620)는 결정된 최적 스케일링 비트 뎁스 mopt와 예측부(610)로부터 입력되는 레지듀얼 신호의 비트 뎁스 m을 비교하여, 최적 스케일링 비트 뎁스 mopt와 레지듀얼 신호의 비트 뎁스 m의 차이값인 로컬 쉬프트값(local_shift)을 결정하고, 결정된 로컬 쉬프트값이 0보다 큰지 작은지에 따라서 레지듀얼 신호에 대한 쉬프트 연산을 수행하여 레지듀얼 신호의 비트 뎁스를 변경시킨다. 전술한 바와 같이 비트 뎁스가 변경된 레지듀얼 신호는 변환, 양자화 및 엔트로피 부호화 과정을 거쳐 비트스트림이 생성된다. The scaling unit 620 compares the determined optimal scaling bit depth m opt with the bit depth m of the residual signal input from the predictor 610 and calculates a difference value between the optimal scaling bit depth m opt and the bit depth m of the residual signal , And changes the bit depth of the residual signal by performing a shift operation on the residual signal according to whether the determined local shift value is greater than or less than zero. As described above, the residual signal whose bit depth has been changed is converted, quantized, and entropy-encoded to generate a bitstream.

한편, 본 발명의 제 5 실시예에 따른 부호화 장치(600)에 대응되는 도 11의 복호화 장치(1100)에서 디스케일링 동작을 수행하기 위해서는 부호화 장치(600)에서 어떠한 로컬 쉬프트값(local_shift)에 따라서 스케일링 동작이 수행되었는지 여부를 시그널링할 필요가 있다. 스케일링부(620)에 의하여 결정되는 로컬 쉬프트값은 변환시에 이용되는 변환 블록의 크기, 비디오 신호의 원 비트 뎁스 및 양자화 파라메터 중 적어도 하나를 고려하여 미리 결정된 소정값을 갖을 수 있다. 이와 같이 로컬 쉬프트값이 변환 블록의 크기, 비디오 신호의 원 비트 뎁스 및 양자화 파라메터 중 적어도 하나를 이용하여 결정되는 경우, 복호화 장치에서도 이러한 파라메터를 고려하여 로컬 쉬프트값을 결정할 수 있기 때문에 부가적인 로컬 쉬프트값의 부호화 과정을 생략할 수 있다.In order to perform the descaling operation in the decoding apparatus 1100 of FIG. 11 corresponding to the encoding apparatus 600 according to the fifth embodiment of the present invention, in the encoding apparatus 600, in accordance with any local shift value (local_shift) It is necessary to signal whether a scaling operation has been performed. The local shift value determined by the scaling unit 620 may have a predetermined value in consideration of at least one of the size of the transform block used at the time of conversion, the original bit depth of the video signal, and the quantization parameter. When the local shift value is determined using at least one of the size of the transform block, the original bit depth of the video signal, and the quantization parameter, the decoding apparatus can determine the local shift value in consideration of the parameter, The encoding process of the value can be omitted.

스케일링부(620)에서 전술한 수학식 8과 같이 최적 스케일링 비트 뎁스를 결정하여 로컬 쉬프트값을 결정하는 경우, 각 블록 단위로 스케일링에 이용된 로컬 쉬프트값을 시그널링할 필요가 있다. 이 경우, 실제 로컬 쉬프트값을 시그널링하는 대신에, 블록 단위로 현재 블록의 로컬 쉬프트값과 주변 블록의 로컬 쉬프트값의 차이값만을 비트스트림에 포함시킴으로써 로컬 쉬프트값을 복호화단에 전송할 수 있다. 전술한 본 발명의 제 1 내지 제 4 실시예에 따른 부호화 장치에서도 전술한 제 5 실시예와 유사하게, 스케일링부에서 최적 스케일링 비트 뎁스를 계산하여 로컬 쉬프트값을 결정한 경우에는 현재 블록의 로컬 쉬프트값과 주변 블록의 로컬 쉬프트값의 차이값만을 비트스트림에 포함시킴으로써 로컬 쉬프트값에 대한 정보를 복호화단에 전송할 수 있다.When the scaling unit 620 determines the optimal scaling bit depth by using Equation (8), it is necessary to signal the local shift value used for scaling in units of blocks. In this case, instead of signaling the actual local shift value, the local shift value may be transmitted to the decoding end by including only the difference value between the local shift value of the current block and the local shift value of the neighboring block in a block unit. Similarly to the above-described fifth embodiment, in the coding apparatus according to the first to fourth embodiments of the present invention, when the scaling unit calculates the optimal scaling bit depth to determine the local shift value, the local shift value of the current block And only the difference value between the local shift values of the neighboring blocks is included in the bitstream, information on the local shift value can be transmitted to the decoding end.

도 8은 본 발명의 다른 실시예에 따른 스케일링 동작을 설명하기 위한 참조도이다.8 is a reference diagram for explaining a scaling operation according to another embodiment of the present invention.

일반적으로 디지털 비디오 처리 장치의 비디오 포맷은 고정 비트뎁스를 사용한다. 현재 가장 널리 쓰이는 비디오 포맷은, 컬러별로 픽셀마다 8비트가 할당된다. N비트 비트뎁스의 비디오 포맷에서, 픽셀값은 [0, 2N-1]의 구간, 즉 0으로부터 2N-1 중에 분포하므로, 8비트 비트뎁스의 비디오 시퀀스의 픽셀값 구간은 [0, 28-1]이다. 비디오 시퀀스의 픽셀값은, 픽셀값 구간 중 중앙 근처에 분포할 확률이 더 높고, 구간 중 외곽 근처에 분포할 확률은 희박하다. 즉, 원본 비디오 시퀀스의 픽셀값의 분포는 다음과 같은 수학식 9에 따를 수 있다. In general, the video format of a digital video processing apparatus uses a fixed bit depth. Currently the most widely used video format is 8 bits per pixel for each color. In the video format of N bit bit depth, pixel values are distributed in the interval of [0, 2 N -1], i.e. 0 to 2 N -1, so that the pixel value interval of the video sequence of 8 bit bit depth is [0, 2 8 -1]. The pixel values of the video sequence are more likely to be distributed near the center of the pixel value interval, and the probability of distribution in the vicinity of the outline is small. That is, the distribution of the pixel values of the original video sequence may be expressed by the following Equation (9).

Figure 112018075421417-pat00014
Figure 112018075421417-pat00014

원본 픽셀값 Org, 원본 픽셀값 중 최소값 Min 및 최대값 Max은 0보다 크거나 같고 2N-1보다 작거나 같으므로, 원본 픽셀값은 실제 가능한 최대 범위 2N-1보다 좁은 범위의 픽셀값 구간에 분포할 수 있다.Org original pixel values, because the minimum value Min and maximum value Max of the source pixel value is greater than or equal to 0 and less than or equal to 2 same than N -1, the original pixel value of the actual maximum pixel value range of 2 sections of a narrower range than N -1 Lt; / RTI &gt;

도 8을 참조하면, 8비트의 비트 뎁스를 갖는 픽셀값은 [0,255]의 구간(810)사이의 값을 갖을 수 있는데, 실제 원본 픽셀값은 [Min, Max]의 구간(820)에 분포할 수 있다. 이와 같이 원본 픽셀값이 원 비트 뎁스로 표현 가능한 최대한계값 내지 최소 한계값의 범위가 아닌 일부 구간에만 분포하는 경우, 원본 픽셀값의 다이나믹 레인지(dynamic range)를 원 비트 뎁스로 표현 가능한 최대 한계값 내지 최소 한계값의 범위로 확장하는 경우 픽셀값을 보다 다양한 레벨로 표현할 수 있기 때문에 향상된 영상 처리가 가능하다. 따라서, 본 발명의 다른 실시예에 따른 스케일링부에서는 원본 픽셀값의 최소값, 최대값을 알고 있는 경우, 결정된 최적 스케일링 비트 뎁스만큼 다이나믹 레인지를 변화하여 비디오 신호를 스케일링할 수 있다.Referring to FIG. 8, a pixel value having an 8-bit bit depth may have a value between 810 of [0,255], and an actual original pixel value is distributed in a interval 820 of [Min, Max] . In the case where the original pixel value is distributed only in a part of the range not in the range of the maximum threshold value to the minimum threshold value which can be represented by the source bit depth, the dynamic range of the original pixel value can be expressed as a maximum threshold value To the minimum threshold value, the pixel value can be expressed at various levels, thereby enabling enhanced image processing. Therefore, if the minimum and maximum values of the original pixel values are known, the scaling unit according to another embodiment of the present invention can scale the video signal by changing the dynamic range by the determined optimal scaling bit depth.

구체적으로, 비디오 신호의 픽셀값의 최소값을 Min(821), 최대값을 Max(822), [Min,Max]의 구간(820) 사이의 임의의 값을 In(823)이라고 할 때, [Min,Max]의 구간(820)을 결정된 최적 스케일링 비트 뎁스인 mopt 비트로 표현 가능한 [0,2^mopt-1]로 확장하는 경우 In(832)의 값은 다음의 수학식 10과 같이 Adjusted_In의 값으로 변경된다.Concretely, when a minimum value of a pixel value of a video signal is Min (821), a maximum value is Max (822), and an arbitrary value between intervals [820] of [Min, Max] , Max] is extended to [0,2 ^ m opt -1] which can be represented by m opt bits, which is the determined optimal scaling bit depth, the value of In (832) Lt; / RTI &gt;

Figure 112018075421417-pat00015
Figure 112018075421417-pat00015

스케일링부는 수학식 10에 의하여 변경된 비디오 신호에 대해서 전술한 바와 같이 로컬 쉬프트값에 따라서 좌향 쉬프트하거나 우향 쉬프트하여 스케일링을 수행한다.The scaling unit performs scaling on the video signal changed by Equation (10) by leftward shift or right shift according to the local shift value, as described above.

수학식 10에 따라서 비디오 신호의 다이나믹 레인지가 변경된 경우, 디스케일링부는 비디오 신호의 최소값(Min) 및 최대값(Max)을 이용하여 변환된 비디오 신호를 원래 레인지로 복원하고, 복원된 레인지를 갖는 비디오 신호에 대하여 디스케일링을 수행한다.When the dynamic range of the video signal is changed according to Equation (10), the descaling unit restores the converted video signal to its original range using the minimum value (Min) and the maximum value (Max) of the video signal, And performs descaling on the signal.

구체적으로, 다이나믹 레인지가 변경되고, 변환부에 의하여 변환되어 출력되는 비디오 신호를 Adjusted_Output이라고 하면, 디스케일링부는 다음의 수학식 11과 같이 Adjusted_Output의 값을 비디오 신호의 원래 레인지로 복원하고, 복원된 레인지의 비디오 신호를 원 비트 뎁스로 디스케일링하여 복원된 레인지 및 원 비트 뎁스를 갖는 출력값 Output을 생성한다.Specifically, when the dynamic range is changed and the video signal converted and output by the conversion unit is referred to as Adjusted_Output, the descaling unit restores the value of Adjusted_Output to the original range of the video signal as shown in Equation (11) And outputs an output value Output having the restored range and the original bit depth.

Figure 112018075421417-pat00016
Figure 112018075421417-pat00016

도 9는 본 발명의 실시예에 따른 비디오 신호의 부호화 방법을 나타낸 플로우 차트이다.9 is a flowchart illustrating a method of encoding a video signal according to an embodiment of the present invention.

도 9를 참조하면, 단계 910에서 비디오 신호의 변환 과정에서 발생하는 중간값의 최대 비트와 비디오 신호가 갖을 수 있는 최대 비트 정밀도를 고려하여 상기 비디오 신호의 최적 스케일링 비트 뎁스를 결정한다. 전술한 바와 같이, 중간값의 최대 비트는 비디오 신호의 원 비트 뎁스와 비디오 신호의 변환 과정에서 발생되는 비트 증가량인 변환 비트 증가량을 더한 값에, 비디오 신호의 비트 뎁스를 확장하기 위한 스케일링에 대응하여 확장된 비트뎁스를 축소하기 위한 디스케일링에 의해 축소되는 디스케일링 비트량을 감산한 값이다. 만약, a 단계의 변환들과 b 단계의 디스케일링을 포함하는 경우, 스케일링부는 전술한 수학식 6과 같이 최적 스케일링 비트 뎁스와 a 단계의 변환들 각각에 의한 변환 비트 증가량을 합산한 값으로부터 b단계의 디스케일링 각각에 의한 디스케일링 비트량을 합산한 값을 감산한 값이 최대 비트 정밀도보다 작도록 최적 스케일링 비트 뎁스를 결정한다.Referring to FIG. 9, in step 910, an optimal scaling bit depth of the video signal is determined in consideration of a maximum bit of an intermediate value generated in a process of converting a video signal and a maximum bit precision of a video signal. As described above, the maximum bit of the intermediate value corresponds to a value obtained by adding the original bit depth of the video signal and the increase amount of the conversion bit, which is the bit increment amount generated in the conversion process of the video signal, to the scaling for extending the bit depth of the video signal Is a value obtained by subtracting the descaling bit amount reduced by descaling to reduce the expanded bit depth. In the case of including the transformations of the a-th stage and the descaling of the b-th stage, the scaling unit subtracts the transformed bit increase amounts by the optimal scaling bit depth and the transforms of the a- Deciding the optimal scaling bit depth so that the value obtained by subtracting the sum of the descaling bits by each of the descaling bits is smaller than the maximum bit precision.

단계 920에서 결정된 최적 스케일링 비트 뎁스의 값 및 비디오 신호의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 비디오 신호를 스케일링한다. 구체적으로, 만약 결정된 최적 스케일링 비트 뎁스가 비디오 신호의 원 비트 뎁스보다 큰 경우, 결정된 최적 스케일링 비트 뎁스와 비디오 신호의 원 비트 뎁스의 차이값인 로컬 쉬프트값만큼 비디오 신호를 좌향 쉬프트하여 비디오 신호의 비트 정밀도를 증가시킨다. 만약 결정된 최적 스케일링 비트 뎁스가 비디오 신호의 원 비트 뎁스보다 작은 경우, 결정된 최적 스케일링 비트 뎁스와 비디오 신호의 원 비트 뎁스의 차이값만큼 비디오 신호를 우향 쉬프트하여 비디오 신호의 비트 정밀도를 감소시킨다.The video signal is scaled according to the value of the optimal scaling bit depth determined in step 920 and the local shift value which is a difference value of the original bit depth of the video signal. Specifically, if the determined optimal scaling bit depth is greater than the original bit depth of the video signal, the video signal is shifted to the left by the local shift value, which is the difference between the determined optimal scaling bit depth and the original bit depth of the video signal, Increase precision. If the determined optimal scaling bit depth is smaller than the original bit depth of the video signal, the bit precision of the video signal is reduced by shifting the video signal to the right by the difference between the determined optimal scaling bit depth and the original bit depth of the video signal.

단계 930에서 스케일링된 비디오 신호에 대한 변환을 수행한다.In step 930, a conversion is performed on the scaled video signal.

본 발명의 실시예에 따른 비디오 신호의 부호화 방법은 스케일링되어 변환된 비디오 신호를 원 비트 뎁스로 복원하기 위하여 변환된 비디오 신호에 대하여 디스케일링을 더 수행할 수 있다. 이러한 디스케일링은 스케일링 과정의 역과정으로써, 최적 스케일링 비트 뎁스가 비디오 신호의 원 비트 뎁스보다 큰 경우 변환된 비디오 신호에 소정 오프셋을 더한 값을 우향 쉬프트하여 변환된 비디오 신호의 비트 정밀도를 감소시키거나, 최적 스케일링 비트 뎁스가 비디오 신호의 원 비트 뎁스보다 작은 경우에는 변환된 비디오 값을 좌향 쉬프트하여 변환된 비디오 신호의 비트 정밀도를 증가시킴으로써 수행될 수 있다.The method of encoding a video signal according to an embodiment of the present invention may further perform descaling on the converted video signal to restore the scaled and transformed video signal to the original bit depth. This descaling is an inverse process of the scaling process. When the optimal scaling bit depth is larger than the original bit depth of the video signal, the scaling process shifts a value obtained by adding a predetermined offset to the converted video signal to reduce the bit precision of the converted video signal , And if the optimal scaling bit depth is smaller than the original bit depth of the video signal, the converted video value may be shifted leftward to increase the bit precision of the converted video signal.

도 10은 본 발명의 일 실시예에 따른 비디오 신호의 복호화 장치를 나타낸 블록도이다.10 is a block diagram illustrating an apparatus for decoding a video signal according to an embodiment of the present invention.

도 10을 참조하면, 본 발명의 일 실시예에 따른 비디오 신호의 복호화 장치(1000)는 파싱부(1010), 엔트로피 복호화부(1020), 역양자화부(1030), 스케일링부(1040), 역변환부(1050), 디스케일링부(1060), 예측부(1070) 및 영상 복원부(1080)를 포함한다.10, an apparatus 1000 for decoding a video signal according to an exemplary embodiment of the present invention includes a parsing unit 1010, an entropy decoding unit 1020, an inverse quantization unit 1030, a scaling unit 1040, A descaling unit 1060, a predicting unit 1070, and an image restoring unit 1080, as shown in FIG.

파싱부(1010)는 수신된 비트스트림을 파싱하여 비디오 신호의 부호화된 데이터를 추출한다. 엔트로피 복호화부(1020)는 추출된 부호화된 데이터에 대해 엔트로피 복호화를 수행하여 엔트로피 복호화된 데이터를 복원한다. 역양자화부(1030)는 엔트로피 복호화된 데이터에 대한 역양자화를 수행한다. 스케일링부(1040)는 엔트로피 복호화된 데이터의 역변환 과정에서 발생하는 중간값의 최대 비트와 엔트로피 복호화된 데이터가 갖을 수 있는 최대 비트 정밀도를 고려하여 엔트로피 복호화된 데이터의 최적 스케일링 비트 뎁스를 결정하고, 결정된 최적 스케일링 비트 뎁스의 값 및 엔트로피 복호화된 데이터의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 엔트로피 복호화된 데이터를 스케일링한다. 스케일링부(1040)의 동작은 그 입력값으로 엔트로피 복호화된 데이터를 이용하고 최적 스케일링 비트 뎁스를 결정할 때 역변환부(1050)에 의하여 발생하는 중간값의 최대 비트를 고려한다는 차이점만 있을 뿐 그 구체적인 동작은 본 발명의 일 실시예에 따른 부호화 장치(100)의 스케일링부(120)의 동작과 유사하다.The parsing unit 1010 parses the received bitstream to extract coded data of the video signal. The entropy decoding unit 1020 performs entropy decoding on the extracted encoded data to recover entropy-decoded data. The inverse quantization unit 1030 performs inverse quantization on entropy-decoded data. The scaling unit 1040 determines the optimal scaling bit depth of the entropy-decoded data in consideration of the maximum bit value of the intermediate value and the maximum bit precision of the entropy-decoded data generated in the process of inverse-transforming the entropy-decoded data, And scales the entropy-decoded data according to the value of the optimal scaling bit depth and the local shift value, which is a difference value of the one-bit depth of the entropy-decoded data. The operation of the scaling unit 1040 uses only the entropy-decoded data as its input value and considers the maximum bit of the intermediate value generated by the inverse transform unit 1050 when determining the optimal scaling bit depth, Is similar to the operation of the scaling unit 120 of the encoding apparatus 100 according to an embodiment of the present invention.

역변환부(1050)는 스케일링된 엔트로피 복호화된 데이터에 대한 역변환을 수행하며, 디스케일링부(1060)는 역변환된 데이터의 비트 뎁스를 원 비트 뎁스로 복원하는 디스케일링을 수행한다. 디스케일링부(1060)의 출력값은 부호화 과정에서 스케일링부로 입력되는 원 비트 뎁스의 레지듀얼 신호이다. 예측부(1070)는 인터 예측 또는 인트라 예측을 통해 예측 신호를 생성하고, 영상 복원부(1080)는 예측 신호와 복원된 원 비트 뎁스의 레지듀얼 신호를 가산하여 비디오 신호를 복원한다.The inverse transform unit 1050 performs inverse transform on the scaled entropy-decoded data, and the descaling unit 1060 performs descaling to restore the bit depth of the inverse-transformed data to the original bit depth. The output value of the descaling unit 1060 is a residual signal of the one-bit depth input to the scaling unit in the encoding process. The prediction unit 1070 generates a prediction signal through inter prediction or intra prediction, and the image reconstruction unit 1080 reconstructs the video signal by adding the prediction signal and the residual signal of the reconstructed original bit depth.

도 11은 본 발명의 다른 실시예에 따른 비디오 신호의 복호화 장치의 구성을 나타낸 블록도이다. 11 is a block diagram illustrating a configuration of an apparatus for decoding a video signal according to another embodiment of the present invention.

도 11을 참조하면, 본 발명의 다른 실시예에 따른 비디오 신호의 복호화 장치(1100)는 파싱부(1110), 엔트로피 복호화부(1120), 역양자화부(1130), 역변환부(1140), 디스케일링부(1150), 예측부(1160) 및 영상 복원부(1170)를 포함한다. 본 발명의 다른 실시예에 따른 비디오 신호의 복호화 장치(1100)는 전술한 도 6의 제 5 실시예에 따른 부호화 장치(600)에서 스킵된 디스케일링 동작을 수행한다. 디스케일링부(1150)는 복호화된 비디오 신호에 대한 디스케일링을 수행하기 위한 로컬 쉬프트 값을 결정하고, 결정된 로컬 쉬프트 값에 따라서 복호화된 비디오 신호에 대한 디스케일링을 수행한다. 만약, 로컬 쉬프트값이 변환 블록의 크기, 비디오 신호의 원 비트 뎁스 및 양자화 파라메터 중 적어도 하나를 고려하여 결정된 소정값을 갖는 경우라면, 디스케일링부(1150)는 이러한 파라메터 중 적어도 하나를 이용하여 부호화시에 이용된 것과 동일할 로컬 쉬프트값을 결정하여 디스케일링을 수행한다. 만약, 로컬 쉬프트값이 비디오 신호를 구성하는 소정 크기의 블록 단위로, 현재 블록의 로컬 쉬프트값과 주변 블록의 로컬 쉬프트값의 차이를 통해 시그널링된 경우라면, 디스케일링부(1150)는 이전에 복호화된 주변 블록의 로컬 쉬프트값과 비트스트림으로부터 복원된 로컬 쉬프트 차이값을 가산하여 현재 블록의 로컬 쉬프트값을 복원하고, 복원된 로컬 쉬프트값을 이용하여 디스케일링을 수행한다. 복호화 장치(1100)의 다른 구성 성분의 동작은 전술한 일 실시예의 복호화 장치(1000)와 유사한 바 구체적인 설명은 생략한다.11, an apparatus 1100 for decoding a video signal according to another embodiment of the present invention includes a parser 1110, an entropy decoding unit 1120, an inverse quantization unit 1130, an inverse transform unit 1140, A scaling unit 1150, a predicting unit 1160, and an image restoring unit 1170. The apparatus 1100 for decoding a video signal according to another embodiment of the present invention performs a skimming descaling operation in the encoding apparatus 600 according to the fifth embodiment of FIG. The descaling unit 1150 determines a local shift value for performing descaling on the decoded video signal, and performs descaling on the decoded video signal according to the determined local shift value. If the local shift value has a predetermined value determined in consideration of at least one of the size of the transform block, the original bit depth of the video signal, and the quantization parameter, the descaling unit 1150 may decode Decides the local shift value to be the same as that used in the decoding. If the local shift value is signaled through the difference between the local shift value of the current block and the local shift value of the neighboring block in units of blocks of a predetermined size constituting the video signal, the descaling unit 1150 previously decodes The local shift value of the current block is added by adding the local shift value of the neighboring block and the restored local shift difference value from the bitstream, and descaling is performed using the restored local shift value. Operations of the other components of the decoding apparatus 1100 are similar to those of the decoding apparatus 1000 of the above-described embodiment, and a detailed description thereof will be omitted.

도 12는 본 발명의 일 실시예에 따른 비디오 신호의 복호화 방법을 나타낸 플로우 차트이다. 12 is a flowchart illustrating a method of decoding a video signal according to an embodiment of the present invention.

도 12를 참조하면, 단계 1210에서 수신된 비트스트림을 파싱하여 비디오 신호의 부호화된 데이터를 추출한다. 단계 1220에서 추출된 부호화된 데이터에 대해 엔트로피 복호화를 수행하여 엔트로피 복호화된 데이터를 복원한다.Referring to FIG. 12, the bitstream received in step 1210 is parsed to extract encoded data of the video signal. And performs entropy decoding on the encoded data extracted in step 1220 to restore the entropy-decoded data.

단계 1230에서 엔트로피 복호화된 데이터의 역변환 과정에서 발생하는 중간값의 최대 비트와 엔트로피 복호화된 데이터가 갖을 수 있는 최대 비트 정밀도를 고려하여 엔트로피 복호화된 데이터의 최적 스케일링 비트 뎁스를 결정한다. 여기서, 중간값의 최대 비트는 엔트로피 복호화된 데이터의 원 비트 뎁스와 엔트로피 복호화된 데이터의 역변환 과정에서 발생되는 비트 증가량인 역변환 비트 증가량을 더한 값에, 엔트로피 복호화된 데이터의 비트 뎁스를 확장하기 위한 스케일링에 대응하여 확장된 비트뎁스를 축소하기 위한 디스케일링에 의해 축소되는 디스케일링 비트량을 감산한 값이다. 만약, c(c는 정수) 단계의 역변환들과 엔트로피 복호화된 데이터의 비트 뎁스를 확장하기 위한 스케일링에 대응하여 확장된 비트뎁스를 축소하기 위한 d(d는 정수) 단계의 디스케일링을 포함하는 경우, 최적 스케일링 비트 뎁스와 c 단계의 역변환들 각각에 의한 역변환 비트 증가량을 합산한 값으로부터 d단계의 디스케일링 각각에 의한 디스케일링 비트량을 합산한 값을 감산한 값이 최대 비트 정밀도보다 작도록 최적 스케일링 비트 뎁스를 결정할 수 있다.The optimal scaling bit depth of the entropy-decoded data is determined in consideration of the maximum bit value of the intermediate value and the maximum bit precision of the entropy-decoded data generated in the inverse conversion process of the entropy-decoded data in step 1230. The maximum bit of the intermediate value is a value obtained by adding the original bit depth of the entropy-decoded data and the inverse-conversion-bit increase amount, which is a bit increase amount generated in the inverse-conversion process of the entropy-decoded data, Is a value obtained by subtracting the amount of descaling bits to be reduced by descaling in order to reduce the expanded bit depth. If d (d is an integer) step of descaling in order to reduce the extended bit depth corresponding to the scaling for extending the bit depth of the entropy decoded data and c (c is an integer) , The value obtained by subtracting the sum of the inverse conversion bit increments by the inverse transforms of the optimal scaling bit depth and the inverse transform of the c stage minus the sum of the descaling bits by the descaling of each of the d stages is optimized to be smaller than the maximum bit precision The scaling bit depth can be determined.

단계 1240에서, 결정된 최적 스케일링 비트 뎁스의 값 및 엔트로피 복호화된 데이터의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 엔트로피 복호화된 데이터를 스케일링한다. 구체적으로, 최적 스케일링 비트 뎁스가 엔트로피 복호화된 데이터의 원 비트 뎁스보다 큰 경우, 최적 스케일링 비트 뎁스와 엔트로피 복호화된 데이터의 원 비트 뎁스의 차이값만큼 엔트로피 복호화된 데이터를 좌향 쉬프트하여 엔트로피 복호화된 데이터의 비트 정밀도를 증가시킨다. 만약, 최적 스케일링 비트 뎁스가 엔트로피 복호화된 데이터의 원 비트 뎁스보다 작은 경우, 최적 스케일링 비트 뎁스와 엔트로피 복호화된 데이터의 원 비트 뎁스의 차이값만큼 엔트로피 복호화된 데이터를 우향 쉬프트하여 엔트로피 복호화된 데이터의 비트 정밀도를 감소시킨다.In step 1240, the entropy-decoded data is scaled according to the determined value of the optimal scaling bit depth and the local shift value, which is the difference between the original bit depth of the entropy decoded data. Specifically, when the optimal scaling bit depth is larger than the original bit depth of the entropy-decoded data, the entropy-decoded data is shifted leftward by the difference value between the optimal scaling bit depth and the original bit depth of the entropy-decoded data, Increase bit precision. If the optimal scaling bit depth is smaller than the original bit depth of the entropy-decoded data, the entropy-decoded data is shifted to the right by the difference between the optimal scaling bit depth and the original bit depth of the entropy-decoded data, Decrease precision.

단계 1250에서 스케일링된 엔트로피 복호화된 데이터에 대한 역변환을 수행한다.And performs inverse transform on the scaled entropy decoded data in step 1250.

본 발명의 일 실시예에 따른 비디오 신호의 복호화 방법은 역변환된 데이터에 대한 디스케일링 과정을 더 포함할 수 있다. 디스케일링 과정은 스케일링 과정의 역과정으로써 최적 스케일링 비트 뎁스가 엔트로피 복호화된 데이터의 원 비트 뎁스보다 큰 경우 역변환된 데이터에 소정 오프셋을 더한 값을 우향 쉬프트하여 역변환된 데이터의 비트 정밀도를 감소시키며, 최적 스케일링 비트 뎁스가 엔트로피 복호화된 데이터의 원 비트 뎁스보다 작은 경우 역변환된 데이터 값을 좌향 쉬프트하여 역변환된 데이터의 비트 정밀도를 증가시킨다.The method of decoding a video signal according to an exemplary embodiment of the present invention may further include a descaling process for inversely transformed data. The descaling process is an inverse process of the scaling process. When the optimal scaling bit depth is larger than the one-bit depth of the entropy-decoded data, the descaling process shifts a value obtained by adding a predetermined offset to the inverted data to reduce the bit precision of the inverse- When the scaling bit depth is smaller than the one-bit depth of the entropy-decoded data, the inverse-transformed data value is left-shifted to increase the bit precision of the inverse-transformed data.

도 13은 본 발명의 다른 실시예에 따른 비디오 신호의 복호화 방법을 나타낸 플로우 차트이다. 본 발명의 다른 실시예에 따른 비디오 신호의 복호화 방법은 전술한 도 11의 복호화 장치(1100)과 같이 부호화측에서 생략된 디스케일링 동작을 수행하여 원 비트 뎁스를 갖는 비디오 신호를 복호화하는 과정에 대응된다.13 is a flowchart illustrating a method of decoding a video signal according to another embodiment of the present invention. The method of decoding a video signal according to another embodiment of the present invention corresponds to a process of decoding a video signal having a one-bit depth by performing a descaling operation omitted in the encoding side like the above-described decoding apparatus 1100 of FIG. 11 do.

도 13을 참조하면, 단계 1310에서 비디오 신호의 변환 과정에서 발생하는 중간값의 최대 비트와 비디오 신호가 갖을 수 있는 최대 비트 정밀도를 고려하여 결정된 최적 스케일링 비트 뎁스의 값 및 비디오 신호의 원 비트 뎁스의 차이값인 로컬 쉬프트값에 따라서 스케일링되어 부호화된 비디오 신호를 수신한다.13, in step 1310, the value of the optimal scaling bit depth determined in consideration of the maximum bit of the intermediate value and the maximum bit precision of the video signal generated in the process of converting the video signal, And receives a scaled and encoded video signal according to a local shift value which is a difference value.

단계 1320에서, 수신된 비디오 신호에 대한 엔트로피 복호화, 양자화 및 역변환을 수행하여 복호화된 비디오 신호를 생성한다.In step 1320, entropy decoding, quantization, and inverse transform of the received video signal are performed to generate a decoded video signal.

단계 1330에서, 복호화된 비디오 신호에 대한 디스케일링을 수행하기 위한 상기 로컬 쉬프트 값을 결정한다. 전술한 바와 같이, 이러한 로컬 쉬프트 값은 비디오 신호의 원 비트 뎁스 및 양자화 파라메터 중 적어도 하나를 고려하여 결정되거나, 이전에 복호화된 주변 블록의 로컬 쉬프트값과 비트스트림으로부터 복원된 로컬 쉬프트 차이값을 가산하여 결정될 수 있다.In step 1330, the local shift value for performing descaling on the decoded video signal is determined. As described above, this local shift value may be determined in consideration of at least one of the original bit depth and the quantization parameter of the video signal, or may be determined by adding the local shift value of the previously decoded neighboring block and the local shift difference value restored from the bitstream &Lt; / RTI &gt;

단계 1340에서, 결정된 로컬 쉬프트값에 따라서 복호화된 비디오 신호에 대한 디스케일링르 수행하여 부호화 시의 원 비트 뎁스로 복호화된 비디오 신호의 비트 뎁스를 변경한다.In step 1340, a descaling operation is performed on the decoded video signal according to the determined local shift value, thereby changing the bit depth of the video signal decoded by the original bit depth at the time of encoding.

본 발명에 따르면 비디오 신호의 변환 및 역변환시에 비디오 신호의 비트 뎁스를 증가시킴으로써 연산 정밀도를 향상시키는 한편, 비트 뎁스의 증가에도 불구하고 연산 과정에서 허용가능한 비트 뎁스를 초과하는 오버플로우가 발생되지 않도록 비디오 신호 처리를 수행할 수 있다.According to the present invention, it is possible to improve the computation precision by increasing the bit depth of the video signal in the conversion and inverse transformation of the video signal, and to prevent the overflow exceeding the allowable bit depth in the computation process despite the increase in bit depth Video signal processing can be performed.

한편, 상술한 본 발명의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 상기 컴퓨터로 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드디스크 등) 및 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등)와 같은 저장매체를 포함한다.The above-described embodiments of the present invention can be embodied in a general-purpose digital computer that can be embodied as a program that can be executed by a computer and operates the program using a computer-readable recording medium. The computer-readable recording medium includes a storage medium such as a magnetic storage medium (e.g., ROM, floppy disk, hard disk, etc.) and an optical reading medium (e.g., CD-ROM, DVD, etc.).

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The present invention has been described with reference to the preferred embodiments. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

Claims (3)

비디오 신호를 복호화하는 복호화 방법에 있어서,
비트스트림으로부터 비디오 신호 내 변환 블록의 변환 계수를 획득하는 단계;
상기 변환 블록의 상기 변환 계수에 대해 역양자화를 수행하여 역양자화된 변환 계수를 생성하는 단계; 및
상기 역양자화된 변환 계수에 역변환 및 디스케일링을 수행하여 레지듀얼 값을 생성하는 단계를 포함하고,
상기 디스케일링은,
로컬 시프트 값에 기초하여 오프셋 값을 결정하고, 상기 역변환을 수행하여 생성된 값에 상기 오프셋 값을 더하고, 상기 역변환을 수행하여 생성된 값에 상기 오프셋 값을 더한 값에 대하여 상기 로컬 시프트 값만큼 비트쉬프트를 수행하는 것을 포함하고,
상기 로컬 시프트 값은 상기 비디오 신호의 비트뎁스를 이용하여 결정되는 것을 특징으로 하는 복호화 방법.
A decoding method for decoding a video signal,
Obtaining a transform coefficient of a transform block in a video signal from a bitstream;
Performing inverse quantization on the transform coefficients of the transform block to generate an inversely quantized transform coefficient; And
And generating a residual value by performing inverse transform and descaling on the inversely quantized transform coefficient,
Wherein the descaling comprises:
The method of claim 1, further comprising: determining an offset value based on a local shift value, adding the offset value to the value generated by performing the inverse transform, Performing a shift,
Wherein the local shift value is determined using the bit depth of the video signal.
제 1 항에 있어서,
상기 역변환은 이산 코사인 역변환, 이산 웨이블릿 역변환과 같은 선형 역변환인 것을 특징으로 하는 복호화 방법.
The method according to claim 1,
Wherein the inverse transform is a linear inverse transform such as inverse discrete cosine transform and discrete wavelet inverse transform.
비디오 신호를 복호화하는 복호화 장치에 있어서,
비트스트림으로부터 비디오 신호 내 변환 블록의 변환 계수를 획득하는 파싱부;
상기 변환 블록의 상기 변환 계수에 대해 역양자화를 수행하여 역양자화된 변환 계수를 생성하는 역양자화부; 및
상기 역양자화된 변환 계수에 역변환 및 디스케일링을 수행하여 레지듀얼 값을 생성하는 역변환부 및 디스케일링부를 포함하고,
상기 디스케일링부가 디스케일링을 수행할 때
로컬 시프트 값에 기초하여 오프셋 값을 결정하고, 상기 역변환을 수행하여 생성된 값에 상기 오프셋 값을 더하고, 상기 역변환을 수행하여 생성된 값에 상기 오프셋 값을 더한 값에 대하여 상기 로컬 시프트 값만큼 비트쉬프트를 수행하고,
상기 로컬 시프트 값은 상기 비디오 신호의 비트뎁스를 이용하여 결정되는 것을 특징으로 하는 복호화 장치.
A decoding apparatus for decoding a video signal,
A parser for obtaining a transform coefficient of the transform block in the video signal from the bit stream;
A dequantizer for dequantizing the transform coefficient of the transform block to generate an inversely quantized transform coefficient; And
And an inverse transformer and a descaling unit for performing inverse transform and descaling on the inversely quantized transform coefficients to generate a residual value,
When the descaling unit performs descaling
The method of claim 1, further comprising: determining an offset value based on a local shift value, adding the offset value to the value generated by performing the inverse transform, Perform a shift,
Wherein the local shift value is determined using the bit depth of the video signal.
KR1020180088861A 2010-05-14 2018-07-30 Method and apparatus for video encoding, and method and apparatus for video decoding KR102003048B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US33463210P 2010-05-14 2010-05-14
US61/334,632 2010-05-14

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020110006485A Division KR101885258B1 (en) 2010-05-14 2011-01-21 Method and apparatus for video encoding, and method and apparatus for video decoding

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020190084680A Division KR102053317B1 (en) 2010-05-14 2019-07-12 Method and apparatus for video encoding, and method and apparatus for video decoding

Publications (2)

Publication Number Publication Date
KR20180089350A KR20180089350A (en) 2018-08-08
KR102003048B1 true KR102003048B1 (en) 2019-07-23

Family

ID=45395318

Family Applications (3)

Application Number Title Priority Date Filing Date
KR1020110006485A KR101885258B1 (en) 2010-05-14 2011-01-21 Method and apparatus for video encoding, and method and apparatus for video decoding
KR1020180088861A KR102003048B1 (en) 2010-05-14 2018-07-30 Method and apparatus for video encoding, and method and apparatus for video decoding
KR1020190084680A KR102053317B1 (en) 2010-05-14 2019-07-12 Method and apparatus for video encoding, and method and apparatus for video decoding

Family Applications Before (1)

Application Number Title Priority Date Filing Date
KR1020110006485A KR101885258B1 (en) 2010-05-14 2011-01-21 Method and apparatus for video encoding, and method and apparatus for video decoding

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020190084680A KR102053317B1 (en) 2010-05-14 2019-07-12 Method and apparatus for video encoding, and method and apparatus for video decoding

Country Status (6)

Country Link
US (5) US9525889B2 (en)
EP (2) EP3133814A1 (en)
KR (3) KR101885258B1 (en)
CN (5) CN103026705B (en)
MY (5) MY173533A (en)
WO (1) WO2011142645A2 (en)

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101885258B1 (en) 2010-05-14 2018-08-06 삼성전자주식회사 Method and apparatus for video encoding, and method and apparatus for video decoding
KR101836981B1 (en) * 2010-07-09 2018-03-09 한국전자통신연구원 Method and apparatus for encoding and decoding to image using template matching
CN103503458B (en) * 2011-01-07 2017-09-22 诺基亚技术有限公司 Motion prediction in Video coding
KR20120140181A (en) * 2011-06-20 2012-12-28 한국전자통신연구원 Method and apparatus for encoding and decoding using filtering for prediction block boundary
GB2492333B (en) * 2011-06-27 2018-12-12 British Broadcasting Corp Video encoding and decoding using transforms
US9749633B2 (en) * 2012-01-19 2017-08-29 Vid Scale, Inc. System and method of video coding quantization and dynamic range control
AU2013352851B2 (en) 2012-11-27 2016-11-17 Lg Electronics Inc. Signal transceiving apparatus and signal transceiving method
GB2513111A (en) * 2013-04-08 2014-10-22 Sony Corp Data encoding and decoding
US9877025B2 (en) * 2013-07-12 2018-01-23 British Broadcasting Corporation Video encoding and decoding with prediction at higher precision
GB2521349A (en) * 2013-12-05 2015-06-24 Sony Corp Data encoding and decoding
US20150302553A1 (en) * 2014-03-17 2015-10-22 Thomson Licensing Method and apparatus for determining source resolution of scaled images
EP2958329B1 (en) 2014-06-16 2018-12-05 Thomson Licensing Method for encoding and decoding an image block based on dynamic range extension, encoder and decoder
JP6529374B2 (en) * 2014-10-07 2019-06-12 キヤノン株式会社 Encoding apparatus and control method thereof
EP3007448A1 (en) * 2014-10-07 2016-04-13 Canon Kabushiki Kaisha Disparity data encoding apparatus and method of controlling the same for
US10735755B2 (en) * 2015-04-21 2020-08-04 Arris Enterprises Llc Adaptive perceptual mapping and signaling for video coding
WO2018174591A1 (en) 2017-03-22 2018-09-27 김기백 Image encoding/decoding method using pixel value range constituting image
US11445218B2 (en) * 2017-11-24 2022-09-13 Sony Corporation Image processing apparatus and method
EP3754987A4 (en) * 2018-02-14 2021-04-14 Sony Corporation Image-processing device and method
KR20200043169A (en) * 2018-10-17 2020-04-27 삼성전자주식회사 Method and apparatus for quantizing neural network parameters
JP2020150338A (en) 2019-03-11 2020-09-17 キヤノン株式会社 Image decoder, image decoding method, and program
JP7267785B2 (en) * 2019-03-11 2023-05-02 キヤノン株式会社 Image decoding device, image decoding method, and program
CN114365490B (en) 2019-09-09 2024-06-18 北京字节跳动网络技术有限公司 Coefficient scaling for high precision image and video codecs
CN114731392A (en) * 2019-09-21 2022-07-08 北京字节跳动网络技术有限公司 High precision transform and quantization for image and video coding
US11838551B2 (en) * 2020-12-30 2023-12-05 Ofinno, Llc Adaptive block level bit-depth prediction

Family Cites Families (41)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0182940B1 (en) 1984-11-13 1990-04-11 Mobil Oil Corporation Mannich base oil additives
JP3166291B2 (en) * 1992-04-03 2001-05-14 ソニー株式会社 Quantization control circuit
US5793658A (en) * 1996-01-17 1998-08-11 Digital Equipment Coporation Method and apparatus for viedo compression and decompression using high speed discrete cosine transform
CN100481946C (en) * 1998-03-20 2009-04-22 三菱电机株式会社 Method and device for coding, decoding and compressing image
US6801665B1 (en) 1998-09-15 2004-10-05 University Of Maryland Method and apparatus for compressing and decompressing images
EP1862940A1 (en) * 1998-03-20 2007-12-05 Mitsubishi Electric Corporation Image compression
US6560285B1 (en) * 1998-03-30 2003-05-06 Sarnoff Corporation Region-based information compaction as for digital images
US6377706B1 (en) * 1998-05-12 2002-04-23 Xerox Corporation Compression framework incorporating decoding commands
US6731686B1 (en) * 2000-05-31 2004-05-04 Sun Microsystems, Inc. Apparatus and method for pipelining variable length decode and inverse quantization operations in a hybrid motion-compensated and transform coded video decoder
US6882685B2 (en) * 2001-09-18 2005-04-19 Microsoft Corporation Block transform and quantization for image and video coding
US7106909B2 (en) * 2001-12-25 2006-09-12 Canon Kabushiki Kaisha Method and apparatus for encoding image data in accordance with a target data size
JP4015934B2 (en) * 2002-04-18 2007-11-28 株式会社東芝 Video coding method and apparatus
US7277486B2 (en) * 2002-05-03 2007-10-02 Microsoft Corporation Parameterization for fading compensation
US7760950B2 (en) * 2002-09-26 2010-07-20 Ntt Docomo, Inc. Low complexity and unified transforms for video coding
CN1843040A (en) * 2003-08-26 2006-10-04 三星电子株式会社 Scalable video coding and decoding methods, and scalable video encoder and decoder
KR20050022160A (en) * 2003-08-26 2005-03-07 삼성전자주식회사 Method for scalable video coding and decoding, and apparatus for the same
US7599438B2 (en) * 2003-09-07 2009-10-06 Microsoft Corporation Motion vector block pattern coding and decoding
US7457362B2 (en) * 2003-10-24 2008-11-25 Texas Instruments Incorporated Loop deblock filtering of block coded video in a very long instruction word processor
US7693339B2 (en) * 2003-12-17 2010-04-06 Andreas Wittenstein Method and apparatus for faster-than-real-time lossless compression and decompression of images
EP1591963B1 (en) * 2004-04-29 2008-07-09 Mitsubishi Electric Information Technology Centre Europe B.V. Adaptive quantisation of a depth map
JP2005354307A (en) * 2004-06-09 2005-12-22 Toshiba Corp Inverse quantizer and image decoder employing same
US7474316B2 (en) * 2004-08-17 2009-01-06 Sharp Laboratories Of America, Inc. Bit-depth extension of digital displays via the use of models of the impulse response of the visual system
US7778327B2 (en) * 2005-02-08 2010-08-17 Texas Instruments Incorporated H.264 quantization
US7949044B2 (en) 2005-04-12 2011-05-24 Lsi Corporation Method for coefficient bitdepth limitation, encoder and bitstream generation apparatus
US7599840B2 (en) 2005-07-15 2009-10-06 Microsoft Corporation Selectively using multiple entropy models in adaptive coding and decoding
US7693709B2 (en) * 2005-07-15 2010-04-06 Microsoft Corporation Reordering coefficients for waveform coding or decoding
US7916960B2 (en) * 2005-09-06 2011-03-29 Megachips Corporation Compression encoder, compression encoding method and program
EP2293572A1 (en) 2005-09-27 2011-03-09 Qualcomm Incorporated Channel switch frame
US7706288B2 (en) * 2005-09-27 2010-04-27 Qualcomm Incorporated RF channel switching in broadcast OFDM systems
US9554319B2 (en) 2005-09-27 2017-01-24 Qualcomm Incorporated Channel handoff methods in wireless broadcast systems
US8548265B2 (en) * 2006-01-05 2013-10-01 Fastvdo, Llc Fast multiplierless integer invertible transforms
US20080240257A1 (en) * 2007-03-26 2008-10-02 Microsoft Corporation Using quantization bias that accounts for relations between transform bins and quantization bins
CN105791864B (en) 2007-05-16 2019-01-15 汤姆逊许可Dtv公司 The device of chip set is used in coding and transmission multi-view video coding information
US7983496B2 (en) * 2007-06-26 2011-07-19 Mitsubishi Electric Research Laboratories, Inc. Inverse tone mapping for bit-depth scalable image coding adapted to variable block sizes
US8085852B2 (en) * 2007-06-26 2011-12-27 Mitsubishi Electric Research Laboratories, Inc. Inverse tone mapping for bit-depth scalable image coding
DE102007041143B4 (en) 2007-08-30 2010-04-08 Siemens Enterprise Communications Gmbh & Co. Kg Method for analyzing concurrently transmitted, encrypted data streams in IP networks
US8064517B1 (en) * 2007-09-07 2011-11-22 Zenverge, Inc. Perceptually adaptive quantization parameter selection
US8204333B2 (en) * 2007-10-15 2012-06-19 Intel Corporation Converting video and image signal bit depths
US8213502B2 (en) * 2007-12-31 2012-07-03 Ceva D.S.P. Ltd. Method and system for real-time adaptive quantization control
DK2476255T3 (en) * 2009-09-10 2018-08-06 Guangdong Oppo Mobile Telecommunications Corp Ltd ACCELERATION TECHNIQUES FOR DISTORTION GRADE OPTIMIZED QUANTIZATION
KR101885258B1 (en) 2010-05-14 2018-08-06 삼성전자주식회사 Method and apparatus for video encoding, and method and apparatus for video decoding

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
K. Chono, et al. Description of video coding technology proposal by NEC Corporation. JCT-VC of ITU-T and ISO/IEC. JCTVC-A104. Apr. 2010. pp.1-57

Also Published As

Publication number Publication date
US20110280302A1 (en) 2011-11-17
KR102053317B1 (en) 2019-12-06
WO2011142645A2 (en) 2011-11-17
US20170064316A1 (en) 2017-03-02
EP3133814A1 (en) 2017-02-22
EP2569947A2 (en) 2013-03-20
CN105939477B (en) 2019-04-05
CN105939477A (en) 2016-09-14
MY173534A (en) 2020-01-31
US20170064317A1 (en) 2017-03-02
CN103026705B (en) 2016-06-29
US20170064314A1 (en) 2017-03-02
KR20190085907A (en) 2019-07-19
CN103026705A (en) 2013-04-03
MY173539A (en) 2020-02-03
CN106028040B (en) 2019-05-10
WO2011142645A3 (en) 2012-03-08
CN106028040A (en) 2016-10-12
US10075721B2 (en) 2018-09-11
CN105847818B (en) 2019-03-01
MY171636A (en) 2019-10-22
US9525889B2 (en) 2016-12-20
US10091516B2 (en) 2018-10-02
CN105939478B (en) 2019-03-08
EP2569947A4 (en) 2015-08-19
KR20180089350A (en) 2018-08-08
CN105939478A (en) 2016-09-14
US20170064315A1 (en) 2017-03-02
MY173533A (en) 2020-01-31
KR101885258B1 (en) 2018-08-06
CN105847818A (en) 2016-08-10
MY173540A (en) 2020-02-03
US10027967B2 (en) 2018-07-17
US10116949B2 (en) 2018-10-30
KR20110126032A (en) 2011-11-22

Similar Documents

Publication Publication Date Title
KR102003048B1 (en) Method and apparatus for video encoding, and method and apparatus for video decoding
US8208543B2 (en) Quantization and differential coding of alpha image data
US8194748B2 (en) Apparatus for scalable encoding/decoding of moving image and method thereof
KR100813963B1 (en) Method and apparatus for loseless encoding and decoding image
KR20110135787A (en) Image/video coding and decoding system and method using edge-adaptive transform
US10652541B2 (en) Method and device for encoding video data
KR20080018469A (en) Method and apparatus for transforming and inverse-transforming image
KR20100102386A (en) Method and apparatus for encoding/decoding image based on residual value static adaptive code table selection
CN103843346A (en) Method for decoding picture in form of bit-stream
US20190191162A1 (en) Method and device for encoding video data
US8532179B2 (en) Method and device for optimizing the compression of a video stream
KR101979379B1 (en) Method and apparatus for encoding image, and method and apparatus for decoding image
JP2794842B2 (en) Encoding method and decoding method
JP2005151312A (en) Image coding and decoding device
JP2005354307A (en) Inverse quantizer and image decoder employing same
WO2023131113A1 (en) Video encoding apparatus for performing video compression with aid of content activity analysis and associated video encoding method
JP5353560B2 (en) Image processing circuit and image encoding apparatus
JP2018032900A (en) Video encoder and video decoder

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant