KR102534377B1 - Method for quantization based on fast rate-distortion optimization, and apparatus for the same - Google Patents

Method for quantization based on fast rate-distortion optimization, and apparatus for the same Download PDF

Info

Publication number
KR102534377B1
KR102534377B1 KR1020220106338A KR20220106338A KR102534377B1 KR 102534377 B1 KR102534377 B1 KR 102534377B1 KR 1020220106338 A KR1020220106338 A KR 1020220106338A KR 20220106338 A KR20220106338 A KR 20220106338A KR 102534377 B1 KR102534377 B1 KR 102534377B1
Authority
KR
South Korea
Prior art keywords
quantization
distortion optimization
transform
block
transform block
Prior art date
Application number
KR1020220106338A
Other languages
Korean (ko)
Other versions
KR20220123197A (en
Inventor
임성창
김종호
전동산
조숙희
강정원
이대열
이진호
이하현
정세윤
김휘용
최진수
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to KR1020220106338A priority Critical patent/KR102534377B1/en
Publication of KR20220123197A publication Critical patent/KR20220123197A/en
Priority to KR1020230062196A priority patent/KR102661525B1/en
Application granted granted Critical
Publication of KR102534377B1 publication Critical patent/KR102534377B1/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/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/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

본 발명은 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 고속 율-왜곡 최적화 기반 양자화 방법에 관한 것이다. 본 발명에 따르면, 변환 블록 내 제1 문맥 정보의 값을 1로 초기화하고, 상기 변환 블록 내 제2 문맥 정보의 값을 0으로 초기화하여 문맥 정보를 초기화하는 단계; 상기 변환 블록 내 변환 계수를 스캔하고, 상기 변환 계수를 양자화하는 단계; 상기 변환 계수의 양자화된 레벨 값을 계산하고, 상기 변환 블록 내 일부 변환 계수의 위치 또는 상기 변환 블록 내 부블록에 대하여 최적의 양자화된 레벨 값을 결정하는 단계; 및 상기 일부 변환 계수의 위치 또는 상기 부블록에 대하여 최적의 마지막 중요 계수를 결정하는 단계를 포함하고, 상기 일부 변환 계수의 위치 또는 상기 부블록에 대하여 데드존을 이용한 스칼라 양자화를 적용하는 단계를 더 포함하는, 고속 율-왜곡 최적화 기반 양자화 방법이 제공된다. 본 발명에 따르면, 양자화의 복잡도를 감소시킬 수 있다.The present invention relates to a quantization method based on fast rate-distortion optimization performed by a quantization apparatus based on fast rate-distortion optimization. According to the present invention, initializing the context information by initializing the value of the first context information in the conversion block to 1 and initializing the value of the second context information in the conversion block to 0; scanning transform coefficients in the transform block and quantizing the transform coefficients; calculating quantized level values of the transform coefficients, and determining optimal quantized level values for positions of some transform coefficients within the transform block or subblocks within the transform block; and determining an optimal last significant coefficient for the subblock or the location of the partial transform coefficients, further comprising applying scalar quantization using a dead zone to the location of the partial transform coefficients or the subblock. A quantization method based on fast rate-distortion optimization is provided, including. According to the present invention, the complexity of quantization can be reduced.

Figure 112022088915762-pat00004
Figure 112022088915762-pat00004

Description

고속 율-왜곡 최적화 기반 양자화 방법 및 장치{METHOD FOR QUANTIZATION BASED ON FAST RATE-DISTORTION OPTIMIZATION, AND APPARATUS FOR THE SAME}Quantization method and apparatus based on fast rate-distortion optimization

본 발명은, 고속 율-왜곡 최적화 기반 양자화 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for quantization based on high-speed rate-distortion optimization.

최근 HD(High Definition) 해상도를 가지는 방송 서비스가 국내뿐만 아니라 세계적으로 확대되면서, 많은 사용자들이 고해상도, 고화질의 영상에 익숙해지고 있다. Recently, as a broadcasting service having a high definition (HD) resolution is expanded not only domestically but also globally, many users are getting used to high-definition and high-definition images.

이에 따라서, 많은 기관들이 차세대 영상기기에 대한 개발에 박차를 가하고 있다. 또한, HDTV와 더불어 HDTV의 4배 이상의 해상도를 갖는 UHD(Ultra High Definition)에 대한 관심이 증대되면서 보다 높은 해상도, 고화질의 영상에 대한 압축기술이 요구되고 있다.Accordingly, many institutions are accelerating the development of next-generation imaging devices. In addition, as interest in UHD (Ultra High Definition) having a resolution four times higher than that of HDTV increases along with HDTV, a compression technique for a higher resolution and higher quality image is required.

또한, 영상 압축을 위하여, 시간적으로 이전 또는 이후의 픽쳐로부터 현재 픽쳐에 포함된 픽셀값을 예측하는 인터(inter) 예측 기술, 현재 픽쳐 내의 픽셀 정보를 이용하여 현재 픽쳐에 포함된 픽셀값을 예측하는 인트라(intra) 예측 기술이 사용될 수 있다. 또한, 영상 압축을 위하여, 출현 빈도가 높은 심볼(symbol)에 짧은 부호를 할당하고 출현 빈도가 낮은 심볼에 긴 부호를 할당하는 엔트로피 부호화 기술 등이 사용될 수 있다.In addition, for image compression, an inter prediction technique for predicting pixel values included in the current picture from temporally previous or subsequent pictures, predicting pixel values included in the current picture using pixel information in the current picture Intra prediction techniques may be used. In addition, for image compression, an entropy coding technique may be used in which short codes are assigned to symbols with a high frequency of occurrence and long codes are assigned to symbols with a low frequency of occurrence.

하지만, 기존의 기술은, 양자화의 복잡도가 크다는 문제점이 있다. 이에, 양자화의 복잡도를 감소시킬 수 있는 기술을 제안하고자 한다.However, the existing technology has a problem in that the complexity of quantization is high. Accordingly, a technique capable of reducing the complexity of quantization is proposed.

본 발명은 상술한 문제점을 모두 해결하는 것을 목적으로 한다.The present invention aims to solve all of the above problems.

본 발명은, 양자화의 복잡도를 감소시키는 것을 제공하는 것을 다른 목적으로 한다.Another object of the present invention is to provide reducing the complexity of quantization.

본 발명은, 율-왜곡 최적화 기반 양자화의 복잡도를 감소시키는 것을 또 다른 목적으로 한다.Another object of the present invention is to reduce the complexity of rate-distortion optimization based quantization.

상기한 바와 같은 본 발명의 목적을 달성하고, 후술하는 본 발명의 특징적인 효과를 실현하기 위한, 본 발명의 특징적인 구성은 하기와 같다.In order to achieve the object of the present invention as described above and realize the characteristic effects of the present invention described later, the characteristic configuration of the present invention is as follows.

일실시예에 따른, 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 고속 율-왜곡 최적화 기반 양자화 방법에 있어서, 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 고속 율-왜곡 최적화 기반 양자화 방법은, 변환 블록 내 제1 문맥 정보의 값을 1로 초기화하고, 상기 변환 블록 내 제2 문맥 정보의 값을 0으로 초기화하여 문맥 정보를 초기화하는 단계; 상기 변환 블록 내 변환 계수를 스캔하고, 상기 변환 계수를 양자화하는 단계; 상기 변환 계수의 양자화된 레벨 값을 계산하고, 상기 변환 블록 내 일부 변환 계수의 위치 또는 상기 변환 블록 내 부블록에 대하여 최적의 양자화된 레벨 값을 결정하는 단계; 및 상기 일부 변환 계수의 위치 또는 상기 부블록에 대하여 최적의 마지막 중요 계수를 결정하는 단계를 포함하고, 상기 일부 변환 계수의 위치 또는 상기 부블록에 대하여 데드존을 이용한 스칼라 양자화를 적용하는 단계를 더 포함할 수 있다.In the quantization method based on fast rate-distortion optimization performed by the quantization apparatus based on fast rate-distortion optimization according to an embodiment, the quantization method based on fast rate-distortion optimization performed by the quantization apparatus based on fast rate-distortion optimization includes transform initializing context information by initializing a value of first context information within a block to 1 and initializing a value of second context information within the conversion block to 0; scanning transform coefficients in the transform block and quantizing the transform coefficients; calculating quantized level values of the transform coefficients, and determining optimal quantized level values for positions of some transform coefficients within the transform block or subblocks within the transform block; and determining an optimal last significant coefficient for the subblock or the location of the partial transform coefficients, further comprising applying scalar quantization using a dead zone to the location of the partial transform coefficients or the subblock. can include

다른 실시예에 따른, 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 고속 율-왜곡 최적화 기반 양자화 방법에 있어서, 상기 양자화하는 단계는, 상기 변환 블록 내 변환 계수들을 역 대각(reverse diagonal) 순서로 스캔하고, 양자화 오프셋 값 0.5를 이용하여 상기 변환 계수를 양자화하는 것을 포함할 수 있다.In the quantization method based on fast rate-distortion optimization performed by a quantization apparatus based on fast rate-distortion optimization according to another embodiment, the quantizing step scans transform coefficients in the transform block in a reverse diagonal order and quantizing the transform coefficient using a quantization offset value of 0.5.

또 다른 실시예에 따른, 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 고속 율-왜곡 최적화 기반 양자화 방법에 있어서, 상기 스칼라 양자화를 적용하는 단계는, 라운딩(rounding) 연산자, 부호, 양자화 스텝 크기 및 양자화 오프셋을 이용하여 상기 변환 계수를 이산 양자화된 레벨로 매핑하고, 상기 데드존은, 입력 값을 0으로 출력하는 구간이고, 상기 양자화 오프셋은, 상기 데드존의 구간을 조절하는 것을 포함할 수 있다.In the fast rate-distortion optimization based quantization method performed by the fast rate-distortion optimization based quantization apparatus according to another embodiment, the step of applying scalar quantization includes a rounding operator, a sign, a quantization step size and The transform coefficient may be mapped to a discrete quantized level using a quantization offset, the dead zone is an interval in which an input value is output as 0, and the quantization offset may include adjusting the interval of the dead zone. .

또 다른 실시예에 따른, 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 고속 율-왜곡 최적화 기반 양자화 방법에 있어서, 상기 최적의 양자화된 레벨 값을 결정하는 단계는, 상기 변환 블록 내 마지막 중요 계수를 고정하는 단계; 및 0이 아닌 나머지 변환 계수들에 대한 율-왜곡 비용을 계산하는 단계를 포함할 수 있다.In the fast rate-distortion optimization based quantization method performed by the fast rate-distortion optimization based quantization apparatus according to another embodiment, the step of determining the optimal quantized level value includes the last significant coefficient in the transform block fixing; and calculating rate-distortion costs for the remaining non-zero transform coefficients.

또 다른 실시예에 따른, 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 고속 율-왜곡 최적화 기반 양자화 방법에 있어서, 상기 최적의 마지막 중요 계수를 결정하는 단계는, 상기 변환 블록에 대하여 초기 율-왜곡 비용 값으로 초기화하는 단계; 및 상기 변환 블록 내 양자화된 레벨 값을 이용하여 역 대각 순서로 스캔하고 율-왜곡 비용을 계산하는 단계를 포함할 수 있다.In the quantization method based on fast rate-distortion optimization performed by a quantization apparatus based on fast rate-distortion optimization according to another embodiment, the determining of the optimal last significant coefficient may include initial rate-distortion for the transform block Initializing with a cost value; and scanning in an inverse diagonal order using the quantized level values in the transform block and calculating a rate-distortion cost.

일실시예에 따른, 고속 율-왜곡 최적화 기반 양자화 장치에 있어서, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내 제1 문맥 정보의 값을 1로 초기화하고, 상기 변환 블록 내 제2 문맥 정보의 값을 0으로 초기화하여 문맥 정보를 초기화하는 문맥 정보 초기화부; 상기 변환 블록 내 변환 계수를 스캔하고, 상기 변환 계수를 양자화하는 변환 계수 양자화부; 상기 변환 계수의 양자화된 레벨 값을 계산하고, 상기 변환 블록 내 일부 변환 계수의 위치 또는 상기 변환 블록 내 부블록에 대하여 최적의 양자화된 레벨 값을 결정하는 양자화 레벨 결정부; 및 상기 일부 변환 계수의 위치 또는 상기 부블록에 대하여 최적의 마지막 중요 계수를 결정하는 최적 마지막 중요 계수 결정부를 포함하고, 상기 일부 변환 계수의 위치 또는 상기 부블록에 대하여 데드존을 이용한 스칼라 양자화를 적용하는 스칼라 양자화부를 더 포함할 수 있다.In the quantization apparatus based on fast rate-distortion optimization according to an embodiment, the apparatus initializes a value of first context information in a transform block to 1, and second context information in the transform block a context information initialization unit that initializes context information by initializing a value of 0; a transform coefficient quantization unit that scans transform coefficients in the transform block and quantizes the transform coefficients; a quantization level determining unit which calculates quantized level values of the transform coefficients and determines positions of some transform coefficients within the transform block or optimal quantized level values for subblocks within the transform block; and an optimum last significant coefficient determining unit for determining an optimal last significant coefficient for the subblock or the location of the partial transform coefficients, wherein scalar quantization using a dead zone is applied to the location of the partial transform coefficients or the subblock. A scalar quantization unit may be further included.

다른 실시예에 따른, 고속 율-왜곡 최적화 기반 양자화 장치에 있어서, 상기 변환 계수 양자화부는, 상기 변환 블록 내 변환 계수들을 역 대각(reverse diagonal) 순서로 스캔하고, 양자화 오프셋 값 0.5를 이용하여 상기 변환 계수를 양자화하는 것을 포함할 수 있다.In the fast rate-distortion optimization-based quantization apparatus according to another embodiment, the transform coefficient quantizer scans transform coefficients in the transform block in a reverse diagonal order, and uses a quantization offset value of 0.5 to perform the transform This may include quantizing the coefficients.

다른 실시예에 따른, 고속 율-왜곡 최적화 기반 양자화 장치에 있어서, 상기 스칼라 양자화부는, 라운딩(rounding) 연산자, 부호, 양자화 스텝 크기 및 양자화 오프셋을 이용하여 상기 변환 계수를 이산 양자화된 레벨로 매핑하고, 상기 데드존은, 입력 값을 0으로 출력하는 구간이고, 상기 양자화 오프셋은, 상기 데드존의 구간을 조절하는 것을 포함할 수 있다.In the fast rate-distortion optimization-based quantization apparatus according to another embodiment, the scalar quantization unit maps the transform coefficient to a discrete quantized level using a rounding operator, a sign, a quantization step size, and a quantization offset, , The dead zone is a period in which an input value is output as 0, and the quantization offset may include adjusting the period of the dead zone.

또 다른 실시예에 따른, 고속 율-왜곡 최적화 기반 양자화 장치에 있어서, 상기 양자화 레벨 결정부는, 상기 변환 블록 내 마지막 중요 계수를 고정하고, 0이 아닌 나머지 변환 계수들에 대한 율-왜곡 비용을 계산하는 것을 포함할 수 있다.According to another embodiment, in the fast rate-distortion optimization-based quantization apparatus, the quantization level determiner fixes the last significant coefficient in the transform block and calculates rate-distortion costs for the remaining non-zero transform coefficients. may include doing

또 다른 실시예에 따른, 고속 율-왜곡 최적화 기반 양자화 장치에 있어서, 계수 결정부는, 상기 변환 블록에 대하여 초기 율-왜곡 비용 값으로 초기화하고, 상기 변환 블록 내 양자화된 레벨 값을 이용하여 역 대각 순서로 스캔하고 율-왜곡 비용을 계산하는 것을 포함할 수 있다.According to another embodiment, in the fast rate-distortion optimization-based quantization apparatus, the coefficient determiner initializes the transform block with an initial rate-distortion cost value, and uses the quantized level value in the transform block to generate an inverse diagonal It may involve scanning in order and calculating the rate-distortion cost.

본 발명은, 양자화의 복잡도를 감소시키는 것을 제공할 수 있다. 그러므로, 본 발명은, 양자화의 복잡도를 감소시킬 수 있는 효과가 있다.The present invention can provide reducing the complexity of quantization. Therefore, the present invention has an effect of reducing the complexity of quantization.

본 발명은, 율-왜곡 최적화 기반 양자화의 복잡도를 감소시키는 것을 제공할 수 있다. 그러므로, 본 발명은, 율-왜곡 최적화 기반 양자화의 복잡도를 감소시킬 수 있는 효과가 있다.The present invention can provide reducing the complexity of rate-distortion optimization based quantization. Therefore, the present invention has an effect of reducing the complexity of quantization based on rate-distortion optimization.

도 1은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법을 나타내는 흐름도이다.
도 2는 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 장치를 나타내는 블록도이다.
도 3은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 장치로서, 세부 구성을 나타내는 것이다.
도 4는 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 영상 복호화 장치를 나타내는 것이다.
도 5는 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법으로 영상을 부호화 및 복호화시 영상의 분할 구조를 개략적으로 나타내는 것이다.
도 6은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 부호화 유닛이 포함할 수 있는 예측 유닛의 형태를 나타내는 것이다.
도 7은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 부호화 유닛이 포함할 수 있는 변환 유닛의 형태를 나타내는 것이다.
도 8은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법 중 최적의 양자화된 레벨 값을 결정하는 단계를 나타내는 것이다.
도 9는 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법 중 최적의 마지막 중요 계수를 결정하는 단계를 나타내는 것이다.
도 10은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 변환 블록을 나타내는 것이다.
도 11은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법을 나타내는 것이다.
도 12는 일실시예에 따른 변환 블록을 이용한 고속 율-왜곡 최적화 기반 양자화 방법을 나타내는 것이다.
1 is a flowchart illustrating a quantization method based on fast rate-distortion optimization according to an embodiment.
2 is a block diagram illustrating a quantization apparatus based on fast rate-distortion optimization according to an embodiment.
3 illustrates a detailed configuration of a quantization apparatus based on high-speed rate-distortion optimization according to an embodiment.
4 illustrates an image decoding apparatus to which a quantization method based on high-speed rate-distortion optimization according to an embodiment is applied.
5 schematically illustrates a division structure of an image when encoding and decoding an image using a quantization method based on fast rate-distortion optimization according to an embodiment.
6 illustrates a shape of a prediction unit that may be included in a coding unit to which a quantization method based on fast rate-distortion optimization according to an embodiment is applied.
7 illustrates a form of a transform unit that may be included in a coding unit to which a quantization method based on fast rate-distortion optimization according to an embodiment is applied.
8 illustrates a step of determining an optimal quantized level value in a quantization method based on fast rate-distortion optimization according to an embodiment.
9 illustrates a step of determining an optimal last significant coefficient in a quantization method based on fast rate-distortion optimization according to an embodiment.
10 illustrates a transform block to which a quantization method based on fast rate-distortion optimization according to an embodiment is applied.
11 illustrates a quantization method based on fast rate-distortion optimization according to an embodiment.
12 illustrates a quantization method based on fast rate-distortion optimization using a transform block according to an embodiment.

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

도 1은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법을 나타내는 흐름도이다.1 is a flowchart illustrating a quantization method based on fast rate-distortion optimization according to an embodiment.

일실시예에 따르면, 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화기는 영상 부호화 과정에서 변환 계수에 대해서 양자화를 수행하여 양자화된 변환 계수 레벨을 얻을 수 있다. 이때, 변환 계수를 양자화하는 것은, 계수의 비트 깊이(bit depth)를 감소시키는 것일 수도 있다. 또한, 양자화된 변환 계수 레벨은 양자화된 레벨(quantized level)일 수도 있다.According to an embodiment, an image encoder, which is a high-speed rate-distortion optimization-based quantization device, may obtain a quantized transform coefficient level by performing quantization on transform coefficients in an image encoding process. In this case, quantizing the transform coefficient may be reducing the bit depth of the coefficient. Also, the quantized transform coefficient level may be a quantized level.

고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화기는, 양자화를 수행할 때 데드존(deadzone)을 이용한 스칼라(scalar) 양자화 방식을 사용하거나, 율-왜곡 최적화 기반 양자화(rate-distortion optimized quantization) 방식을 사용할 수 있다.An image encoder, which is a high-speed rate-distortion optimization-based quantization device, uses a scalar quantization method using a deadzone or a rate-distortion optimized quantization method when performing quantization. can be used

또한, 고속 율-왜곡 최적화 기반 양자화 장치는, 부호화된 영상 데이터의 비트율인, 율과, 복원된 영상과 원 영상 사이의 차이인, 왜곡 사이의 트레이드오프를 최적화할 수 있다.In addition, the high-speed rate-distortion optimization-based quantization apparatus may optimize a tradeoff between a rate, which is a bit rate of encoded image data, and distortion, which is a difference between a reconstructed image and an original image.

도 1을 참조하면, 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 고속 율-왜곡 최적화 기반 양자화 방법은 하기와 같은 단계로 구성된다. 물론, 경우에 따라서, 각 단계는 동시에 수행될 수도 있으며, 순서가 바뀔 수도 있으나, 이에 한정되지는 않는다.Referring to FIG. 1 , a quantization method based on fast rate-distortion optimization performed by a quantization apparatus based on fast rate-distortion optimization consists of the following steps. Of course, in some cases, each step may be performed at the same time, or the order may be changed, but is not limited thereto.

단계(S101)에서, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내 제1 문맥 정보의 값을 1로 초기화하고, 변환 블록 내 제2 문맥 정보의 값을 0으로 초기화하여 문맥 정보를 초기화할 수 있다.In step S101, the fast rate-distortion optimization based quantization apparatus initializes the value of the first context information in the transform block to 1 and initializes the value of the second context information in the transform block to 0 to initialize the context information. can

예를 들면, 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화기는 문맥(context) 정보를 초기화한다. 이때, 문맥 정보 C1 값은 1로 초기화하고, C2 값은 0으로 초기화할 수 있다.For example, an image encoder, which is a high-speed rate-distortion optimization-based quantization device, initializes context information. In this case, the context information C1 value may be initialized to 1, and the C2 value may be initialized to 0.

단계(S102)에서, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내 변환 계수를 스캔하고, 변환 계수를 양자화할 수 있다. 이때, 변환 블록 내 변환 계수들을 역 대각(reverse diagonal) 순서로 스캔하고, 양자화 오프셋 값 0.5를 이용하여 변환 계수를 양자화하는 고속 율-왜곡 최적화 기반 양자화할 수 있다.In step S102, the fast rate-distortion optimization based quantization apparatus scans the transform coefficients in the transform block and quantizes the transform coefficients. In this case, quantization based on fast rate-distortion optimization may be performed by scanning transform coefficients in the transform block in a reverse diagonal order and quantizing the transform coefficients using a quantization offset value of 0.5.

예를 들면, 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화기는 변환 블록 내 변환 계수를 스캔하면서 변환 계수를 양자화하고 양자화된 레벨 값을 계산할 수 있다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화기는 변환 계수 블록 내의 변환 계수들을 역 대각(reverse diagonal) 스캔 순서로 스캔한다. 이때, 변환 계수를 스캔하면서 양자화 오프셋 값 0.5를 이용하여 변환 계수를 양자화하고 양자화된 레벨 값을 계산할 수 있다.For example, an image encoder, which is a high-speed rate-distortion optimization-based quantization device, may scan transform coefficients in a transform block to quantize transform coefficients and calculate quantized level values. Also, an image encoder, which is a fast rate-distortion optimization based quantization device, scans transform coefficients in a transform coefficient block in a reverse diagonal scan order. In this case, while scanning the transform coefficient, the transform coefficient may be quantized using a quantization offset value of 0.5, and a quantized level value may be calculated.

단계(S103)에서, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 계수의 양자화된 레벨 값을 계산하고, 변환 블록 내 일부 변환 계수의 위치 또는 변환 블록 내 부블록에 대하여 최적의 양자화된 레벨 값을 결정 할 수 있다.In step S103, the fast rate-distortion optimization based quantization apparatus calculates quantized level values of transform coefficients, and obtains optimal quantized level values for positions of some transform coefficients in a transform block or subblocks in a transform block. can decide

예를 들면, 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화기는 변환 계수 블록 내의 변환 계수들에 대해 최적의 양자화된 레벨 값을 결정할 수 있다.For example, an image encoder, which is a fast rate-distortion optimization based quantization device, may determine optimal quantized level values for transform coefficients in a transform coefficient block.

구체적으로, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내 마지막 중요 계수를 고정할 수 있다.Specifically, the fast rate-distortion optimization based quantization apparatus may fix the last significant coefficient in the transform block.

다음으로, 고속 율-왜곡 최적화 기반 양자화 장치는, 0이 아닌 나머지 변환 계수들에 대한 율-왜곡 비용을 계산할 수 있다.Next, the fast rate-distortion optimization-based quantization apparatus may calculate rate-distortion costs for remaining non-zero transform coefficients.

단계(S104)에서, 고속 율-왜곡 최적화 기반 양자화 장치는, 일부 변환 계수의 위치 또는 부블록에 대하여 최적의 마지막 중요 계수를 결정 할 수 있다.In step S104, the fast rate-distortion optimization-based quantization apparatus may determine positions of some transform coefficients or optimal last significant coefficients for subblocks.

예를 들면, 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화기는 최적의 마지막 중요 계수(last significant coefficient)를 결정할 수 있다.For example, an image encoder, which is a fast rate-distortion optimization based quantization device, may determine an optimal last significant coefficient.

구체적으로, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록에 대하여 초기 율-왜곡 비용 값으로 초기화 할 수 있다. 다음으로, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내 양자화된 레벨 값을 이용하여 역 대각 순서로 스캔하고 율-왜곡 비용을 계산할 수 있다.Specifically, the fast rate-distortion optimization-based quantization apparatus may initialize the transform block with an initial rate-distortion cost value. Next, the fast rate-distortion optimization based quantization apparatus may scan in an inverse diagonal order using the quantized level values in the transform block and calculate the rate-distortion cost.

또한, 단계(S101) 내지 단계(S104)의 사이의 단계에서, 고속 율-왜곡 최적화 기반 양자화 장치는, 일부 변환 계수의 위치 또는 부블록에 대하여 데드존을 이용한 스칼라 양자화를 적용할 수 있다. 또한, 경우에 따라서, 단계(S101) 이전의 단계에서, 고속 율-왜곡 최적화 기반 양자화 장치는, 일부 변환 계수의 위치 또는 부블록에 대하여 데드존을 이용한 스칼라 양자화를 적용할 수 있다.In addition, in steps between steps S101 and step S104, the fast rate-distortion optimization-based quantization apparatus may apply scalar quantization using a dead zone to positions of some transform coefficients or subblocks. In addition, in some cases, in a step prior to step S101, the fast rate-distortion optimization based quantization apparatus may apply scalar quantization using a dead zone to positions of some transform coefficients or subblocks.

이때, 고속 율-왜곡 최적화 기반 양자화 장치는, 라운딩(rounding) 연산자, 부호, 양자화 스텝 크기 및 양자화 오프셋을 이용하여 변환 계수를 이산 양자화된 레벨로 매핑할 수 있다.In this case, the fast rate-distortion optimization-based quantization apparatus may map transform coefficients to discrete quantized levels using a rounding operator, a sign, a quantization step size, and a quantization offset.

물론, 데드존은, 입력 값을 0으로 출력하는 구간일 수 있으며, 양자화 오프셋은, 데드존의 구간을 조절할 수도 있다.Of course, the dead zone may be a section in which the input value is output as 0, and the quantization offset may adjust the section of the dead zone.

예를 들면, 고속 율-왜곡 최적화 기반 양자화 장치는, 하기 수학식 1을 이용하여 변환 계수를 이산 양자화된 레벨(discrete quantized level)로 매핑(mapping)할 수 있다.For example, the fast rate-distortion optimization based quantization apparatus may map transform coefficients into discrete quantized levels using Equation 1 below.

Figure 112022088915762-pat00001
Figure 112022088915762-pat00001

이때, 연산자 ·은 최인접 정수 값으로 라운딩(rounding)하는 연산이고, Δ은 양자화 스텝 크기이다. 또한, f는 양자화 오프셋이고, 함수 sign()은 입력 값 W에 대한 부호를 출력한다. 이때, 양자화 오프셋 f는 데드존의 구간을 조절할 수 있으며, z는 양자화된 레벨 값일 수 있다.In this case, operator · is an operation for rounding to the nearest integer value, and Δ is a quantization step size. Also, f is a quantization offset, and the function sign() outputs a sign for an input value W. In this case, the quantization offset f may adjust the section of the dead zone, and z may be a quantized level value.

또한, 고속 율-왜곡 최적화 기반 양자화 장치인 영상 복호화기가 역양자화를 수행시 하기의 수학식 2를 이용할 수 있다. In addition, when an image decoder, which is a high-speed rate-distortion optimization based quantization device, performs inverse quantization, Equation 2 below can be used.

Figure 112022088915762-pat00002
Figure 112022088915762-pat00002

이때, W’는 역양자화된 계수이고, Z는 양자화된 레벨일 수 있다. 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 역양자화 방식은, 율-왜곡 최적화 기반 양자화 방식이 적용된 양자화된 레벨뿐만 아니라 데드존을 이용한 스칼라 양자화 방식이 적용된 양자화된 레벨에도 사용될 수 있다.In this case, W' may be an inverse quantized coefficient, and Z may be a quantized level. The inverse quantization method performed by the high-speed rate-distortion optimization-based quantization apparatus can be used not only for the quantized level to which the rate-distortion optimization-based quantization method is applied, but also to the quantized level to which the scalar quantization method using the dead zone is applied.

도 2는 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 장치를 나타내는 블록도이다.2 is a block diagram illustrating a quantization apparatus based on fast rate-distortion optimization according to an embodiment.

도 2를 참조하면, 고속 율-왜곡 최적화 기반 양자화 장치(200)는, 문맥 정보 초기화부(210), 변환 계수 양자화부(220), 양자화 레벨 결정부(230), 최적 마지막 중요 계수 결정부(240), 스칼라 양자화부(250)를 포함하여 구성될 수 있다. 이때, 문맥 정보 초기화부(210), 변환 계수 양자화부(220), 양자화 레벨 결정부(230), 최적 마지막 중요 계수 결정부(240), 스칼라 양자화부(250)는 전자 회로, 전기 회로, 집적 회로를 포함하여 구성될 수 있다. 또한, 문맥 정보 초기화부(210), 변환 계수 양자화부(220), 양자화 레벨 결정부(230), 최적 마지막 중요 계수 결정부(240), 스칼라 양자화부(250)는 프로세서, 메모리, 데이터 송수신기를 포함하여 구성될 수도 있으나, 이에 한정되지는 않는다.Referring to FIG. 2 , the fast rate-distortion optimization based quantization apparatus 200 includes a context information initialization unit 210, a transform coefficient quantization unit 220, a quantization level determination unit 230, an optimal last significant coefficient determination unit ( 240) and a scalar quantization unit 250. At this time, the context information initialization unit 210, the transform coefficient quantization unit 220, the quantization level determination unit 230, the optimal last significant coefficient determination unit 240, and the scalar quantization unit 250 are an electronic circuit, an electric circuit, and an integrated circuit. It may be configured including a circuit. In addition, the context information initialization unit 210, the transform coefficient quantization unit 220, the quantization level determination unit 230, the optimal last significant coefficient determination unit 240, and the scalar quantization unit 250 include a processor, a memory, and a data transceiver. It may be configured to include, but is not limited thereto.

문맥 정보 초기화부(210)는, 변환 블록 내 제1 문맥 정보의 값을 1로 초기화하고, 변환 블록 내 제2 문맥 정보의 값을 0으로 초기화하여 문맥 정보를 초기화할 수 있다.The context information initialization unit 210 may initialize the context information by initializing the value of the first context information in the conversion block to 1 and initializing the value of the second context information in the conversion block to 0.

변환 계수 양자화부(220)는, 변환 블록 내 변환 계수를 스캔하고, 변환 계수를 양자화할 수 있다. 또한, 변환 계수 양자화부(220)는, 변환 블록 내 변환 계수들을 역 대각(reverse diagonal) 순서로 스캔하고, 양자화 오프셋 값 0.5를 이용하여 변환 계수를 양자화할 수 있다.The transform coefficient quantization unit 220 may scan transform coefficients in a transform block and quantize the transform coefficients. Also, the transform coefficient quantization unit 220 may scan the transform coefficients in the transform block in a reverse diagonal order and quantize the transform coefficients using a quantization offset value of 0.5.

양자화 레벨 결정부(230)는, 변환 계수의 양자화된 레벨 값을 계산하고, 변환 블록 내 일부 변환 계수의 위치 또는 변환 블록 내 부블록에 대하여 최적의 양자화된 레벨 값을 결정할 수 있다. 또한, 양자화 레벨 결정부(230)는, 변환 블록 내 마지막 중요 계수를 고정하고, 0이 아닌 나머지 변환 계수들에 대한 율-왜곡 비용을 계산할 수 있다.The quantization level determiner 230 may calculate quantized level values of transform coefficients and determine positions of some transform coefficients within a transform block or optimal quantized level values for subblocks within a transform block. Also, the quantization level determiner 230 may fix the last significant coefficient in the transform block and calculate rate-distortion costs for the remaining non-zero transform coefficients.

최적 마지막 중요 계수 결정부(240)는, 일부 변환 계수의 위치 또는 부블록에 대하여 최적의 마지막 중요 계수를 결정할 수 있다. 최적 마지막 중요 계수 결정부(240)는, 변환 블록에 대하여 초기 율-왜곡 비용 값으로 초기화하고, 변환 블록 내 양자화된 레벨 값을 이용하여 역 대각 순서로 스캔하고 율-왜곡 비용을 계산할 수 있다.The optimal last significant coefficient determiner 240 may determine the optimal last significant coefficient for a subblock or position of some transform coefficients. The optimal last significant coefficient determiner 240 may initialize the transform block with an initial rate-distortion cost value, scan the transform block in an inverse diagonal order using the quantized level values in the transform block, and calculate the rate-distortion cost.

스칼라 양자화부(250)는, 일부 변환 계수의 위치 또는 부블록에 대하여 데드존을 이용한 스칼라 양자화를 적용 할 수 있다. 또한, 스칼라 양자화부(250)는, 라운딩(rounding) 연산자, 부호, 양자화 스텝 크기 및 양자화 오프셋을 이용하여 변환 계수를 이산 양자화된 레벨로 매핑할 수 있다. 이때, 데드존은, 입력 값을 0으로 출력하는 구간일 수 있으며, 양자화 오프셋은, 데드존의 구간을 조절할 수 있다.The scalar quantization unit 250 may apply scalar quantization using a dead zone to positions of some transform coefficients or subblocks. In addition, the scalar quantization unit 250 may map transform coefficients to discrete quantized levels using a rounding operator, a sign, a quantization step size, and a quantization offset. In this case, the dead zone may be a section in which the input value is output as 0, and the quantization offset may adjust the section of the dead zone.

도 3은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 장치로서, 세부 구성을 나타내는 것이다.3 illustrates a detailed configuration of a quantization apparatus based on high-speed rate-distortion optimization according to an embodiment.

도 3을 참조하면, 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화 장치의 구성을 나타내는 블록도이다. 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화 장치(300)는, 움직임 예측부(311), 움직임 보상부(312), 인트라 예측부(320), 스위치(315)를 포함할 수 있다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화 장치(300)는, 감산기(325), 변환부(330), 양자화부(340), 엔트로피 부호화부(350), 역양자화부(360), 역변환부(370), 가산기(375), 필터부(380) 및 참조 픽쳐 버퍼(390)를 포함할 수도 있다.Referring to FIG. 3, it is a block diagram showing the configuration of an image encoding device, which is a quantization device based on high-speed rate-distortion optimization. The video encoding apparatus 300, which is a fast rate-distortion optimization based quantization apparatus, may include a motion estimation unit 311, a motion compensation unit 312, an intra prediction unit 320, and a switch 315. In addition, the video encoding device 300, which is a high-speed rate-distortion optimization based quantization device, includes a subtractor 325, a transform unit 330, a quantization unit 340, an entropy encoding unit 350, an inverse quantization unit 360, It may also include an inverse transform unit 370, an adder 375, a filter unit 380, and a reference picture buffer 390.

고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화 장치(300)는 입력 영상에 대해 인트라(intra) 모드 또는 인터(inter) 모드로 부호화를 수행하고 비트스트림을 출력할 수 있다. 또한, 인트라 모드인 경우에는, 스위치(315)가 인트라로 전환되고, 인터 모드인 경우에 스위치(315)가 인터로 전환될 수 있다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화 장치(300)는 입력 영상의 입력 블록에 대한 예측 블록을 생성한 후, 입력 블록과 예측 블록의 차분(residual)을 부호화할 수 있다.The image encoding apparatus 300, which is a high-speed rate-distortion optimization-based quantization device, may perform encoding on an input image in an intra mode or an inter mode and output a bitstream. Also, in the case of the intra mode, the switch 315 may be switched to the intra mode, and in the case of the inter mode, the switch 315 may be switched to the inter mode. Also, the image encoding apparatus 300, which is a fast rate-distortion optimization based quantization device, may generate a prediction block for an input block of an input image and then encode a residual between the input block and the prediction block.

인트라 모드인 경우, 인트라 예측부(320)는 현재 블록 주변의 이미 부호화된 블록의 픽셀값을 이용하여 공간적 예측을 수행하여 예측 블록을 생성할 수 있다. 또한, 인터 모드인 경우, 움직임 예측부(311)는, 움직임 예측 과정에서 참조 픽쳐 버퍼(390)에 저장되어 있는 참조 영상에서 입력 블록과 가장 매치가 잘 되는 영역을 찾아 움직임 벡터를 구할 수 있다. 또한, 움직임 보상부(312)는, 움직임 벡터를 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. 이때, 움직임 벡터는 인터 예측에 사용되는 2차원 벡터이며, 현재 부호화 및 복호화 대상 영상과 참조 영상 사이의 오프셋을 나타낼 수 있다.In the case of the intra mode, the intra predictor 320 may generate a prediction block by performing spatial prediction using pixel values of previously encoded blocks adjacent to the current block. Also, in the case of the inter mode, the motion estimation unit 311 may obtain a motion vector by finding a region that best matches the input block in the reference picture stored in the reference picture buffer 390 during the motion estimation process. Also, the motion compensator 312 may generate a prediction block by performing motion compensation using a motion vector. In this case, the motion vector is a 2D vector used for inter prediction, and may indicate an offset between a current encoding and decoding target image and a reference image.

감산기(325)는, 입력 블록과 생성된 예측 블록의 차분에 의해 잔여 블록(residual block)을 생성할 수 있다.The subtractor 325 may generate a residual block by a difference between the input block and the generated prediction block.

변환부(330)는, 잔여 블록에 대해 변환(transform)을 수행하여 변환 계수(transform coefficient)를 출력할 수 있다. 여기서, 변환 계수는 잔여 블록 또는 잔여 신호에 대한 변환을 수행함으로써 생성된 계수 값을 의미할 수 있다. 물론, 경우에 따라서, 변환 계수에 양자화가 적용되어 생성된, 양자화된 변환 계수 레벨(transform coefficient level)도 변환 계수로 불릴 수 있다.The transform unit 330 may output a transform coefficient by performing transform on the residual block. Here, the transform coefficient may refer to a coefficient value generated by transforming a residual block or residual signal. Of course, in some cases, a quantized transform coefficient level generated by applying quantization to the transform coefficient may also be referred to as a transform coefficient.

양자화부(340)는, 입력된 변환 계수를 양자화 파라미터에 따라서 양자화하여 양자화된 변환 계수 레벨(quantized transform coefficient level)을 출력할 수 있다. 이때, 양자화부(340)는, 양자화 행렬을 사용하여 입력된 변환 계수를 양자화할 수 있다. 이때, 양자화된 변환 계수 레벨은 양자화된 레벨(quantized level)일 수도 있으며, 경우에 따라서 변환 계수로서 그 일부분일 수도 있다.The quantization unit 340 may quantize an input transform coefficient according to a quantization parameter and output a quantized transform coefficient level. At this time, the quantization unit 340 may quantize the input transform coefficient using a quantization matrix. In this case, the quantized transform coefficient level may be a quantized level or, in some cases, may be a part thereof as a transform coefficient.

엔트로피 부호화부(350)는, 양자화부(340)에서 산출된 값들 또는 부호화 과정에서 산출된 부호화 파라미터 값 등을 기초로 엔트로피 부호화를 수행하여 비트스트림(bit stream)을 출력할 수 있다. The entropy encoding unit 350 may output a bit stream by performing entropy encoding based on the values calculated by the quantization unit 340 or the encoding parameter values calculated in the encoding process.

이때, 엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(symbol)에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현될 수 있다. 물론, 부호화 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 또한, 엔트로피 부호화를 통해서 영상 부호화의 압축 성능이 높아질 수 있다.In this case, when entropy encoding is applied, a small number of bits are allocated to a symbol having a high probability of occurrence and a large number of bits are allocated to a symbol having a low probability of occurrence to represent the symbol. Of course, the size of bit streams for encoding target symbols can be reduced. In addition, compression performance of video encoding may be improved through entropy encoding.

또한, 엔트로피 부호화부(350)는, 대상 심볼의 이진화(binarization) 방식과 대상 심볼 또는 빈(bin)의 확률 모델(probability model)을 도출한 후, 도출된 이진화 방식 또는 확률 모델을 사용하여 산술 부호화를 수행할 수도 있다. 또한, 엔트로피 부호화부(350)는, 엔트로피 부호화를 위해 지수 골룸(exponential golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법을 사용할 수 있다.In addition, the entropy encoding unit 350 derives a binarization method of the target symbol and a probability model of the target symbol or bin, and then performs arithmetic encoding using the derived binarization method or probability model. can also be performed. In addition, the entropy encoding unit 350 may use an encoding method such as exponential golomb, context-adaptive variable length coding (CAVLC), or context-adaptive binary arithmetic coding (CABAC) for entropy encoding.

일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 장치인 영상 부호화 장치(300)는, 인터 예측 부호화, 즉 인터 예측 부호화를 수행하므로, 현재 부호화된 영상은 참조 영상으로 사용되기 위해 복호화되어 저장될 필요가 있다. 또한, 양자화된 레벨은 역양자화부(360)에 의하여 역양자화되고 역변환부(370)에 의하여 역변환된다. 또한, 역양자화 및 역변환된 계수는 가산기(375)를 통해 예측 블록과 더해지고 복원 블록(Reconstructed Block)이 생성된다. Since the video encoding apparatus 300, which is a high-speed rate-distortion optimization based quantization apparatus according to an embodiment, performs inter-prediction encoding, that is, inter-prediction encoding, the currently encoded video needs to be decoded and stored to be used as a reference video. there is Also, the quantized level is inversely quantized by the inverse quantization unit 360 and inversely transformed by the inverse transformation unit 370 . In addition, the inverse quantized and inverse transformed coefficients are added to the prediction block through an adder 375, and a reconstructed block is generated.

복원 블록은 필터부(380)를 거치고, 필터부(380)는 디블록킹 필터(deblocking filter), SAO(Sample Adaptive Offset), ALF(Adaptive Loop Filter) 중 적어도 하나 이상을 복원 블록 또는 복원 픽쳐에 적용할 수 있다. 이때, 필터부(380)는 적응적 인루프(in-loop) 필터일 수도 있다. 또한, 디블록킹 필터는 블록 간의 경계에 생긴 블록 왜곡을 제거할 수 있다. SAO는 코딩 에러를 보상하기 위해 픽셀값에 적정 오프셋(offset) 값을 더해줄 수 있다. ALF는 복원된 영상과 원래의 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. 필터부(380)를 거친 복원 블록은 참조 픽쳐 버퍼(390)에 저장될 수 있다.The reconstructed block passes through a filter unit 380, and the filter unit 380 applies at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed block or the reconstructed picture. can do. In this case, the filter unit 380 may be an adaptive in-loop filter. Also, the deblocking filter may remove block distortion generated at a boundary between blocks. SAO may add an appropriate offset value to a pixel value to compensate for a coding error. ALF may perform filtering based on a value obtained by comparing a reconstructed image with an original image. A reconstructed block that has passed through the filter unit 380 may be stored in the reference picture buffer 390.

도 4는 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 영상 복호화 장치를 나타내는 것이다.4 illustrates an image decoding apparatus to which a quantization method based on high-speed rate-distortion optimization according to an embodiment is applied.

도 4를 참조하면, 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 영상 복호화 장치(400)는, 엔트로피 복호화부(410), 역양자화부(420), 역변환부(430), 인트라 예측부(440), 움직임 보상부(450), 가산기(455), 필터부(460) 및 참조 픽쳐 버퍼(470)를 포함할 수 있다.Referring to FIG. 4 , the video decoding apparatus 400 to which the fast rate-distortion optimization based quantization method is applied includes an entropy decoding unit 410, an inverse quantization unit 420, an inverse transform unit 430, and an intra prediction unit 440. , a motion compensation unit 450, an adder 455, a filter unit 460, and a reference picture buffer 470.

고속 율-왜곡 최적화 기반 양자화 방법이 적용된 영상 복호화 장치(400)는, 고속 율-왜곡 최적화 기반 양자화 장치인 부호화기에 의하여 출력된 비트스트림을 입력 받아 인트라 모드 또는 인터 모드로 복호화를 수행하고 재구성된 영상, 즉 복원 영상을 출력할 수 있다. 구체적으로, 인트라 모드인 경우 스위치가 인트라로 전환되고, 인터 모드인 경우 스위치가 인터로 전환될 수 있다.The image decoding apparatus 400 to which the high-speed rate-distortion optimization-based quantization method is applied receives the bitstream output by the encoder, which is a high-speed rate-distortion optimization-based quantization device, performs decoding in an intra mode or inter mode, and reconstructed image , that is, a restored image can be output. Specifically, in the intra mode, the switch may be switched to the intra mode, and in the case of the inter mode, the switch may be switched to the inter mode.

또한, 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 영상 복호화 장치(400)는, 입력 받은 비트스트림으로부터 복원된 잔여 블록(reconstructed residual block)을 얻고 예측 블록을 생성할 수 있다. 다음으로, 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 영상 복호화 장치(400)는, 복원된 잔여 블록과 예측 블록을 더하여 재구성된 블록인 복원 블록을 생성할 수도 있다.In addition, the video decoding apparatus 400 to which the fast rate-distortion optimization based quantization method is applied may obtain a reconstructed residual block from the input bitstream and generate a prediction block. Next, the video decoding apparatus 400 to which the fast rate-distortion optimization based quantization method is applied may generate a reconstructed block that is a reconstructed block by adding the reconstructed residual block and the prediction block.

엔트로피 복호화부(410)는, 입력된 비트스트림을 확률 분포에 따라 엔트로피 복호화하여, 양자화된 레벨(quantized level) 형태의 심볼을 포함한 심볼들을 생성할 수 있다. 또한, 엔트로피 복호화 방식은 상기 엔트로피 부호화의 역과정으로 수행될 수 있다.The entropy decoding unit 410 may entropy-decode an input bitstream according to a probability distribution to generate symbols including symbols in a quantized level form. Also, the entropy decoding method may be performed as a reverse process of the entropy encoding.

양자화된 레벨은 역양자화부(420)에서 역양자화되고 역변환부(430)에서 역변환되며, 양자화된 레벨이 역양자화 및 역변환 된 결과, 복원된 잔여 블록이 생성될 수 있다. 이때, 역양자화부(420)에서는 양자화된 레벨에 양자화 행렬을 적용할 수 있다.The quantized level is inversely quantized in the inverse quantization unit 420 and inversely transformed in the inverse transform unit 430, and as a result of inverse quantization and inverse transformation of the quantized level, a reconstructed residual block may be generated. At this time, the inverse quantization unit 420 may apply a quantization matrix to the quantized level.

인트라 모드인 경우, 인트라 예측부(440)는 현재 블록 주변의 이미 부호화된 블록의 픽셀값을 이용하여 공간적 예측을 수행하여 예측 블록을 생성할 수 있다. 인터 모드인 경우, 움직임 보상부(450)는 움직임 벡터 및 참조 픽쳐 버퍼(470)에 저장되어 있는 참조 영상을 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. In the case of the intra mode, the intra prediction unit 440 may generate a prediction block by performing spatial prediction using pixel values of previously encoded blocks adjacent to the current block. In the inter mode, the motion compensation unit 450 may generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer 470 .

복원된 잔여 블록과 예측 블록은 가산기(455)에 의하여 더해지고, 더해진 블록은 필터부(460)를 거칠 수 있다. 필터부(460)는 디블록킹 필터, SAO, ALF 중 적어도 하나 이상을 복원 블록 또는 복원 픽쳐에 적용할 수 있다. 필터부(460)는 재구성된 영상, 즉 복원 영상을 출력할 수 있다. 경우에 따라서, 복원 영상은 참조 픽쳐 버퍼(470)에 저장되어 인터 예측시 사용될 수 있다.The reconstructed residual block and the predicted block are added by the adder 455, and the added block may pass through the filter unit 460. The filter unit 460 may apply at least one of a deblocking filter, SAO, and ALF to a reconstructed block or a reconstructed picture. The filter unit 460 may output a reconstructed image, that is, a reconstructed image. In some cases, the reconstructed image may be stored in the reference picture buffer 470 and used for inter prediction.

도 5는 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법으로 영상을 부호화 및 복호화시 영상의 분할 구조를 개략적으로 나타내는 것이다.5 schematically illustrates a division structure of an image when encoding and decoding an image using a quantization method based on high-speed rate-distortion optimization according to an embodiment.

고속 율-왜곡 최적화 기반 양자화 장치는, 영상을 효율적으로 분할하기 위해 부호화 유닛(Coding Unit; CU)으로 부호화 및 복호화를 수행할 수 있다. 유닛은 구문 요소(syntax element)와 영상 샘플들이 포함된 블록이 합쳐져 구성될 수 있다. 또한, 유닛은 분할될 수도 있으며, 이때, 경우에 따라서는, 유닛에 해당하는 블록이 분할될 수도 있다.The high-speed rate-distortion optimization-based quantization apparatus may perform encoding and decoding with a coding unit (CU) in order to efficiently segment an image. A unit may be configured by combining a syntax element and a block including image samples. Also, a unit may be divided, and in this case, a block corresponding to the unit may be divided according to circumstances.

도 5를 참조하면, 고속 율-왜곡 최적화 기반 양자화 장치는, HEVC에서는 영상(500)을 최대 부호화 유닛(Largest Coding Unit; LCU) 단위로 순차적으로 분할한 후, LCU 단위로 분할 구조를 결정할 수 있다. 경우에 따라서, 분할 구조는 LCU(510) 내에서 영상을 효율적으로 부호화하기 위한 부호화 유닛(CU)의 분포를 나타낼 수도 있다.Referring to FIG. 5 , in HEVC, the high-speed rate-distortion optimization-based quantization apparatus sequentially divides an image 500 into units of largest coding units (LCUs), and then determines a division structure in units of LCUs. . In some cases, the division structure may represent a distribution of coding units (CUs) for efficiently encoding an image within the LCU 510 .

이때, 고속 율-왜곡 최적화 기반 양자화 장치는, CU의 분포를 하나의 CU의 가로 크기 및 세로 크기의 절반으로 감소된 4개의 CU로 분할할지 여부에 따라서 결정할 수 있다. 물론, 분할된 CU는 동일한 방식으로 분할된 CU에 대해서 그 가로 크기 및 세로 크기가 절반씩 감소된 4개의 CU로 재귀적으로 분할될 수 있다.In this case, the fast rate-distortion optimization-based quantization apparatus may determine whether to divide the distribution of CUs into four CUs reduced by half of the horizontal and vertical sizes of one CU. Of course, the divided CU may be recursively divided into four CUs in which the horizontal and vertical sizes of the divided CU are reduced by half in the same way.

또한, 고속 율-왜곡 최적화 기반 양자화 장치는, CU의 분할을 미리 정의된 깊이까지 재귀적으로 분할할 수 있다. 이때, 깊이 정보는 CU의 크기를 나타내는 정보로서, 각 CU마다 저장될 수 있다.In addition, the fast rate-distortion optimization-based quantization apparatus may recursively divide the division of the CU to a predefined depth. In this case, the depth information is information indicating the size of the CU and may be stored for each CU.

예를 들면, LCU의 깊이는 0이고, SCU(Smallest Coding Unit)의 깊이는 미리 정의된 최대 깊이일 수 있다. 물론, LCU는 상기와 같이 최대 부호화 유닛 크기를 가지는 부호화 유닛이며, SCU(Smallest Coding Unit)는 최소 부호화 유닛 크기를 가지는 부호화 유닛일 수 있다.For example, the depth of LCU may be 0, and the depth of Smallest Coding Unit (SCU) may be a predefined maximum depth. Of course, as described above, the LCU is a coding unit having the largest coding unit size, and the smallest coding unit (SCU) may be a coding unit having the smallest coding unit size.

LCU(510)로부터 가로 및 세로 크기의 절반으로 분할을 수행할 때마다 CU의 깊이는 1씩 증가한다. 또한, 각각의 깊이 별로, 분할을 수행하지 않는 CU의 경우에는 2Nx2N 크기를 가지며, 분할을 수행하는 CU의 경우에는 2Nx2N 크기의 CU에서 NxN 크기를 가지는 4개의 CU로 분할될 수 있다. 이때, N의 크기는 깊이가 1씩 증가할 때마다 절반으로 감소할 수 있다.The depth of the CU increases by 1 whenever division is performed from the LCU 510 to half of the horizontal and vertical sizes. In addition, for each depth, a CU that does not perform division has a size of 2Nx2N, and a CU that performs division has a size of 2Nx2N to four CUs having a size of NxN. Can be divided into. In this case, the size of N may decrease by half whenever the depth increases by 1.

또한, 예를 들면, 최소 깊이가 0인 LCU의 크기는 64x64 화소이고, 최대 깊이가 3인 SCU의 크기는 8x8 화소일 수 있다. 이때, 64x64 화소의 CU(LCU)는 깊이 0으로, 32x32 화소의 CU는 깊이 1로, 16x16 화소의 CU는 깊이 2로, 8x8 화소의 CU(SCU)는 깊이 3으로 표현될 수도 있다. Also, for example, the size of an LCU having a minimum depth of 0 may be 64x64 pixels, and the size of an SCU having a maximum depth of 3 may be 8x8 pixels. In this case, a CU (LCU) of 64x64 pixels may be expressed as depth 0, a CU of 32x32 pixels may be expressed as depth 1, a CU of 16x16 pixels may be expressed as depth 2, and a CU (SCU) of 8x8 pixels may be expressed as depth 3.

또한, 특정 CU를 분할할지에 대한 정보는 CU마다 1비트의 분할 정보를 통해 표현될 수 있다. 이 분할 정보는 SCU를 제외한 모든 CU에 포함될 수도 있으며, 경우에 따라서, 고속 율-왜곡 최적화 기반 양자화 장치가 CU를 분할하지 않을 경우에는 분할 정보에 0을 저장할 수 있고, 고속 율-왜곡 최적화 기반 양자화 장치가 CU를 분할할 경우에는 분할 정보에 1을 저장할 수도 있다.Also, information on whether to divide a specific CU may be expressed through 1-bit division information for each CU. This division information may be included in all CUs except for the SCU. In some cases, if the quantization device based on fast rate-distortion optimization does not divide the CU, 0 may be stored in the division information, and quantization based on fast rate-distortion optimization When the device divides the CU, it may store 1 in division information.

도 6은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 부호화 유닛이 포함할 수 있는 예측 유닛의 형태를 나타내는 것이다.6 illustrates a shape of a prediction unit that may be included in a coding unit to which a quantization method based on fast rate-distortion optimization according to an embodiment is applied.

도 6을 참조하면, 부호화 유닛(CU)이 포함할 수 있는 예측 유닛(PU)의 형태를 알 수 있다. 고속 율-왜곡 최적화 기반 양자화 장치는, LCU로부터 분할된 CU 중에서 더 이상 분할하지 않는 CU는 하나 이상의 예측 유닛으로 분할할 수 있다.Referring to FIG. 6 , the shape of a prediction unit (PU) that can be included in the coding unit (CU) can be known. The fast rate-distortion optimization-based quantization apparatus may divide a CU that is not further divided among CUs divided from the LCU into one or more prediction units.

이때, 예측 유닛은 예측을 수행하는 기본 단위로서, 스킵(skip) 모드, 인터(inter) 모드, 인트라(intra) 모드 중 어느 하나로서 고속 율-왜곡 최적화 기반 양자화 장치에 의하여 부호화 및 복호화되며, 각 모드에 따라서 다양한 형태로 파티션될 수도 있다. 예를 들면, 스킵 모드의 경우, 고속 율-왜곡 최적화 기반 양자화 장치는, CU 내에서 파티션 없이, CU와 동일한 크기를 갖는 2Nx2N 모드(410)를 지원할 수 있다.At this time, the prediction unit is a basic unit for performing prediction, and is encoded and decoded by a quantization device based on high-speed rate-distortion optimization as any one of a skip mode, an inter mode, and an intra mode, and each Depending on the mode, it may be partitioned in various forms. For example, in the case of the skip mode, the fast rate-distortion optimization-based quantization apparatus may support a 2Nx2N mode 410 having the same size as the CU without a partition within the CU.

또한, 인터 모드의 경우, 고속 율-왜곡 최적화 기반 양자화 장치는, CU 내에서 8가지의 파티션된 형태를 지원할 수 있다. 예를 들면, 고속 율-왜곡 최적화 기반 양자화 장치는, 2Nx2N 모드(410), 2NxN 모드(415), Nx2N 모드(420), NxN 모드(425), 2NxnU 모드(430), 2NxnD 모드(435), nLx2N 모드(440), nRx2N 모드(445)를 지원할 수 있다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치는, 인트라 모드의 경우, CU 내에서 2Nx2N 모드(410), NxN 모드(425)를 지원할 수 있다.In addition, in the case of inter mode, the fast rate-distortion optimization based quantization apparatus can support 8 types of partitions within a CU. For example, the fast rate-distortion optimization based quantization apparatus includes 2Nx2N mode 410, 2NxN mode 415, Nx2N mode 420, NxN mode 425, 2NxnU mode 430, 2NxnD mode 435, nLx2N mode 440 and nRx2N mode 445 may be supported. In addition, the fast rate-distortion optimization based quantization apparatus may support 2Nx2N mode 410 and NxN mode 425 within the CU in the case of intra mode.

도 7은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 부호화 유닛이 포함할 수 있는 변환 유닛의 형태를 나타내는 것이다.7 illustrates a form of a transform unit that may be included in a coding unit to which a quantization method based on fast rate-distortion optimization according to an embodiment is applied.

도 7을 참조하면, 부호화 유닛(CU)이 포함할 수 있는 변환 유닛(TU)의 형태를 알 수 있다. 이때, 변환 유닛은, CU 내에서 변환, 양자화, 역변환, 역양자화 과정을 위해 사용되는 기본 단위일 수 있다. 또한, TU는 정사각형 또는 직사각형 형태일 수 있다. Referring to FIG. 7 , the shape of a transform unit (TU) that can be included in a coding unit (CU) can be known. In this case, the transform unit may be a basic unit used for transformation, quantization, inverse transformation, and inverse quantization processes within the CU. Also, a TU may have a square or rectangular shape.

고속 율-왜곡 최적화 기반 양자화 장치에 의하여 LCU로부터 분할된 CU 중에서 더 이상 분할되지 않는 CU는 하나 혹은 그 이상의 TU로 고속 율-왜곡 최적화 기반 양자화 장치에 의하여 분할될 수 있다. 이때, TU의 분할 구조는 쿼드트리(quad-tree) 구조일 수 있다. 예를 들면, 경우에 따라서, 하나의 CU(710)가 쿼드트리 구조에 따라서 한번 혹은 그 이상으로 분할되어 다양한 크기의 TU들로 구성될 수도 있다.Among the CUs divided from the LCU by the fast rate-distortion optimization-based quantization apparatus, CUs that are not further divided may be divided into one or more TUs by the fast rate-distortion optimization-based quantization apparatus. In this case, the division structure of the TU may be a quad-tree structure. For example, in some cases, one CU 710 may be divided into TUs of various sizes by being divided one or more times according to a quad tree structure.

도 8은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법 중 최적의 양자화된 레벨 값을 결정하는 단계를 나타내는 것이다.8 illustrates a step of determining an optimal quantized level value in a quantization method based on fast rate-distortion optimization according to an embodiment.

도 8을 참조하면, 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 고속 율-왜곡 최적화 기반 양자화 방법 중 최적의 양자화된 레벨 값을 결정하는 단계는 구체적으로 하기와 같이 수행된다.Referring to FIG. 8 , a step of determining an optimal quantized level value in a quantization method based on fast rate-distortion optimization performed by a quantization apparatus based on fast rate-distortion optimization is performed as follows.

단계(S801)에서, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 변환 블록 내에서 마지막 중요 계수를 고정할 수 있다. 이때, 중요 계수는, 0이 아닌 값을 가지는 양자화된 레벨 값이 될 수 있으며, 마지막 중요 계수는 변환 블록 내에서 0이 아닌 값을 가지는 양자화된 레벨 중 마지막 위치에 존재하는 것일 수 있다. 또한, 마지막 중요 계수는, 변환 계수를 역 대각 스캔 순서로 스캔하면서 양자화 했을 때 양자화된 레벨 값이 0이 아닌 첫번째 계수일 수도 있다.In step S801, the video encoder, which is a fast rate-distortion optimization based quantization device, may fix the last significant coefficient in the transform block. In this case, the significant coefficient may be a quantized level value having a non-zero value, and the last significant coefficient may be present at the last position among quantized levels having a non-zero value in the transform block. Also, the last significant coefficient may be the first coefficient whose quantized level value is not 0 when transform coefficients are scanned and quantized in an inverse diagonal scan order.

단계(S801)에서, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는, 변환 블록 내에서 마지막 중요 계수를 제외하고 값이 0이 아닌 나머지 변환 계수들에 대하여 각 변환 계수들의 양자화된 레벨들에 대한 율-왜곡 비용을 계산할 수 있다. 이때, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는, 계산된 율-왜곡 비용을 기반으로 최적의 양자화된 레벨을 결정한다. 물론, 나머지 변환 계수들이란 역 대각 스캔 순서 상 마지막 중요 계수 다음으로 발생하는 변환 계수일 수 있다.In step S801, the video encoder, which is a fast rate-distortion optimization based quantization device, determines the quantized levels of each transform coefficient for the remaining transform coefficients whose value is not 0 except for the last important coefficient in the transform block. We can calculate the rate-distortion cost for In this case, the video encoder, which is a high-speed rate-distortion optimization based quantization device, determines an optimal quantization level based on the calculated rate-distortion cost. Of course, the remaining transform coefficients may be transform coefficients that occur next to the last significant coefficient in the inverse diagonal scan order.

구체적으로, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는, 하나의 변환 계수에 대해 최적의 양자화된 레벨을 결정하기 위해, 먼저 해당 변환 계수에 대한 양자회된 레벨 값이 3보다 작은지 결정한다.Specifically, an image encoder, which is a high-speed rate-distortion optimization-based quantization device, first determines whether the quantized level value for a corresponding transform coefficient is less than 3 in order to determine an optimal quantized level for one transform coefficient do.

이때, 해당 변환 계수에 대한 양자화된 레벨 값이 3보다 작을 경우, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는, 해당 변환 계수를 Level 값, Level - 1 값, 및 0의 값으로 대체한 후 각각에 대한 율-왜곡 비용을 계산할 수 있다. 이때, Level 값은 상기 단계 2에서 계산한 양자화된 레벨 값일 수 있다. 또한, 해당 변환 계수에 대한 양자화된 레벨 값이 3보다 큰 경우, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 해당 변환 계수를 Level 값 및 0의 값으로 대체한 후 각각에 대한 율-왜곡 비용을 계산할 수 있다.At this time, when the quantized level value for the corresponding transform coefficient is less than 3, the video encoder, which is a high-speed rate-distortion optimization based quantization device, replaces the corresponding transform coefficient with a Level value, a Level -1 value, and a value of 0 After that, we can calculate the rate-distortion cost for each. At this time, the level value may be the quantized level value calculated in step 2 above. In addition, when the quantized level value for the corresponding transform coefficient is greater than 3, the video encoder, which is a high-speed rate-distortion optimization based quantization device, replaces the corresponding transform coefficient with a Level value and a value of 0, and then rate-distortion for each cost can be calculated.

고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 율-왜곡 비용을 업데이트할 수 있다. 이때, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 변환 블록 내의 모든 변환 계수에 대한 양자화된 레벨 값으로 0으로 부호화할 경우에 대한 율-왜곡 비용을 업데이트할 수 있다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 변환 블록 내의 각 변환 계수를 부호화할 경우에 대한 율-왜곡 비용을 업데이트할 수 있다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 변환 블록의 중요 맵(significant map)을 부호화할 경우에 대한 율-왜곡 비용을 업데이트할 수 있다. 이때, 중요 맵은, 변환 블록 내에서 각 변환 계수에 대한 양자화된 레벨 값이 0인지 아닌지에 대한 정보일 수 있다.The video encoder, which is a fast rate-distortion optimization based quantization device, can update the rate-distortion cost. In this case, the video encoder, which is a high-speed rate-distortion optimization-based quantization device, may update the rate-distortion cost for encoding to 0 as quantized level values for all transform coefficients in the transform block. Also, the video encoder, which is a fast rate-distortion optimization-based quantization device, may update a rate-distortion cost for encoding each transform coefficient in a transform block. In addition, an image encoder, which is a fast rate-distortion optimization based quantization device, may update a rate-distortion cost for encoding a significant map of a transform block. In this case, the importance map may be information about whether a quantized level value for each transform coefficient in the transform block is 0 or not.

고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 변환 계수에 대한 최적의 양자화된 레벨에 대한 문맥 정보를 업데이트할 수 있다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 양자화된 레벨들 중 가장 작은 율-왜곡 비용을 가지는 양자화된 레벨을 최적의 양자화된 레벨로 결정할 수 있다. 이때, 업데이트된 문맥 정보는 다음 변환 계수에 대한 양자화된 레벨 결정 시 사용될 수 있다.An image encoder, which is a fast rate-distortion optimization based quantization device, may update context information about an optimal quantization level for a transform coefficient. Also, the image encoder, which is a fast rate-distortion optimization based quantization device, may determine a quantized level having the smallest rate-distortion cost among quantized levels as an optimal quantized level. In this case, the updated context information may be used when determining the quantized level of the next transform coefficient.

또한, 경우에 따라서, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 변환 블록 내에서 0이 아닌 다음 나머지 변환 계수들에 대해 상기 단계(S802)를 수행할 수도 있다.In some cases, the video encoder, which is a fast rate-distortion optimization-based quantization device, may perform step S802 on remaining transform coefficients that are not 0 in the transform block.

도 9는 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법 중 최적의 마지막 중요 계수를 결정하는 단계를 나타내는 것이다.9 illustrates a step of determining an optimal last significant coefficient in a quantization method based on fast rate-distortion optimization according to an embodiment.

도 9를 참조하면, 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 고속 율-왜곡 최적화 기반 양자화 방법 중 최적의 마지막 중요 계수를 결정하는 단계는 하기와 같이 수행될 수 있다.Referring to FIG. 9 , the step of determining the optimal last significant coefficient in the fast rate-distortion optimization based quantization method performed by the fast rate-distortion optimization based quantization apparatus can be performed as follows.

단계(S901)에서, 고속 율-왜곡 최적화 기반 양자화 장치인, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 율-왜곡 비용 값인 d64BestCost을 변환 블록이 부호화되지 않을 경우의 율-왜곡 비용 값으로 초기화할 수 있다.In step S901, the video encoder, which is a fast rate-distortion optimization based quantization device, converts the rate-distortion cost value, d64BestCost, into a rate-distortion cost value when the transform block is not encoded. can be initialized.

단계(S902)에서, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 변환 블록 내에서 양자화된 레벨 값이 1보다 큰 변환 계수를 만날 때까지 역 대각 스캔 순서로 스캔하며, 율-왜곡 비용을 계산할 수 있다.In step S902, the video encoder, which is a fast rate-distortion optimization based quantization device, scans in an inverse diagonal scan order until the quantized level value in the transform block meets a transform coefficient greater than 1, and rate-distortion cost can be calculated

구체적으로, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 단계(S902)에 따라서 스캔하면서 양자화된 레벨 값이 1보다 큰 변환 계수를 마지막 중요 계수로 간주하고 변환 블록 전체에 대한 율-왜곡 비용인 totalCost를 계산할 수 있다. Specifically, the video encoder, which is a high-speed rate-distortion optimization-based quantization device, considers a transform coefficient having a quantized level value greater than 1 as the last significant coefficient while scanning according to step S902, and rate-distortion cost for the entire transform block totalCost can be calculated.

다음으로, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 totalCost가 d64BestCost보다 작을 경우 마지막 중요 계수에 대한 위치를 최적의 마지막 위치 지시자를 나타내는 iBestLastIdxP1로 설정하고, d64BestCost를 totalCost로 설정할 수 있다.Next, if totalCost is less than d64BestCost, the video encoder, which is a fast rate-distortion optimization based quantization device, sets the position of the last significant coefficient to iBestLastIdxP1 indicating the optimal last position indicator, and sets d64BestCost to totalCost.

이때, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기는 율-왜곡 비용을 계산시, 율-왜곡 비용은 하기의 수학식 3을 이용해서 계산할 수 있다. D는 변환 블록 내에서 원 변환 계수들과 복원된 변환 계수들 사이의 차이 값들의 제곱에 대한 평균(mean square error)일 수 있으며, R은 관련된 문맥 정보를 이용한 비트율일 수 있다.In this case, when the video encoder, which is a high-speed rate-distortion optimization-based quantization device, calculates the rate-distortion cost, the rate-distortion cost can be calculated using Equation 3 below. D may be a mean square error of difference values between original transform coefficients and restored transform coefficients in a transform block, and R may be a bit rate using related context information.

Figure 112022088915762-pat00003
Figure 112022088915762-pat00003

도 10은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법이 적용된 변환 블록을 나타내는 것이다.10 illustrates a transform block to which a quantization method based on fast rate-distortion optimization according to an embodiment is applied.

일실시예에 따르면, 고속 율-왜곡 최적화 기반 양자화 장치는, 율-왜곡 최적화 기반 양자화의 복잡도를 감소시킬 수 있다. 이때, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내에서 일부 변환 계수 위치 혹은 부블록에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다.According to an embodiment, the fast rate-distortion optimization based quantization apparatus can reduce the complexity of rate-distortion optimization based quantization. In this case, the fast rate-distortion optimization-based quantization apparatus may determine an optimal quantized level and an optimal last significant coefficient only for some transform coefficient positions or subblocks within a transform block.

또한, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내에서 일부 변환 계수 위치 혹은 부블록에 대해서만 데드존을 이용한 스칼라 양자화 방식을 적용하고, 적용된 결과에 따라 율-왜곡 최적화 기반 양자화를 변환 블록 전체에 적용하는 방식을 제공할 수 있다.In addition, the high-speed rate-distortion optimization-based quantization apparatus applies a scalar quantization method using a dead zone only to some transform coefficient positions or sub-blocks within a transform block, and rate-distortion optimization-based quantization is applied to the entire transform block according to the applied result. method can be applied.

도 10을 참조하면, 변환 블록은 변환 크기에 따라 4x4, 8x8, 16x16, 32x32 등의 크기를 가질 수 있다. 이때, 고속 율-왜곡 최적화 기반 양자화 장치가, 각 변환 블록을 스캔하기 위하여 역 대각 스캔, 역 수평(horizontal) 스캔, 역 수직(vertical) 스캔 등의 방식을 사용할 수 있다.Referring to FIG. 10 , a transform block may have a size of 4x4, 8x8, 16x16, or 32x32 according to the transform size. In this case, the high-speed rate-distortion optimization-based quantization apparatus may use inverse diagonal scan, inverse horizontal scan, inverse vertical scan, or the like to scan each transform block.

또한, 8x8 크기 이상의 변환 블록은 4x4 단위의 부블록(sub-block)으로 분할될 수 있다. 아래 도9는 4x4 변환 블록과 4개의 4x4 단위의 부블록을 가지는 8x8 변환 블록을 나타낸다. 4x4 변환 블록에서 변환 계수 혹은 양자화된 레벨은 도시된 바와 같이 역 대각 스캔 순서대로 스캔될 수 있다. 또한, 8x8 변환 블록에서 부블록 내의 변환 계수 혹은 양자화된 레벨은 도시된 바와 같이 역 대각 스캔 순서대로 스캔될 수 있고, 변환 블록 내의 부블록 간의 스캔도 도시된 바와 같이 역 대각 스캔 순서대로 스캔될 수 있다. 이때, 변환 블록 및 부블록 내의 스캔 방법과 부블록 간의 스캔은 역 대각 스캔 방법으로 한정되지 않고, 언급한 역 수평 스캔, 역 수직 스캔 등의 스캔 방법도 사용할 수 있다. 물론, 고속 율-왜곡 최적화 기반 양자화 장치에 의하여 변환 블록 단위로 율-왜곡 최적화 기반 양자화가 수행될 수 있다.In addition, a transform block having a size of 8x8 or larger may be divided into 4x4 sub-blocks. 9 below shows an 8x8 transform block having a 4x4 transform block and four 4x4 unit subblocks. In the 4x4 transform block, transform coefficients or quantized levels may be scanned in an inverse diagonal scan order as shown. In addition, in an 8x8 transform block, transform coefficients or quantized levels within subblocks may be scanned in an inverse diagonal scan order as shown, and scans between subblocks in a transform block may also be scanned in an inverse diagonal scan order as shown. there is. In this case, the scan method within the transform block and subblock and the scan between subblocks is not limited to the inverse diagonal scan method, and the aforementioned inverse horizontal scan and inverse vertical scan scan methods may also be used. Of course, rate-distortion optimization-based quantization may be performed in units of transform blocks by the high-speed rate-distortion optimization-based quantization apparatus.

도 11은 일실시예에 따른 고속 율-왜곡 최적화 기반 양자화 방법을 나타내는 것이다.11 illustrates a quantization method based on fast rate-distortion optimization according to an embodiment.

고속 율-왜곡 최적화 기반 양자화 장치에 의하여 변환이 수행되면, 변환 계수는 변환 블록 내의 좌상단 쪽에 발생하게 되며, 변환 후 좌상단에 발생하는 변환 계수는 상대적으로 저주파수(low frequency)일 수 있다. 또한, 우하단 쪽에 발생되는 변환 계수는 고주파수(high frequency)일 수 있다. 물론, 저주파수 성분이 고주파수 성분보다 부호화 효율에 더 많은 영향을 끼치게 되어 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기 및 복호화기에서는 저주파수 성분이 고주파수 성분보다 더 중요한 역할을 할 수 있다.When the transform is performed by the fast rate-distortion optimization-based quantization device, the transform coefficient is generated at the upper left corner of the transform block, and the transform coefficient generated at the upper left corner after transform may have a relatively low frequency. In addition, the conversion coefficient generated on the lower right side may be a high frequency. Of course, since the low-frequency component has more influence on the coding efficiency than the high-frequency component, the low-frequency component may play a more important role than the high-frequency component in the image encoder and decoder, which are fast rate-distortion optimization-based quantization devices.

도 11을 참조하면, 4x4 변환 블록에는 총 16개의 변환 계수가 존재할 수 있으며, 8x8 변환 블록 내에는 총 64개의 변환 계수, 16x16 변환 블록에는 총 256개의 변환 계수, 32x32 변환 블록에는 총 1024개의 변환 계수가 존재할 수 있다.Referring to FIG. 11, a total of 16 transform coefficients may exist in a 4x4 transform block, a total of 64 transform coefficients in an 8x8 transform block, a total of 256 transform coefficients in a 16x16 transform block, and a total of 1024 transform coefficients in a 32x32 transform block. may exist.

이때, 고속 율-왜곡 최적화 기반 양자화 장치가 수행하는 율-왜곡 최적화 기반 양자화 방법을 사용할 경우 32x32 변환 블록에 대해서는 최대 1024개의 변환 계수에 대해 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정해야 한다. 물론, 경우에 따라서, 고속 율-왜곡 최적화 기반 양자화 장치인, 영상 부호화기에서의 복잡도가 상당히 증가될 수 있으므로, 고속 율-왜곡 최적화 기반 양자화 장치가 이를 방지할 수 있다.In this case, when the rate-distortion optimization-based quantization method performed by the high-speed rate-distortion optimization-based quantization device is used, the optimal quantized level and the optimal last significant coefficient must be determined for up to 1024 transform coefficients for a 32x32 transform block. . Of course, in some cases, the complexity of an image coder, which is a fast rate-distortion optimization based quantization device, may increase considerably, so a fast rate-distortion optimization based quantization device can prevent this.

고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내에서 결정해야 할 최적의 양자화된 레벨 및 최적의 마지막 중요 계수의 수를 줄이기 위해서, 변환 블록 내에서 일부 변환 계수 위치(1101) 혹은 부블록(1102)에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다.In the fast rate-distortion optimization-based quantization apparatus, in order to reduce the optimal quantized level and the number of optimal last significant coefficients to be determined in the transform block, some transform coefficient positions 1101 or subblocks 1102 in the transform block ) can determine the optimal quantized level and the optimal last significant coefficient.

예를 들어, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록의 크기에 따라서 변환 블록 내의 일부 변환 계수 위치 혹은 일부 부블록에 존재하는 변환 계수에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다. 이때, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내의 일부 변환 계수 위치 혹은 일부 부블록에 해당하지 않는 변환 계수들에 대해서는 모두 양자화된 레벨 값을 0으로 설정할 수 있다.For example, a quantization apparatus based on fast rate-distortion optimization determines an optimal quantized level and an optimal last significant coefficient only for transform coefficients present in some transform coefficient positions in a transform block or in some subblocks according to the size of a transform block. can decide In this case, the fast rate-distortion optimization-based quantization apparatus may set all quantized level values to 0 for transform coefficients that do not correspond to positions of some transform coefficients in a transform block or to some subblocks.

또한, 경우에 따라서, 고속 율-왜곡 최적화 기반 양자화 장치는, 8x8 변환 블록에 대해서는 일부 변환 계수 위치(1101)에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다. 또한, 경우에 따라서, 고속 율-왜곡 최적화 기반 양자화 장치는, 16x16 변환 블록에 대해서는 일부 부블록(1102)에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다.In some cases, the fast rate-distortion optimization-based quantization apparatus may determine an optimal quantized level and an optimal last significant coefficient for only some transform coefficient positions 1101 for an 8x8 transform block. In some cases, the fast rate-distortion optimization-based quantization apparatus may determine an optimal quantized level and an optimal last significant coefficient for only some subblocks 1102 for a 16x16 transform block.

물론, 고속 율-왜곡 최적화 기반 양자화 장치는, 4x4 변환 블록과 32x32 변환 블록에도 마찬가지로 일부 변환 계수 위치 혹은 일부 부블록에 존재하는 변환 계수에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치는, 8x8, 16x16 혹은 32x32 변환 블록에 대해서는 부블록 간 스캔 순서인 역 수평 스캔, 역 수직 스캔, 혹은 역 대각 스캔 순서에 따라 마지막 스캔 순서로부터 각각 2개, 9개, 35개의 부블록에 대해서만 상기 방식으로 수행할 수도 있다.Of course, the high-speed rate-distortion optimization-based quantization apparatus can determine the optimal quantized level and the optimal last significant coefficient only for transform coefficients present in some transform coefficient positions or in some subblocks, similarly to 4x4 transform blocks and 32x32 transform blocks. there is. In addition, for 8x8, 16x16, or 32x32 transform blocks, the high-speed rate-distortion optimization-based quantization device, according to the inverse horizontal scan, inverse vertical scan, or inverse diagonal scan order, which is the scan order between subblocks, each two from the last scan order, The above method may be performed only for 9 or 35 subblocks.

도 12는 일실시예에 따른 변환 블록을 이용한 고속 율-왜곡 최적화 기반 양자화 방법을 나타내는 것이다.12 illustrates a quantization method based on fast rate-distortion optimization using a transform block according to an embodiment.

일실시예에 따르면, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록이 포함되는 예측 유닛의 화면 내 예측 모드에 따라서 변환 블록 내의 일부 변환 계수 위치 혹은 일부 부블록에 존재하는 변환 계수에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다. 고속 율-왜곡 최적화 기반 양자화 장치는, 화면 내 예측 모드가 수직 모드 혹은 수직 모드와 유사한 방향을 가지는 모드일 경우 8x8 변환 블록에서 상단에 존재하는 2개의 부블록에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치는, 화면 내 예측 모드가 수평 모드 혹은 수평 모드와 유사한 방향을 가지는 모드일 경우, 8x8 변환 블록에서 좌측에 존재하는 2개의 부블록에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다.According to an embodiment, the fast rate-distortion optimization-based quantization apparatus optimizes only transform coefficients existing in some transform coefficient positions in a transform block or in some subblocks according to an intra-prediction mode of a prediction unit including the transform block. The quantized level and optimal last significant coefficient can be determined. The high-speed rate-distortion optimization-based quantization apparatus, when the intra-prediction mode is a vertical mode or a mode having a direction similar to the vertical mode, obtains an optimal quantized level and an optimal quantization level only for the top two subblocks in an 8x8 transform block. The final important factor can be determined. In addition, the fast rate-distortion optimization-based quantization apparatus, when the intra-prediction mode is a horizontal mode or a mode having a direction similar to the horizontal mode, optimal quantized levels only for two subblocks existing on the left side of an 8x8 transform block and an optimal last significant coefficient.

일실시예에 따르면, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록이 포함되는 부호화 유닛의 예측 모드에 따라서 변환 블록 내의 일부 변환 계수 위치 혹은 일부 부블록에 존재하는 변환 계수에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다.According to an embodiment, the fast rate-distortion optimization based quantization apparatus performs optimal quantization only for transform coefficients present in some transform coefficient positions in a transform block or in some subblocks according to a prediction mode of a coding unit including the transform block. level and optimal last critical factor can be determined.

또한, 예측 모드가 화면 내 예측 모드일 경우, 화면간 예측 모드보다 상대적으로 저주파수 영역에 변환 계수가 많이 존재할 수 있다. 이때, 고속 율-왜곡 최적화 기반 양자화 장치는, 화면 내 예측 모드일 경우에는 화면간 예측 모드보다 저주파수 영역 부분에서 더 많은 변환 계수 위치 혹은 부블록들에 대해 상기 방식을 수행할 수도 있다.Also, when the prediction mode is the intra prediction mode, many transform coefficients may exist in a relatively low frequency region than in the inter prediction mode. In this case, in the case of the intra prediction mode, the fast rate-distortion optimization based quantization apparatus may perform the above method for more transform coefficient positions or subblocks in the low-frequency region than in the inter prediction mode.

일실시예에 따라서, 고속 율-왜곡 최적화 기반 양자화 장치는, 색 성분인 휘도 성분 또는 색차 성분에 따라서 변환 블록 내의 일부 변환 계수 위치 혹은 일부 부블록에 존재하는 변환 계수에 대해서만 최적의 양자화된 레벨 및 최적의 마지막 중요 계수를 결정할 수 있다. 휘도 성분에는 색차 성분보다 변환 계수가 존재할 가능성이 높으므로, 고속 율-왜곡 최적화 기반 양자화 장치는, 휘도 성분에 대한 변환 블록에는 색차 성분에 대한 변환 블록보다 더 많은 변환 계수 위치 혹은 부블록들에 대해 상기 방식을 수행할 수 있다.According to an embodiment, the high-rate-distortion optimization-based quantization apparatus obtains an optimal quantized level only for transform coefficients present in some transform coefficient positions in a transform block or in some subblocks according to a luminance component or a chrominance component that is a color component, and The optimal last critical factor can be determined. Since transform coefficients are more likely to exist in the luminance component than chrominance components, the fast rate-distortion optimization-based quantization apparatus has more transform coefficient positions or subblocks in the transform block for the luminance component than in the transform block for the chrominance component. The above method can be performed.

또한, 고속 율-왜곡 최적화 기반 양자화 장치는, 기존의 율-왜곡 최적화 기반 양자화 방법과 같이 변환 블록 전체에 대해서 율-왜곡 최적화 기반 양자화를 적용하지 않는다. 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내에서 상대적으로 중요한 성분인 저주파수 성분을 위주로 데드존을 이용한 스칼라 양자화 방법을 적용한 후, 저주파수 성분에 대한 양자화된 레벨 값이 존재할 경우에는 율-왜곡 최적화 기반 양자화를 적용한다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치는, 저주파수 성분에 대한 양자화된 레벨 값이 존재하지 않을 경우에는 해당 변환 블록 내 전체 변환 계수에 대한 양자화된 레벨 값을 0으로 결정할 수 있다.In addition, the high-speed rate-distortion optimization-based quantization apparatus does not apply rate-distortion optimization-based quantization to the entire transform block, unlike the conventional rate-distortion optimization-based quantization method. The high-speed rate-distortion optimization-based quantization device applies the scalar quantization method using the dead zone mainly to the low-frequency component, which is a relatively important component in the transform block, and then rate-distortion optimization when there is a quantized level value for the low-frequency component. Apply base quantization. In addition, the fast rate-distortion optimization-based quantization apparatus may determine quantized level values for all transform coefficients in a corresponding transform block as 0 when there is no quantized level value for a low-frequency component.

이때, 고속 율-왜곡 최적화 기반 양자화 장치는, 변환 블록 내에서 일부 변환 계수 위치 혹은 부블록에 대해서만 데드존을 이용한 스칼라 양자화 방식을 적용하고 해당 변환 계수 위치 혹은 부블록에서 양자화된 레벨 값이 존재할 경우에는 율-왜곡 최적화 기반 양자화를 적용할 수 있다. 또한, 고속 율-왜곡 최적화 기반 양자화 장치는, 해당 변환 계수 위치 혹은 부블록에서 양자화된 레벨 값이 존재하지 않을 경우에는 해당 변환 블록 내 전체 변환 계수에 대한 양자화된 레벨 값을 0으로 결정할 수 있다.At this time, the high-speed rate-distortion optimization-based quantization apparatus applies a scalar quantization method using a dead zone only to some transform coefficient positions or subblocks within a transform block, and if a quantized level value exists in the corresponding transform coefficient position or subblock Quantization based on rate-distortion optimization can be applied to In addition, the fast rate-distortion optimization-based quantization apparatus may determine quantized level values for all transform coefficients in the corresponding transform block as 0 when there is no quantized level value in the corresponding transform coefficient position or subblock.

도 12를 참조하면, 데드존을 이용한 스칼라 양자화 방식을 적용할 변환 계수 위치(1201) 또는 부블록(1202)은 고속 율-왜곡 최적화 기반 양자화 장치에 의하여 변환 블록의 크기에 따라서 결정될 수 있다. 이때, 고속 율-왜곡 최적화 기반 양자화 장치는, 위치(1201) 또는 부블록(1202)에 데드존을 이용한 스칼라 양자화 방식을 적용해보고 율-왜곡 최적화 기반 양자화를 변환 블록 전체에 적용할지 결정할 수 있다.Referring to FIG. 12 , a transform coefficient position 1201 or a sub-block 1202 to which scalar quantization using a dead zone is applied may be determined according to the size of a transform block by a quantization apparatus based on fast rate-distortion optimization. In this case, the fast rate-distortion optimization-based quantization apparatus may apply scalar quantization using a dead zone to the position 1201 or sub-block 1202 and determine whether to apply rate-distortion optimization-based quantization to the entire transform block.

일실시예에 따르면, 데드존을 이용한 스칼라 양자화 방식을 적용할 변환 계수 위치(1201) 또는 부블록(1202)은 고속 율-왜곡 최적화 기반 양자화 장치에 의하여 부호화 유닛의 예측 모드에 따라서 결정될 수 있다. 예를 들어, 예측 모드가 화면 내 예측 모드일 경우, 화면간 예측 모드 보다 상대적으로 저주파수 영역에 변환 계수가 많이 존재할 수 있다. 이때, 고속 율-왜곡 최적화 기반 양자화 장치는, 화면 내 예측 모드일 경우에, 화면간 예측 모드보다 저주파수 영역 부분에서 더 많은 변환 계수 위치 혹은 부블록들을 데드존을 이용한 스칼라 양자화 방식을 적용할 영역으로 결정할 수 있다.According to an embodiment, the transform coefficient position 1201 or the subblock 1202 to which scalar quantization using a dead zone is applied may be determined according to a prediction mode of a coding unit by a quantization apparatus based on fast rate-distortion optimization. For example, when the prediction mode is the intra prediction mode, more transform coefficients may exist in a relatively low frequency region than the inter prediction mode. In this case, in the case of the intra prediction mode, the high-speed rate-distortion optimization based quantization apparatus converts more transform coefficient positions or subblocks in the low frequency region than in the inter prediction mode to the region to which the scalar quantization method using the dead zone is applied. can decide

또한, 일실시예에 따르면, 데드존을 이용한 스칼라 양자화 방법을 적용할 변환 계수 위치(1201) 또는 부블록(1202)은 색 성분인 휘도 성분 또는 색차 성분에 따라서 결정될 수 있다. 이때, 휘도 성분에는 색차 성분보다 변환 계수가 존재할 가능성이 높으므로, 고속 율-왜곡 최적화 기반 양자화 장치는, 색차 성분에 대한 변환 블록보다 휘도 성분에 대한 변환 블록에서 더 많은 변환 계수 위치 혹은 부블록들을 데드존을 이용한 스칼라 양자화 방식을 적용할 영역으로 결정할 수도 있다.Also, according to an embodiment, a transform coefficient position 1201 or a subblock 1202 to which a scalar quantization method using a dead zone is applied may be determined according to a luminance component or a chrominance component that is a color component. At this time, since there is a higher possibility that transform coefficients exist in the luminance component than chrominance components, the fast rate-distortion optimization-based quantization apparatus places more transform coefficient positions or subblocks in the transform block for the luminance component than in the transform block for the chrominance component. A scalar quantization method using a dead zone may be determined as an area to be applied.

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPA(field programmable array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The devices described above may be implemented as hardware components, software components, and/or a combination of hardware components and software components. For example, devices and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable array (FPA), It may be implemented using one or more general purpose or special purpose computers, such as a programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions. A processing device may run an operating system (OS) and one or more software applications running on the operating system. A processing device may also access, store, manipulate, process, and generate data in response to execution of software. For convenience of understanding, there are cases in which one processing device is used, but those skilled in the art will understand that the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that it can include. For example, a processing device may include a plurality of processors or a processor and a controller. Other processing configurations are also possible, such as parallel processors.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of the foregoing, which configures a processing device to operate as desired or processes independently or collectively. You can command the device. Software and/or data may be any tangible machine, component, physical device, virtual equipment, computer storage medium or device, intended to be interpreted by or provide instructions or data to a processing device. , or may be permanently or temporarily embodied in a transmitted signal wave. Software may be distributed on networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer readable media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. Program commands recorded on the medium may be specially designed and configured for the embodiment or may be known and usable to those skilled in computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. - includes hardware devices specially configured to store and execute program instructions, such as magneto-optical media, and ROM, RAM, flash memory, and the like. Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter, as well as machine language codes such as those produced by a compiler. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다. 그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.As described above, although the embodiments have been described with limited examples and drawings, those skilled in the art can make various modifications and variations from the above description. For example, the described techniques may be performed in an order different from the method described, and/or components of the described system, structure, device, circuit, etc. may be combined or combined in a different form than the method described, or other components may be used. Or even if it is replaced or substituted by equivalents, appropriate results can be achieved. Therefore, other implementations, other embodiments, and equivalents of the claims are within the scope of the following claims.

Claims (3)

영상 복호화 방법에 있어서,
현재 변환 블록에 대한 잔여 신호를 획득하는 단계;
상기 현재 변환 블록의 잔여 신호에 대한 역양자화를 수행하는 단계; 및
상기 현재 변환 블록의 역양자화된 신호에 대해 역변환을 수행하는 단계를 포함하되,
상기 잔여 신호는 엔트로피 복호화에 기초하여 비트스트림으로부터 획득되고,
상기 현재 변환 블록 중 일부 영역에 대해서만 상기 잔여 신호가 획득되고,
상기 일부 영역은 상기 현재 변환 블록의 크기에 기반하여 결정되는 것을 특징으로 하는, 영상 복호화 방법.
In the video decoding method,
obtaining a residual signal for the current transform block;
performing inverse quantization on a residual signal of the current transform block; and
Including performing inverse transform on the inverse quantized signal of the current transform block,
The residual signal is obtained from a bitstream based on entropy decoding,
The residual signal is obtained only for a partial region of the current transform block;
The partial region is determined based on the size of the current transform block.
영상 부호화 방법에 있어서,
현재 변환 블록에 대한 잔여 신호를 유도하는 단계;
상기 현재 변환 블록의 잔여 신호에 대한 변환을 수행하는 단계;
상기 현재 변환 블록의 변환된 신호에 대해 양자화를 수행하는 단계; 및
상기 현재 변환 블록의 양자화된 신호를 부호화하는 단계를 포함하되,
상기 부호화는 엔트로피 부호화에 기초하여 수행되고,
상기 현재 변환 블록의 양자화된 신호 중 일부 영역에 대해서만 부호화되고,
상기 일부 영역은 상기 현재 변환 블록의 크기에 기반하여 결정되는 것을 특징으로 하는, 영상 부호화 방법.
In the video encoding method,
deriving a residual signal for the current transform block;
performing transformation on a residual signal of the current transformation block;
performing quantization on the transformed signal of the current transform block; and
Encoding the quantized signal of the current transform block,
The encoding is performed based on entropy encoding,
Only a partial region of the quantized signal of the current transform block is coded;
The partial region is determined based on the size of the current transform block.
영상 부호화 방법에 의해 생성된 비트스트림을 저장한 컴퓨터 판독 가능한 기록매체에 있어서,
상기 영상 부호화 방법은,
현재 변환 블록에 대한 잔여 신호를 유도하는 단계;
상기 현재 변환 블록의 잔여 신호에 대한 변환을 수행하는 단계;
상기 현재 변환 블록의 변환된 신호에 대해 양자화를 수행하는 단계; 및
상기 현재 변환 블록의 양자화된 신호를 부호화하는 단계를 포함하되,
상기 현재 변환 블록의 양자화된 신호 중 일부 영역에 대해서만 부호화되고,
상기 부호화는 엔트로피 부호화에 기초하여 수행되고,
상기 일부 영역은 상기 현재 변환 블록의 크기에 기반하여 결정되는 것을 특징으로 하는, 컴퓨터 판독 가능한 기록 매체.
A computer-readable recording medium storing a bitstream generated by an image encoding method,
The video encoding method,
deriving a residual signal for the current transform block;
performing transformation on a residual signal of the current transformation block;
performing quantization on the transformed signal of the current transform block; and
Encoding the quantized signal of the current transform block,
Only a partial region of the quantized signal of the current transform block is coded;
The encoding is performed based on entropy encoding,
Characterized in that the partial area is determined based on the size of the current conversion block, computer readable recording medium.
KR1020220106338A 2015-01-15 2022-08-24 Method for quantization based on fast rate-distortion optimization, and apparatus for the same KR102534377B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020220106338A KR102534377B1 (en) 2015-01-15 2022-08-24 Method for quantization based on fast rate-distortion optimization, and apparatus for the same
KR1020230062196A KR102661525B1 (en) 2015-01-15 2023-05-15 Method for quantization based on fast rate-distortion optimization, and apparatus for the same

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR1020150007332A KR102332999B1 (en) 2015-01-15 2015-01-15 Method for quantization based on fast rate-distortion optimization, and apparatus for the same
KR1020210164431A KR102437718B1 (en) 2015-01-15 2021-11-25 Method for quantization based on fast rate-distortion optimization, and apparatus for the same
KR1020220106338A KR102534377B1 (en) 2015-01-15 2022-08-24 Method for quantization based on fast rate-distortion optimization, and apparatus for the same

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020210164431A Division KR102437718B1 (en) 2015-01-15 2021-11-25 Method for quantization based on fast rate-distortion optimization, and apparatus for the same

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020230062196A Division KR102661525B1 (en) 2015-01-15 2023-05-15 Method for quantization based on fast rate-distortion optimization, and apparatus for the same

Publications (2)

Publication Number Publication Date
KR20220123197A KR20220123197A (en) 2022-09-06
KR102534377B1 true KR102534377B1 (en) 2023-05-26

Family

ID=56616655

Family Applications (5)

Application Number Title Priority Date Filing Date
KR1020150007332A KR102332999B1 (en) 2015-01-15 2015-01-15 Method for quantization based on fast rate-distortion optimization, and apparatus for the same
KR1020210164431A KR102437718B1 (en) 2015-01-15 2021-11-25 Method for quantization based on fast rate-distortion optimization, and apparatus for the same
KR1020220106338A KR102534377B1 (en) 2015-01-15 2022-08-24 Method for quantization based on fast rate-distortion optimization, and apparatus for the same
KR1020230062196A KR102661525B1 (en) 2015-01-15 2023-05-15 Method for quantization based on fast rate-distortion optimization, and apparatus for the same
KR1020240054219A KR20240063824A (en) 2015-01-15 2024-04-23 Method for quantization based on fast rate-distortion optimization, and apparatus for the same

Family Applications Before (2)

Application Number Title Priority Date Filing Date
KR1020150007332A KR102332999B1 (en) 2015-01-15 2015-01-15 Method for quantization based on fast rate-distortion optimization, and apparatus for the same
KR1020210164431A KR102437718B1 (en) 2015-01-15 2021-11-25 Method for quantization based on fast rate-distortion optimization, and apparatus for the same

Family Applications After (2)

Application Number Title Priority Date Filing Date
KR1020230062196A KR102661525B1 (en) 2015-01-15 2023-05-15 Method for quantization based on fast rate-distortion optimization, and apparatus for the same
KR1020240054219A KR20240063824A (en) 2015-01-15 2024-04-23 Method for quantization based on fast rate-distortion optimization, and apparatus for the same

Country Status (1)

Country Link
KR (5) KR102332999B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160100189A1 (en) * 2014-10-07 2016-04-07 Qualcomm Incorporated Intra bc and inter unification

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101366086B1 (en) * 2007-01-03 2014-02-21 삼성전자주식회사 Method of deciding on coding for coefficients of residual block, apparatus, encoder and decoder
CN103597838B (en) * 2011-04-15 2017-03-29 黑莓有限公司 The method and apparatus that the position of last position coefficient of efficiency is encoded and decoded
US9154792B2 (en) * 2011-11-08 2015-10-06 Qualcomm Incorporated Progressive coding of position of last significant coefficient

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160100189A1 (en) * 2014-10-07 2016-04-07 Qualcomm Incorporated Intra bc and inter unification

Also Published As

Publication number Publication date
KR20160088086A (en) 2016-07-25
KR20210148045A (en) 2021-12-07
KR102661525B1 (en) 2024-04-26
KR20240063824A (en) 2024-05-10
KR102332999B1 (en) 2021-12-01
KR102437718B1 (en) 2022-08-29
KR20220123197A (en) 2022-09-06
KR20230073162A (en) 2023-05-25

Similar Documents

Publication Publication Date Title
KR102409443B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR102487618B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR102410424B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR102397475B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
JP6259038B2 (en) Video decoding method and video decoding apparatus
KR20220127801A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR102453110B1 (en) Method for fast transform coefficient coding and apparatus for the same
KR102387909B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20170058838A (en) Method and apparatus for encoding/decoding of improved inter prediction
KR20220082791A (en) Method and apparatus for derivation of motion prediction information
KR102558803B1 (en) Method and apparatus for prediction of residual signal
KR20170102806A (en) Method for encoding/decoding a video signal and apparatus therefor
US10205952B2 (en) Method and apparatus for inter color component prediction
KR20170120418A (en) Apparatus and method for fast motion estimation encoding/decoding of enhancement later
KR20200060282A (en) Method and apparatus for encoding/decoding image, recording medium for stroing bitstream
KR102534377B1 (en) Method for quantization based on fast rate-distortion optimization, and apparatus for the same
KR102610188B1 (en) Method of video processing providing high-throughput arithmetic coding and method and appratus for decoding and encoding video using the processing
KR102107080B1 (en) Fast Video coding method
KR20170087727A (en) Apparatus and method for image encoder/decoder using adaptive quantization
KR20140120396A (en) Fast Video coding method

Legal Events

Date Code Title Description
A107 Divisional application of patent
E701 Decision to grant or registration of patent right
A107 Divisional application of patent
GRNT Written decision to grant