KR20140004018A - The method of encoding and decoding of quantization matrix and the apparatus for using the same - Google Patents

The method of encoding and decoding of quantization matrix and the apparatus for using the same Download PDF

Info

Publication number
KR20140004018A
KR20140004018A KR1020130075276A KR20130075276A KR20140004018A KR 20140004018 A KR20140004018 A KR 20140004018A KR 1020130075276 A KR1020130075276 A KR 1020130075276A KR 20130075276 A KR20130075276 A KR 20130075276A KR 20140004018 A KR20140004018 A KR 20140004018A
Authority
KR
South Korea
Prior art keywords
quantization matrix
quantization
matrix
decoding
encoding
Prior art date
Application number
KR1020130075276A
Other languages
Korean (ko)
Other versions
KR102228577B1 (en
Inventor
임성창
김휘용
이진호
최진수
김진웅
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Publication of KR20140004018A publication Critical patent/KR20140004018A/en
Priority to KR1020210031529A priority Critical patent/KR102349435B1/en
Application granted granted Critical
Publication of KR102228577B1 publication Critical patent/KR102228577B1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23DPLANING; SLOTTING; SHEARING; BROACHING; SAWING; FILING; SCRAPING; LIKE OPERATIONS FOR WORKING METAL BY REMOVING MATERIAL, NOT OTHERWISE PROVIDED FOR
    • B23D45/00Sawing machines or sawing devices with circular saw blades or with friction saw discs
    • B23D45/003Sawing machines or sawing devices with circular saw blades or with friction saw discs for particular purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • H04N19/126Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23DPLANING; SLOTTING; SHEARING; BROACHING; SAWING; FILING; SCRAPING; LIKE OPERATIONS FOR WORKING METAL BY REMOVING MATERIAL, NOT OTHERWISE PROVIDED FOR
    • B23D47/00Sawing machines or sawing devices working with circular saw blades, characterised only by constructional features of particular parts
    • B23D47/12Sawing machines or sawing devices working with circular saw blades, characterised only by constructional features of particular parts of drives for circular saw blades
    • B23D47/126Angle drives
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23DPLANING; SLOTTING; SHEARING; BROACHING; SAWING; FILING; SCRAPING; LIKE OPERATIONS FOR WORKING METAL BY REMOVING MATERIAL, NOT OTHERWISE PROVIDED FOR
    • B23D45/00Sawing machines or sawing devices with circular saw blades or with friction saw discs
    • B23D45/16Hand-held sawing devices with circular saw blades
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23DPLANING; SLOTTING; SHEARING; BROACHING; SAWING; FILING; SCRAPING; LIKE OPERATIONS FOR WORKING METAL BY REMOVING MATERIAL, NOT OTHERWISE PROVIDED FOR
    • B23D47/00Sawing machines or sawing devices working with circular saw blades, characterised only by constructional features of particular parts
    • B23D47/12Sawing machines or sawing devices working with circular saw blades, characterised only by constructional features of particular parts of drives for circular saw blades
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25FCOMBINATION OR MULTI-PURPOSE TOOLS NOT OTHERWISE PROVIDED FOR; DETAILS OR COMPONENTS OF PORTABLE POWER-DRIVEN TOOLS NOT PARTICULARLY RELATED TO THE OPERATIONS PERFORMED AND NOT OTHERWISE PROVIDED FOR
    • B25F5/00Details or components of portable power-driven tools not particularly related to the operations performed and not otherwise provided for
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25FCOMBINATION OR MULTI-PURPOSE TOOLS NOT OTHERWISE PROVIDED FOR; DETAILS OR COMPONENTS OF PORTABLE POWER-DRIVEN TOOLS NOT PARTICULARLY RELATED TO THE OPERATIONS PERFORMED AND NOT OTHERWISE PROVIDED FOR
    • B25F5/00Details or components of portable power-driven tools not particularly related to the operations performed and not otherwise provided for
    • B25F5/001Gearings, speed selectors, clutches or the like specially adapted for rotary tools
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25FCOMBINATION OR MULTI-PURPOSE TOOLS NOT OTHERWISE PROVIDED FOR; DETAILS OR COMPONENTS OF PORTABLE POWER-DRIVEN TOOLS NOT PARTICULARLY RELATED TO THE OPERATIONS PERFORMED AND NOT OTHERWISE PROVIDED FOR
    • B25F5/00Details or components of portable power-driven tools not particularly related to the operations performed and not otherwise provided for
    • B25F5/008Cooling means
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25FCOMBINATION OR MULTI-PURPOSE TOOLS NOT OTHERWISE PROVIDED FOR; DETAILS OR COMPONENTS OF PORTABLE POWER-DRIVEN TOOLS NOT PARTICULARLY RELATED TO THE OPERATIONS PERFORMED AND NOT OTHERWISE PROVIDED FOR
    • B25F5/00Details or components of portable power-driven tools not particularly related to the operations performed and not otherwise provided for
    • B25F5/02Construction of casings, bodies or handles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for 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/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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23DPLANING; SLOTTING; SHEARING; BROACHING; SAWING; FILING; SCRAPING; LIKE OPERATIONS FOR WORKING METAL BY REMOVING MATERIAL, NOT OTHERWISE PROVIDED FOR
    • B23D47/00Sawing machines or sawing devices working with circular saw blades, characterised only by constructional features of particular parts
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B28WORKING CEMENT, CLAY, OR STONE
    • B28DWORKING STONE OR STONE-LIKE MATERIALS
    • B28D1/00Working stone or stone-like materials, e.g. brick, concrete or glass, not provided for elsewhere; Machines, devices, tools therefor
    • B28D1/02Working stone or stone-like materials, e.g. brick, concrete or glass, not provided for elsewhere; Machines, devices, tools therefor by sawing
    • B28D1/04Working stone or stone-like materials, e.g. brick, concrete or glass, not provided for elsewhere; Machines, devices, tools therefor by sawing with circular or cylindrical saw-blades or saw-discs
    • B28D1/045Sawing grooves in walls; sawing stones from rocks; sawing machines movable on the stones to be cut

Landscapes

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

Abstract

The present invention relates to a quantization matrix encoding/decoding method and a device using the same. The quantization matrix encoding/decoding method includes a step of decoding information about the existence of a quantization matrix and information about the use of the quantization matrix, a step of decoding information related to a method for predicting the quantization matrix, a step of decoding a quantization matrix identifier for using a basic matrix and inter-quantization matrix prediction, a step of predicting and decoding a coefficient in the quantization matrix, and a step of recovering the quantization matrix. [Reference numerals] (S400) Step of composing a quantization matrix; (S410) Step of encoding the use and existence of the quantization matrix; (S420) Step of encoding quantization matrix prediction method information; (S430) Step of encoding a quantization matrix identifier for using a basic matrix and prediction between quantization matrixes; (S440) Step of prediction-encoding a coefficient in the quantization matrix

Description

양자화 행렬의 부호화 방법 및 복호화 방법과 이를 이용하는 장치{The method of encoding and decoding of quantization matrix and the apparatus for using the same}The method of encoding and decoding of quantization matrix and the apparatus for using the same

본 발명은 영상 부호화 및 복호화 기술에 관한 것으로서, 더 구체적으로는 양자화 행렬을 부호화/복호화하는 방법 및 장치에 관한 것이다.The present invention relates to an image encoding and decoding technique, and more particularly, to a method and apparatus for encoding / decoding a quantization matrix.

최근 HD(High Definition) 해상도를 가지는 방송 서비스가 국내뿐만 아니라 세계적으로 확대되고 있다. 이에 따라서, 많은 사용자들이 고해상도, 고화질의 영상에 익숙해지고 있으며, 많은 기관들이 차세대 영상기기에 대한 개발에 박차를 가하고 있다. Recently, a broadcast service having a high definition (HD) resolution is expanding not only in Korea but also in the world. Accordingly, many users are getting used to high resolution and high quality video, and many organizations are spurring development of next generation video equipment.

HDTV와 더불어 HDTV의 4배 이상의 해상도를 갖는 UHD(Ultra High Definition)에 대한 관심이 증대되면서 보다 높은 해상도, 고화질의 영상에 대한 압축기술이 요구되고 있다.Along with HDTV, interest in Ultra High Definition (UHD), which has four times the resolution of HDTV, has been increasing, and a compression technology for higher resolution and higher quality images is required.

영상 압축을 위해, 현재 픽처의 픽셀 정보를 예측에 의해 부호화할 수 있다. 예컨대, 시간적으로 이전 및/또는 이후의 픽처로부터 현재 픽처에 포함된 픽셀값을 예측하는 인터(inter) 예측 기술, 현재 픽처 내의 픽셀 정보를 이용하여 현재 픽처에 포함된 픽셀값을 예측하는 인트라(intra) 예측 기술이 적용될 수 있다. For image compression, pixel information of the current picture may be encoded by prediction. For example, an inter prediction technique for predicting a pixel value included in a current picture from a previous and / or subsequent picture in time, and an intra predicting pixel value included in a current picture using pixel information in the current picture. Prediction techniques may be applied.

또한, 출현 빈도가 높은 심볼(symbol)에 짧은 부호를 할당하고 출현 빈도가 낮은 심볼에 긴 부호를 할당하는 엔트로피 부호화 기술을 적용하여, 부호화 효율을 높이고 전송되는 정보량을 줄일 수 있다. In addition, by applying an entropy encoding technique of allocating a short code to a symbol having a high appearance frequency and a long code to a symbol having a low appearance frequency, it is possible to increase the coding efficiency and reduce the amount of transmitted information.

이때, 예측에 의해 생성된 잔차 블록에 대한 변환 계수의 양자화를 더 효과적으로 수행할 방법이 문제된다.At this time, a method of more efficiently performing quantization of transform coefficients for the residual block generated by the prediction is a problem.

발명에서는 부호화 효율 향상, 및 양자화 행렬 예측 자유도 증가를 위해서, 부호화/복호화 시의 양자화 행렬 크기와 동일한 양자화 행렬로부터 양자화 행렬 예측을 수행하는 양자화 행렬 예측 부호화/복호화 방법 및 장치를 제공한다.The present invention provides a quantization matrix prediction encoding / decoding method and apparatus for performing quantization matrix prediction from a quantization matrix having the same quantization matrix size at the time of encoding / decoding in order to improve encoding efficiency and increase the degree of freedom of quantization matrix prediction.

본 발명의 일 실시 형태는 양자화 행렬 사용 및 존재 유무를 복호화하는 단계, 양자화 행렬 예측 방법 정보를 복호화하는 단계, 양자화 행렬 간 예측 및 기본 행렬 사용을 위한 양자화 행렬 식별자를 복호화하는 단계, 양자화 행렬 내 계수를 예측 복호화하는 단계, 양자화 행렬을 복원하는 단계를 포함하고, 상기 양자화 행렬 간 예측 및 기본 행렬 사용을 위한 양자화 행렬 식별자를 복호화하는 단계는 복호화 시의 양자화 행렬 크기와 동일한 양자화 행렬로부터 양자화 행렬 예측을 수행하는 것을 특징으로 하는 양자화 행렬 예측 복호화 방법 및 장치이다.An embodiment of the present invention provides a method for decoding a quantization matrix, the presence or absence of a quantization matrix, decoding information about a quantization matrix prediction method, decoding a quantization matrix identifier for inter-quantization matrix prediction and using a basic matrix, and coefficients within a quantization matrix. And predicting and decoding the quantization matrix, and decoding the quantization matrix identifier for inter-quantization matrix prediction and using the default matrix. A method and apparatus for quantization matrix prediction decoding characterized in that it performs.

본 발명에 의하면, 부호화/복호화 시의 양자화 행렬 크기와 동일한 양자화 행렬로부터 양자화 행렬 예측을 수행하는 양자화 행렬 예측 부호화/복호화 방법 및 장치를 제공하여 부호화 효율 향상 및 양자화 행렬 예측 자유도 증가가 가능하다.According to the present invention, by providing a quantization matrix prediction encoding / decoding method and apparatus for performing quantization matrix prediction from a quantization matrix having the same size as the quantization matrix at the time of encoding / decoding, encoding efficiency and quantization matrix prediction freedom can be increased.

도 1은 본 발명이 적용되는 영상 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 2는 본 발명이 적용되는 영상 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 3은 하나의 유닛이 복수의 하위 유닛으로 분할되는 실시예를 개략적으로 나타내는 개념도이다.
도 4는 본 발명의 실시예에 따른 부호화 동작을 나타낸 개념도이다.
도 5는 기존의 양자화 행렬 예측 부호화/복호화 방법을 나타낸 개념도이다.
도 6은 본 발명의 실시예에 따른 부호화/복호화 시의 양자화 행렬 크기와 동일한 양자화 행렬로부터 양자화 행렬 예측을 수행하는 방법을 나타낸다.
도 7은 본 발명의 실시예에 따른 복호화 방법을 나타낸 순서도이다.
도 8은 본 발명의 실시예에 따른 양자화 행렬의 업샘플링을 나타낸 개념도이다.
도 9는 본 발명의 실시예에 따른 비정방형 변환 계수 블록에 사용하는 양자화 행렬을 생성하는 방법을 나타낸 개념도이다.
1 is a block diagram illustrating a configuration of an image encoding apparatus according to an embodiment of the present invention.
2 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment of the present invention.
3 is a conceptual diagram schematically showing an embodiment in which one unit is divided into a plurality of lower units.
4 is a conceptual diagram illustrating an encoding operation according to an embodiment of the present invention.
5 is a conceptual diagram illustrating a conventional quantization matrix predictive encoding / decoding method.
6 illustrates a method of performing quantization matrix prediction from a quantization matrix having the same quantization matrix size at the time of encoding / decoding according to an embodiment of the present invention.
7 is a flowchart illustrating a decoding method according to an embodiment of the present invention.
8 is a conceptual diagram illustrating upsampling of a quantization matrix according to an embodiment of the present invention.
9 is a conceptual diagram illustrating a method of generating a quantization matrix for use in a non-square transform coefficient block according to an embodiment of the present invention.

이하, 도면을 참조하여 본 발명의 실시예에 대하여 구체적으로 설명한다. 본 명세서의 실시예를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 해당 설명을 생략할 수도 있다.Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In describing the embodiments of the present specification, when it is determined that a detailed description of a related well-known configuration or function may obscure the gist of the present specification, the description may be omitted.

본 명세서에서 어떤 구성 요소가 다른 구성 요소에 “연결되어” 있다거나 “접속되어” 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있는 것을 의미할 수도 있고, 중간에 다른 구성 요소가 존재하는 것을 의미할 수도 있다. 아울러, 본 명세서에서 특정 구성을 “포함”한다고 기술하는 내용은 해당 구성 이외의 구성을 배제하는 것이 아니며, 추가적인 구성이 본 발명의 실시 또는 본 발명의 기술적 사상의 범위에 포함될 수 있음을 의미한다. When an element is referred to herein as being "connected" or "connected" to another element, it may mean directly connected or connected to the other element, Element may be present. In addition, the content of " including " a specific configuration in this specification does not exclude a configuration other than the configuration, and means that additional configurations can be included in the scope of the present invention or the scope of the present invention.

제1, 제2 등의 용어는 다양한 구성들을 설명하는데 사용될 수 있지만, 상기 구성들은 상기 용어에 의해 한정되지 않는다. 상기 용어들은 하나의 구성을 다른 구성으로부터 구별하는 목적으로 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성은 제2 구성으로 명명될 수 있고, 유사하게 제2 구성도 제1 구성으로 명명될 수 있다.The terms first, second, etc. may be used to describe various configurations, but the configurations are not limited by the term. The terms are used to distinguish one configuration from another. For example, without departing from the scope of the present invention, the first configuration may be referred to as the second configuration, and similarly, the second configuration may also be referred to as the first configuration.

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

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

우선, 설명의 편의를 도모하고 발명을 이해를 돕기 위해, 본 명세서에서 사용되는 용어들에 대하여 간략하게 설명한다. First, in order to facilitate the description and to facilitate understanding of the invention, terms used in this specification will be briefly described.

유닛(unit)은 영상 부호화 및 복호화의 단위를 의미한다. 다시 말하면, 영상 부호화/복호화에 있어서 부호화 단위 혹은 복호화 단위라 함은, 하나의 영상을 세분화된 유닛으로 분할하여 부호화 혹은 복호화 할 때 그 분할된 단위를 말한다. 블록(block), 매크로 블록, 부호화 유닛(coding unit) 또는 예측 유닛(prediction unit) 또는 변환 유닛(transform unit) 또는 부호화 블록(coding block) 또는 예측 블록(prediction block) 또는 변환 블록(transform block) 등으로 부를 수 있다. 하나의 유닛은 크기가 더 작은 하위 유닛으로 분할될 수 있다.A unit is a unit of image encoding and decoding. In other words, a coding unit or a decoding unit in image coding / decoding refers to a divided unit when one image is divided into subdivided units and is then encoded or decoded. A block, a macroblock, a coding unit or a prediction unit, a transform unit, a coding block, a prediction block or a transform block, etc. . One unit may be divided into smaller-sized lower units.

변환 유닛(transform unit)은 변환, 역변환, 양자화, 역양자화, 변환 계수 부호화/복호화와 같이 잔차 블록(residual block)의 부호화/복호화를 수행함에 있어 기본 유닛 혹은 단위 유닛이며, 하나의 변환 유닛은 분할되어 크기가 다수의 작은 변환 유닛으로 분할될 수 있다. 또한, 변환 블록과 동일한 의미로 사용될 수 있으며, 휘도와 색차 신호에 대한 변환 블록에 관련된 구문 요소(syntax element)가 포함된 형태를 변환 유닛이라 지칭할 수도 있다.A transform unit is a basic unit or a unit unit for performing coding / decoding of residual blocks such as transform, inverse transform, quantization, inverse quantization, and transform coefficient coding / decoding, and one transform unit is divided So that the size can be divided into a plurality of small conversion units. In addition, it can be used in the same sense as a conversion block, and a form including a syntax element related to a conversion block for luminance and chrominance signals may be referred to as a conversion unit.

양자화 행렬(quantization matrix)은 영상의 주관적 화질 혹은 객관적 화질을 향상시키기 위해서 양자화 혹은 역양자화 과정에서 이용되는 행렬을 의미한다. 양자화 행렬은 스케일링 리스트(scaling list)라고도 불린다. A quantization matrix means a matrix used in a quantization or inverse quantization process to improve the subjective or objective image quality of an image. The quantization matrix is also called a scaling list.

양자화/역양자화에 사용되는 양자화 행렬은 비트스트림(bitstream)으로 전송될 수도 있고, 부호화기 및/혹은 복호화기가 이미 보유한 기본 행렬(default matrix)이 사용될 수도 있다. 전송되는 양자화 행렬의 정보는 시퀀스 파라미터 세트(SPS: sequence parameter set) 또는 픽처 파라미터 세트(PPS: picture parameter set)을 통해 양자화 행렬의 크기 혹은 양자화 행렬이 적용되는 변환 블록 크기 별로 일괄 전송될 수 있다. 예컨대, 예컨대, 4x4 변환 블록을 위한 4x4 양자화 행렬들이 전송되고, 8x8 변환 블록을 위한 8x8 행렬들이 전송되고, 16x16 변환 블록을 위한 16x16 행렬들이 전송되고, 32x32 변환 블록을 위한 32x32 행렬들이 전송될 수 있다.The quantization matrix used for quantization / dequantization may be transmitted in a bitstream, or a default matrix already held by the encoder and / or the decoder may be used. The information of the quantization matrix to be transmitted may be collectively transmitted according to the size of the quantization matrix through a sequence parameter set (SPS) or a picture parameter set (PPS) or the size of a transform block to which a quantization matrix is applied. For example, for example, 4x4 quantization matrices for a 4x4 transform block can be transmitted, 8x8 matrices for an 8x8 transform block, 16x16 matrices for a 16x16 transform block, and 32x32 matrices for a 32x32 transform block can be transmitted. .

현재 블록에 적용되는 양자화 행렬은 (1) 동일한 크기의 양자화 행렬을 복사하여 획득될 수도 있고, (2) 양자화 행렬 내 이전 행렬 계수(matrix coefficient)로부터 예측에 의해 생성될 수도 있다. 동일한 크기의 행렬은 이전에 부호화 혹은 복호화 혹은 사용된 양자화 행렬일 수도 있고, 참조 양자화 행렬일 수도 있으며 기본 양자화 행렬일 수도 있다. 혹은 이전에 부호화 혹은 복호화 혹은 사용된 양자화 행렬, 참조 양자화 행렬, 기본 양자화 행렬 중 적어도 둘을 포함하는 조합으로부터 선택적으로 결정될 수도 있다. The quantization matrix applied to the current block may be obtained by (1) copying a quantization matrix of the same size, or (2) by prediction from a previous matrix coefficient in the quantization matrix. A matrix of the same size may be a previously quantized, decoded, or used quantization matrix, a reference quantization matrix, or a basic quantization matrix. Or a combination including at least two of a quantization matrix, a reference quantization matrix, and a basic quantization matrix which have been previously encoded or decoded or used.

파라미터 세트(parameter set)는 비트스트림 내의 구조 중 헤더 정보에 해당하며, 시퀀스 파라미터 세트, 픽처 파라미터 세트, 적응 파라미터 세트(adaptation parameter set) 등을 통칭하는 의미를 가진다.A parameter set corresponds to header information in a structure in a bitstream, and has a meaning collectively referred to as a sequence parameter set, a picture parameter set, an adaptation parameter set, and the like.

양자화 매개변수(quantization parameter)는 양자화 및 역양자화에서 사용되는 값으로서, 양자화 매개변수는 양자화 스텝 크기(step size)에 매핑된 값일 수 있다.The quantization parameter may be a value used in quantization and inverse quantization, and the quantization parameter may be a value mapped to a quantization step size.

기본 행렬은 부호화기 및/혹은 복호화기에서 미리 정의되어 있는 소정의 양자화 행렬을 의미할 수 있으며, 본 명세서에서 후술될 기본 양자화 행렬은 기본 행렬과 동일한 의미로 사용될 수 있다. 비-기본 행렬(non-default matrix)은 부호화기 및/혹은 복호화기에서 미리 정의되지 않고, 부호화기에서 복호화기로 전송되는 즉, 사용자에 의해서 전송/수신되는 양자화 행렬을 의미할 수 있으며, 본 명세서에서 후술될 비-기본 양자화 행렬은 비-기본 행렬과 동일한 의미로 사용될 수 있다.The base matrix may mean a predetermined quantization matrix predefined in the encoder and / or the decoder, and the base quantization matrix described below may be used in the same meaning as the base matrix. A non-default matrix may mean a quantization matrix that is not defined in the encoder and / or decoder in advance, but is transmitted from the encoder to the decoder, that is, transmitted / received by the user, and will be described later in this specification. The non-base quantization matrix to be used may be used in the same sense as the non-base matrix.

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

도 1을 참조하면, 상기 영상 부호화 장치(100)는 움직임 예측부(111), 움직임 보상부(112), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 부호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조 영상 버퍼(190)를 포함한다. 1, the image encoding apparatus 100 includes a motion prediction unit 111, a motion compensation unit 112, an intra prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, A quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transformation unit 170, an adder 175, a filter unit 180, and a reference image buffer 190.

영상 부호화 장치(100)는 입력 영상에 대해 인트라(intra) 모드 또는 인터(inter) 모드로 부호화를 수행하고 비트스트림을 출력할 수 있다. 인트라 예측은 화면 내 예측, 인터 예측은 화면 간 예측을 의미한다. 인트라 모드인 경우 스위치(115)가 인트라로 전환되고, 인터 모드인 경우 스위치(115)가 인터로 전환될 수 있다. 영상 부호화 장치(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성한 후, 입력 블록과 예측 블록의 차분을 부호화할 수 있다. 이때, 입력 영상은 원 영상(original picture)를 의미할 수 있다.The image encoding apparatus 100 may encode an input image in an intra mode or an inter mode and output a bit stream. Intra prediction is intra prediction, and inter prediction is inter prediction. In the intra mode, the switch 115 is switched to the intra mode, and in the inter mode, the switch 115 can be switched to the inter mode. The image encoding apparatus 100 may generate a prediction block for an input block of the input image, and may then code the difference between the input block and the prediction block. At this time, the input image may mean an original picture.

인트라 모드인 경우, 인트라 예측부(120)는 현재 블록 주변의 이미 부호화된 블록의 픽셀값을 이용하여 공간적 예측을 수행하여 예측 블록을 생성할 수 있다.In the intra mode, the intra prediction unit 120 may generate a prediction block by performing spatial prediction using the pixel value of the already coded block around the current block.

인터 모드인 경우, 움직임 예측부(111)는, 움직임 예측 과정에서 참조 영상 버퍼(190)에 저장되어 있는 참조 영상에서 입력 블록과 가장 매치가 잘 되는 영역을 찾아 움직임 벡터를 구할 수 있다. 움직임 보상부(112)는 움직임 벡터를 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. 여기서, 움직임 벡터는 인터 예측에 사용되는 2차원 벡터이며, 현재 블록과 참조 영상 내 블록 사이의 오프셋을 나타낼 수 있다. In the inter mode, the motion predicting unit 111 may find a motion vector by searching an area of the reference image stored in the reference image buffer 190, which is best matched with the input block, in the motion estimation process. The motion compensation unit 112 may generate a prediction block by performing motion compensation using a motion vector. Here, the motion vector is a two-dimensional vector used for inter prediction, and can represent an offset between a current block and a block in the reference image.

감산기(125)는 입력 블록과 생성된 예측 블록의 차분에 의해 잔차 블록을 생성할 수 있다. 변환부(130)는 잔차 블록에 대해 변환(transform)을 수행하여 변환 계수(transform coefficient)를 출력할 수 있다. 그리고 양자화부(140)는 입력된 변환 계수를 양자화 매개변수와 양자화 행렬 중 적어도 하나를 이용하여 양자화하여 양자화된 계수(quantized coefficient)를 출력할 수 있다. 이때, 양자화 행렬은 부호화기에 입력되어질 수 있으며, 입력되어진 양자화 행렬이 부호화기에서 사용되기로 결정될 수 있다.The subtractor 125 can generate the residual block by the difference between the input block and the generated prediction block. The transforming unit 130 may perform a transform on the residual block to output a transform coefficient. The quantization unit 140 may quantize the input transform coefficient using at least one of a quantization parameter and a quantization matrix to output a quantized coefficient. In this case, the quantization matrix may be input to the encoder, and the input quantization matrix may be determined to be used in the encoder.

엔트로피 부호화부(150)는, 양자화부(140)에서 산출된 값들 또는 부호화 과정에서 산출된 부호화 파라미터 값 등을 기초로 엔트로피 부호화를 수행하여 비트스트림(bit stream)을 출력할 수 있다. 엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(symbol)에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 부호화 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 부호화를 통해서 영상 부호화의 압축 성능이 높아질 수 있다. 엔트로피 부호화부(150)는 엔트로피 부호화를 위해 지수-골롬 코드(Exponential-Golomb Code), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법을 사용할 수 있다. The entropy encoding unit 150 may output a bit stream by performing entropy encoding based on the values calculated by the quantization unit 140 or the encoding parameter values calculated in the encoding process. When entropy encoding is applied, a small number of bits are allocated to a symbol having a high probability of occurrence, and a large number of bits are allocated to a symbol having a low probability of occurrence, thereby expressing symbols, The size of the column can be reduced. Therefore, the compression performance of the image encoding can be enhanced through the entropy encoding. The entropy encoding unit 150 may use an encoding method such as Exponential-Golomb Code, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) for entropy encoding.

도 1의 실시예에 따른 영상 부호화 장치는 인터 예측 부호화, 즉 화면 간 예측 부호화를 수행하므로, 현재 부호화된 영상은 참조 영상으로 사용되기 위해 복호화되어 저장될 필요가 있다. 따라서 양자화된 계수는 역양자화부(160)에서 역양자화되고 역변환부(170)에서 역변환된다. 역양자화 및 역변환된 계수는 복원된 잔차 블록이 되어 가산기(175)를 통해 예측 블록과 더해지고 복원 블록이 생성된다. Since the image encoding apparatus according to the embodiment of FIG. 1 performs inter prediction encoding, that is, inter-view prediction encoding, the currently encoded image needs to be decoded and stored for use as a reference image. Accordingly, the quantized coefficients are inversely quantized in the inverse quantization unit 160 and inversely transformed in the inverse transformation unit 170. The inverse quantized and inverse transformed coefficients become reconstructed residual blocks and added to the prediction block through an adder 175 to generate reconstructed blocks.

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

도 2는 본 발명이 적용되는 영상 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.2 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment of the present invention.

도 2를 참조하면, 상기 영상 복호화 장치(200)는 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 움직임 보상부(250), 가산기(255), 필터부(260) 및 참조 영상 버퍼(270)를 포함한다.2, the image decoding apparatus 200 includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra prediction unit 240, a motion compensation unit 250, an adder 255, a filter unit 260, and a reference image buffer 270.

영상 복호화 장치(200)는 부호화기에서 출력된 비트스트림을 입력 받아 인트라 모드 또는 인터 모드로 복호화를 수행하고 재구성된 영상, 즉 복원 영상을 출력할 수 있다. 인트라 모드인 경우 스위치가 인트라로 전환되고, 인터 모드인 경우 스위치가 인터로 전환될 수 있다. 영상 복호화 장치(200)는 입력 받은 비트스트림으로부터 복원된 잔차 블록(reconstructed residual block)을 얻고 예측 블록을 생성한 후 복원된 잔차 블록과 예측 블록을 더하여 재구성된 블록, 즉 복원 블록을 생성할 수 있다.The video decoding apparatus 200 receives the bit stream output from the encoder and decodes the video stream into the intra mode or the inter mode, and outputs the reconstructed video, that is, the reconstructed video. In the intra mode, the switch is switched to the intra mode, and in the inter mode, the switch can be switched to the inter mode. The image decoding apparatus 200 may obtain a reconstructed residual block from the input bitstream, generate a prediction block, and add the reconstructed residual block and the prediction block to generate a reconstructed block, i.e., a reconstructed block .

엔트로피 복호화부(210)는, 입력된 비트스트림을 확률 분포에 따라 엔트로피 복호화하여, 양자화된 계수(quantized coefficient) 형태의 심볼을 포함한 심볼들을 생성할 수 있다. 엔트로피 복호화 방법은 상술한 엔트로피 부호화 방법과 유사하다.The entropy decoding unit 210 may entropy-decode the input bitstream according to a probability distribution to generate symbols including a symbol of a quantized coefficient type. The entropy decoding method is similar to the entropy encoding method described above.

엔트로피 복호화 방법이 적용되는 경우, 높은 발생 확률을 갖는 심볼에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 각 심볼들에 대한 비트열의 크기가 감소될 수 있다.When the entropy decoding method is applied, a small number of bits are assigned to a symbol having a high probability of occurrence, and a large number of bits are assigned to a symbol having a low probability of occurrence, so that the size of a bit string for each symbol is Can be reduced.

양자화된 계수는 역양자화부(220)에서 양자화 매개변수를 이용해서 역양자화되고 역변환부(230)에서 역변환되며, 양자화된 계수가 역양자화/역변환된 결과, 복원된 잔차 블록이 생성될 수 있다. The quantized coefficients are inversely quantized in the inverse quantization unit 220 using the quantization parameters and inversely transformed in the inverse transformation unit 230. The reconstructed residual blocks can be generated as a result of inverse quantization / inverse transformation of the quantized coefficients.

역양자화에 사용되는 양자화 행렬은 스케일링 리스트라고도 불린다. 역양자화부(220)는 양자화된 계수에 양자화 행렬을 적용하여 역양자화된 계수를 생성할 수 있다. The quantization matrix used for inverse quantization is also called a scaling list. The inverse quantization unit 220 may generate a dequantized coefficient by applying a quantization matrix to the quantized coefficients.

이때 역양자화부(220)는 부호화기에서 적용된 양자화에 대응하여 역양자화를 수행할 수 있다. 예컨대, 역양자화부(220)는 부호화기에서 적용된 양자화 행렬을 양자화된 계수에 역으로 적용하여 역양자화를 수행할 수 있다. In this case, the inverse quantization unit 220 may perform inverse quantization in response to the quantization applied by the encoder. For example, the inverse quantization unit 220 may perform inverse quantization by inversely applying a quantization matrix applied by an encoder to quantized coefficients.

영상 복호화 장치(200)에서 역양자화에 사용되는 양자화 행렬은 비트스트림으로부터 수신될 수도 있고, 부호화기 및/혹은 복호화기가 이미 보유한 기본 행렬이 사용될 수도 있다. 전송되는 양자화 행렬의 정보는 시퀀스 파라미터 세트 또는 픽처 파라미터 세트를 통해 양자화 행렬 크기 혹은 양자화 행렬이 적용되는 변환 블록 크기 별로 일괄 수신될 수 있다. 예컨대, 4x4 변환 블록을 위한 4x4 양자화 행렬들이 수신되고, 8x8 변환 블록을 위한 8x8 행렬들이 수신되고, 16x16 변환 블록을 위한 16x16 행렬들이 수신되고, 32x32 변환 블록을 위한 32x32 행렬들이 수신될 수 있다.The quantization matrix used for inverse quantization in the image decoding apparatus 200 may be received from the bitstream, or a basic matrix already held by the encoder and / or the decoder may be used. The information of the quantization matrix to be transmitted may be collectively received by the quantization matrix size through the sequence parameter set or the picture parameter set or by the conversion block size to which the quantization matrix is applied. For example, 4x4 quantization matrices for a 4x4 transform block may be received, 8x8 matrices for an 8x8 transform block may be received, 16x16 matrices for a 16x16 transform block may be received, and 32x32 matrices for a 32x32 transform block may be received.

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

복원된 잔차 블록과 예측 블록은 가산기(255)를 통해 더해지고, 더해진 블록은 필터부(260)를 거칠 수 있다. 필터부(260)는 디블록킹 필터, SAO, ALF 중 적어도 하나 이상을 복원 블록 또는 복원 픽처에 적용할 수 있다. 필터부(260)는 재구성된 영상, 즉 복원 영상을 출력할 수 있다. 복원 영상은 참조 영상 버퍼(270)에 저장되어 인터 예측에 사용될 수 있다.The reconstructed residual block and the prediction block may be added through the adder 255, and the added block may pass through the filter unit 260. The filter unit 260 may apply at least one of a deblocking filter, SAO, and ALF to a restoration block or a restored picture. The filter unit 260 may output a reconstructed image, that is, a reconstructed image. The reconstructed picture may be stored in the reference picture buffer 270 to be used for inter prediction.

한편, 블록 분할 정보에는 유닛의 깊이(depth)에 관한 정보가 포함될 수 있다. 깊이 정보는 유닛이 분할되는 회수 및/또는 정도를 나타낼 수 있다.Meanwhile, the block division information may include information about a depth of a unit. The depth information may indicate the number and / or the number of times the unit is divided.

도 3은 하나의 유닛이 복수의 하위 유닛으로 분할되는 실시예를 개략적으로 나타내는 개념도이다.3 is a conceptual diagram schematically showing an embodiment in which one unit is divided into a plurality of lower units.

하나의 유닛 혹은 블록은 트리 구조(tree structure)를 기초로 깊이 정보를 가지고 계층적으로 분할될 수 있다. 각각의 분할된 하위 유닛은 깊이 정보를 가질 수 있다. 상기 깊이 정보는 유닛이 분할된 회수 및/또는 정도를 나타내므로, 상기 하위 유닛의 크기에 관한 정보를 포함할 수도 있다.A unit or block can be hierarchically partitioned with depth information based on a tree structure. Each divided subunit may have depth information. The depth information may include information on the size of the lower unit, as the unit indicates the number and / or degree of division.

도 3의 310을 참조하면, 가장 상위 노드는 루트 노드(root node)로 불릴 수 있고, 가장 작은 깊이 값을 가질 수 있다. 이 때, 가장 상위 노드는 레벨 0의 깊이를 가질 수 있으며, 분할되지 않은 최초의 유닛을 나타낼 수 있다. Referring to 310 of FIG. 3, the uppermost node may be referred to as a root node and may have the smallest depth value. At this time, the uppermost node may have a depth of level 0, and may represent the first unpartitioned unit.

레벨 1의 깊이를 갖는 하위 노드는 최초 유닛이 한 번 분할된 유닛을 나타낼 수 있으며, 레벨 2의 깊이를 갖는 하위 노드는 최초의 유닛이 두 번 분할된 유닛을 나타낼 수 있다. 예를 들어, 도 3의 320에서 노드 a에 대응하는 유닛 a는 최초 유닛에서 한 번 분할된 유닛이고, 레벨 1의 깊이를 가질 수 있다.A lower node having a depth of level 1 may represent a unit in which the first unit is divided once and a lower node having a depth of level 2 may represent the unit in which the first unit is divided twice. For example, in FIG. 3, the unit a corresponding to the node a in 320 is a unit that has been divided once in the initial unit and can have a depth of level 1.

레벨 3의 리프 노드(leaf node)는 최초 유닛이 3번 분할된 유닛을 나타낼 수 있다. 예를 들어, 도3의 320에서 노드 d에 대응하는 유닛 d는 최초 유닛에서 세 번 분할된 유닛이고, 레벨 3의 깊이를 가질 수 있다. 따라서, 가장 하위 노드인 레벨 3의 리프 노드는 가장 깊은 깊이를 가질 수 있다.A leaf node of level 3 may indicate a unit in which the first unit is divided three times. For example, the unit d corresponding to the node d in 320 of FIG. 3 may be a unit divided three times in the first unit and may have a depth of level 3. FIG. Thus, the leaf node at level 3, which is the lowest node, may have the deepest depth.

양자화 행렬(quantization matrix)은 영상의 주관적 혹은 객관적 화질을 향상시키기 위해 사용될 수 있다. 부호화기는 양자화(quantization) 과정에서 공간적 주파수(spatial frequency) 별로 다른 값을 이용해서 변환 계수를 양자화할 때 양자화 행렬을 사용할 수 있다. 복호화기에서는 역양자화(dequantization) 과정에서 공간적 주파수 별로 다른 값을 이용해서 변환 계수를 역양자화할 때 양자화 행렬을 사용할 수 있다. The quantization matrix may be used to improve the subjective or objective image quality of the image. The coder may use a quantization matrix when quantizing transform coefficients using different values for each spatial frequency during quantization. The decoder may use a quantization matrix when dequantizing transform coefficients using different values for spatial frequencies during dequantization.

양자화와 역양자화 과정에서 부호화기와 복호화기에서 미리 정의된 기본 행렬(default matrix)을 양자화 행렬로 사용할 수 있다. 또 다른 방법으로 부호화기 및 복호화기에서 개별적으로 정의한 양자화 행렬을 사용할 수도 있다. 이때, 사용자가 정의한 양자화 행렬은 비기본(non-default matrix) 행렬이라고 부를 수 있다. 부호화기는 비기본 행렬을 비트스트림(bitstream)에 부호화하여 복호화기로 전송할 수 있다.In the quantization and inverse quantization processes, a predefined default matrix may be used as a quantization matrix in the encoder and the decoder. Alternatively, a quantization matrix defined separately by the encoder and the decoder may be used. In this case, the user-defined quantization matrix may be referred to as a non-default matrix matrix. The encoder may encode the non-base matrix in a bitstream and transmit it to the decoder.

종래의 양자화 행렬 예측 부호화/복호화 방법 및 장치는 부호화/복호화를 수행시의 양자화 행렬의 크기가 아닌 양자화 및 역양자화 시의 양자화 행렬의 크기를 기반으로 양자화 행렬 복사를 수행하였다. 따라서, 제한된 개수의 양자화 행렬들로부터 양자화 행렬을 복사하므로 양자화 행렬 부호화/복호화 시 부호화 효율 향상에 한계가 있었다.The conventional quantization matrix prediction encoding / decoding method and apparatus perform quantization matrix copy based on the size of the quantization matrix at the time of quantization and inverse quantization rather than the size of the quantization matrix at the time of encoding / decoding. Therefore, since the quantization matrix is copied from a limited number of quantization matrices, there is a limit in improving coding efficiency when encoding / decoding a quantization matrix.

이하에서는 이러한 문제점을 해결하기 위해 부호화/복호화 시의 양자화 행렬 크기와 동일한 양자화 행렬을 기반으로 양자화 행렬을 예측하는 방법에 대해 개시한다.
In order to solve this problem, a method of predicting a quantization matrix based on the same quantization matrix as the size of the quantization matrix at the time of encoding / decoding is disclosed.

도 4는 본 발명의 실시예에 따른 부호화 동작을 나타낸 개념도이다.4 is a conceptual diagram illustrating an encoding operation according to an embodiment of the present invention.

도 4를 참조하면, 양자화 행렬을 결정한다(단계 S400).Referring to FIG. 4, a quantization matrix is determined (step S400).

양자화 행렬을 결정하는 단계에서는 양자화 과정에서 각 변환 계수 블록에 사용할 양자화 행렬을 결정할 수 있다. 부호화기와 복호화기에서 미리 정의된 기본(default) 행렬을 이용해서 양자화 과정에 필요한 양자화 행렬을 결정할 수 있다. 또는 부호화기에서 미리 정의되지 않은 비기본(non-default) 행렬을 기반으로 양자화 과정에 필요한 양자화 행렬을 결정할 수도 있다.In the determining of the quantization matrix, the quantization matrix to be used for each transform coefficient block may be determined in the quantization process. The quantization matrix required for the quantization process may be determined using a predefined default matrix in the encoder and the decoder. Alternatively, the encoder may determine the quantization matrix required for the quantization process based on a non-default matrix that is not predefined.

양자화 행렬은 다양한 변수에 의해 결정될 수 있다. 예를 들어, 양자화 행렬은 변환 계수 블록의 예측 모드(화면내 예측 모드 또는 화면간 예측 모드 등), 색 성분(휘도 또는 색차 등), 블록 크기(4x4, 8x8, 16x16, 32x32, 16x4, 4x16, 32x8, 8x32 등)를 기반으로 결정될 수 있다. The quantization matrix can be determined by various variables. For example, the quantization matrix may include the prediction modes of the transform coefficient block (such as intra prediction mode or inter prediction mode), color components (such as luminance or color difference), block sizes (4x4, 8x8, 16x16, 32x32, 16x4, 4x16, 32x8, 8x32, etc.).

결정된 양자화 행렬이 부화될 시 다양한 포맷을 기반으로 부호화될 수 있다. 예를 들어, 16x16과 32x32 크기에 해당하는 변환 계수 블록의 양자화에 사용할 양자화 행렬은 양자화시 16x16과 32x32 크기의 양자화 행렬이 될 수 있다. 이러한 16x16과 32x32 크기의 양자화 행렬이 부호화시에는 8x8 크기의 양자화 행렬로 표현되어 부호화될 수 있다. 좀 더 구체적으로 16x16 또는 32x32 크기의 양자화 행렬을 기반으로 양자화를 수행하고, 해당 양자화 행렬에 대한 부호화를 수행할 때에는 부호화기에서 서브샘플링(subsampling), 또는 다운샘플링(downsampling) 등을 방법을 기반으로 16x16 또는 32x32 크기의 양자화 행렬을 8x8 크기의 양자화 행렬로 부호화할 수 있다.When the determined quantization matrix is hatched, it may be encoded based on various formats. For example, the quantization matrix to be used for quantization of transform coefficient blocks corresponding to 16x16 and 32x32 sizes may be 16x16 and 32x32 quantization matrices. The 16x16 and 32x32 quantization matrices may be encoded and expressed as 8x8 quantization matrices. More specifically, when the quantization is performed based on a 16x16 or 32x32 quantization matrix, and the encoding of the quantization matrix is performed, the encoder uses subsampling or downsampling based on a 16x16 method. Alternatively, a 32x32 quantization matrix may be encoded into an 8x8 quantization matrix.

또 다른 방법으로 작은 크기의 양자화 행렬을 기반으로 큰 크기의 양자화 행렬을 생성할 수도 있다. 예를 들어, 부호화기에서 8x8 크기의 양자화 행렬을 기반으로 8x8 크기의 양자화 행렬을 업샘플링(upsampling) 또는 인터폴레이션(interpolation) 등을 이용해 16x16 혹은 32x32 크기의 양자화 행렬로 생성하여 양자화 시 사용할 수 있다. 부호화시에는 8x8 크기의 양자화 행렬을 부호화할 수 있다. Alternatively, a large quantization matrix may be generated based on the small quantization matrix. For example, the encoder may generate an 8x8 quantization matrix as a 16x16 or 32x32 quantization matrix using upsampling or interpolation based on an 8x8 quantization matrix and may be used for quantization. In encoding, an 8x8 quantization matrix may be encoded.

표 1은 설정된 양자화 행렬의 일 예를 나타낸다.Table 1 shows an example of the set quantization matrix.

<표 1>TABLE 1

Figure pat00001
Figure pat00001

Figure pat00002
Figure pat00002

표 1을 참조하면, 예측 방법(화면 내 예측인지 화면 간 예측인지 여부), 블록에 포함된 화소의 종류 및 블록의 크기에 따라 서로 다른 행렬을 사용할 수 있다. Referring to Table 1, different matrices may be used according to prediction methods (whether intra prediction or inter prediction), types of pixels included in blocks, and block sizes.

표 1은 하나의 예시로서 다양한 방법에 의해 사용되는 양자화 행렬이 결정될 수 있다. In Table 1, as an example, a quantization matrix used by various methods may be determined.

양자화 행렬 사용 여부 및 양자화 행렬의 존재 여부에 대한 정보를 부호화한다(단계 S410).Information about whether the quantization matrix is used and whether the quantization matrix is present is encoded (step S410).

양자화 행렬 사용 및 존재 유무를 나타내는 정보를 파라미터 세트(parameter set)에 부호화할 수 있다. 파라미터 세트는 예를 들어, 시퀀스 파라미터 세트(sequence parameter set) 또는 픽쳐 파라미터 세트(picture parameter set)일 수 있다.Information indicating the use and existence of a quantization matrix may be encoded in a parameter set. The parameter set may be, for example, a sequence parameter set or a picture parameter set.

아래의 표 2는 시퀀스 파라미터 세트 및 픽쳐 파라미터 세트에 포함되는 양자화 행렬 사용 여부 및 양자화 행렬의 존재 여부에 대한 정보를 나타낸다. Table 2 below shows information about whether a quantization matrix is used and whether a quantization matrix is included in the sequence parameter set and the picture parameter set.

<표 2><Table 2>

Figure pat00003
Figure pat00003

Figure pat00004
Figure pat00004

표 2에서 scaling_list_enable_flag는 양자화 행렬의 사용 유무를 나타내는 정보이고, sps_scaling_list_data_present_flag는 시퀀스 파라미터 내에 양자화 행렬이 존재하는지 여부를 나타내는 정보이다. pps_ scaling_list_data_present_flag는 픽쳐 파라미터 내에 양자화 행렬이 존재하는지 여부를 나타내는 정보이다.In Table 2, scaling_list_enable_flag is information indicating whether a quantization matrix is used or not, and sps_scaling_list_data_present_flag is information indicating whether a quantization matrix exists in a sequence parameter. pps_ scaling_list_data_present_flag is information indicating whether or not a quantization matrix exists in a picture parameter.

표 2의 구문 요소의 예와 같이, 양자화 행렬의 사용 유무를 나타내는 정보인 scaling_list_enable_flag를 시퀀스 파라미터 세트에 부호화할 수 있다. 예를 들어, scaling_list_enable_flag가 0인 경우, 양자화/역양자화 과정에서 양자화 행렬을 사용하지 않음을 지시하고, scaling_list_enable_flag가 1인 경우, 양자화/역양자화 과정에서 양자화 행렬을 사용함을 지시할 수 있다. As in the example of the syntax element of Table 2, scaling_list_enable_flag, that is, information indicating whether a quantization matrix is used or not, can be encoded in a sequence parameter set. For example, when scaling_list_enable_flag is 0, it may indicate that the quantization matrix is not used in the quantization / dequantization process, and when scaling_list_enable_flag is 1, it may indicate that the quantization matrix is used in the quantization / dequantization process.

또한, 양자화 행렬의 시퀀스 파라미터 내 존재 유무를 나타내는 정보인 sps_scaling_list_data_present_flag를 시퀀스 파라미터 세트에 부호화할 수 있다. 예를 들어, sps_scaling_list_data_present_flag 가 0인 경우 시퀀스 파라미터 내에 양자화 행렬이 존재하지 않음을 지시할 수 있고, sps_scaling_list_data_present_flag 가 1인 경우, 시퀀스 파라미터 내에 양자화 행렬이 존재함을 지시할 수 있다. In addition, sps_scaling_list_data_present_flag, that is, information indicating whether a quantization matrix is present in a sequence parameter may be encoded in a sequence parameter set. For example, when sps_scaling_list_data_present_flag is 0, it may indicate that the quantization matrix does not exist in the sequence parameter. When sps_scaling_list_data_present_flag is 1, it may indicate that the quantization matrix exists in the sequence parameter.

또한, 양자화 행렬의 픽쳐 파라미터 내 존재 유무를 나타내는 정보인 pps_scaling_list_data_present_flag 를 픽쳐 파라미터 세트에 부호화할 수 있다. pps_scaling_list_data_present_flag가 0인 경우 픽쳐 파라미터 세트 내에 양자화 행렬이 존재하지 않으므로 시퀀스 파라미터 세트의 양자화 행렬을 참조하도록 지시할 수 있다. pps_scaling_list_data_present_flag가 1 경우 픽쳐 파라미터 내에 양자화 행렬을 존재시켜 시퀀스 파라미터 세트 내의 양자화 행렬을 대체함을 지시할 수 있다. In addition, pps_scaling_list_data_present_flag, that is, information indicating whether a quantization matrix is present in a picture parameter, can be encoded into a picture parameter set. When pps_scaling_list_data_present_flag is 0, since the quantization matrix does not exist in the picture parameter set, it may be indicated to refer to the quantization matrix of the sequence parameter set. If pps_scaling_list_data_present_flag is 1, it may indicate that a quantization matrix exists in the picture parameter to replace the quantization matrix in the sequence parameter set.

표 2에서 개시한 파라미터는 양자화 행렬 사용 및 존재 유무를 지시하기 위한 파라미터의 하나의 예로서 양자화 행렬 사용 및 존재 유무를 지시하기 위해 다른 파라미터가 사용될 수도 있다. The parameter disclosed in Table 2 may be used as another parameter to indicate the use and presence of the quantization matrix as an example of a parameter for indicating the use and presence of the quantization matrix.

양자화 행렬 예측 방법 정보를 부호화한다(단계 S420).Quantization matrix prediction method information is encoded (step S420).

양자화 행렬을 예측하는 방법에 대한 정보를 부호화하기 위해 양자화 행렬의 예측 부호화 방법 종류에 대해 결정하고, 결정된 양자화 행렬의 예측 부호화 방법 정보를 파라미터 세트에 부호화할 수 있다. 파라미터 세트는 예를 들어, 시퀀스 파라미터 혹은 픽쳐 파라미터 세트일 수 있다.In order to encode information on a method of predicting a quantization matrix, the type of predictive encoding method of the quantization matrix may be determined, and the predictive encoding method information of the determined quantization matrix may be encoded in a parameter set. The parameter set may be, for example, a sequence parameter or a picture parameter set.

아래의 표 3은 양자화 행렬 예측 방법 정보를 부호화하는 방법을 나타낸 표이다. Table 3 below shows a method of encoding quantization matrix prediction method information.

<표 3><Table 3>

Figure pat00005

Figure pat00005

표 3에 개시된 scaling_list_pred_mode_flag는 양자화 행렬 예측 방법에 대한 플래그 정보이다. scaling_list_pred_size_matrix_id_delta는 양자화 행렬의 참조 양자화 행렬에 대한 식별자 정보를 포함하는 구문요소일 수 있다.Scaling_list_pred_mode_flag disclosed in Table 3 is flag information on a quantization matrix prediction method. scaling_list_pred_size_matrix_id_delta may be a syntax element including identifier information on a reference quantization matrix of the quantization matrix.

표 3을 참조하면, 양자화 행렬의 예측 부호화 방법 정보인 scaling_list_pred_mode_flag를 파라미터 세트에 부호화할 수 있다. scaling_list_pred_mode_flag가 1인 경우, 양자화 행렬 내 계수를 예측 부호화하기 위해 양자화 행렬을 스캔하여 DPCM(Differential Pulse Code Modulation)과 지수-골롬(Exponential-Golomb) 코드로 부호화한 경우를 지시할 수 있다. scaling_list_pred_mode_flag 가 0인 경우, 양자화 행렬 간 예측을 위해 사용되는 참조 양자화 행렬과 부호화 대상인 양자화 행렬이 동일한 값을 가진 경우 또는 양자화 행렬로 기본 행렬을 사용하는 경우를 지시할 수 있다. 참조 양자화 행렬과 부호화 대상인 양자화 행렬이 동일한 값을 가지도록 결정하는 것은 참조 양자화 행렬의 계수값을 부호화 대상 양자화 행렬 계수값으로 복사하는 양자화 행렬 예측 방법일 수도 있다. scailing_list_pred_size_matrix_id_data에 대해서는 이하에서 추가적으로 기술한다. Referring to Table 3, scaling_list_pred_mode_flag, that is, information on a prediction encoding method of a quantization matrix, may be encoded in a parameter set. When scaling_list_pred_mode_flag is 1, it may indicate a case where the quantization matrix is scanned and coded by DPCM (Differential Pulse Code Modulation) and Exponential-Golomb (code) to predictively encode the coefficients in the quantization matrix. When scaling_list_pred_mode_flag is 0, it may indicate when a reference quantization matrix used for inter-quantization matrix prediction and a quantization matrix to be encoded have the same value or when a base matrix is used as a quantization matrix. Determining that the reference quantization matrix and the quantization matrix to be encoded have the same value may be a quantization matrix prediction method of copying coefficient values of the reference quantization matrix to the quantization matrix coefficient values to be encoded. The scailing_list_pred_size_matrix_id_data will be further described below.

sizeID는 아래의 표 4와 같이 변환 계수 블록의 크기 또는 양자화 행렬 크기를 의미할 수 있고, matrixID 값은 아래의 표 5와 같이 예측 모드(prediction mode) 및 색 성분(color component)을 의미하는 양자화 행렬 종류를 의미할 수 있다.The sizeID may mean the size of the transform coefficient block or the size of the quantization matrix as shown in Table 4 below, and the matrixID value indicates the quantization matrix indicating the prediction mode and the color component as shown in Table 5 below. It can mean kind.

<표 4>TABLE 4

Figure pat00006
Figure pat00006

<표 5><Table 5>

Figure pat00007
Figure pat00007

양자화 행렬 간 예측 및 기본 행렬 사용을 위한 양자화 행렬 식별자를 부호화한다(단계 S430).A quantization matrix identifier for encoding between quantization matrices and using a default matrix is encoded (step S430).

도 5는 기존의 양자화 행렬 예측 부호화/복호화 방법을 나타낸 개념도이다. 5 is a conceptual diagram illustrating a conventional quantization matrix predictive encoding / decoding method.

도 5를 참조하면, 부호화/복호화 시의 양자화 행렬 크기가 아닌 양자화와 역양자화 시의 양자화 행렬 크기를 이용하여 양자화 행렬 복사를 수행한다.Referring to FIG. 5, quantization matrix copy is performed using quantization matrix sizes at quantization and inverse quantization rather than quantization matrix sizes at encoding / decoding.

도 5의 예와 같이, 8x8 화면간 색차 Cb 양자화 행렬(sizeID == 1, matrixID == 5)은 8x8 화면간 색차 Cr 양자화 행렬(sizeID == 1, matrixID == 4)로부터 예측이 가능하지만, 32x32 화면간 휘도 Y 양자화 행렬(sizeID == 3, matrixID == 1) 은 8x8 화면내 휘도 Y 양자화 행렬(sizeID == 1, matrixID == 0)로부터 예측이 불가능하며, 16x16 화면간 색차 Cr 양자화 행렬(sizeID == 2, matrixID == 4)는 8x8 화면내 색차 Cr 양자화 행렬(sizeID == 1, matrixID == 1)로부터 예측이 불가능하다.As in the example of FIG. 5, the 8x8 inter-screen color difference Cb quantization matrix (sizeID == 1, matrixID == 5) can be predicted from the 8x8 inter-screen color difference Cr quantization matrix (sizeID == 1, matrixID == 4). The 32x32 inter-screen luminance Y quantization matrix (sizeID == 3, matrixID == 1) is unpredictable from the 8x8 intra-screen luminance Y quantization matrix (sizeID == 1, matrixID == 0), and the 16x16 inter-screen chroma quantization matrix (sizeID == 2, matrixID == 4) is unpredictable from the color difference Cr quantization matrix (sizeID == 1, matrixID = = 1) in an 8x8 picture.

즉, 양자화와 역양자화 시의 양자화 행렬 크기를 구분하는 sizeID가 서로 다른 양자화 행렬 간에는 예측이 불가능하다. 따라서 종래의 양자화 행렬 예측 부호화/복호화 방법 및 장치는 제한된 개수의 양자화 행렬들로부터 양자화 행렬을 복사하므로 양자화 행렬 복사 자유도의 한계가 있으며, 양자화 행렬 부호화/복호화 시 부호화 효율 향상에 한계가 있다.That is, it is impossible to predict between quantization matrices having different sizeIDs that distinguish quantization matrix sizes in quantization and inverse quantization. Therefore, the conventional quantization matrix predictive encoding / decoding method and apparatus copy the quantization matrix from a limited number of quantization matrices, thereby limiting the quantization matrix copying degree of freedom and limiting the improvement of coding efficiency in quantization matrix encoding / decoding.

아래에서는 기존의 양자화 행렬 예측 부호화 방법 및 장치의 문제점을 해결하기 위해 부호화 시의 양자화 행렬 크기와 동일한 양자화 행렬로부터 양자화 행렬 예측을 수행하는 방법에 대해 개시한다.In order to solve the problems of the conventional quantization matrix prediction encoding method and apparatus, a method of performing quantization matrix prediction from a quantization matrix having the same size as the quantization matrix at the time of encoding will be described.

부호화 시의 크기가 4x4인 양자화 행렬은 양자화/역양자화 시에도 4x4 크기를 가지지만, 부호화 시의 크기가 8x8인 양자화 행렬은 양자화/역양자화 시에 8x8, 16x16 또는 32x32 크기를 가질 수 있다. 따라서, 양자화/역양자화 시에 8x8, 16x16 또는 32x32 크기를 가지는 양자화 행렬들은 부호화 시에는 서로 동일한 8x8 크기를 가지기 때문에 양자화 행렬 간 예측을 수행할 수 있다. 즉, 부호화시 동일한 크기 (8x8)의 양자화 행렬이 전송되지만, 양자화/역양자화시에 서로 다른 크기 (8x8, 16x16, 혹은 32x32)의 양자화 행렬로 유도되는 경우, 부호화시 같은 크기의 양자화 행렬간(부호화 시 8x8 크기간)에만 예측을 허용하고 부호화 시 다른 크기의 양자화 행렬 간(복호화 시 4x4 크기와 8x8 크기 간)의 예측은 허용하지 않을 수 있다.A quantization matrix having a size of 4x4 at the time of encoding has a 4x4 size even at quantization / dequantization, but a quantization matrix having a size of 8x8 at the time of encoding may have a size of 8x8, 16x16, or 32x32 at the time of quantization / dequantization. Accordingly, since quantization matrices having an 8x8, 16x16, or 32x32 size at the time of quantization / dequantization have the same 8x8 size at the time of encoding, prediction between quantization matrices can be performed. That is, when quantization matrices of the same size (8x8) are transmitted during encoding, but are derived with quantization matrices of different sizes (8x8, 16x16, or 32x32) during quantization / dequantization, between quantization matrices of the same size during encoding ( Prediction may only allow prediction between 8x8 sizes, and encoding may not allow prediction between quantization matrices of different sizes (between 4x4 and 8x8 sizes when decoding).

양자화 행렬의 예측 부호화 방법이 양자화 행렬 간 예측을 위해 참조 양자화 행렬과 동일하게 결정하는 방법 혹은 기본 행렬을 사용하는 방법 (scaling_list_pred_mode_flag = 0)이면, 부호화 대상 양자화 행렬의 양자화 행렬 식별자인 scaling_list_pred_size_matrix_id_delta를 파라미터 세트에 부호화할 수 있다. 파라미터 세트는 예를 들어, 시퀀스 파라미터 세트 혹은 픽쳐 파라미터 세트일 수 있다.If the predictive coding method of the quantization matrix is determined to be the same as the reference quantization matrix for prediction between quantization matrices or the method of using the default matrix (scaling_list_pred_mode_flag = 0), scaling_list_pred_size_matrix_id_delta, which is the quantization matrix identifier of the quantization matrix to be encoded, is added to the parameter set. Can be encoded. The parameter set may be, for example, a sequence parameter set or a picture parameter set.

전술한 표 3의 구문 요소를 다시 참조하면, 부호화 대상 양자화 행렬 계수값을 참조 양자화 행렬 계수값과 동일하게 결정한 경우 또는 부호화 대상 양자화 행렬 계수값을 기본 행렬 계수 값과 동일하게 결정한 경우, 부호화 대상 양자화 행렬의 참조 양자화 행렬 식별자인 scaling_list_pred_size_matrix_id_delta 를 파라미터 세트에 부호화할 수 있다. Referring back to the syntax elements of Table 3, when the quantization matrix coefficient values to be encoded are determined to be the same as the reference quantization matrix coefficient values, or when the quantization matrix coefficient values to be encoded are determined to be the same as the basic matrix coefficient values, the encoding object quantization is performed. Scaling_list_pred_size_matrix_id_delta, which is a reference quantization matrix identifier of a matrix, may be encoded in a parameter set.

이때, 부호화 대상 양자화 행렬의 행렬 정보인 matrixID, 참조 양자화 행렬 및 기본 행렬의 행렬 정보인 RefMatrixID, 부호화 대상 양자화 행렬의 크기 정보인 sizeID, 참조 양자화 행렬 및 기본 행렬의 크기 정보인 RefSizeID, 부호화 대상 양자화 행렬의 크기 및 행렬 정보인 Size_Matrix_ID와 아래의 식을 이용해서 양자화 행렬 식별자인 scaling_list_pred_size_matrix_id_delta 를 결정할 수 있다.In this case, matrixID of matrix information of the quantization matrix to be encoded, RefMatrixID of matrix information of the reference quantization matrix and the base matrix, sizeID of size information of the quantization matrix to be encoded, RefSizeID of size information of the reference quantization matrix and the base matrix, and quantization matrix to be encoded The scaling_list_pred_size_matrix_id_delta, which is a quantization matrix identifier, can be determined by using Size_Matrix_ID, which is the size and matrix information of, and the following equation.

<수학식 1>&Quot; (1) &quot;

Figure pat00008
Figure pat00008

이때, RefMap은 표 6의 예와 같이 Size_Matrix_ID와 RefSizeID 및 RefMatrixID 간의 관계를 나타낸 매핑 테이블이다. At this time, RefMap is a mapping table showing the relationship between Size_Matrix_ID, RefSizeID, and RefMatrixID, as in the example of Table 6.

<표 6><Table 6>

Figure pat00009

Figure pat00009

이때, 양자화/역양자화 시의 양자화 행렬의 크기가 다르지만 부호화 시의 양자화 행렬 크기는 동일하기 때문에 부호화시 8x8 크기의 양자화 행렬 종류에 따라 양자화 행렬 식별자는 순차적으로 할당될 수 있다. In this case, since the sizes of the quantization matrices at the time of quantization / dequantization are different, but the sizes of the quantization matrices are the same at the time of encoding, the quantization matrix identifiers may be sequentially assigned according to the type of the quantization matrix having the size of 8x8.

RefMap을 이용한 방법은 부호화시 8x8 크기의 양자화 행렬에 대해서 적용될 수 있고, 부호화시 4x4 크기의 양자화 행렬에 대해서는 적용되지 않을 수 있다. 부호화시 4x4 크기의 양자화 행렬은 아래의 수학식 2를 기반으로 양자화 행렬 식별자인 scaling_list_pred_size_matrix_id_delta를 결정할 수 있다. 즉, 부호화 시의 양자화 행렬 크기에 따라 양자화 행렬 예측 방법이 서로 달라질 수 있으며, 양자화 행렬 식별자 결정 방법도 달라질 수 있다.The RefMap method may be applied to an 8x8 quantization matrix during encoding, and may not be applied to a 4x4 quantization matrix during encoding. In encoding, a 4x4 sized quantization matrix may determine scaling_list_pred_size_matrix_id_delta, which is a quantization matrix identifier, based on Equation 2 below. That is, the quantization matrix prediction method may be different from each other according to the quantization matrix size at the time of encoding, and the quantization matrix identifier determination method may also be different.

<수학식 2>&Quot; (2) &quot;

Figure pat00010
Figure pat00010

부호화시 8x8 크기의 양자화 행렬이며, 부호화 대상 양자화 행렬 계수 값을 부호화기/복호화기에서 미리 정해진 기본 행렬 계수 값과 동일하게 결정한 경우, scaling_list_pred_size_matrix_id_delta의 값을 0으로 부호화하여, RefMatrixID 값과 matrixID 값을 동일하게 하고, RefSizeID 값과 sizeID 값을 동일하게 할 수 있다. 이때, 기본 행렬은 sizeID와 matrixID에 해당하는 기본 행렬을 의미한다.When encoding, it is an 8x8 quantization matrix, and if the encoding target quantization matrix coefficient value is determined to be equal to the predetermined default matrix coefficient value by the encoder / decoder, the scaling_list_pred_size_matrix_id_delta value is encoded as 0, so that the RefMatrixID value and the matrixID value are equal. The RefSizeID value and the sizeID value can be the same. In this case, the default matrix means a default matrix corresponding to sizeID and matrixID.

복호화시 4x4 크기의 양자화 행렬이며, 부호화 대상 양자화 행렬 계수 값을 부호화기/복호화기에서 미리 정해진 기본 행렬 계수 값과 동일하게 결정한 경우, scaling_list_pred_size_matrix_id_delta 값을 0으로 부호화하여, RefMatrixID 값과 matrixID 값을 동일하게 한다. 이때, 기본 행렬은 sizeID와 matrixID에 해당하는 기본 행렬을 의미한다.In decoding, if the quantization matrix is 4x4 in size and the encoding target quantization matrix coefficient value is determined to be equal to the predetermined default matrix coefficient value by the encoder / decoder, scaling_list_pred_size_matrix_id_delta value is encoded as 0 to make RefMatrixID value equal to matrixID value. . In this case, the default matrix means a default matrix corresponding to sizeID and matrixID.

부호화시 8x8 크기의 양자화 행렬이며, 부호화 대상 양자화 행렬 계수 값을 참조 양자화 행렬 계수값과 동일하게 결정한 경우, scaling_list_pred_size_matrix_id_delta의 값을 0이 아닌 값으로 부호화하여, RefMatrixID의 값과 RefSizeID의 값에 해당하는 참조 양자화 행렬로부터 행렬 간 예측을 수행하게 한다. 양자화/역양자화시 행렬 크기가 16x16 또는 32x32일 경우에는 DC 행렬 계수를 포함할 수 있다. 따라서 양자화/역양자화시 행렬 크기가 16x16 또는 32x32인 양자화 행렬로부터 예측시 DC 행렬 계수도 함께 예측할 수 있다.If the quantization matrix is 8x8 in size and the quantization matrix coefficient value to be encoded is determined to be the same as the reference quantization matrix coefficient value, the scaling_list_pred_size_matrix_id_delta value is encoded as a non-zero value so that a reference corresponding to the values of RefMatrixID and RefSizeID is obtained. Enable inter-matrix prediction from quantization matrices. When the matrix size is 16x16 or 32x32 at the time of quantization / dequantization, a DC matrix coefficient may be included. Accordingly, DC matrix coefficients can be predicted together when predicted from a quantization matrix having a matrix size of 16x16 or 32x32 in quantization / dequantization.

부호화시 4x4 크기의 양자화 행렬이며, 부호화 대상 양자화 행렬 계수 값을 참조 양자화 행렬 계수 값과 동일하게 결정한 경우, scaling_list_pred_size_matrix_id_delta 값을 0이 아닌 값으로 부호화하여, RefMatrixID 값에 해당하는 참조 양자화 행렬로부터 행렬 간 예측을 수행하도록 할 수 있다. When encoding is a 4x4 quantization matrix and the quantization matrix coefficient value to be encoded is determined to be the same as the reference quantization matrix coefficient value, the scaling_list_pred_size_matrix_id_delta value is encoded as a non-zero value, and the inter-matrix prediction is performed from the reference quantization matrix corresponding to the RefMatrixID value. Can be done.

또한, 부호화 대상 양자화 행렬의 Size_Matrix_ID보다 더 큰 값을 가지는 양자화 행렬로부터는 행렬 간 예측을 수행하지 못 하게 할 수 있으며, 양자화 행렬 식별자 scaling_list_pred_size_matrix_id_delta는 특정한 값(예를 들어, 0에서 13) 사이의 값을 가지도록 설정할 수 있다. 양자화 행렬 식별자의 최대값이 특정된 경우, 지수-골롬 코드 (Exponential-Golomb code)가 아닌 절삭된 1진 코드 (Truncated Unary)를 이용하여 부호화 효율을 향상시킬 수 있다.In addition, inter-matrix prediction may be prevented from a quantization matrix having a value larger than Size_Matrix_ID of the quantization matrix to be encoded, and the quantization matrix identifier scaling_list_pred_size_matrix_id_delta may be a value between a specific value (for example, 0 to 13). Can be set to have. When the maximum value of the quantization matrix identifier is specified, coding efficiency may be improved by using truncated binary code rather than exponential-gloom code.

만약, 양자화와 역양자화 시의 양자화 행렬 크기를 이용하여 양자화 행렬 복사를 수행할 경우, 양자화와 역양자화 시 4x4, 8x8 또는 16x16 크기를 가지는 양자화 행렬의 양자화 행렬 식별자는 0에서 5 사이의 값을 가지도록 제약할 수 있고, 양자화와 역양자화시 32x32의 크기를 가지는 양자화 행렬의 양자화 행렬 식별자는 0에서 1 사이의 값을 가지도록 제약할 수 있다. 양자화와 역양자화 시의 크기별로 양자화 행렬 식별자의 최대값이 제약되어 있으므로 지수-골롬 코드 (Exponential-Golomb code)가 아닌 절삭된 1진 코드 (Truncated Unary)를 이용하면 부호화 효율을 향상시킬 수 있다.If quantization matrix copy is performed using the quantization matrix size at quantization and inverse quantization, the quantization matrix identifier of the quantization matrix having a size of 4x4, 8x8, or 16x16 at quantization and inverse quantization has a value between 0 and 5. In the case of quantization and dequantization, the quantization matrix identifier of the quantization matrix having a size of 32x32 may be restricted to have a value between 0 and 1. FIG. Since the maximum value of the quantization matrix identifier is limited for each quantization and inverse quantization size, it is possible to improve coding efficiency by using truncated binary code instead of Exponential-Golomb code.

도 6은 본 발명의 실시예에 따른 부호화/복호화 시의 양자화 행렬 크기와 동일한 양자화 행렬로부터 양자화 행렬 예측을 수행하는 방법을 나타낸다. 6 illustrates a method of performing quantization matrix prediction from a quantization matrix having the same quantization matrix size at the time of encoding / decoding according to an embodiment of the present invention.

도 6을 참조하면, 부호화/복호화 시의 양자화 행렬 크기를 이용하여 양자화 행렬 복사를 수행할 수 있다. Referring to FIG. 6, quantization matrix copy may be performed using a quantization matrix size during encoding / decoding.

도 6의 예와 같이, 8x8 화면간 색차 Cb 양자화 행렬(sizeID == 1, matrixID == 5)은 8x8 화면간 색차 Cr 양자화 행렬(sizeID == 1, matrixID == 4) 로부터 예측이 가능하며, 32x32 화면간 휘도 Y 양자화 행렬(sizeID == 3, matrixID == 1) 은 8x8 화면내 휘도 Y 양자화 행렬(sizeID == 1, matrixID == 0)로부터 예측이 가능하며, 16x16 화면간 색차 Cr 양자화 행렬(sizeID == 2, matrixID == 4)는 8x8 화면내 색차 Cr 양자화 행렬(sizeID == 1, matrixID == 1)로부터 예측이 가능하다.As shown in the example of FIG. 6, the 8x8 inter-screen color difference Cb quantization matrix (sizeID == 1, matrixID == 5) can be predicted from the 8x8 inter-screen color difference Cr quantization matrix (sizeID == 1, matrixID == 4), The 32x32 inter-screen luminance Y quantization matrix (sizeID == 3, matrixID == 1) is predictable from the 8x8 intra-screen luminance Y quantization matrix (sizeID == 1, matrixID == 0), and the 16x16 inter-screen chroma quantization matrix (sizeID == 2, matrixID == 4) can be predicted from the color difference Cr quantization matrix (sizeID == 1, matrixID = = 1) in the 8x8 picture.

즉, 양자화와 역양자화 시의 양자화 행렬 크기를 구분하는 sizeID가 서로 다르지만 부호화/복호화 시의 양자화 행렬 크기가 동일한 경우에는 양자화 행렬 간 예측이 가능하다. That is, when the sizeIDs distinguishing the quantization matrix sizes in quantization and inverse quantization are different from each other, but the quantization matrix sizes in encoding / decoding are the same, prediction between quantization matrices is possible.

따라서 부호화/복호화 시의 양자화 행렬 크기와 동일한 양자화 행렬로부터 양자화 행렬 예측을 수행하는 방법을 기반으로 부호화/복호화 시의 양자화 행렬 크기와 동일한 양자화 행렬로부터 양자화 행렬 예측이 가능하기 때문에 부호화 효율 향상 및 양자화 행렬 예측 자유도 증가가 가능하다.Therefore, based on a method of performing quantization matrix prediction from a quantization matrix equal to the size of the quantization matrix at the time of encoding / decoding, quantization matrix prediction is possible from the quantization matrix having the same size as the size of the quantization matrix at the time of encoding / decoding. Prediction freedom can be increased.

양자화 행렬 내 계수를 예측 부호화한다(단계 S440).The coefficients in the quantization matrix are predictively coded (step S440).

양자화 행렬의 예측 부호화 방법이 양자화 행렬 내 계수를 예측 부호화하기 위해 스캔과 DPCM과 지수-골롬 코드로 부호화하는 방법 (scaling_list_pred_mode_flag = 1)이면, 양자화 행렬 내에서 이전에 부호화된 양자화 행렬 계수 값과 부호화 대상 양자화 행렬 계수 값의 차분 값을 파라미터 세트에 부호화할 수 있다. 파라미터 세트는 예를 들어, 시퀀스 파라미터 세트 혹은 픽쳐 파라미터 세트일 수 있다.If the predictive coding method of a quantization matrix is a method of encoding with scan, DPCM, and exponential-Golomb code for predictive coding of coefficients in the quantization matrix (scaling_list_pred_mode_flag = 1), the quantization matrix coefficient values previously encoded in the quantization matrix and the encoding target The difference value of the quantization matrix coefficient values may be encoded in the parameter set. The parameter set may be, for example, a sequence parameter set or a picture parameter set.

표 7은 양자화 행렬에서 DC 계수를 부호화하는 방법을 나타낸다. Table 7 shows a method of encoding DC coefficients in a quantization matrix.

<표 7><Table 7>

Figure pat00011

Figure pat00011

표 7의 구문 요소 예와 같이, 부호화 대상 양자화 행렬의 크기가 16x16(sizeID=2) 또는 32x32(sizeID=3)일 경우, DC 행렬 계수인 scaling_list_dc_coef_minus8를 파라미터 세트에 부호화할 수 있다. scaling_list_dc_coef_minus8 의 값은 -8~247 사이의 값으로 한정될 수 있으며, -8~247 사이의 값으로 부호를 가진 지수-골롬 코드 (Signed Exponental-Golomb code)를 이용해서 부호화할 수 있다.As in the syntax element example of Table 7, when the size of the quantization matrix to be encoded is 16x16 (sizeID = 2) or 32x32 (sizeID = 3), scaling_list_dc_coef_minus8, which is a DC matrix coefficient, may be encoded in the parameter set. The value of scaling_list_dc_coef_minus8 can be limited to a value between -8 and 247, and can be encoded using a signed exponent-Golomb code with a value between -8 and 247.

표 7의 구문 요소의 예와 같이, 양자화 행렬 내에서 이전에 부호화된 양자화 행렬 계수값과 부호화 대상 양자화 행렬 계수값의 차분값인 scaling_list_delta_coef를 파라미터 세트에 부호화할 수 있다. 이때, scaling_list_delta_coef는 4x4 크기의 양자화 행렬을 부호화할 때는 4x4 양자화 행렬 내 계수들의 개수인 총 16개를 부호화하며, 8x8 크기 이상의 변환 계수 블록에 사용하는 양자화 행렬을 부호화할 때는 8x8 양자화 행렬 내 계수들의 개수인 총 64개를 부호화할 수 있다. As in the example of the syntax element of Table 7, scaling_list_delta_coef, which is a difference value between the quantization matrix coefficient value previously encoded and the encoding target quantization matrix coefficient value in the quantization matrix, may be encoded in the parameter set. In this case, scaling_list_delta_coef encodes a total of 16 coefficients, which are the number of coefficients in the 4x4 quantization matrix, when encoding a 4x4 quantization matrix, and the number of coefficients in the 8x8 quantization matrix, when encoding a quantization matrix used for transform coefficient blocks larger than 8x8. A total of 64 can be encoded.

첫번째 과정으로, 2차원 양자화 행렬 내의 계수들에 대해서 1차원 형태의 계수 배열로 정렬하기 위한 스캔을 수행할 수 있다. In a first process, a scan may be performed to align coefficients in a one-dimensional form with respect to coefficients in a two-dimensional quantization matrix.

두 번째 과정으로, 상기 스캔 방법에 의해서 부호화 대상 양자화 행렬 계수를 1차원 형태의 계수 배열 내에서 이전 순서 상에 위치하는 양자화 행렬 계수와의 차분 값인 scaling_list_delta_coef 을 생성할 수 있다. 이때, 차분 값은 DPCM을 이용해서 계산된 값일 수 있으며, 이전 순서상에 위치하는 양자화 행렬 계수는 부호화 대상 양자화 행렬 계수의 바로 이전에 존재하는 계수일 수 있다. 또한, 1차원 형태의 계수 배열 내의 첫번째 계수는 예측 대상이 되는 이전 순서 상에 위치하는 양자화 행렬 계수가 없으므로, 소정의 상수 값을 이용해서 차분 값을 생성할 수 있고, sizeID가 1보다 클 경우에는 DC 행렬 계수을 이용해서 차분 값을 생성할 수 있다. 이때, 소정의 상수 값은 1~255 사이의 값일 수 있으며, 특히 8 혹은 16일 수 있다.In a second process, scaling_list_delta_coef, which is a difference value between quantization matrix coefficients positioned in a previous order in a coefficient array having a one-dimensional form, may be generated by the scanning method. In this case, the difference value may be a value calculated by using the DPCM, and the quantization matrix coefficients positioned in the previous order may be coefficients immediately before the encoding quantization matrix coefficients. In addition, since the first coefficient in the one-dimensional coefficient array has no quantization matrix coefficients positioned in the previous order to be predicted, a difference value can be generated using a predetermined constant value, and when sizeID is larger than 1, The difference value can be generated using the DC matrix coefficients. In this case, the predetermined constant value may be a value between 1 and 255, in particular 8 or 16.

세번째 과정으로, 상기 계산된 차분 값인 scaling_list_delta_coef을 지수-골롬 코드 (Exponential-Golomb code)로 부호화한다. 이때, 차분 값은 부호(sign) 정보를 가지므로 부호를 가진 지수-골롬 코드 (Signed Exponental-Golomb code)로 부호화될 수 있다. scaling_list_delta_coef의 값은 -254~254 사이의 값으로 한정될 수 있으며, -254~254 범위 사이의 값으로 부호화될 수 있다.
In a third process, scaling_list_delta_coef, the calculated difference value, is encoded with an exponential-Golomb code. In this case, since the difference value has sign information, it may be encoded with a signed Exponental-Golomb code. The value of scaling_list_delta_coef may be limited to a value between -254 and 254, and may be encoded with a value between -254 and 254.

도 7은 본 발명의 실시예에 따른 복호화 방법을 나타낸 순서도이다. 7 is a flowchart illustrating a decoding method according to an embodiment of the present invention.

도 7을 참조하면, 양자화 행렬 사용 및 존재 유무를 복호화한다(단계 S700).Referring to FIG. 7, the use and presence of a quantization matrix are decoded (step S700).

양자화 행렬 사용 및 존재 유무를 복호화하는 단계에서는 비트스트림 내 양자화 행렬 사용 및 존재 유무를 나타내는 정보를 파라미터 세트에서 복호화할 수 있다. 이때, 파라미터 세트는 시퀀스 파라미터 세트 혹은 픽쳐 파라미터 세트일 수 있다.In the decoding of the use and presence of the quantization matrix, information indicating the use and presence of the quantization matrix in the bitstream may be decoded in the parameter set. In this case, the parameter set may be a sequence parameter set or a picture parameter set.

표 2의 구문 요소의 예와 같이, 양자화 행렬의 사용 유무를 나타내는 정보인 scaling_list_enable_flag를 시퀀스 파라미터 세트에서 복호화할 수 있다. 이때, scaling_list_enable_flag가 0이면 역양자화 과정에서 양자화 행렬을 사용하지 않고, scaling_list_enable_flag가 1이면 역양자화 과정에서 양자화 행렬을 사용할 수 있다. As in the example of the syntax element of Table 2, scaling_list_enable_flag, that is, information indicating whether a quantization matrix is used, can be decoded in a sequence parameter set. In this case, when scaling_list_enable_flag is 0, the quantization matrix is not used in the dequantization process, and when scaling_list_enable_flag is 1, the quantization matrix can be used in the dequantization process.

표 2의 구문 요소의 예와 같이, 양자화 행렬의 시퀀스 파라미터 내 존재 유무를 나타내는 정보인 sps_scaling_list_data_present_flag를 시퀀스 파라미터 세트에서 복호화할 수 있다. 이때, sps_scaling_list_data_present_flag가 0이면 시퀀스 파라미터 내에 양자화 행렬이 존재하지 않고, sps_scaling_list_data_present_flag가 1이면 시퀀스 파라미터 내에 양자화 행렬이 존재할 수 있다. As in the syntax element of Table 2, sps_scaling_list_data_present_flag, that is, information indicating whether a quantization matrix is present in a sequence parameter, can be decoded in a sequence parameter set. At this time, if sps_scaling_list_data_present_flag is 0, the quantization matrix does not exist in the sequence parameter. If sps_scaling_list_data_present_flag is 1, the quantization matrix may exist in the sequence parameter.

표 2의 구문 요소 예와 같이, 양자화 행렬의 픽쳐 파라미터 내 존재 유무를 나타내는 정보인 pps_scaling_list_data_present_flag 를 픽쳐 파라미터 세트에서 복호화할 수 있다. 이때, pps_scaling_list_data_present_flag가 0이면 픽쳐 파라미터 세트 내에 양자화 행렬이 존재하지 않으며 시퀀스 파라미터 세트의 양자화 행렬을 참조하고, pps_scaling_list_data_present_flag가 1이면 픽쳐 파라미터 내에 양자화 행렬이 존재하며 픽쳐 파라미터 내의 양자화 행렬로 시퀀스 파라미터 세트 내의 양자화 행렬을 대체할 수 있다. As in the syntax element example of Table 2, pps_scaling_list_data_present_flag, that is, information indicating whether a quantization matrix is present in a picture parameter, can be decoded in a picture parameter set. In this case, if pps_scaling_list_data_present_flag is 0, there is no quantization matrix in the picture parameter set, and if the pps_scaling_list_data_present_flag is 1, quantization matrix exists in the picture parameter and quantization matrix in the sequence parameter set is the quantization matrix in the picture parameter. Can be substituted.

양자화 행렬 예측 방법 정보를 복호화한다(단계 S710).Quantization matrix prediction method information is decoded (step S710).

양자화 행렬의 예측 복호화 방법 정보를 파라미터 세트에서 복호화하여 양자화 행렬의 예측 복호화 방법 종류에 대해 결정할 수 있다. 파라미터 세트는 예를 들어, 시퀀스 파라미터 세트 또는 픽쳐 파라미터 세트일 수 있다.The predictive decoding method information of the quantization matrix may be decoded in a parameter set to determine the type of the predictive decoding method of the quantization matrix. The parameter set may be, for example, a sequence parameter set or a picture parameter set.

표 3의 구문 요소 예와 같이, 양자화 행렬의 예측 복호화 방법 정보인 scaling_list_pred_mode_flag를 파라미터 세트에서 복호화할 수 있다. 이때, scaling_list_pred_mode_flag가 1이면 양자화 행렬 내 계수를 예측 복호화하기 위해 양자화 행렬 계수를 지수-골롬(Exponential-Golomb) 코드와 역 DPCM (Inverse Differential Pulse Code Modulation)과 스캔을 이용하여 복호화할 수 있다. scaling_list_pred_mode_flag가 0이면 양자화 행렬 간 예측을 위해 복호화 대상 양자화 행렬 계수 값을 참조 양자화 행렬 계수 값과 동일한 값을 가지도록 결정하거나 또는 복호화 대상 양자화 행렬 계수 값을 기본 행렬 계수 값과 동일하게 결정할 수 있다. 이때, 동일한 값을 가지도록 결정하는 것은 특정 양자화 행렬 계수값을 복호화 대상 양자화 행렬 계수 값으로 복사하는 양자화 행렬 예측 방법을 의미할 수 있다.As in the syntax element example of Table 3, scaling_list_pred_mode_flag, that is, information on a prediction decoding method of a quantization matrix, may be decoded in a parameter set. In this case, when scaling_list_pred_mode_flag is 1, the quantization matrix coefficients may be decoded using an exponential-Golomb code, an inverse differential pulse code modulation (DPCM), and a scan to predict and decode the coefficients in the quantization matrix. If scaling_list_pred_mode_flag is 0, the decoding target quantization matrix coefficient value may be determined to have the same value as the reference quantization matrix coefficient value or the decoding target quantization matrix coefficient value may be determined to be equal to the default matrix coefficient value for inter-quantization prediction. In this case, determining to have the same value may mean a quantization matrix prediction method of copying a specific quantization matrix coefficient value to a decoding target quantization matrix coefficient value.

양자화 행렬 간 예측 및 기본 행렬 사용을 위한 양자화 행렬 식별자를 복호화한다(단계 S720).A quantization matrix identifier for decoding between quantization matrices and using a default matrix is decoded (step S720).

기존의 양자화 행렬 예측 복호화 방법 및 장치의 문제점을 해결하기 위해 복호화 시의 양자화 행렬 크기와 동일한 양자화 행렬로부터 양자화 행렬 예측을 수행할 수 있다. In order to solve the problems of the conventional quantization matrix prediction decoding method and apparatus, quantization matrix prediction may be performed from a quantization matrix having the same size as the quantization matrix during decoding.

복호화 시의 크기가 4x4인 양자화 행렬은 역양자화시에도 4x4 크기를 가지지만, 복호화 시의 크기가 8x8인 양자화 행렬은 역양자화시에 8x8, 16x16, 또는 32x32 크기를 가질 수 있다. 따라서, 역양자화시에 8x8, 16x16, 또는 32x32 크기를 가지는 양자화 행렬들은 복호화시에는 서로 동일한 8x8 크기를 가지기 때문에 양자화 행렬간 예측을 수행할 수 있다. 즉, 동일한 크기 (8x8)의 양자화 행렬이 복호화되지만, 양자화/역양자화시에 서로 다른 크기 (8x8, 16x16 또는 32x32)의 양자화 행렬로 유도되는 경우, 복호화시 같은 크기의 양자화 행렬간(복호화시 8x8 크기간)에만 예측을 허용하고 복호화시 다른 크기의 양자화 행렬간(복호화시 4x4 크기와 8x8 크기간)의 예측은 허용하지 않을 수 있다.A quantization matrix having a size of 4x4 at decoding has a size of 4x4 even at inverse quantization, but a quantization matrix having a size of 8x8 at decoding may have a size of 8x8, 16x16, or 32x32 at inverse quantization. Accordingly, since quantization matrices having an 8x8, 16x16, or 32x32 size in inverse quantization have 8x8 sizes equal to each other in decoding, inter-quantization matrix prediction can be performed. That is, if quantization matrices of the same size (8x8) are decoded, but are derived to quantization matrices of different sizes (8x8, 16x16 or 32x32) during quantization / dequantization, between quantization matrices of the same size during decoding (8x8 for decoding). The prediction may be allowed only between sizes, and the decoding may not allow prediction between quantization matrices of different sizes (between 4x4 size and 8x8 size when decoding).

양자화 행렬의 예측 복호화 방법이 양자화 행렬 간 예측을 위해 참조 양자화 행렬과 동일하게 결정하는 방법 또는 기본 행렬을 사용하는 방법 (scaling_list_pred_mode_flag=0)이면, 복호화 대상 양자화 행렬의 양자화 행렬 식별자 scaling_list_pred_size_matrix_id_delta를 파라미터 세트에서 복호화할 수 있다. 이때, 파라미터 세트는 시퀀스 파라미터 세트 혹은 픽쳐 파라미터 세트일 수 있다.If the prediction decoding method of the quantization matrix is the same method as the reference quantization matrix for the prediction between the quantization matrices or the method using the default matrix (scaling_list_pred_mode_flag = 0), the quantization matrix identifier scaling_list_pred_size_matrix_id_delta of the quantization matrix to be decoded is decoded in the parameter set. can do. In this case, the parameter set may be a sequence parameter set or a picture parameter set.

표 3의 구문 요소 예와 같이, 복호화 대상 양자화 행렬 계수 값을 참조 양자화 행렬 계수값과 동일하게 결정한 경우 또는 복호화 대상 양자화 행렬 계수 값을 기본 행렬 계수값과 동일하게 결정한 경우, 복호화 대상 양자화 행렬의 참조 양자화 행렬 식별자인 scaling_list_pred_size_matrix_id_delta를 파라미터 세트에서 복호화할 수 있다. As in the syntax element example of Table 3, when the decoding target quantization matrix coefficient value is determined to be the same as the reference quantization matrix coefficient value or when the decoding target quantization matrix coefficient value is determined to be the same as the default matrix coefficient value, the reference of the decoding target quantization matrix is referred to. Scaling_list_pred_size_matrix_id_delta, which is a quantization matrix identifier, can be decoded in a parameter set.

이때, 양자화 행렬 식별자인 scaling_list_pred_size_matrix_id_delta와 복호화 대상 양자화 행렬의 크기 및 행렬 정보인 Size_Matrix_ID와 아래의 식을 이용해서 참조 양자화 행렬 및 기본 행렬의 행렬 정보인 RefMatrixID와 참조 양자화 행렬 및 기본 행렬의 크기 정보인 RefSizeID를 결정할 수 있다.Here, scaling_list_pred_size_matrix_id_delta, which is a quantization matrix identifier, Size_Matrix_ID, which is the size and matrix information of the quantization matrix to be decoded, and RefMatrixID, which is the matrix information of the reference quantization matrix and the base matrix, and RefSizeID, which is the size information of the reference quantization matrix and the base matrix, are You can decide.

<수학식 3>&Quot; (3) &quot;

Figure pat00012
Figure pat00012

<수학식 4>&Quot; (4) &quot;

Figure pat00013
Figure pat00013

이때, RefMap은 표 6의 예와 같이 Size_Matrix_ID와 RefSizeID 및 RefMatrixID 간의 관계를 나타낸 매핑 테이블이다. 이때, 역양자화 시의 양자화 행렬의 크기가 다르지만 복호화 시의 양자화 행렬 크기는 동일하기 때문에 복호화 시 8x8 크기의 양자화 행렬 종류에 따라 양자화 행렬 식별자는 순차적으로 할당될 수 있다. At this time, RefMap is a mapping table showing the relationship between Size_Matrix_ID, RefSizeID, and RefMatrixID, as in the example of Table 6. In this case, since the size of the quantization matrix in inverse quantization is different, but the size of the quantization matrix in decoding is the same, the quantization matrix identifiers may be sequentially assigned according to the type of 8x8 quantization matrix during decoding.

상기 RefMap을 이용한 방법은 복호화시 8x8 크기의 양자화 행렬에 대해서 적용될 수 있고, 복호화시 4x4 크기의 양자화 행렬에 대해서는 적용되지 않을 수 있다. 복호화시 4x4 크기의 양자화 행렬은 아래의 식을 이용해서 참조 양자화 행렬 및 기본 행렬의 행렬 정보인 RefMatrixID를 결정할 수 있다. 즉, 복호화 시의 양자화 행렬 크기에 따라 양자화 행렬 예측 방법이 서로 달라질 수 있으며, 참조 양자화 행렬 결정 방법도 달라질 수 있다.The method using the RefMap may be applied to a 8x8 quantization matrix when decoding, and may not be applied to a 4x4 quantization matrix when decoding. In decoding, a 4x4 quantization matrix may determine RefMatrixID, which is matrix information of a reference quantization matrix and a base matrix, by using the following equation. That is, the quantization matrix prediction method may be different from each other and the reference quantization matrix determination method may be different depending on the size of the quantization matrix at the time of decoding.

<수학식 5>&Quot; (5) &quot;

Figure pat00014
Figure pat00014

복호화시 8x8 크기의 양자화 행렬의 경우, RefMatrixID값이 matrixID값과 동일하고 RefSizeID 값이 sizeID 값과 동일하면, sizeID와 matrixID에 해당하는 복호화 대상 양자화 행렬 계수 값은 부호화기/복호화기에서 미리 정해진 기본 행렬 계수 값과 동일하게 결정한다. 이때, 기본 행렬은 sizeID와 matrixID에 해당하는 기본 행렬을 의미한다. 그리고, scaling_list_pred_matrix_id_delta 값이 0이면, RefMatrixID 값과 matrixID 값은 동일하고 RefSizeID 값이 sizeID 값과 동일한 것을 의미한다.In the case of an 8x8 quantization matrix during decoding, if the RefMatrixID value is the same as the matrixID value and the RefSizeID value is the same as the sizeID value, the decoding target quantization matrix coefficient values corresponding to the sizeID and the matrixID are the predetermined default matrix coefficients in the encoder / decoder. Determine the same value. In this case, the default matrix means a default matrix corresponding to sizeID and matrixID. If the scaling_list_pred_matrix_id_delta value is 0, this means that the RefMatrixID value and the matrixID value are the same and the RefSizeID value is the same as the sizeID value.

복호화시 4x4 크기의 양자화 행렬의 경우, RefMatrixID 값이 matrixID 값과 동일하면, sizeID와 matrixID에 해당하는 복호화 대상 양자화 행렬 계수값은 부호화기/복호화기에서 미리 정해진 기본 행렬 계수 값과 동일하게 결정한다. 이때, 기본 행렬은 sizeID와 matrixID에 해당하는 기본 행렬을 의미한다. 그리고, scaling_list_pred_matrix_id_delta 값이 0이면, RefMatrixID 값과 matrixID 값은 동일한 것을 의미한다.In the case of a 4x4 quantization matrix during decoding, if the RefMatrixID value is the same as the matrixID value, the decoding target quantization matrix coefficient values corresponding to the sizeID and the matrixID are determined to be equal to a predetermined default matrix coefficient value by the encoder / decoder. In this case, the default matrix means a default matrix corresponding to sizeID and matrixID. If the scaling_list_pred_matrix_id_delta value is 0, this means that the RefMatrixID value and the matrixID value are the same.

복호화 시 8x8 크기의 양자화 행렬의 경우, RefMatrixID 값이 matrixID 값과 동일하지 않고 RefSizeID 값이 sizeID 값과 동일하지 않으면, RefMatrixID와 RefSizeID에 해당하는 양자화 행렬을 복호화 대상 양자화 행렬의 참조 양자화 행렬로 결정하고, 복호화 대상 양자화 행렬 계수 값을 참조 양자화 행렬 계수 값과 동일하게 결정한다. 복호화 대상 양자화 행렬 계수 값을 참조 양자화 행렬 계수 값과 동일하게 결정하는 것은 RefMatrixID와 RefSizeID 에 해당하는 참조 양자화 행렬을 복호화 대상 양자화 행렬의 참조 양자화 행렬로 결정하고, 참조 양자화 행렬 계수 값을 복호화 대상 양자화 행렬 계수 값으로 복사하는 양자화 행렬 예측 방법을 의미할 수 있다. 역양자화 시 행렬 크기가 16x16 혹은 32x32일 경우에는 DC 행렬 계수를 포함할 수 있다. 따라서 역양자화 시 행렬 크기가 16x16 혹은 32x32인 양자화 행렬로부터 예측 시 DC 행렬 계수도 함께 예측할 수 있다.In case of 8x8 quantization matrix during decoding, if the RefMatrixID value is not the same as the matrixID value and the RefSizeID value is not the same as the sizeID value, the quantization matrix corresponding to RefMatrixID and RefSizeID is determined as the reference quantization matrix of the decoding quantization matrix. The decoding target quantization matrix coefficient value is determined to be the same as the reference quantization matrix coefficient value. Determining a quantization matrix coefficient value to be decoded equal to a reference quantization matrix coefficient value includes determining a reference quantization matrix corresponding to RefMatrixID and RefSizeID as a reference quantization matrix of the decoding quantization matrix and converting the reference quantization matrix coefficient value to a decoding quantization matrix. It may mean a quantization matrix prediction method of copying coefficient values. In inverse quantization, when the matrix size is 16x16 or 32x32, the DC matrix coefficient may be included. Therefore, DC matrix coefficients can also be predicted in prediction from a quantization matrix having a matrix size of 16x16 or 32x32 during inverse quantization.

복호화시 4x4 크기의 양자화 행렬의 경우, RefMatrixID 값이 matrixID 값과 동일하지 않으면, RefMatrixID에 해당하는 양자화 행렬을 복호화 대상 양자화 행렬의 참조 양자화 행렬로 결정하고, 복호화 대상 양자화 행렬 계수 값을 참조 양자화 행렬 계수 값과 동일하게 결정한다.In the case of a 4x4 quantization matrix during decoding, if the RefMatrixID value is not equal to the matrixID value, the quantization matrix corresponding to RefMatrixID is determined as the reference quantization matrix of the decoding quantization matrix, and the decoding quantization matrix coefficient value is referred to as the reference quantization matrix coefficient. Determine the same value.

또한, 복호화 대상 양자화 행렬의 Size_Matrix_ID보다 더 큰 값을 가지는 양자화 행렬로부터는 행렬 간 예측을 수행하지 못 하게 제약할 수 있으며, 양자화 행렬 식별자 scaling_list_pred_size_matrix_id_delta가 0에서 13 사이의 값을 가질 때 양자화 행렬 간 예측 및 기본 행렬을 사용할 수 있다. 양자화 행렬 식별자의 최대값이 제약되어 있으므로 지수-골롬 코드 (Exponential-Golomb code)가 아닌 절삭된 1진 코드 (Truncated Unary)를 이용할 수 있다.In addition, inter-matrix prediction may be restricted from quantization matrices having a value larger than Size_Matrix_ID of the quantization matrix to be decoded, and when the quantization matrix identifier scaling_list_pred_size_matrix_id_delta has a value between 0 and 13, You can use the default matrix. Since the maximum value of the quantization matrix identifier is limited, it is possible to use truncated Unary rather than Exponential-Golomb code.

만약, 역양자화 시의 양자화 행렬 크기를 이용하여 양자화 행렬 복사를 수행할 경우, 역양자화 시 4x4, 8x8 혹은 16x16 크기를 가지는 양자화 행렬의 양자화 행렬 식별자가 0에서 5 사이의 값을 가질 때 양자화 행렬 간 예측 및 기본 행렬을 사용할 수 있고, 역양자화 시 32x32 크기를 가지는 양자화 행렬의 양자화 행렬 식별자가 0에서 1 사이의 값을 가질 때 양자화 행렬 간 예측 및 기본 행렬을 사용할 수 있다. 역양자화 시의 크기 별로 양자화 행렬 식별자의 최대값이 제약되어 있으므로 지수-골롬 코드 (Exponential-Golomb code)가 아닌 절삭된 1진 코드 (Truncated Unary)를 이용할 수 있다.If the quantization matrix copy is performed using the quantization matrix size during inverse quantization, when the quantization matrix identifier of the quantization matrix having a size of 4x4, 8x8, or 16x16 has a value between 0 and 5 during inverse quantization, Prediction and base matrix may be used, and interquantization matrix prediction and base matrix may be used when the quantization matrix identifier of the quantization matrix having a size of 32x32 has a value between 0 and 1 during inverse quantization. Since the maximum value of the quantization matrix identifier is limited according to the size of the inverse quantization, a truncated unary code may be used instead of an exponential-Golomb code.

양자화 행렬 내 계수를 예측 복호화한다(단계S730).Predictive decoding of coefficients in the quantization matrix is performed (step S730).

양자화 행렬의 예측 복호화 방법이 양자화 행렬 내 계수를 예측 복호화하기 위해 지수-골롬 코드와 역DPCM과 스캔을 이용하여 복호화하는 방법 (scaling_list_pred_mode_flag=1)이면, 양자화 행렬 내에서 이전에 복호화된 양자화 행렬 계수 값과 복호화 대상 양자화 행렬 계수 값의 차분값을 파라미터 세트에서 복호화할 수 있다. 이때, 파라미터 세트는 시퀀스 파라미터 세트 또는 픽쳐 파라미터 세트일 수 있다.If the predictive decoding method of the quantization matrix is a method of decoding using an exponential-Golomb code and an inverse DPCM and a scan to predict and decode the coefficients in the quantization matrix (scaling_list_pred_mode_flag = 1), the quantization matrix coefficient values previously decoded in the quantization matrix And the difference between the decoding target quantization matrix coefficient values can be decoded in the parameter set. In this case, the parameter set may be a sequence parameter set or a picture parameter set.

표 7의 구문 요소 예와 같이, 복호화 대상 양자화 행렬의 크기가 16x16(sizeID=2) 또는 32x32(sizeID=3)일 경우, DC 행렬 계수인 scaling_list_dc_coef_minus8를 파라미터 세트에서 복호화할 수 있다. scaling_list_dc_coef_minus8의 값은 -8~247 사이로 한정된 값일 수 있으며, 부호를 가진 지수-골롬 코드 (Signed Exponental-Golomb code)를 이용해서 -8~247 범위 사이의 값으로 복호화할 수 있다. DC 행렬 계수 값은 차후 scaling_list_dc_coef_minus8 + 8의 값으로 계산하며, 계산된 값은 1~255 사이의 값일 수 있다.As in the syntax element example of Table 7, when the size of the quantization matrix to be decoded is 16x16 (sizeID = 2) or 32x32 (sizeID = 3), scaling_list_dc_coef_minus8, which is a DC matrix coefficient, may be decoded in the parameter set. The value of scaling_list_dc_coef_minus8 can be limited to between -8 and 247. The scaling_list_dc_coef_minus8 can be decoded to a value between -8 and 247 using a signed exponent-Golomb code. The DC matrix coefficient value is later calculated as a value of scaling_list_dc_coef_minus8 + 8, and the calculated value may be a value between 1 and 255.

표 7의 구문 요소의 예와 같이, 양자화 행렬 내에서 이전에 복호화된 양자화 행렬 계수값과 복호화 대상 양자화 행렬 계수값의 차분값인 scaling_list_delta_coef를 파라미터 세트에서 복호화할 수 있다. 이때, scaling_list_delta_coef는 4x4 크기의 양자화 행렬을 복호화할 때는 4x4 양자화 행렬 내 계수들의 개수인 총 16개를 복호화하며, 8x8 크기 이상의 변환 계수 블록에 사용하는 양자화 행렬을 복호화할 때는 8x8 양자화 행렬 내 계수들의 개수인 총 64개를 복호화한다. 아래는 scaling_list_delta_coef를 복호화하는 상세한 과정을 나타낸다.As in the example of the syntax element of Table 7, scaling_list_delta_coef, which is a difference value between the quantization matrix coefficient value previously decoded in the quantization matrix and the quantization matrix coefficient value to be decoded, may be decoded in the parameter set. In this case, scaling_list_delta_coef decodes 16 pieces, which are the number of coefficients in the 4x4 quantization matrix when decoding the 4x4 quantization matrix, and counts the coefficients in the 8x8 quantization matrix when decoding the quantization matrix used for the transform coefficient block of size 8x8 or larger. Decode a total of 64. The following shows a detailed process of decoding scaling_list_delta_coef.

첫 번째 과정으로, scaling_list_delta_coef을 지수-골롬 코드 (Exponential-Golomb code)를 이용해서 복호화한다. scaling_list_delta_coef의 값은 -254~254 사이로 한정된 값일 수 있으며, 차분 값은 부호(sign) 정보를 가지므로 부호를 가진 지수-골롬 코드 (Signed Exponental-Golomb code)를 이용해서 -254~254 범위 사이의 값으로 복호화될 수 있다. 복호화된 차분 값은 1차원 형태의 계수 배열에 복호화된 순서대로 저장될 수 있다.In the first step, scaling_list_delta_coef is decoded using the Exponential-Golomb code. The value of scaling_list_delta_coef may be limited to between -254 and 254. Since the difference has sign information, the value between the range of -254 and 254 using a signed Exponental-Golomb code is used. Can be decrypted. The decoded difference values may be stored in a decoded order in a coefficient array having a one-dimensional form.

두 번째 과정으로, 상기 복호화된 차분 값을 1차원 형태의 계수 배열 내에서 이전 순서 상에 위치하는 양자화 행렬 계수와 합을 계산하여 복호화 대상 양자화 행렬 계수인 nextCoef 혹은 scalingList[i] 를 복원한다. 이때, i는 1차원 형태의 계수 배열 내에서 순서를 의미한다. 복호화 대상 양자화 행렬 계수는 역 DPCM (inverse DPCM)을 이용해서 계산된 값일 수 있으며, 이전 순서 상에 위치하는 양자화 행렬 계수는 복호화 대상 양자화 행렬 계수의 바로 이전에 존재하는 계수일 수 있다. 또한, 1차원 형태의 계수 배열 내의 첫 번째 계수는 예측 대상이 되는 이전 순서 상에 위치하는 양자화 행렬 계수가 없으므로, 소정의 상수 값을 이용해서 복원될 수 있고, sizeID가 1보다 클 경우에는 DC 행렬 계수을 이용해서 복원될 수 있다. 이때, 소정의 상수 값은 1~255 사이의 값일 수 있으며, 특히 8 혹은 16일 수 있다. 복원된 양자화 행렬 계수는 1~255 사이의 값일 수 있다.In the second process, the sum of the decoded difference values and the quantization matrix coefficients located in the previous order in the one-dimensional coefficient array is restored to restore nextCoef or scalingList [i] which are the quantization matrix coefficients to be decoded. In this case, i denotes an order within a one-dimensional coefficient array. The quantization matrix coefficients to be decoded may be values calculated using an inverse DPCM, and the quantization matrix coefficients positioned in the previous order may be coefficients that exist immediately before the decoded quantization matrix coefficients. In addition, since the first coefficient in the one-dimensional coefficient array does not have the quantization matrix coefficients located in the previous order to be predicted, it can be restored using a predetermined constant value, and if the sizeID is larger than 1, the DC matrix Can be restored using the coefficients. In this case, the predetermined constant value may be a value between 1 and 255, in particular 8 or 16. The reconstructed quantization matrix coefficient may be a value between 1 and 255.

세 번째 과정으로, 1차원 형태의 복원된 양자화 행렬 계수 배열을 2차원 양자화 행렬로 정렬하기 위한 스캔을 수행한다. In a third process, a scan is performed to align the reconstructed quantization matrix coefficient array in one-dimensional form into a two-dimensional quantization matrix.

양자화 행렬을 복원한다(단계 S740).The quantization matrix is restored (step S740).

2차원 양자화 행렬로 정렬된 복원된 양자화 행렬 계수들은 역양자화 시에 사용될 2차원 양자화 행렬로 복원된다. 이때, 업샘플링(upsampling), 인터폴레이션(interpolation), DC 행렬 계수 대체, 또는 서브샘플링(subsampling) 등을 이용하여 2차원 양자화 행렬을 복원할 수 있으며, 양자화 행렬을 복원하는 실시예는 아래와 같다.The reconstructed quantization matrix coefficients aligned with the two-dimensional quantization matrix are reconstructed into a two-dimensional quantization matrix to be used in inverse quantization. In this case, the 2D quantization matrix may be restored by using upsampling, interpolation, DC matrix coefficient replacement, or subsampling, and an embodiment of restoring the quantization matrix is as follows.

예를 들어, 4x4, 8x8, 16x16, 32x32 등의 정방형 변환 계수 블록의 역양자화에 사용하는 양자화 행렬은 아래와 같은 방법으로 복원할 수 있다.For example, the quantization matrix used for inverse quantization of square transform coefficient blocks such as 4x4, 8x8, 16x16, 32x32, and the like can be restored by the following method.

수학식 6과 같이 4x4 크기의 변환 계수 블록의 역양자화에 사용하는 양자화 행렬은 상기 정렬된 2차원 4x4 크기의 양자화 행렬을 그대로 이용할 수 있다.As in Equation 6, the quantization matrix used for inverse quantization of a transform coefficient block having a size of 4x4 may use the aligned two-dimensional 4x4 sized quantization matrix as it is.

<수학식 6>&Quot; (6) &quot;

Figure pat00015
Figure pat00015

수학식 7과 같이 8x8 크기의 변환 계수 블록의 역양자화에 사용하는 양자화 행렬은 상기 정렬된 2차원 8x8 크기의 양자화 행렬을 그대로 이용할 수 있다.A quantization matrix used for inverse quantization of 8x8 transform coefficient blocks as shown in Equation 7 may use the aligned two-dimensional 8x8 quantization matrix as it is.

<수학식 7>&Quot; (7) &quot;

Figure pat00016
Figure pat00016

도 8은 본 발명의 실시예에 따른 양자화 행렬의 업샘플링을 나타낸 개념도이다. 8 is a conceptual diagram illustrating upsampling of a quantization matrix according to an embodiment of the present invention.

도 8을 참조하면, 수학식 8과 같이 16x16 크기의 변환 계수 블록의 역양자화에 사용하는 양자화 행렬은 도 8과 같이 상기 정렬된 2차원 8x8 크기의 양자화 행렬을 가장 가까운 이웃 계수로부터 복사하는 업샘플링을 수행하여 16x16 크기의 양자화 행렬로 복원할 수 있다. 그리고, 양자화 행렬 내 DC 위치, 즉 (0, 0) 위치에 존재하는 양자화 행렬 계수는 DC 행렬 계수 값인 scaling_list_dc_coef_minus8 + 8의 값으로 대체될 수 있다.Referring to FIG. 8, the quantization matrix used for inverse quantization of a transform coefficient block having a size of 16 × 16 as shown in Equation 8 includes upsampling which copies the aligned two-dimensional 8x8 sized quantization matrix from the nearest neighbor coefficient as shown in FIG. 8. It can be restored to a 16x16 quantization matrix by performing the following steps. The quantization matrix coefficients present at the DC position in the quantization matrix, that is, (0, 0) may be replaced with a value of scaling_list_dc_coef_minus8 + 8 which is a DC matrix coefficient value.

<수학식 8>&Quot; (8) &quot;

Figure pat00017
Figure pat00017

수학식 9와 같이 32x32 크기의 변환 계수 블록의 역양자화에 사용하는 양자화 행렬은 도 8과 같은 방법으로 상기 정렬된 2차원 8x8 크기의 양자화 행렬을 가장 가까운 이웃 계수로부터 복사하는 업샘플링을 수행하여 32x32 크기의 양자화 행렬로 복원할 수 있다. 그리고, 양자화 행렬 내 DC 위치, 즉 (0, 0) 위치에 존재하는 양자화 행렬 계수는 DC 행렬 계수 값인 scaling_list_dc_coef_minus8 + 8의 값으로 대체될 수 있다.As shown in Equation 9, the quantization matrix used for inverse quantization of a 32x32 transform coefficient block is 32x32 by performing upsampling to copy the aligned two-dimensional 8x8 sized quantization matrix from the nearest neighbor coefficient in the same manner as in FIG. It can be restored to a quantization matrix of magnitude. The quantization matrix coefficients present at the DC position in the quantization matrix, that is, (0, 0) may be replaced with a value of scaling_list_dc_coef_minus8 + 8 which is a DC matrix coefficient value.

<수학식 9>&Quot; (9) &quot;

Figure pat00018
Figure pat00018

도 9는 본 발명의 실시예에 따른 비정방형 변환 계수 블록에 사용하는 양자화 행렬을 생성하는 방법을 나타낸 개념도이다. 9 is a conceptual diagram illustrating a method of generating a quantization matrix for use in a non-square transform coefficient block according to an embodiment of the present invention.

도 9를 참조하면, 16x4, 4x16, 32x8, 8x32 등의 비정방형 변환 계수 블록에 사용하는 양자화 행렬은 아래와 같은 방법으로 복원할 수 있다.Referring to FIG. 9, a quantization matrix used for non-square transform coefficient blocks such as 16x4, 4x16, 32x8, and 8x32 may be restored by the following method.

수학식 10과 같이 16x4 크기의 변환 계수 블록에 사용하는 양자화 행렬은 도 9의 (A)와 같이 상기 16x16 크기의 복원된 양자화 행렬을 y 위치 (행, 수직 방향)에 대해 서브샘플링을 수행하여 16x4 크기의 양자화 행렬로 복원할 수 있다.In the quantization matrix used for the transform coefficient block having a size of 16x4 as shown in Equation 10, as shown in FIG. 9A, the 16x16 sized reconstructed quantization matrix is subjected to subsampling at a y position (row and vertical direction) to 16x4. It can be restored to a quantization matrix of magnitude.

<수학식 10>&Quot; (10) &quot;

Figure pat00019
Figure pat00019

수학식 11과 같이 4x16 크기의 변환 계수 블록에 사용하는 양자화 행렬은 도 9의 (B)와 같이 상기 16x16 크기의 복원된 양자화 행렬을 x 위치 (열, 수평 방향)에 대해 서브샘플링을 수행하여 4x16 크기의 양자화 행렬로 복원할 수 있다.In the quantization matrix used for the transform coefficient block having a size of 4x16 as shown in Equation 11, 4x16 is performed by subsampling the restored 16x16 sized quantization matrix with respect to the x position (column and horizontal direction) as shown in FIG. It can be restored to a quantization matrix of magnitude.

<수학식 11>Equation (11)

Figure pat00020
Figure pat00020

수학식 12와 같이 32x8 크기의 변환 계수 블록에 사용하는 양자화 행렬은 도 9의 (A)와 같은 방법으로 상기 32x32 크기의 복원된 양자화 행렬을 y 위치 (행, 수직 방향)에 대해 서브샘플링을 수행하여 32x8 크기의 양자화 행렬로 복원할 수 있다.As shown in Equation 12, the quantization matrix used for the transform coefficient block having the size of 32x8 performs subsampling of the restored 32x32 sized quantization matrix at the y position (row, vertical direction) in the same manner as in FIG. 9 (A). Can be restored to a 32x8 quantization matrix.

<수학식 12>&Quot; (12) &quot;

Figure pat00021
Figure pat00021

수학식 13과 같이 8x32 크기의 변환 계수 블록에 사용하는 양자화 행렬은 도 9의 (B)와 같은 방법으로 상기 32x32 크기의 복원된 양자화 행렬을 x 위치 (열, 수평 방향)에 대해 서브샘플링을 수행하여 8x32 크기의 양자화 행렬로 복원할 수 있다.As shown in Equation 13, the quantization matrix used for the transform coefficient block having the size of 8x32 performs subsampling on the x position (column and horizontal direction) of the restored 32x32 sized quantization matrix in the same manner as in FIG. 9 (B). Can be restored to an 8x32 quantization matrix.

<수학식 13>&Quot; (13) &quot;

Figure pat00022
Figure pat00022

만약, 부호화기와 복호화기에서 미리 정의된 기본 행렬이 메모리 저장 공간 감소를 위해서 16x16/32x32 크기 변환 계수 블록의 역양자화에 사용되는 기본 행렬이 8x8 크기의 기본 행렬로 존재한다면, 아래의 식과 같이 가장 가까운 이웃 계수로부터 복사하는 업샘플링을 수행하여 16x16/32x32 크기의 양자화 행렬로 복원될 수 있다.If the base matrix defined in the encoder and the decoder is the base matrix used for the inverse quantization of the 16x16 / 32x32 size transform coefficient block to reduce the memory storage space, the base matrix having the size of 8x8 is the closest as shown in the following equation. Upsampling by copying from neighboring coefficients may be performed to restore a 16x16 / 32x32 quantization matrix.

수학식 14와 같이 16x16 크기의 변환 계수 블록의 역양자화에 사용하는 기본 행렬은 도 8과 같은 방법으로 8x8 크기의 기본 행렬을 가장 가까운 이웃 계수로부터 복사하는 업샘플링을 수행하여 16x16 크기의 양자화 행렬로 복원할 수 있다.As shown in Equation 14, the base matrix used for inverse quantization of the transform coefficient block having a size of 16x16 is a 16x16 sized quantization matrix by performing upsampling to copy the 8x8 sized matrix from the nearest neighbor coefficient in the same manner as in FIG. Can be restored

<수학식 14>&Quot; (14) &quot;

Figure pat00023
Figure pat00023

수학식 15와 같이 32x32 크기의 변환 계수 블록의 역양자화에 사용하는 기본 행렬은 도 8과 같은 방법으로 8x8 크기의 기본 행렬을 가장 가까운 이웃 계수로부터 복사하는 업샘플링을 수행하여 32x32 크기의 양자화 행렬로 복원할 수 있다.As shown in Equation 15, the base matrix used for dequantization of the transform coefficient block having a size of 32x32 is a 32x32 sized quantization matrix by performing upsampling to copy an 8x8 sized matrix from the nearest neighbor coefficient in the same manner as in FIG. Can be restored

<수학식 15>&Quot; (15) &quot;

Figure pat00024
Figure pat00024

위의 수학식들에서 QM(x, y)은 정렬된 2차원 4x4 크기의 양자화 행렬을 의미하며, RQM(x, y)는 복원된 양자화 행렬을 의미하며, DQM(x, y)는 기본 행렬을 의미한다.In the above equations, QM (x, y) denotes an aligned two-dimensional 4x4 quantization matrix, RQM (x, y) denotes a reconstructed quantization matrix, and DQM (x, y) denotes a base matrix. Means.

가장 가까운 이웃 계수로부터 복사하는 업샘플링 방법은 최근접 이웃 보간법(nearest neighbor interpolation) 혹은 0차 인터폴레이션 (zeroth order interpolation)의 방법이라고 부를 수 있다.The upsampling method of copying from the nearest neighbor coefficient may be called a method of nearest neighbor interpolation or zeroth order interpolation.

상술한 실시예에서, 양자화/역양자화시 비정방형 16x4 또는 4x16크기의 양자화 행렬은 정방형 16x16 크기의 양자화 행렬로부터 유도되기 때문에 양자화/역양자화 시의 16x16 크기의 양자화 행렬로 표현된 것은 정방형 16x16 크기의 양자화 행렬뿐만 아니라 비정방형 16x4 혹은 4x16 크기의 양자화 행렬을 의미할 수 있고, 양자화/역양자화시 비정방형 32x8 혹은 8x32크기의 양자화 행렬은 정방형 32x32 크기의 양자화 행렬로부터 유도되기 때문에 양자화/역양자화 시의 32x32 크기의 양자화 행렬로 표현된 것은 정방형 32x32 크기의 양자화 행렬뿐만 아니라 비정방형 32x8 혹은 8x32 크기의 양자화 행렬을 의미할 수 있다.In the above embodiment, since the non-square 16x4 or 4x16 quantization matrix is derived from the square 16x16 quantization matrix at the time of quantization / dequantization, the 16x16 size quantization matrix at the time of quantization / dequantization is the square 16x16 size. In addition to the quantization matrix, it can mean a non-square 16x4 or 4x16 quantization matrix, and in quantization / dequantization, a non-square 32x8 or 8x32 size quantization matrix is derived from a square 32x32 size quantization matrix. The 32x32 quantization matrix may refer to a non-square 32x8 or 8x32 quantization matrix as well as a square 32x32 quantization matrix.

양자화 행렬 정보란 양자화 행렬 혹은 양자화 행렬을 유도할 수 있는 정보를 의미한다. 이때, 양자화 행렬을 유도할 수 있는 정보는 기본 행렬 사용 여부 혹은 예측 부호화/복호화 방법 종류 혹은 참조 양자화 행렬 식별자 혹은 참조 양자화 행렬 등을 의미할 수 있다.The quantization matrix information means information capable of deriving a quantization matrix or a quantization matrix. In this case, the information capable of deriving a quantization matrix may mean whether a basic matrix is used, a type of prediction encoding / decoding method, a reference quantization matrix identifier, a reference quantization matrix, or the like.

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

상술한 실시예는 다양한 양태의 예시들을 포함한다. 다양한 양태들을 나타내기 위한 모든 가능한 조합을 기술할 수는 없지만, 해당 기술 분야의 통상의 지식을 가진 자는 다른 조합이 가능함을 인식할 수 있을 것이다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.The above-described embodiments include examples of various aspects. While it is not possible to describe every possible combination for expressing various aspects, one of ordinary skill in the art will recognize that other combinations are possible. Accordingly, it is intended that the invention include all alternatives, modifications and variations that fall within the scope of the following claims.

Claims (1)

영상 복호화 방법에 있어서,
양자화 행렬의 사용 여부에 대한 정보 및 존재 유무에 대한 정보를 복호화하는 단계;
상기 양자화 행렬의 예측 방법에 관련된 정보를 복호화하는 단계;
양자화 행렬 간 예측 및 기본 행렬 사용을 위한 양자화 행렬 식별자를 복호화하는 단계;
상기 양자화 행렬 내의 계수를 예측 복호화하는 단계; 및
상기 양자화 행렬을 복원하는 단계를 포함하고,
상기 양자화 행렬 간 예측 및 기본 행렬 사용을 위한 양자화 행렬 식별자를 복호화하는 단계는 복호화 시의 양자화 행렬 크기와 동일한 양자화 행렬로부터 양자화 행렬 예측을 수행하는 것을 특징으로 하는 영상 복호화 방법.
In the image decoding method,
Decoding information on whether a quantization matrix is used and information on the presence or absence of a quantization matrix;
Decoding information related to the prediction method of the quantization matrix;
Decoding a quantization matrix identifier for inter-quantization matrix prediction and using the base matrix;
Predicting and decoding the coefficients in the quantization matrix; And
Reconstructing the quantization matrix;
And decoding the quantization matrix identifiers for inter-quantization matrix prediction and using the default matrix.
KR1020130075276A 2012-06-28 2013-06-28 The method of encoding and decoding of quantization matrix and the apparatus for using the same KR102228577B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210031529A KR102349435B1 (en) 2012-06-28 2021-03-10 The method of encoding and decoding of quantization matrix and the apparatus for using the same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020120070212 2012-06-28
KR20120070212 2012-06-28

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020210031529A Division KR102349435B1 (en) 2012-06-28 2021-03-10 The method of encoding and decoding of quantization matrix and the apparatus for using the same

Publications (2)

Publication Number Publication Date
KR20140004018A true KR20140004018A (en) 2014-01-10
KR102228577B1 KR102228577B1 (en) 2021-03-16

Family

ID=50140258

Family Applications (4)

Application Number Title Priority Date Filing Date
KR1020130075276A KR102228577B1 (en) 2012-06-28 2013-06-28 The method of encoding and decoding of quantization matrix and the apparatus for using the same
KR1020210031529A KR102349435B1 (en) 2012-06-28 2021-03-10 The method of encoding and decoding of quantization matrix and the apparatus for using the same
KR1020220001684A KR20220005623A (en) 2012-06-28 2022-01-05 The method of encoding and decoding of quantization matrix and the apparatus for using the same
KR1020230026092A KR20230035009A (en) 2012-06-28 2023-02-27 The method of encoding and decoding of quantization matrix and the apparatus for using the same

Family Applications After (3)

Application Number Title Priority Date Filing Date
KR1020210031529A KR102349435B1 (en) 2012-06-28 2021-03-10 The method of encoding and decoding of quantization matrix and the apparatus for using the same
KR1020220001684A KR20220005623A (en) 2012-06-28 2022-01-05 The method of encoding and decoding of quantization matrix and the apparatus for using the same
KR1020230026092A KR20230035009A (en) 2012-06-28 2023-02-27 The method of encoding and decoding of quantization matrix and the apparatus for using the same

Country Status (2)

Country Link
US (1) US20230219151A1 (en)
KR (4) KR102228577B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020057359A1 (en) * 2018-09-19 2020-03-26 Mediatek Inc. Methods and apparatuses of quantization scaling of transform coefficients in video coding system
US20220086443A1 (en) * 2018-12-26 2022-03-17 Electronics And Telecommunications Research Institute Quantization matrix encoding/decoding method and device, and recording medium in which bitstream is stored

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Bross, Benjamin, "High efficiency video coding (HEVC) text specification draft 6", 7th JCT-VC meeting, JCTVC-H1003, 2011. *
SC Lim, "Simplication on default quantization matrix signaling", JCT-VC 9th Meeting, JCTVC-I0101, 2012. *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020057359A1 (en) * 2018-09-19 2020-03-26 Mediatek Inc. Methods and apparatuses of quantization scaling of transform coefficients in video coding system
US11202073B2 (en) 2018-09-19 2021-12-14 Mediatek Inc. Methods and apparatuses of quantization scaling of transform coefficients in video coding system
US20220086443A1 (en) * 2018-12-26 2022-03-17 Electronics And Telecommunications Research Institute Quantization matrix encoding/decoding method and device, and recording medium in which bitstream is stored

Also Published As

Publication number Publication date
KR20230035009A (en) 2023-03-10
KR20210031666A (en) 2021-03-22
US20230219151A1 (en) 2023-07-13
KR102228577B1 (en) 2021-03-16
KR102349435B1 (en) 2022-01-11
KR20220005623A (en) 2022-01-13

Similar Documents

Publication Publication Date Title
KR102462009B1 (en) Method for image encoding and computer readable redording meduim thereof
KR102640542B1 (en) Methods of determination for chroma quantization parameter and apparatuses for using the same
KR102313195B1 (en) Methods And Apparatuses For Encoding and Decoding Quantization marix
KR20230035009A (en) The method of encoding and decoding of quantization matrix and the apparatus for using the same
KR102110229B1 (en) Method And Apparatus For Video Encoding And Decoding

Legal Events

Date Code Title Description
A201 Request for examination
AMND Amendment
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
X091 Application refused [patent]
AMND Amendment
X701 Decision to grant (after re-examination)
GRNT Written decision to grant