KR20230005506A - Video Encoding And Decoding Method Using Transform Coefficients Sign Bit Hiding - Google Patents

Video Encoding And Decoding Method Using Transform Coefficients Sign Bit Hiding Download PDF

Info

Publication number
KR20230005506A
KR20230005506A KR1020210086307A KR20210086307A KR20230005506A KR 20230005506 A KR20230005506 A KR 20230005506A KR 1020210086307 A KR1020210086307 A KR 1020210086307A KR 20210086307 A KR20210086307 A KR 20210086307A KR 20230005506 A KR20230005506 A KR 20230005506A
Authority
KR
South Korea
Prior art keywords
block
code
transform coefficients
determining
current block
Prior art date
Application number
KR1020210086307A
Other languages
Korean (ko)
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 KR1020210086307A priority Critical patent/KR20230005506A/en
Priority to PCT/KR2022/008976 priority patent/WO2023277451A1/en
Publication of KR20230005506A publication Critical patent/KR20230005506A/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/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
    • 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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients

Abstract

The present disclosure provides a video decoding method which is capable of increasing the efficiency in encoding a video by reducing code information about codes of conversion factors. The method comprises the steps of: obtaining conversion factor magnitude information about the magnitude of predetermined conversion factors among conversion factors of a current block; obtaining a code bit hiding flag indicating whether code bit hiding of the predetermined conversion factors of the current block is performed; determining a code of the predetermined conversion factors without obtaining conversion factor code information for codes of the predetermined conversion factors when the code bit hiding flag indicates that the code bit hiding of the predetermined conversion factors is performed; and determining the predetermined conversion factors according to the magnitude of the predetermined conversion factors according to the conversion factors magnitude information and the determined code of the predetermined conversion factors.

Description

변환 계수 부호 비트 숨김을 이용한 비디오 부호화 및 복호화 방법 {Video Encoding And Decoding Method Using Transform Coefficients Sign Bit Hiding}Video Encoding and Decoding Method Using Transform Coefficients Sign Bit Hiding {Video Encoding And Decoding Method Using Transform Coefficients Sign Bit Hiding}

본 발명은 비디오 부호화 및 복호화 방법에 관한 발명으로, 보다 구체적으로 변환 계수 부호 비트 숨김을 이용한 비디오 부호화 및 복호화 방법에 관한 발명이다.The present invention relates to a video encoding and decoding method, and more particularly, to a video encoding and decoding method using transform coefficient code bit hiding.

최근, 인터넷에서는 동영상과 같은 멀티미디어 데이터의 수요가 급격히 증가하고 있다. 하지만 채널(Channel)의 대역폭(Bandwidth)이 발전하는 속도는 급격히 증가하고 있는 멀티미디어 데이터의 양을 따라가기 힘든 상황이다. 이러한 문제를 해결하기 위하여 국제 표준화 기구인 ITU-T의 VCEG(Video Coding Expert Group)과 ISO/IEC의 MPEG(Moving Picture Expert Group)에서는 꾸준히 공동 연구를 통하여 보다 향상된 동영상 압축 표준을 연구하는 중이다.Recently, the demand for multimedia data such as moving pictures is rapidly increasing on the Internet. However, it is difficult to keep up with the rapidly increasing amount of multimedia data at the rate at which the bandwidth of a channel develops. In order to solve this problem, an international standardization organization, ITU-T's Video Coding Expert Group (VCEG) and ISO/IEC's Moving Picture Expert Group (MPEG), are continuously researching a more advanced video compression standard through joint research.

비디오 부호화는 크게 화면 내 예측, 화면 간 예측, 변환, 양자화, 엔트로피(Entropy coding) 부호화, 인루프 필터(In-loop filter)로 구성된다. 영상의 블록 분할로 인하여 결정된 각 블록의 잔여 블록에 대하여 변환 및 양자화가 수행될 수 있다. 그리고 변환 및 양자화에 따라 결정된 변환 계수 블록에 대하여 변환 계수 정보가 생성될 수 있다.Video coding is largely composed of intra-prediction, inter-prediction, transform, quantization, entropy coding, and in-loop filter. Transformation and quantization may be performed on a residual block of each block determined by block division of the image. Further, transform coefficient information may be generated for a transform coefficient block determined according to transform and quantization.

변환 계수의 값의 분포, 변환 계수들 간의 중복성 등을 이용하여 변환 계수 정보의 크기를 감축함으로써 비디오 부호화 효율이 증가할 수 있다.Video encoding efficiency can be increased by reducing the size of transform coefficient information using a distribution of transform coefficient values, redundancy among transform coefficients, and the like.

영상의 해상도가 증가함에 따라, 부호화된 영상 데이터의 크기가 급증하고 있다. 따라서, 변환 계수의 부호에 관한 부호 정보를 감축함으로써 비디오 부호화 효율이 증가할 수 있다.As the resolution of an image increases, the size of encoded image data is rapidly increasing. Therefore, video encoding efficiency can be increased by reducing the code information about the sign of the transform coefficient.

본 개시에 있어서, 현재 블록의 변환 계수들 중 소정의 변환 계수들의 크기에 대한 변환 계수 크기 정보를 획득하는 단계, 및 상기 현재 블록의 상기 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부를 나타내는 부호 비트 숨김 플래그를 획득하는 단계, 상기 부호 비트 숨김 플래그가 상기 소정의 변환 계수들의 부호 비트 숨김이 수행됨을 나타낼 경우, 상기 소정의 변환 계수들의 부호에 대한 변환 계수 부호 정보의 획득 없이 상기 소정의 변환 계수들의 부호를 결정하는 단계, 상기 변환 계수 크기 정보에 따른 소정의 변환 계수들의 크기와 상기 결정된 소정의 변환 계수들의 부호에 따라, 상기 소정의 변환 계수를 결정하는 단계를 포함하는 비디오 복호화 방법이 제공된다.In the present disclosure, obtaining transform coefficient size information on the size of predetermined transform coefficients among transform coefficients of a current block, and a code indicating whether code bit hiding of the predetermined transform coefficients of the current block is performed. Acquiring a bit hiding flag, when the sign bit hiding flag indicates that sign bit hiding of the predetermined transform coefficients is performed, without acquiring transform coefficient sign information for the signs of the predetermined transform coefficients There is provided a video decoding method including the step of determining the sign of , and the step of determining the predetermined transform coefficient according to the size of predetermined transform coefficients according to the transform coefficient size information and the determined sign of the predetermined transform coefficients. .

일 실시 예에 있어서, 상기 소정의 변환 계수들의 부호를 결정하는 단계는, 상기 소정의 변환 계수들에 대한 부호 조합들 각각에 대한 부호 비트 비용을 결정하는 단계, 상기 부호 비트 비용에 따라 최적의 부호 조합을 결정하는 단계, 및 상기 최적의 부호 조합에 따라, 상기 소정의 변환 계수의 부호를 결정하는 단계를 포함할 수 있다.In an embodiment, the determining of the signs of the predetermined transform coefficients may include determining a code bit cost for each of code combinations for the predetermined transform coefficients, and an optimal code according to the sign bit cost. The method may include determining a combination, and determining a sign of the predetermined transform coefficient according to the optimal code combination.

일 실시 예에 있어서, 상기 소정의 변환 계수들에 대한 상기 부호 조합들 각각에 대한 부호 비트 비용을 결정하는 단계는, 부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정하는 단계, 상기 잔여 블록으로부터 상기 현재 블록의 복원 블록을 결정하는 단계, 및 상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계를 포함할 수 있다.In an embodiment, the determining of the code bit cost for each of the code combinations for the predetermined transform coefficients may include determining a residual block of the current block according to the code combination; The method may include determining a reconstruction block of the current block, and determining a code bit cost of the code combination based on the reconstruction block and adjacent blocks of the current block.

일 실시 예에 있어서, 상기 부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정하는 단계는, 고속 역변환에 따라, 상기 부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정할 수 있다.In an embodiment, the determining of the residual block of the current block according to the code combination may include determining the residual block of the current block according to the code combination according to fast inverse transform.

일 실시 예에 있어서, 상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계는, 상기 현재 블록의 좌측 경계에 인접한 상기 복원 블록의 샘플들과 상기 현재 블록의 좌측 인접 블록의 샘플들 간의 유사성 및 상기 현재 블록의 상측 경계에 인접한 상기 복원 블록의 샘플들과 상기 현재 블록의 상측 인접 블록의 샘플들 간의 유사성에 따라, 상기 부호 조합의 부호 비트 비용이 결정될 수 있다.In an embodiment, the step of determining the code bit cost of the code combination based on the reconstruction block and an adjacent block of the current block may include samples of the reconstruction block adjacent to a left boundary of the current block and the current block. The code bit cost of the code combination can be determined according to the similarity between the samples of the left adjacent block of and the similarity between the samples of the reconstruction block adjacent to the upper boundary of the current block and the samples of the upper adjacent block of the current block. there is.

일 실시 예에 있어서, 상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계는, 상기 현재 블록의 크기, 예측 모드, 변환 모드, 및 양자화 파라미터 중 적어도 하나에 따라, 상기 부호 조합의 부호 비트 비용이 결정되는 것을 특징으로 할 수 있다.In an embodiment, the determining of the code bit cost of the code combination based on the reconstructed block and adjacent blocks of the current block may include at least one of a size of the current block, a prediction mode, a transform mode, and a quantization parameter. According to , the code bit cost of the code combination may be determined.

일 실시 예에 있어서, 상기 부호 비트 비용에 따라 최적의 부호 조합을 결정하는 단계는, 부호 비트 비용이 제일 작은 부호 조합이 최적의 부호 조합으로 결정되는 것을 특징으로 할 수 있다.In an embodiment, the step of determining the optimal code combination according to the code bit cost may be characterized in that a code combination having the lowest code bit cost is determined as the optimal code combination.

일 실시 예에 있어서, 상기 부호 비트 숨김 플래그를 획득하는 단계는, 상기 현재 블록의 부호화 트리 블록, 슬라이스, 타일, 픽처, 시퀀스, 및 비디오 중 하나에 대하여 부호 비트 숨김이 허용되는지 여부를 나타내는 부호 비트 숨김 허용 플래그를 획득하는 단계, 및 상기 부호 비트 숨김 허용 플래그가 상기 부호 비트 숨김이 허용되는지 나타낼 때, 상기 부호 비트 숨김 플래그를 획득하는 단계를 포함하는 것을 특징으로 할 수 있다.In an embodiment, the obtaining of the code bit hiding flag may include a code bit indicating whether code bit hiding is allowed for one of a coding tree block, a slice, a tile, a picture, a sequence, and a video of the current block. Acquiring a hiding permission flag, and acquiring the sign bit hiding flag when the sign bit hiding permission flag indicates whether the sign bit hiding is allowed.

일 실시 예에 있어서, 상기 소정의 변환 계수는, 상기 현재 블록의 스캔 순서, 상기 변환 계수 크기의 임계 값, 및 상기 변환 계수의 위치 중 적어도 하나에 의하여 결정되는 것을 특징으로 할 수 있다.In an embodiment, the predetermined transform coefficient may be determined by at least one of a scan order of the current block, a threshold value of the size of the transform coefficient, and a position of the transform coefficient.

일 실시 예에 있어서, 상기 소정의 변환 계수의 개수는 3 이상인 것을 특징으로 할 수 있다.In an embodiment, the predetermined number of transform coefficients may be 3 or more.

본 개시에 있어서, 현재 블록의 변환 계수들을 결정하는 단계, 상기 현재 블록의 변환 계수들 중 소정의 변환 계수들의 크기에 대한 변환 계수 크기 정보를 부호화하는 단계, 상기 소정의 변환 계수들의 부호에 대한 부호 비트 숨김이 수행되는지 여부를 결정하는 단계, 및 상기 소정의 변환 계수들의 부호 비트 정보가 생략되는지 여부를 나타내는 부호 비트 숨김 플래그를 부호화하는 단계를 포함하는 비디오 부호화 방법이 제공된다.In the present disclosure, the step of determining transform coefficients of a current block, the step of encoding transform coefficient size information about the magnitudes of predetermined transform coefficients among the transform coefficients of the current block, and the sign of the predetermined transform coefficients A video encoding method is provided that includes determining whether bit hiding is performed, and encoding a sign bit hiding flag indicating whether or not the sign bit information of the predetermined transform coefficients is omitted.

일 실시 예에 있어서, 상기 소정의 변환 계수들의 부호에 대한 부호 비트 숨김이 수행되는지 여부를 결정하는 단계는, 상기 소정의 변환 계수들에 적용가능한 부호 조합들 각각에 대한 부호 비트 비용을 결정하는 단계, 상기 부호 비트 비용에 따라, 상기 소정의 변환 계수들에 적용가능한 부호 조합들 중 최적의 부호 조합을 결정하는 단계, 및 상기 최적의 부호 조합에 따라, 상기 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부를 결정하는 단계를 포함할 수 있다.In an embodiment, the determining whether code bit hiding is performed for the signs of the predetermined transform coefficients may include determining a code bit cost for each of code combinations applicable to the predetermined transform coefficients. , determining an optimal code combination among code combinations applicable to the predetermined transform coefficients according to the code bit cost, and performing code bit hiding of the predetermined transform coefficients according to the optimal code combination. It may include the step of determining whether or not.

일 실시 예에 있어서, 상기 소정의 변환 계수들에 대한 상기 부호 조합들 각각에 대한 부호 비트 비용을 결정하는 단계는, 부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정하는 단계, 상기 잔여 블록으로부터 상기 현재 블록의 복원 블록을 결정하는 단계, 및 상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계를 포함할 수 있다.In an embodiment, the determining of the code bit cost for each of the code combinations for the predetermined transform coefficients may include determining a residual block of the current block according to the code combination; The method may include determining a reconstruction block of the current block, and determining a code bit cost of the code combination based on the reconstruction block and adjacent blocks of the current block.

일 실시 예에 있어서, 상기 부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정하는 단계는, 고속 역변환에 따라, 상기 부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정할 수 있다.In an embodiment, the determining of the residual block of the current block according to the code combination may include determining the residual block of the current block according to the code combination according to fast inverse transform.

일 실시 예에 있어서, 상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계는, 상기 현재 블록의 좌측 경계에 인접한 상기 복원 블록의 샘플들과 상기 현재 블록의 좌측 인접 블록의 샘플들 간의 유사성 및 상기 현재 블록의 상측 경계에 인접한 상기 복원 블록의 샘플들과 상기 현재 블록의 상측 인접 블록의 샘플들 간의 유사성에 따라, 상기 부호 조합의 부호 비트 비용이 결정되는 것을 특징으로 할 수 있다.In an embodiment, the step of determining the code bit cost of the code combination based on the reconstruction block and an adjacent block of the current block may include samples of the reconstruction block adjacent to a left boundary of the current block and the current block. Depending on the similarity between the samples of the left adjacent block of and the similarity between the samples of the reconstruction block adjacent to the upper boundary of the current block and the samples of the upper adjacent block of the current block, the code bit cost of the code combination is determined that can be characterized.

일 실시 예에 있어서, 상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계는, 상기 현재 블록의 크기, 예측 모드, 변환 모드, 및 양자화 파라미터 중 적어도 하나에 따라, 상기 부호 조합의 부호 비트 비용이 결정되는 것을 특징으로 할 수 있다.In an embodiment, the determining of the code bit cost of the code combination based on the reconstructed block and adjacent blocks of the current block may include at least one of a size of the current block, a prediction mode, a transform mode, and a quantization parameter. According to , the code bit cost of the code combination may be determined.

일 실시 예에 있어서, 상기 최적의 부호 조합에 따라, 상기 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부를 결정하는 단계는, 상기 소정의 변환 계수들에 적용가능한 부호 조합들 중 상기 최적의 부호 조합이 상기 소정의 변환 계수들에 적용된 부호 조합과 일치하는지 여부에 따라, 상기 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부가 결정될 수 있다.In an embodiment, the step of determining whether the code bit hiding of the predetermined transform coefficients is performed according to the optimal code combination may include the optimal code among code combinations applicable to the predetermined transform coefficients. Depending on whether the combination matches the code combination applied to the predetermined transform coefficients, it can be determined whether or not sign bit hiding of the predetermined transform coefficients is performed.

일 실시 예에 있어서, 상기 비디오 부호화 방법은, 상기 현재 블록의 부호화 트리 블록, 슬라이스, 타일, 픽처, 시퀀스, 및 비디오 중 하나에 대하여 부호 비트 숨김이 허용되는지 여부를 나타내는 부호 비트 숨김 허용 플래그를 부호화하는 단계를 더 포함하고, 상기 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부를 결정하는 단계, 및 상기 소정의 변환 계수들의 부호 비트 정보가 생략되는지 여부를 나타내는 부호 비트 숨김 플래그를 부호화하는 단계는, 상기 부호 비트 숨김 허용 플래그가 부호 비트 숨김이 허용됨을 나타낼 때 수행되는 것을 특징으로 할 수 있다.In an embodiment, the video encoding method encodes a code bit hiding permission flag indicating whether code bit hiding is allowed for one of a coding tree block, a slice, a tile, a picture, a sequence, and a video of the current block. The step of determining whether sign bit hiding of the predetermined transform coefficients is performed, and the step of encoding a sign bit hiding flag indicating whether or not the sign bit information of the predetermined transform coefficients is omitted , It may be characterized in that it is performed when the sign bit hiding permission flag indicates that sign bit hiding is allowed.

일 실시 예에 있어서, 상기 소정의 변환 계수는, 상기 현재 블록의 스캔 순서, 상기 변환 계수 크기의 임계 값, 및 상기 변환 계수의 위치 중 적어도 하나에 의하여 결정될 수 있다.In an embodiment, the predetermined transform coefficient may be determined by at least one of a scan order of the current block, a threshold value of the size of the transform coefficient, and a position of the transform coefficient.

일 실시 예에 있어서, 상기 소정의 변환 계수의 개수는 3 이상인 것을 특징으로 할 수 있다.In an embodiment, the predetermined number of transform coefficients may be 3 or more.

본 개시에 있어서, 상기의 비디오 부호화 방법에 의해 생성된 비트스트림을 저장한 컴퓨터로 판독가능한 기록 매체가 제공된다.In the present disclosure, a computer-readable recording medium storing a bitstream generated by the above video encoding method is provided.

본 발명에 따른 변환 계수의 부호 비트 숨김 프로세스에 의하여 변환 계수의 부호 정보가 생략될 수 있다. 따라서, 변환 계수 부호화에 의하여 발생하는 정보량이 감소할 수 있다. 그러므로, 비디오 부호화 효율이 향상됨으로써 고화질 비디오의 생성 및 보급이 용이해질 수 있다.Sign information of the transform coefficient may be omitted by the process of hiding the sign bit of the transform coefficient according to the present invention. Therefore, the amount of information generated by encoding the transform coefficient can be reduced. Therefore, the generation and dissemination of high-definition video can be facilitated by improving the video encoding efficiency.

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 본 발명의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 3은 변환 계수 블록을 부호 비트 숨김을 통해 부호화 하는 영상 부호화 방법을 나타낸다.
도 4는 변환 계수 블록의 일 예와 상기 변환 계수 블록의 변환 계수들의 부호 조합을 나타낸다.
도 5는 부동소수형 DCT2 방식에 따른 고속 역변환을 설명한다.
도 6은 부동소수형 DCT2 방식에 따른 고속 역변환에 따른 잔여 블록 결정 방법을 설명한다.
도 7은 변환 계수 블록의 일 예와 정수형 DCT2 방식에 따른 고속 역변환을 설명한다.
도 8 내지 도 10은 변환 계수 블록을 구성하는 복수의 블록들 각각의 잔여 블록들을 결정하기 위한 방법을 설명한다.
도 11은 부호 비트 비용을 결정하기 위한 일 실시예를 나타낸다.
도 12는 부호 비트 숨김을 이용하는 비디오 복호화 방법을 설명한다.
도 13은 부호 비트 숨김을 이용하는 비디오 부호화 방법을 설명한다.
1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
2 is a block diagram illustrating a video decoding apparatus according to an embodiment of the present invention.
3 shows an image encoding method of encoding a transform coefficient block by hiding code bits.
4 shows an example of a transform coefficient block and a code combination of transform coefficients of the transform coefficient block.
5 illustrates a high-speed inverse transform according to the floating-point DCT2 method.
6 illustrates a residual block determination method according to fast inverse transform according to the floating-point type DCT2 method.
7 illustrates an example of a transform coefficient block and a high-speed inverse transform according to an integer-type DCT2 method.
8 to 10 describe a method for determining residual blocks of each of a plurality of blocks constituting a transform coefficient block.
11 illustrates one embodiment for determining the sign bit cost.
12 describes a video decoding method using code bit hiding.
13 describes a video encoding method using sign bit hiding.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다. 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다. 후술하는 예시적 실시예들에 대한 상세한 설명은, 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 실시예를 실시할 수 있기에 충분하도록 상세히 설명된다. 다양한 실시예들은 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 실시예의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 예시적 실시예들의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다.Since the present invention can make various changes and have various embodiments, specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention. Like reference numbers in the drawings indicate the same or similar function throughout the various aspects. The shapes and sizes of elements in the drawings may be exaggerated for clarity. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS For detailed descriptions of exemplary embodiments described below, reference is made to the accompanying drawings, which illustrate specific embodiments by way of example. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments are different, but need not be mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in one embodiment in another embodiment without departing from the spirit and scope of the invention. Additionally, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the embodiment. Accordingly, the detailed description set forth below is not to be taken in a limiting sense, and the scope of the exemplary embodiments, if properly described, is limited only by the appended claims, along with all equivalents as claimed by those claims.

본 발명에서 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.In the present invention, terms such as first and second may be used to describe various components, but the components should not be limited by the terms. These terms are only used for the purpose of distinguishing one component from another. For example, a first element may be termed a second element, and similarly, a second element may be termed a first element, without departing from the scope of the present invention. The terms and/or include any combination of a plurality of related recited items or any of a plurality of related recited items.

본 발명의 어떤 구성 요소가 다른 구성 요소에 “연결되어” 있다거나 “접속되어” 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있으나, 중간에 다른 구성 요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component of the present invention is referred to as “connected” or “connected” to another component, it may be directly connected or connected to the other component, but there may be other components in the middle. It should be understood that it may be On the other hand, when an element is referred to as “directly connected” or “directly connected” to another element, it should be understood that no other element exists in the middle.

본 발명의 실시예에 나타나는 구성부들은 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시되는 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수 개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.Components appearing in the embodiments of the present invention are shown independently to represent different characteristic functions, and do not mean that each component is composed of separate hardware or a single software component. That is, each component is listed and included as each component for convenience of explanation, and at least two components of each component can be combined to form a single component, or one component can be divided into a plurality of components to perform a function, and each of these components can be divided into a plurality of components. Integrated embodiments and separated embodiments of components are also included in the scope of the present invention as long as they do not depart from the essence of the present invention.

본 발명에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 발명에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. 즉, 본 발명에서 특정 구성을 “포함”한다고 기술하는 내용은 해당 구성 이외의 구성을 배제하는 것이 아니며, 추가적인 구성이 본 발명의 실시 또는 본 발명의 기술적 사상의 범위에 포함될 수 있음을 의미한다. Terms used in the present invention are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. In the present invention, terms such as "comprise" or "having" are intended to designate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, but one or more other features It should be understood that the presence or addition of numbers, steps, operations, components, parts, or combinations thereof is not precluded. That is, the description of "including" a specific configuration in the present invention does not exclude configurations other than the corresponding configuration, and means that additional configurations may be included in the practice of the present invention or the scope of the technical spirit of the present invention.

본 발명의 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.Some of the components of the present invention are not essential components that perform essential functions in the present invention, but may be optional components for improving performance. The present invention can be implemented by including only components essential to implement the essence of the present invention, excluding components used for performance improvement, and a structure including only essential components excluding optional components used for performance improvement. Also included in the scope of the present invention.

이하, 도면을 참조하여 본 발명의 실시 형태에 대하여 구체적으로 설명한다. 본 명세서의 실시예를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략하고, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.EMBODIMENT OF THE INVENTION Hereinafter, embodiment of this invention is described concretely with reference to drawings. In describing the embodiments of this specification, if it is determined that a detailed description of a related known configuration or function may obscure the gist of the present specification, the detailed description will be omitted, and the same reference numerals will be used for the same components in the drawings. and duplicate descriptions of the same components are omitted.

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.

도 1을 참조하면, 영상 부호화 장치(100)는 픽처 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.Referring to FIG. 1 , an image encoding apparatus 100 includes a picture division unit 110, prediction units 120 and 125, a transform unit 130, a quantization unit 135, a rearrangement unit 160, an entropy encoding unit ( 165), an inverse quantization unit 140, an inverse transform unit 145, a filter unit 150, and a memory 155.

도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.Each component shown in FIG. 1 is shown independently to represent different characteristic functions in the video encoding device, and does not mean that each component is made of separate hardware or a single software component. That is, each component is listed and included as each component for convenience of explanation, and at least two components of each component can be combined to form one component, or one component can be divided into a plurality of components to perform a function, and each of these components can be divided into a plurality of components. Integrated embodiments and separated embodiments of components are also included in the scope of the present invention as long as they do not depart from the essence of the present invention.

또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.In addition, some of the components may be optional components for improving performance rather than essential components that perform essential functions in the present invention. The present invention can be implemented by including only components essential to implement the essence of the present invention, excluding components used for performance improvement, and a structure including only essential components excluding optional components used for performance improvement. Also included in the scope of the present invention.

픽처 분할부(110)는 입력된 픽처를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 픽처 분할부(110)에서는 하나의 픽처에 대해 복수의 부호화 단위, 예측 단위 및 변환 단위의 조합으로 분할하고 소정의 기준(예를 들어, 비용 함수)으로 하나의 부호화 단위, 예측 단위 및 변환 단위 조합을 선택하여 픽처를 부호화 할 수 있다.The picture division unit 110 may divide an input picture into at least one processing unit. In this case, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The picture division unit 110 divides one picture into a plurality of combinations of coding units, prediction units, and transformation units, and combines one coding unit, prediction unit, and transformation unit according to a predetermined criterion (eg, a cost function). You can encode a picture by selecting .

예를 들어, 하나의 픽처는 복수개의 부호화 단위로 분할될 수 있다. 픽처에서 부호화 단위를 분할하기 위해서는 쿼드 트리 구조(Quad Tree Structure)와 같은 재귀적인 트리 구조를 사용할 수 있는데 하나의 영상 또는 최대 크기 부호화 단위(largest coding unit)를 루트로 하여 다른 부호화 단위로 분할되는 부호화 유닛은 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 일정한 제한에 따라 더 이상 분할되지 않는 부호화 단위는 리프 노드가 된다. 즉, 하나의 코딩 유닛에 대하여 정방형 분할만이 가능하다고 가정하는 경우, 하나의 부호화 단위는 최대 4개의 다른 부호화 단위로 분할될 수 있다.For example, one picture may be divided into a plurality of coding units. In order to divide coding units in a picture, a recursive tree structure such as a quad tree structure can be used. Coding that is divided into different coding units with one image or largest coding unit as the root A unit may be divided with as many child nodes as the number of divided coding units. A coding unit that is not further divided according to a certain limit becomes a leaf node. That is, when it is assumed that only square division is possible for one coding unit, one coding unit can be divided into up to four different coding units.

이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.Hereinafter, in an embodiment of the present invention, a coding unit may be used as a unit for performing encoding or a unit for performing decoding.

예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다.The prediction unit may be divided into at least one square or rectangular shape having the same size within one coding unit, and one of the prediction units divided within one coding unit predicts another prediction unit. It may be divided to have a shape and/or size different from the unit.

부호화 단위를 기초로 인트라 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위 NxN으로 분할하지 않고 인트라 예측을 수행할 수 있다.When generating a prediction unit for performing intra prediction based on a coding unit, if the coding unit is not a minimum coding unit, intra prediction may be performed without dividing into a plurality of prediction units NxN.

예측부(120, 125)는 인터 예측을 수행하는 인터 예측부(120)와 인트라 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽처 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The prediction units 120 and 125 may include the inter prediction unit 120 performing inter prediction and the intra prediction unit 125 performing intra prediction. It is possible to determine whether to use inter prediction or intra prediction for a prediction unit, and determine specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. In this case, a processing unit in which prediction is performed and a processing unit in which a prediction method and specific details are determined may be different. For example, a prediction method and a prediction mode may be determined in a prediction unit, and prediction may be performed in a transformation unit. A residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130 . In addition, prediction mode information and motion vector information used for prediction may be encoded in the entropy encoder 165 together with residual values and transmitted to the decoder. When a specific encoding mode is used, it is also possible to encode an original block as it is and transmit it to a decoder without generating a prediction block through the prediction units 120 and 125 .

인터 예측부(120)는 현재 픽처의 이전 픽처 또는 이후 픽처 중 적어도 하나의 픽처의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽처 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽처 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다. The inter-prediction unit 120 may predict a prediction unit based on information on at least one picture among pictures before or after the current picture, and in some cases, prediction based on information on a partially coded region within the current picture. Units can also be predicted. The inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

참조 픽처 보간부에서는 메모리(155)로부터 참조 픽처 정보를 제공받고 참조 픽처에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.The reference picture interpolator may receive reference picture information from the memory 155 and generate pixel information of an integer pixel or less in the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients may be used to generate pixel information of an integer pixel or less in units of 1/4 pixels. In the case of a color difference signal, a DCT-based 4-tap interpolation filter with different filter coefficients may be used to generate pixel information of an integer pixel or less in units of 1/8 pixels.

모션 예측부는 참조 픽처 보간부에 의해 보간된 참조 픽처를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터 값을 가질 수 있다. 모션 예측부에서는 모션 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 모션 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법, 인트라 블록 카피(Intra Block Copy) 방법 등 다양한 방법이 사용될 수 있다.The motion predictor may perform motion prediction based on the reference picture interpolated by the reference picture interpolator. As a method for calculating the motion vector, various methods such as Full search-based Block Matching Algorithm (FBMA), Three Step Search (TSS), and New Three-Step Search Algorithm (NTS) may be used. The motion vector may have a motion vector value in units of 1/2 or 1/4 pixels based on interpolated pixels. The motion prediction unit may predict the current prediction unit by using a different motion prediction method. Various methods such as a skip method, a merge method, an advanced motion vector prediction (AMVP) method, and an intra block copy method may be used as motion prediction methods.

인트라 예측부(125)는 현재 픽처 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra prediction unit 125 may generate a prediction unit based on reference pixel information around the current block, which is pixel information in the current picture. If a block adjacent to the current prediction unit is a block on which inter prediction is performed, and the reference pixel is a pixel on which inter prediction is performed, the reference pixel of the block on which intra prediction is performed surrounding the reference pixel included in the block on which inter prediction is performed information can be used instead. That is, when a reference pixel is unavailable, information on the unavailable reference pixel may be replaced with at least one reference pixel among available reference pixels.

인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 상기 방향성 예측 모드의 개수는 HEVC 표준에 정의된 33개와 같거나 그 이상일 수 있으며, 예를 들어 60 내지 70 범위 내의 개수로 확장될 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra prediction, a prediction mode may include a directional prediction mode in which reference pixel information is used according to a prediction direction and a non-directional prediction mode in which directional information is not used during prediction. The number of directional prediction modes may be equal to or greater than 33 defined in the HEVC standard, and may be extended to a number within the range of 60 to 70, for example. A mode for predicting luminance information and a mode for predicting chrominance information may be different, and intra prediction mode information or predicted luminance signal information used to predict luminance information may be used to predict chrominance information.

인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행할 수 있다. 그러나 인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 N x N 분할을 사용하는 인트라 예측을 사용할 수 있다.When intra prediction is performed, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction of the prediction unit is based on the pixel on the left, the top left, and the top of the prediction unit. can be performed. However, when performing intra prediction, when the size of a prediction unit and the size of a transformation unit are different, intra prediction may be performed using a reference pixel based on the transformation unit. In addition, intra prediction using N×N splitting may be used only for the smallest coding unit.

인트라 예측 방법은 예측 모드에 따라 참조 화소에 AIS(Adaptive Intra Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 참조 화소에 적용되는 AIS 필터의 종류는 상이할 수 있다. 인트라 예측 방법을 수행하기 위해 현재 예측 단위의 인트라 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 인트라 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 인트라 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.In the intra prediction method, a prediction block may be generated after applying an adaptive intra smoothing (AIS) filter to a reference pixel according to a prediction mode. The type of AIS filter applied to the reference pixel may be different. In order to perform the intra prediction method, the intra prediction mode of the current prediction unit may be predicted from the intra prediction modes of prediction units existing around the current prediction unit. When predicting the prediction mode of the current prediction unit using the mode information predicted from the neighboring prediction unit, if the intra-prediction mode of the current prediction unit and the neighboring prediction unit are identical, the current prediction unit and the neighboring prediction unit use predetermined flag information It is possible to transmit information that the prediction modes of are the same, and if the prediction modes of the current prediction unit and the neighboring prediction unit are different, entropy encoding may be performed to encode the prediction mode information of the current block.

또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이 값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다. In addition, a residual block may be generated that includes residual information that is a difference between a prediction unit performed prediction based on the prediction unit generated by the prediction units 120 and 125 and an original block of the prediction unit. The generated residual block may be input to the transform unit 130 .

변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지, DST를 적용할지 또는 KLT를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다. In the transform unit 130, the residual block including the original block and the residual information of the prediction unit generated through the prediction units 120 and 125 is converted into DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT and It can be converted using the same conversion method. Whether to apply DCT, DST, or KLT to transform the residual block may be determined based on intra prediction mode information of a prediction unit used to generate the residual block.

양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.The quantization unit 135 may quantize the values converted to the frequency domain by the transform unit 130 . A quantization coefficient may change according to a block or an importance of an image. The value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160 .

재정렬부(160)는 양자화된 잔차 값에 대해 계수 값의 재정렬을 수행할 수 있다.The rearrangement unit 160 may rearrange the coefficient values of the quantized residual values.

재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.The reordering unit 160 may change a 2D block-type coefficient into a 1-D vector form through a coefficient scanning method. For example, the reordering unit 160 may scan DC coefficients to high-frequency coefficients using a zig-zag scan method and change them into a one-dimensional vector form. Depending on the size of the transform unit and the intra prediction mode, instead of zig-zag scan, a vertical scan for scanning 2D block-type coefficients in a column direction and a horizontal scan for scanning 2-dimensional block-type coefficients in a row direction may be used. That is, it is possible to determine which scan method among zig-zag scan, vertical scan, and horizontal scan is used according to the size of the transform unit and the intra prediction mode.

엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.The entropy encoding unit 165 may perform entropy encoding based on the values calculated by the reordering unit 160 . Entropy encoding may use various encoding methods such as, for example, exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).

엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. The entropy encoding unit 165 receives residual value coefficient information and block type information of a coding unit from the reordering unit 160 and the prediction units 120 and 125, prediction mode information, division unit information, prediction unit information and transmission unit information, motion Various information such as vector information, reference frame information, block interpolation information, and filtering information can be encoded.

엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수 값을 엔트로피 부호화할 수 있다.The entropy encoding unit 165 may entropy-encode the coefficient values of the coding units input from the reordering unit 160 .

역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. The inverse quantization unit 140 and the inverse transform unit 145 inversely quantize the values quantized by the quantization unit 135 and inverse transform the values transformed by the transform unit 130 . The residual generated by the inverse quantization unit 140 and the inverse transform unit 145 is combined with the prediction unit predicted through the motion estimation unit, the motion compensation unit, and the intra prediction unit included in the prediction units 120 and 125 and restored. You can create a Reconstructed Block.

필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.The filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).

디블록킹 필터는 복원된 픽처에서 블록 간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.The deblocking filter may remove block distortion caused by a boundary between blocks in a reconstructed picture. In order to determine whether to perform deblocking, it may be determined whether to apply the deblocking filter to the current block based on pixels included in several columns or rows included in the block. When a deblocking filter is applied to a block, a strong filter or a weak filter may be applied according to the required deblocking filtering strength. In addition, in applying the deblocking filter, when vertical filtering and horizontal filtering are performed, horizontal filtering and vertical filtering may be processed in parallel.

오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽처에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correction unit may correct an offset of the deblocked image from the original image in units of pixels. In order to perform offset correction for a specific picture, after dividing the pixels included in the image into a certain number of areas, determining the area to be offset and applying the offset to the area, or offset by considering the edge information of each pixel method can be used.

ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. Adaptive Loop Filtering (ALF) may be performed based on a value obtained by comparing the filtered reconstructed image with the original image. After dividing the pixels included in the image into predetermined groups, filtering may be performed differentially for each group by determining one filter to be applied to the corresponding group. Information related to whether or not to apply ALF may be transmitted for each coding unit (CU) of a luminance signal, and the shape and filter coefficients of an ALF filter to be applied may vary according to each block. In addition, the ALF filter of the same form (fixed form) may be applied regardless of the characteristics of the block to be applied.

메모리(155)는 필터부(150)를 통해 산출된 복원 블록 또는 픽처를 저장할 수 있고, 저장된 복원 블록 또는 픽처는 인터 예측을 수행 시 예측부(120, 125)에 제공될 수 있다.The memory 155 may store a reconstructed block or picture calculated through the filter unit 150, and the stored reconstructed block or picture may be provided to the prediction units 120 and 125 when performing inter prediction.

도 2는 본 발명의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.2 is a block diagram illustrating a video decoding apparatus according to an embodiment of the present invention.

도 2를 참조하면, 영상 복호화기(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)가 포함될 수 있다.Referring to FIG. 2 , the image decoder 200 includes an entropy decoding unit 210, a rearrangement unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230 and 235, a filter unit ( 240), memory 245 may be included.

영상 부호화기에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화기와 반대의 절차로 복호화될 수 있다.When a video bitstream is input from the video encoder, the input bitstream may be decoded by a procedure opposite to that of the video encoder.

엔트로피 복호화부(210)는 영상 부호화기의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. The entropy decoding unit 210 may perform entropy decoding by a procedure opposite to that performed by the entropy encoding unit of the image encoder. For example, various methods such as exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) may be applied corresponding to the method performed by the image encoder.

엔트로피 복호화부(210)에서는 부호화기에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.The entropy decoding unit 210 may decode information related to intra prediction and inter prediction performed by the encoder.

재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)에서는 부호화부에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 해당 부호화부에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다.The rearrangement unit 215 may perform rearrangement based on a method in which the encoding unit rearranges the entropy-decoded bitstream in the entropy decoding unit 210 . Coefficients expressed in the form of one-dimensional vectors may be reconstructed into coefficients in the form of two-dimensional blocks and rearranged. The rearrangement unit 215 may perform rearrangement through a method of receiving information related to the coefficient scanning performed by the encoder and performing reverse scanning based on the scanning order performed by the corresponding encoder.

역양자화부(220)는 부호화기에서 제공된 양자화 파라미터와 재정렬된 블록의 계수 값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoder and the rearranged coefficient value of the block.

역변환부(225)는 영상 부호화기에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT, DST, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 부호화기에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화기의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.The inverse transform unit 225 may perform inverse transforms, that is, inverse DCT, inverse DST, and inverse KLT, on the transforms performed by the transform unit, that is, DCT, DST, and KLT, on the quantization result performed by the video encoder. Inverse transformation may be performed based on the transmission unit determined by the video encoder. The inverse transform unit 225 of the video decoder may selectively perform transformation techniques (eg, DCT, DST, KLT) according to a plurality of pieces of information such as a prediction method, a size of a current block, and a prediction direction.

예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽처 정보를 기초로 예측 블록을 생성할 수 있다. The prediction units 230 and 235 may generate a prediction block based on information related to prediction block generation provided from the entropy decoding unit 210 and previously decoded block or picture information provided from the memory 245 .

전술한 바와 같이 영상 부호화기에서의 동작과 동일하게 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 N x N 분할을 사용하는 인트라 예측을 사용할 수도 있다.As described above, when intra prediction is performed in the same way as the operation in the video encoder, when the size of the prediction unit and the size of the transformation unit are the same, the pixel existing on the left, the pixel existing on the upper left, and the pixel existing on the upper side of the prediction unit are the same. Intra prediction is performed on a prediction unit based on a pixel to perform intra prediction, but when performing intra prediction, when the size of the prediction unit and the size of the transformation unit are different, intra prediction is performed using a reference pixel based on the transformation unit. can In addition, intra prediction using N×N splitting may be used only for the smallest coding unit.

예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 인터 예측부(230)는 영상 부호화기에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽처의 이전 픽처 또는 이후 픽처 중 적어도 하나의 픽처에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽처 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.The prediction units 230 and 235 may include a prediction unit determining unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives various information such as prediction unit information input from the entropy decoding unit 210, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, classifies the prediction unit from the current coding unit, and predicts It is possible to determine whether a unit performs inter prediction or intra prediction. The inter-prediction unit 230 uses information necessary for inter-prediction of the current prediction unit provided from the video encoder to make current prediction based on information included in at least one picture among pictures before or after the current picture including the current picture. Inter prediction can be performed on units. Alternatively, inter prediction may be performed based on information of a pre-reconstructed partial region in the current picture including the current prediction unit.

인터 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피 모드 중 어떠한 방법인지 여부를 판단할 수 있다.In order to perform inter prediction, the motion prediction method of the prediction unit included in the corresponding coding unit based on the coding unit is skip mode, merge mode, AMVP mode, and intra block copy mode. You can judge which way it is.

인트라 예측부(235)는 현재 픽처 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 영상 부호화기에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로 인트라 예측을 수행할 수 있다. 인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화기에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit 235 may generate a prediction block based on pixel information in the current picture. When the prediction unit is a prediction unit that has undergone intra prediction, intra prediction may be performed based on intra prediction mode information of the prediction unit provided by the video encoder. The intra predictor 235 may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolator, and a DC filter. The AIS filter is a part that performs filtering on reference pixels of the current block, and can be applied by determining whether to apply the filter according to the prediction mode of the current prediction unit. AIS filtering may be performed on reference pixels of the current block using the prediction mode of the prediction unit and AIS filter information provided by the image encoder. When the prediction mode of the current block is a mode in which AIS filtering is not performed, AIS filter may not be applied.

참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소 값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수 값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.When the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on a pixel value obtained by interpolating the reference pixel, the reference pixel interpolator may interpolate the reference pixel to generate a reference pixel of the pixel unit having an integer value or less. When the prediction mode of the current prediction unit is a prediction mode for generating a prediction block without interpolating reference pixels, the reference pixels may not be interpolated. The DC filter may generate a prediction block through filtering when the prediction mode of the current block is the DC mode.

복원된 블록 또는 픽처는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The reconstructed block or picture may be provided to the filter unit 240 . The filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.

영상 부호화기로부터 해당 블록 또는 픽처에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화기의 디블록킹 필터에서는 영상 부호화기에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화기에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. Information on whether a deblocking filter is applied to a corresponding block or picture and, when a deblocking filter is applied, information on whether a strong filter or a weak filter is applied may be provided from the video coder. The deblocking filter of the video decoder receives information related to the deblocking filter provided by the video encoder, and the video decoder may perform deblocking filtering on the corresponding block.

오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.The offset correction unit may perform offset correction on the reconstructed image based on the type and offset value information of the offset correction applied to the image during encoding.

ALF는 부호화기로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.ALF may be applied to a coding unit based on ALF application information and ALF coefficient information provided from an encoder. Such ALF information may be included in a specific parameter set and provided.

메모리(245)는 복원된 픽처 또는 블록을 저장하여 참조 픽처 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽처를 출력부로 제공할 수 있다. The memory 245 may store a reconstructed picture or block so that it can be used as a reference picture or reference block, and may also provide the reconstructed picture to an output unit.

전술한 바와 같이 이하, 본 발명의 실시예에서는 설명의 편의상 코딩 유닛(Coding Unit)을 부호화 단위라는 용어로 사용하지만, 부호화 뿐만 아니라 복호화를 수행하는 단위가 될 수도 있다.As described above, in the following embodiments of the present invention, for convenience of explanation, a coding unit is used as a coding unit, but it may be a unit that performs not only encoding but also decoding.

도 3은 잔여 (Residual) 블록을 변환 및 양자화하여 생성된 변환 계수 블록을 부호 비트 숨김 (Sign bit Hiding)을 통해 부호화 하는 영상 부호화 방법을 나타낸다.3 illustrates an image encoding method of encoding a transform coefficient block generated by transforming and quantizing a residual block through sign bit hiding.

단계 302에서 잔여 블록에 대한 변환 및 양자화가 수행됨으로써, 변환 계수 블록이 생성된다. 상기 변환 계수 블록은 변환 및 양자화가 수행된 잔여 블록을, 역양자화함으로써 생성될 수 있다.In step 302, a transform coefficient block is generated by performing transform and quantization on the residual block. The transform coefficient block may be generated by inverse quantizing a residual block on which transform and quantization have been performed.

단계 304에서 변환 계수 블록을 생성한 뒤, 부호 비트 숨김에 따라 변환 계수 블록의 변환 계수들 중 일부의 부호 정보의 부호화가 생략된다.After generating the transform coefficient block in step 304, encoding of some sign information of transform coefficients of the transform coefficient block is omitted according to the hiding of the sign bit.

부호 비트 숨김은 변환 계수 블록에서 수행될 수 있다. 변환 계수 블록에서 부호 비트 숨김이 적용되는 계수들은 임의의 N 개로 제한할 수 있다. 상기 N은 2 이상의 정수이다.Sign bit hiding may be performed in the transform coefficient block. Coefficients to which sign bit hiding is applied in the transform coefficient block may be arbitrarily limited to N. Said N is an integer of 2 or more.

부호화 과정에서 획득된 변환 계수들의 부호는 부호 비트 숨김 플래그 (1 비트)를 통해서 전송될 수 있다. 그리고 복호화 과정에서 부호 비트 숨김 플래그를 통해서 부호 비트 숨김이 적용되었는지 여부가 결정될 수 있다.Signs of transform coefficients obtained in the encoding process may be transmitted through a sign bit hiding flag (1 bit). In the decoding process, it may be determined whether sign bit hiding is applied through the sign bit hiding flag.

상기 부호 비트 숨김 플래그는 변환 계수 블록 단위로 결정될 수 있다. 또는 상기 부호 비트 숨김 플래그는 변환 계수 블록보다 상위 단위인 부호화 블록, 부호화 트리 블록, 슬라이스, 타일, 픽처, CVS (Coded Video Sequence), 전체 비디오 단위로 결정될 수 있다.The sign bit hiding flag may be determined in units of transform coefficient blocks. Alternatively, the code bit hiding flag may be determined in units of a coding block, a coding tree block, a slice, a tile, a picture, a Coded Video Sequence (CVS), or an entire video, which are higher units than the transform coefficient block.

일 실시 예에 따르면, 룩업 테이블(Look-up Table)을 이용하여 역양자화가 수행될 수 있다. 그리고 상기 룩업 테이블에 부호 비트 숨김 프로세스를 반영함으로써, 단계 304의 부호 비트 숨김이 단계 302의 룩업 테이블에 따른 변환 계수 블록 생성에 병합될 수 있다.According to an embodiment, inverse quantization may be performed using a look-up table. Then, by reflecting the sign bit hiding process in the lookup table, the sign bit hiding process in step 304 can be merged into transform coefficient block generation according to the lookup table in step 302.

상기 룩업 테이블은 복수의 룩업 테이블들 중 변환 계수 블록의 생성에 사용된 양자화 파라미터에 따라 결정될 수 있다. 또는 양자화 파라미터 뿐만 아니라 다른 부호화 파라미터에 따라 복수의 룩업 테이블들 중 하나의 룩업 테이블이 선택될 수 있다.The lookup table may be determined according to a quantization parameter used to generate a transform coefficient block among a plurality of lookup tables. Alternatively, one lookup table may be selected from among a plurality of lookup tables according to not only the quantization parameter but also other encoding parameters.

룩업 테이블을 이용할 경우, 변환 계수 블록의 생성에 필요한 계산량이 감소할 수 있다. 그러나 복수의 룩업 테이블들의 저장을 위하여 많은 메모리 용량이 요구될 수 있다.When the lookup table is used, the amount of calculation required to generate the transform coefficient block can be reduced. However, a lot of memory capacity may be required to store a plurality of lookup tables.

일 실시 예에 따르면, 단계 304에서 부호 비트 숨김 여부가 결정될 수 있다. 부호화단에서, 특정 부호화 툴에 따른 영상의 부호화율을 검증하기 위하여 부호화 툴에 따라 부호화된 데이터를 복호화함으로써 생성된 복원 영상은 원본 영상과 비교된다. 그리고 비교 결과에 따라, 복원 영상과 원본 영상 간의 차이가 작을 경우, 부호화 툴이 채택될 수 있다. 반대로 복원 영상과 원본 영상 간의 차이가 클 경우, 부호화 툴이 채택되지 않는다.According to an embodiment, in step 304, whether to hide the sign bit may be determined. In an encoding stage, a reconstructed image generated by decoding data encoded according to an encoding tool is compared with an original image in order to verify an encoding rate of an image according to a specific encoding tool. According to the comparison result, when the difference between the reconstructed image and the original image is small, an encoding tool may be adopted. Conversely, if the difference between the restored image and the original image is large, the encoding tool is not adopted.

구체적으로, 복수의 변환 계수들의 부호 조합에 따른 복원 영상과 원본 영상 간의 차이를 비교하여 최적의 변환 계수들의 부호 조합을 결정할 수 있다. 그리고 최적의 변환 계수들의 부호 조합에 따라 부호 비트 숨김이 수행된 경우의 복원 영상과 원본 영상 간의 차이와 상기 부호 비트 숨김이 수행되지 경우의 복원 영상과 원본 영상 간의 차이를 비교하여 부호 비트 숨김의 수행 여부가 결정될 수 있다.Specifically, a difference between a reconstructed image and an original image according to a code combination of a plurality of transform coefficients may be compared to determine an optimal code combination of transform coefficients. In addition, code bit hiding is performed by comparing the difference between the reconstructed image and the original image when code bit hiding is performed according to the code combination of the optimal transform coefficients and the difference between the reconstructed image and the original image when the code bit hiding is not performed. whether can be determined.

복원 영상과 원본 영상 간의 차이는 부호 비트 비용 (Sign Bit Cost)로 정규화될 수 있다. 부호 비트 비용은 변환 계수들의 부호의 조합에 따른 변환 계수 블록의 복원 샘플들과 변환 계수 블록에 인접한 인접 샘플들 간의 유사성에 따라 결정될 수 있다.The difference between the reconstructed image and the original image may be normalized with a sign bit cost. The code bit cost may be determined according to similarity between reconstructed samples of a transform coefficient block according to a combination of signs of transform coefficients and adjacent samples adjacent to the transform coefficient block.

부호 비트 비용의 결정 방법은 픽처 타입에 따라 다르게 결정될 수 있다. 예를 들어, 픽처 타입이 I 타입 (인트라 예측만 허용됨)인 경우의 부호 비트 비용 결정 방법과 픽처 타입이 P 타입 또는 B 타입 (인트라 예측과 인터 예측이 허용됨)인 경우의 부호 비트 비용 결정 방법은 상이할 수 있다.A method of determining the code bit cost may be determined differently depending on the picture type. For example, a method for determining code bit cost when the picture type is I type (only intra prediction is allowed) and a method for determining code bit cost when the picture type is P type or B type (intra prediction and inter prediction are allowed) can be different

또한 부호 비트 비용의 결정 방법은 변환 방법에 따라 다르게 결정될 수 있다. 예를 들어, 변환 계수 블록에 적용된 변환 방법이 DCT 변환인지 DST 변환인지 여부에 따라 부호 비트 비용 결정 방법은 상이할 수 있다. 또는 변환 계수 블록에 2차 변환이 적용되었는지 여부에 따라 부호 비트 비용 결정 방법은 상이할 수 있다. 또는 변환 계수 블록의 수직 변환 및 수평 변환에 적용된 변환 방법에 따라 부호 비트 비용 결정 방법은 상이할 수 있다. 또는 변환 계수 블록의 크기에 따라 부호 비트 비용 결정 방법은 상이할 수 있다.Also, a method for determining the code bit cost may be determined differently according to a conversion method. For example, a method for determining a code bit cost may be different depending on whether a transform method applied to a transform coefficient block is DCT transform or DST transform. Alternatively, a method for determining a code bit cost may be different depending on whether a secondary transform is applied to a transform coefficient block. Alternatively, a method for determining a code bit cost may be different according to a transform method applied to the vertical transform and the horizontal transform of the transform coefficient block. Alternatively, the method for determining the code bit cost may be different according to the size of the transform coefficient block.

일 실시 예에 따르면, 앞서 설명된 부호 비트 비용 결정 방법에 따라 변환 계수들의 부호 조합들에 대한 부호 비트 비용이 결정된다. 그리고 부호 비트 비용이 가장 낮은 부호 조합들이 최적의 부호 조합으로 결정된다. 최적의 부호 조합이 변환 계수 블록의 실제 부호 조합과 일치하는 경우, 부호 비트 숨김이 적용되는 것으로 결정된다. 그리고 부호 비트 숨김이 적용되는 것으로 결정될 경우, 부호 비트 숨김 플래그는 1로 결정된다. 반대로 최적의 부호 조합이 변환 계수 블록의 실제 부호 조합과 일치하는 않는 경우, 부호 비트 숨김이 적용되지 않는 것으로 결정된다. 그리고 부호 비트 숨김이 적용되지 않는 것으로 결정될 경우, 부호 비트 숨김 플래그는 0으 결정된다.According to an embodiment, sign bit costs for code combinations of transform coefficients are determined according to the method for determining sign bit costs described above. Also, code combinations having the lowest code bit cost are determined as optimal code combinations. If the optimal sign combination matches the actual sign combination of the transform coefficient block, it is determined that sign bit hiding is applied. And when it is determined that the sign bit hiding is applied, the sign bit hiding flag is determined to be 1. Conversely, if the optimal code combination does not match the actual code combination of the transform coefficient block, it is determined that the code bit hiding is not applied. And when it is determined that sign bit hiding is not applied, the sign bit hiding flag is determined to be 0.

또는 최적의 부호 조합에 따른 결정된 복원 블록이 부호 비트 숨김의 적용 없이 결정된 복원 블록과 일치하는 경우, 부호 비트 숨김이 적용되는 것으로 결정된다. 그리고 부호 비트 숨김이 적용되는 것으로 결정될 경우, 부호 비트 숨김 플래그는 1로 결정된다. 반대로 최적의 부호 조합에 따른 결정된 복원 블록이 부호 비트 숨김의 적용 없이 결정된 복원 블록과 일치하는 않는 경우, 부호 비트 숨김이 적용되지 않는 것으로 결정된다. 그리고 부호 비트 숨김이 적용되지 않는 것으로 결정될 경우, 부호 비트 숨김 플래그는 0으로 결정된다.Alternatively, when the determined reconstruction block according to the optimal code combination coincides with the determined reconstruction block without applying sign bit hiding, it is determined that sign bit hiding is applied. And when it is determined that the sign bit hiding is applied, the sign bit hiding flag is determined to be 1. Conversely, when the determined reconstruction block according to the optimal code combination does not match the determined reconstruction block without applying the code bit hiding, it is determined that the code bit hiding is not applied. And when it is determined that sign bit hiding is not applied, the sign bit hiding flag is determined to be 0.

부호 비트 비용에 대하여는 이하 자세하게 설명된다.The sign bit cost is discussed in detail below.

도 4는 변환 계수 블록(400)의 일 예와 상기 변환 계수 블록의 변환 계수들의 부호 조합을 나타낸다.4 shows an example of a transform coefficient block 400 and a code combination of transform coefficients of the transform coefficient block.

변환 계수 블록(400)은 3개의 논제로 변환 계수와 13개의 제로 변환 계수를 포함한다. 따라서, 변환 계수 블록(400)에는 3개의 논제로 변환 계수의 부호를 나타내기 위한 3개의 부호 비트가 필요하다. 부호 비트 숨김의 적용 여부를 위하여, 변환 계수 블록(400)의 3개의 논제로 변환 계수의 부호 조합에 대한 부호 비트 비용이 결정될 수 있다. 그리고 부호 비트 비용이 가장 낮은 최적의 부호 조합이 변환 계수 블록(400)의 3개의 논제로 변환 계수의 부호 조합과 일치하는 경우, 부호 비트 숨김이 적용될 수 있다. 반대로 부호 비트 비용이 가장 낮은 최적의 부호 조합이 변환 계수 블록(400)의 3개의 논제로 변환 계수의 부호 조합과 일치하지 않는 경우, 부호 비트 숨김이 적용되지 않을 수 있다.The transform coefficient block 400 includes 3 nonzero transform coefficients and 13 zero transform coefficients. Accordingly, the transform coefficient block 400 requires three sign bits to indicate the signs of the three non-zero transform coefficients. In order to apply sign bit hiding, the sign bit cost of the code combination of transform coefficients can be determined with three issues of the transform coefficient block 400 . In addition, when the optimal code combination having the lowest code bit cost coincides with the code combination of the three non-zero transform coefficients of the transform coefficient block 400, code bit hiding may be applied. Conversely, when the optimal code combination having the lowest code bit cost does not match the sign combination of the three zero transform coefficients of the transform coefficient block 400, the code bit hiding may not be applied.

변환 계수 블록(400)은 3개의 논제로 변환 계수를 포함하기 때문에, 변환 계수 블록(400)에는 부호에 따라 2^3 (=8)의 부호 조합이 존재한다. 구체적으로, (1,1,1) (1,1,1), (1,1,1), (1,1,1), (1,1,1), (1,1,1), (1,1,1), 및 (1,1,1)의 부호 조합이 변환 계수 블록(400)에 존재한다. 따라서, 각 부호 조합에 따른 부호 비트 비용이 계산되고, 가장 낮은 부호 비트 비용을 가지는 부호 조합이 최적의 부호 조합으로 결정된다.Since the transform coefficient block 400 includes three non-zero transform coefficients, 2^3 (= 8) code combinations exist in the transform coefficient block 400 according to codes. Specifically, (1,1,1) (1,1,1), (1,1,1), (1,1,1), (1,1,1), (1,1,1), The sign combinations of (1,1,1) and (1,1,1) are present in the transform coefficient block 400. Accordingly, the code bit cost according to each code combination is calculated, and the code combination having the lowest code bit cost is determined as the optimal code combination.

각 부호 조합의 부호 비트 비용의 신속한 계산을 위하여, 변환 계수 블록(400)의 신속한 역변환이 필요하다. 신속한 역변환을 위해, 변환 계수 블록(400)는 하나의 논제로 변환 계수만을 포함하는 제1 블록(402), 제2 블록(404), 제3 블록(406)의 조합으로 표현될 수 있다. 그리고 제1 블록(402), 제2 블록(404), 제3 블록(406)의 역변환 결과에 따라 변환 계수 블록(400)의 역변환 결과가 신속하게 계산될 수 있다.For fast calculation of the code bit cost of each code combination, a fast inverse transform of the transform coefficient block 400 is required. For fast inverse transformation, the transform coefficient block 400 may be represented by a combination of a first block 402, a second block 404, and a third block 406 including only one nonzero transform coefficient. In addition, the inverse transform result of the transform coefficient block 400 can be quickly calculated according to the inverse transform results of the first block 402 , the second block 404 , and the third block 406 .

이하에서 도 5 및 도 6에서 부동소수점 DCT2 방식에 따른 최적의 부호 조합 결정 방법이 설명된다.Hereinafter, a method for determining an optimal code combination according to the floating point DCT2 method in FIGS. 5 and 6 will be described.

도 5는 부동소수형 DCT2 방식에 따른 고속 역변환 (Fast Inverse-transform)을 설명한다.5 illustrates fast inverse-transform according to the floating-point DCT2 method.

도 5에 따르면 변환 계수 블록(400)은 제1 블록(402)의 3배수, 제2 블록(404)의 (-5)배수, 및 제3 블록(406)의 7배수의 합과 동일하다. 변환 계수 블록의 신속한 역변환을 위하여 제1 블록(402)의 역변환의 결과 값(512), 제2 블록(404)의 역변환의 결과 값(514), 제3 블록(406)의 역변환의 결과 값(516)이 미리 설정될 수 있다.According to FIG. 5 , the transform coefficient block 400 is equal to the sum of a multiple of 3 of the first block 402 , a multiple of (−5) of the second block 404 , and a multiple of 7 of the third block 406 . For rapid inverse transformation of the transform coefficient block, the result value 512 of the inverse transformation of the first block 402, the result value 514 of the inverse transformation of the second block 404, and the result value of the inverse transformation of the third block 406 ( 516) may be set in advance.

결과 값(512)은 제1 블록(402)을 수직 변환하여 생성된 중간 블록(502)를 수평 변환하여 생성될 수 있다. 결과 값(514)은 제2 블록(404)을 수직 변환하여 생성된 중간 블록(504)를 수평 변환하여 생성될 수 있다. 결과 값(516)은 제3 블록(406)을 수직 변환하여 생성된 중간 블록(506)를 수평 변환하여 생성될 수 있다.The resulting value 512 may be generated by horizontally transforming the intermediate block 502 generated by vertically transforming the first block 402 . The resulting value 514 may be generated by horizontally transforming the intermediate block 504 generated by vertically transforming the second block 404 . The resulting value 516 may be generated by horizontally transforming the intermediate block 506 generated by vertically transforming the third block 406 .

도 6은 부동소수형 DCT2 방식에 따른 고속 역변환 (Fast Inverse-transform)에 따른 잔여 블록 결정 방법을 설명한다.6 illustrates a residual block determination method according to fast inverse-transform according to the floating-point type DCT2 method.

변환 계수 블록(400)의 논제로 변환 계수들의 최적의 부호 조합을 결정하기 위하여, 제1 블록(402), 제2 블록(404), 및 제3 블록(406)의 결과 값(512, 514, 516)의 가중합이 이용될 수 있다. 예를 들어, (1,1,1)의 부호 조합에 대한 잔여 블록은 결과 값(512)의 3배수, 결과 값(514)의 5배수, 결과 값(516)의 7배수를 더함으로써 결정될 수 있다. 그리고 (1,1,1)의 부호 조합에 대한 잔여 블록은 결과 값(512)의 (-3)배수, 결과 값(514)의 5배수, 결과 값(516)의 7배수를 더함으로써 결정될 수 있다. 다른 부호 조합에 대하여 마찬가지 방법으로 잔여 블록이 결정될 수 있다.In order to determine the optimal code combination of the transform coefficients of the transform coefficient block 400, the result values 512, 514, and 514 of the first block 402, the second block 404, and the third block 516) may be used. For example, the residual block for the sign combination of (1,1,1) can be determined by adding a multiple of 3 of the result value 512, a multiple of 5 of the result value 514, and a multiple of 7 of the result value 516. there is. And the residual block for the code combination of (1,1,1) can be determined by adding a multiple of (-3) the result value 512, a multiple of 5 the result value 514, and a multiple of 7 the result value 516. there is. Residual blocks can be determined in the same way for other code combinations.

도 4 내지 6에서 설명되었듯이, 부동소수점 DCT2 방식에 따른 고속 역변환에 의하여, 총 8개의 잔여 블록이 생성될 수 있다. 변환 계수 블록(400)에 인접한 인접 블록의 정보에 기초하여 8개의 잔여 블록에 대한 부호 비트 비용이 결정될 수 있다. 그리고 부호 비트 비용이 가장 작은 잔여 블록에 기초하여, 최적의 부호 조합이 결정된다. 최적의 부호 조합이 변환 계수 블록(400)의 논제로 변환 계수의 실제 부호 조합과 일치하는 경우, 변환 계수 블록(400)에 부호 비트 숨김이 적용되도록 결정된다. 반대로 최적의 부호 조합이 변환 계수 블록(400)의 논제로 변환 계수의 실제 부호 조합과 일치하지 않는 경우, 변환 계수 블록(400)에 부호 비트 숨김이 적용되지 않도록 결정된다. 부호 비트 숨김이 적용되지 않을 경우, 변환 계수 블록(400)의 변환 계수들의 부호는 부호화된다.As described in FIGS. 4 to 6 , a total of 8 residual blocks can be generated by fast inverse transform according to the floating point DCT2 method. Code bit costs for 8 residual blocks may be determined based on information of adjacent blocks adjacent to the transform coefficient block 400 . An optimal code combination is determined based on the residual block having the smallest code bit cost. If the optimal sign combination coincides with the actual sign combination of the transform coefficients as the subject of the transform coefficient block 400, it is determined that sign bit hiding is applied to the transform coefficient block 400. Conversely, if the optimal code combination does not match the actual code combination of the transform coefficients as the topic of the transform coefficient block 400, it is determined that sign bit hiding is not applied to the transform coefficient block 400. When sign bit hiding is not applied, signs of transform coefficients of the transform coefficient block 400 are encoded.

도 7은 변환 계수 블록(700)의 일 예와 정수형 DCT2 방식에 따른 고속 역변환 (Fast Inverse-transform)을 설명한다.7 illustrates an example of a transform coefficient block 700 and fast inverse-transform according to the integer type DCT2 method.

변환 계수 블록 D (700)은 4x4 정수형 DCT-II 행렬 A (710)에 따라 역변환될 수 있다. 구체적으로 변환 계수 블록 D(700)의 역변환 결과는 수학식 ATDA에 의하여 결정될 수 있다.The transform coefficient block D 700 may be inversely transformed according to the 4x4 integer DCT-II matrix A 710 . Specifically, the inverse transform result of the transform coefficient block D 700 may be determined by Equation A T DA.

신속한 역변환을 위하여, 변환 계수 블록 D (700)는 하나의 논제로 변환 계수만을 포함하는 제1 블록(702), 제2 블록(704), 제3 블록(706)의 조합으로 표현될 수 있다. 그리고 제1 블록(702), 제2 블록(704), 제3 블록(706)의 역변환 결과에 따라 변환 계수 블록(700)의 역변환 결과가 신속하게 계산될 수 있다.For fast inverse transformation, the transform coefficient block D 700 can be represented by a combination of a first block 702, a second block 704, and a third block 706 including only one nonzero transform coefficient. In addition, the inverse transform result of the transform coefficient block 700 can be quickly calculated according to the inverse transform results of the first block 702 , the second block 704 , and the third block 706 .

변환 계수 블록(700)은 3개의 논제로 변환 계수를 포함하기 때문에, 2^3 (=8)의 부호 조합이 존재한다. 따라서, 각 부호 조합에 따른 부호 비트 비용이 계산되고, 가장 낮은 부호 비트 비용을 가지는 부호 조합이 최적의 부호 조합으로 결정된다. 정수형 DCT2 방식에 따른 고속 역변환에 따라, 각 부호 조합의 부호 비트 비용이 신속하게 계산될 수 있다.Since the transform coefficient block 700 includes three non-zero transform coefficients, there are 2^3 (= 8) code combinations. Accordingly, the code bit cost according to each code combination is calculated, and the code combination having the lowest code bit cost is determined as the optimal code combination. According to the high-speed inverse transform according to the integer type DCT2 method, the code bit cost of each code combination can be quickly calculated.

도 8 내지 도 10은 제1 블록(702), 제2 블록(704) 및 제3 블록(706)의 제1 잔여 블록(752), 제2 잔여 블록(754) 및 제3 잔여 블록(756)을 결정하기 위한 방법을 설명한다.8 to 10 show the first residual block 752, the second residual block 754, and the third residual block 756 of the first block 702, the second block 704, and the third block 706. Describe how to determine

제1 블록(702)은 AT(712)에 의하여 수직 역변환될 수 있다. 제1 블록(702)의 수직 역변환에 따라, 제1 수직 역변환 블록(722)이 결정된다. 제1 수직 역변환 블록(722)의 변환 계수의 크기는 시프트 연산에 의하여 조정될 수 있다. 따라서 제1 수직 역변환 블록(722)의 시프트 연산에 따라, 제1 중간 블록(732)이 생성될 수 있다. 제1 중간 블록(732)은 A(710)에 의하여 수평 역변환될 수 있다. 제1 중간 블록(732)의 수평 역변환에 따라, 제1 수평 역변환 블록(742)이 결정된다. 제1 수직 역변환 블록(722)과 마찬가지로, 제1 수평 역변환 블록(742)의 변환 계수의 크기는 시프트 연산에 의하여 조정될 수 있다. 따라서 제1 수평 역변환 블록(742)의 시프트 연산에 따라, 제1 잔여 블록(752)이 생성될 수 있다.The first block 702 may be vertically inverse transformed by A T 712 . According to the vertical inverse transform of the first block 702, the first vertical inverse transform block 722 is determined. The size of the transform coefficient of the first vertical inverse transform block 722 may be adjusted by a shift operation. Therefore, according to the shift operation of the first vertical inverse transform block 722, the first intermediate block 732 may be generated. The first intermediate block 732 may be horizontally inversely transformed by A 710 . According to the horizontal inverse transform of the first intermediate block 732, the first horizontal inverse transform block 742 is determined. Similar to the first vertical inverse transform block 722, the size of the transform coefficient of the first horizontal inverse transform block 742 may be adjusted by a shift operation. Therefore, according to the shift operation of the first horizontal inverse transform block 742, the first residual block 752 may be generated.

마찬가지로, 제2 블록(704)은 AT(712)에 의하여 수직 역변환될 수 있다. 제2 블록(704)의 수직 역변환에 따라, 제2 수직 역변환 블록(724)이 결정된다. 제2 수직 역변환 블록(724)의 변환 계수의 크기는 시프트 연산에 의하여 조정될 수 있다. 따라서 제2 수직 역변환 블록(724)의 시프트 연산에 따라, 제2 중간 블록(734)이 생성될 수 있다. 제2 중간 블록(734)은 A(710)에 의하여 수평 역변환될 수 있다. 제2 중간 블록(734)의 수평 역변환에 따라, 제2 수평 역변환 블록(744)이 결정된다. 제2 수직 역변환 블록(724)과 마찬가지로, 제2 수평 역변환 블록(744)의 변환 계수의 크기는 시프트 연산에 의하여 조정될 수 있다. 따라서 제2 수평 역변환 블록(744)의 시프트 연산에 따라, 제2 잔여 블록(754)이 생성될 수 있다.Similarly, the second block 704 may be vertically inverse transformed by A T 712 . According to the vertical inverse transform of the second block 704, the second vertical inverse transform block 724 is determined. The size of the transform coefficient of the second vertical inverse transform block 724 may be adjusted by a shift operation. Accordingly, the second intermediate block 734 may be generated according to the shift operation of the second vertical inverse transform block 724 . The second intermediate block 734 may be horizontally inversely transformed by A 710 . According to the horizontal inverse transform of the second intermediate block 734, the second horizontal inverse transform block 744 is determined. Similar to the second vertical inverse transform block 724, the size of the transform coefficient of the second horizontal inverse transform block 744 may be adjusted by a shift operation. Therefore, according to the shift operation of the second horizontal inverse transform block 744, the second residual block 754 may be generated.

마찬가지로, 제3 블록(706)은 AT(712)에 의하여 수직 역변환될 수 있다. 제3 블록(706)의 수직 역변환에 따라, 제3 수직 역변환 블록(726)이 결정된다. 제3 수직 역변환 블록(726)의 변환 계수의 크기는 시프트 연산에 의하여 조정될 수 있다. 따라서 제3 수직 역변환 블록(726)의 시프트 연산에 따라, 제3 중간 블록(736)이 생성될 수 있다. 제3 중간 블록(736)은 A(710)에 의하여 수평 역변환될 수 있다. 제3 중간 블록(736)의 수평 역변환에 따라, 제3 수평 역변환 블록(746)이 결정된다. 제3 수직 역변환 블록(726)과 마찬가지로, 제3 수평 역변환 블록(746)의 변환 계수의 크기는 시프트 연산에 의하여 조정될 수 있다. 따라서 제3 수평 역변환 블록(746)의 시프트 연산에 따라, 제3 잔여 블록(756)이 생성될 수 있다.Similarly, the third block 706 may be vertically inverse transformed by A T 712 . According to the vertical inverse transform of the third block 706, a third vertical inverse transform block 726 is determined. The size of the transform coefficient of the third vertical inverse transform block 726 may be adjusted by a shift operation. Therefore, according to the shift operation of the third vertical inverse transform block 726, the third intermediate block 736 may be generated. The third intermediate block 736 may be horizontally inverse transformed by A 710 . According to the horizontal inverse transform of the third intermediate block 736, the third horizontal inverse transform block 746 is determined. Similar to the third vertical inverse transform block 726, the size of the transform coefficient of the third horizontal inverse transform block 746 may be adjusted by a shift operation. Therefore, according to the shift operation of the third horizontal inverse transform block 746, the third residual block 756 may be generated.

제1 잔여 블록(752), 제2 잔여 블록(754), 및 제3 잔여 블록(756)을 8개의 부호 조합에 따라 더할 수 있다. 구체적으로, (1,1,1) (1,1,1), (1,1,1), (1,1,1), (1,1,1), (1,1,1), (1,1,1), 및 (1,1,1)의 부호 조합을 제1 잔여 블록(752), 제2 잔여 블록(754), 및 제3 잔여 블록(756)의 합연산에 적용할 수 있다. 예를 들어, (1,1,1)의 부호 조합에 따라, 제1 잔여 블록(752), 제2 잔여 블록(754), 및 제3 잔여 블록(756)의 값이 합산된다. 그리고 합산된 결과에 따라 생성된 잔여 블록에 따른 부호 비트 비용이 계산된다. 나머지 부호 조합에 대하여도 제1 잔여 블록(752), 제2 잔여 블록(754), 및 제3 잔여 블록(756)의 합산 결과에 따른 부호 비트 비용이 계산된다. 최종적으로, 부호 비트 비용이 가장 낮은 부호 조합이 변환 계수 블록의 실제 부호 조합과 일치하는지 여부에 따라, 부호 비트 숨김의 적용 여부가 결정된다.The first residual block 752, the second residual block 754, and the third residual block 756 may be added according to eight code combinations. Specifically, (1,1,1) (1,1,1), (1,1,1), (1,1,1), (1,1,1), (1,1,1), A code combination of (1,1,1) and (1,1,1) is applied to the sum operation of the first residual block 752, the second residual block 754, and the third residual block 756. can For example, according to the code combination of (1,1,1), the values of the first residual block 752, the second residual block 754, and the third residual block 756 are summed. Then, a code bit cost according to the generated residual block is calculated according to the summed result. For the remaining code combinations, a code bit cost according to a summation result of the first residual block 752, the second residual block 754, and the third residual block 756 is calculated. Finally, whether to apply sign bit hiding is determined according to whether the code combination having the lowest sign bit cost matches the actual code combination of the transform coefficient block.

도 7 내지 도 10에서는, 변환 계수 블록(700)의 논제로 변환 계수인 144, -96, 368에 대하여 각각 제1 잔여 블록(752), 제2 잔여 블록(754), 및 제3 잔여 블록(756)이 결정된다. 즉, (1, 1, 1)의 부호 조합이 변환 계수 블록(700)의 실제 부호 조합이다. 그러므로 일 실시 예에 따르면, (1, 1, 1)의 부호 조합에 따른 부호 비트 비용이 다른 부호 조합들에 따른 부호 비트 비용보다 낮은지 여부에 따라 부호 비트 숨김의 적용 여부가 결정될 수 있다.7 to 10, the first residual block 752, the second residual block 754, and the third residual block ( 756) is determined. That is, the code combination of (1, 1, 1) is the actual code combination of the transform coefficient block 700. Therefore, according to an embodiment, whether to apply the code bit hiding may be determined according to whether the cost of the code bit according to the code combination of (1, 1, 1) is lower than the cost of the code bit according to other code combinations.

도 11은 부호 비트 비용을 결정하기 위한 일 실시예를 나타낸다.11 illustrates one embodiment for determining the sign bit cost.

앞서 설명된 고속 역변환 또는 기타 역변환 방법에 따라 결정된 변환 계수 블록의 잔여 블록은 대응되는 예측 블록에 합산된다. 상기 잔여 블록과 상기 예측 블록의 합산에 따라, 복원 블록이 생성된다. 그리고 상기 변환 계수 블록에 대응되는 복원 블록의 샘플들 중에서 좌측 경계 및/또는 상측 경계에 인접한 샘플들과 상기 복원 블록의 인접 블록의 샘플들 간에 연속성에 따라 부호 비트 비용이 결정될 수 있다.Residual blocks of transform coefficient blocks determined according to the above-described fast inverse transform or other inverse transform methods are added to the corresponding prediction blocks. A reconstructed block is generated according to the sum of the residual block and the prediction block. A code bit cost may be determined according to continuity between samples adjacent to a left boundary and/or an upper boundary among samples of a reconstruction block corresponding to the transform coefficient block and samples of an adjacent block of the reconstruction block.

부호 비트 비용을 결정하는 방법의 일 실시예가 이하 수학식 1에 설명된다.One embodiment of a method for determining the sign bit cost is described in Equation 1 below.

[수학식 1][Equation 1]

Figure pat00001
Figure pat00001

상기 수학식1에 기초하여, 변환 계수 블록의 각 부호 조합에 대하여 부호 비트 비용이 계산된다. 그리고 부호 비트 비용에 따른 최적의 부호 조합과 변환 계수 블록의 실제 부호 조합을 비교하여, 변환 계수 블록의 부호 비트 숨김의 적용 여부가 결정될 수 있다.Based on Equation 1 above, a code bit cost is calculated for each code combination of a transform coefficient block. In addition, whether to apply code bit hiding of the transform coefficient block may be determined by comparing the optimal code combination according to the code bit cost with the actual code combination of the transform coefficient block.

상기 수학식1의 α와 β는 임의의 상수이다. 예를 들어, α와 β는 모두 1 일 수 있다. 또는 α와 β는 각각 1 과 2 일 수 있다. α와 β는 현재 블록의 예측 방법에 따라 다르게 결정될 수 있다. 상기 수학식1의 r[x,y]는 복원 블록 (reconstructed block) r의 (x,y) 위치의 샘플 값을 의미한다. 예를 들어, r[1,1]은 복원 블록 r의 (1,1) 위치의 샘플 값을 나타낸다.α and β in Equation 1 are arbitrary constants. For example, both α and β may be 1. Alternatively, α and β may be 1 and 2, respectively. α and β may be determined differently depending on the prediction method of the current block. r[x,y] in Equation 1 means a sample value at the (x,y) position of the reconstructed block r. For example, r[1,1] represents a sample value at position (1,1) of reconstruction block r.

도 11 및 상기 수학식 1에서는 경계로부터 2 샘플 거리만큼 떨어진 샘플들을 기준으로 부호 비트 비용이 계산된다. 그러나 실시 예에 따라, 1 샘플 거리만큼 떨어진 샘플들을 기준으로 부호 비트 비용이 계산될 수 있다. 또는 실시 예에 따라, N 샘플 거리만큼 떨어진 샘플들을 기준으로 부호 비트 비용이 계산될 수 있다. 상기 N은 3 이상이다.11 and Equation 1 above, the sign bit cost is calculated based on samples separated by a distance of 2 samples from the boundary. However, according to embodiments, the sign bit cost may be calculated based on samples separated by a distance of 1 sample. Alternatively, according to an embodiment, the sign bit cost may be calculated based on samples separated by a distance of N samples. Said N is 3 or more.

도 4 내지 도 10에서 3개의 변환 계수의 부호 비트를 숨기는 방법이 설명되었다. 그러나 실시 예에 따라, 2개의 변환 계수의 부호 비트 숨김 여부가 결정될 수 있다. 또는 실시 예에 따라, 4개 이상의 변환 계수의 부호 비트 숨김 여부가 결정될 수 있다.4 to 10, methods for hiding sign bits of three transform coefficients have been described. However, depending on embodiments, it may be determined whether to hide the sign bits of the two transform coefficients. Alternatively, according to embodiments, it may be determined whether to hide sign bits of four or more transform coefficients.

상기 실시 예에서 최적의 부호 조합이 실제 부호 조합이 동일한지 여부에 따라 변환 계수 블록의 부호 비트 숨김의 적용 여부가 결정된다고 설명되었다. 그러나 실시 예에 따라, 최적의 부호 조합과 실제 부호 조합이 상이할 경우에도, 최적의 부호 조합과 실제 부호 조합 간에 복원 오차가 작을 경우, 부호 비트 숨김이 적용될 수 있다.In the above embodiment, it has been explained that whether to apply code bit hiding of the transform coefficient block is determined according to whether the optimal code combination is the same as the actual code combination. However, according to embodiments, code bit hiding may be applied when a restoration error between the optimal code combination and the actual code combination is small even when the optimal code combination is different from the actual code combination.

일 실시 예에 따르면, 부호 비트 비용의 계산 방법은 변환 계수 블록 및 현재 픽처의 특성에 따라 다르게 결정될 수 있다. 예를 들어, 변환 계수 블록에 대응되는 예측 모드에 따라, 부호 비트 비용의 계산 방법이 결정될 수 있다. 또는 변환 계수 블록의 예측 모드와 인접 블록의 예측 모드를 고려하여, 부호 비트 비용의 계산 방법이 결정될 수 있다. 또는 현재 픽처의 픽처 타입에 따라, 부호 비트 비용의 계산 방법이 결정될 수 있다. 구체적으로, 현재 픽처가 인트라 예측만 허용되는 I 픽처인지, 또는 인터 예측이 허용되는 P 픽처 또는 B 픽처인지 여부에 따라, 부호 비트 비용의 계산 방법이 결정될 수 있다. 또는 변환 계수 블록에 적용되는 변환 방식에 따라, 부호 비트 비용의 계산 방법이 결정될 수 있다. 또는 변환 계수 블록에 적용되는 양자화 파라미터에 따라, 부호 비트 비용의 계산 방법이 결정될 수 있다. 또는 변환 계수 블록에 적용되는 인루프 필터의 종류에 따라, 부호 비트 비용의 계산 방법이 결정될 수 있다According to an embodiment, a method for calculating the code bit cost may be determined differently according to characteristics of the transform coefficient block and the current picture. For example, a method for calculating a code bit cost may be determined according to a prediction mode corresponding to a transform coefficient block. Alternatively, a method for calculating the code bit cost may be determined by considering the prediction mode of the transform coefficient block and the prediction mode of the adjacent block. Alternatively, a method for calculating the code bit cost may be determined according to the picture type of the current picture. Specifically, a method for calculating the code bit cost may be determined according to whether the current picture is an I picture allowing only intra prediction, or a P picture or B picture allowing inter prediction. Alternatively, a method for calculating the sign bit cost may be determined according to a transform scheme applied to the transform coefficient block. Alternatively, a method for calculating a code bit cost may be determined according to a quantization parameter applied to a transform coefficient block. Alternatively, the method of calculating the code bit cost may be determined according to the type of in-loop filter applied to the transform coefficient block.

부호 비트 숨김이 적용되는 변환 계수의 위치는 다양한 방식으로 결정될 수 있다. 예를 들어, 스캔 순서상으로 먼저 스캔되는 연속된 논제로 변환 계수들에 대하여 부호 비트 숨김이 적용될 수 있다. 또는 스캔 순서상으로 나중에 스캔되는 연속된 논제로 변환 계수들에 대하여 부호 비트 숨김이 적용될 수 있다.The position of the transform coefficient to which sign bit hiding is applied can be determined in various ways. For example, sign bit hiding may be applied to consecutive nonzero transform coefficients that are scanned first in the scan order. Alternatively, sign bit hiding may be applied to successive nonzero transform coefficients that are scanned later in the scan order.

또는 변환 계수 블록의 좌상측으로부터 멀리 위치한 논제로 변환 계수에 대하여 부호 비트 숨김이 적용될 수 있다. 반대로 변환 계수 블록의 좌상측에 가까이 위치한 논제로 변환 계수에 대하여 부호 비트 숨김이 적용될 수 있다.Alternatively, sign bit hiding may be applied to nonzero transform coefficients located far from the upper left of the transform coefficient block. Conversely, sign bit hiding may be applied to nonzero transform coefficients located close to the upper left of the transform coefficient block.

또는 변환 계수 블록의 변환 계수들 중 소정의 크기보다 작은 변환 계수에 대하여 부호 비트 숨김이 적용될 수 있다. 반대로 변환 계수 블록의 변환 계수들 중 소정의 크기보다 큰 변환 계수에 대하여 부호 비트 숨김이 적용될 수 있다.Alternatively, sign bit hiding may be applied to a transform coefficient smaller than a predetermined size among transform coefficients of the transform coefficient block. Conversely, sign bit hiding may be applied to a transform coefficient larger than a predetermined size among transform coefficients of the transform coefficient block.

또는 스캔 순서상으로 먼저 스캔되는 연속된 변환 계수들 중에서 소정의 크기보다 작은 변환 계수에 대하여 부호 비트 숨김이 적용될 수 있다. 반대로 스캔 순서상으로 나중에 스캔되는 연속된 변환 계수들 중에서 소정의 크기보다 작은 변환 계수에 대하여 부호 비트 숨김이 적용될 수 있다.Alternatively, sign bit hiding may be applied to a transform coefficient smaller than a predetermined size among successive transform coefficients scanned first in the scanning order. Conversely, sign bit hiding may be applied to a transform coefficient smaller than a predetermined size among successive transform coefficients scanned later in the scan order.

도 12는 부호 비트 숨김을 이용하는 비디오 복호화 방법을 설명한다. 12 describes a video decoding method using code bit hiding.

단계 1202에서, 현재 블록의 변환 계수들 중 소정의 변환 계수들의 크기에 대한 변환 계수 크기 정보가 획득된다.In step 1202, transform coefficient size information about the size of predetermined transform coefficients among transform coefficients of the current block is obtained.

일 실시 예에 따르면, 소정의 변환 계수는 현재 블록의 스캔 순서, 변환 계수 크기의 임계 값, 및 변환 계수의 위치 중 적어도 하나에 의하여 결정될 수 있다. 소정의 변환 계수의 개수는 3 이상일 수 있다.According to an embodiment, the predetermined transform coefficient may be determined by at least one of a scan order of a current block, a threshold value of a transform coefficient size, and a position of the transform coefficient. The number of predetermined transform coefficients may be three or more.

단계 1204에서, 현재 블록의 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부를 나타내는 부호 비트 숨김 플래그가 획득된다.In step 1204, a sign bit hiding flag indicating whether sign bit hiding of predetermined transform coefficients of the current block is performed is obtained.

일 실시 예에 따르면, 현재 블록의 부호화 트리 블록, 슬라이스, 타일, 픽처, 시퀀스, 및 비디오 중 하나에 대하여 부호 비트 숨김이 허용되는지 여부를 나타내는 부호 비트 숨김 허용 플래그이 획득될 수 있다. 그리고 부호 비트 숨김 허용 플래그가 부호 비트 숨김이 허용되는지 나타낼 때, 부호 비트 숨김 플래그가 획득될 수 있다.According to an embodiment, a code bit hiding permission flag indicating whether code bit hiding is allowed for one of a coding tree block, a slice, a tile, a picture, a sequence, and a video of a current block may be obtained. And when the sign bit hiding allowed flag indicates whether the sign bit hiding is allowed, the sign bit hiding flag can be obtained.

단계 1206에서, 부호 비트 숨김 플래그가 소정의 변환 계수들의 부호 비트 숨김이 수행됨을 나타낼 경우, 소정의 변환 계수들의 부호에 대한 변환 계수 부호 정보의 획득 없이 소정의 변환 계수들의 부호가 결정된다.In step 1206, when the sign bit hiding flag indicates that sign bit hiding of the predetermined transform coefficients is performed, signs of the predetermined transform coefficients are determined without acquiring transform coefficient sign information about the signs of the predetermined transform coefficients.

일 실시 예에 따르면, 부호 비트 숨김 플래그가 소정의 변환 계수들의 부호 비트 숨김이 수행되지 않음을 나타낼 경우, 소정의 변환 계수들의 부호에 대한 변환 계수 부호 정보가 획득된다. 그리고 변환 계수 부호 정보에 따라 소정의 변환 계수들의 부호가 결정된다.According to an embodiment, when the sign bit hiding flag indicates that sign bit hiding of predetermined transform coefficients is not performed, transform coefficient sign information about the signs of predetermined transform coefficients is obtained. Signs of predetermined transform coefficients are determined according to the transform coefficient sign information.

일 실시 예에 따르면, 소정의 변환 계수들에 대한 부호 조합들 각각에 대한 부호 비트 비용이 결정될 수 있다. 그리고 부호 비트 비용에 따라 최적의 부호 조합이 결정될 수 있다. 또한 최적의 부호 조합에 따라, 소정의 변환 계수의 부호가 결정될 수 있다.According to an embodiment, a code bit cost for each of code combinations of predetermined transform coefficients may be determined. An optimal code combination may be determined according to the code bit cost. In addition, the sign of a predetermined transform coefficient may be determined according to an optimal code combination.

일 실시 예에 따르면, 부호 비트 비용을 결정하기 위하여, 부호 조합에 따른 현재 블록의 잔여 블록이 결정된다. 그리고 잔여 블록으로부터 현재 블록의 복원 블록이 결정된다. 복원 블록과 현재 블록의 인접 블록에 기초하여 부호 조합의 부호 비트 비용이 결정된다.According to an embodiment, in order to determine a code bit cost, a residual block of a current block according to a code combination is determined. Then, a reconstruction block of the current block is determined from the remaining blocks. The code bit cost of the code combination is determined based on the reconstructed block and the adjacent blocks of the current block.

일 실시 예에 따르면, 고속 역변환에 따라, 상기 부호 조합에 따른 상기 현재 블록의 잔여 블록이 결정될 수 있다.According to an embodiment, a residual block of the current block according to the code combination may be determined according to fast inverse transform.

일 실시 예에 따르면, 상기 부호 조합의 부호 비트 비용을 결정하기 위하여, 현재 블록의 좌측 경계에 인접한 복원 블록의 샘플들과 현재 블록의 좌측 인접 블록의 샘플들 간의 유사성 및 현재 블록의 상측 경계에 인접한 복원 블록의 샘플들과 현재 블록의 상측 인접 블록의 샘플들 간의 유사성에 따라, 부호 조합의 부호 비트 비용이 결정될 수 있다.According to an embodiment, in order to determine the code bit cost of the code combination, similarity between samples of a reconstruction block adjacent to the left boundary of the current block and samples of the left adjacent block of the current block and adjacent to the upper boundary of the current block in order to determine the code bit cost of the code combination. A code bit cost of a code combination may be determined according to a similarity between samples of the reconstruction block and samples of an upper adjacent block of the current block.

일 실시 예에 따르면, 현재 블록의 크기, 예측 모드, 변환 모드, 및 양자화 파라미터 중 적어도 하나에 따라, 부호 조합의 부호 비트 비용이 결정될 수 있다.According to an embodiment, a code bit cost of a code combination may be determined according to at least one of a size of a current block, a prediction mode, a transform mode, and a quantization parameter.

일 실시 예에 따르면, 부호 비트 비용이 제일 작은 부호 조합이 최적의 부호 조합으로 결정된다.According to an embodiment, a code combination having the smallest code bit cost is determined as an optimal code combination.

단계 1208에서, 변환 계수 크기 정보에 따른 소정의 변환 계수들의 크기와 상기 결정된 소정의 변환 계수들의 부호에 따라, 상기 소정의 변환 계수가 결정된다.In step 1208, the predetermined transform coefficient is determined according to the magnitudes of predetermined transform coefficients according to the transform coefficient size information and the determined signs of the predetermined transform coefficients.

도 13은 부호 비트 숨김을 이용하는 비디오 부호화 방법을 설명한다. 13 describes a video encoding method using sign bit hiding.

단계 1302에서, 현재 블록의 변환 계수들이 결정된다.In step 1302, transform coefficients of the current block are determined.

단계 1304에서, 현재 블록의 변환 계수들 중 소정의 변환 계수들의 크기에 대한 변환 계수 크기 정보가 부호화된다.In step 1304, transform coefficient magnitude information about the magnitudes of predetermined transform coefficients among transform coefficients of the current block is encoded.

일 실시 예에 따르면, 현재 블록의 스캔 순서, 변환 계수 크기의 임계 값, 및 변환 계수의 위치 중 적어도 하나에 의하여 결정되고, 소정의 변환 계수가 결정될 수 있다. 소정의 변환 계수의 개수는 3 이상일 수 있다.According to an embodiment, a predetermined transform coefficient may be determined based on at least one of a scan order of a current block, a threshold value of a transform coefficient size, and a position of a transform coefficient. The number of predetermined transform coefficients may be three or more.

단계 1306에서, 소정의 변환 계수들의 부호에 대한 부호 비트 숨김이 수행되는지 여부가 결정된다.In step 1306, it is determined whether sign bit hiding is performed for the sign of certain transform coefficients.

일 실시 예에 따르면, 소정의 변환 계수들에 적용가능한 부호 조합들 각각에 대한 부호 비트 비용이 결정될 수 있다. 부호 비트 비용에 따라, 소정의 변환 계수들에 적용가능한 부호 조합들 중 최적의 부호 조합이 결정될 수 있다. 최적의 부호 조합에 따라, 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부가 결정될 수 있다.According to an embodiment, a code bit cost for each of code combinations applicable to predetermined transform coefficients may be determined. According to the code bit cost, an optimal code combination among code combinations applicable to predetermined transform coefficients may be determined. Depending on the optimal code combination, it can be determined whether sign bit hiding of certain transform coefficients is performed.

일 실시 예에 따르면, 부호 조합에 따른 현재 블록의 잔여 블록이 결정된다. 잔여 블록으로부터 현재 블록의 복원 블록이 결정된다. 복원 블록과 현재 블록의 인접 블록에 기초하여 부호 조합의 부호 비트 비용이 결정된다.According to an embodiment, a residual block of the current block is determined according to the code combination. A reconstruction block of the current block is determined from the remaining blocks. The code bit cost of the code combination is determined based on the reconstructed block and the adjacent blocks of the current block.

일 실시 예에 따르면, 고속 역변환에 따라, 부호 조합에 따른 현재 블록의 잔여 블록이 결정될 수 있다.According to an embodiment, a residual block of a current block according to a code combination may be determined according to fast inverse transform.

일 실시 예에 따르면, 현재 블록의 좌측 경계에 인접한 복원 블록의 샘플들과 현재 블록의 좌측 인접 블록의 샘플들 간의 유사성 및 현재 블록의 상측 경계에 인접한 복원 블록의 샘플들과 현재 블록의 상측 인접 블록의 샘플들 간의 유사성에 따라, 부호 조합의 부호 비트 비용이 결정될 수 있다.According to an embodiment, a similarity between samples of a reconstruction block adjacent to a left boundary of the current block and samples of a left adjacent block of the current block and samples of a reconstruction block adjacent to an upper boundary of the current block and an upper adjacent block of the current block Depending on the similarity between the samples of , the sign bit cost of the code combination may be determined.

일 실시 예에 따르면, 현재 블록의 크기, 예측 모드, 변환 모드, 및 양자화 파라미터 중 적어도 하나에 따라, 부호 조합의 부호 비트 비용이 결정될 수 있다.According to an embodiment, a code bit cost of a code combination may be determined according to at least one of a size of a current block, a prediction mode, a transform mode, and a quantization parameter.

일 실시 예에 따르면, 소정의 변환 계수들에 적용가능한 부호 조합들 중 최적의 부호 조합이 소정의 변환 계수들에 적용된 부호 조합과 일치하는지 여부에 따라, 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부가 결정될 수 있다.According to an embodiment, whether code bit hiding of predetermined transform coefficients is performed according to whether an optimal code combination among code combinations applicable to predetermined transform coefficients matches the code combination applied to predetermined transform coefficients. whether can be determined.

단계 1308에서, 소정의 변환 계수들의 부호 비트 정보가 생략되는지 여부를 나타내는 부호 비트 숨김 플래그가 부호화된다.In step 1308, a sign bit hiding flag indicating whether sign bit information of predetermined transform coefficients is omitted is encoded.

일 실시 예에 따르면, 현재 블록의 부호화 트리 블록, 슬라이스, 타일, 픽처, 시퀀스, 및 비디오 중 하나에 대하여 부호 비트 숨김이 허용되는지 여부를 나타내는 부호 비트 숨김 허용 플래그가 부호화될 수 있다. 그리고 단계 1306 및 1308은 부호 비트 숨김 허용 플래그가 부호 비트 숨김이 허용됨을 나타낼 때 수행될 수 있다.According to an embodiment, a code bit hiding permission flag indicating whether code bit hiding is allowed for one of a coding tree block, a slice, a tile, a picture, a sequence, and a video of a current block may be encoded. And steps 1306 and 1308 can be performed when the sign bit hiding allowed flag indicates that the sign bit hiding is allowed.

일 실시 예에 따르면, 상기 비디오 부호화 방법에 따라 비디오 데이터가 부호화된 비트스트림이 생성된다. 그리고 생성된 비트스트림은 비디오 복호화기로 전송되거나, 컴퓨터로 판독가능한 기록매체에 저장될 수 있다. 그리고 비디오 복호화기로 전송된 비트스트림은 상기 비디오 복호화 방법에 따라 복호화될 수 있다.According to an embodiment, a bitstream in which video data is encoded is generated according to the video encoding method. The generated bitstream may be transmitted to a video decoder or stored in a computer-readable recording medium. Also, the bitstream transmitted to the video decoder may be decoded according to the video decoding method.

상술한 실시예들에서, 방법들은 일련의 단계 또는 유닛으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다. In the foregoing embodiments, the methods are described on the basis of a flow chart as a series of steps or units, but the present invention is not limited to the order of steps, and some steps may occur in a different order or concurrently with other steps as described above. can In addition, those skilled in the art will understand that the steps shown in the flow chart are not exclusive, that other steps may be included, or that one or more steps of the flow chart may be deleted without affecting the scope of the present invention. You will understand.

상술한 실시예는 다양한 양태의 예시들을 포함한다. 다양한 양태들을 나타내기 위한 모든 가능한 조합을 기술할 수는 없지만, 해당 기술 분야의 통상의 지식을 가진 자는 다른 조합이 가능함을 인식할 수 있을 것이다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.The foregoing embodiment includes examples of various aspects. It is not possible to describe all possible combinations to represent the various aspects, but those skilled in the art will recognize that other combinations are possible. Accordingly, it is intended that the present invention cover all other substitutions, modifications and variations falling within the scope of the following claims.

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

이상에서 본 발명이 구체적인 구성요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나, 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명이 상기 실시예들에 한정되는 것은 아니며, 본 발명이 속하는 기술분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형을 꾀할 수 있다.Although the present invention has been described above with specific details such as specific components and limited embodiments and drawings, these are only provided to help a more general understanding of the present invention, and the present invention is not limited to the above embodiments. , Those skilled in the art to which the present invention pertains may seek various modifications and variations from these descriptions.

따라서, 본 발명의 사상은 상기 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등하게 또는 등가적으로 변형된 모든 것들은 본 발명의 사상의 범주에 속한다고 할 것이다.Therefore, the spirit of the present invention should not be limited to the above-described embodiments, and not only the claims described later, but also all modifications equivalent or equivalent to these claims belong to the scope of the spirit of the present invention. will do it

Claims (20)

현재 블록의 변환 계수들 중 소정의 변환 계수들의 크기에 대한 변환 계수 크기 정보를 획득하는 단계; 및
상기 현재 블록의 상기 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부를 나타내는 부호 비트 숨김 플래그를 획득하는 단계;
상기 부호 비트 숨김 플래그가 상기 소정의 변환 계수들의 부호 비트 숨김이 수행됨을 나타낼 경우, 상기 소정의 변환 계수들의 부호에 대한 변환 계수 부호 정보의 획득 없이 상기 소정의 변환 계수들의 부호를 결정하는 단계;
상기 변환 계수 크기 정보에 따른 소정의 변환 계수들의 크기와 상기 결정된 소정의 변환 계수들의 부호에 따라, 상기 소정의 변환 계수를 결정하는 단계를 포함하는 비디오 복호화 방법.
obtaining transform coefficient magnitude information about the magnitudes of predetermined transform coefficients among transform coefficients of a current block; and
obtaining a sign bit hiding flag indicating whether sign bit hiding of the predetermined transform coefficients of the current block is performed;
determining signs of the predetermined transform coefficients without obtaining transform coefficient sign information about the signs of the predetermined transform coefficients when the sign bit hiding flag indicates that sign bit hiding of the predetermined transform coefficients is performed;
and determining the predetermined transform coefficients according to magnitudes of predetermined transform coefficients according to the transform coefficient size information and signs of the determined predetermined transform coefficients.
제1항에 있어서,
상기 소정의 변환 계수들의 부호를 결정하는 단계는,
상기 소정의 변환 계수들에 대한 부호 조합들 각각에 대한 부호 비트 비용을 결정하는 단계;
상기 부호 비트 비용에 따라 최적의 부호 조합을 결정하는 단계; 및
상기 최적의 부호 조합에 따라, 상기 소정의 변환 계수의 부호를 결정하는 단계를 포함하는 것을 특징으로 하는 비디오 복호화 방법.
According to claim 1,
Determining the signs of the predetermined transform coefficients,
determining a code bit cost for each of code combinations for the predetermined transform coefficients;
determining an optimal code combination according to the code bit cost; and
and determining a sign of the predetermined transform coefficient according to the optimal code combination.
제2항에 있어서,
상기 소정의 변환 계수들에 대한 상기 부호 조합들 각각에 대한 부호 비트 비용을 결정하는 단계는,
부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정하는 단계;
상기 잔여 블록으로부터 상기 현재 블록의 복원 블록을 결정하는 단계; 및
상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계를 포함하는 것을 특징으로 하는 비디오 복호화 방법.
According to claim 2,
Determining a code bit cost for each of the code combinations for the predetermined transform coefficients,
determining a residual block of the current block according to a code combination;
determining a reconstruction block of the current block from the residual block; and
and determining a code bit cost of the code combination based on the reconstruction block and an adjacent block of the current block.
제3항에 있어서,
상기 부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정하는 단계는,
고속 역변환에 따라, 상기 부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정하는 것을 특징으로 하는 비디오 복호화 방법.
According to claim 3,
Determining the residual block of the current block according to the code combination,
A video decoding method characterized in that determining a residual block of the current block according to the code combination according to fast inverse transform.
제3항에 있어서,
상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계는,
상기 현재 블록의 좌측 경계에 인접한 상기 복원 블록의 샘플들과 상기 현재 블록의 좌측 인접 블록의 샘플들 간의 유사성 및 상기 현재 블록의 상측 경계에 인접한 상기 복원 블록의 샘플들과 상기 현재 블록의 상측 인접 블록의 샘플들 간의 유사성에 따라, 상기 부호 조합의 부호 비트 비용이 결정되는 것을 특징으로 하는 비디오 복호화 방법.
According to claim 3,
Determining the code bit cost of the code combination based on the restored block and adjacent blocks of the current block,
Similarity between samples of the reconstruction block adjacent to the left boundary of the current block and samples of the left adjacent block of the current block and samples of the reconstruction block adjacent to the upper boundary of the current block and the upper adjacent block of the current block A code bit cost of the code combination is determined according to a similarity between samples of .
제3항에 있어서,
상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계는,
상기 현재 블록의 크기, 예측 모드, 변환 모드, 및 양자화 파라미터 중 적어도 하나에 따라, 상기 부호 조합의 부호 비트 비용이 결정되는 것을 특징으로 하는 비디오 복호화 방법.
According to claim 3,
Determining the code bit cost of the code combination based on the restored block and adjacent blocks of the current block,
A code bit cost of the code combination is determined according to at least one of the size of the current block, a prediction mode, a transform mode, and a quantization parameter.
제2항에 있어서,
상기 부호 비트 비용에 따라 최적의 부호 조합을 결정하는 단계는,
부호 비트 비용이 제일 작은 부호 조합이 최적의 부호 조합으로 결정되는 것을 특징으로 하는 비디오 복호화 방법.
According to claim 2,
Determining the optimal code combination according to the code bit cost,
A video decoding method characterized in that a code combination having the lowest code bit cost is determined as an optimal code combination.
제1항에 있어서,
상기 부호 비트 숨김 플래그를 획득하는 단계는,
상기 현재 블록의 부호화 트리 블록, 슬라이스, 타일, 픽처, 시퀀스, 및 비디오 중 하나에 대하여 부호 비트 숨김이 허용되는지 여부를 나타내는 부호 비트 숨김 허용 플래그를 획득하는 단계; 및
상기 부호 비트 숨김 허용 플래그가 상기 부호 비트 숨김이 허용되는지 나타낼 때, 상기 부호 비트 숨김 플래그를 획득하는 단계를 포함하는 것을 특징으로 하는 비디오 복호화 방법.
According to claim 1,
Obtaining the sign bit hiding flag comprises:
obtaining a code bit hiding permission flag indicating whether code bit hiding is allowed for one of the coding tree block, slice, tile, picture, sequence, and video of the current block; and
and acquiring the sign bit hiding flag when the sign bit hiding permission flag indicates whether the sign bit hiding is allowed.
제1항에 있어서,
상기 소정의 변환 계수는,
상기 현재 블록의 스캔 순서, 상기 변환 계수 크기의 임계 값, 및 상기 변환 계수의 위치 중 적어도 하나에 의하여 결정되는 것을 특징으로 하는 비디오 복호화 방법.
According to claim 1,
The predetermined conversion coefficient is,
and a scan order of the current block, a threshold value of the size of the transform coefficient, and a position of the transform coefficient.
제1항에 있어서,
상기 소정의 변환 계수의 개수는 3 이상인 것을 특징으로 하는 비디오 복호화 방법.
According to claim 1,
The video decoding method, characterized in that the number of the predetermined transform coefficients is 3 or more.
현재 블록의 변환 계수들을 결정하는 단계;
상기 현재 블록의 변환 계수들 중 소정의 변환 계수들의 크기에 대한 변환 계수 크기 정보를 부호화하는 단계;
상기 소정의 변환 계수들의 부호에 대한 부호 비트 숨김이 수행되는지 여부를 결정하는 단계; 및
상기 소정의 변환 계수들의 부호 비트 정보가 생략되는지 여부를 나타내는 부호 비트 숨김 플래그를 부호화하는 단계를 포함하는 비디오 부호화 방법.
determining transform coefficients of the current block;
encoding transform coefficient magnitude information about the magnitudes of predetermined transform coefficients among transform coefficients of the current block;
determining whether sign bit hiding is performed for the signs of the predetermined transform coefficients; and
and encoding a sign bit hiding flag indicating whether sign bit information of the predetermined transform coefficients is omitted.
제11항에 있어서,
상기 소정의 변환 계수들의 부호에 대한 부호 비트 숨김이 수행되는지 여부를 결정하는 단계는,
상기 소정의 변환 계수들에 적용가능한 부호 조합들 각각에 대한 부호 비트 비용을 결정하는 단계;
상기 부호 비트 비용에 따라, 상기 소정의 변환 계수들에 적용가능한 부호 조합들 중 최적의 부호 조합을 결정하는 단계; 및
상기 최적의 부호 조합에 따라, 상기 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부를 결정하는 단계를 포함하는 것을 특징으로 하는 비디오 부호화 방법.
According to claim 11,
The step of determining whether sign bit hiding is performed for the signs of the predetermined transform coefficients,
determining a code bit cost for each of code combinations applicable to the predetermined transform coefficients;
determining an optimal code combination among code combinations applicable to the predetermined transform coefficients according to the code bit cost; and
and determining whether code bit hiding of the predetermined transform coefficients is performed according to the optimal code combination.
제12항에 있어서,
상기 소정의 변환 계수들에 대한 상기 부호 조합들 각각에 대한 부호 비트 비용을 결정하는 단계는,
부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정하는 단계;
상기 잔여 블록으로부터 상기 현재 블록의 복원 블록을 결정하는 단계; 및
상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계를 포함하는 것을 특징으로 하는 비디오 부호화 방법.
According to claim 12,
Determining a code bit cost for each of the code combinations for the predetermined transform coefficients,
determining a residual block of the current block according to a code combination;
determining a reconstruction block of the current block from the residual block; and
and determining a code bit cost of the code combination based on the reconstruction block and an adjacent block of the current block.
제13항에 있어서,
상기 부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정하는 단계는,
고속 역변환에 따라, 상기 부호 조합에 따른 상기 현재 블록의 잔여 블록을 결정하는 것을 특징으로 하는 비디오 부호화 방법.
According to claim 13,
Determining the residual block of the current block according to the code combination,
and determining a residual block of the current block according to the code combination according to fast inverse transform.
제13항에 있어서,
상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계는,
상기 현재 블록의 좌측 경계에 인접한 상기 복원 블록의 샘플들과 상기 현재 블록의 좌측 인접 블록의 샘플들 간의 유사성 및 상기 현재 블록의 상측 경계에 인접한 상기 복원 블록의 샘플들과 상기 현재 블록의 상측 인접 블록의 샘플들 간의 유사성에 따라, 상기 부호 조합의 부호 비트 비용이 결정되는 것을 특징으로 하는 비디오 부호화 방법.
According to claim 13,
Determining the code bit cost of the code combination based on the restored block and adjacent blocks of the current block,
Similarity between samples of the reconstruction block adjacent to the left boundary of the current block and samples of the left adjacent block of the current block and samples of the reconstruction block adjacent to the upper boundary of the current block and the upper adjacent block of the current block A code bit cost of the code combination is determined according to a similarity between samples of .
제13항에 있어서,
상기 복원 블록과 상기 현재 블록의 인접 블록에 기초하여 상기 부호 조합의 부호 비트 비용을 결정하는 단계는,
상기 현재 블록의 크기, 예측 모드, 변환 모드, 및 양자화 파라미터 중 적어도 하나에 따라, 상기 부호 조합의 부호 비트 비용이 결정되는 것을 특징으로 하는 비디오 부호화 방법.
According to claim 13,
Determining the code bit cost of the code combination based on the restored block and adjacent blocks of the current block,
and a code bit cost of the code combination is determined according to at least one of the size of the current block, a prediction mode, a transform mode, and a quantization parameter.
제12항에 있어서,
상기 최적의 부호 조합에 따라, 상기 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부를 결정하는 단계는,
상기 소정의 변환 계수들에 적용가능한 부호 조합들 중 상기 최적의 부호 조합이 상기 소정의 변환 계수들에 적용된 부호 조합과 일치하는지 여부에 따라, 상기 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부가 결정되는 것을 특징으로 하는 비디오 부호화 방법.
According to claim 12,
The step of determining whether or not the code bit hiding of the predetermined transform coefficients is performed according to the optimal code combination,
Depending on whether or not the optimal code combination among code combinations applicable to the predetermined transform coefficients matches the code combination applied to the predetermined transform coefficients, whether or not the code bit hiding of the predetermined transform coefficients is performed A video encoding method characterized in that it is determined.
제11항에 있어서,
상기 비디오 부호화 방법은,
상기 현재 블록의 부호화 트리 블록, 슬라이스, 타일, 픽처, 시퀀스, 및 비디오 중 하나에 대하여 부호 비트 숨김이 허용되는지 여부를 나타내는 부호 비트 숨김 허용 플래그를 부호화하는 단계를 더 포함하고,
상기 소정의 변환 계수들의 부호 비트 숨김이 수행되는지 여부를 결정하는 단계, 및 상기 소정의 변환 계수들의 부호 비트 정보가 생략되는지 여부를 나타내는 부호 비트 숨김 플래그를 부호화하는 단계는, 상기 부호 비트 숨김 허용 플래그가 부호 비트 숨김이 허용됨을 나타낼 때 수행되는 것을 특징으로 하는 비디오 부호화 방법.
According to claim 11,
The video encoding method,
Encoding a code bit hiding permission flag indicating whether code bit hiding is allowed for one of the coding tree block, slice, tile, picture, sequence, and video of the current block,
The step of determining whether sign bit hiding of the predetermined transform coefficients is performed, and the step of encoding a sign bit hiding flag indicating whether sign bit information of the predetermined transform coefficients is omitted, the sign bit hiding allow flag A video encoding method characterized in that it is performed when indicates that sign bit hiding is allowed.
제11항에 있어서,
상기 소정의 변환 계수는,
상기 현재 블록의 스캔 순서, 상기 변환 계수 크기의 임계 값, 및 상기 변환 계수의 위치 중 적어도 하나에 의하여 결정되고,
상기 소정의 변환 계수의 개수는 3 이상인 것을 특징으로 하는 비디오 부호화 방법.
According to claim 11,
The predetermined conversion coefficient is,
determined by at least one of a scan order of the current block, a threshold value of the size of the transform coefficient, and a position of the transform coefficient;
The video encoding method, characterized in that the number of the predetermined transform coefficients is 3 or more.
비디오 부호화 방법에 의해 생성된 비트스트림을 저장한 컴퓨터로 판독가능한 기록 매체로서,
상기 비디오 부호화 방법은,
현재 블록의 변환 계수들을 결정하는 단계;
상기 현재 블록의 변환 계수들 중 소정의 변환 계수들의 크기에 대한 변환 계수 크기 정보를 부호화하는 단계;
상기 소정의 변환 계수들의 부호에 대한 부호 비트 숨김이 수행되는지 여부를 결정하는 단계; 및
상기 소정의 변환 계수들의 부호 비트 정보가 생략되는지 여부를 나타내는 부호 비트 숨김 플래그를 부호화하는 단계를 포함하는 것을 특징으로 하는 컴퓨터로 판독가능한 기록 매체.
A computer-readable recording medium storing a bitstream generated by a video encoding method,
The video encoding method,
determining transform coefficients of the current block;
encoding transform coefficient magnitude information about the magnitudes of predetermined transform coefficients among transform coefficients of the current block;
determining whether sign bit hiding is performed for the signs of the predetermined transform coefficients; and
and encoding a sign bit hiding flag indicating whether sign bit information of the predetermined transform coefficients is omitted.
KR1020210086307A 2021-07-01 2021-07-01 Video Encoding And Decoding Method Using Transform Coefficients Sign Bit Hiding KR20230005506A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020210086307A KR20230005506A (en) 2021-07-01 2021-07-01 Video Encoding And Decoding Method Using Transform Coefficients Sign Bit Hiding
PCT/KR2022/008976 WO2023277451A1 (en) 2021-07-01 2022-06-23 Video encoding and decoding method using code bit hiding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210086307A KR20230005506A (en) 2021-07-01 2021-07-01 Video Encoding And Decoding Method Using Transform Coefficients Sign Bit Hiding

Publications (1)

Publication Number Publication Date
KR20230005506A true KR20230005506A (en) 2023-01-10

Family

ID=84893613

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210086307A KR20230005506A (en) 2021-07-01 2021-07-01 Video Encoding And Decoding Method Using Transform Coefficients Sign Bit Hiding

Country Status (1)

Country Link
KR (1) KR20230005506A (en)

Similar Documents

Publication Publication Date Title
KR102402045B1 (en) Video signal processing method and apparatus
KR102365964B1 (en) Video signal processing method and apparatus
KR102383104B1 (en) Method and apparatus for processing a video signal
KR102383107B1 (en) Method and apparatus for processing a video signal
KR102470831B1 (en) Method and apparatus for processing a video signal
US11095892B2 (en) Method and apparatus for processing video signal
KR102424419B1 (en) Method and apparatus for processing a video signal
KR102424418B1 (en) Method and apparatus for processing a video signal
KR102383105B1 (en) Method and apparatus for processing a video signal
KR102061201B1 (en) Methods of transformation based on block information and appratuses using the same
RU2746706C1 (en) Method and device for encoding / decoding of images
KR102471209B1 (en) Method and apparatus for processing a video signal
KR102470832B1 (en) Method and apparatus for processing a video signal
KR102422485B1 (en) Method and apparatus for processing a video signal
AU2019336894A1 (en) Method and device for coding/decoding image using intra prediction
KR102422484B1 (en) Method and apparatus for processing a video signal
US11363280B2 (en) Method and apparatus for encoding/decoding image signal
US11856208B1 (en) Method and apparatus for encoding/decoding image signal
KR20220007541A (en) Encoding information determination method based on Neural Network
KR101743665B1 (en) Method and apparatus for processing a video signal based on intra prediction
KR102389267B1 (en) A method and an apparatus for processing a video signal based on reference between components
KR20210153547A (en) method and apparatus for encoding/decoding a VIDEO SIGNAL, and a recording medium storing a bitstream
KR20210035068A (en) Method and apparatus for processing a video
KR20230005506A (en) Video Encoding And Decoding Method Using Transform Coefficients Sign Bit Hiding
KR20230136347A (en) Video Encoding And Decoding Method Using Sign Bit Hiding