KR102421720B1 - Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding of image - Google Patents

Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding of image Download PDF

Info

Publication number
KR102421720B1
KR102421720B1 KR1020200132976A KR20200132976A KR102421720B1 KR 102421720 B1 KR102421720 B1 KR 102421720B1 KR 1020200132976 A KR1020200132976 A KR 1020200132976A KR 20200132976 A KR20200132976 A KR 20200132976A KR 102421720 B1 KR102421720 B1 KR 102421720B1
Authority
KR
South Korea
Prior art keywords
image
data
upscaling
information
dnn
Prior art date
Application number
KR1020200132976A
Other languages
Korean (ko)
Other versions
KR20210147830A (en
Inventor
김재환
박영오
이채은
최광표
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to US17/333,541 priority Critical patent/US11223841B2/en
Priority to CN202180027171.1A priority patent/CN115398481A/en
Priority to PCT/KR2021/006735 priority patent/WO2021242066A1/en
Priority to EP21812423.8A priority patent/EP4052226A4/en
Publication of KR20210147830A publication Critical patent/KR20210147830A/en
Application granted granted Critical
Publication of KR102421720B1 publication Critical patent/KR102421720B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/002Image coding using neural networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Abstract

하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고, 프로세서는, 제 1 영상의 제 1 부호화 결과 획득된 영상 데이터를 포함하는 메인 비트스트림과 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 획득하고, 메인 비트스트림에 포함된 영상 데이터를 제 1 복호화하여 제 1 영상에 대응하는 제 2 영상을 획득하고, 서브 비트스트림의 AI 데이터에 포함된 AI 업스케일 활성화 플래그 정보를 획득하고, AI 업스케일 활성화 플래그 정보를 기초로 제 2 영상에 대한 AI 업스케일 수행 여부를 결정하고, 제 2 영상에 대해 AI 업스케일을 수행하는 것으로 결정된 경우, 영상 데이터의 적어도 일부 및 서브 비트스트림에 포함된 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN을 통해, 제 2 영상으로부터 AI 업스케일된 제 3 영상을 획득하고, 제 3 영상이 획득된 경우, 제 3 영상을 출력하는 일 실시예에 따른 AI 복호화 장치가 개시된다.a video bitstream including at least one processor executing one or more instructions, wherein the processor includes a main bitstream including image data obtained as a result of the first encoding of a first image and a sub bitstream including AI data obtain a second image corresponding to the first image by first decoding image data included in the main bitstream, acquire AI upscaling activation flag information included in AI data of the sub-bitstream, and AI It is determined whether to perform AI upscaling on the second image based on the upscaling activation flag information, and when it is determined to perform AI upscaling on the second image, at least a portion of image data and AI included in the sub-bitstream Obtaining an AI upscaled third image from the second image through the upscaling DNN set according to the selected upscaling DNN information among a plurality of upscaling DNN information stored in advance based on at least one of at least one of the sub data and, when the third image is obtained, an AI decoding apparatus according to an embodiment for outputting the third image is disclosed.

Figure R1020200132976
Figure R1020200132976

Description

영상의 AI 부호화 및 AI 복호화를 위한 장치, 및 방법{APPARATUS AND METHOD FOR PERFORMING ARTIFICIAL INTELLIGENCE ENCODING AND ARTIFICIAL INTELLIGENCE DECODING OF IMAGE}Apparatus and method for APA encoding and AIA decoding of an image TECHNICAL FIELD

본 개시는 영상의 부호화 및 복호화 분야에 관한 것이다. 보다 구체적으로, 본 개시는 AI 기반으로 영상을 부호화/복호화하는 장치 및 방법에 관한 것이다.The present disclosure relates to the field of encoding and decoding of images. More specifically, the present disclosure relates to an apparatus and method for encoding/decoding an image based on AI.

영상은 소정의 데이터 압축 표준, 예를 들어 MPEG (Moving Picture Expert Group) 표준 등을 따르는 코덱(codec)에 의해 부호화된 후 비트스트림의 형태로 기록매체에 저장되거나 통신 채널을 통해 전송된다.The image is encoded by a codec conforming to a predetermined data compression standard, for example, a Moving Picture Expert Group (MPEG) standard, and then stored in a bitstream in the form of a recording medium or transmitted through a communication channel.

고해상도/고화질의 영상을 재생, 저장할 수 있는 하드웨어의 개발 및 보급에 따라, 고해상도/고화질의 영상을 효과적으로 부호화 및 복호화할 수 있는 코덱의 필요성이 증대하고 있다.With the development and dissemination of hardware capable of reproducing and storing high-resolution/high-definition images, the need for a codec capable of effectively encoding and decoding high-resolution/high-definition images is increasing.

일 실시예에 따른 영상의 AI 부호화 및 AI 복호화를 위한 장치, 및 방법은 낮은 비트레이트의 달성을 위해 AI 기반으로 영상을 부호화 및 복호화하는 것을 기술적 과제로 한다.An apparatus and method for AI encoding and AI decoding of an image according to an embodiment have a technical task of encoding and decoding an image based on AI to achieve a low bit rate.

일 실시예에 따른 AI 복호화 장치는,하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고,AI decoding apparatus according to an embodiment, comprising at least one processor executing one or more instructions,

상기 프로세서는,The processor is

제 1 영상의 제 1 부호화 결과 획득된 영상 데이터를 포함하는 메인 비트스트림과 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 획득하고,Obtaining a video bitstream including a main bitstream including image data obtained as a result of the first encoding of the first image and a sub-bitstream including AI data,

상기 메인 비트스트림에 포함된 영상 데이터를 제 1 복호화하여 상기 제 1 영상에 대응하는 제 2 영상을 획득하고,obtaining a second image corresponding to the first image by first decoding image data included in the main bitstream;

상기 서브 비트스트림의 AI 데이터에 포함된 AI 업스케일 활성화 플래그 정보를 획득하고, 상기 AI 업스케일 활성화 플래그 정보를 기초로 상기 제 2 영상에 대한 AI 업스케일 수행 여부를 결정하고,obtaining AI upscaling activation flag information included in the AI data of the sub-bitstream, and determining whether to perform AI upscaling on the second image based on the AI upscaling activation flag information;

상기 제 2 영상에 대해 AI 업스케일을 수행하는 것으로 결정된 경우,When it is determined to perform AI upscaling on the second image,

상기 영상 데이터의 적어도 일부 및 상기 서브 비트스트림에 포함된 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN을 통해, 상기 제 2 영상으로부터 AI 업스케일된 제 3 영상을 획득하고,Upscaling DNN set according to selected upscaling DNN information from among a plurality of upscaling DNN information stored in advance based on at least one of at least one of at least a part of the image data and at least one of the AI sub data included in the sub bitstream Through, to obtain an AI upscaled third image from the second image,

상기 제 3 영상이 획득된 경우, 상기 제 3 영상을 출력하고,When the third image is obtained, output the third image,

상기 제 2 영상에 대해 상기 AI 업스케일을 수행하지 않는 것으로 결정된 경우, 상기 제 2 영상을 출력하고,When it is determined not to perform the AI upscaling on the second image, the second image is output,

상기 AI 업스케일 활성화 플래그 정보는 상기 제 2 영상에 AI 업스케일을 수행하는지 여부를 나타낼 수 있다.The AI upscaling activation flag information may indicate whether AI upscaling is performed on the second image.

상기 서브 비트스트림에 포함된 AI 서브 데이터는, 영상의 장르를 나타내는 영상 장르 정보, 제 1 영상의 평균 양자화 값을 나타내는 평균 양자화 파라미터 정보, 제 1 영상의 적어도 일부의 양자화 정도(degree)를 나타내는 양자화 파라미터 지시자 정보, 원본 영상 및 제 1 영상 중 적어도 하나의 영상의 해상도를 나타내는 영상 해상도 정보, 원본 영상과 제 1 영상의 비율(ratio)을 나타내는 영상 비율 정보, 제 1 영상의 부호화시 이용된 코덱을 나타내는 코덱 정보, AI 업스케일 관련 추가 메타 데이터를 포함하는지 여부를 나타내는 메타 데이터 플래그 정보 및 AI 업스케일 관련 추가 메타 데이터 정보 중 적어도 하나를 포함할 수 있다.The AI sub data included in the sub-bitstream includes image genre information indicating the genre of the image, average quantization parameter information indicating the average quantization value of the first image, and quantization indicating the quantization degree of at least a part of the first image. parameter indicator information, image resolution information indicating the resolution of at least one of the original image and the first image, image ratio information indicating the ratio of the original image and the first image, and the codec used for encoding the first image It may include at least one of codec information indicating, metadata flag information indicating whether to include additional metadata related to AI upscaling, and additional metadata information related to AI upscaling.

상기 프로세서는,The processor is

상기 영상 장르 정보, 상기 평균 양자화 파라미터 정보, 상기 양자화 파라미터 지시자 정보, 상기 영상 해상도 정보, 상기 영상 비율 정보 및 상기 AI 업스케일 관련 추가 메타 데이터 정보 중 적어도 하나를 기초로 복수의 업스케일용 DNN 정보 중 하나의 업스케일용 DNN 정보로 상기 업스케일용 DNN을 설정할 수 있다.Among a plurality of upscaling DNN information based on at least one of the image genre information, the average quantization parameter information, the quantization parameter indicator information, the image resolution information, the image ratio information, and the AI upscaling related additional metadata information One piece of DNN for upscaling may set the upscaling DNN.

상기 양자화 파라미터 지시자 정보는 미리 결정된 복수의 양자화 파라미터 그룹 중 하나의 양자화 파라미터 그룹을 나타내는 인덱스 정보일 수 있고,The quantization parameter indicator information may be index information indicating one quantization parameter group among a plurality of predetermined quantization parameter groups,

상기 프로세서는, 복수의 업스케일용 DNN 정보 중 상기 인덱스 정보가 나타내는 하나의 양자화 파라미터 그룹에 대응하는 업스케일용 DNN 정보로 업스케일용 DNN을 설정할 수 있다.The processor may set the upscaling DNN as upscaling DNN information corresponding to one quantization parameter group indicated by the index information among a plurality of upscaling DNN information.

상기 양자화 파라미터 지시자 정보는 프레임 내 서브 그룹, 프레임, 프레임 그룹, 비디오 시퀀스 중 적어도 하나의 양자화 파라미터의 (평균) 값이 포함된 양자화 파라미터 그룹을 가리키는 인덱스 정보일 수 있다.The quantization parameter indicator information may be index information indicating a quantization parameter group including an (average) value of at least one quantization parameter among a subgroup in a frame, a frame, a frame group, and a video sequence.

상기 프로세서는, 상기 메인 비트스트림의 영상 데이터로부터 획득된 양자화 파라미터 정보를 기초로 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보로 상기 업스케일용 DNN를 설정할 수 있다.The processor may set the upscaling DNN as selected upscaling DNN information from among a plurality of upscaling DNN information based on quantization parameter information obtained from the image data of the main bitstream.

상기 메인 비트스트림은 소정의 코덱에서 정의된 비디오 비트스트림 내 소정의 메인 비트스트림 영역에 포함되고, 상기 서브 비트스트림은 소정의 코덱에서 정의된 비디오 비트스트림 내 소정의 서브 비트스트림 영역에 포함될 수 있다.The main bitstream may be included in a predetermined main bitstream area in a video bitstream defined by a predetermined codec, and the sub bitstream may be included in a predetermined sub bitstream area in a video bitstream defined in a predetermined codec. .

상기 서브 비트스트림은 SEI(Supplemental Enhancement Information) 메시지일 수 있다.The sub-bitstream may be a Supplemental Enhancement Information (SEI) message.

상기 SEI 메시지는 소정의 표준에 의해 등록된 사용자 데이터 또는 UUID(Universally Unique Identifier)에 의해 식별되는 등록되지 않은(Unregistered) 사용자 데이터를 포함하는 SEI 메시지일 수 있다.The SEI message may be an SEI message including user data registered according to a predetermined standard or unregistered user data identified by a Universally Unique Identifier (UUID).

상기 서브 비트스트림은 메타데이터 OBU(Open Bitstream Unit)일 수 있다.The sub-bitstream may be metadata Open Bitstream Unit (OBU).

일 실시예에 따른 AI 부호화 장치는, AI encoding apparatus according to an embodiment,

하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고,at least one processor executing one or more instructions;

상기 프로세서는,The processor is

원본 영상의 AI 다운스케일 여부를 결정하고, Decide whether to downscale the original video by AI,

상기 결정 결과를 기초로, 다운스케일용 DNN을 이용하여 상기 원본 영상으로부터 AI 다운스케일된 제 1 영상을 획득하고,Based on the determination result, an AI downscaled first image is obtained from the original image using a downscale DNN,

상기 제 1 영상을 제 1 부호화하여 영상 데이터를 획득하고,Obtaining image data by first encoding the first image,

상기 원본 영상의 AI 다운스케일 여부에 대응하는 AI 업스케일 여부를 나타내는 AI 업스케일 활성화 플래그 정보를 생성하고, generating AI upscaling activation flag information indicating whether AI upscaling corresponding to AI downscaling of the original video;

상기 원본 영상에 대해 상기 AI 다운스케일을 수행하는 것으로 결정된 경우, 상기 AI 다운스케일에 대응하는 AI 업스케일과 관련된 AI 서브 데이터를 생성하고,If it is determined to perform the AI downscaling on the original image, generate AI sub data related to AI upscaling corresponding to the AI downscaling,

상기 AI 업스케일 활성화 플래그 정보 및 상기 AI 서브 데이터를 포함하는 AI 데이터를 생성하고,generating AI data including the AI upscale activation flag information and the AI sub data;

상기 영상 데이터를 포함하는 메인 비트스트림과 상기 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 생성하고,generating a video bitstream including a main bitstream including the image data and a sub bitstream including the AI data,

상기 비디오 비트스트림을 전송하고,transmit the video bitstream;

상기 영상 데이터의 적어도 일부 및 상기 AI 업스케일과 관련된 AI 서브 데이터의 적어도 일부 중 적어도 하나는 미리 저장된 복수의 업스케일용 DNN 설정 정보 중 업스케일용 DNN 설정 정보를 선택하기 위해 이용되는 정보이고, At least one of at least a part of the image data and at least a part of the AI sub data related to the AI upscaling is information used to select DNN setting information for upscaling from among a plurality of pre-stored DNN setting information for upscaling,

상기 선택된 업스케일용 DNN 설정 정보로 AI 업스케일에 이용되는 업스케일용 DNN이 설정될 수 있다.The DNN for upscaling used for AI upscaling may be set as the selected DNN for upscaling configuration information.

일 실시예에 따른 AI 부호화 방법은, AI encoding method according to an embodiment,

원본 영상의 AI 다운스케일 여부를 결정하는 단계;determining whether to downscale the original video by AI;

상기 결정 결과를 기초로, 다운스케일용 DNN을 이용하여 상기 원본 영상으로부터 AI 다운스케일된 제 1 영상을 획득하는 단계; obtaining an AI downscaled first image from the original image using a downscaling DNN based on the determination result;

상기 제 1 영상을 제 1 부호화하여 영상 데이터를 획득하는 단계; obtaining image data by first encoding the first image;

상기 원본 영상의 AI 다운스케일 여부에 대응하는 AI 업스케일 여부를 나타내는 AI 업스케일 활성화 플래그 정보를 생성하고, 상기 원본 영상에 대해 상기 AI 다운스케일을 수행하는 것으로 결정된 경우, 상기 AI 다운스케일에 대응하는 AI 업스케일과 관련된 AI 서브 데이터를 생성하는 단계; Generates AI upscaling activation flag information indicating whether AI upscaling corresponding to AI downscaling of the original video, and when it is determined to perform the AI downscaling on the original video, corresponding to the AI downscaling generating AI sub data related to AI upscaling;

상기 AI 업스케일 활성화 플래그 정보 및 상기 AI 서브 데이터를 포함하는 AI 데이터를 생성하는 단계;generating AI data including the AI upscale activation flag information and the AI sub data;

상기 영상 데이터를 포함하는 메인 비트스트림과 상기 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 생성하는 단계; 및 generating a video bitstream including a main bitstream including the image data and a sub bitstream including the AI data; and

상기 비디오 비트스트림을 전송하는 단계를 포함하고, transmitting the video bitstream;

상기 영상 데이터의 적어도 일부 및 상기 AI 업스케일과 관련된 AI 서브 데이터의 적어도 일부 중 적어도 하나는 미리 저장된 복수의 업스케일용 DNN 설정 정보 중 업스케일용 DNN 설정 정보를 선택하기 위해 이용되는 정보이고, At least one of at least a part of the image data and at least a part of the AI sub data related to the AI upscaling is information used to select DNN setting information for upscaling from among a plurality of pre-stored DNN setting information for upscaling,

상기 선택된 업스케일용 DNN 설정 정보로 AI 업스케일에 이용되는 업스케일용 DNN이 설정될 수 있다.The DNN for upscaling used for AI upscaling may be set as the selected DNN for upscaling configuration information.

일 실시예에 따른 AI 복호화 방법은, AI decoding method according to an embodiment,

제 1 영상의 제 1 부호화 결과 획득된 영상 데이터를 포함하는 메인 비트스트림 및 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 획득하는 단계;obtaining a video bitstream including a main bitstream including image data obtained as a result of a first encoding of a first image and a sub bitstream including AI data;

상기 메인 비트스트림에 포함된 영상 데이터를 제 1 복호화하여 상기 제 1 영상에 대응하는 제 2 영상을 획득하는 단계;obtaining a second image corresponding to the first image by first decoding image data included in the main bitstream;

상기 서브 비트스트림의 AI 데이터에 포함된 AI 업스케일 활성화 플래그 정보를 획득하고, Obtaining AI upscaling activation flag information included in AI data of the sub-bitstream,

상기 AI 업스케일 활성화 플래그 정보를 기초로, 상기 제 2 영상에 대한 AI 업스케일 수행 여부를 결정하는 단계; determining whether to perform AI upscaling on the second image based on the AI upscaling activation flag information;

상기 제 2 영상에 대해 AI 업스케일을 수행하는 것으로 결정된 경우, When it is determined to perform AI upscaling on the second image,

상기 영상 데이터의 적어도 일부 및 상기 서브 비트스트림에 포함된 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN을 통해, 상기 제 2 영상으로부터 AI 업스케일된 제 3 영상을 획득하는 단계;Upscaling DNN set according to selected upscaling DNN information from among a plurality of upscaling DNN information stored in advance based on at least one of at least one of at least a part of the image data and at least one of the AI sub data included in the sub bitstream through, acquiring an AI upscaled third image from the second image;

상기 제 3 영상이 획득된 경우, 상기 제 3 영상을 출력하는 단계; 및outputting the third image when the third image is obtained; and

상기 제 2 영상에 대해 상기 AI 업스케일을 수행하지 않는 것으로 결정된 경우, 상기 제 2 영상을 출력하는 단계를 포함하고,outputting the second image when it is determined not to perform the AI upscaling on the second image;

상기 AI 업스케일 활성화 플래그 정보는 상기 제 2 영상에 AI 업스케일을 수행하는지 여부를 나타낼 수 있다.The AI upscaling activation flag information may indicate whether AI upscaling is performed on the second image.

일 실시예에 따른 AI 복호화 장치는, AI decoding apparatus according to an embodiment,

하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고,at least one processor executing one or more instructions;

상기 프로세서는,The processor is

제 1 영상의 제 1 부호화 결과 획득된 영상 데이터 및 AI 데이터를 포함하는 비디오 비트스트림을 획득하고,Obtaining a video bitstream including image data and AI data obtained as a result of the first encoding of the first image,

상기 영상 데이터를 제 1 복호화하여 상기 제 1 영상에 대응하는 제 2 영상을 획득하고,obtaining a second image corresponding to the first image by first decoding the image data;

상기 AI 데이터에 포함된 AI 업스케일 활성화 플래그 정보를 획득하고, 상기 AI 업스케일 활성화 플래그 정보를 기초로 상기 제 2 영상에 대한 AI 업스케일 수행 여부를 결정하고,obtaining AI upscaling activation flag information included in the AI data, and determining whether to perform AI upscaling on the second image based on the AI upscaling activation flag information;

상기 제 2 영상에 대해 AI 업스케일을 수행하는 것으로 결정된 경우,When it is determined to perform AI upscaling on the second image,

상기 영상 데이터의 적어도 일부 및 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로, 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN을 통해, 상기 제 2 영상으로부터 AI 업스케일된 제 3 영상을 획득하고,Based on at least one of at least a portion of the image data and at least a portion of the AI sub-data, through the upscaling DNN set according to the upscaling DNN information selected from among a plurality of pre-stored upscaling DNN information, the second image Acquire the AI upscaled third image from

상기 제 3 영상이 획득된 경우, 상기 제 3 영상을 출력하고,When the third image is obtained, output the third image,

상기 제 2 영상에 대해 상기 AI 업스케일을 수행하지 않는 것으로 결정된 경우, 상기 제 2 영상을 출력하고,When it is determined not to perform the AI upscaling on the second image, the second image is output,

상기 AI 업스케일 활성화 플래그 정보는 상기 제 2 영상에 AI 업스케일을 수행하는지 여부를 나타내고,The AI upscaling activation flag information indicates whether AI upscaling is performed on the second image,

상기 AI 데이터는 상기 영상 데이터와 관련된 부호화 파라미터를 포함하는 소정의 데이터 단위의 헤더에 포함된다.The AI data is included in a header of a predetermined data unit including an encoding parameter related to the image data.

일 실시예에 따른 AI 복호화 장치는, AI decoding apparatus according to an embodiment,

하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고,at least one processor executing one or more instructions;

상기 프로세서는,The processor is

제 1 영상의 제 1 부호화 결과 획득된 영상 데이터와 AI 데이터를 포함하는 AI 부호화 데이터를 포함하는 비디오 파일을 획득하고,Obtaining a video file including AI-encoded data including image data obtained as a result of the first encoding of the first image and AI data,

상기 영상 데이터를 제 1 복호화하여 상기 제 1 영상에 대응하는 제 2 영상을 획득하고,obtaining a second image corresponding to the first image by first decoding the image data;

상기 AI 데이터에 포함된 AI 업스케일 활성화 플래그 정보를 획득하고, 상기 AI 업스케일 활성화 플래그 정보를 기초로 상기 제 2 영상에 대한 AI 업스케일 수행 여부를 결정하고,obtaining AI upscaling activation flag information included in the AI data, and determining whether to perform AI upscaling on the second image based on the AI upscaling activation flag information;

상기 제 2 영상에 대해 AI 업스케일을 수행하는 것으로 결정된 경우,When it is determined to perform AI upscaling on the second image,

상기 영상 데이터의 적어도 일부 및 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN을 통해, 상기 제 2 영상으로부터 AI 업스케일된 제 3 영상을 획득하고,From the second image through the upscaling DNN set according to the selected upscaling DNN information from among a plurality of upscaling DNN information stored in advance based on at least one of at least one of at least a portion of the image data and at least one of the AI sub data Acquire the AI upscaled third image,

상기 제 3 영상이 획득된 경우, 상기 제 3 영상을 출력하고,When the third image is obtained, output the third image,

상기 제 2 영상에 대해 상기 AI 업스케일을 수행하지 않는 것으로 결정된 경우, 상기 제 2 영상을 출력하고,When it is determined not to perform the AI upscaling on the second image, the second image is output,

상기 AI 업스케일 활성화 플래그 정보는 상기 제 2 영상에 AI 업스케일을 수행하는지 여부를 나타내고,The AI upscaling activation flag information indicates whether AI upscaling is performed on the second image,

상기 비디오 파일은 상기 영상 데이터를 포함하는 미디어 데이터 박스; 및 상기 영상 데이터에 관한 메타 데이터를 포함하는 메타 데이터 박스를 포함하고, 상기 메타 데이터 박스는 상기 AI 데이터를 포함한다.The video file may include: a media data box including the image data; and a metadata box including metadata regarding the image data, wherein the metadata box includes the AI data.

일 실시예에 따른 AI 부호화 장치는, AI encoding apparatus according to an embodiment,

하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고,at least one processor executing one or more instructions;

상기 프로세서는, 원본 영상의 AI 다운스케일 여부를 결정하고, The processor determines whether AI downscale of the original image,

상기 결정 결과를 기초로, 다운스케일용 DNN을 이용하여 상기 원본 영상으로부터 AI 다운스케일된 제 1 영상을 획득하고,Based on the determination result, an AI downscaled first image is obtained from the original image using a downscale DNN,

상기 제 1 영상을 제 1 부호화하여 영상 데이터를 획득하고,Obtaining image data by first encoding the first image,

상기 원본 영상의 AI 다운스케일 여부에 대응하는 AI 업스케일 여부를 나타내는 AI 업스케일 활성화 플래그 정보를 생성하고, generating AI upscaling activation flag information indicating whether AI upscaling corresponding to AI downscaling of the original video;

상기 원본 영상에 대해 상기 AI 다운스케일을 수행하는 것으로 결정된 경우, 상기 AI 다운스케일에 대응하는 AI 업스케일과 관련된 AI 서브 데이터를 생성하고,When it is determined to perform the AI downscaling on the original image, generate AI sub data related to AI upscaling corresponding to the AI downscaling,

상기 AI 업스케일 활성화 플래그 정보 및 상기 AI 서브 데이터를 포함하는 AI 데이터를 생성하고,generating AI data including the AI upscale activation flag information and the AI sub data;

상기 영상 데이터 및 상기 AI 데이터를 포함하는 AI 부호화 데이터를 포함하는 비디오 파일을 전송하고,Transmitting a video file including AI-encoded data including the image data and the AI data,

상기 영상 데이터의 적어도 일부 및 상기 AI 업스케일과 관련된 AI 서브 데이터의 적어도 일부 중 적어도 하나는 미리 저장된 복수의 업스케일용 DNN 설정 정보 중 업스케일용 DNN 설정 정보를 선택하기 위해 이용되는 정보이고, At least one of at least a part of the image data and at least a part of the AI sub data related to the AI upscaling is information used to select DNN setting information for upscaling from among a plurality of pre-stored DNN setting information for upscaling,

상기 선택된 업스케일용 DNN 설정 정보로 AI 업스케일에 이용되는 업스케일용 DNN이 설정되고,The DNN for upscaling used for AI upscaling is set as the selected DNN for upscaling setting information,

상기 비디오 파일은 상기 영상 데이터를 포함하는 미디어 데이터 박스; 및 상기 영상 데이터에 관한 메타 데이터를 포함하는 메타 데이터 박스를 포함하고, 상기 메타 데이터 박스는 상기 AI 데이터를 포함한다.The video file may include: a media data box including the image data; and a metadata box including metadata regarding the image data, wherein the metadata box includes the AI data.

일 실시예에 따른 AI 부호화 데이터를 포함하는 비디오 비트스트림이 저장된 컴퓨터로 기록가능한 기록 매체는, 상기 비디오 비트스트림은, A computer-recordable recording medium storing a video bitstream including AI-encoded data according to an embodiment, the video bitstream comprising:

원본 영상을 AI 다운스케일하여 획득된 제 1 영상의 부호화 정보를 포함하는 메인 비트스트림; 및 제 2 영상의 AI 업스케일에 대한 AI 데이터를 포함하는 서브 비트스트림을 포함하고, 상기 제 2 영상은 상기 메인 비트스트림에 포함된 제1 영상의 부호화 정보를 복호화하여 획득된, 상기 제 1 영상의 대응 영상이고, a main bitstream including encoding information of a first image obtained by AI downscaling the original image; and a sub-bitstream including AI data for AI upscaling of a second image, wherein the second image is obtained by decoding encoding information of a first image included in the main bitstream. is the corresponding video of

상기 서브 비트스트림은,The sub-bitstream is

상기 제 2 영상에 대한 AI 업스케일 수행 여부를 나타내는 AI 업스케일 활성화 플래그 정보; 및AI upscaling activation flag information indicating whether AI upscaling is performed on the second image; and

상기 제 2 영상에 대한 AI 업스케일이 수행되는 경우, 미리 저장된 복수의 업스케일용 DNN 정보 중 업스케일용 DNN 정보를 선택하기 위해 이용되는 AI 서브 데이터를 포함할 수 있다.일 실시예에 따른 컴퓨터로 읽을 수 있는 기록매체는, 상기 개시된 방법을 실행하기 위한 프로그램을 기록할 수 있다.When AI upscaling of the second image is performed, AI sub data used to select upscaling DNN information from among a plurality of pre-stored upscaling DNN information may be included. Computer according to an embodiment The readable recording medium may record a program for executing the disclosed method.

본 명세서에서 인용되는 도면을 보다 충분히 이해하기 위하여 각 도면의 간단한 설명이 제공된다.
도 1은 일 실시예에 따른 AI 부호화 과정 및 AI 복호화 과정을 설명하기 위한 도면이다.
도 2는 일 실시예에 따른 AI 복호화 장치의 구성을 나타내는 블록도이다.
도 3은 제 2 영상의 AI 업스케일을 위한 제 2 DNN을 나타내는 예시적인 도면이다.
도 4는 컨볼루션 레이어에 의한 컨볼루션 연산을 설명하기 위한 도면이다.
도 5는 여러 영상 관련 정보들과 여러 DNN 설정 정보들 사이의 매핑 관계를 나타내는 예시적인 도면이다.
도 6은 복수의 프레임으로 구성된 제 2 영상을 도시하는 도면이다.
도 7은 일 실시예에 따른 AI 부호화 장치의 구성을 나타내는 블록도이다.
도 8은 원본 영상의 AI 다운스케일을 위한 제 1 DNN을 나타내는 예시적인 도면이다.
도 9는 일 실시예에 따른 AI 부호화 데이터의 구조를 나타내는 도면이다.
도 10은 다른 실시예에 따른 AI 부호화 데이터의 구조를 나타내는 도면이다.
도 11은 제 1 DNN 및 제 2 DNN을 훈련시키는 방법을 설명하기 위한 도면이다.
도 12는 훈련 장치에 의한 제 1 DNN 및 제 2 DNN의 훈련 과정을 설명하기 위한 도면이다.
도 13a는 일 실시예에 따른 AI 복호화 장치(1300)의 구성을 도시하는 블록도이다.
도 13b는 다른 실시예에 따른 AI 복호화 장치(1350)의 구성을 도시하는 블록도이다.
도 14a는 일 실시예에 따른 AI 부호화 장치(1400)의 구성을 도시하는 블록도이다.
도 14b는 다른 실시예에 따른 AI 부호화 장치(1450)의 구성을 도시하는 블록도이다.
도 15a는 일 실시예에 따른 AI 복호화 방법을 설명하기 위한 순서도이다.
도 15b는 다른 실시예에 따른 AI 복호화 방법을 설명하기 위한 순서도이다.
도 16a는 일 실시예에 따른 AI 부호화 방법을 설명하기 위한 순서도이다.
도 16b는 다른 실시예에 따른 AI 부호화 방법을 설명하기 위한 순서도이다.
도 17는 영상 데이터(1700)와 AI 데이터(1740)의 구조와 함께, 영상 데이터(1700)와 AI 데이터(1740)의 상응 관계를 설명한다.
도 18은 AI 데이터 및 영상 데이터를 포함하는 비디오 비트스트림의 일 실시 예를 도시한다.
도 19는 단일 파일 내에서 AI 데이터와 영상 데이터가 분리되어 있는 경우의 AI 부호화 데이터의 일 실시 예를 도시한다.
도 20a는 AI 데이터가 영상 데이터에 삽입된 경우의 AI 부호화 데이터의 일 실시 예를 도시한다.
도 20b는 AI 데이터가 영상 데이터에 삽입된 경우의 AI 부호화 데이터의 다른 실시 예를 도시한다.
도 20c는 일부 AI 데이터가 영상 데이터에 삽입되고 나머지 AI 데이터는 영상 데이터와 분리된 경우의 AI 부호화 데이터의 일 실시 예를 도시한다.
도 21은 도 19와 같이 AI 데이터와 영상 데이터가 분리된 경우, 비디오 세그먼트 단위로 분할된 AI 부호화 데이터의 일 실시 예를 도시한다.
도 22는 2개의 별도 파일로 전송되는 AI 데이터(2240)와 영상 데이터(200)의 일 실시 예를 도시한다.
도 23은 일 실시예에 따른 SEI 메시지의 구조를 도시한 도면이다.
도 24은 일 실시예에 따른, AI 데이터를 포함하는 신택스 구조 테이블을 나타낸다.
도 25는 일 실시예에 따른, 비트스트림 기반 AI 부호화 장치 및 AI 복호화 장치의 동작을 설명하기 위한 도면이다.
도 26은 여러 영상 관련 정보들과 여러 DNN 설정 정보들 사이의 매핑 관계를 나타내는 예시적인 도면이다.
도 27은, 일 실시예에 따라, 영상의 적어도 일부의 대표 QP 값을 기초로 양자화 파라미터의 지시자(또는 레벨) 정보를 결정하는 것을 설명하기 위한 도면이다.
도 28은 QP 값과 여러 DNN 설정 정보들 사이의 매핑 관계를 나타내는 예시적인 도면이다.
In order to more fully understand the drawings cited herein, a brief description of each drawing is provided.
1 is a diagram for explaining an AI encoding process and an AI decoding process according to an embodiment.
2 is a block diagram illustrating a configuration of an AI decoding apparatus according to an embodiment.
3 is an exemplary diagram illustrating a second DNN for AI upscaling of a second image.
4 is a diagram for explaining a convolution operation using a convolution layer.
5 is an exemplary diagram illustrating a mapping relationship between various pieces of image-related information and various pieces of DNN configuration information.
6 is a diagram illustrating a second image composed of a plurality of frames.
7 is a block diagram illustrating a configuration of an AI encoding apparatus according to an embodiment.
8 is an exemplary diagram illustrating a first DNN for AI downscaling of an original video.
9 is a diagram illustrating a structure of AI encoded data according to an embodiment.
10 is a diagram illustrating a structure of AI encoded data according to another embodiment.
11 is a diagram for explaining a method of training a first DNN and a second DNN.
12 is a diagram for explaining a training process of a first DNN and a second DNN by a training apparatus.
13A is a block diagram illustrating a configuration of an AI decoding apparatus 1300 according to an embodiment.
13B is a block diagram illustrating a configuration of an AI decoding apparatus 1350 according to another embodiment.
14A is a block diagram illustrating a configuration of an AI encoding apparatus 1400 according to an embodiment.
14B is a block diagram illustrating the configuration of an AI encoding apparatus 1450 according to another embodiment.
15A is a flowchart illustrating an AI decoding method according to an embodiment.
15B is a flowchart illustrating an AI decoding method according to another embodiment.
16A is a flowchart illustrating an AI encoding method according to an embodiment.
16B is a flowchart illustrating an AI encoding method according to another embodiment.
17 illustrates the corresponding relationship between the image data 1700 and the AI data 1740, along with the structures of the image data 1700 and the AI data 1740. In FIG.
18 illustrates an embodiment of a video bitstream including AI data and image data.
19 shows an embodiment of AI encoded data when AI data and image data are separated in a single file.
20A illustrates an example of AI encoded data when AI data is inserted into image data.
20B illustrates another embodiment of AI encoded data when AI data is inserted into image data.
20C illustrates an embodiment of AI-encoded data when some AI data is inserted into image data and the remaining AI data is separated from image data.
21 illustrates an embodiment of AI encoded data divided into video segment units when AI data and image data are separated as shown in FIG. 19 .
22 illustrates an embodiment of AI data 2240 and image data 200 transmitted as two separate files.
23 is a diagram illustrating a structure of an SEI message according to an embodiment.
24 illustrates a syntax structure table including AI data, according to an embodiment.
25 is a diagram for explaining operations of a bitstream-based AI encoding apparatus and an AI decoding apparatus according to an embodiment.
26 is an exemplary diagram illustrating a mapping relationship between various pieces of image-related information and various pieces of DNN configuration information.
27 is a diagram for explaining determining indicator (or level) information of a quantization parameter based on a representative QP value of at least a part of an image, according to an embodiment.
28 is an exemplary diagram illustrating a mapping relationship between a QP value and various pieces of DNN configuration information.

본 개시는 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고, 이를 상세한 설명을 통해 상세히 설명하고자 한다. 그러나, 이는 본 개시의 실시 형태에 대해 한정하려는 것이 아니며, 본 개시는 여러 실시예들의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Since the present disclosure can make various changes and can have various embodiments, specific embodiments are illustrated in the drawings and will be described in detail through the detailed description. However, this is not intended to limit the embodiments of the present disclosure, and it should be understood that the present disclosure includes all modifications, equivalents and substitutes included in the spirit and scope of various embodiments.

실시예를 설명함에 있어서, 관련된 공지 기술에 대한 구체적인 설명이 본 개시의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 명세서의 설명 과정에서 이용되는 숫자(예를 들어, 제 1, 제 2 등)는 하나의 구성요소를 다른 구성요소와 구분하기 위한 식별기호에 불과하다.In describing the embodiment, if it is determined that a detailed description of a related known technology may unnecessarily obscure the subject matter of the present disclosure, the detailed description thereof will be omitted. In addition, numbers (eg, first, second, etc.) used in the description process of the specification are only identifiers for distinguishing one component from other components.

또한, 본 명세서에서, 일 구성요소가 다른 구성요소와 "연결된다" 거나 "접속된다" 등으로 언급된 때에는, 상기 일 구성요소가 상기 다른 구성요소와 직접 연결되거나 또는 직접 접속될 수도 있지만, 특별히 반대되는 기재가 존재하지 않는 이상, 중간에 또 다른 구성요소를 매개하여 연결되거나 또는 접속될 수도 있다고 이해되어야 할 것이다.In addition, in this specification, when a component is referred to as "connected" or "connected" with another component, the component may be directly connected or directly connected to the other component, but in particular It should be understood that, unless there is a description to the contrary, it may be connected or connected through another element in the middle.

또한, 본 명세서에서 '~부(유닛)', '모듈' 등으로 표현되는 구성요소는 2개 이상의 구성요소가 하나의 구성요소로 합쳐지거나 또는 하나의 구성요소가 보다 세분화된 기능별로 2개 이상으로 분화될 수도 있다. 또한, 이하에서 설명할 구성요소 각각은 자신이 담당하는 주기능 이외에도 다른 구성요소가 담당하는 기능 중 일부 또는 전부의 기능을 추가적으로 수행할 수도 있으며, 구성요소 각각이 담당하는 주기능 중 일부 기능이 다른 구성요소에 의해 전담되어 수행될 수도 있음은 물론이다.In addition, in the present specification, components expressed as '~ part (unit)', 'module', etc. are two or more components combined into one component, or two or more components for each more subdivided function. may be differentiated into In addition, each of the components to be described below may additionally perform some or all of the functions of other components in addition to the main functions that each component is responsible for, and some of the main functions of each of the components may have different functions. It goes without saying that it may be performed exclusively by the component.

또한, 본 명세서에서, '영상(image)' 또는 '픽처'는 정지영상, 복수의 연속된 정지영상(또는 프레임)으로 구성된 동영상, 또는 비디오를 나타낼 수 있다.Also, in this specification, an 'image' or 'picture' may indicate a still image, a moving picture composed of a plurality of continuous still images (or frames), or a video.

또한, 본 명세서에서 'DNN(deep neural network)'은 뇌 신경을 모사한 인공신경망 모델의 대표적인 예시로서, 특정 알고리즘을 사용한 인공신경망 모델로 한정되지 않는다.In addition, in the present specification, a 'deep neural network (DNN)' is a representative example of an artificial neural network model simulating a brain nerve, and is not limited to an artificial neural network model using a specific algorithm.

또한, 본 명세서에서 '파라미터'는 뉴럴 네트워크를 이루는 각 레이어의 연산 과정에서 이용되는 값으로서 예를 들어, 입력 값을 소정 연산식에 적용할 때 이용되는 가중치를 포함할 수 있다. 파라미터는 매트릭스 형태로 표현될 수 있다. 파라미터는 훈련의 결과로 설정되는 값으로서, 필요에 따라 별도의 훈련 데이터(training data)를 통해 갱신될 수 있다.Also, in the present specification, a 'parameter' is a value used in a calculation process of each layer constituting a neural network, and may include, for example, a weight used when an input value is applied to a predetermined calculation expression. The parameter may be expressed in a matrix form. A parameter is a value set as a result of training, and may be updated through separate training data if necessary.

또한, 본 명세서에서 '제 1 DNN'은 영상의 AI 다운스케일을 위해 이용되는 DNN을 의미하고, '제 2 DNN'은 영상의 AI 업스케일을 위해 이용되는 DNN을 의미한다.In addition, in this specification, 'first DNN' means a DNN used for AI downscaling of an image, and 'second DNN' means a DNN used for AI upscaling of an image.

또한, 본 명세서에서 'DNN 설정 정보'는 DNN을 구성하는 요소와 관련된 정보로서 전술한 파라미터를 포함한다. DNN 설정 정보를 이용하여 제 1 DNN 또는 제 2 DNN이 설정될 수 있다.In addition, in the present specification, 'DNN configuration information' includes the aforementioned parameters as information related to elements constituting the DNN. The first DNN or the second DNN may be configured using the DNN configuration information.

또한, 본 명세서에서 '원본 영상'은 AI 부호화의 대상이 되는 영상을 의미하고, '제 1 영상'은 AI 부호화 과정에서 원본 영상의 AI 다운스케일 결과 획득된 영상을 의미한다. 또한, '제 2 영상'은 AI 복호화 과정에서 제 1 복호화를 통해 획득된 영상을 의미하고, '제 3 영상'은 AI 복호화 과정에서 제 2 영상을 AI 업스케일하여 획득된 영상을 의미한다.In addition, in this specification, the 'original image' refers to an image to be subjected to AI encoding, and the 'first image' refers to an image obtained as a result of AI downscaling of the original image in the AI encoding process. In addition, the 'second image' refers to an image obtained through the first decoding in the AI decoding process, and the 'third image' refers to an image obtained by AI upscaling the second image in the AI decoding process.

또한, 본 명세서에서 'AI 다운스케일'은 AI 기반으로 영상의 해상도를 감소시키는 처리를 의미하고, '제 1 부호화'는 주파수 변환 기반의 영상 압축 방법에 의한 부호화 처리를 의미한다. 또한, '제 1 복호화'는 주파수 변환 기반의 영상 복원 방법에 의한 복호화 처리를 의미하고, 'AI 업스케일'은 AI 기반으로 영상의 해상도를 증가시키는 처리를 의미한다.In addition, in this specification, 'AI downscaling' refers to a process of reducing the resolution of an image based on AI, and 'first encoding' refers to an encoding process by a frequency transform-based image compression method. In addition, 'first decoding' refers to a decoding process by a frequency transformation-based image restoration method, and 'AI upscaling' refers to a process of increasing the resolution of an image based on AI.

도 1은 일 실시예에 따른 AI(artificial intelligence) 부호화 과정 및 AI 복호화 과정을 설명하기 위한 도면이다.1 is a diagram for explaining an artificial intelligence (AI) encoding process and an AI decoding process according to an embodiment.

전술한 바와 같이, 영상의 해상도가 급격히 커짐에 따라 부호화/복호화를 위한 정보 처리량이 많아지게 되고, 이에 따라 영상의 부호화 및 복호화 효율을 향상시키기 위한 방안이 필요하다. As described above, as the resolution of an image rapidly increases, the amount of information processing for encoding/decoding increases. Accordingly, a method for improving encoding and decoding efficiency of an image is required.

도 1에 도시된 바와 같이, 본 개시의 일 실시예에 따르면, 해상도가 큰 원본 영상(105)을 AI 다운스케일(110)하여 제 1 영상(115)을 획득한다. 그리고, 상대적으로 작은 해상도의 제 1 영상(115)을 대상으로 하여 제 1 부호화(120) 및 제 1 복호화(130)를 수행하므로, 원본 영상(105)을 대상으로 하여 제 1 부호화(120) 및 제 1 복호화(130)를 수행하는 경우에 비해 비트레이트를 크게 감소시킬 수 있다. As shown in FIG. 1 , according to an embodiment of the present disclosure, a first image 115 is acquired by AI downscaling 110 of an original image 105 having a high resolution. In addition, since the first encoding 120 and the first decoding 130 are performed on the first image 115 of a relatively small resolution, the first encoding 120 and Compared to the case of performing the first decoding 130 , the bit rate may be greatly reduced.

도 1을 참조하여 상세히 설명하면, 일 실시예는 AI 부호화 과정에서, 원본 영상(105)을 AI 다운스케일(110)하여 제 1 영상(115)을 획득하고, 제 1 영상(115)을 제 1 부호화(120)한다. AI 복호화 과정에서는, AI 부호화 결과 획득된 AI 데이터와 영상 데이터를 포함하는 AI 부호화 데이터를 수신하고, 제 1 복호화(130)를 통해 제 2 영상(135)을 획득하고, 제 2 영상(135)을 AI 업스케일(140)하여 제 3 영상(145)을 획득한다.1 , in an embodiment, in the AI encoding process, the original image 105 is AI downscaled 110 to obtain a first image 115 , and the first image 115 is first Encoding (120). In the AI decoding process, AI encoding data including AI data and image data obtained as a result of AI encoding is received, a second image 135 is obtained through the first decoding 130, and the second image 135 is A third image 145 is obtained by AI upscaling 140 .

AI 부호화 과정을 좀 더 상세히 살펴보면, 원본 영상(105)을 입력받으면, 소정 해상도 및/또는 소정 화질의 제 1 영상(115)을 획득하기 위해 원본 영상(105)을 AI 다운스케일(110)한다. 이때, AI 다운스케일(110)은 AI 기반으로 수행되는데, AI 다운스케일(110)을 위한 AI는 제 2 영상(135)의 AI 업스케일(140)을 위한 AI와 연계되어 훈련되어야(joint trained) 한다. 왜냐하면, AI 다운스케일(110)을 위한 AI와 AI 업스케일(140)을 위한 AI가 분리되어 훈련되는 경우, AI 부호화 대상인 원본 영상(105)과 AI 복호화를 통해 복원된 제 3 영상(145) 사이의 차이가 커지게 되기 때문이다.Looking at the AI encoding process in more detail, when the original image 105 is input, the original image 105 is AI downscaled 110 to obtain the first image 115 of a predetermined resolution and/or a predetermined image quality. At this time, the AI downscaling 110 is performed based on AI, the AI for the AI downscaling 110 must be trained in connection with the AI for the AI upscaling 140 of the second image 135 (joint trained) do. Because, when the AI for the AI downscaling 110 and the AI for the AI upscaling 140 are separately trained, between the original image 105 that is the AI encoding target and the third image 145 restored through AI decoding because the difference between

본 개시의 실시예에서는, AI 부호화 과정과 AI 복호화 과정에서 이러한 연계 관계를 유지하기 위해, AI 데이터를 이용할 수 있다. 따라서, AI 부호화 과정을 통해 획득된 AI 데이터는 업스케일 타겟을 나타내는 정보를 포함하여야 하고, AI 복호화 과정에서는 AI 데이터에 기초하여 확인되는 업스케일 타겟에 따라 제 2 영상(135)을 AI 업스케일(140)하여야 한다.In an embodiment of the present disclosure, AI data may be used in order to maintain this linkage in the AI encoding process and the AI decoding process. Therefore, the AI data obtained through the AI encoding process should include information indicating the upscale target, and in the AI decoding process, the second image 135 is AI upscaled ( 140) should be done.

AI 다운스케일(110)을 위한 AI 및 AI 업스케일(140)을 위한 AI는 DNN(deep neural network)으로 구현될 수 있다. 도 11을 참조하여 후술하는 바와 같이, 제 1 DNN과 제 2 DNN은 소정 타겟 하에 손실 정보의 공유를 통해 연계 훈련되므로, AI 부호화 장치는 제 1 DNN과 2 DNN이 연계 훈련할 때 이용된 타겟 정보를 AI 복호화 장치로 제공하고, AI 복호화 장치는 제공받은 타겟 정보에 기초하여 제 2 영상(135)을 타겟하는 화질 및/또는 해상도로 AI 업스케일(140)할 수 있다.AI for AI downscaling 110 and AI for AI upscaling 140 may be implemented as a deep neural network (DNN). As will be described later with reference to FIG. 11 , since the first DNN and the second DNN are jointly trained through sharing of loss information under a predetermined target, the AI encoding apparatus uses target information used when the first DNN and the second DNN are jointly trained. is provided to the AI decoding apparatus, and the AI decoding apparatus may upscale the AI to the image quality and/or resolution targeting the second image 135 based on the received target information.

도 1에 도시된 제 1 부호화(120) 및 제 1 복호화(130)에 대해 상세히 설명하면, 원본 영상(105)으로부터 AI 다운스케일(110)된 제 1 영상(115)은 제 1 부호화(120)를 통해 정보량이 감축될 수 있다. 제 1 부호화(120)는, 제 1 영상(115)을 예측하여 예측 데이터를 생성하는 과정, 제 1 영상(115)과 예측 데이터 사이의 차이에 해당하는 잔차 데이터를 생성하는 과정, 공간 영역 성분인 잔차 데이터를 주파수 영역 성분으로 변환(transformation)하는 과정, 주파수 영역 성분으로 변환된 잔차 데이터를 양자화(quantization)하는 과정 및 양자화된 잔차 데이터를 엔트로피 부호화하는 과정 등을 포함할 수 있다. 이와 같은 제 1 부호화 과정(120)은 MPEG-2, H.264 AVC(Advanced Video Coding), MPEG-4, HEVC(High Efficiency Video Coding), VC-1, VP8, VP9 및 AV1(AOMedia Video 1) 등 주파수 변환을 이용한 영상 압축 방법들 중의 하나를 통해 구현될 수 있다.When the first encoding 120 and the first decoding 130 shown in FIG. 1 are described in detail, the first image 115 AI downscaled 110 from the original image 105 is the first encoding 120 . can reduce the amount of information. The first encoding 120 includes a process of predicting the first image 115 to generate prediction data, a process of generating residual data corresponding to a difference between the first image 115 and the prediction data, and a spatial domain component. It may include a process of transforming the residual data into a frequency domain component, a process of quantizing the residual data transformed into a frequency domain component, and a process of entropy encoding the quantized residual data. Such a first encoding process 120 is MPEG-2, H.264 Advanced Video Coding (AVC), MPEG-4, High Efficiency Video Coding (HEVC), VC-1, VP8, VP9 and AV1 (AOMedia Video 1). It can be implemented through one of the image compression methods using frequency transformation, etc.

제 1 영상(115)에 대응하는 제 2 영상(135)은 영상 데이터의 제 1 복호화(130)를 통해 복원될 수 있다. 제 1 복호화(130)는, 영상 데이터를 엔트로피 복호화하여 양자화된 잔차 데이터를 생성하는 과정, 양자화된 잔차 데이터를 역양자화하는 과정, 주파수 영역 성분의 잔차 데이터를 공간 영역 성분으로 변환하는 과정, 예측 데이터를 생성하는 과정 및 예측 데이터와 잔차 데이터를 이용하여 제 2 영상(135)을 복원하는 과정 등을 포함할 수 있다. 이와 같은 제 1 복호화(130) 과정은 제 1 부호화(120) 과정에서 사용된 MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9 및 AV1 등 주파수 변환을 이용한 영상 압축 방법들 중의 하나에 대응되는 영상 복원 방법을 통해 구현될 수 있다.The second image 135 corresponding to the first image 115 may be restored through the first decoding 130 of image data. The first decoding 130 includes a process of generating quantized residual data by entropy-decoding image data, a process of inverse quantizing the quantized residual data, a process of transforming the residual data of a frequency domain component into a spatial domain component, a process of predicting data It may include a process of generating , and a process of reconstructing the second image 135 using prediction data and residual data. The first decoding 130 process as described above is an image compression using frequency conversion such as MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9 and AV1 used in the first encoding 120 process. It may be implemented through an image restoration method corresponding to one of the methods.

AI 부호화 과정을 통해 획득된 AI 부호화 데이터는, 제 1 영상(115)의 제 1 부호화(120) 결과 획득된 영상 데이터 및 원본 영상(105)의 AI 다운스케일(110)과 관련된 AI 데이터를 포함할 수 있다. 영상 데이터는 제 1 복호화(130) 과정에서 이용될 수 있으며, AI 데이터는 AI 업스케일(140) 과정에서 이용될 수 있다.The AI encoded data obtained through the AI encoding process may include image data obtained as a result of the first encoding 120 of the first image 115 and AI data related to the AI downscale 110 of the original image 105. can The image data may be used in the first decoding 130 process, and the AI data may be used in the AI upscaling 140 process.

영상 데이터는 비트스트림 형태로 전송될 수 있다. 영상 데이터는 제 1 영상(115) 내 픽셀 값들에 기초하여 획득되는 데이터, 예를 들어, 제 1 영상(115)과 제 1 영상(115)의 예측 데이터 사이의 차이인 잔차 데이터를 포함할 수 있다. 또한, 영상 데이터는 제 1 영상(115)의 제 1 부호화(120) 과정에서 이용된 정보들을 포함한다. 예를 들어, 영상 데이터는 제 1 영상(115)을 제 1 부호화(120)하는데 이용된 예측 모드(mode) 정보, 움직임 정보, 및 제 1 부호화(120)에서 이용된 양자화 파라미터 관련 정보 등을 포함할 수 있다. 영상 데이터는 MPEG-2, H.264 AVC, MPEG-4, HEVC, VC-1, VP8, VP9 및 AV1 등 주파수 변환을 이용하는 영상 압축 방법들 중 제 1 부호화(120) 과정에서 이용된 영상 압축 방법의 규칙, 예를 들어, 신택스(syntax)에 따라 생성될 수 있다.The image data may be transmitted in the form of a bitstream. The image data may include data obtained based on pixel values in the first image 115 , for example, residual data that is a difference between the first image 115 and prediction data of the first image 115 . . Also, the image data includes information used in the process of the first encoding 120 of the first image 115 . For example, the image data includes prediction mode information used for the first encoding 120 of the first image 115 , motion information, and quantization parameter related information used in the first encoding 120 , etc. can do. The image data is an image compression method used in the first encoding 120 process among image compression methods using frequency conversion, such as MPEG-2, H.264 AVC, MPEG-4, HEVC, VC-1, VP8, VP9, and AV1. It may be generated according to a rule of, for example, a syntax.

AI 데이터는 제 2 DNN에 기반한 AI 업스케일(140)에 이용된다. 전술한 바와 같이, 제 1 DNN과 제 2 DNN은 연계 훈련되기 때문에, AI 데이터는 제 2 DNN을 통한 제 2 영상(135)의 정확한 AI 업스케일(140)이 수행될 수 있게 하는 정보를 포함한다. AI 복호화 과정에서는 AI 데이터에 기반하여 제 2 영상(135)을 타겟하는 해상도 및/또는 화질로 AI 업스케일(140)할 수 있다.AI data is used for AI upscaling 140 based on the second DNN. As described above, since the first DNN and the second DNN are jointly trained, the AI data includes information enabling the accurate AI upscaling 140 of the second image 135 through the second DNN to be performed. . In the AI decoding process, the AI upscaling 140 may be performed to a resolution and/or image quality targeting the second image 135 based on the AI data.

AI 데이터는 비트스트림의 형태로 영상 데이터와 함께 전송될 수 있다. 구현예에 따라, AI 데이터는 프레임이나 패킷 형태로 영상 데이터와 구분되어 전송될 수도 있다. 또는 구현예에 따라, AI 데이터는 영상 데이터에 포함되어 전송될 수도 있다. 영상 데이터와 AI 데이터는 동일한 네트워크 또는 서로 상이한 네트워크를 통해 전송될 수 있다.AI data may be transmitted together with image data in the form of a bitstream. According to an embodiment, AI data may be transmitted separately from image data in the form of frames or packets. Alternatively, according to an embodiment, AI data may be transmitted while being included in image data. The image data and AI data may be transmitted through the same network or different networks.

도 2는 일 실시예에 따른 AI 복호화 장치(200)의 구성을 나타내는 블록도이다.2 is a block diagram illustrating a configuration of an AI decoding apparatus 200 according to an embodiment.

도 2를 참조하면, 일 실시예에 따른 AI 복호화 장치(200)는 수신부(210) 및 AI 복호화부(230)를 포함한다. AI 복호화부(230)는 파싱부(232), 제 1 복호화부(234), AI 업스케일부(236) 및 AI 설정부(238)를 포함할 수 있다.Referring to FIG. 2 , the AI decoding apparatus 200 according to an embodiment includes a receiving unit 210 and an AI decoding unit 230 . The AI decoding unit 230 may include a parsing unit 232 , a first decoding unit 234 , an AI upscaling unit 236 , and an AI setting unit 238 .

도 2에는 수신부(210) 및 AI 복호화부(230)가 개별적인 장치로 도시되어 있으나, 수신부(210) 및 AI 복호화부(230)는 하나의 프로세서를 통해 구현될 수 있다. 이 경우, 수신부(210) 및 AI 복호화부(230)는 전용 프로세서로 구현될 수도 있고, AP(application processor) 또는 CPU(central processing unit), GPU(graphic processing unit)와 같은 범용 프로세서와 S/W의 조합을 통해 구현될 수도 있다. 또한, 전용 프로세서의 경우, 본 개시의 실시예를 구현하기 위한 메모리를 포함하거나, 외부 메모리를 이용하기 위한 메모리 처리부를 포함할 수 있다. Although the receiver 210 and the AI decoder 230 are illustrated as separate devices in FIG. 2 , the receiver 210 and the AI decoder 230 may be implemented through one processor. In this case, the receiving unit 210 and the AI decoding unit 230 may be implemented as a dedicated processor, and a general-purpose processor such as an application processor (AP), a central processing unit (CPU), or a graphic processing unit (GPU) and S/W It may be implemented through a combination of In addition, the dedicated processor may include a memory for implementing an embodiment of the present disclosure or a memory processing unit for using an external memory.

수신부(210) 및 AI 복호화부(230)는 복수의 프로세서로 구성될 수도 있다. 이 경우, 전용 프로세서들의 조합으로 구현될 수도 있고, AP 또는 CPU, GPU와 같은 다수의 범용 프로세서들과 S/W의 조합을 통해 구현될 수도 있다. 일 실시예에서, 수신부(210)는 제 1 프로세서로 구현되고, 제 1 복호화부(234)는 제 1 프로세서와 상이한 제 2 프로세서로 구현되고, 파싱부(232), AI 업스케일부(236) 및 AI 설정부(238)는 제 1 프로세서 및 제 2 프로세서와 상이한 제 3 프로세서로 구현될 수 있다.The receiver 210 and the AI decoder 230 may include a plurality of processors. In this case, it may be implemented as a combination of dedicated processors, or may be implemented through a combination of S/W with a plurality of general-purpose processors such as an AP, CPU, or GPU. In one embodiment, the receiving unit 210 is implemented as a first processor, the first decoding unit 234 is implemented as a second processor different from the first processor, the parsing unit 232, the AI upscaling unit 236 and the AI setting unit 238 may be implemented as a third processor different from the first processor and the second processor.

수신부(210)는 AI 부호화 결과 획득된 AI 부호화 데이터를 수신한다. 일 예로, AI 부호화 데이터는 mp4, mov 등의 파일 형식을 갖는 비디오 파일일 수 있다. The receiving unit 210 receives AI encoded data obtained as a result of AI encoding. As an example, the AI-encoded data may be a video file having a file format such as mp4 or mov.

수신부(210)는 네트워크를 통해 전달되는 AI 부호화 데이터를 수신할 수 있다. 수신부(210)는 AI 부호화 데이터를 AI 복호화부(230)로 출력한다. The receiver 210 may receive AI-encoded data transmitted through a network. The receiving unit 210 outputs the AI encoded data to the AI decoding unit 230 .

일 실시예에서, AI 부호화 데이터는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium) 등을 포함하는 데이터 저장 매체로부터 획득된 것일 수도 있다.In one embodiment, the AI-encoded data is a hard disk, magnetic media such as floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floppy disks. It may be obtained from a data storage medium including an optical medium).

파싱부(232)는 AI 부호화 데이터를 파싱하여 제 1 영상(115)의 제 1 부호화 결과로 생성된 영상 데이터를 제 1 복호화부(234)로 전달하고, AI 데이터를 AI 설정부(238)로 전달한다. The parsing unit 232 parses the AI encoded data and transmits image data generated as a result of the first encoding of the first image 115 to the first decoder 234 , and transmits the AI data to the AI setting unit 238 . transmit

일 실시예에서, 파싱부(232)는 AI 부호화 데이터 내에 서로 분리되어 포함된 영상 데이터와 AI 데이터를 파싱할 수 있다. 파싱부(232)는 AI 부호화 데이터 내의 헤더를 읽어 AI 부호화 데이터 내에 포함되어 있는 AI 데이터와 영상 데이터를 구분할 수 있다. 일 예에서, AI 데이터는 HDMI 스트림 내의 VSIF(Vendor Specific InfoFrame)에 포함될 수 있다. 서로 분리된 AI 데이터와 영상 데이터를 포함하는 AI 부호화 데이터의 구조는 도 9를 참조하여 후술한다.In an embodiment, the parsing unit 232 may parse the image data and the AI data separately included in the AI encoded data. The parsing unit 232 may read the header in the AI-encoded data to distinguish the AI data and the image data included in the AI-encoded data. In one example, AI data may be included in a Vendor Specific InfoFrame (VSIF) in the HDMI stream. The structure of AI encoded data including AI data and image data separated from each other will be described later with reference to FIG. 9 .

다른 실시예에서, 파싱부(232)는 AI 부호화 데이터에서 영상 데이터를 파싱하고, 영상 데이터로부터 AI 데이터를 추출한 후, AI 데이터를 AI 설정부(238)로 전달하고, 나머지 영상 데이터를 제 1 복호화부(234)로 전달할 수 있다. 즉, AI 데이터는 영상 데이터에 포함될 수 있는데, 예를 들어, AI 데이터는 영상 데이터에 해당하는 비트스트림의 부가 정보 영역인 SEI(Supplemental enhancement information)에 포함될 수 있다. AI 데이터가 포함된 영상 데이터를 포함하는 AI 부호화 데이터의 구조는 도 10을 참조하여 후술한다.In another embodiment, the parsing unit 232 parses the image data from the AI encoded data, extracts the AI data from the image data, transmits the AI data to the AI setting unit 238, and first decodes the remaining image data. may be transmitted to the unit 234 . That is, AI data may be included in image data. For example, AI data may be included in supplemental enhancement information (SEI), which is an additional information area of a bitstream corresponding to image data. The structure of AI-encoded data including image data including AI data will be described later with reference to FIG. 10 .

다른 실시예에서, 파싱부(232)는 영상 데이터에 해당하는 비트스트림을 제 1 복호화부(234)에서 처리될 비트스트림과 AI 데이터에 해당하는 비트스트림으로 분할하고, 분할된 각각의 비트스트림을 제 1 복호화부(234)와 AI 설정부(238)로 출력할 수 있다.In another embodiment, the parsing unit 232 divides the bitstream corresponding to the image data into a bitstream to be processed by the first decoding unit 234 and a bitstream corresponding to AI data, and divides each divided bitstream It may output to the first decoding unit 234 and the AI setting unit 238 .

파싱부(232)는 AI 부호화 데이터에 포함된 영상 데이터가 소정의 코덱(예를 들어, MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9 또는 AV1)을 통해 획득된 영상 데이터인 것으로 확인할 수도 있다. 이 경우, 영상 데이터가 상기 확인된 코덱으로 처리될 수 있도록, 해당 정보를 제 1 복호화부(234)로 전달할 수 있다.The parsing unit 232 obtains image data included in the AI encoded data through a predetermined codec (eg, MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9, or AV1). It can also be confirmed that it is the image data that has been processed. In this case, the corresponding information may be transmitted to the first decoder 234 so that the image data can be processed by the identified codec.

제 1 복호화부(234)는 파싱부(232)로부터 수신된 영상 데이터에 기초하여 제 1 영상(115)에 대응하는 제 2 영상(135)을 복원한다. 제 1 복호화부(234)에 의해 획득된 제 2 영상(135)은 AI 업스케일부(236)로 제공된다. The first decoder 234 reconstructs the second image 135 corresponding to the first image 115 based on the image data received from the parser 232 . The second image 135 obtained by the first decoder 234 is provided to the AI upscaler 236 .

구현예에 따라, 예측 모드 정보, 움직임 정보, 양자화 파라미터 정보 등의 제 1 복호화 관련 정보가 제 1 복호화부(234)로부터 AI 설정부(238)로 제공될 수 있다. 제 1 복호화 관련 정보는 DNN 설정 정보를 획득하는데 이용될 수 있다.According to an embodiment, first decoding-related information such as prediction mode information, motion information, and quantization parameter information may be provided from the first decoding unit 234 to the AI setting unit 238 . The first decoding related information may be used to obtain DNN configuration information.

AI 설정부(238)로 제공되는 AI 데이터는, 제 2 영상(135)을 AI 업스케일할 수 있게 하는 정보들을 포함한다. 이때, 제 2 영상(135)의 업스케일 타겟은 제 1 DNN의 다운스케일 타겟에 대응하여야 한다. 따라서, AI 데이터는 제 1 DNN의 다운스케일 타겟을 확인할 수 있는 정보가 포함되어야 한다.The AI data provided to the AI setting unit 238 includes information enabling AI upscaling of the second image 135 . In this case, the upscale target of the second image 135 should correspond to the downscale target of the first DNN. Therefore, the AI data should include information that can confirm the downscale target of the first DNN.

AI 데이터에 포함된 정보를 구체적으로 예시하면, 원본 영상(105)의 해상도와 제 1 영상(115)의 해상도의 차이 정보, 제 1 영상(115) 관련 정보가 있다. Specifically exemplifying the information included in the AI data, there are information about a difference between the resolution of the original image 105 and the resolution of the first image 115 , and information related to the first image 115 .

차이 정보는, 원본 영상(105) 대비 제 1 영상(115)의 해상도 변환 정도에 대한 정보(예를 들어, 해상도 변환율 정보)로 표현될 수 있다. 그리고, 복원된 제 2 영상(135)의 해상도를 통해 제 1 영상(115)의 해상도를 알게 되고 이를 통해 해상도 변환 정도를 확인할 수 있기 때문에, 차이 정보는 원본 영상(105)의 해상도 정보만으로 표현될 수도 있다. 여기서 해상도 정보는 가로/세로의 화면 사이즈로 표현될 수도 있고, 비율(16:9, 4:3 등)과 한 축의 사이즈로 표현될 수도 있다. 또한, 기 설정된 해상도 정보가 있는 경우는 인덱스 또는 플래그의 형태로 표현될 수도 있다.The difference information may be expressed as information about a resolution conversion degree of the first image 115 compared to the original image 105 (eg, resolution conversion rate information). And, since the resolution of the first image 115 is known through the resolution of the restored second image 135 and the degree of resolution conversion can be confirmed through this, the difference information can be expressed only with the resolution information of the original image 105 . may be Here, the resolution information may be expressed as a horizontal/vertical screen size, or it may be expressed as a ratio (16:9, 4:3, etc.) and a size of one axis. In addition, when there is preset resolution information, it may be expressed in the form of an index or a flag.

제 1 영상(115) 관련 정보는, 제 1 영상(115)의 해상도, 제 1 영상(115)의 제 1 부호화 결과 획득된 영상 데이터의 비트레이트 및 제 1 영상(115)의 제 1 부호화시 이용된 코덱 타입 중 적어도 하나에 대한 정보를 포함할 수 있다.The information related to the first image 115 is used for the resolution of the first image 115 , the bit rate of image data obtained as a result of the first encoding of the first image 115 , and the first encoding of the first image 115 . information on at least one of the specified codec types may be included.

AI 설정부(238)는 AI 데이터에 포함된 차이 정보 및 제 1 영상(115) 관련 정보 중 적어도 하나에 기초하여 제 2 영상(135)의 업스케일 타겟을 결정할 수 있다. 업스케일 타겟은 예를 들어, 제 2 영상(135)을 어느 정도의 해상도로 업스케일하여야 하는지를 나타낼 수 있다. The AI setting unit 238 may determine an upscale target of the second image 135 based on at least one of difference information included in the AI data and information related to the first image 115 . The upscaling target may indicate, for example, to which resolution the second image 135 should be upscaled.

AI 업스케일부(236)는 업스케일 타겟이 결정되면, 업스케일 타겟에 대응하는 제 3 영상(145)을 획득하기 위해 제 2 DNN을 통해 제 2 영상(135)을 AI 업스케일한다.When the upscaling target is determined, the AI upscaling unit 236 AI upscales the second image 135 through the second DNN to obtain a third image 145 corresponding to the upscaling target.

AI 설정부(238)가 AI 데이터에 기초하여 업스케일 타겟을 결정하는 방법을 설명하기에 앞서, 제 2 DNN을 통한 AI 업스케일 과정에 대해 도 3 및 도 4를 참조하여 설명한다.Prior to explaining a method for the AI setting unit 238 to determine an upscaling target based on AI data, an AI upscaling process through the second DNN will be described with reference to FIGS. 3 and 4 .

도 3은 제 2 영상(135)의 AI 업스케일을 위한 제 2 DNN(300)을 나타내는 예시적인 도면이고, 도 4는 도 3에 도시된 제 1 컨볼루션 레이어(310)에서의 컨볼루션 연산을 도시하고 있다. 3 is an exemplary diagram illustrating a second DNN 300 for AI upscaling of a second image 135, and FIG. 4 is a convolution operation in the first convolution layer 310 shown in FIG. is showing

도 3에 도시된 바와 같이, 제 2 영상(135)은 제 1 컨볼루션 레이어(310)로 입력된다. 도 3에 도시된 제 1 컨볼루션 레이어(310)에 표시된 3X3X4는 3 x 3의 크기의 4개의 필터 커널을 이용하여 1개의 입력 영상에 대해 컨볼루션 처리를 하는 것을 예시한다. 컨볼루션 처리 결과 4개의 필터 커널에 의해 4개의 특징 맵이 생성된다. 각 특징 맵은 제 2 영상(135)의 고유한 특성들을 나타낸다. 예를 들어, 각 특징 맵은 제 2 영상(135)의 수직 방향 특성, 수평 방향 특성 또는 에지 특성 등을 나타낼 수 있다.3 , the second image 135 is input to the first convolutional layer 310 . 3X3X4 displayed in the first convolution layer 310 shown in FIG. 3 exemplifies convolution processing on one input image using four filter kernels having a size of 3×3. As a result of the convolution process, four feature maps are generated by four filter kernels. Each feature map represents unique characteristics of the second image 135 . For example, each feature map may represent a vertical direction characteristic, a horizontal direction characteristic, or an edge characteristic of the second image 135 .

도 4를 참조하여, 제 1 컨볼루션 레이어(310)에서의 컨볼루션 연산에 대해 상세히 설명한다.A convolution operation in the first convolution layer 310 will be described in detail with reference to FIG. 4 .

제 1 컨볼루션 레이어(310)에서 이용되는 3 X 3의 크기를 갖는 필터 커널(430)의 파라미터들과 그에 대응하는 제 2 영상(135) 내 픽셀 값들 사이의 곱 연산 및 덧셈 연산을 통해 하나의 특징 맵(450)이 생성될 수 있다. 제 1 컨볼루션 레이어(310)에서는 4개의 필터 커널이 이용되므로, 4개의 필터 커널을 이용한 컨볼루션 연산 과정을 통해 4개의 특징 맵이 생성될 수 있다.Through the multiplication operation and addition operation between the parameters of the filter kernel 430 having a size of 3 X 3 used in the first convolution layer 310 and the pixel values in the second image 135 corresponding thereto, one A feature map 450 may be generated. Since four filter kernels are used in the first convolution layer 310 , four feature maps may be generated through a convolution operation process using the four filter kernels.

도 4에서 제 2 영상(135)에 표시된 I1 내지 I49는 제 2 영상(135)의 픽셀들을 나타내고, 필터 커널(430)에 표시된 F1 내지 F9는 필터 커널(430)의 파라미터들을 나타낸다. 또한, 특징 맵(450)에 표시된 M1 내지 M9는 특징 맵(450)의 샘플들을 나타낸다. In FIG. 4 , I1 to I49 displayed on the second image 135 indicate pixels of the second image 135 , and F1 to F9 displayed on the filter kernel 430 indicate parameters of the filter kernel 430 . Also, M1 to M9 displayed in the feature map 450 indicate samples of the feature map 450 .

도 4는 제 2 영상(135)이 49개의 픽셀을 포함하는 것으로 예시하고 있으나, 이는 하나의 예시일 뿐이며, 제 2 영상(135)이 4K의 해상도를 갖는 경우, 예를 들어, 3840 X 2160개의 픽셀을 포함할 수 있다.4 illustrates that the second image 135 includes 49 pixels, but this is only an example, and when the second image 135 has a resolution of 4K, for example, 3840 X 2160 pixels It may contain pixels.

컨볼루션 연산 과정에서, 제 2 영상(135)의 I1, I2, I3, I8, I9, I10, I15, I16, I17의 픽셀 값들 각각과 필터 커널(430)의 F1, F2, F3, F4, F5, F6, F7, F8 및 F9 각각의 곱 연산이 수행되고, 곱 연산의 결과 값들을 조합(예를 들어, 덧셈 연산)한 값이 특징 맵(450)의 M1의 값으로 할당될 수 있다. 컨볼루션 연산의 스트라이드(stride)가 2라면, 제 2 영상(135)의 I3, I4, I5, I10, I11, I12, I17, I18, I19의 픽셀 값들 각각과 필터 커널(430)의 F1, F2, F3, F4, F5, F6, F7, F8 및 F9 각각의 곱 연산이 수행되고, 곱 연산의 결과 값들을 조합한 값이 특징 맵(450)의 M2의 값으로 할당될 수 있다.In the convolution operation process, pixel values of I1, I2, I3, I8, I9, I10, I15, I16, and I17 of the second image 135 and F1, F2, F3, F4, and F5 of the filter kernel 430 are respectively , F6, F7, F8, and F9 may each be multiplied, and a value obtained by combining (eg, addition operation) result values of the multiplication operation may be assigned as the value of M1 of the feature map 450 . If the stride of the convolution operation is 2, pixel values of I3, I4, I5, I10, I11, I12, I17, I18, and I19 of the second image 135 and F1 and F2 of the filter kernel 430, respectively , F3, F4, F5, F6, F7, F8, and F9 may each be multiplied, and a value obtained by combining result values of the multiplication operation may be assigned as the value of M2 of the feature map 450 .

필터 커널(430)이 제 2 영상(135)의 마지막 픽셀에 도달할 때까지 스트라이드에 따라 이동하는 동안 제 2 영상(135) 내 픽셀 값들과 필터 커널(430)의 파라미터들 사이의 컨볼루션 연산이 수행됨으로써, 소정 크기를 갖는 특징 맵(450)이 획득될 수 있다.A convolution operation between the pixel values in the second image 135 and the parameters of the filter kernel 430 is performed while the filter kernel 430 moves along the stride until the last pixel of the second image 135 is reached. By being performed, a feature map 450 having a predetermined size may be obtained.

본 개시에 따르면, 제 1 DNN과 제 2 DNN의 연계 훈련을 통해 제 2 DNN의 파라미터들, 예를 들어, 제 2 DNN의 컨볼루션 레이어들에서 이용되는 필터 커널의 파라미터들(예를 들어, 필터 커널(430)의 F1, F2, F3, F4, F5, F6, F7, F8 및 F9)의 값이 최적화될 수 있다. AI 설정부(238)는 AI 데이터에 기초하여, 제 1 DNN의 다운스케일 타겟에 대응하는 업스케일 타겟을 결정하고, 결정된 업스케일 타겟에 대응하는 파라미터들을 제 2 DNN의 컨볼루션 레이어들에서 이용되는 필터 커널의 파라미터들로 결정할 수 있다.According to the present disclosure, parameters of the second DNN through joint training of the first DNN and the second DNN, for example, parameters of the filter kernel used in convolutional layers of the second DNN (eg, filter The values of F1, F2, F3, F4, F5, F6, F7, F8, and F9 of the kernel 430 may be optimized. The AI setting unit 238 determines an upscale target corresponding to the downscale target of the first DNN based on the AI data, and uses parameters corresponding to the determined upscale target in the convolution layers of the second DNN. It can be determined by parameters of the filter kernel.

제 1 DNN 및 제 2 DNN에 포함된 컨볼루션 레이어들은 도 4와 관련하여 설명한 컨볼루션 연산 과정에 따른 처리를 할 수 있으나, 도 4에서 설명한 컨볼루션 연산 과정은 하나의 예시일 뿐이며, 이에 한정되는 것은 아니다.The convolution layers included in the first DNN and the second DNN may be processed according to the convolution operation process described with reference to FIG. 4 , but the convolution operation process described in FIG. 4 is only an example, and the it is not

다시 도 3을 참조하면, 제 1 컨볼루션 레이어(310)에서 출력된 특징 맵들은 제 1 활성화 레이어(320)로 입력된다. Referring again to FIG. 3 , the feature maps output from the first convolutional layer 310 are input to the first activation layer 320 .

제 1 활성화 레이어(320)는 각각의 특징 맵에 대해 비선형(Non-linear) 특성을 부여할 수 있다. 제 1 활성화 레이어(320)는 시그모이드 함수(sigmoid function), Tanh 함수, ReLU(Rectified Linear Unit) 함수 등을 포함할 수 있으나, 이에 한정되는 것은 아니다.The first activation layer 320 may provide a non-linear characteristic to each feature map. The first activation layer 320 may include a sigmoid function, a Tanh function, a Rectified Linear Unit (ReLU) function, and the like, but is not limited thereto.

제 1 활성화 레이어(320)에서 비선형 특성을 부여하는 것은, 제 1 컨볼루션 레이어(310)의 출력인, 특징 맵의 일부 샘플 값을 변경하여 출력하는 것을 의미한다. 이때, 변경은 비선형 특성을 적용하여 수행된다.Giving the nonlinear characteristic in the first activation layer 320 means changing and outputting some sample values of the feature map, which is an output of the first convolution layer 310 . At this time, the change is performed by applying a non-linear characteristic.

제 1 활성화 레이어(320)는 제 1 컨볼루션 레이어(310)로부터 출력되는 특징 맵들의 샘플 값들을 제 2 컨볼루션 레이어(330)로 전달할지 여부를 결정한다. 예를 들어, 특징 맵들의 샘플 값들 중 어떤 샘플 값들은 제 1 활성화 레이어(320)에 의해 활성화되어 제 2 컨볼루션 레이어(330)로 전달되고, 어떤 샘플 값들은 제 1 활성화 레이어(320)에 의해 비활성화되어 제 2 컨볼루션 레이어(330)로 전달되지 않는다. 특징 맵들이 나타내는 제 2 영상(135)의 고유 특성이 제 1 활성화 레이어(320)에 의해 강조된다.The first activation layer 320 determines whether to transfer sample values of the feature maps output from the first convolution layer 310 to the second convolution layer 330 . For example, some sample values among the sample values of the feature maps are activated by the first activation layer 320 and transmitted to the second convolution layer 330 , and some sample values are activated by the first activation layer 320 . It is deactivated and is not transmitted to the second convolutional layer 330 . The intrinsic characteristic of the second image 135 indicated by the feature maps is emphasized by the first activation layer 320 .

제 1 활성화 레이어(320)에서 출력된 특징 맵들(325)은 제 2 컨볼루션 레이어(330)로 입력된다. 도 3에 도시된 특징 맵들(325) 중 어느 하나는 도 4와 관련하여 설명한 특징 맵(450)이 제 1 활성화 레이어(320)에서 처리된 결과이다. The feature maps 325 output from the first activation layer 320 are input to the second convolution layer 330 . Any one of the feature maps 325 shown in FIG. 3 is a result of processing the feature map 450 described with reference to FIG. 4 in the first activation layer 320 .

제 2 컨볼루션 레이어(330)에 표시된 3X3X4는 3 x 3의 크기의 4개의 필터 커널을 이용하여 입력된 특징 맵들(325)에 대해 컨볼루션 처리하는 것을 예시한다. 제 2 컨볼루션 레이어(330)의 출력은 제 2 활성화 레이어(340)로 입력된다. 제 2 활성화 레이어(340)는 입력 데이터에 대해 비선형 특성을 부여할 수 있다.3X3X4 displayed in the second convolution layer 330 exemplifies convolution processing on the input feature maps 325 using four filter kernels having a size of 3×3. The output of the second convolutional layer 330 is input to the second activation layer 340 . The second activation layer 340 may provide a non-linear characteristic to the input data.

제 2 활성화 레이어(340)에서 출력된 특징 맵들(345)은 제 3 컨볼루션 레이어(350)로 입력된다. 도 3에 도시된 제 3 컨볼루션 레이어(350)에 표시된 3X3X1는 3 x 3의 크기의 1개의 필터 커널을 이용하여 1개의 출력 영상을 만들기 위해 컨볼루션 처리를 하는 것을 예시한다. 제 3 컨볼루션 레이어(350)는 최종 영상을 출력하기 위한 레이어로서 1개의 필터 커널을 이용하여 1개의 출력을 생성한다. 본 개시의 예시에 따르면, 제 3 컨볼루션 레이어(350)는 컨벌루션 연산을 통해 제 3 영상(145)을 출력할 수 있다.The feature maps 345 output from the second activation layer 340 are input to the third convolution layer 350 . 3X3X1 displayed in the third convolution layer 350 shown in FIG. 3 exemplifies convolution processing to generate one output image using one filter kernel having a size of 3×3. The third convolution layer 350 is a layer for outputting a final image and generates one output using one filter kernel. According to the example of the present disclosure, the third convolution layer 350 may output the third image 145 through a convolution operation.

제 2 DNN(300)의 제 1 컨볼루션 레이어(310), 제 2 컨볼루션 레이어(330) 및 제 3 컨볼루션 레이어(350)의 필터 커널의 개수, 필터 커널의 파라미터 등을 나타내는 DNN 설정 정보는 후술하는 바와 같이 복수 개일 수 있는데, 복수의 DNN 설정 정보는 제 1 DNN의 복수의 DNN 설정 정보와 연계되어야 한다. 제 2 DNN의 복수의 DNN 설정 정보와 제 1 DNN의 복수의 DNN 설정 정보 사이의 연계는, 제 1 DNN 및 제 2 DNN의 연계 학습을 통해 구현될 수 있다. DNN setting information indicating the number of filter kernels of the first convolutional layer 310, the second convolutional layer 330, and the third convolutional layer 350 of the second DNN 300, parameters of the filter kernel, etc. As will be described later, there may be a plurality of pieces, and a plurality of pieces of DNN configuration information should be associated with a plurality of pieces of DNN configuration information of the first DNN. The association between the plurality of DNN configuration information of the second DNN and the plurality of DNN configuration information of the first DNN may be implemented through association learning of the first DNN and the second DNN.

도 3은 제 2 DNN(300)이 세 개의 컨볼루션 레이어(310, 330, 350)와 두 개의 활성화 레이어(320, 340)를 포함하고 있는 것으로 도시하고 있으나, 이는 하나의 예시일 뿐이며, 구현예에 따라서, 컨볼루션 레이어 및 활성화 레이어의 개수는 다양하게 변경될 수 있다. 또한, 구현예에 따라서, 제 2 DNN(300)은 RNN(recurrent neural network)을 통해 구현될 수도 있다. 이 경우는 본 개시의 예시에 따른 제 2 DNN(300)의 CNN 구조를 RNN 구조로 변경하는 것을 의미한다.3 shows that the second DNN 300 includes three convolutional layers 310 , 330 , 350 and two activation layers 320 , 340 , but this is only an example, and the implementation Accordingly, the number of convolutional layers and activation layers may be variously changed. Also, according to an embodiment, the second DNN 300 may be implemented through a recurrent neural network (RNN). In this case, it means changing the CNN structure of the second DNN 300 according to the example of the present disclosure to the RNN structure.

일 실시예에서, AI 업스케일부(236)는 전술한 컨볼루션 연산 및 활성화 레이어의 연산을 위한 적어도 하나의 ALU(Arithmetic logic unit)를 포함할 수 있다. ALU는 프로세서로 구현될 수 있다. 컨볼루션 연산을 위해, ALU는 제 2 영상(135) 또는 이전 레이어에서 출력된 특징 맵의 샘플 값들과 필터 커널의 샘플 값들 사이의 곱 연산을 수행하는 곱셈기 및 곱셈의 결과 값들을 더하는 가산기를 포함할 수 있다. 또한, 활성화 레이어의 연산을 위해, ALU는 미리 결정된 시그모이드 함수, Tanh 함수 또는 ReLU 함수 등에서 이용되는 가중치를 입력된 샘플 값에 곱하는 곱셈기, 및 곱한 결과와 소정 값을 비교하여 입력된 샘플 값을 다음 레이어로 전달할지를 판단하는 비교기를 포함할 수 있다.In an embodiment, the AI upscaling unit 236 may include at least one arithmetic logic unit (ALU) for the above-described convolution operation and operation of the activation layer. The ALU may be implemented as a processor. For the convolution operation, the ALU includes a multiplier that performs a multiplication operation between the sample values of the feature map output from the second image 135 or the previous layer and the sample values of the filter kernel, and an adder that adds the result values of the multiplication. can In addition, for the calculation of the activation layer, the ALU is a multiplier that multiplies an input sample value by a weight used in a predetermined sigmoid function, a Tanh function, or a ReLU function, and compares the multiplication result with a predetermined value to calculate the input sample value It may include a comparator that determines whether to transfer to the next layer.

이하에서, AI 설정부(238)가 업스케일 타겟을 결정하고, AI 업스케일부(236)가 업스케일 타겟에 맞춰 제 2 영상(135)을 AI 업스케일하는 방법을 설명한다.Hereinafter, a method in which the AI setting unit 238 determines the upscaling target and the AI upscaling unit 236 AI upscales the second image 135 according to the upscaling target will be described.

일 실시예에서, AI 설정부(238)는 제 2 DNN에 세팅 가능한 복수의 DNN 설정 정보를 저장할 수 있다.In an embodiment, the AI setting unit 238 may store a plurality of DNN setting information settable in the second DNN.

여기서, DNN 설정 정보는 제 2 DNN에 포함되는 컨볼루션 레이어의 수, 컨볼루션 레이어별 필터 커널의 개수 및 각 필터 커널의 파라미터 중 적어도 하나에 대한 정보를 포함할 수 있다. Here, the DNN configuration information may include information on at least one of the number of convolutional layers included in the second DNN, the number of filter kernels for each convolutional layer, and parameters of each filter kernel.

복수의 DNN 설정 정보는 다양한 업스케일 타겟에 각각 대응될 수 있으며, 특정 업스케일 타겟에 대응되는 DNN 설정 정보에 기반하여 제 2 DNN이 동작할 수 있다. DNN 설정 정보에 따라 제 2 DNN이 서로 다른 구조를 가질 수 있다. 예를 들어, 어느 DNN 설정 정보에 따라 제 2 DNN이 3개의 컨볼루션 레이어를 포함할 수 있고, 다른 DNN 설정 정보에 따라 제 2 DNN이 4개의 컨볼루션 레이어를 포함할 수 있다.The plurality of DNN configuration information may each correspond to various upscale targets, and the second DNN may operate based on the DNN configuration information corresponding to a specific upscale target. The second DNN may have a different structure according to the DNN configuration information. For example, the second DNN may include three convolutional layers according to certain DNN configuration information, and the second DNN may include four convolutional layers according to other DNN configuration information.

일 실시예에서, DNN 설정 정보는 제 2 DNN에서 사용되는 필터 커널의 파라미터만을 포함할 수도 있다. 이 경우, 제 2 DNN의 구조는 변경되지 않는 대신, DNN 설정 정보에 따라 내부의 필터 커널의 파라미터만이 달라질 수 있다.In an embodiment, the DNN configuration information may include only parameters of a filter kernel used in the second DNN. In this case, the structure of the second DNN is not changed, but only the parameters of the internal filter kernel may be changed according to the DNN configuration information.

AI 설정부(238)는 복수의 DNN 설정 정보 중 제 2 영상(135)의 AI 업스케일을 위한 DNN 설정 정보를 획득할 수 있다. 여기서 사용되는 복수의 DNN 설정 정보 각각은 미리 결정된 해상도 및/또는 미리 결정된 화질의 제 3 영상(145)을 획득하기 위한 정보로, 제 1 DNN과 연계하여 훈련된 것이다. The AI setting unit 238 may acquire DNN setting information for AI upscaling of the second image 135 among a plurality of DNN setting information. Each of the plurality of DNN configuration information used herein is information for acquiring the third image 145 of a predetermined resolution and/or predetermined image quality, and is trained in association with the first DNN.

예를 들어, 복수의 DNN 설정 정보 중 어느 하나의 DNN 설정 정보는 제 2 영상(135)의 해상도보다 2배 큰 해상도의 제 3 영상(145), 예를 들어, 2K (2048*1080)의 제 2 영상(135)보다 2배 큰 4K(4096*2160)의 제 3 영상(145)을 획득하기 위한 정보들을 포함할 수 있고, 다른 하나의 DNN 설정 정보는 제 2 영상(135)의 해상도보다 4배 큰 해상도의 제 3 영상(145), 예를 들어, 2K (2048*1080)의 제 2 영상(135)보다 4배 큰 8K(8192*4320)의 제 3 영상(145)을 획득하기 위한 정보들을 포함할 수 있다. For example, the DNN setting information of any one of the plurality of DNN setting information is a third image 145 having a resolution twice that of the second image 135, for example, a second image of 2K (2048 * 1080). It may include information for acquiring the third image 145 of 4K (4096*2160) that is twice as large as the 2nd image 135 , and the other DNN setting information is 4 more than the resolution of the second image 135 . Information for obtaining a third image 145 of twice the resolution, for example, a third image 145 of 8K (8192 * 4320) that is 4 times larger than the second image 135 of 2K (2048 * 1080) may include

복수의 DNN 설정 정보 각각은 AI 부호화 장치(700)의 제 1 DNN의 DNN 설정 정보와 연계되어 만들어진 것이며, AI 설정부(238)는 제 1 DNN의 DNN 설정 정보의 축소 비율에 대응되는 확대 비율에 따라 복수의 DNN 설정 정보 중 하나의 DNN 설정 정보를 획득한다. 이를 위해, AI 설정부(238)는 제 1 DNN의 정보를 확인하여야 한다. 제 1 DNN의 정보를 AI 설정부(238)가 확인하기 위해, 일 실시예에 따른 AI 복호화 장치(200)는 AI 부호화 장치(700)로부터 제 1 DNN의 정보를 포함하는 AI 데이터를 수신한다. Each of the plurality of DNN setting information is created in association with the DNN setting information of the first DNN of the AI encoding device 700, and the AI setting unit 238 is set at an enlargement ratio corresponding to the reduction rate of the DNN setting information of the first DNN. Accordingly, one piece of DNN configuration information among a plurality of DNN configuration information is acquired. To this end, the AI setting unit 238 should check the information of the first DNN. In order for the AI setting unit 238 to check the information of the first DNN, the AI decoding apparatus 200 according to an embodiment receives AI data including the information of the first DNN from the AI encoding apparatus 700 .

다시 말하면, AI 설정부(238)는 AI 부호화 장치(700)로부터 수신되는 정보들을 이용하여, 제 1 영상(115)을 획득하기 위해 이용된 제 1 DNN의 DNN 설정 정보가 타겟하는 정보를 확인하고, 그와 연계 훈련된 제 2 DNN의 DNN 설정 정보를 획득할 수 있는 것이다.In other words, the AI setting unit 238 uses the information received from the AI encoding device 700 to identify information targeted by the DNN setting information of the first DNN used to obtain the first image 115 , and , it is possible to obtain the DNN configuration information of the second DNN trained in association with it.

복수의 DNN 설정 정보 중 제 2 영상(135)의 AI 업스케일을 위한 DNN 설정 정보가 획득되면, DNN 설정 정보는 AI 업스케일부(236)로 전달되고, DNN 설정 정보에 따라 동작하는 제 2 DNN에 기초하여 입력 데이터가 처리될 수 있다.When DNN setting information for AI upscaling of the second image 135 is obtained among a plurality of DNN setting information, the DNN setting information is transmitted to the AI upscaling unit 236, and a second DNN operating according to the DNN setting information. Based on the input data may be processed.

예를 들어, AI 업스케일부(236)는 어느 하나의 DNN 설정 정보가 획득되면, 도 3에 도시된 제 2 DNN(300)의 제 1 컨볼루션 레이어(310), 제 2 컨볼루션 레이어(330) 및 제 3 컨볼루션 레이어(350) 각각에 대해서, 각 레이어에 포함되는 필터 커널의 개수와 필터 커널의 파라미터들을, 상기 획득된 DNN 설정 정보에 포함된 값으로 설정한다.For example, when any one DNN configuration information is obtained, the AI upscaling unit 236 includes the first convolutional layer 310 and the second convolutional layer 330 of the second DNN 300 shown in FIG. 3 . ) and the third convolutional layer 350, the number of filter kernels included in each layer and parameters of the filter kernels are set to values included in the obtained DNN configuration information.

구체적으로, AI 업스케일부(236)는 도 4에 도시된 제 2 DNN의 어느 하나의 컨볼루션 레이어에서 이용되는 3 X 3의 필터 커널의 파라미터들이 {1, 1, 1, 1, 1, 1, 1, 1, 1}이고, DNN 설정 정보의 변경이 있는 경우, 필터 커널의 파라미터들을 변경된 DNN 설정 정보에 포함된 파라미터들인 {2, 2, 2, 2, 2, 2, 2, 2, 2}로 교체할 수 있는 것이다.Specifically, the AI upscaling unit 236 determines that the parameters of the filter kernel of 3 X 3 used in any one convolution layer of the second DNN shown in FIG. 4 are {1, 1, 1, 1, 1, 1 , 1, 1, 1}, and when there is a change in DNN configuration information, the parameters of the filter kernel are changed to {2, 2, 2, 2, 2, 2, 2, 2, 2, parameters included in the changed DNN configuration information. } can be replaced.

AI 설정부(238)는 AI 데이터에 포함된 정보에 기초하여 복수의 DNN 설정 정보 중 제 2 영상(135)을 업스케일하기 위한 DNN 설정 정보를 획득할 수 있는데, DNN 설정 정보를 획득하는데 이용되는 AI 데이터에 대해 구체적으로 설명한다. The AI setting unit 238 may acquire DNN setting information for upscaling the second image 135 among a plurality of DNN setting information based on the information included in the AI data, which is used to obtain the DNN setting information. AI data will be explained in detail.

일 실시예에서, AI 설정부(238)는 AI 데이터에 포함된 차이 정보에 기초하여, 복수의 DNN 설정 정보 중 제 2 영상(135)을 업스케일하기 위한 DNN 설정 정보를 획득할 수 있다. 예를 들어, 차이 정보에 기초하여 원본 영상(105)의 해상도(예를 들어, 4K(4096*2160))가 제 1 영상(115)의 해상도(예를 들어, 2K (2048*1080))보다 2배 큰 것으로 확인된 경우, AI 설정부(238)는 제 2 영상(135)의 해상도를 2배 증가시킬 수 있는 DNN 설정 정보를 획득할 수 있다.In an embodiment, the AI setting unit 238 may obtain DNN setting information for upscaling the second image 135 among a plurality of DNN setting information, based on the difference information included in the AI data. For example, based on the difference information, the resolution of the original image 105 (eg, 4K (4096 * 2160)) is higher than the resolution of the first image 115 (eg, 2K (2048 * 1080)). When it is confirmed that the size is 2 times larger, the AI setting unit 238 may obtain DNN setting information capable of increasing the resolution of the second image 135 by 2 times.

다른 실시예에서, AI 설정부(238)는 AI 데이터에 포함된 제 1 영상(115) 관련 정보에 기초하여, 복수의 DNN 설정 정보 중 제 2 영상(135)을 AI 업스케일하기 위한 DNN 설정 정보를 획득할 수 있다. AI 설정부(238)는 영상 관련 정보들과 DNN 설정 정보들 사이의 매핑 관계를 미리 결정하고, 제 1 영상(115) 관련 정보에 매핑된 DNN 설정 정보를 획득할 수 있다.In another embodiment, the AI setting unit 238 is based on the information related to the first image 115 included in the AI data, DNN setting information for AI upscaling the second image 135 among a plurality of DNN setting information. can be obtained. The AI setting unit 238 may determine a mapping relationship between the image related information and the DNN setting information in advance, and obtain DNN setting information mapped to the first image 115 related information.

도 5는 여러 영상 관련 정보들과 여러 DNN 설정 정보들 사이의 매핑 관계를 나타내는 예시적인 도면이다.5 is an exemplary diagram illustrating a mapping relationship between various pieces of image-related information and various pieces of DNN configuration information.

도 5에 따른 실시예를 통해, 본 개시의 일 실시예의 AI 부호화/AI 복호화 과정은 해상도의 변화만을 고려하는 것이 아님을 알 수 있다. 도 5에 도시된 바와 같이, SD, HD, Full HD와 같은 해상도, 10Mbps, 15Mbps, 20Mbps와 같은 비트레이트, 그리고 AV1, H.264, HEVC와 같은 코덱 정보를 개별적으로 또는 모두 고려하여 DNN 설정 정보의 선택이 이루어질 수 있다. 이러한 고려를 위해서는 AI 훈련 과정에서 각각의 요소들을 고려한 훈련이 부호화, 복호화 과정에 연계되어 이루어져야 한다(도 11 참조).5, it can be seen that the AI encoding/AI decoding process according to an embodiment of the present disclosure does not only consider a change in resolution. As shown in FIG. 5, DNN setting information considering resolutions such as SD, HD, Full HD, bitrates such as 10Mbps, 15Mbps, and 20Mbps, and codec information such as AV1, H.264, and HEVC individually or all selection can be made. For this consideration, training in consideration of each element in the AI training process should be performed in connection with the encoding and decoding processes (see FIG. 11 ).

따라서, 훈련 내용에 따라서 도 5에 도시된 바와 같이, 코덱 타입, 영상의 해상도 등을 포함하는 영상 관련 정보에 기반하여 복수의 DNN 설정 정보가 구비된 경우, AI 복호화 과정에서 전달받는 제 1 영상(115) 관련 정보에 기반하여 제 2 영상(135)의 AI 업스케일을 위한 DNN 설정 정보를 획득할 수 있다.Accordingly, as shown in FIG. 5 according to the training content, when a plurality of DNN setting information is provided based on image-related information including a codec type and image resolution, the first image ( 115) DNN setting information for AI upscaling of the second image 135 may be acquired based on the related information.

즉, AI 설정부(238)는 도 5에 도시된 표의 좌측에 도시된 영상 관련 정보와 표 우측의 DNN 설정 정보를 매칭하고 있음으로써, 영상 관련 정보에 따른 DNN 설정 정보를 사용할 수 있는 것이다.That is, the AI setting unit 238 matches the image-related information shown on the left side of the table shown in FIG. 5 with the DNN setting information on the right side of the table, so that the DNN setting information according to the image-related information can be used.

도 5에 예시된 바와 같이, 제 1 영상(115) 관련 정보로부터 제 1 영상(115)의 해상도가 SD이고, 제 1 영상(115)의 제 1 부호화 결과 획득된 영상 데이터의 비트레이트가 10Mbps이고, 제 1 영상(115)이 AV1 코덱으로 제 1 부호화된 것으로 확인되면, AI 설정부(238)는 복수의 DNN 설정 정보 중 A DNN 설정 정보를 획득할 수 있다. 5 , from the information related to the first image 115 , the resolution of the first image 115 is SD, and the bit rate of image data obtained as a result of the first encoding of the first image 115 is 10Mbps, , when it is confirmed that the first image 115 is first coded with the AV1 codec, the AI setting unit 238 may acquire A DNN setting information among a plurality of DNN setting information.

또한, 제 1 영상(115) 관련 정보로부터 제 1 영상(115)의 해상도가 HD이고, 제 1 부호화 결과 획득된 영상 데이터의 비트레이트가 15Mbps이고, 제 1 영상(115)이 H.264 코덱으로 제 1 부호화된 것으로 확인되면, AI 설정부(238)는 복수의 DNN 설정 정보 중 B DNN 설정 정보를 획득할 수 있다. In addition, from the information related to the first image 115 , the resolution of the first image 115 is HD, the bit rate of image data obtained as a result of the first encoding is 15 Mbps, and the first image 115 is converted to the H.264 codec. When it is confirmed that the first encoding is performed, the AI setting unit 238 may acquire B DNN setting information among a plurality of DNN setting information.

또한, 제 1 영상(115) 관련 정보로부터 제 1 영상(115)의 해상도가 Full HD이고, 제 1 영상(115)의 제 1 부호화 결과 획득된 영상 데이터의 비트레이트가 20Mbps이고, 제 1 영상(115)이 HEVC 코덱으로 제 1 부호화된 것으로 확인되면, AI 설정부(238)는 복수의 DNN 설정 정보 중 C DNN 설정 정보를 획득하고, 제 1 영상(115)의 해상도가 Full HD이고, 제 1 영상(115)의 제 1 부호화 결과 획득된 영상 데이터의 비트레이트가 15Mbps이고, 제 1 영상(115)이 HEVC 코덱으로 제 1 부호화된 것으로 확인되면, AI 설정부(238)는 복수의 DNN 설정 정보 중 D DNN 설정 정보를 획득할 수 있다. 제 1 영상(115)의 제 1 부호화 결과 획득된 영상 데이터의 비트레이트가 20Mbps인지 또는 15Mbps인지에 따라 C DNN 설정 정보와 D DNN 설정 정보 중에서 어느 하나가 선택된다. 동일 해상도의 제 1 영상(115)을 동일 코덱으로 제 1 부호화하였을 때, 영상 데이터의 비트레이트가 서로 상이하다는 것은, 복원되는 영상의 화질이 서로 상이하다는 것을 의미한다. 따라서, 제 1 DNN과 제 2 DNN은 소정 화질에 기반하여 연계 훈련될 수 있으며, 이에 따라 AI 설정부(238)는 제 2 영상(135)의 화질을 나타내는, 영상 데이터의 비트레이트에 따라 DNN 설정 정보를 획득할 수 있다.In addition, from the information related to the first image 115 , the resolution of the first image 115 is Full HD, the bit rate of image data obtained as a result of the first encoding of the first image 115 is 20 Mbps, and the first image ( 115) is confirmed to be first encoded by the HEVC codec, the AI setting unit 238 obtains C DNN setting information among a plurality of DNN setting information, the resolution of the first image 115 is Full HD, and the first When the bit rate of the image data obtained as a result of the first encoding of the image 115 is 15 Mbps and it is confirmed that the first image 115 is first encoded with the HEVC codec, the AI setting unit 238 sets a plurality of DNN setting information Among them, DNN configuration information can be obtained. Either one of the C DNN setting information and the D DNN setting information is selected according to whether the bit rate of the image data obtained as a result of the first encoding of the first image 115 is 20 Mbps or 15 Mbps. When the first image 115 of the same resolution is first encoded with the same codec, the fact that the bit rates of the image data are different from each other means that the image quality of the reconstructed images is different from each other. Therefore, the first DNN and the second DNN may be jointly trained based on a predetermined image quality, and accordingly, the AI setting unit 238 sets the DNN according to the bit rate of the image data indicating the image quality of the second image 135 . information can be obtained.

또 다른 실시예에서, AI 설정부(238)는 제 1 복호화부(234)로부터 제공되는 정보(예측 모드 정보, 움직임 정보, 양자화 파라미터 정보 등)와 AI 데이터에 포함된 제 1 영상(115) 관련 정보를 모두 고려하여 복수의 DNN 설정 정보 중 제 2 영상(135)을 AI 업스케일하기 위한 DNN 설정 정보를 획득할 수도 있다. 예를 들어, AI 설정부(238)는 제 1 복호화부(234)로부터 제 1 영상(115)의 제 1 부호화 과정에서 이용된 양자화 파라미터 정보를 전달받고, AI 데이터로부터 제 1 영상(115)의 부호화 결과 획득된 영상 데이터의 비트레이트를 확인하고, 양자화 파라미터 및 비트레이트에 대응하는 DNN 설정 정보를 획득할 수도 있다. 동일한 비트레이트라도 영상의 복잡도에 따라 복원 영상의 화질 정도에 차이가 있을 수 있으며, 비트레이트는 제 1 부호화되는 제 1 영상(115) 전체를 대표하는 값으로서 제 1 영상(115) 내에서도 각 프레임의 화질이 서로 다를 수 있다. 따라서, 제 1 복호화부(234)로부터 각 프레임 별로 획득할 수 있는 예측 모드 정보, 움직임 정보 및/또는 양자화 파라미터를 함께 고려하면, AI 데이터만 이용하는 것에 비해 제 2 영상(135)에 보다 적합한 DNN 설정 정보를 획득할 수 있다. In another embodiment, the AI setting unit 238 relates to the information (prediction mode information, motion information, quantization parameter information, etc.) provided from the first decoder 234 and the first image 115 included in the AI data. DNN configuration information for AI upscaling of the second image 135 among a plurality of pieces of DNN configuration information may be acquired in consideration of all information. For example, the AI setting unit 238 receives quantization parameter information used in the first encoding process of the first image 115 from the first decoder 234 , and receives the quantization parameter information from the AI data of the first image 115 . A bit rate of image data obtained as a result of encoding may be checked, and DNN setting information corresponding to a quantization parameter and a bit rate may be obtained. Even at the same bit rate, there may be a difference in the quality of the reconstructed image depending on the complexity of the image, and the bit rate is a value representative of the entire first image 115 to be first encoded, and the bit rate of each frame in the first image 115 is The picture quality may be different. Accordingly, when the prediction mode information, motion information, and/or quantization parameters obtainable from the first decoder 234 for each frame are considered together, the DNN setting more suitable for the second image 135 compared to using only AI data information can be obtained.

또한, 구현예에 따라, AI 데이터는 상호 약속된 DNN 설정 정보의 식별자를 포함할 수 있다. DNN 설정 정보의 식별자는, 제 1 DNN의 다운스케일 타겟에 대응하는 업스케일 타겟으로, 제 2 영상(135)을 AI 업스케일할 수 있도록, 제 1 DNN과 제 2 DNN 간 연계 훈련된 DNN 설정 정보의 쌍을 구분하기 위한 정보이다. AI 설정부(238)는 AI 데이터에 포함된 DNN 설정 정보의 식별자를 획득한 후, DNN 설정 정보의 식별자에 대응하는 DNN 설정 정보를 획득하고, AI 업스케일부(236)는 해당 DNN 설정 정보를 사용하여 제 2 영상(135)을 AI 업스케일할 수 있다. 예를 들어, 제 1 DNN에 설정 가능한 복수의 DNN 설정 정보 각각을 가리키는 식별자와 제 2 DNN에 설정 가능한 복수의 DNN 설정 정보 각각을 가리키는 식별자가 미리 지정되어 있을 수 있다. 이 경우, 제 1 DNN 및 제 2 DNN 각각에 설정 가능한 DNN 설정 정보의 쌍에 대해 동일한 식별자가 지정될 수 있다. AI 데이터는 원본 영상(105)의 AI 다운스케일을 위해 제 1 DNN에 설정된 DNN 설정 정보의 식별자를 포함할 수 있다. AI 데이터를 수신한 AI 설정부(238)는 복수의 DNN 설정 정보 중 AI 데이터에 포함된 식별자가 가리키는 DNN 설정 정보를 획득하고, AI 업스케일부(236)는 해당 DNN 설정 정보를 이용하여 제 2 영상(135)을 AI 업스케일할 수 있다.Also, depending on the implementation, the AI data may include an identifier of mutually agreed DNN configuration information. The identifier of the DNN setting information is an upscale target corresponding to the downscale target of the first DNN, and the DNN setting information trained in association between the first DNN and the second DNN so that the second image 135 can be AI upscaled. It is information for distinguishing pairs of . The AI setting unit 238 obtains the identifier of the DNN setting information included in the AI data, and then obtains the DNN setting information corresponding to the identifier of the DNN setting information, and the AI upscaling unit 236 receives the corresponding DNN setting information. The second image 135 may be upscaled using AI. For example, an identifier indicating each of a plurality of pieces of DNN configuration information configurable in the first DNN and an identifier indicating each of a plurality of pieces of DNN configuration information configurable in the second DNN may be predefined. In this case, the same identifier may be designated for a pair of DNN configuration information configurable to each of the first DNN and the second DNN. The AI data may include an identifier of DNN setting information set in the first DNN for AI downscaling of the original image 105 . The AI setting unit 238 that has received the AI data acquires the DNN setting information indicated by the identifier included in the AI data among a plurality of DNN setting information, and the AI upscaling unit 236 uses the corresponding DNN setting information to obtain the second The image 135 may be upscaled by AI.

또한, 구현예에 따라, AI 데이터는 DNN 설정 정보를 포함할 수도 있다. AI 설정부(238)는 AI 데이터에 포함된 DNN 설정 정보를 획득하고, AI 업스케일부(236)는 해당 DNN 설정 정보를 사용하여 제 2 영상(135)을 AI 업스케일할 수도 있다.Also, according to implementation, AI data may include DNN configuration information. The AI setting unit 238 may obtain DNN setting information included in AI data, and the AI upscaling unit 236 may AI upscale the second image 135 using the corresponding DNN setting information.

구현예에 따라, DNN 설정 정보를 구성하는 정보들(예를 들어, 컨볼루션 레이어의 수, 컨볼루션 레이어별 필터 커널의 개수, 각 필터 커널의 파라미터 등)들이 룩업 테이블 형태로 저장되어 있는 경우, AI 설정부(238)는 AI 데이터에 포함된 정보에 기초하여 룩업 테이블 값들 중에서 선택된 일부를 조합하여 DNN 설정 정보를 획득하고, AI 업스케일부(236)는 해당 DNN 설정 정보를 사용하여 제 2 영상(135)을 AI 업스케일할 수도 있다.According to the embodiment, when information constituting the DNN setting information (eg, the number of convolution layers, the number of filter kernels for each convolutional layer, parameters of each filter kernel, etc.) is stored in the form of a lookup table, The AI setting unit 238 obtains DNN setting information by combining some selected among the lookup table values based on information included in the AI data, and the AI upscaling unit 236 uses the corresponding DNN setting information to obtain the second image (135) may be AI upscaled.

구현예에 따라, AI 설정부(238)는 업스케일 타겟에 대응되는 DNN의 구조가 결정되면, 결정된 DNN의 구조에 대응하는 DNN 설정 정보, 예를 들어, 필터 커널의 파라미터들을 획득할 수도 있다.According to an embodiment, when the structure of the DNN corresponding to the upscale target is determined, the AI setting unit 238 may obtain DNN setting information corresponding to the determined structure of the DNN, for example, parameters of the filter kernel.

전술한 바와 같이, AI 설정부(238)는 제 1 DNN과 관련된 정보를 포함하는 AI 데이터를 통해 제 2 DNN의 DNN 설정 정보를 획득하고, AI 업스케일부(236)는 해당 DNN 설정 정보로 세팅된 제 2 DNN을 통해 제 2 영상(135)을 AI 업스케일하는 데, 이는, 제 2 영상(135)의 특징을 직접 분석하여 업스케일하는 것과 비교하여 메모리 사용량과 연산량이 감소될 수 있다.As described above, the AI setting unit 238 obtains DNN setting information of the second DNN through AI data including information related to the first DNN, and the AI upscaling unit 236 sets the DNN setting information to the corresponding DNN setting information. AI upscales the second image 135 through the second DNN, which may reduce memory usage and computational amount compared to upscaling by directly analyzing the characteristics of the second image 135 .

일 실시예에서, 제 2 영상(135)이 복수의 프레임으로 구성된 경우, AI 설정부(238)는 소정 개수의 프레임 별로 DNN 설정 정보를 독립적으로 획득할 수 있고, 또는, 전체 프레임에 대해 공통된 DNN 설정 정보를 획득할 수도 있다.In an embodiment, when the second image 135 consists of a plurality of frames, the AI setting unit 238 may independently obtain DNN setting information for each predetermined number of frames, or a common DNN for all frames. It is also possible to obtain setting information.

도 6은 복수의 프레임으로 구성된 제 2 영상(135)을 도시하는 도면이다.6 is a diagram illustrating a second image 135 composed of a plurality of frames.

도 6에 도시된 바와 같이, 제 2 영상(135)은 t0 내지 tn에 대응하는 프레임들로 이루어질 수 있다.As shown in FIG. 6 , the second image 135 may include frames corresponding to t0 to tn.

일 예시에서, AI 설정부(238)는 AI 데이터를 통해 제 2 DNN의 DNN 설정 정보를 획득하고, AI 업스케일부(236)는 해당 DNN 설정 정보에 기초하여 t0 내지 tn에 대응하는 프레임들을 AI 업스케일할 수 있다. 즉, t0 내지 tn에 대응하는 프레임들이 공통된 DNN 설정 정보에 기초하여 AI 업스케일될 수 있다.In one example, the AI setting unit 238 obtains DNN setting information of the second DNN through AI data, and the AI upscaling unit 236 AI frames corresponding to t0 to tn based on the corresponding DNN setting information. can be upscaled. That is, frames corresponding to t0 to tn may be AI upscaled based on common DNN configuration information.

다른 예시에서, AI 설정부(238)는 t0 내지 tn에 대응하는 프레임들 중 일부의 프레임들, 예를 들어, t0 내지 ta에 대응하는 프레임들에 대해 AI 데이터로부터 'A' DNN 설정 정보를 획득하고, ta+1 내지 tb에 대응하는 프레임들에 대해 AI 데이터로부터 'B' DNN 설정 정보를 획득할 수 있다. 또한, AI 설정부(238)는 tb+1 내지 tn에 대응하는 프레임들에 대해 AI 데이터로부터 'C' DNN 설정 정보를 획득할 수 있다. 다시 말하면, AI 설정부(238)는 복수의 프레임들 중 소정 개수의 프레임을 포함하는 그룹마다 DNN 설정 정보를 독립적으로 획득하고, AI 업스케일부(236)는 그룹 각각에 포함된 프레임들을 독립적으로 획득한 DNN 설정 정보로 AI 업스케일할 수 있다. In another example, the AI setting unit 238 obtains 'A' DNN setting information from AI data for some of the frames corresponding to t0 to tn, for example, frames corresponding to t0 to ta. and 'B' DNN configuration information may be obtained from AI data for frames corresponding to ta+1 to tb. Also, the AI setting unit 238 may obtain 'C' DNN setting information from AI data for frames corresponding to tb+1 to tn. In other words, the AI setting unit 238 independently obtains DNN setting information for each group including a predetermined number of frames among the plurality of frames, and the AI upscaling unit 236 independently selects the frames included in each group. AI upscaling is possible with the acquired DNN configuration information.

또 다른 예시에서, AI 설정부(238)는 제 2 영상(135)을 구성하는 프레임별로 DNN 설정 정보를 독립적으로 획득할 수도 있다. 예를 들어, 제 2 영상(135)이 3개의 프레임으로 구성되어 있는 경우, AI 설정부(238)는 첫 번째 프레임과 관련하여 DNN 설정 정보를 획득하고, 두 번째 프레임과 관련하여 DNN 설정 정보를 획득하고, 세 번째 프레임과 관련하여 DNN 설정 정보를 획득할 수 있다. 즉, 첫 번째 프레임, 두 번째 프레임 및 세 번째 프레임 각각에 대해 DNN 설정 정보가 독립적으로 획득될 수 있다. 전술한, 제 1 복호화부(234)로부터 제공되는 정보(예측 모드 정보, 움직임 정보, 양자화 파라미터 정보 등)와 AI 데이터에 포함된 제 1 영상(115) 관련 정보에 기초하여 DNN 설정 정보가 획득되는 방식에 따라, 제 2 영상(135)을 구성하는 프레임별로 DNN 설정 정보가 독립적으로 획득될 수 있다. 왜냐하면, 모드 정보, 양자화 파라미터 정보 등은 제 2 영상(135)을 구성하는 프레임마다 독립적으로 결정될 수 있기 때문이다.In another example, the AI setting unit 238 may independently obtain DNN setting information for each frame constituting the second image 135 . For example, when the second image 135 consists of three frames, the AI setting unit 238 obtains DNN setting information in relation to the first frame, and DNN setting information in relation to the second frame. and may acquire DNN configuration information in relation to the third frame. That is, DNN configuration information may be independently obtained for each of the first frame, the second frame, and the third frame. DNN setting information is obtained based on the information (prediction mode information, motion information, quantization parameter information, etc.) provided from the above-described first decoder 234 and information related to the first image 115 included in the AI data According to the method, DNN setting information may be independently obtained for each frame constituting the second image 135 . This is because mode information, quantization parameter information, and the like can be independently determined for each frame constituting the second image 135 .

또 다른 예시에서, AI 데이터는 AI 데이터에 기초하여 획득되는 DNN 설정 정보가 어느 프레임까지 유효한 것인지를 나타내는 정보를 포함할 수 있다. 예를 들어, AI 데이터 내에 DNN 설정 정보가 ta 프레임까지 유효하다는 정보가 포함되어 있는 경우, AI 설정부(238)는 AI 데이터에 기초하여 DNN 설정 정보를 획득하고, AI 업스케일부(236)는 t0 내지 ta 프레임들을 해당 DNN 설정 정보로 AI 업스케일한다. 그리고, 다른 AI 데이터 내에 DNN 설정 정보가 tn 프레임까지 유효하다는 정보가 포함되어 있는 경우, AI 설정부(238)는 상기 다른 AI 데이터에 기초하여 DNN 설정 정보를 획득하고, AI 업스케일부(236)는 획득한 DNN 설정 정보로 ta+1 내지 tn 프레임들을 AI 업스케일할 수 있다.In another example, the AI data may include information indicating to which frame the DNN configuration information obtained based on the AI data is valid. For example, if the AI data includes information that the DNN setting information is valid until the ta frame, the AI setting unit 238 acquires the DNN setting information based on the AI data, and the AI upscaling unit 236 is AI upscales t0 to ta frames with corresponding DNN configuration information. And, when the information that the DNN setting information is valid until the tn frame is included in other AI data, the AI setting unit 238 acquires the DNN setting information based on the other AI data, and the AI upscaling unit 236 may AI upscale ta+1 to tn frames with the obtained DNN configuration information.

이하에서는, 도 7을 참조하여, 원본 영상(105)의 AI 부호화를 위한 AI 부호화 장치(700)에 대해 설명한다.Hereinafter, an AI encoding apparatus 700 for AI encoding of the original image 105 will be described with reference to FIG. 7 .

도 7은 일 실시예에 따른 AI 부호화 장치(700)의 구성을 나타내는 블록도이다.7 is a block diagram illustrating a configuration of an AI encoding apparatus 700 according to an embodiment.

도 7을 참조하면, AI 부호화 장치(700)는 AI 부호화부(710) 및 전송부(730)를 포함할 수 있다. AI 부호화부(710)는 AI 다운스케일부(712), 제 1 부호화부(714), 데이터 처리부(716) 및 AI 설정부(718)를 포함할 수 있다.Referring to FIG. 7 , the AI encoding apparatus 700 may include an AI encoding unit 710 and a transmission unit 730 . The AI encoder 710 may include an AI downscaler 712 , a first encoder 714 , a data processor 716 , and an AI setting unit 718 .

도 7은 AI 부호화부(710) 및 전송부(730)를 개별적인 장치로 도시하고 있으나, AI 부호화부(710) 및 전송부(730)는 하나의 프로세서를 통해 구현될 수 있다. 이 경우, 전용 프로세서로 구현될 수도 있고, AP 또는 CPU, GPU와 같은 범용 프로세서와 S/W의 조합을 통해 구현될 수도 있다. 또한, 전용 프로세서의 경우, 본 개시의 실시예를 구현하기 위한 메모리를 포함하거나, 외부 메모리를 이용하기 위한 메모리 처리부를 포함할 수 있다.7 illustrates the AI encoder 710 and the transmitter 730 as separate devices, the AI encoder 710 and the transmitter 730 may be implemented through one processor. In this case, it may be implemented as a dedicated processor, or it may be implemented through a combination of an AP or a general-purpose processor such as a CPU or GPU and S/W. In addition, the dedicated processor may include a memory for implementing an embodiment of the present disclosure or a memory processing unit for using an external memory.

또한, AI 부호화부(710) 및 전송부(730)는 복수의 프로세서로 구성될 수도 있다. 이 경우, 전용 프로세서들의 조합으로 구현될 수도 있고, AP 또는 CPU, GPU와 같은 다수의 범용 프로세서들과 S/W의 조합을 통해 구현될 수도 있다. 일 실시예에서, 제 1 부호화부(714)는 제 1 프로세서로 구성되고, AI 다운스케일부(712), 데이터 처리부(716) 및 AI 설정부(718)는 제 1 프로세서와 상이한 제 2 프로세서로 구현되고, 전송부(730)는 제 1 프로세서 및 제 2 프로세서와 상이한 제 3 프로세서로 구현될 수 있다.Also, the AI encoder 710 and the transmitter 730 may include a plurality of processors. In this case, it may be implemented as a combination of dedicated processors, or may be implemented through a combination of S/W with a plurality of general-purpose processors such as an AP, CPU, or GPU. In an embodiment, the first encoding unit 714 is configured as a first processor, and the AI downscale unit 712 , the data processing unit 716 , and the AI setting unit 718 are configured as a second processor different from the first processor. In the implementation, the transmitter 730 may be implemented as a third processor different from the first processor and the second processor.

AI 부호화부(710)는 원본 영상(105)의 AI 다운스케일 및 제 1 영상(115)의 제 1 부호화를 수행하고, AI 부호화 데이터를 전송부(730)로 전달한다. 전송부(730)는 AI 부호화 데이터를 AI 복호화 장치(200)로 전송한다.The AI encoder 710 performs AI downscaling of the original image 105 and the first encoding of the first image 115 , and transmits the AI encoded data to the transmitter 730 . The transmitter 730 transmits the AI encoded data to the AI decoding apparatus 200 .

영상 데이터는 제 1 영상(115)의 제 1 부호화 결과 획득된 데이터를 포함한다. 영상 데이터는 제 1 영상(115) 내 픽셀 값들에 기초하여 획득되는 데이터, 예를 들어, 제 1 영상(115)과 제 1 영상(115)의 예측 데이터 사이의 차이인 잔차 데이터를 포함할 수 있다. 또한, 영상 데이터는 제 1 영상(115)의 제 1 부호화 과정에서 이용된 정보들을 포함한다. 예를 들어, 영상 데이터는 제 1 영상(115)을 제 1 부호화하는데 이용된 예측 모드 정보, 움직임 정보 및 제 1 영상(115)을 제 1 부호화하는데 이용된 양자화 파라미터 관련 정보 등을 포함할 수 있다.The image data includes data obtained as a result of the first encoding of the first image 115 . The image data may include data obtained based on pixel values in the first image 115 , for example, residual data that is a difference between the first image 115 and prediction data of the first image 115 . . Also, the image data includes information used in the first encoding process of the first image 115 . For example, the image data may include prediction mode information used for first encoding the first image 115 , motion information, and quantization parameter related information used for first encoding the first image 115 , etc. .

AI 데이터는, AI 업스케일부(236)가 제 1 DNN의 다운스케일 타겟에 대응하는 업스케일 타겟으로 제 2 영상(135)을 AI 업스케일할 수 있게 하는 정보들을 포함한다. The AI data includes information enabling the AI upscaling unit 236 to AI upscale the second image 135 to an upscale target corresponding to the downscale target of the first DNN.

일 예에서, AI 데이터는 원본 영상(105)과 제 1 영상(115) 사이의 차이 정보를 포함할 수 있다. In one example, the AI data may include difference information between the original image 105 and the first image 115 .

일 예에서, AI 데이터는 제 1 영상(115) 관련 정보를 포함할 수도 있다. 제 1 영상(115) 관련 정보는, 제 1 영상(115)의 해상도, 제 1 영상(115)의 제 1 부호화 결과 획득된 영상 데이터의 비트레이트 및 제 1 영상(115)의 제 1 부호화시 이용된 코덱 타입 중 적어도 하나에 대한 정보를 포함할 수 있다.In an example, the AI data may include information related to the first image 115 . The information related to the first image 115 is used for the resolution of the first image 115 , the bit rate of image data obtained as a result of the first encoding of the first image 115 , and the first encoding of the first image 115 . information on at least one of the specified codec types may be included.

일 실시예에서, AI 데이터는, 제 1 DNN의 다운스케일 타겟에 대응하는 업스케일 타겟으로 제 2 영상(135)이 AI 업스케일될 수 있도록, 상호 약속된 DNN 설정 정보의 식별자를 포함할 수 있다.In an embodiment, the AI data may include an identifier of mutually agreed DNN configuration information so that the second image 135 can be AI upscaled to an upscale target corresponding to the downscale target of the first DNN. .

또한, 일 실시예에서, AI 데이터는 제 2 DNN에 세팅 가능한 DNN 설정 정보를 포함할 수도 있다.Also, in an embodiment, the AI data may include DNN configuration information settable in the second DNN.

AI 다운스케일부(712)는 제 1 DNN을 통해 원본 영상(105)으로부터 AI 다운스케일된 제 1 영상(115)을 획득할 수 있다. AI 다운스케일부(712)는 AI 설정부(718)로부터 제공된 DNN 설정 정보를 이용하여 원본 영상(105)을 AI 다운스케일할 수 있다.The AI downscaler 712 may acquire the AI downscaled first image 115 from the original image 105 through the first DNN. The AI downscaling unit 712 may AI downscale the original image 105 using the DNN setting information provided from the AI setting unit 718 .

AI 설정부(718)는 미리 결정된 기준에 기초하여 원본 영상(105)의 다운스케일 타겟을 결정할 수 있다.The AI setting unit 718 may determine a downscale target of the original image 105 based on a predetermined criterion.

다운스케일 타겟에 부합하는 제 1 영상(115)의 획득을 위해, AI 설정부(718)는 제 1 DNN에 세팅 가능한 복수의 DNN 설정 정보를 저장할 수 있다. AI 설정부(718)는 복수의 DNN 설정 정보 중 다운스케일 타겟에 대응하는 DNN 설정 정보를 획득하고, 획득된 DNN 설정 정보를 AI 다운스케일부(712)로 제공한다.In order to acquire the first image 115 matching the downscale target, the AI setting unit 718 may store a plurality of settable DNN setting information in the first DNN. The AI setting unit 718 obtains DNN setting information corresponding to the downscale target among a plurality of DNN setting information, and provides the obtained DNN setting information to the AI downscale unit 712 .

상기 복수의 DNN 설정 정보 각각은 미리 결정된 해상도 및/또는 미리 결정된 화질의 제 1 영상(115)을 획득하기 위해 훈련된 것일 수 있다. 예를 들어, 복수의 DNN 설정 정보 중 어느 하나의 DNN 설정 정보는 원본 영상(105)의 해상도보다 1/2배만큼 작은 해상도의 제 1 영상(115), 예를 들어, 4K(4096*2160)의 원본 영상(105)보다 1/2배 작은 2K (2048*1080)의 제 1 영상(115)을 획득하기 위한 정보들을 포함할 수 있고, 다른 하나의 DNN 설정 정보는 원본 영상(105)의 해상도보다 1/4배만큼 작은 해상도의 제 1 영상(115), 예를 들어, 8K(8192*4320)의 원본 영상(105)보다 1/4배 작은 2K (2048*1080)의 제 1 영상(115)을 획득하기 위한 정보들을 포함할 수 있다.Each of the plurality of pieces of DNN configuration information may be trained to obtain the first image 115 having a predetermined resolution and/or a predetermined image quality. For example, the DNN setting information of any one of the plurality of DNN setting information is the first image 115 having a resolution that is 1/2 times smaller than the resolution of the original image 105, for example, 4K (4096*2160) may include information for obtaining the first image 115 of 2K (2048*1080) 1/2 times smaller than the original image 105 of A first image 115 of a resolution of 1/4 times smaller than that of a first image 115, for example, a first image 115 of 2K (2048*1080) which is 1/4 times smaller than an original image 105 of 8K (8192*4320). ) may include information for obtaining

구현예에 따라, DNN 설정 정보를 구성하는 정보들(예를 들어, 컨볼루션 레이어의 수, 컨볼루션 레이어별 필터 커널의 개수, 각 필터 커널의 파라미터 등)이 룩업 테이블 형태로 저장되어 있는 경우, AI 설정부(718)는 다운스케일 타겟에 따라 룩업 테이블 값들 중에서 선택된 일부를 조합하여 DNN 설정 정보를 획득하고, 획득한 DNN 설정 정보를 AI 다운스케일부(712)로 제공할 수도 있다.According to the embodiment, when information constituting the DNN setting information (eg, the number of convolution layers, the number of filter kernels for each convolutional layer, parameters of each filter kernel, etc.) is stored in the form of a lookup table, The AI setting unit 718 may obtain DNN setting information by combining some selected among the lookup table values according to the downscale target, and may provide the obtained DNN setting information to the AI downscaling unit 712 .

구현예에 따라, AI 설정부(718)는 다운스케일 타겟에 대응되는 DNN의 구조를 결정하고, 결정된 DNN의 구조에 대응하는 DNN 설정 정보, 예를 들어, 필터 커널의 파라미터들을 획득할 수도 있다.According to an embodiment, the AI setting unit 718 may determine the structure of the DNN corresponding to the downscale target, and obtain DNN setting information corresponding to the determined structure of the DNN, for example, parameters of the filter kernel.

원본 영상(105)의 AI 다운스케일을 위한 복수의 DNN 설정 정보는, 제 1 DNN과 제 2 DNN이 연계 훈련됨으로써, 최적화된 값을 가질 수 있다. 여기서, 각 DNN 설정 정보는 제 1 DNN에 포함되는 컨볼루션 레이어의 수, 컨볼루션 레이어별 필터 커널의 개수 및 각 필터 커널의 파라미터 중 적어도 하나를 포함한다.The plurality of DNN configuration information for AI downscaling of the original image 105 may have an optimized value by performing joint training of the first DNN and the second DNN. Here, each DNN configuration information includes at least one of the number of convolutional layers included in the first DNN, the number of filter kernels for each convolutional layer, and parameters of each filter kernel.

AI 다운스케일부(712)는 원본 영상(105)의 AI 다운스케일을 위해 결정된 DNN 설정 정보로 제 1 DNN을 세팅하여, 소정 해상도 및/또는 소정 화질의 제 1 영상(115)을 제 1 DNN을 통해 획득할 수 있다. 복수의 DNN 설정 정보 중 원본 영상(105)의 AI 다운스케일을 위한 DNN 설정 정보가 획득되면, 제 1 DNN 내 각 레이어는 DNN 설정 정보에 포함된 정보들에 기초하여 입력된 데이터를 처리할 수 있다.The AI downscaling unit 712 sets the first DNN as the DNN setting information determined for the AI downscaling of the original image 105, and converts the first image 115 of a predetermined resolution and/or a predetermined quality to the first DNN. can be obtained through When DNN setting information for AI downscaling of the original image 105 is obtained among a plurality of DNN setting information, each layer in the first DNN may process input data based on information included in the DNN setting information. .

이하에서는, AI 설정부(718)가 다운스케일 타겟을 결정하는 방법에 대해 설명한다. 상기 다운스케일 타겟은 예를 들어, 원본 영상(105)으로부터 얼마나 해상도가 감소한 제 1 영상(115)을 획득해야 하는지를 나타낼 수 있다.Hereinafter, a method for the AI setting unit 718 to determine the downscale target will be described. The downscale target may indicate, for example, how much the first image 115 with reduced resolution should be obtained from the original image 105 .

AI 설정부(718)는 하나 이상의 입력 정보를 획득한다. 일 실시예에서, 입력 정보는 제 1 영상(115)의 타겟 해상도, 영상 데이터의 타겟 비트레이트, 영상 데이터의 비트레이트 타입(예를 들어, variable bitrate 타입, constant bitrate 타입 또는 average bitrate 타입 등), AI 다운스케일이 적용되는 컬러 포맷(휘도 성분, 색차 성분, 레드 성분, 그린 성분 또는 블루 성분 등), 제 1 영상(115)의 제 1 부호화를 위한 코덱 타입, 압축 히스토리 정보, 원본 영상(105)의 해상도 및 원본 영상(105)의 타입 중 적어도 하나를 포함할 수 있다. The AI setting unit 718 obtains one or more pieces of input information. In an embodiment, the input information includes a target resolution of the first image 115, a target bitrate of the image data, a bitrate type of the image data (eg, a variable bitrate type, a constant bitrate type, or an average bitrate type); Color format to which AI downscale is applied (luminance component, chrominance component, red component, green component, or blue component, etc.), codec type for first encoding of first image 115, compression history information, original image 105 may include at least one of a resolution of , and a type of the original image 105 .

하나 이상의 입력 정보는 AI 부호화 장치(700)에 미리 저장되거나, 사용자로부터 입력받은 정보를 포함할 수 있다.One or more pieces of input information may include information previously stored in the AI encoding apparatus 700 or received from a user.

AI 설정부(718)는 입력 정보에 기초하여 AI 다운스케일부(712)의 동작을 제어한다. 일 실시예에서, AI 설정부(718)는 입력 정보에 따라 다운스케일 타겟을 결정하고, 결정된 다운스케일 타겟에 대응하는 DNN 설정 정보를 AI 다운스케일부(712)로 제공할 수 있다.The AI setting unit 718 controls the operation of the AI downscale unit 712 based on the input information. In an embodiment, the AI setting unit 718 may determine a downscale target according to input information, and provide DNN setting information corresponding to the determined downscale target to the AI downscale unit 712 .

일 실시예에서, AI 설정부(718)는 입력 정보의 적어도 일부를 제 1 부호화부(714)로 전달하여 제 1 부호화부(714)가 특정 값의 비트레이트, 특정 타입의 비트레이트 및 특정 코덱으로 제 1 영상(115)을 제 1 부호화하게 할 수도 있다.In an embodiment, the AI setting unit 718 transmits at least a portion of the input information to the first encoding unit 714 so that the first encoding unit 714 provides a bitrate of a specific value, a bitrate of a specific type, and a specific codec. may cause the first image 115 to be first encoded.

일 실시예에서, AI 설정부(718)는 압축률(예를 들어, 원본 영상(105)과 제 1 영상(115) 사이의 해상도 차이, 타겟 비트레이트), 압축 품질(예를 들어, 비트레이트 타입), 압축 히스토리 정보 및 원본 영상(105)의 타입 중 적어도 하나에 기초하여 다운스케일 타겟을 결정할 수 있다. In an embodiment, the AI setting unit 718 may include a compression rate (eg, a difference in resolution between the original image 105 and the first image 115 , a target bitrate), and a compression quality (eg, a bitrate type). ), compression history information, and a downscale target may be determined based on at least one of the type of the original image 105 .

일 예에서, AI 설정부(718)는 미리 설정되거나, 사용자로부터 입력받은 압축률 또는 압축 품질 등에 기반하여 다운스케일 타겟을 결정할 수 있다. In an example, the AI setting unit 718 may determine a downscale target based on a preset or a compression rate or compression quality input from a user.

다른 예로, AI 설정부(718)는 AI 부호화 장치(700)에 저장된 압축 히스토리 정보를 이용하여 다운스케일 타겟을 결정할 수도 있다. 예를 들어, AI 부호화 장치(700)가 이용할 수 있는 압축 히스토리 정보에 따르면, 사용자가 선호하는 부호화 품질 또는 압축률 등이 결정될 수 있으며, 압축 히스토리 정보에 기초하여 결정된 부호화 품질 등에 따라 다운스케일 타겟이 결정될 수 있다. 예를 들면, 압축 히스토리 정보에 따라 가장 많이 이용된 적이 있는 부호화 품질에 따라 제 1 영상(115)의 해상도, 화질 등이 결정될 수 있다. As another example, the AI setting unit 718 may determine the downscale target by using the compression history information stored in the AI encoding apparatus 700 . For example, according to the compression history information available to the AI encoding apparatus 700, the encoding quality or compression rate preferred by the user may be determined, and the downscale target may be determined according to the encoding quality determined based on the compression history information. can For example, the resolution and quality of the first image 115 may be determined according to the encoding quality that has been most frequently used according to the compression history information.

또 다른 예로, AI 설정부(718)는 압축 히스토리 정보에 따라 소정의 임계 값보다 많이 이용된 적이 있는 부호화 품질(예를 들면, 소정의 임계값보다 많이 이용된 적이 있는 부호화 품질들의 평균 품질)에 기초하여 다운스케일 타겟을 결정할 수도 있다. As another example, the AI setting unit 718 sets the encoding quality that has been used more than a predetermined threshold value (eg, average quality of encoding qualities that have been used more than a predetermined threshold value) according to the compression history information. A downscale target may be determined based on it.

또 다른 예로, AI 설정부(718)는 원본 영상(105)의 해상도, 타입(예를 들어, 파일의 형식)등에 기초하여 다운스케일 타겟을 결정할 수도 있다.As another example, the AI setting unit 718 may determine the downscale target based on the resolution and type (eg, file format) of the original image 105 .

일 실시예에서, 원본 영상(105)이 복수의 프레임으로 구성된 경우, AI 설정부(718)는 소정 개수의 프레임 별로 DNN 설정 정보를 독립적으로 획득하고, 독립적으로 획득한 DNN 설정 정보를 AI 다운스케일부(712)로 제공할 수도 있다.In one embodiment, when the original image 105 is composed of a plurality of frames, the AI setting unit 718 independently acquires DNN setting information for each predetermined number of frames, and uses the independently acquired DNN setting information to AI downscaling. A portion 712 may be provided.

일 예시에서, AI 설정부(718)는 원본 영상(105)을 구성하는 프레임들을 소정 개수의 그룹으로 구분하고, 각 그룹별로 DNN 설정 정보를 독립적으로 획득할 수 있다. 각 그룹에 대해 서로 동일하거나 서로 상이한 DNN 설정 정보가 획득될 수 있다. 그룹들에 포함된 프레임들의 개수는 그룹별로 동일하거나 상이할 수 있다.In one example, the AI setting unit 718 may classify frames constituting the original image 105 into a predetermined number of groups, and independently obtain DNN setting information for each group. The same or different DNN configuration information may be obtained for each group. The number of frames included in the groups may be the same or different for each group.

다른 예시에서, AI 설정부(718)는 원본 영상(105)을 구성하는 프레임별로 DNN 설정 정보를 독립적으로 결정할 수 있다. 각각의 프레임에 대해 서로 동일하거나 서로 상이한 DNN 설정 정보가 획득될 수 있다.In another example, the AI setting unit 718 may independently determine DNN setting information for each frame constituting the original image 105 . The same or different DNN configuration information may be obtained for each frame.

이하에서는, AI 다운스케일의 기반이 되는 제 1 DNN(800)의 예시적인 구조에 대해 설명한다.Hereinafter, an exemplary structure of the first DNN 800 as a basis for AI downscaling will be described.

도 8은 원본 영상(105)의 AI 다운스케일을 위한 제 1 DNN(800)을 나타내는 예시적인 도면이다.8 is an exemplary diagram illustrating the first DNN 800 for AI downscaling of the original image 105 .

도 8에 도시된 바와 같이, 원본 영상(105)은 제 1 컨볼루션 레이어(810)로 입력된다. 제 1 컨볼루션 레이어(810)는 5 x 5의 크기의 32개의 필터 커널을 이용하여 원본 영상(105)에 대해 컨볼루션 처리를 한다. 컨볼루션 처리 결과 생성된 32개의 특징 맵은 제 1 활성화 레이어(820)로 입력된다. As shown in FIG. 8 , the original image 105 is input to the first convolutional layer 810 . The first convolutional layer 810 performs convolution processing on the original image 105 using 32 filter kernels having a size of 5×5. The 32 feature maps generated as a result of the convolution process are input to the first activation layer 820 .

제 1 활성화 레이어(820)는 32개의 특징 맵에 대해 비선형(Non-linear) 특성을 부여할 수 있다.The first activation layer 820 may provide non-linear characteristics to 32 feature maps.

제 1 활성화 레이어(820)는 제 1 컨볼루션 레이어(810)로부터 출력되는 특징 맵들의 샘플 값들을 제 2 컨볼루션 레이어(830)로 전달할지 여부를 결정한다. 예를 들어, 특징 맵들의 샘플 값들 중 어떤 샘플 값들은 제 1 활성화 레이어(820)에 의해 활성화되어 제 2 컨볼루션 레이어(830)로 전달되고, 어떤 샘플 값들은 제 1 활성화 레이어(820)에 의해 비활성화되어 제 2 컨볼루션 레이어(830)로 전달되지 않는다. 제 1 컨볼루션 레이어(810)로부터 출력되는 특징 맵들이 나타내는 정보가 제 1 활성화 레이어(820)에 의해 강조된다.The first activation layer 820 determines whether to transfer sample values of the feature maps output from the first convolution layer 810 to the second convolution layer 830 . For example, some sample values among the sample values of the feature maps are activated by the first activation layer 820 and transmitted to the second convolution layer 830 , and some sample values are activated by the first activation layer 820 . It is deactivated and is not transmitted to the second convolutional layer 830 . Information indicated by the feature maps output from the first convolution layer 810 is emphasized by the first activation layer 820 .

제 1 활성화 레이어(820)의 출력(825)이 제 2 컨볼루션 레이어(830)로 입력된다. 제 2 컨볼루션 레이어(830)는 5 x 5의 크기의 32개의 필터 커널을 이용하여 입력 데이터에 대해 컨볼루션 처리를 한다. 컨볼루션 처리 결과 출력된 32개의 특징 맵은 제 2 활성화 레이어(840)로 입력되고, 제 2 활성화 레이어(840)는 32개의 특징 맵에 대해 비선형 특성을 부여할 수 있다. The output 825 of the first activation layer 820 is input to the second convolution layer 830 . The second convolution layer 830 performs convolution processing on input data by using 32 filter kernels having a size of 5×5. The 32 feature maps output as a result of the convolution process are input to the second activation layer 840 , and the second activation layer 840 may provide nonlinear characteristics to the 32 feature maps.

제 2 활성화 레이어(840)의 출력(845)은 제 3 컨볼루션 레이어(850)로 입력된다. 제 3 컨볼루션 레이어(850)는 5 x 5의 크기의 1개의 필터 커널을 이용하여 입력된 데이터에 대해 컨볼루션 처리를 한다. 컨볼루션 처리 결과 제 3 컨볼루션 레이어(850)로부터 1개의 영상이 출력될 수 있다. 제 3 컨볼루션 레이어(850)는 최종 영상을 출력하기 위한 레이어로서 1개의 필터 커널을 이용하여 1개의 출력을 획득한다. 본 개시의 예시에 따르면, 제 3 컨볼루션 레이어(850)는 컨벌루션 연산 결과를 통해 제 1 영상(115)을 출력할 수 있다.The output 845 of the second activation layer 840 is input to the third convolution layer 850 . The third convolution layer 850 performs convolution processing on input data using one filter kernel having a size of 5×5. As a result of the convolution processing, one image may be output from the third convolutional layer 850 . The third convolutional layer 850 is a layer for outputting a final image and obtains one output by using one filter kernel. According to the example of the present disclosure, the third convolution layer 850 may output the first image 115 through the convolution operation result.

제 1 DNN(800)의 제 1 컨볼루션 레이어(810), 제 2 컨볼루션 레이어(830) 및 제 3 컨볼루션 레이어(850)의 필터 커널의 개수, 필터 커널의 파라미터 등을 나타내는 DNN 설정 정보는 복수 개일 수 있는데, 복수의 DNN 설정 정보는 제 2 DNN의 복수의 DNN 설정 정보와 연계되어야 한다. 제 1 DNN의 복수의 DNN 설정 정보와 제 2 DNN의 복수의 DNN 설정 정보 사이의 연계는, 제 1 DNN 및 제 2 DNN의 연계 학습을 통해 구현될 수 있다. DNN setting information indicating the number of filter kernels of the first convolutional layer 810, the second convolutional layer 830, and the third convolutional layer 850 of the first DNN 800, parameters of the filter kernel, etc. There may be a plurality, and the plurality of DNN configuration information should be associated with the plurality of DNN configuration information of the second DNN. The association between the plurality of DNN configuration information of the first DNN and the plurality of DNN configuration information of the second DNN may be implemented through association learning of the first DNN and the second DNN.

도 8은 제 1 DNN(800)이 세 개의 컨볼루션 레이어(810, 830, 850)와 두 개의 활성화 레이어(820, 840)를 포함하고 있는 것으로 도시하고 있으나, 이는 하나의 예시일 뿐이며, 구현예에 따라서, 컨볼루션 레이어 및 활성화 레이어의 개수는 다양하게 변경될 수 있다. 또한, 구현예에 따라서, 제 1 DNN(800)은 RNN(recurrent neural network)을 통해 구현될 수도 있다. 이 경우는 본 개시의 예시에 따른 제 1 DNN(800)의 CNN 구조를 RNN 구조로 변경하는 것을 의미한다.8 shows that the first DNN 800 includes three convolutional layers 810 , 830 , 850 and two activation layers 820 , 840 , but this is only an example, and the implementation Accordingly, the number of convolutional layers and activation layers may be variously changed. Also, according to an embodiment, the first DNN 800 may be implemented through a recurrent neural network (RNN). In this case, it means changing the CNN structure of the first DNN 800 according to the example of the present disclosure to the RNN structure.

일 실시예에서, AI 다운스케일부(712)는 컨볼루션 연산 및 활성화 레이어의 연산을 위한 적어도 하나의 ALU를 포함할 수 있다. ALU는 프로세서로 구현될 수 있다. 컨볼루션 연산을 위해, ALU는 원본 영상(105) 또는 이전 레이어에서 출력된 특징 맵의 샘플 값들과 필터 커널의 샘플 값들 사이의 곱 연산을 수행하는 곱셈기 및 곱셈의 결과 값들을 더하는 가산기를 포함할 수 있다. 또한, 활성화 레이어의 연산을 위해, ALU는 미리 결정된 시그모이드 함수, Tanh 함수 또는 ReLU 함수 등에서 이용되는 가중치를 입력된 샘플 값에 곱하는 곱셈기, 및 곱한 결과와 소정 값을 비교하여 입력된 샘플 값을 다음 레이어로 전달할지를 판단하는 비교기를 포함할 수 있다.In an embodiment, the AI downscaling unit 712 may include at least one ALU for a convolution operation and an activation layer operation. The ALU may be implemented as a processor. For the convolution operation, the ALU may include a multiplier that performs a multiplication operation between the sample values of the feature map output from the original image 105 or the previous layer and the sample values of the filter kernel, and an adder that adds the result values of the multiplication. have. In addition, for the calculation of the activation layer, the ALU is a multiplier that multiplies an input sample value by a weight used in a predetermined sigmoid function, a Tanh function, or a ReLU function, and compares the multiplication result with a predetermined value to calculate the input sample value It may include a comparator that determines whether to transfer to the next layer.

다시 도 7을 참조하면, AI 설정부(718)는 AI 데이터를 데이터 처리부(716)로 전달한다. AI 데이터는, AI 업스케일부(236)가 제 1 DNN의 다운스케일 타겟에 대응하는 업스케일 타겟으로 제 2 영상(135)을 AI 업스케일할 수 있게 하는 정보들을 포함한다. Referring back to FIG. 7 , the AI setting unit 718 transmits AI data to the data processing unit 716 . The AI data includes information enabling the AI upscaling unit 236 to AI upscale the second image 135 to an upscale target corresponding to the downscale target of the first DNN.

AI 다운스케일부(712)로부터 제 1 영상(115)을 전달받은 제 1 부호화부(714)는 주파수 변환 기반의 영상 압축 방법에 따라 제 1 영상(115)을 제 1 부호화하여 제 1 영상(115)이 가지는 정보량을 감축시킬 수 있다. 소정의 코덱(예를 들어, MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9 또는 AV1)을 통한 제 1 부호화 결과, 영상 데이터가 획득된다. 영상 데이터는 소정의 코덱의 규칙, 즉 신택스에 따라 획득된다. 예를 들어, 영상 데이터는 제 1 영상(115)과 제 1 영상(115)의 예측 데이터 사이의 차이인 잔차 데이터, 제 1 영상(115)을 제 1 부호화하는데 이용된 예측 모드 정보, 움직임 정보 및 제 1 영상(115)을 제 1 부호화하는데 이용된 양자화 파라미터 관련 정보 등을 포함할 수 있다.The first encoder 714 receiving the first image 115 from the AI downscaler 712 first encodes the first image 115 according to the frequency transformation-based image compression method to obtain the first image 115 . ) can reduce the amount of information it has. As a result of the first encoding through a predetermined codec (eg, MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9, or AV1), image data is obtained. The image data is obtained according to a rule of a predetermined codec, that is, a syntax. For example, the image data includes residual data that is a difference between the first image 115 and the prediction data of the first image 115 , prediction mode information used to first encode the first image 115 , motion information, and Information related to a quantization parameter used to first encode the first image 115 may be included.

제 1 부호화부(714)의 제 1 부호화 결과 획득된 영상 데이터는 데이터 처리부(716)로 제공된다. The image data obtained as a result of the first encoding by the first encoder 714 is provided to the data processor 716 .

데이터 처리부(716)는 제 1 부호화부(714)로부터 수신된 영상 데이터와 AI 설정부(718)로부터 수신된 AI 데이터를 포함하는 AI 부호화 데이터를 생성한다. The data processing unit 716 generates AI encoded data including the image data received from the first encoding unit 714 and the AI data received from the AI setting unit 718 .

일 실시예에서, 데이터 처리부(716)는 영상 데이터와 AI 데이터를 각각 분리된 상태로 포함하는 AI 부호화 데이터를 생성할 수 있다. 일 예로, AI 데이터는 HDMI 스트림 내의 VSIF(Vendor Specific InfoFrame)에 포함될 수 있다.In an embodiment, the data processing unit 716 may generate AI-encoded data including image data and AI data in a separate state. As an example, AI data may be included in a Vendor Specific InfoFrame (VSIF) in the HDMI stream.

다른 실시예에서, 데이터 처리부(716)는 제 1 부호화부(714)에 의한 제 1 부호화 결과로 획득되는 영상 데이터 내에 AI 데이터를 포함시키고, 해당 영상 데이터를 포함하는 AI 부호화 데이터를 생성할 수 있다. 일 예로, 데이터 처리부(716)는 영상 데이터에 해당하는 비트스트림과 AI 데이터에 해당하는 비트스트림을 결합하여 하나의 비트스트림 형태의 영상 데이터를 생성할 수도 있다. 이를 위해, 데이터 처리부(716)는 AI 데이터를 0 또는 1의 값을 갖는 비트들, 즉 비트스트림으로 표현할 수 있다. 일 실시예에서, 데이터 처리부(716)는 제 1 부호화 결과로 획득되는 비트스트림의 부가 정보 영역인 SEI(Supplemental enhancement information)에 AI 데이터에 해당하는 비트스트림을 포함시킬 수 있다.In another embodiment, the data processing unit 716 may include AI data in image data obtained as a result of the first encoding by the first encoding unit 714 and generate AI encoded data including the corresponding image data. . For example, the data processing unit 716 may generate image data in the form of one bitstream by combining a bitstream corresponding to image data and a bitstream corresponding to AI data. To this end, the data processing unit 716 may represent the AI data as bits having a value of 0 or 1, that is, a bitstream. In an embodiment, the data processing unit 716 may include a bitstream corresponding to AI data in supplemental enhancement information (SEI) that is an additional information area of a bitstream obtained as a result of the first encoding.

AI 부호화 데이터는 전송부(730)로 전송된다. 전송부(730)는 네트워크를 통해 AI 부호화 결과 획득된 AI 부호화 데이터를 전송한다.The AI-encoded data is transmitted to the transmitter 730 . The transmitter 730 transmits the AI-encoded data obtained as a result of the AI-encoding through a network.

일 실시예에서, AI 부호화 데이터는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium) 등을 포함하는 데이터 저장 매체에 저장될 수도 있다.In one embodiment, the AI encoded data is a hard disk, a magnetic medium such as a floppy disk and magnetic tape, an optical recording medium such as CD-ROM and DVD, a magneto-optical medium such as a floppy disk. medium) may be stored in a data storage medium including

도 9는 일 실시예에 따른 AI 부호화 데이터(900)의 구조를 나타내는 도면이다.9 is a diagram illustrating a structure of AI-encoded data 900 according to an embodiment.

전술한 바와 같이, AI 부호화 데이터(900) 내에 AI 데이터(912)와 영상 데이터(932)가 분리되어 포함될 수 있다. 여기서, AI 부호화 데이터(900)는 MP4, AVI, MKV, FLV 등의 컨테이너 포맷일 수 있다. AI 부호화 데이터(900)는 메타데이터 박스(910)와 미디어데이터 박스(930)로 구성될 수 있다. As described above, the AI data 912 and the image data 932 may be separately included in the AI encoded data 900 . Here, the AI-encoded data 900 may be in a container format such as MP4, AVI, MKV, or FLV. The AI-encoded data 900 may include a metadata box 910 and a media data box 930 .

메타데이터 박스(910)에는 미디어데이터 박스(930)에 포함된 영상 데이터(932)에 관한 정보가 포함된다. 예를 들어, 메타데이터 박스(910)에는 제 1 영상(115)의 종류, 제 1 영상(115)의 부호화에 사용된 코덱의 종류 및 제 1 영상(115)의 재생 시간 등에 관한 정보가 포함될 수 있다. 또한, 메타데이터 박스(910)에는 AI 데이터(912)가 포함될 수 있다. AI 데이터(912)는 소정 컨테이너 포맷에서 제공하는 부호화 방식에 따라 부호화되어, 메타데이터 박스(910)에 저장될 수 있다. The metadata box 910 includes information about the image data 932 included in the media data box 930 . For example, the metadata box 910 may include information on the type of the first image 115 , the type of codec used to encode the first image 115 , and the playback time of the first image 115 . have. Also, the metadata box 910 may include AI data 912 . The AI data 912 may be encoded according to an encoding method provided by a predetermined container format and stored in the metadata box 910 .

미디어데이터 박스(930)는 소정의 영상 압축 방식의 신택스에 따라 생성된 영상 데이터(932)를 포함할 수 있다.The media data box 930 may include image data 932 generated according to the syntax of a predetermined image compression method.

도 10은 다른 실시예에 따른 AI 부호화 데이터(1000)의 구조를 나타내는 도면이다.10 is a diagram illustrating a structure of AI encoded data 1000 according to another embodiment.

도 10을 참조하면, AI 데이터(1034)는 영상 데이터(1032)에 포함될 수도 있다. AI 부호화 데이터(1000)는 메타데이터 박스(1010)와 미디어데이터 박스(1030)를 포함할 수 있는데, AI 데이터(1034)가 영상 데이터(1032)에 포함된 경우, 메타데이터 박스(1010)에는 AI 데이터(1034)가 포함되지 않을 수 있다.Referring to FIG. 10 , AI data 1034 may be included in image data 1032 . The AI-encoded data 1000 may include a metadata box 1010 and a media data box 1030 . When the AI data 1034 is included in the image data 1032 , the metadata box 1010 contains AI Data 1034 may not be included.

미디어데이터 박스(1030)에는 AI 데이터(1034)를 포함하는 영상 데이터(1032)가 포함된다. 일 예로, AI 데이터(1034)는 영상 데이터(1032)의 부가 정보 영역에 포함될 수 있다. The media data box 1030 includes image data 1032 including AI data 1034 . For example, the AI data 1034 may be included in the additional information area of the image data 1032 .

이하에서는, 도 11을 참조하여, 제 1 DNN(800)과 제 2 DNN(300)을 연계 훈련시키는 방법에 대해 설명한다.Hereinafter, a method of jointly training the first DNN 800 and the second DNN 300 will be described with reference to FIG. 11 .

도 11은 제 1 DNN(800) 및 제 2 DNN(300)을 훈련시키는 방법을 설명하기 위한 도면이다.11 is a diagram for explaining a method of training the first DNN 800 and the second DNN 300 .

일 실시예에서 AI 부호화 과정을 통해 AI 부호화된 원본 영상(105)이 AI 복호화 과정을 통해 제 3 영상(145)으로 복원되는데, AI 복호화 결과 획득된 제 3 영상(145)과 원본 영상(105)과의 유사성을 유지하기 위해서는 AI 부호화 과정 및 AI 복호화 과정에 연관성이 필요하다. 즉, AI 부호화 과정에서 손실된 정보를 AI 복호화 과정에서 복원할 수 있어야 하는데, 이를 위해 제 1 DNN(800)과 제 2 DNN(300)의 연계 훈련이 요구된다.In an embodiment, the AI-encoded original image 105 through the AI encoding process is restored to the third image 145 through the AI decoding process. The third image 145 and the original image 105 obtained as a result of AI decoding In order to maintain the similarity with the AI encoding process and the AI decoding process, correlation is required. That is, information lost in the AI encoding process should be able to be restored in the AI decoding process, and for this purpose, joint training between the first DNN 800 and the second DNN 300 is required.

정확한 AI 복호화를 위해서는 궁극적으로 도 11에 도시된 제 3 훈련 영상(1104)과 원본 훈련 영상(1101) 사이의 비교 결과에 대응하는 퀄리티 손실 정보(1130)를 감소시킬 필요가 있다. 따라서, 퀄리티 손실 정보(1130)는 제 1 DNN(800) 및 제 2 DNN(300)의 훈련 모두에 이용된다.For accurate AI decoding, it is ultimately necessary to reduce the quality loss information 1130 corresponding to the comparison result between the third training image 1104 and the original training image 1101 shown in FIG. 11 . Accordingly, the quality loss information 1130 is used for both training of the first DNN 800 and the second DNN 300 .

먼저, 도 11에 도시된 훈련 과정에 대해 설명한다.First, the training process shown in FIG. 11 will be described.

도 11에서, 원본 훈련 영상(original training image)(1101)은 AI 다운스케일의 대상이 되는 영상이고, 제 1 훈련 영상(first training image)(1102)은 원본 훈련 영상(1101)로부터 AI 다운스케일된 영상이다. 또한, 제 3 훈련 영상(third training image)(1104)은 제 1 훈련 영상(1102)으로부터 AI 업스케일된 영상이다. In FIG. 11 , an original training image 1101 is an image subject to AI downscale, and a first training image 1102 is an AI downscaled image from the original training image 1101 . it's a video Also, the third training image 1104 is an AI upscaled image from the first training image 1102 .

원본 훈련 영상(1101)은 정지 영상 또는 복수의 프레임으로 이루어진 동영상을 포함한다. 일 실시예에서, 원본 훈련 영상(1101)은 정지 영상 또는 복수의 프레임으로 이루어진 동영상으로부터 추출된 휘도 영상을 포함할 수도 있다. 또한, 일 실시예에서, 원본 훈련 영상(1101)은 정지 영상 또는 복수의 프레임으로 이루어진 동영상에서 추출된 패치 영상을 포함할 수도 있다. 원본 훈련 영상(1101)이 복수의 프레임으로 이루어진 경우, 제 1 훈련 영상(1102), 제 2 훈련 영상 및 제 3 훈련 영상(1104) 역시 복수의 프레임으로 구성된다. 원본 훈련 영상(1101)의 복수의 프레임이 순차적으로 제 1 DNN(800)에 입력되면, 제 1 DNN(800) 및 제 2 DNN(300)을 통해 제 1 훈련 영상(1102), 제 2 훈련 영상 및 제 3 훈련 영상(1104)의 복수의 프레임이 순차적으로 획득될 수 있다.The original training image 1101 includes a still image or a moving image composed of a plurality of frames. In an embodiment, the original training image 1101 may include a still image or a luminance image extracted from a moving picture including a plurality of frames. Also, according to an embodiment, the original training image 1101 may include a still image or a patch image extracted from a moving image including a plurality of frames. When the original training image 1101 consists of a plurality of frames, the first training image 1102 , the second training image and the third training image 1104 also include a plurality of frames. When a plurality of frames of the original training image 1101 are sequentially input to the first DNN 800 , the first training image 1102 and the second training image are performed through the first DNN 800 and the second DNN 300 . and a plurality of frames of the third training image 1104 may be sequentially acquired.

제 1 DNN(800) 및 제 2 DNN(300)의 연계 훈련을 위해, 원본 훈련 영상(1101)이 제 1 DNN(800)으로 입력된다. 제 1 DNN(800)으로 입력된 원본 훈련 영상(1101)은 AI 다운스케일되어 제 1 훈련 영상(1102)으로 출력되고, 제 1 훈련 영상(1102)이 제 2 DNN(300)에 입력된다. 제 1 훈련 영상(1102)에 대한 AI 업스케일 결과 제 3 훈련 영상(1104)이 출력된다.For joint training of the first DNN 800 and the second DNN 300 , an original training image 1101 is input to the first DNN 800 . The original training image 1101 input to the first DNN 800 is AI downscaled and output as the first training image 1102 , and the first training image 1102 is input to the second DNN 300 . A third training image 1104 is output as a result of AI upscaling for the first training image 1102 .

도 11을 참조하면, 제 2 DNN(300)으로 제 1 훈련 영상(1102)이 입력되고 있는데, 구현예에 따라, 제 1 훈련 영상(1102)의 제 1 부호화 및 제 1 복호화 과정을 거쳐 획득된 제 2 훈련 영상(second training image)이 제 2 DNN(300)으로 입력될 수도 있다. 제 2 훈련 영상을 제 2 DNN으로 입력시키기 위해 MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9 및 AV1 중 어느 하나의 코덱이 이용될 수 있다. 구체적으로, 제 1 훈련 영상(1102)의 제 1 부호화 및 제 1 훈련 영상(1102)에 대응하는 영상 데이터의 제 1 복호화에, MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9 및 AV1 중 어느 하나의 코덱이 이용될 수 있다. Referring to FIG. 11 , a first training image 1102 is being input to the second DNN 300 . According to an embodiment, the first training image 1102 is obtained through a first encoding and a first decoding process. A second training image may be input to the second DNN 300 . In order to input the second training image to the second DNN, any one of MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9, and AV1 codecs may be used. Specifically, in the first encoding of the first training image 1102 and the first decoding of image data corresponding to the first training image 1102, MPEG-2, H.264, MPEG-4, HEVC, VC-1 , VP8, VP9, and any one codec of AV1 may be used.

도 11을 참조하면, 제 1 DNN(800)을 통해 제 1 훈련 영상(1102)이 출력되는 것과 별개로, 원본 훈련 영상(1101)으로부터 레거시 다운스케일된 축소 훈련 영상(1103)이 획득된다. 여기서, 레거시 다운스케일은 바이리니어(bilinear) 스케일, 바이큐빅(bicubic) 스케일, 란조스(lanczos) 스케일 및 스테어 스탭(stair step) 스케일 중 적어도 하나를 포함할 수 있다. Referring to FIG. 11 , the legacy downscaled reduced training image 1103 is obtained from the original training image 1101 separately from the output of the first training image 1102 through the first DNN 800 . Here, the legacy downscale may include at least one of a bilinear scale, a bicubic scale, a lanczos scale, and a stair step scale.

원본 영상(105)의 구조적 특징을 기준으로 제 1 영상(115)의 구조적 특징이 크게 벗어나는 것을 방지하기 위해, 원본 훈련 영상(1101)의 구조적 특징을 보존하는 축소 훈련 영상(1103)을 획득하는 것이다.In order to prevent the structural features of the first image 115 from greatly deviate based on the structural features of the original image 105, a reduced training image 1103 that preserves the structural features of the original training image 1101 is acquired. .

훈련의 진행 전 제 1 DNN(800) 및 제 2 DNN(300)은 미리 결정된 DNN 설정 정보로 세팅될 수 있다. 훈련이 진행됨에 따라 구조적 손실 정보(1110), 복잡성 손실 정보(1120) 및 퀄리티 손실 정보(1130)가 결정될 수 있다.Before the training proceeds, the first DNN 800 and the second DNN 300 may be set with predetermined DNN configuration information. As training progresses, structural loss information 1110 , complexity loss information 1120 , and quality loss information 1130 may be determined.

구조적 손실 정보(1110)는 축소 훈련 영상(1103)과 제 1 훈련 영상(1102)의 비교 결과에 기초하여 결정될 수 있다. 일 예에서, 구조적 손실 정보(1110)는 축소 훈련 영상(1103)의 구조적 정보와 제 1 훈련 영상(1102)의 구조적 정보 사이의 차이에 해당할 수 있다. 구조적 정보는, 영상의 휘도, 대비, 히스토그램 등 영상으로부터 추출 가능한 다양한 특징을 포함할 수 있다. 구조적 손실 정보(1110)는 원본 훈련 영상(1101)의 구조적 정보가 제 1 훈련 영상(1102)에서 어느 정도로 유지되고 있는지를 나타낸다. 구조적 손실 정보(1110)가 작을수록 제 1 훈련 영상(1102)의 구조적 정보가 원본 훈련 영상(1101)의 구조적 정보와 유사해진다.The structural loss information 1110 may be determined based on a comparison result between the reduced training image 1103 and the first training image 1102 . In one example, the structural loss information 1110 may correspond to a difference between the structural information of the reduced training image 1103 and the structural information of the first training image 1102 . The structural information may include various features that can be extracted from the image, such as luminance, contrast, and histogram of the image. The structural loss information 1110 indicates to what extent the structural information of the original training image 1101 is maintained in the first training image 1102 . As the structural loss information 1110 is smaller, the structural information of the first training image 1102 is similar to the structural information of the original training image 1101 .

복잡성 손실 정보(1120)는 제 1 훈련 영상(1102)의 공간적 복잡도에 기반하여 결정될 수 있다. 일 예에서, 공간적 복잡도로서, 제 1 훈련 영상(1102)의 총 분산(total variance)값이 이용될 수 있다. 복잡성 손실 정보(1120)는 제 1 훈련 영상(1102)을 제 1 부호화하여 획득한 영상 데이터의 비트레이트와 관련된다. 복잡성 손실 정보(1120)가 작을수록 영상 데이터의 비트레이트가 작은 것으로 정의된다.The complexity loss information 1120 may be determined based on the spatial complexity of the first training image 1102 . In an example, as the spatial complexity, a total variance value of the first training image 1102 may be used. The complexity loss information 1120 is related to a bit rate of image data obtained by first encoding the first training image 1102 . The smaller the complexity loss information 1120 is, the smaller the bit rate of image data is defined.

퀄리티 손실 정보(1130)는 원본 훈련 영상(1101)과 제 3 훈련 영상(1104)의 비교 결과에 기초하여 결정될 수 있다. 퀄리티 손실 정보(1130)는 원본 훈련 영상(1101)과 제 3 훈련 영상(1104)의 차이에 대한 L1-norm 값, L2-norm 값, SSIM(Structural Similarity) 값, PSNR-HVS(Peak Signal-To-Noise Ratio-Human Vision System) 값, MS-SSIM(Multiscale SSIM) 값, VIF(Variance Inflation Factor) 값 및 VMAF(Video Multimethod Assessment Fusion) 값 중 적어도 하나를 포함할 수 있다. 퀄리티 손실 정보(1130)는 제 3 훈련 영상(1104)이 원본 훈련 영상(1101)과 어느 정도로 유사한지를 나타낸다. 퀄리티 손실 정보(1130)가 작을수록 제 3 훈련 영상(1104)이 원본 훈련 영상(1101)에 더 유사해진다.The quality loss information 1130 may be determined based on a comparison result between the original training image 1101 and the third training image 1104 . The quality loss information 1130 includes an L1-norm value, an L2-norm value, a Structural Similarity (SSIM) value, and a Peak Signal-To (PSNR-HVS) value for the difference between the original training image 1101 and the third training image 1104 . It may include at least one of a Noise Ratio-Human Vision System) value, a Multiscale SSIM (MS-SSIM) value, a Variance Inflation Factor (VIF) value, and a Video Multimethod Assessment Fusion (VMAF) value. The quality loss information 1130 indicates how similar the third training image 1104 is to the original training image 1101 . As the quality loss information 1130 is smaller, the third training image 1104 is more similar to the original training image 1101 .

도 11을 참조하면, 구조적 손실 정보(1110), 복잡성 손실 정보(1120) 및 퀄리티 손실 정보(1130)가 제 1 DNN(800)의 훈련에 이용되고, 퀄리티 손실 정보(1130)는 제 2 DNN(300)의 훈련에 이용된다. 즉, 퀄리티 손실 정보(1130)는 제 1 DNN(800) 및 제 2 DNN(300)의 훈련에 모두 이용된다.11, structural loss information 1110, complexity loss information 1120, and quality loss information 1130 are used for training of the first DNN 800, and the quality loss information 1130 is the second DNN ( 300) is used for training. That is, the quality loss information 1130 is used for both training of the first DNN 800 and the second DNN 300 .

제 1 DNN(800)은 구조적 손실 정보(1110), 복잡성 손실 정보(1120) 및 퀄리티 손실 정보(1130)에 기초하여 결정된 최종 손실 정보가 감소 또는 최소화되도록 파라미터를 갱신할 수 있다. 또한, 제 2 DNN(300)은 퀄리티 손실 정보(1130)가 감소 또는 최소화되도록 파라미터를 갱신할 수 있다.The first DNN 800 may update parameters such that the final loss information determined based on the structural loss information 1110 , the complexity loss information 1120 , and the quality loss information 1130 is reduced or minimized. Also, the second DNN 300 may update the parameter so that the quality loss information 1130 is reduced or minimized.

제 1 DNN(800) 및 제 2 DNN(300)의 훈련을 위한 최종 손실 정보는 아래의 수학식 1과 같이 결정될 수 있다.Final loss information for training of the first DNN 800 and the second DNN 300 may be determined as in Equation 1 below.

[수학식 1][Equation 1]

Figure 112020108700079-pat00001
Figure 112020108700079-pat00001

상기 수학식 1에서, LossDS는 제 1 DNN(800)의 훈련을 위해 감소 또는 최소화되어야 할 최종 손실 정보를 나타내고, LossUS는 제 2 DNN(300)의 훈련을 위해 감소 또는 최소화되어야 할 최종 손실 정보를 나타낸다. 또한, a, b, c, d는 미리 결정된 소정의 가중치에 해당할 수 있다.In Equation 1, LossDS represents final loss information to be reduced or minimized for training of the first DNN 800, and LossUS represents final loss information to be reduced or minimized for training of the second DNN 300. indicates. Also, a, b, c, and d may correspond to predetermined weights.

즉, 제 1 DNN(800)은 수학식 1의 LossDS가 감소되는 방향으로 파라미터들을 갱신하고, 제 2 DNN(300)은 LossUS가 감소되는 방향으로 파라미터들을 갱신하게 된다. 훈련 과정에서 도출된 LossDS에 따라 제 1 DNN(800)의 파라미터들이 갱신되면, 갱신된 파라미터에 기초하여 획득되는 제 1 훈련 영상(1102)이 이전 훈련 과정에서의 제 1 훈련 영상(1102)과 달라지게 되고, 그에 따라 제 3 훈련 영상(1104) 역시 이전 훈련 과정에서의 제 3 훈련 영상(1104)과 달라지게 된다. 제 3 훈련 영상(1104)이 이전 훈련 과정에서의 제 3 훈련 영상(1104)과 달라지게 되면, 퀄리티 손실 정보(1130) 역시 새롭게 결정되며, 그에 따라 제 2 DNN(300)은 파라미터들을 갱신한다. 퀄리티 손실 정보(1130)가 새롭게 결정되면, LossDS 역시 새롭게 결정되므로, 제 1 DNN(800)은 새롭게 결정된 LossDS에 따라 파라미터들을 갱신한다. 즉, 제 1 DNN(800)의 파라미터 갱신은, 제 2 DNN(300)의 파라미터 갱신을 야기하고, 제 2 DNN(300)의 파라미터 갱신은 제 1 DNN(800)의 파라미터 갱신을 야기하는 것이다. 다시 말하면, 제 1 DNN(800) 및 제 2 DNN(300)은 퀄리티 손실 정보(1130)의 공유를 통해 연계 훈련되므로, 제 1 DNN(800)의 파라미터들과 제 2 DNN(300)의 파라미터들이 서로 연관성을 가지고 최적화될 수 있는 것이다.That is, the first DNN 800 updates parameters in a direction in which LossDS of Equation 1 is decreased, and the second DNN 300 updates parameters in a direction in which LossUS is decreased. When the parameters of the first DNN 800 are updated according to the LossDS derived in the training process, the first training image 1102 obtained based on the updated parameters is different from the first training image 1102 in the previous training process. and, accordingly, the third training image 1104 is also different from the third training image 1104 in the previous training process. When the third training image 1104 is different from the third training image 1104 in the previous training process, the quality loss information 1130 is also newly determined, and accordingly, the second DNN 300 updates the parameters. When the quality loss information 1130 is newly determined, since LossDS is also newly determined, the first DNN 800 updates parameters according to the newly determined LossDS. That is, the parameter update of the first DNN 800 causes the parameter update of the second DNN 300 , and the parameter update of the second DNN 300 causes the parameter update of the first DNN 800 . In other words, since the first DNN 800 and the second DNN 300 are jointly trained through sharing of the quality loss information 1130 , the parameters of the first DNN 800 and the parameters of the second DNN 300 are They can be optimized in relation to each other.

수학식 1을 참조하면, LossUS가 퀄리티 손실 정보(1130)에 따라 결정되는 것을 알 수 있으나, 이는 하나의 예시이며, LossUS는 구조적 손실 정보(1110) 및 복잡성 손실 정보(1120) 중 적어도 하나와, 퀄리티 손실 정보(1130)에 기초하여 결정될 수도 있다.Referring to Equation 1, it can be seen that LossUS is determined according to quality loss information 1130, but this is an example, and LossUS is at least one of structural loss information 1110 and complexity loss information 1120, It may be determined based on the quality loss information 1130 .

앞서, AI 복호화 장치(200)의 AI 설정부(238) 및 AI 부호화 장치(700)의 AI 설정부(718) 는 복수의 DNN 설정 정보를 저장하는 것으로 설명하였는데, AI 설정부(238) 및 AI 설정부(718)에 저장되는 복수의 DNN 설정 정보 각각을 훈련시키는 방법에 대해 설명한다.Previously, it has been described that the AI setting unit 238 of the AI decoding apparatus 200 and the AI setting unit 718 of the AI encoding apparatus 700 store a plurality of DNN setting information, the AI setting unit 238 and the AI A method of training each of the plurality of DNN configuration information stored in the setting unit 718 will be described.

수학식 1과 관련하여 설명한 바와 같이, 제 1 DNN(800)의 경우, 제 1 훈련 영상(1102)의 구조적 정보와 원본 훈련 영상(1101)의 구조적 정보 사이의 유사 정도(구조적 손실 정보(1110)), 제 1 훈련 영상(1102)의 제 1 부호화 결과 획득되는 영상 데이터의 비트레이트(복잡성 손실 정보(1120)) 및 제 3 훈련 영상(1104)과 원본 훈련 영상(1101) 사이의 차이(퀄리티 손실 정보(1130))를 고려하여 파라미터를 갱신하게 된다. As described in relation to Equation 1, in the case of the first DNN 800, the degree of similarity between the structural information of the first training image 1102 and the structural information of the original training image 1101 (structural loss information 1110) ), the bit rate (complexity loss information 1120) of the image data obtained as a result of the first encoding of the first training image 1102 and the difference between the third training image 1104 and the original training image 1101 (quality loss) The parameter is updated in consideration of the information 1130).

자세히 설명하면, 원본 훈련 영상(1101)의 구조적 정보와 유사하면서, 제 1 부호화를 하였을 때 획득되는 영상 데이터의 비트레이트가 작은 제 1 훈련 영상(1102)이 획득 가능하도록 하는 동시에, 제 1 훈련 영상(1102)을 AI 업스케일하는 제 2 DNN(300)이 원본 훈련 영상(1101)에 유사한 제 3 훈련 영상(1104)을 획득할 수 있도록, 제 1 DNN(800)의 파라미터가 갱신될 수 있다. In detail, the first training image 1102 similar to the structural information of the original training image 1101 and having a small bit rate of image data obtained when the first encoding is performed can be obtained, and at the same time, the first training image The parameters of the first DNN 800 may be updated so that the second DNN 300 that AI upscales 1102 may acquire a third training image 1104 similar to the original training image 1101 .

수학식 1의 a, b, c의 가중치가 조절됨으로써, 제 1 DNN(800)의 파라미터들이 최적화되는 방향이 상이해지게 된다. 예를 들어, b의 가중치를 높게 결정하는 경우, 제 3 훈련 영상(1104)의 퀄리티보다 비트레이트가 낮아지는 것에 더 중요도를 두고 제 1 DNN(800)의 파라미터가 갱신될 수 있다. 또한, c의 가중치를 높게 결정하는 경우, 비트레이트가 높아지는 것이나, 원본 훈련 영상(1101)의 구조적 정보가 유지되는 것보다 제 3 훈련 영상(1104)의 퀄리티가 증가하도록 하는 것에 더 중요도를 두고 제 1 DNN(800)의 파라미터가 갱신될 수 있다.By adjusting the weights of a, b, and c in Equation 1, the directions in which the parameters of the first DNN 800 are optimized are different. For example, when the weight of b is determined to be high, the parameter of the first DNN 800 may be updated with more importance on lowering the bit rate than the quality of the third training image 1104 . In addition, when the weight of c is determined to be high, it is more important to increase the quality of the third training image 1104 than to increase the bit rate or to maintain the structural information of the original training image 1101. 1 A parameter of the DNN 800 may be updated.

또한, 제 1 훈련 영상(1102)을 제 1 부호화하는데 이용되는 코덱의 타입에 따라 제 1 DNN(800)의 파라미터들이 최적화되는 방향이 상이해질 수 있다. 왜냐하면, 코덱의 종류에 따라, 제 2 DNN(300)으로 입력될 제 2 훈련 영상이 달라질 수 있기 때문이다.Also, the direction in which parameters of the first DNN 800 are optimized may be different according to the type of a codec used to first encode the first training image 1102 . This is because, depending on the type of codec, the second training image to be input to the second DNN 300 may vary.

즉, 가중치 a, 가중치 b, 가중치 c 및 제 1 훈련 영상(1102)의 제 1 부호화를 위한 코덱의 종류에 기반하여 제 1 DNN(800)의 파라미터들과 제 2 DNN(300)의 파라미터들이 연계하여 갱신될 수 있는 것이다. 따라서, 가중치 a, 가중치 b, 가중치 c 각각을 소정의 값으로 결정하고, 코덱의 종류를 소정의 종류로 결정한 후, 제 1 DNN(800)과 제 2 DNN(300)을 훈련시키면, 서로 연계되어 최적화된 제 1 DNN(800)의 파라미터들과 제 2 DNN(300)의 파라미터들이 결정될 수 있다. That is, the parameters of the first DNN 800 and the parameters of the second DNN 300 are linked based on the weight a, the weight b, the weight c, and the type of the codec for the first encoding of the first training image 1102 . so it can be updated. Therefore, when each of the weight a, the weight b, and the weight c is determined as a predetermined value and the type of the codec is determined as the predetermined type, the first DNN 800 and the second DNN 300 are trained, they are linked to each other. Optimized parameters of the first DNN 800 and parameters of the second DNN 300 may be determined.

그리고, 가중치 a, 가중치 b, 가중치 c 및 코덱의 종류를 변경한 후, 제 1 DNN(800)과 제 2 DNN(300)을 훈련시키면, 서로 연계되어 최적화된 제 1 DNN(800)의 파라미터들과 제 2 DNN(300)의 파라미터들이 결정될 수 있다. 다시 말하면, 가중치 a, 가중치 b, 가중치 c 및 코덱의 종류 각각의 값을 변경하면서 제 1 DNN(800)과 제 2 DNN(300)을 훈련시키면 서로 연계되어 훈련된 복수의 DNN 설정 정보가 제 1 DNN(800) 및 제 2 DNN(300)에서 결정될 수 있는 것이다.Then, when the first DNN 800 and the second DNN 300 are trained after changing the weight a, the weight b, the weight c, and the type of the codec, the parameters of the first DNN 800 are optimized in connection with each other. and parameters of the second DNN 300 may be determined. In other words, when the first DNN 800 and the second DNN 300 are trained while changing the respective values of the weight a, the weight b, the weight c, and the type of the codec, the plurality of DNN setting information trained in connection with each other is transmitted to the first It may be determined from the DNN 800 and the second DNN 300 .

앞서, 도 5와 관련하여 설명한 바와 같이, 제 1 DNN(800) 및 제 2 DNN(300)의 복수의 DNN 설정 정보들은 제 1 영상 관련 정보들에 매핑되어 있을 수 있다. 이러한 매핑 관계의 설정을 위해, 제 1 DNN(800)에서 출력되는 제 1 훈련 영상(1102)을 특정 비트레이트에 따라 특정 코덱으로 제 1 부호화하고, 제 1 부호화 결과 획득된 비트스트림을 제 1 복호화하여 획득한 제 2 훈련 영상을 제 2 DNN(300)으로 입력할 수 있다. 즉, 특정 해상도의 제 1 훈련 영상(1102)이 특정 코덱에 의해 특정 비트레이트로 제 1 부호화되도록 환경을 설정한 후, 제 1 DNN(800) 및 제 2 DNN(300)을 훈련시킴으로써, 제 1 훈련 영상(1102)의 해상도, 제 1 훈련 영상(1102)의 제 1 부호화에 이용된 코덱의 종류 및 제 1 훈련 영상(1102)의 제 1 부호화 결과 획득된 비트스트림의 비트레이트에 매핑된 DNN 설정 정보 쌍이 결정될 수 있는 것이다. 제 1 훈련 영상(1102)의 해상도, 제 1 훈련 영상(1102)의 제 1 부호화에 이용된 코덱의 종류 및 제 1 훈련 영상(1102)의 제 1 부호화에 따라 획득되는 비트스트림의 비트레이트를 다양하게 변경시킴으로써, 제 1 DNN(800) 및 제 2 DNN(300)의 복수의 DNN 설정 정보들과 제 1 영상 관련 정보들 사이의 매핑 관계가 결정될 수 있다.As described above with reference to FIG. 5 , the plurality of DNN configuration information of the first DNN 800 and the second DNN 300 may be mapped to the first image related information. To establish such a mapping relationship, a first training image 1102 output from the first DNN 800 is first encoded with a specific codec according to a specific bit rate, and a bitstream obtained as a result of the first encoding is first decoded. The obtained second training image may be input to the second DNN 300 . That is, after setting the environment so that the first training image 1102 of a specific resolution is first encoded at a specific bit rate by a specific codec, by training the first DNN 800 and the second DNN 300 , the first DNN setting mapped to the resolution of the training image 1102, the type of codec used for the first encoding of the first training image 1102, and the bitrate of the bitstream obtained as a result of the first encoding of the first training image 1102 The information pair can be determined. The resolution of the first training image 1102, the type of codec used for the first encoding of the first training image 1102, and the bitrate of the bitstream obtained according to the first encoding of the first training image 1102 are varied. , a mapping relationship between a plurality of DNN configuration information of the first DNN 800 and the second DNN 300 and the first image related information may be determined.

도 12는 훈련 장치(1200)에 의한 제 1 DNN(800) 및 제 2 DNN(300)의 훈련 과정을 설명하기 위한 도면이다.12 is a diagram for explaining a training process of the first DNN 800 and the second DNN 300 by the training device 1200 .

도 11과 관련하여 설명한 제 1 DNN(800) 및 제 2 DNN(300)의 훈련은 훈련 장치(1200)에 의해 수행될 수 있다. 훈련 장치(1200)는 제 1 DNN(800) 및 제 2 DNN(300)을 포함한다. 훈련 장치(1200)는 예를 들어, AI 부호화 장치(700) 또는 별도의 서버일 수 있다. 훈련 결과 획득된 제 2 DNN(300)의 DNN 설정 정보들은 AI 복호화 장치(200)에 저장된다.The training of the first DNN 800 and the second DNN 300 described with reference to FIG. 11 may be performed by the training apparatus 1200 . The training device 1200 includes a first DNN 800 and a second DNN 300 . The training device 1200 may be, for example, the AI encoding device 700 or a separate server. The DNN setting information of the second DNN 300 obtained as a result of training is stored in the AI decoding apparatus 200 .

도 12를 참조하면, 훈련 장치(1200)는 제 1 DNN(800) 및 제 2 DNN(300)의 DNN 설정 정보를 초기 세팅한다(S1240, S1245). 이에 의해, 제 1 DNN(800) 및 제 2 DNN(300)은 미리 결정된 DNN 설정 정보에 따라 동작할 수 있다. DNN 설정 정보는 제 1 DNN(800) 및 2 DNN(300)에 포함되는 컨볼루션 레이어의 수, 컨볼루션 레이어별 필터 커널의 개수, 컨볼루션 레이어별 필터 커널의 크기 및 각 필터 커널의 파라미터 중 적어도 하나에 대한 정보를 포함할 수 있다.Referring to FIG. 12 , the training apparatus 1200 initially sets DNN configuration information of the first DNN 800 and the second DNN 300 ( S1240 , S1245 ). Accordingly, the first DNN 800 and the second DNN 300 may operate according to predetermined DNN configuration information. The DNN setting information includes at least the number of convolution layers included in the first DNN 800 and the second DNN 300, the number of filter kernels for each convolutional layer, the size of filter kernels for each convolutional layer, and parameters of each filter kernel. It can contain information about one.

훈련 장치(1200)는 원본 훈련 영상(1101)을 제 1 DNN(800)으로 입력한다(S1250). 원본 훈련 영상(1101)은 정지 영상 또는 동영상을 구성하는 적어도 하나의 프레임을 포함할 수 있다.The training apparatus 1200 inputs the original training image 1101 into the first DNN 800 (S1250). The original training image 1101 may include at least one frame constituting a still image or a moving image.

제 1 DNN(800)은 초기 세팅된 DNN 설정 정보에 따라 원본 훈련 영상(1101)을 처리하고, 원본 훈련 영상(1101)으로부터 AI 다운스케일된 제 1 훈련 영상(1102)을 출력한다(S1255). 도 12는 제 1 DNN(800)으로부터 출력된 제 1 훈련 영상(1102)이 제 2 DNN(300)으로 바로 입력되는 것으로 도시되어 있으나, 제 1 DNN(800)으로부터 출력된 제 1 훈련 영상(1102)이 훈련 장치(1200)에 의해 제 2 DNN(300)으로 입력될 수 있다. 또한, 훈련 장치(1200)는 제 1 훈련 영상(1102)을 소정의 코덱으로 제 1 부호화 및 제 1 복호화한 후, 제 2 훈련 영상을 제 2 DNN(300)으로 입력할 수 있다.The first DNN 800 processes the original training image 1101 according to the initially set DNN setting information, and outputs the AI downscaled first training image 1102 from the original training image 1101 ( S1255 ). 12 shows that the first training image 1102 output from the first DNN 800 is directly input to the second DNN 300 , but the first training image 1102 output from the first DNN 800 . ) may be input to the second DNN 300 by the training device 1200 . Also, the training apparatus 1200 may first encode and first decode the first training image 1102 using a predetermined codec, and then input the second training image to the second DNN 300 .

제 2 DNN(300)은 제 1 훈련 영상(1102) 또는 제 2 훈련 영상을 초기 세팅된 DNN 설정 정보에 따라 처리하고, 제 1 훈련 영상(1102) 또는 제 2 훈련 영상으로부터 AI 업스케일된 제 3 훈련 영상(1104)을 출력한다(S1260).The second DNN 300 processes the first training image 1102 or the second training image according to the initially set DNN setting information, and the AI upscaled third from the first training image 1102 or the second training image. A training image 1104 is output (S1260).

훈련 장치(1200)는 제 1 훈련 영상(1102)에 기초하여 복잡성 손실 정보(1120)를 산출한다(S1265).The training apparatus 1200 calculates complexity loss information 1120 based on the first training image 1102 (S1265).

훈련 장치(1200)는 축소 훈련 영상(1103)과 제 1 훈련 영상(1102)을 비교하여 구조적 손실 정보(1110)를 산출한다(S1270).The training apparatus 1200 calculates structural loss information 1110 by comparing the reduced training image 1103 with the first training image 1102 ( S1270 ).

훈련 장치(1200)는 원본 훈련 영상(1101)과 제 3 훈련 영상(1104)을 비교하여 퀄리티 손실 정보(1130)를 산출한다(S1275).The training apparatus 1200 calculates quality loss information 1130 by comparing the original training image 1101 and the third training image 1104 (S1275).

제 1 DNN(800)은 최종 손실 정보에 기초한 역전사(back propagation) 과정을 통해 초기 세팅된 DNN 설정 정보를 갱신한다(S1280). 훈련 장치(1200)는 복잡성 손실 정보(1120), 구조적 손실 정보(1110) 및 퀄리티 손실 정보(1130)에 기초하여 제 1 DNN(800)의 훈련을 위한 최종 손실 정보를 산출할 수 있다.The first DNN 800 updates the initially set DNN configuration information through a back propagation process based on the final loss information (S1280). The training apparatus 1200 may calculate final loss information for training the first DNN 800 based on the complexity loss information 1120 , the structural loss information 1110 , and the quality loss information 1130 .

제 2 DNN(300)은 퀄리티 손실 정보 또는 최종 손실 정보에 기초한 역전사 과정을 통해 초기 세팅된 DNN 설정 정보를 갱신한다(S1285). 훈련 장치(1200)는 퀄리티 손실 정보(1130)에 기초하여 제 2 DNN(300)의 훈련을 위한 최종 손실 정보를 산출할 수 있다.The second DNN 300 updates the initially set DNN configuration information through a reverse transcription process based on quality loss information or final loss information (S1285). The training apparatus 1200 may calculate final loss information for training of the second DNN 300 based on the quality loss information 1130 .

이후, 훈련 장치(1200), 제 1 DNN(800) 및 제 2 DNN(300)은 최종 손실 정보들이 최소화될 때까지 S1250 내지 S1285 과정을 반복하면서 DNN 설정 정보를 갱신한다. 이 때, 각 반복 과정 동안 제 1 DNN(800) 및 제 2 DNN(300)은 이전 과정에서 갱신된 DNN 설정 정보에 따라 동작한다.Thereafter, the training apparatus 1200, the first DNN 800, and the second DNN 300 update the DNN configuration information while repeating processes S1250 to S1285 until the final loss information is minimized. At this time, during each iteration process, the first DNN 800 and the second DNN 300 operate according to the DNN configuration information updated in the previous process.

아래의 표 1은 본 개시의 일 실시예에 따라 원본 영상(105)을 AI 부호화 및 AI 복호화한 경우와, HEVC로 원본 영상(105)을 부호화 및 복호화한 경우의 효과를 나타낸다.Table 1 below shows the effects of AI encoding and AI decoding of the original image 105 and encoding and decoding of the original image 105 using HEVC according to an embodiment of the present disclosure.

[표 1][Table 1]

Figure 112020108700079-pat00002
Figure 112020108700079-pat00002

표 1에서 알 수 있듯이, 본 개시의 일 실시예에 따라 8K 해상도의 300개의 프레임들로 이루어진 컨텐츠들을 AI 부호화 및 AI 복호화한 경우의 주관적 화질이 HEVC로 부호화 및 복호화한 경우의 주관적 화질보다 높음에도, 비트레이트가 50% 이상 감소한 것을 알 수 있다.As can be seen from Table 1, the subjective picture quality when AI encoding and AI decoding of contents consisting of 300 frames of 8K resolution according to an embodiment of the present disclosure is higher than the subjective picture quality when encoding and decoding using HEVC. , it can be seen that the bit rate is reduced by more than 50%.

이하에서는, 도 13 내지 27를 참조하여, 일 실시예에 따른, AI 부호화 장치 및 AI 복호화 장치가 AI 데이터를 제1 부호화부(및 데이터 처리부) 및 제1 복호화부(및 파싱부)를 통해 처리하는 방법이 개시된다.Hereinafter, with reference to FIGS. 13 to 27 , an AI encoding apparatus and an AI decoding apparatus according to an embodiment process AI data through a first encoder (and data processor) and a first decoder (and a parser) A method is disclosed.

도 13a는 일 실시예에 따른 AI 복호화 장치(1300)의 구성을 도시하는 블록도이다.13A is a block diagram illustrating a configuration of an AI decoding apparatus 1300 according to an embodiment.

도 13을 참조하면, 일 실시예에 따른 AI 복호화 장치(1300)는 수신부(1310) 및 AI 복호화부(1330)를 포함할 수 있다. AI 복호화부(1330)는 제 1 복호화부(1332), AI 설정부(1333), 및 AI 업스케일부(1334)를 포함할 수 있다.Referring to FIG. 13 , the AI decoding apparatus 1300 according to an embodiment may include a receiving unit 1310 and an AI decoding unit 1330 . The AI decoding unit 1330 may include a first decoding unit 1332 , an AI setting unit 1333 , and an AI upscaling unit 1334 .

도 13는 수신부(1310) 및 AI 복호화부(1330)가 개별적인 장치인 것으로 도시하고 있으나, 이들은 하나의 프로세서를 통해 구현될 수 있다. 이 경우, 전용 프로세서로 구현될 수도 있고, AP 또는 CPU, GPU와 같은 범용 프로세서와 S/W의 조합을 통해 구현될 수도 있다. 또한, 전용 프로세서의 경우, 본 개시의 실시예를 구현하기 위한 메모리를 포함하여 구현되거나, 외부 메모리를 이용하기 위한 메모리 처리부를 포함하여 구현될 수 있다.Although FIG. 13 shows that the receiver 1310 and the AI decoder 1330 are separate devices, they may be implemented through one processor. In this case, it may be implemented as a dedicated processor, or it may be implemented through a combination of an AP or a general-purpose processor such as a CPU or GPU and S/W. In addition, in the case of a dedicated processor, it may be implemented including a memory for implementing an embodiment of the present disclosure or a memory processing unit for using an external memory.

또한, 수신부(1310) 및 AI 복호화부(1330)는 하나 이상의 프로세서로 구성될 수도 있다. 이 경우, 전용 프로세서들의 조합으로 구현될 수도 있고, AP 또는 CPU, GPU와 같은 다수의 범용 프로세서들과 S/W의 조합을 통해 구현될 수도 있다.Also, the receiver 1310 and the AI decoder 1330 may be configured with one or more processors. In this case, it may be implemented as a combination of dedicated processors, or may be implemented through a combination of S/W with a plurality of general-purpose processors such as an AP, CPU, or GPU.

마찬가지로 AI 업스케일부(1334)와, AI 설정부(1333) 및 제 1 복호화부(1332)도 각각 서로 다른 프로세서로 구현될 수 있다.Similarly, the AI upscaling unit 1334, the AI setting unit 1333, and the first decoding unit 1332 may be implemented with different processors, respectively.

수신부(1310)는 도 2를 참조하여 전술한 수신부(210)에 대응될 수 있다. 즉, 수신부(1310)은 수신부(210)의 동작의 적어도 일부를 수행할 수 있다. 다만, 이에 제한되지 않고, 전술한 수신부(210)의 동작과 다른 동작이 수행될 수 있다.The receiver 1310 may correspond to the receiver 210 described above with reference to FIG. 2 . That is, the receiver 1310 may perform at least a part of the operation of the receiver 210 . However, the present invention is not limited thereto, and an operation different from the operation of the above-described receiver 210 may be performed.

수신부(1310)는 패킷화된(packetizated) 비디오 비트스트림을 수신하고, 비디오 비트스트림을 획득하여 AI 복호화부(1330)로 출력한다. 이때, 패킷화된 비디오 비트스트림은 RTP(Real-Time Transport Protocol)와 같은 다양한 네트워크 프로토콜을 기반으로 패킷화된 것일 수 있다.The receiver 1310 receives a packetized video bitstream, obtains a video bitstream, and outputs the received video bitstream to the AI decoder 1330 . In this case, the packetized video bitstream may be packetized based on various network protocols such as Real-Time Transport Protocol (RTP).

구체적으로, 수신부(1310)은 네트워크를 통해 패킷화된 비디오 비트스트림을 수신한다. 패킷화된 비디오 비트스트림은 AI 부호화 결과 생성된 AI 부호화 데이터를 포함할 수 있다. 예를 들어, 패킷화된 비디오 비트스트림은 영상 데이터를 포함하는 메인 비트스트림과 AI 데이터를 포함하는 서브 비트스트림을 포함할 수 있다.Specifically, the receiver 1310 receives a packetized video bitstream through a network. The packetized video bitstream may include AI encoded data generated as a result of AI encoding. For example, the packetized video bitstream may include a main bitstream including image data and a sub-bitstream including AI data.

메인 비트스트림은 소정의 코덱에서 정의된, 비디오 비트스트림 내 소정의 메인 비트스트림 영역에 포함될 수 있다. 소정의 메인 비트스트림 영역은 소정의 코덱에서 일반적으로 원본 영상(105)을 부호화하여 생성된 영상 데이터를 포함하도록 정의된 공간일 수 있다. 예를 들어, 소정의 메인 비트스트림 영역은 소정의 코덱이 H.264, HEVC 및 VVC 코덱인 경우, VPS(Video Parameter Set), SPS(Sequence Parameter Set), PPS(Picture Parameter Set), I/P/B 슬라이스의 NAL 유닛 영역일 수 있다.The main bitstream may be included in a predetermined main bitstream area in a video bitstream defined in a predetermined codec. The predetermined main bitstream region may be a space defined to include image data generated by generally encoding the original image 105 in a predetermined codec. For example, the predetermined main bitstream region includes a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), and an I/P when the predetermined codec is an H.264, HEVC, and VVC codec. It may be a NAL unit area of the /B slice.

한편, 서브 비트스트림 영역은 소정의 코덱에서 일반적으로 원본 영상(105)을 부호화하여 생성된 영상 데이터를 제외한 부가 데이터를 포함하도록 정의된 공간일 수 있다.Meanwhile, the sub-bitstream region may be a space defined to include additional data excluding image data generated by encoding the original image 105 in a predetermined codec in general.

예를 들어, 소정의 코덱이 H.264, HEVC 및 VVC 코덱인 경우, 소정의 서브 비트스트림 영역은 SEI(Supplemental Enhancement Information) 메시지 영역일 수 있다. 이때, SEI 메시지는 소정의 표준에 의해 등록된 사용자 데이터를 포함하는 SEI 메시지와 UUID(Universally Unique Identifier)에 의해 식별되는, 등록되지 않은 사용자 데이터를 포함하는 SEI 메시지를 포함할 수 있다.For example, when the predetermined codec is an H.264, HEVC, and VVC codec, the predetermined sub-bitstream area may be a Supplemental Enhancement Information (SEI) message area. In this case, the SEI message may include an SEI message including user data registered by a predetermined standard and an SEI message including unregistered user data identified by a Universally Unique Identifier (UUID).

예를 들어, 소정의 코덱이 AV1 코덱인 경우 소정의 서브 스트림은 메타데이터 OBU(Open Bitstream Unit)일 수 있다.For example, when the predetermined codec is the AV1 codec, the predetermined sub-stream may be metadata Open Bitstream Unit (OBU).

한편, 패킷화된(packetizated) 비디오 비트스트림의 패킷은 싱글 NAL 유닛 패킷, 프래그먼테이션 단위(Fragmentation unit) 패킷 또는 애그리게이션(Aggregation) 패킷을 포함할 수 있다. 이때, 복수의 프래그먼테이션 단위 패킷은 싱글 NAL 유닛의 데이터를 포함할 수 있고, 하나의 애그리게이션 패킷은 복수의 NAL 유닛의 데이터를 포함할 수 있다.Meanwhile, a packet of a packetized video bitstream may include a single NAL unit packet, a fragmentation unit packet, or an aggregation packet. In this case, a plurality of fragmentation unit packets may include data of a single NAL unit, and one aggregation packet may include data of a plurality of NAL units.

수신부(1310)은 데이터의 헤더를 읽어, 해당 데이터로부터 비디오 비트스트림을 획득할 수 있다. 예를 들어, 수신부(1310)는 패킷화된 비디오 비트스트림로부터 이더넷 헤더(Ethernet Header), IP 헤더(IP Header), UDP/TCP 헤더, RTP 헤더 등을 제외한 페이로드(Payload)에 포함된 비디오 비트스트림을 획득할 수 있다.The receiver 1310 may read a header of data and obtain a video bitstream from the data. For example, the receiver 1310 may include video bits included in a payload except for an Ethernet header, an IP header, a UDP/TCP header, an RTP header, etc. from the packetized video bitstream. stream can be obtained.

비디오 비트스트림은 적어도 하나의 NAL 유닛을 포함할 수 있고, NAL 유닛은 VCL(Video Coded Layer) NAL 유닛 및 non-VCL NAL 유닛을 포함할 수 있다. 이때, VCL NAL 유닛은 실제 영상에 대해 부호화된 영상 데이터를 포함하는 부분을 의미하고, non-VCL NAL 유닛은 영상의 메타 데이터를 포함하는 부분으로, VPS SPS, PPS 등과 같은 적어도 하나의 프레임 등에서 공통적으로 이용되는 영상 파라미터 정보를 포함하거나, 영상 복호화를 위해 필요한 부가 데이터(Supplemental data)를 포함할 수 있다.The video bitstream may include at least one NAL unit, and the NAL unit may include a Video Coded Layer (VCL) NAL unit and a non-VCL NAL unit. In this case, the VCL NAL unit means a part including video data encoded with respect to an actual video, and the non-VCL NAL unit is a part including metadata of the video, and is common to at least one frame such as VPS SPS, PPS, etc. It may include image parameter information used as , or supplemental data required for image decoding.

수신부(1310)는 복수의 NAL 유닛을 순서대로 정렬하여 제1 복호화부(1330)로 비디오 비트스트림을 출력할 수 있다. 이때, 수신부(1310)는 SPS(Sequence Parameter Set), PPS(Picture Parameter Set), I 슬라이스(Slice), P 슬라이스, B 슬라이스의 NAL 유닛의 순서로 정렬하여 비디오 비트스트림을 제1 복호화부(1332)로 출력할 수 있다.The receiver 1310 may output a video bitstream to the first decoder 1330 by arranging a plurality of NAL units in order. At this time, the receiving unit 1310 arranges the NAL units of a sequence parameter set (SPS), a picture parameter set (PPS), an I slice, a P slice, and a B slice in the order of the NAL unit to arrange the video bitstream in the first decoder 1332 . ) can be printed.

이때, AI 부호화 데이터에 포함된 영상 데이터가 소정의 코덱(예를 들어, MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9 또는 AV1)을 통해 생성된 영상 데이터인 것으로 확인될 수도 있다. 이 경우, 영상 데이터가 상기 확인된 코덱으로 처리될 수 있도록, 수신부(1310)를 통해 해당 정보가 제 1 복호화부(1332)로 전달될 수 있다.In this case, the image data included in the AI encoded data is image data generated through a predetermined codec (eg, MPEG-2, H.264, MPEG-4, HEVC, VC-1, VP8, VP9, or AV1). may be confirmed as In this case, the corresponding information may be transmitted to the first decoder 1332 through the receiver 1310 so that the image data can be processed by the identified codec.

일 실시예에서, 수신부(1310)가 획득한 데이터는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium) 등을 포함하는 데이터 저장 매체로부터 획득된 것일 수도 있다. 예를 들어, 수신부(1310)는 데이터 저장 매체에 기록된 mp4, mov 등의 파일 형식을 갖는 비디오 파일로부터 AI 부호화 데이터를 포함하는 비디오 비트스트림을 획득(예를 들어, 디먹싱(demuxing)을 통한 비디오 비트스트림을 획득)할 수 있다.In one embodiment, the data acquired by the receiving unit 1310 is a hard disk, a magnetic medium such as a floppy disk and a magnetic tape, an optical recording medium such as a CD-ROM and a DVD, and a magnetic-type disk such as a floppy disk. It may be obtained from a data storage medium including a magneto-optical medium or the like. For example, the receiver 1310 obtains a video bitstream including AI-encoded data from a video file having a file format such as mp4 or mov recorded on a data storage medium (eg, through demuxing). video bitstream).

제1 복호화부(1332)는 도 2를 참조하여 전술한 제1 복호화부(234)에 대응될 수 있다. 제1 복호화부(1332)는 도 2를 참조하여 전술한 파싱부(232)를 더 포함할 수 있다. 다만 이에 제한되지 않고, 제1 복호화부(1332)와 별도로 파싱부(미도시)가 존재할 수 있다. 이때, 파싱부(미도시)는 전술한 파싱부(232)에 대응될 수 있다.The first decoding unit 1332 may correspond to the first decoding unit 234 described above with reference to FIG. 2 . The first decoding unit 1332 may further include the parsing unit 232 described above with reference to FIG. 2 . However, the present invention is not limited thereto, and a parsing unit (not shown) may exist separately from the first decoding unit 1332 . In this case, the parsing unit (not shown) may correspond to the above-described parsing unit 232 .

제1 복호화부(1332)는 비디오 비트스트림을 파싱하여 AI 데이터를 포함하는 서브 비트스트림과 제 1 영상(115)의 제 1 부호화 결과로 생성된 영상 데이터를 포함하는 메인 비트스트림을 획득할 수 있다. 제1 복호화부(1332)는 영상 데이터에 기초하여 제 1 영상(115)에 대응하는 제 2 영상(135)를 복원할 수 있다. 예를 들어, 제 1 복호화부(1332)는 메인 비트스트림에 포함된 영상 데이터에 기초하여 제 1 영상(115)에 대응하는 제 2 영상(135)을 복원한다.The first decoder 1332 may parse the video bitstream to obtain a sub-bitstream including AI data and a main bitstream including image data generated as a result of the first encoding of the first image 115 . . The first decoder 1332 may reconstruct the second image 135 corresponding to the first image 115 based on the image data. For example, the first decoder 1332 reconstructs the second image 135 corresponding to the first image 115 based on image data included in the main bitstream.

한편, 제1 복호화부(1332)는 AI 데이터를 포함하는 서브 비트스트림으로부터 AI 데이터를 획득할 수 있고, AI 데이터를 AI 설정부(1333)로 출력할 수 있다. 이때, AI 데이터는 AI 업스케일 활성화 플래그 및 AI 서브 데이터를 포함할 수 있다.Meanwhile, the first decoding unit 1332 may obtain AI data from the sub-bitstream including the AI data, and may output the AI data to the AI setting unit 1333 . In this case, the AI data may include an AI upscaling activation flag and AI sub data.

AI 설정부(1333)는 도 2를 참조하여 전술한 AI 설정부(238)에 대응될 수 있다. AI 설정부(1333)는 AI 데이터에 기초하여 업스케일 여부 및 업스케일 타겟 등을 결정할 수 있다.The AI setting unit 1333 may correspond to the AI setting unit 238 described above with reference to FIG. 2 . The AI setting unit 1333 may determine whether to upscale and an upscale target based on the AI data.

AI 설정부(1333)는 AI 업스케일 활성화 플래그 정보를 기초로 제 2 영상(135)에 대한 AI 업스케일 수행 여부를 결정하고, 제2 영상(135)에 대해 AI 업스케일을 수행하는 것으로 결정한 경우, 제2 영상(135)을 AI 업스케일부(1334)로 제공할 수 있도록 제1 복호화부(1332)를 제어한다.When the AI setting unit 1333 determines whether to perform AI upscaling on the second image 135 based on the AI upscaling activation flag information, and determines to perform AI upscaling on the second image 135 , , controls the first decoder 1332 to provide the second image 135 to the AI upscaler 1334 .

AI 복호화부(1330)는 제2 영상(135)에 대해 AI 업스케일을 수행하는 것으로 결정한 경우, 영상 데이터에 포함된 모드 정보(예를 들어, 예측 모드 정보, 움직임 정보 등), 양자화 파라미터 정보 및 AI 데이터 등을 제 1 복호화부(1332)로부터 AI 설정부(1333)로 제공할 수 있다.When the AI decoder 1330 determines to perform AI upscaling on the second image 135, mode information (eg, prediction mode information, motion information, etc.) included in the image data, quantization parameter information, and AI data and the like may be provided from the first decoding unit 1332 to the AI setting unit 1333 .

한편, AI 복호화부(1330)는 제 2 영상(135)에 대해 AI 업스케일을 수행하지 않는 것으로 결정한 경우, 영상 데이터에 기초하여 생성된 제 2 영상(135)이 AI 복호화부(1330)에서 출력될 수 있다. 이때, AI 설정부(1333)를 통해 제 2 영상(135)이 AI 업스케일부(1334)로 제공될 것인지 또는 AI 복호화부(1330)에서 출력될인지가 제어될 수 있다.Meanwhile, when the AI decoder 1330 determines not to perform AI upscaling on the second image 135 , the AI decoder 1330 outputs the second image 135 generated based on the image data. can be In this case, whether the second image 135 is provided to the AI upscaler 1334 or output from the AI decoder 1330 may be controlled through the AI setting unit 1333 .

AI 서브 데이터를 수신한 AI 설정부(1333)는 AI 서브 데이터에 기초하여 제 2 영상(135)을 AI 업스케일하도록 DNN 설정 정보 등을 AI 업스케일부(1334)로 제공한다. 구현예에 따라서는, 영상 데이터에 포함된 모드 정보, 양자화 파라미터 정보 등의 제 1 복호화 관련 정보를 더 이용하여 DNN 설정 정보 등을 획득하고, DNN 설정 정보를 AI 업스케일부(1334)로 제공할 수 있다.The AI setting unit 1333 that has received the AI sub data provides DNN setting information and the like to the AI upscaling unit 1334 so as to AI upscale the second image 135 based on the AI sub data. Depending on the embodiment, the DNN setting information is obtained by further using the first decoding-related information such as mode information and quantization parameter information included in the image data, and the DNN setting information is provided to the AI upscaling unit 1334. can

AI 설정부(1333)로 제공되는 AI 서브 데이터는, 제 2 영상(135)을 AI 업스케일할 수 있게 하는 정보들을 포함한다. 이때, 업스케일 타겟은 제 1 DNN의 다운스케일 타겟에 대응하여야 한다. 따라서, AI 서브 데이터는 제 1 DNN의 다운스케일 타겟을 확인할 수 있는 정보가 포함되어야 한다.The AI sub data provided to the AI setting unit 1333 includes information enabling AI upscaling of the second image 135 . In this case, the upscale target should correspond to the downscale target of the first DNN. Therefore, the AI sub data should include information that can confirm the downscale target of the first DNN.

AI 서브 데이터는 원본 영상(105)의 해상도와 제 1 영상(115)의 해상도의 차이 정보를 포함할 수 있다. 또한, AI 서브 데이터는 제 1 영상(115) 관련 정보를 포함할 수도 있다. 또한, AI 서브 데이터는 AI 복호화 장치(1300)가 생성하여야 할 제 3 영상(145)(또는 원본 영상(105))의 해상도 정보를 포함할 수도 있다.The AI sub data may include information on a difference between the resolution of the original image 105 and the resolution of the first image 115 . Also, the AI sub data may include information related to the first image 115 . Also, the AI sub data may include resolution information of the third image 145 (or the original image 105 ) to be generated by the AI decoding apparatus 1300 .

차이 정보는, 원본 영상(105) 대비 제 1 영상(115)의 해상도 변환 정도에 대한 정보(예를 들어, 해상도 변환률 정보)로 표현될 수 있고, 예를 들어, 원본 영상(105) 대비 제 1 영상(115)의 비율(ratio)(또는 배수) 정보로 표현될 수 있다. 즉, 원본 영상(105) 대비 제 1 영상(115)의 비율 정보는 원본 영상(105) 대비 제 1 영상(115)의 비율이 1.5배, 2배 중 하나를 나타내는 플래그 정보 또는 인덱스 정보일 수 있다. 그리고, 복원된 제 2 영상(135)의 해상도를 통해 제 1 영상(115)의 해상도를 알게 되고 이를 통해 해상도 변환 정도를 확인할 수 있기 때문에, 차이 정보는 원본 영상(105)의 해상도 정보만으로 표현될 수도 있다. 여기서 해상도 정보는 가로 및 세로의 사이즈로 표현될 수도 있고, 비율(16:9, 4:3 등)과 한 축의 사이즈로 표현될 수도 있다. 또한, 기 설정된 해상도 정보가 있는 경우는 인덱스 또는 플래그의 형태로 표현될 수도 있다. The difference information may be expressed as information about a resolution conversion degree of the first image 115 compared to the original image 105 (eg, resolution conversion rate information), for example, the original image 105 compared to the first image 115 . It may be expressed as ratio (or multiple) information of one image 115 . That is, the ratio information of the first image 115 to the original image 105 may be flag information or index information indicating that the ratio of the original image 105 to the first image 115 is 1.5 times or 2 times. . And, since the resolution of the first image 115 is known through the resolution of the restored second image 135 and the degree of resolution conversion can be confirmed through this, the difference information can be expressed only with the resolution information of the original image 105 . may be Here, the resolution information may be expressed in horizontal and vertical sizes, or in a ratio (16:9, 4:3, etc.) and a size of one axis. In addition, when there is preset resolution information, it may be expressed in the form of an index or a flag.

제 1 영상(115) 관련 정보는, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트 및 제 1 영상(115)의 제 1 부호화시 이용된 코덱 타입 중 적어도 하나에 대한 정보를 포함할 수 있다.The information related to the first image 115 is information on at least one of a bit rate of image data generated as a result of the first encoding of the first image 115 and a codec type used for the first encoding of the first image 115 . may include.

AI 설정부(1333)는 AI 데이터에 포함된 차이 정보, 제 1 영상(115) 관련 정보 및 제 3 영상(145)의 해상도 정보 중 적어도 하나에 기초하여 제 2 영상(135)의 업스케일 타겟을 결정할 수 있다. 업스케일 타겟은 예를 들어, 제 2 영상(135)을 어느 정도의 해상도로 AI 업스케일하여야 하는지를 나타낼 수 있다.The AI setting unit 1333 selects an upscale target of the second image 135 based on at least one of difference information included in the AI data, information related to the first image 115 , and resolution information of the third image 145 . can decide The upscaling target may indicate, for example, to which resolution the second image 135 should be AI upscaled.

AI 설정부(1333)는 업스케일 타겟이 결정되면, 업스케일 타겟에 대응하는 제 3 영상(145)을 생성하기 위해 제 2 DNN을 통해 제 2 영상(135)을 AI 업스케일할 수 있도록 AI 업스케일부(1334)로 DNN 설정 정보를 전달한다.When the upscale target is determined, the AI setting unit 1333 AI upscales the second image 135 through the second DNN to generate a third image 145 corresponding to the upscale target. The DNN setting information is transmitted to the scale unit 1334 .

일 실시예에서, AI 설정부(1333)는 제 2 영상(135)의 AI 업스케일을 위한 제 2 DNN을 확인하기 위해 AI 서브 데이터에 포함된 제 1 영상의 제1 부호화에 이용된 양자화 파라미터의 평균값을 더 입력하여 DNN 설정 정보를 획득할 수 있다.In an embodiment, the AI setting unit 1333 of the quantization parameter used for the first encoding of the first image included in the AI sub data to confirm the second DNN for the AI upscaling of the second image 135 . DNN setting information can be obtained by further inputting the average value.

일 실시예에서, AI 설정부(1333)는 제 2 영상(135)의 AI 업스케일을 위한 제 2 DNN을 확인하기 위해 AI 서브 데이터에 포함된 제 1 영상의 적어도 일부의 양자화 파라미터 지시자 정보를 더 입력하여 DNN 설정 정보를 획득할 수 있다.In an embodiment, the AI setting unit 1333 further adds quantization parameter indicator information of at least a part of the first image included in the AI sub data to confirm the second DNN for AI upscaling of the second image 135 . You can obtain DNN configuration information by inputting it.

일 실시예에서, AI 설정부(1333)는 제 2 영상(135)의 AI 업스케일을 위한 제 2 DNN을 확인하기 위해 AI 서브 데이터에 포함된 제 1 영상(115)의 장르를 나타내는 정보를 더 입력하여 DNN 설정 정보를 획득할 수 있다.In an embodiment, the AI setting unit 1333 further adds information indicating the genre of the first image 115 included in the AI sub data to confirm the second DNN for AI upscaling of the second image 135 . You can obtain DNN configuration information by inputting it.

일 실시예에서, AI 설정부(1333)는 제 2 영상(135)의 AI 업스케일을 위한 제 2 DNN을 확인하기 위해 AI 업스케일 관련 추가 메타 데이터를 더 입력하여 DNN 설정 정보를 획득할 수 있다. 상기 추가 메타 데이터는 제 2 영상(135)의 효과적인 AI 업스케일을 위해 더 입력될 수 있다.In an embodiment, the AI setting unit 1333 may obtain DNN setting information by further inputting additional metadata related to AI upscaling in order to confirm the second DNN for AI upscaling of the second image 135 . . The additional metadata may be further input for effective AI upscaling of the second image 135 .

도 13b는 다른 실시예에 따른 AI 복호화 장치(1350)의 구성을 도시한 도면이다.13B is a diagram illustrating a configuration of an AI decoding apparatus 1350 according to another embodiment.

도 13b를 참조하면, AI 복호화 장치(1350)는 별도의 파싱부(1381)를 포함하는 것을 제외하고, 도 13a와 유사한 구성을 포함할 수 있다.Referring to FIG. 13B , the AI decoding apparatus 1350 may include a configuration similar to that of FIG. 13A , except that a separate parsing unit 1381 is included.

파싱부(1381)는 AI 부호화 데이터를 포함하는 비디오 파일을 파싱하여 비디오 파일로부터 AI 데이터를 포함하는 메타 데이터 박스와 영상 데이터를 포함하는 미디어 데이터 박스를 획득하고, 미디어 데이터 박스에 포함된 영상 데이터를 제1 복호화부(1382)로 전달하고, 메타 데이터 박스에 포함된 AI 데이터를 AI 설정부(1383)으로 전달할 수 있다. 그밖의 AI 복호화 장치(1350)의 동작은 AI 복호화 장치(1300)의 동작과 유사하므로, AI 복호화 장치(1350)의 동작에 대한 자세한 설명은 생략하기로 한다.The parsing unit 1381 parses the video file including the AI encoded data to obtain a metadata box including AI data and a media data box including image data from the video file, and extracts the image data included in the media data box. It may be transmitted to the first decryption unit 1382 , and AI data included in the metadata box may be transmitted to the AI setting unit 1383 . Other operations of the AI decoding apparatus 1350 are similar to those of the AI decoding apparatus 1300 , and thus detailed descriptions of the operations of the AI decoding apparatus 1350 will be omitted.

이하에서는, 도 14를 참조하여, 원본 영상(105)의 AI 부호화를 위한 AI 부호화 장치(1400)에 대해 설명한다.Hereinafter, the AI encoding apparatus 1400 for AI encoding of the original image 105 will be described with reference to FIG. 14 .

도 14는 일 실시예에 따른 AI 부호화 장치(1400)의 구성을 도시하는 블록도이다.14 is a block diagram illustrating a configuration of an AI encoding apparatus 1400 according to an embodiment.

도 14를 참조하면, AI 부호화 장치(1400)는 AI 부호화부(1410) 및 전송부(1430)를 포함할 수 있다. AI 부호화부(1410)는 AI 다운스케일부(1412), AI 설정부(1413) 및 제 1 부호화부(1414)를 포함할 수 있다.Referring to FIG. 14 , the AI encoding apparatus 1400 may include an AI encoding unit 1410 and a transmission unit 1430 . The AI encoder 1410 may include an AI downscaler 1412 , an AI setting unit 1413 , and a first encoder 1414 .

도 14는 AI 부호화부(1410) 및 전송부(1430)를 개별적인 장치로 도시하고 있으나, AI 부호화부(1410) 및 전송부(1430)는 하나의 프로세서를 통해 구현될 수 있다. 이 경우, AI 부호화부(1410) 및 전송부(1430)는 별도의 전용 프로세서로 구현될 수도 있고, AP 또는 CPU, GPU와 같은 범용 프로세서와 S/W의 조합을 통해 구현될 수도 있다. 또한, 전용 프로세서의 경우, 본 발명의 실시예를 구현하기 위한 메모리를 포함하여 구현되거나, 외부 메모리를 이용하기 위한 메모리 처리부를 포함하여 구현될 수 있다.14 illustrates the AI encoder 1410 and the transmitter 1430 as separate devices, the AI encoder 1410 and the transmitter 1430 may be implemented through one processor. In this case, the AI encoder 1410 and the transmitter 1430 may be implemented as separate dedicated processors, or may be implemented through a combination of S/W with an AP, a general-purpose processor such as a CPU or GPU. In addition, in the case of a dedicated processor, it may be implemented including a memory for implementing an embodiment of the present invention, or may be implemented including a memory processing unit for using an external memory.

또한, AI 부호화부(1410) 및 전송부(1430)는 하나 이상의 프로세서로 구성될 수도 있다. 이 경우, 전용 프로세서들의 조합으로 구현될 수도 있고, AP 또는 CPU, GPU와 같은 다수의 범용 프로세서들과 S/W의 조합을 통해 구현될 수도 있다. 마찬가지로 AI 다운스케일부(1412)와 제 1 부호화부(1414)도 각각 서로 다른 프로세서로 구현될 수 있다.Also, the AI encoder 1410 and the transmitter 1430 may include one or more processors. In this case, it may be implemented as a combination of dedicated processors, or may be implemented through a combination of S/W with a plurality of general-purpose processors such as an AP, CPU, or GPU. Similarly, the AI downscaler 1412 and the first encoder 1414 may be implemented with different processors, respectively.

AI 부호화부(1410)는 원본 영상(105)의 AI 다운스케일 및 제 1 영상(115)의 제 1 부호화를 수행하고, AI 데이터를 포함하는 서브 비트스트림 및 영상 데이터를 포함하는 메인 비트스트림을 포함하는 비디오 비트스트림을 전송부(1430)로 전달한다.The AI encoder 1410 performs AI downscaling of the original image 105 and first encoding of the first image 115 , and includes a sub-bitstream including AI data and a main bitstream including image data. and transmits the video bitstream to the transmission unit 1430 .

영상 데이터는 제 1 영상(115)의 제 1 부호화 결과 생성된 데이터를 포함한다. 영상 데이터는 제 1 영상(115) 내 픽셀 값들에 기초하여 생성되는 데이터, 예를 들어, 제 1 영상(115)과 제 1 영상(115)의 예측 데이터 사이의 차이인 잔차 데이터를 포함할 수 있다. 또한, 영상 데이터는 제 1 영상(115)의 제 1 부호화 과정에서 이용된 정보들을 포함한다. 예를 들어, 영상 데이터는 제 1 영상(115)을 제 1 부호화하는데 이용된 모드(mode) 정보(예를 들어, 예측 모드 정보, 움직임 정보 등) 및 제 1 영상(115)을 제 1 부호화하는데 이용된 양자화 파라미터 관련 정보 등을 포함할 수 있다. 또한, 영상 데이터는 적어도 하나의 프레임에 공통적으로 이용되는 파라미터 정보를 포함할 수 있다.The image data includes data generated as a result of the first encoding of the first image 115 . The image data may include data generated based on pixel values in the first image 115 , for example, residual data that is a difference between the first image 115 and prediction data of the first image 115 . . Also, the image data includes information used in the first encoding process of the first image 115 . For example, the image data includes mode information (eg, prediction mode information, motion information, etc.) used for first encoding the first image 115 and for first encoding the first image 115 . Information related to the quantization parameter used may be included. Also, the image data may include parameter information commonly used for at least one frame.

AI 데이터는, AI 업스케일 활성화 플래그 정보 및 AI 서브 데이터를 포함할 수 있다. AI 업스케일 활성화 플래그 정보는 AI 업스케일을 수행하는지 여부를 나타내는 플래그 정보일 수 있다. 즉, AI 데이터는 제 1 부호화되는 영상이 AI 다운스케일된 영상인지 여부를 나타내는 플래그 정보를 포함할 수 있다.The AI data may include AI upscale activation flag information and AI sub data. The AI upscaling activation flag information may be flag information indicating whether AI upscaling is performed. That is, the AI data may include flag information indicating whether the first encoded image is an AI downscaled image.

AI 서브 데이터는 AI 복호화 장치(1300)의 AI 업스케일부(1334)가 제 1 DNN의 다운스케일 타겟에 대응하는 업스케일 타겟으로 제 2 영상(135)을 AI 업스케일할 수 있게 하는 정보들을 포함한다. 일 예에서, AI 서브 데이터는 원본 영상(105)과 제 1 영상(115) 사이의 차이 정보를 포함할 수 있다. 또한, AI 서브 데이터는 제 1 영상(115) 관련 정보를 포함할 수도 있다. 제 1 영상(115) 관련 정보는, 제 1 영상(115)의 해상도, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트 및 제 1 영상(115)의 제 1 부호화시 이용된 코덱 타입 중 적어도 하나에 대한 정보를 포함할 수 있다. 또한, AI 서브 데이터는 제 1 영상의 제1 부호화에 이용된 양자화 파라미터의 평균값을 포함할 수 있다. 또한, AI 서브 데이터는 제 1 영상의 적어도 일부의 양자화 파라미터 지시자 정보를 포함할 수 있다. 또한, AI 서브 데이터는 제 1 영상의 장르 정보를 포함할 수 있다.The AI sub data includes information that enables the AI upscaling unit 1334 of the AI decoding apparatus 1300 to AI upscale the second image 135 to an upscale target corresponding to the downscale target of the first DNN. do. In an example, the AI sub data may include difference information between the original image 105 and the first image 115 . Also, the AI sub data may include information related to the first image 115 . The information related to the first image 115 is used for the resolution of the first image 115 , the bit rate of image data generated as a result of the first encoding of the first image 115 , and the first encoding of the first image 115 . information on at least one of the specified codec types may be included. Also, the AI sub data may include an average value of quantization parameters used for the first encoding of the first image. Also, the AI sub data may include quantization parameter indicator information of at least a part of the first image. Also, the AI sub data may include genre information of the first image.

또한, AI 데이터는 AI 업스케일을 통해 생성될 제 3 영상(145)(또는 원본 영상(105))의 해상도 정보를 포함할 수 있다. 또한, AI 데이터는 제 2 영상(135)의 AI 업스케일을 위해 추가 메타 데이터 정보를 더 포함할 수 있다.Also, the AI data may include resolution information of the third image 145 (or the original image 105) to be generated through AI upscaling. Also, the AI data may further include additional metadata information for AI upscaling of the second image 135 .

AI 설정부(1413)는 AI 다운 스케일부(1412)가 제1 DNN을 통해 원본 영상(105)을 AI 다운스케일 할지 여부를 결정한다.The AI setting unit 1413 determines whether the AI downscale unit 1412 AI downscales the original image 105 through the first DNN.

AI 설정부(1413)는 원본 영상(105)의 해상도, 원본 영상(105)의 타입(예를 들어, 파일의 종류), 원본 영상(105)에 포함된 피사체의 종류 등에 기초하여 AI 다운스케일 수행 여부를 결정할 수 있다. 예를 들어, AI 설정부(1413)는 원본 영상(105)의 해상도가 소정 해상도(예를 들어, HD)보다 작으면, AI 다운스케일을 하지 않는 것으로 결정할 수 있다.The AI setting unit 1413 performs AI downscaling based on the resolution of the original image 105 , the type of the original image 105 (eg, the type of file), the type of the subject included in the original image 105 , and the like. can decide whether For example, when the resolution of the original image 105 is smaller than a predetermined resolution (eg, HD), the AI setting unit 1413 may determine not to perform AI downscaling.

AI 설정부(1413)는 제 1 DNN을 통해 원본 영상(105)을 AI 다운스케일하는 것으로 결정하면, 제 1 DNN을 통해 원본 영상(105)으로부터 AI 다운스케일된 제 1 영상(115)을 생성하도록 DNN 설정 정보를 AI 다운 스케일부(1412)로 제공할 수 있다.When the AI setting unit 1413 determines to AI downscale the original image 105 through the first DNN, the AI downscaled first image 115 is generated from the original image 105 through the first DNN. The DNN configuration information may be provided to the AI downscale unit 1412 .

AI 설정부(1413)는 원본 영상(105)의 AI 다운스케일을 위한 제1 DNN을 식별하기 위해 제 1 영상의 제1 부호화에 이용된 양자화 파라미터의 평균값을 더 입력하여 DNN 설정 정보를 획득하고, DNN 설정 정보를 AI 다운 스케일부(1412)로 제공할 수 있다.The AI setting unit 1413 further inputs the average value of the quantization parameter used for the first encoding of the first image to identify the first DNN for AI downscaling of the original image 105 to obtain DNN setting information, The DNN configuration information may be provided to the AI downscale unit 1412 .

AI 설정부(1413)는 원본 영상(105)의 AI 다운스케일을 위한 제1 DNN을 식별하기 위해 제 1 영상의 적어도 일부의 양자화 파라미터 지시자 정보를 더 입력하여 DNN 설정 정보를 획득하고, DNN 설정 정보를 AI 다운 스케일부(1412)로 제공할 수 있다.The AI setting unit 1413 further inputs quantization parameter indicator information of at least a part of the first image to identify the first DNN for AI downscaling of the original image 105 to obtain DNN setting information, and DNN setting information may be provided to the AI downscale unit 1412 .

AI 설정부(1413)는 원본 영상(105)의 AI 다운스케일을 위한 제1 DNN을 식별하기 위해 제 1 영상(115)의 장르를 나타내는 정보를 더 입력하여 DNN 설정 정보를 획득하고, DNN 설정 정보를 AI 다운 스케일부(1412)로 제공할 수 있다.The AI setting unit 1413 further inputs information indicating the genre of the first image 115 to identify the first DNN for AI downscaling of the original image 105 to obtain DNN setting information, and DNN setting information may be provided to the AI downscale unit 1412 .

AI 설정부(1413)는 원본 영상(105)의 AI 다운스케일을 위한 제1 DNN을 식별하기 위해 추가 메타 데이터 정보를 더 입력하여 DNN 설정 정보를 획득하고, DNN 설정 정보를 AI 다운 스케일부(1412)로 제공할 수 있다.The AI setting unit 1413 obtains DNN setting information by further inputting additional metadata information to identify the first DNN for AI downscaling of the original image 105, and sets the DNN setting information to the AI downscaling unit 1412 ) can be provided.

AI 설정부(1413)는 미리 결정된 기준에 기초하여 원본 영상(105)의 다운스케일 타겟을 결정할 수 있다.The AI setting unit 1413 may determine a downscale target of the original image 105 based on a predetermined criterion.

다운스케일 타겟에 부합하는 제 1 영상(115)의 생성을 위해, AI 설정부(1413)는 제 1 DNN에 세팅 가능한 복수의 DNN 설정 정보를 저장할 수 있다. AI 설정부(1413)는 복수의 DNN 설정 정보 중 다운스케일 타겟에 대응하는 DNN 설정 정보를 획득하고, 획득된 DNN 설정 정보를 AI 다운 스케일부(1412)로 전달할 수 있다. AI 다운스케일부(1412)는 획득된 DNN 설정 정보로 세팅된 제 1 DNN을 통해 원본 영상(105)을 AI 다운스케일한다.In order to generate the first image 115 matching the downscale target, the AI setting unit 1413 may store a plurality of settable DNN setting information in the first DNN. The AI setting unit 1413 may obtain DNN setting information corresponding to a downscale target among a plurality of DNN setting information, and transmit the obtained DNN setting information to the AI downscale unit 1412 . The AI downscaling unit 1412 AI downscales the original image 105 through the first DNN set with the obtained DNN setting information.

상기 복수의 DNN 설정 정보 각각은 미리 결정된 해상도 및/또는 미리 결정된 화질의 제 1 영상(115)을 생성하기 위해 훈련된 것일 수 있다. 예를 들어, 복수의 DNN 설정 정보 중 어느 하나의 DNN 설정 정보는 원본 영상(105)의 해상도보다 1/2배만큼 작은 해상도의 제 1 영상(115), 예를 들어, 4K(4096*2160)의 원본 영상(105)보다 1/2배 작은 2K(2048*1080)의 제 1 영상(115)을 생성하기 위한 정보들을 포함할 수 있고, 다른 하나의 DNN 설정 정보는 원본 영상(105)의 해상도보다 1/4배만큼 작은 해상도의 제 1 영상(115), 예를 들어, 8K(8192*4320)의 원본 영상(105)보다 1/4배 작은 2K(2048*1080)의 제 1 영상(115)을 생성하기 위한 정보들을 포함할 수 있다.Each of the plurality of pieces of DNN configuration information may be trained to generate the first image 115 having a predetermined resolution and/or a predetermined image quality. For example, the DNN setting information of any one of the plurality of DNN setting information is the first image 115 having a resolution that is 1/2 times smaller than the resolution of the original image 105, for example, 4K (4096*2160) may include information for generating the first image 115 of 2K (2048 * 1080) that is 1/2 times smaller than the original image 105 of A first image 115 of a resolution of 1/4 times smaller than that of a first image 115, for example, a first image 115 of 2K (2048*1080) which is 1/4 times smaller than an original image 105 of 8K (8192*4320). ) may include information for generating

AI 다운스케일부(1412)는 원본 영상(105)의 AI 다운스케일을 위해 획득된 DNN 설정 정보로 제 1 DNN을 세팅하여, 소정 해상도 및/또는 소정 화질의 제 1 영상(115)을 제 1 DNN을 통해 생성할 수 있다. 복수의 DNN 설정 정보 중 원본 영상(105)의 AI 다운스케일을 위한 DNN 설정 정보가 획득되면, 제 1 DNN 내 각 레이어는 DNN 설정 정보에 포함된 정보들에 기초하여 입력된 데이터를 처리할 수 있다.The AI downscaling unit 1412 sets the first DNN as the DNN setting information obtained for the AI downscaling of the original image 105, and converts the first image 115 of a predetermined resolution and/or a predetermined quality to the first DNN. can be created through When DNN setting information for AI downscaling of the original image 105 is obtained among a plurality of DNN setting information, each layer in the first DNN may process input data based on information included in the DNN setting information. .

일 실시예에서, 다운스케일 타겟에 부합하는 제 1 영상(115)의 생성을 위해, AI 다운스케일부(1412)는 AI 설정부(1413)에서 획득된 DNN 설정 정보를 기초로, 미리 저장된 복수의 제 1 DNN 중 원본 영상(105)을 AI 다운스케일하기 위한 제 1 DNN을 결정하고, 결정된 제 1 DNN을 통해 원본 영상(105)을 AI 다운스케일할 수도 있다. 복수의 제 1 DNN은 레이어의 구조가 서로 상이하거나, 미리 세팅된 파라미터들이 서로 상이할 수 있다.In one embodiment, in order to generate the first image 115 matching the downscale target, the AI downscaling unit 1412 is based on the DNN setting information obtained in the AI setting unit 1413, a plurality of pre-stored Among the first DNNs, a first DNN for AI downscaling the original video 105 may be determined, and the original video 105 may be AI downscaled through the determined first DNN. The plurality of first DNNs may have different layer structures or different preset parameters.

AI 설정부(1413)는 미리 결정된 기준(예를 들어, 압축률, 압축 품질, 압축 히스토리 정보 및 원본 영상의 타입 중 적어도 하나에 기초하여 결정되는 기준)에 기초하여 복수의 제 1 DNN 중 원본 영상(105)을 AI 다운스케일하기 위한 제 1 DNN을 선택할 수 있고, 선택된 제 1 DNN과 관련된 DNN 설정 정보를 AI 다운스케일부(1412)로 전달할 수 있다.The AI setting unit 1413 is an original image (eg, a criterion determined based on at least one of compression ratio, compression quality, compression history information, and the type of the original image) based on a predetermined criterion) among the plurality of first DNNs. 105) may select a first DNN for downscaling the AI, and may transmit DNN configuration information related to the selected first DNN to the AI downscaling unit 1412 .

이하에서는, AI 설정부(1413)가 다운스케일 타겟을 결정하는 방법에 대해 설명한다. 상기 다운스케일 타겟은 예를 들어, 원본 영상(105)으로부터 얼마나 해상도가 감소한 제 1 영상(115)을 생성해야 하는지를 나타낼 수 있다.Hereinafter, a method for the AI setting unit 1413 to determine the downscale target will be described. The downscale target may indicate, for example, how much the resolution of the first image 115 is reduced from the original image 105 should be generated.

일 실시예에서, AI 설정부(1413)는 압축률, 압축 품질, 압축 히스토리 정보 및 원본 영상(105)의 타입 중 적어도 하나에 기초하여 다운스케일 타겟을 결정할 수 있다.In an embodiment, the AI setting unit 1413 may determine a downscale target based on at least one of a compression rate, compression quality, compression history information, and a type of the original image 105 .

일 예에서, AI 설정부(1413)는 미리 설정되거나, 사용자로부터 입력받은 압축률 또는 압축 품질 등에 기반하여 다운스케일 타겟을 결정할 수 있다.In one example, the AI setting unit 1413 may determine a downscale target based on a preset or a compression rate or compression quality input from a user.

다른 예로, AI 설정부(1413)는 AI 부호화 장치(1400)에 저장된 압축 히스토리 정보를 이용하여 다운스케일 타겟을 결정할 수도 있다. 예를 들어, AI 부호화 장치(1400)가 이용할 수 있는 압축 히스토리 정보에 따르면, 사용자가 선호하는 부호화 품질 또는 압축률 등이 결정될 수 있으며, 압축 히스토리 정보에 기초하여 결정된 부호화 품질 등에 따라 다운스케일 타겟이 결정될 수 있다. 예를 들면, 압축 히스토리 정보에 따라 가장 많이 이용된 적이 있는 부호화 품질에 따라 제 1 영상(115)의 해상도, 화질 등이 결정될 수 있다. As another example, the AI setting unit 1413 may determine the downscale target by using the compression history information stored in the AI encoding apparatus 1400 . For example, according to the compression history information available to the AI encoding apparatus 1400, a user's preferred encoding quality or compression rate may be determined, and a downscale target may be determined according to the encoding quality determined based on the compression history information. can For example, the resolution and quality of the first image 115 may be determined according to the encoding quality that has been most frequently used according to the compression history information.

또 다른 예로, AI 설정부(1413)는 압축 히스토리 정보에 따라 소정의 임계 값보다 많이 이용된 적이 있는 부호화 품질(예를 들면, 소정의 임계값보다 많이 이용된 적이 있는 부호화 품질의 평균 품질)에 기초하여 다운스케일 타겟을 결정할 수도 있다.As another example, the AI setting unit 1413 sets the encoding quality that has been used more than a predetermined threshold value (eg, average quality of encoding quality that has been used more than a predetermined threshold value) according to the compression history information. A downscale target may be determined based on it.

또 다른 예로, AI 설정부(1413)는 원본 영상(105)의 해상도, 타입(예를 들어, 파일의 형식)등에 기초하여 다운스케일 타겟을 결정할 수도 있다.As another example, the AI setting unit 1413 may determine the downscale target based on the resolution and type (eg, file format) of the original image 105 .

일 실시예에서, 원본 영상(105)이 복수의 프레임으로 구성된 경우, AI 설정부(1413)는 소정 개수의 프레임 별로 다운스케일 타겟을 독립적으로 결정할 수 있고, 또는, 전체 프레임에 대해 공통된 다운스케일 타겟을 결정할 수도 있다.In an embodiment, when the original image 105 is composed of a plurality of frames, the AI setting unit 1413 may independently determine a downscale target for each predetermined number of frames, or a common downscale target for all frames may decide.

일 예시에서, AI 설정부(1413)는 원본 영상(105)을 구성하는 프레임들을 소정 개수의 그룹으로 구분하고, 각 그룹별로 다운스케일 타겟을 독립적으로 결정할 수 있다. 각 그룹에 대해 동일하거나 상이한 다운스케일 타겟이 결정될 수 있다. 그룹들에 포함된 프레임들의 개수는 그룹별로 동일하거나 상이할 수 있다.In one example, the AI setting unit 1413 may classify frames constituting the original image 105 into a predetermined number of groups, and independently determine a downscale target for each group. The same or different downscale targets may be determined for each group. The number of frames included in the groups may be the same or different for each group.

다른 예시에서, AI 설정부(1413)는 원본 영상(105)을 구성하는 프레임별로 다운스케일 타겟을 독립적으로 결정할 수 있다. 각각의 프레임에 대해 동일하거나 상이한 다운스케일 타겟이 결정될 수 있다. 전술한 AI 다운스케일부(1432) 및 AI 설정부(1433)은 AI 다운 스케일부(712) 및 AI 설정부(718)에 대응될 수 있다.In another example, the AI setting unit 1413 may independently determine a downscale target for each frame constituting the original image 105 . The same or different downscale target may be determined for each frame. The aforementioned AI downscale unit 1432 and AI setting unit 1433 may correspond to the AI downscale unit 712 and AI setting unit 718 .

한편, 제1 부호화부(1414)는 제1 부호화부(714)에 대응될 수 있다. 이에 제한되지 않고, 데이터 처리부(716)를 더 포함할 수 있다. 다만 이에 제한되지 않고, 제1 부호화부(1414)와 별도로 데이터 처리부(미도시)가 존재할 수 있다. 이때, 데이터 처리부(미도시)는 전술한 데이터 처리부(716)에 대응될 수 있다.Meanwhile, the first encoder 1414 may correspond to the first encoder 714 . The present invention is not limited thereto, and may further include a data processing unit 716 . However, the present invention is not limited thereto, and a data processing unit (not shown) may exist separately from the first encoding unit 1414 . In this case, the data processing unit (not shown) may correspond to the above-described data processing unit 716 .

제1 부호화부(1414)는 AI 데이터를 AI 설정부(1313)로부터 획득할 수 있다. 제1 부호화부(1414)는 제 1 영상(115)의 제 1 부호화를 수행하여 영상 데이터를 획득하고, 영상 데이터 및 AI 데이터를 포함하는 AI 부호화 데이터를 전송부(1430)로 전달할 수 있다. 제1 부호화부(1414)는 AI 데이터를 포함하는 서브 비트스트림 및 영상 데이터를 포함하는 메인 비트스트림을 포함하는 비디오 비트스트림을 전송부(1430)로 전달할 수 있다.The first encoder 1414 may obtain AI data from the AI setting unit 1313 . The first encoder 1414 may obtain image data by performing a first encoding of the first image 115 , and may transmit AI-encoded data including the image data and AI data to the transmitter 1430 . The first encoder 1414 may transmit a video bitstream including a sub bitstream including AI data and a main bitstream including image data to the transmitter 1430 .

전송부(1430)는 비디오 비트스트림을 패킷화하여 패킷화된 비트스트림을 생성할 수 있다. 비디오 비트스트림은 적어도 하나의 NAL 유닛을 포함하고, 이때, 적어도 하나의 프레임에 공통적으로 이용되는 파라미터 셋의 NAL 유닛, I 슬라이스, P 슬라이스, B 슬라이스의 NAL 유닛의 순서대로 정렬되어 수신될 수 있다.The transmitter 1430 may generate a packetized bitstream by packetizing the video bitstream. The video bitstream includes at least one NAL unit, and in this case, the NAL unit of the parameter set commonly used for at least one frame, the NAL unit of the I slice, the P slice, and the NAL unit of the B slice may be received in order. .

전송부(1430)는 비트스트림에 포함된 적어도 하나의 NAL 유닛을 패킷의 페이로드에 포함하고, 이더넷 헤더(Ethernet Header), IP 헤더(IP Header), UDP/TCP 헤더, RTP 헤더 등과 같은 헤더를 추가하여 패킷화된 비디오 비트스트림을 생성할 수 있고, 전송부(1430)는 패킷화된 비트스트림을 네트워크를 통해 외부로 전송할 수 있다.The transmission unit 1430 includes at least one NAL unit included in the bitstream in the payload of the packet, and a header such as an Ethernet header, an IP header, a UDP/TCP header, an RTP header, etc. In addition, a packetized video bitstream may be generated, and the transmitter 1430 may transmit the packetized bitstream to the outside through a network.

도 14b는 다른 실시예에 따른 AI 부호화 장치(1450)의 구성을 도시한 도면이다.14B is a diagram illustrating a configuration of an AI encoding apparatus 1450 according to another embodiment.

도 14b를 참조하면, AI 부호화 장치(1450)는 별도의 데이터 처리부(1465)를 포함하는 것을 제외하고, 도 14a와 유사한 구성을 포함할 수 있다.Referring to FIG. 14B , the AI encoding apparatus 1450 may include a configuration similar to that of FIG. 14A , except that a separate data processing unit 1465 is included.

데이터 처리부(1465)는 AI 데이터를 AI 설정부(1463)로부터 획득할 수 있다. 데이터 처리부(1465)는 영상 데이터를 제1 부호화부(1464)로부터 획득할 수 있다. 데이터 처리부(1465)는 AI 데이터 및 영상 데이터를 포함하는 비디오 파일을 생성할 수 있다. 데이터 처리부(1465)는 생성된 비디오 파일을 전송부(1430)로 전달할 수 있다. 이때, 비디오 파일의 메타 데이터 박스는 AI 데이터를 포함할 수 있고, 비디오 파일의 미디어 데이터 박스는 영상 데이터를 포함할 수 있다. 그밖의 AI 부호화 장치(1450)의 동작은 AI 부호화 장치(1400)의 동작과 유사하므로, AI 부호화 장치(1450)의 동작에 대한 자세한 설명은 생략하기로 한다.The data processing unit 1465 may acquire AI data from the AI setting unit 1463 . The data processor 1465 may obtain image data from the first encoder 1464 . The data processing unit 1465 may generate a video file including AI data and image data. The data processing unit 1465 may transmit the generated video file to the transmission unit 1430 . In this case, the metadata box of the video file may include AI data, and the media data box of the video file may include image data. Other operations of the AI encoding apparatus 1450 are similar to the operations of the AI encoding apparatus 1400 , and thus a detailed description of the operation of the AI encoding apparatus 1450 will be omitted.

도 15a는 일 실시예에 따른 AI 복호화 방법을 설명하기 위한 순서도이다.15A is a flowchart illustrating an AI decoding method according to an embodiment.

S1505 단계에서, AI 복호화 장치(1300)는 제1 영상의 제1 부호화 결과 획득된 영상 데이터를 포함하는 메인 비트스트림 및 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 획득할 수 있다.In operation S1505, the AI decoding apparatus 1300 may obtain a video bitstream including a main bitstream including image data obtained as a result of the first encoding of the first image and a sub-bitstream including AI data.

메인 비트스트림은 소정의 코덱에서 영상 부호화 정보를 위해 정의된 비디오 비트스트림 내 소정의 메인 비트스트림 영역에 포함되고, 서브 비트스트림은 소정의 코덱에서 부가 데이터를 위해 정의된 비디오 비트스트림 내 소정의 서브 비트스트림 영역에 포함될 수 있다. 이때, 서브 비트스트림은 MPEG 비디오 코덱의 SEI(Supplemental Enhancement Information) 메시지일 수 있다. SEI 메시지는 소정의 표준에 의해 등록된 사용자 데이터 또는 UUID(Universally Unique Identifier)에 의해 식별되는 등록되지 않은(Unregistered) 사용자 데이터를 포함하는 SEI 메시지일 수 있다. 한편, 소정의 코덱인 AV1, VP9과 같은 코덱인 경우, 서브 비트스트림은 메타데이터 OBU(Open Bitstream Unit)일 수 있다. 이때, 메타데이터 OBU는 소정의 표준에 의해 등록된 사용자 데이터를 포함하는 메타데이터 OBU일 수 잇다.The main bitstream is included in a predetermined main bitstream area in a video bitstream defined for image encoding information in a predetermined codec, and the sub bitstream is a predetermined sub-bitstream in a video bitstream defined for additional data in a predetermined codec. It may be included in the bitstream area. In this case, the sub-bitstream may be a Supplemental Enhancement Information (SEI) message of the MPEG video codec. The SEI message may be an SEI message including user data registered by a predetermined standard or unregistered user data identified by a Universally Unique Identifier (UUID). Meanwhile, in the case of a codec such as AV1 or VP9, which is a predetermined codec, the sub-bitstream may be metadata Open Bitstream Unit (OBU). In this case, the metadata OBU may be a metadata OBU including user data registered according to a predetermined standard.

서브 비트스트림에 포함된 AI 서브 데이터는 영상의 장르를 나타내는 영상 장르 정보, 제1 영상의 평균 양자화 값을 나타내는 평균 양자화 파라미터 정보, 제1 영상의 적어도 일부의 양자화 정도를 나타내는 양자화 파라미터 지시자 정보, 원본 영상 및 제1 영상 중 적어도 하나의 영상의 해상도를 나타내는 영상 해상도 정보, 원본 영상과 제 1 영상의 비율을 나타내는 영상 비율 정보, 제1 영상의 부호화시 이용된 코덱을 나타내는 코덱 정보, AI 업스케일 관련 추가 데이터를 포함하는지 여부를 나타내는 메타 데이터 플래그 정보 및 AI 업스케일 관련 추가 메타 데이터 정보 중 적어도 하나를 포함할 수 있다. 이때, 양자화 파라미터 지시자 정보는 미리 결정된 복수의 양자화 파라미터 그룹 중 하나의 양자화 파라미터 그룹을 나타내는 인덱스 정보일 수 있다.AI sub data included in the sub bitstream includes image genre information indicating the genre of the image, average quantization parameter information indicating the average quantization value of the first image, quantization parameter indicator information indicating the degree of quantization of at least a portion of the first image, and the original Image resolution information indicating the resolution of at least one of the image and the first image, image ratio information indicating the ratio of the original image and the first image, codec information indicating the codec used for encoding the first image, AI upscaling related At least one of metadata flag information indicating whether additional data is included and additional metadata information related to AI upscaling may be included. In this case, the quantization parameter indicator information may be index information indicating one quantization parameter group among a plurality of predetermined quantization parameter groups.

양자화 파라미터 지시자 정보는 프레임 내 서브 그룹, 프레임, 프레임 그룹, 비디오 시퀀스 중 적어도 하나의 양자화 파라미터의 대표 값이 포함된 양자화 파라미터 그룹을 가리키는 인덱스 정보일 수 있다.The quantization parameter indicator information may be index information indicating a quantization parameter group including a representative value of at least one quantization parameter among a subgroup in a frame, a frame, a frame group, and a video sequence.

이때, 비디오 시퀀스는 영상 데이터의 연속된 모든 프레임을 포함하는 데이터 단위이다. 프레임 그룹은 프레임 그룹 파라미터 세트의 파라미터 정보를 공유하는 하나 이상의 연속된 프레임으로 구성된 데이터 단위이다. 프레임 그룹은 GOP(Group of Pictures) 또는 CVS(Coded Video Sequence)일 수 있다. 프레임 그룹은 다른 프레임을 참조하지 않고 부호화된 IDR(Instantaneous decoding refresh) 프레임 또는 IRAP(Intra Random Access Pictures) 프레임을 포함한다. 그리고 프레임 그룹의 나머지 프레임은 IDR 프레임 (또는 IRAP 프레임)을 참조하여 부호화된다. 프레임은 비디오에 포함된 하나의 정지 영상을 나타낸다. 프레임 서브 그룹은 프레임에 포함된 적어도 하나의 블록으로 구성된 데이터 단위이다.In this case, the video sequence is a data unit including all consecutive frames of image data. A frame group is a data unit composed of one or more consecutive frames that share parameter information of a frame group parameter set. The frame group may be a group of pictures (GOP) or a coded video sequence (CVS). The frame group includes an coded instantaneous decoding refresh (IDR) frame or an intra random access pictures (IRAP) frame without reference to other frames. And the remaining frames of the frame group are coded with reference to the IDR frame (or IRAP frame). A frame represents one still image included in the video. A frame subgroup is a data unit composed of at least one block included in a frame.

S1510 단계에서, AI 복호화 장치(1300)는 메인 비트스트림에 포함된 영상 데이터를 제 1 복호화하여 제1 영상에 대응하는 제2 영상을 획득할 수 있다.In operation S1510, the AI decoding apparatus 1300 may first decode image data included in the main bitstream to obtain a second image corresponding to the first image.

S1515 단계에서, AI 복호화 장치(1300)는 서브 비트스트림의 AI 데이터에 포함된 AI 업스케일 활성화 플래그를 획득할 수 있다. In step S1515 , the AI decoding apparatus 1300 may acquire an AI upscaling activation flag included in AI data of the sub-bitstream.

S1520 단계에서, AI 복호화 장치(1300)는 AI 업스케일 활성화 플래그 정보가 AI 업스케일의 활성화를 나타내는지 여부를 결정할 수 있다.In step S1520 , the AI decoding apparatus 1300 may determine whether the AI upscale activation flag information indicates activation of the AI upscale.

S1525 단계에서, AI 복호화 장치(1300)는 AI 업스케일 활성화 플래그 정보가 AI 업스케일의 활성화를 나타내는 경우, 영상 데이터의 적어도 일부 및 서브 비트스트림에 포함된 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN 을 통해, AI 업스케일된 제 3 영상을 획득할 수 있다.In step S1525, when the AI upscaling activation flag information indicates activation of AI upscaling, the AI decoding apparatus 1300 determines at least one of at least a portion of the image data and at least a portion of the AI sub data included in the sub bitstream. The AI upscaled third image may be acquired through the upscaling DNN set according to the selected upscaling DNN information among a plurality of upscaling DNN information stored in advance as .

AI 복호화 장치(1300)는 메인 비트스트림의 영상 데이터로부터 획득된 양자화 파라미터 정보 및 AI 서브 데이터에 포함된 영상 장르 정보, 평균 양자화 파라미터 정보, 양자화 파라미터 지시자 정보, 영상 해상도 정보, 영상 비율 정보 및 AI 업스케일 관련 추가 메타 데이터 정보 중 적어도 하나를 기초로 복수의 업스케일용 DNN 정보 중 하나의 업스케일용 DNN 정보로 업스케일용 DNN을 설정할 수 있다.The AI decoding apparatus 1300 provides quantization parameter information obtained from image data of the main bitstream and image genre information included in AI sub data, average quantization parameter information, quantization parameter indicator information, image resolution information, image ratio information, and AI up. Based on at least one of the scale-related additional metadata information, the upscaling DNN may be set as one upscaling DNN information among a plurality of upscaling DNN information.

AI 복호화 장치(1300)는 복수의 업스케일용 DNN 정보 중 양자화 파라미터 지시자 정보의 인덱스 정보가 나타내는 하나의 양자화 그룹에 대응하는 업스케일 용 DNN 정보로 업스케일용 DNN을 설정할 수 있다.The AI decoding apparatus 1300 may set the upscaling DNN as upscaling DNN information corresponding to one quantization group indicated by index information of quantization parameter indicator information among a plurality of upscaling DNN information.

S1530 단계에서, AI 복호화 장치(1300)는 제 3 영상을 출력할 수 있다.In step S1530 , the AI decoding apparatus 1300 may output a third image.

S1535 단계에서, AI 복호화 장치(1300)는 AI 업스케일 활성화 플래그 정보가 AI 업스케일이 활성화되지 않음을 나타내는 경우, 제2 영상을 출력할 수 있다.In step S1535 , the AI decoding apparatus 1300 may output a second image when the AI upscaling activation flag information indicates that the AI upscaling is not activated.

도 15b는 다른 실시예에 따른 AI 복호화 방법을 설명하기 위한 순서도이다.15B is a flowchart illustrating an AI decoding method according to another embodiment.

S1555 단계에서, AI 복호화 장치(1350)는 제1 영상의 제1 부호화 결과 획득된 영상 데이터를 포함하는 미디어 데이터 박스 및 AI 데이터를 포함하는 메타 데이터 박스를 포함하는 비디오 파일을 획득할 수 있다.In operation S1555, the AI decoding apparatus 1350 may obtain a video file including a media data box including image data obtained as a result of the first encoding of the first image and a metadata box including AI data.

S1560 단계에서, AI 복호화 장치(1350)는 미디어 데이터 박스에 포함된 영상 데이터를 제 1 복호화하여 제1 영상에 대응하는 제2 영상을 획득할 수 있다.In operation S1560, the AI decoding apparatus 1350 may first decode image data included in the media data box to obtain a second image corresponding to the first image.

S1565 단계에서, AI 복호화 장치(1350)는 메타 데이터 박스의 AI 데이터에 포함된 AI 업스케일 활성화 플래그를 획득할 수 있다. In step S1565 , the AI decoding apparatus 1350 may acquire an AI upscaling activation flag included in the AI data of the metadata box.

S1570 단계에서, AI 복호화 장치(1350)는 AI 업스케일 활성화 플래그 정보가 AI 업스케일의 활성화를 나타내는지 여부를 결정할 수 있다.In operation S1570, the AI decoding apparatus 1350 may determine whether the AI upscale activation flag information indicates activation of the AI upscale.

S1575 단계에서, AI 복호화 장치(1350)는 AI 업스케일 활성화 플래그 정보가 AI 업스케일의 활성화를 나타내는 경우, 영상 데이터의 적어도 일부 및 메타 데이터 박스에 포함된 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN 을 통해, AI 업스케일된 제 3 영상을 획득할 수 있다.In step S1575, when the AI upscaling activation flag information indicates activation of AI upscaling, the AI decoding apparatus 1350 determines at least one of at least a portion of the image data and at least a portion of the AI sub data included in the metadata box. The AI upscaled third image may be acquired through the upscaling DNN set according to the selected upscaling DNN information among a plurality of upscaling DNN information stored in advance as .

S1580 단계에서, AI 복호화 장치(1350)는 AI 업스케일 활성화 플래그 정보가 AI 업스케일이 활성화되지 않음을 나타내는 경우, 제2 영상을 출력할 수 있다.In step S1580 , the AI decoding apparatus 1350 may output a second image when the AI upscaling activation flag information indicates that AI upscaling is not activated.

도 16a는 일 실시예에 따른 AI 부호화 방법을 설명하기 위한 순서도이다.16A is a flowchart illustrating an AI encoding method according to an embodiment.

S1605 단계에서, AI 부호화 장치(1400)는 영상의 AI 다운스케일 여부를 결정할 수 있다.In step S1605, the AI encoding apparatus 1400 may determine whether to downscale the AI of the image.

S1610 단계에서, AI 부호화 장치(1400)는 결정 결과를 기초로, 다운스케일용 DNN을 이용하여 원본 영상으로부터 AI 다운스케일된 제 1 영상을 획득할 수 있다.In operation S1610 , the AI encoding apparatus 1400 may acquire the AI downscaled first image from the original image using the downscaling DNN based on the determination result.

AI 부호화 장치(1400)는 메인 비트스트림의 영상 데이터로부터 획득된 양자화 파라미터 정보 및 AI 서브 데이터에 포함된 영상 장르 정보, 평균 양자화 파라미터 정보, 양자화 파라미터 지시자 정보, 영상 해상도 정보, 영상 비율 정보 및 AI 업스케일 관련 추가 메타 데이터 정보 중 적어도 하나를 기초로 복수의 다운스케일용 DNN 정보 중 하나의 다운스케일용 DNN 정보로 다운스케일용 DNN을 설정할 수 있다.The AI encoding apparatus 1400 includes quantization parameter information obtained from image data of the main bitstream and image genre information included in AI sub data, average quantization parameter information, quantization parameter indicator information, image resolution information, image ratio information, and AI up. A DNN for downscaling may be set as one of the downscaling DNN information among a plurality of downscaling DNN information based on at least one of the scale-related additional metadata information.

AI 부호화 장치(1400)는 복수의 다운스케일용 DNN 정보 중 양자화 파라미터 지시자 정보의 인덱스 정보가 나타내는 하나의 양자화 그룹에 대응하는 다운스케일 용 DNN 정보로 다운스케일용 DNN을 설정할 수 있다.The AI encoding apparatus 1400 may set the DNN for downscaling as downscaling DNN information corresponding to one quantization group indicated by index information of quantization parameter indicator information among a plurality of downscaling DNN information.

S1615 단계에서, AI 부호화 장치(1400)는 제1 영상을 부호화 하여 영상 데이터를 획득할 수 있다.In operation S1615, the AI encoding apparatus 1400 may obtain image data by encoding the first image.

S1620 단계에서, AI 부호화 장치(1400)는 다운스케일 여부에 대응하는 AI 업스케일 여부를 나타내는 AI 업스케일 활성화 플래그를 생성할 수 있다.In operation S1620, the AI encoding apparatus 1400 may generate an AI upscaling activation flag indicating whether AI upscaling corresponding to downscaling.

S1625 단계에서, AI 부호화 장치(1400)는 원본 영상에 대해, AI 다운스케일을 수행하는 것으로 결정된 경우, AI 다운스케일에 대응하는 AI 업스케일과 관련된 AI 서브 데이터를 생성할 수 있다.In step S1625 , when it is determined to perform AI downscaling on the original image, the AI encoding apparatus 1400 may generate AI sub data related to AI upscaling corresponding to the AI downscaling.

S1630 단계에서, AI 부호화 장치(1400)는 AI 업스케일 활성화 플래그 및 AI 서브 데이터를 포함하는 AI 데이터를 생성할 수 있다.In operation S1630 , the AI encoding apparatus 1400 may generate AI data including an AI upscaling activation flag and AI sub data.

S1635 단계에서, AI 부호화 장치(1400)는 영상 데이터를 포함하는 메인 스트림과 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 생성할 수 있다. 메인 비트스트림은 소정의 코덱에서 영상 부호화 정보를 위해 정의된 비디오 비트스트림 내 소정의 메인 비트스트림 영역에 포함되고, 서브 비트스트림은 소정의 코덱에서 부가 데이터를 위해 정의된 비디오 비트스트림 내 소정의 서브 비트스트림 영역에 포함될 수 있다. 이때, 서브 비트스트림은 MPEG 비디오 코덱의 SEI 메시지일 수 있다. SEI 메시지는 소정의 표준에 의해 등록된 사용자 데이터 또는 UUID(Universally Unique Identifier)에 의해 식별되는 등록되지 않은(Unregistered) 사용자 데이터를 포함하는 SEI 메시지일 수 있다. 한편, 소정의 코덱인 AV1, VP9과 같은 코덱인 경우, 서브 비트스트림은 메타데이터 OBU(Open Bitstream Unit)일 수 있다. 이때, 메타데이터 OBU는 소정의 표준에 의해 등록된 사용자 데이터를 포함하는 메타데이터 OBU일 수 잇다.In operation S1635 , the AI encoding apparatus 1400 may generate a video bitstream including a main stream including image data and a sub bitstream including AI data. The main bitstream is included in a predetermined main bitstream area in a video bitstream defined for image encoding information in a predetermined codec, and the sub bitstream is a predetermined sub-bitstream in a video bitstream defined for additional data in a predetermined codec. It may be included in the bitstream area. In this case, the sub-bitstream may be an SEI message of an MPEG video codec. The SEI message may be an SEI message including user data registered by a predetermined standard or unregistered user data identified by a Universally Unique Identifier (UUID). Meanwhile, in the case of a codec such as AV1 or VP9, which is a predetermined codec, the sub-bitstream may be metadata Open Bitstream Unit (OBU). In this case, the metadata OBU may be a metadata OBU including user data registered according to a predetermined standard.

서브 비트스트림에 포함된 AI 서브 데이터는 영상의 장르를 나타내는 영상 장르 정보, 제1 영상의 평균 양자화 값을 나타내는 평균 양자화 파라미터 정보, 제1 영상의 적어도 일부의 양자화 정도를 나타내는 양자화 파라미터 지시자 정보, 원본 영상 및 제1 영상 중 적어도 하나의 영상의 해상도를 나타내는 영상 해상도 정보, 원본 영상과 제 1 영상의 비율을 나타내는 영상 비율 정보, 제1 영상의 부호화시 이용된 코덱을 나타내는 코덱 정보, AI 업스케일 관련 추가 데이터를 포함하는지 여부를 나타내는 메타 데이터 플래그 정보 및 AI 업스케일 관련 추가 메타 데이터 정보 중 적어도 하나를 포함할 수 있다. 이때, 양자화 파라미터 지시자 정보는 미리 결정된 복수의 양자화 파라미터 그룹 중 하나의 양자화 파라미터 그룹을 나타내는 인덱스 정보일 수 있다.AI sub data included in the sub bitstream includes image genre information indicating the genre of the image, average quantization parameter information indicating the average quantization value of the first image, quantization parameter indicator information indicating the degree of quantization of at least a portion of the first image, and the original Image resolution information indicating the resolution of at least one of the image and the first image, image ratio information indicating the ratio of the original image and the first image, codec information indicating the codec used for encoding the first image, AI upscaling related At least one of metadata flag information indicating whether additional data is included and additional metadata information related to AI upscaling may be included. In this case, the quantization parameter indicator information may be index information indicating one quantization parameter group among a plurality of predetermined quantization parameter groups.

양자화 파라미터 지시자 정보는 프레임 내 서브 그룹, 프레임, 프레임 그룹, 비디오 시퀀스 중 적어도 하나의 양자화 파라미터의 대표 값이 포함된 양자화 파라미터 그룹을 가리키는 인덱스 정보일 수 있다.The quantization parameter indicator information may be index information indicating a quantization parameter group including a representative value of at least one quantization parameter among a subgroup in a frame, a frame, a frame group, and a video sequence.

도 16b는 다른 실시예에 따른 AI 부호화 방법을 설명하기 위한 순서도이다.16B is a flowchart illustrating an AI encoding method according to another embodiment.

S1655 단계에서, AI 부호화 장치(1450)는 영상의 AI 다운스케일 여부를 결정할 수 있다.In operation S1655 , the AI encoding apparatus 1450 may determine whether to downscale the image by AI.

S1660 단계에서, AI 부호화 장치(1450)는 결정 결과를 기초로, 다운스케일용 DNN을 이용하여 원본 영상으로부터 AI 다운스케일된 제 1 영상을 획득할 수 있다. In operation S1660, the AI encoding apparatus 1450 may acquire the AI downscaled first image from the original image using the downscaling DNN based on the determination result.

S1665 단계에서, AI 부호화 장치(1450)는 제1 영상을 부호화 하여 영상 데이터를 획득할 수 있다.In operation S1665, the AI encoding apparatus 1450 may obtain image data by encoding the first image.

S1670 단계에서, AI 부호화 장치(1450)는 다운스케일 여부에 대응하는 AI 업스케일 여부를 나타내는 AI 업스케일 활성화 플래그를 생성할 수 있다.In operation S1670, the AI encoding apparatus 1450 may generate an AI upscaling activation flag indicating whether AI upscaling corresponding to downscaling.

S1675 단계에서, AI 부호화 장치(1450)는 원본 영상에 대해, AI 다운스케일을 수행하는 것으로 결정된 경우, AI 다운스케일에 대응하는 AI 업스케일과 관련된 AI 서브 데이터를 생성할 수 있다.In operation S1675, when it is determined to perform AI downscaling on the original image, the AI encoding apparatus 1450 may generate AI sub data related to AI upscaling corresponding to the AI downscaling.

S1680 단계에서, AI 부호화 장치(1450)는 AI 업스케일 활성화 플래그 및 AI 서브 데이터를 포함하는 AI 데이터를 생성할 수 있다.In operation S1680 , the AI encoding apparatus 1450 may generate AI data including an AI upscaling activation flag and AI sub data.

S1685 단계에서, AI 부호화 장치(1450)는 영상 데이터를 포함하는 미디어 데이터 박스와 AI 데이터를 포함하는 메타 데이터 박스를 포함하는 비디오 파일을 생성할 수 있다.In operation S1685, the AI encoding apparatus 1450 may generate a video file including a media data box including image data and a metadata box including AI data.

도 17는 영상 데이터(1700)와 AI 데이터(1740)의 구조와 함께, 영상 데이터(1700)와 AI 데이터(1740)의 상응 관계를 설명한다.17 illustrates the corresponding relationship between the image data 1700 and the AI data 1740, along with the structures of the image data 1700 and the AI data 1740. In FIG.

도 17에서 영상 데이터(1700)의 비디오-프레임 그룹-프레임 계층 구조가 설명된다. 도 17의 비디오(1702)는 영상 데이터(1700)의 연속된 모든 프레임을 포함하는 데이터 단위이다. 비디오(1702)에 포함된 모든 프레임에는 비디오 파라미터 세트의 파라미터 정보가 적용될 수 있다. 비디오 파라미터 세트는 비디오 헤더(1704)에 포함된다.A video-frame group-frame hierarchical structure of the image data 1700 is described in FIG. 17 . The video 1702 of FIG. 17 is a data unit including all consecutive frames of the image data 1700 . Parameter information of the video parameter set may be applied to all frames included in the video 1702 . The video parameter set is included in the video header 1704 .

비디오(1702)는 복수의 프레임 그룹를 포함할 수 있다. 프레임 그룹은 프레임 그룹 파라미터 세트의 파라미터 정보를 공유하는 하나 이상의 연속된 프레임으로 구성된 데이터 단위이다. 프레임 그룹은 GOP(Group pf Pictures) 또는 CVS(Coded Video Sequence)일 수 있다. 프레임 그룹 파라미터 세트는 프레임 그룹 헤더에 포함될 수 있다. 예를 들어, 제1 프레임 그룹(1710)의 프레임 그룹 파라미터 세트는 제1 프레임 그룹 헤더(1712)에 포함될 수 있다. 그리고 제2 프레임 그룹(1714)의 프레임 그룹 파라미터 세트는 제2 프레임 그룹 헤더(1716)에 포함될 수 있다.Video 1702 may include a plurality of groups of frames. A frame group is a data unit composed of one or more consecutive frames that share parameter information of a frame group parameter set. The frame group may be a group pf pictures (GOP) or a coded video sequence (CVS). The frame group parameter set may be included in the frame group header. For example, the frame group parameter set of the first frame group 1710 may be included in the first frame group header 1712 . In addition, the frame group parameter set of the second frame group 1714 may be included in the second frame group header 1716 .

하나의 프레임 그룹은 다른 프레임 그룹을 참조하지 않고 독립적으로 부호화된다. 프레임 그룹은 다른 프레임을 참조하지 않고 부호화된 IDR(Instantaneous decoding refresh) 프레임 또는 IRAP(Intra Random Access Pictures) 프레임을 포함한다. 그리고 프레임 그룹의 나머지 프레임은 IDR 프레임 (또는 IRAP 프레임)을 참조하여 부호화된다. 따라서, 제1 프레임 그룹(1710)는 비디오(1702)의 다른 프레임 그룹을 참조하지 않고 독립적으로 부호화된다. 그리고 제1 프레임 그룹(1710)의 첫 번째로 부호화된 프레임인 제1 프레임(1720)은 IDR 프레임 (또는 IRAP 프레임)이다. 제2 프레임(1730)을 비롯한 제1 프레임 그룹(1710)의 나머지 프레임들은 제1 프레임(1720)을 참조하여 부호화된다.One frame group is independently encoded without reference to another frame group. The frame group includes an coded instantaneous decoding refresh (IDR) frame or an intra random access pictures (IRAP) frame without reference to other frames. And the remaining frames of the frame group are coded with reference to the IDR frame (or IRAP frame). Accordingly, the first frame group 1710 is independently coded without reference to other frame groups of the video 1702 . And the first frame 1720, which is the first encoded frame of the first frame group 1710, is an IDR frame (or IRAP frame). The remaining frames of the first frame group 1710 including the second frame 1730 are encoded with reference to the first frame 1720 .

프레임은 비디오에 포함된 하나의 정지 영상을 나타낸다. 프레임 헤더에는 프레임에 적용되는 파라미터 정보를 포함하는 프레임 파라미터 세트가 포함될 수 있다. 예를 들어, 제1 프레임(1720)의 제1 프레임 헤더(1722)는 제1 프레임(1720)에 적용되는 프레임 파라미터 세트가 포함될 수 있다. 마찬가지로, 제2 프레임(1730)의 제2 프레임 헤더(1732)는 제2 프레임(1730)에 적용되는 프레임 파라미터 세트가 포함될 수 있다.A frame represents one still image included in the video. The frame header may include a frame parameter set including parameter information applied to the frame. For example, the first frame header 1722 of the first frame 1720 may include a frame parameter set applied to the first frame 1720 . Similarly, the second frame header 1732 of the second frame 1730 may include a frame parameter set applied to the second frame 1730 .

도 17에서 상기 설명된 비디오-프레임 그룹-프레임 계층 구조에 따른 AI 데이터(1740)의 분류 방법이 설명된다. AI 데이터(1740)는 적용 범위에 따라 비디오 AI 데이터(1742), 프레임 그룹 AI 데이터(1750), 및 프레임 AI 데이터(1760)로 분류될 수 있다. 비디오 AI 데이터(1742)는 비디오에 포함된 모든 프레임 그룹들에 공통적으로 적용되는 AI 데이터를 의미한다. 그리고 프레임 그룹 AI 데이터(1750)는 현재 프레임 그룹에 포함된 프레임에 공통적으로 적용되는 AI 데이터를 의미한다. 또한 프레임 AI 데이터(1760)는 현재 프레임에 적용되는 AI 데이터를 의미한다.A method of classifying the AI data 1740 according to the video-frame group-frame hierarchy described above in FIG. 17 is described. AI data 1740 may be classified into video AI data 1742 , frame group AI data 1750 , and frame AI data 1760 according to an application range. The video AI data 1742 refers to AI data commonly applied to all frame groups included in a video. In addition, the frame group AI data 1750 refers to AI data commonly applied to frames included in the current frame group. Also, the frame AI data 1760 refers to AI data applied to the current frame.

비디오 AI 데이터(1742)는 비디오 헤더(1704)에 대응된다. 따라서 비디오 AI 데이터(1742)는 비디오 헤더(1704)와 병렬적으로 복호화될 수 있다. 또는 비디오 AI 데이터(1742)는 비디오 헤더(1704)의 복호화 바로 이전에 복호화될 수 있다. 또는 비디오 AI 데이터(1742)는 비디오 헤더(1704)의 복호화 바로 이후에 복호화될 수 있다.Video AI data 1742 corresponds to video header 1704 . Accordingly, the video AI data 1742 may be decoded in parallel with the video header 1704 . Alternatively, the video AI data 1742 may be decoded immediately before decoding of the video header 1704 . Alternatively, the video AI data 1742 may be decoded immediately after decoding of the video header 1704 .

프레임 그룹 AI 데이터(1750)는 프레임 그룹 헤더에 대응된다. 도 17에 따르면, 제1 프레임 그룹 AI 데이터(1752)는 제1 프레임 그룹 헤더(1712)에 대응된다. 그리고 제2 프레임 그룹 AI 데이터(1754)는 제2 프레임 그룹 헤더(1716)에 대응된다. 제1 프레임 그룹 AI 데이터(1752) 및 2 프레임 그룹 AI 데이터(1754)는 각각 제1 프레임 그룹 헤더(1712) 및 제2 프레임 그룹 헤더(1716)와 병렬적으로 복호화될 수 있다. 또는 제1 프레임 그룹 AI 데이터(1752) 및 2 프레임 그룹 AI 데이터(1754)는 각각 제1 프레임 그룹 헤더(1712) 및 제2 프레임 그룹 헤더(1716)의 복호화 바로 이전에 복호화될 수 있다. 또는 제1 프레임 그룹 AI 데이터(1752) 및 2 프레임 그룹 AI 데이터(1754)는 각각 제1 프레임 그룹 헤더(1712) 및 제2 프레임 그룹 헤더(1716)의 복호화 바로 이후에 복호화될 수 있다.The frame group AI data 1750 corresponds to the frame group header. Referring to FIG. 17 , the first frame group AI data 1752 corresponds to the first frame group header 1712 . And the second frame group AI data 1754 corresponds to the second frame group header 1716 . The first frame group AI data 1752 and the second frame group AI data 1754 may be decoded in parallel with the first frame group header 1712 and the second frame group header 1716, respectively. Alternatively, the first frame group AI data 1752 and the second frame group AI data 1754 may be decoded immediately before decoding of the first frame group header 1712 and the second frame group header 1716 , respectively. Alternatively, the first frame group AI data 1752 and the second frame group AI data 1754 may be decoded immediately after decoding of the first frame group header 1712 and the second frame group header 1716 , respectively.

프레임 AI 데이터(1760)는 프레임 헤더에 대응된다. 도 17에 따르면, 제1 프레임 AI 데이터(1762)는 제1 프레임 헤더(1722)에 대응된다. 그리고 제2 프레임 AI 데이터(1764)는 제2 프레임 헤더(1732)에 대응된다. 제1 프레임 AI 데이터(1762) 및 는 제2 프레임 AI 데이터(1764)는 각각 제1 프레임 헤더(1722) 및 제2 프레임 헤더(1732)와 병렬적으로 복호화될 수 있다. 또는 제1 프레임 AI 데이터(1762) 및 는 제2 프레임 AI 데이터(1764)는 각각 제1 프레임 헤더(1722) 및 제2 프레임 헤더(1732)의 복호화 바로 이전에 복호화될 수 있다. 또는 제1 프레임 AI 데이터(1762) 및 는 제2 프레임 AI 데이터(1764)는 각각 제1 프레임 헤더(1722) 및 제2 프레임 헤더(1732)의 복호화 바로 이후에 복호화될 수 있다.The frame AI data 1760 corresponds to the frame header. Referring to FIG. 17 , the first frame AI data 1762 corresponds to the first frame header 1722 . And the second frame AI data 1764 corresponds to the second frame header 1732 . The first frame AI data 1762 and the second frame AI data 1764 may be decoded in parallel with the first frame header 1722 and the second frame header 1732 , respectively. Alternatively, the first frame AI data 1762 and the second frame AI data 1764 may be decoded immediately before decoding of the first frame header 1722 and the second frame header 1732 , respectively. Alternatively, the first frame AI data 1762 and the second frame AI data 1764 may be decoded immediately after decoding of the first frame header 1722 and the second frame header 1732 , respectively.

일 실시 예에 따르면, 도 7의 데이터 처리부(716)는 영상 데이터(1700)와 AI 데이터(1740)를 모두 포함한 단일 파일 형태의 AI 부호화 데이터를 생성할 수 있다. 본 명세서에서 파일은 메모리에 저장된 데이터의 모임을 의미한다. 그리고 비디오 파일은 메모리에 저장된 영상 데이터의 모임을 의미하며, 영상 데이터는 비트스트림의 형태로 구현될 수 있다.According to an embodiment, the data processing unit 716 of FIG. 7 may generate AI encoded data in the form of a single file including both the image data 1700 and the AI data 1740 . In this specification, a file means a collection of data stored in a memory. And a video file means a collection of image data stored in a memory, and the image data may be implemented in the form of a bitstream.

일 실시 예에 따르면, AI 데이터(1740)는 영상 데이터(1700)에 삽입되지 않고, 단일 파일 내에서 영상 데이터(1700)와 분리되어 구성될 수 있다. 따라서 AI 부호화 데이터가 단일 파일로 구성되었음에도, AI 데이터(1740)와 영상 데이터(1700)가 분리되었으므로, AI 데이터(1740) 및/또는 영상 데이터(1700)는 AI 데이터(1740)와 영상 데이터(1700)의 동기화에 관한 정보를 포함할 수 있으나, 이에 제한되지는 않는다.According to an embodiment, the AI data 1740 may not be inserted into the image data 1700 and may be configured separately from the image data 1700 within a single file. Therefore, even though the AI-encoded data is composed of a single file, since the AI data 1740 and the image data 1700 are separated, the AI data 1740 and/or the image data 1700 are the AI data 1740 and the image data 1700. ), but is not limited thereto.

도 18은 AI 데이터 및 영상 데이터를 포함하는 비디오 비트스트림의 일 실시 예를 도시한다.18 illustrates an embodiment of a video bitstream including AI data and image data.

비디오 비트스트림(1800)은 서브 비트스트림(1810)과 메인 비트스트림(1830)로 구성된다. 서브 비트스트림(1810)에는 메인 비트스트림(1830)에 포함된 영상 데이터에 관한 부가 정보가 포함된다.The video bitstream 1800 includes a sub bitstream 1810 and a main bitstream 1830 . The sub bitstream 1810 includes additional information about image data included in the main bitstream 1830 .

서브 비트스트림(1810)에는 동기화 데이터(1815) 및 AI 데이터(1820)가 포함될 수 있다.The sub bitstream 1810 may include synchronization data 1815 and AI data 1820 .

제1 복호화부(1332)는 서브 비트스트림(1810)으로부터 동기화 데이터(1815) 및 AI 데이터(1820)를 추출할 수 있다. 그리고 제1 복호화부(1332)는 메인 비트스트림(1830)으로부터 영상 데이터(1831)를 추출할 수 있다. 제1 복호화부(1332)는 동기화 데이터(1815)를 AI 업스케일부(1334)에 전송하거나 AI 설정부(1333)을 통하여 AI 업스케일부(1334)로 전송하고, AI 업스케일부(1334)가, 동기화 데이터(1815)에 따라, 영상 데이터(1831)와 AI 데이터(1820)의 동기화를 할 수 있다.The first decoder 1332 may extract the synchronization data 1815 and the AI data 1820 from the sub-bitstream 1810 . In addition, the first decoder 1332 may extract the image data 1831 from the main bitstream 1830 . The first decoding unit 1332 transmits the synchronization data 1815 to the AI upscaling unit 1334 or to the AI upscaling unit 1334 through the AI setting unit 1333, and the AI upscaling unit 1334 A, according to the synchronization data 1815 , the image data 1831 and the AI data 1820 may be synchronized.

AI 데이터(1820)는 비디오 AI 데이터(1822), 프레임 그룹 AI 데이터(1824) 및 프레임 AI 데이터(1826)을 포함한다. 비디오 AI 데이터(1822)는 비디오 헤더(1832)와, 프레임 그룹 AI 데이터(1824)는 프레임 그룹 헤더(1836)와, 프레임 AI 데이터(1826)는 프레임 헤더(1840)와 상응하도록 설정된다.AI data 1820 includes video AI data 1822 , frame group AI data 1824 , and frame AI data 1826 . The video AI data 1822 is set to correspond to the video header 1832 , the frame group AI data 1824 to the frame group header 1836 , and the frame AI data 1826 to the frame header 1840 .

실시 예에 따라, 비디오의 모든 프레임들에 동일한 업스케일 DNN 정보가 이용될 경우, AI 데이터(1820)에서 프레임 그룹 AI 데이터(1824)와 프레임 AI 데이터(1826)는 생략될 수 있다. 또는 업스케일 DNN 정보가 프레임 그룹 단위마다 적응적으로 획득되고, 프레임 그룹의 모든 프레임들에 동일한 업스케일 DNN 정보가 사용될 경우, AI 데이터(1820)에서 프레임 AI 데이터(1826)는 생략될 수 있다.According to an embodiment, when the same upscale DNN information is used for all frames of a video, the frame group AI data 1824 and the frame AI data 1826 may be omitted from the AI data 1820 . Alternatively, when the upscale DNN information is adaptively obtained for each frame group and the same upscale DNN information is used for all frames of the frame group, the frame AI data 1826 from the AI data 1820 may be omitted.

동기화 데이터(1815)는 비디오 AI 데이터(1822), 프레임 그룹 AI 데이터(1824) 및 프레임 AI 데이터(1826)와 비디오 헤더(1832), 프레임 그룹 헤더(1836), 프레임 헤더(1840)의 동기화에 관한 정보를 포함한다. 예를 들어, 동기화 데이터(1815)는 메인 비트스트림(1830)의 영상 데이터(1831)의 재생 순서 정보 또는 복호화 순서 정보를 포함할 수 있다. 따라서 AI 설정부(1333)는, 동기화 데이터(1815)의 재생 순서 정보 또는 복호화 순서 정보에 따라 결정된 AI 데이터로부터, 저해상도 영상의 AI 업스케일에 필요한 업스케일 DNN 정보를 획득할 수 있다.The synchronization data 1815 relates to the synchronization of the video AI data 1822, the frame group AI data 1824, and the frame AI data 1826 with the video header 1832, the frame group header 1836, and the frame header 1840. include information. For example, the synchronization data 1815 may include reproduction order information or decoding order information of the image data 1831 of the main bitstream 1830 . Accordingly, the AI setting unit 1333 may acquire upscale DNN information required for AI upscaling of the low-resolution image from the AI data determined according to the reproduction order information or the decoding order information of the synchronization data 1815 .

예를 들어, 프레임(1838)의 저해상도 영상을 AI 업스케일하기 위하여, AI 설정부(1333)는 동기화 데이터(1815)에 기초하여 프레임 그룹(1834)에 대응되는 프레임 그룹 AI 데이터(1824)와 프레임(1838)에 대응되는 프레임 AI 데이터(1826)를 결정할 수 있다. 그리고 프레임 그룹 AI 데이터(1824) 및 프레임 AI 데이터(1826)와 함께 모든 프레임에 적용되는 비디오 AI 데이터(1822)를 고려하여, AI 설정부(1333)는 프레임(1838)의 저해상도 영상의 AI 업스케일을 위한 업스케일 DNN 정보를 획득할 수 있다.For example, in order to AI upscale the low-resolution image of the frame 1838 , the AI setting unit 1333 may set the frame group AI data 1824 and the frame corresponding to the frame group 1834 based on the synchronization data 1815 . Frame AI data 1826 corresponding to 1838 may be determined. And in consideration of the video AI data 1822 applied to all frames along with the frame group AI data 1824 and the frame AI data 1826 , the AI setting unit 1333 AI upscales the low-resolution image of the frame 1838 . It is possible to obtain upscale DNN information for

서브 비트스트림(1810)의 AI 데이터(1820)는 메인 비트스트림(1830)의 영상 데이터(1831)보다 먼저 복호화될 수 있다. 따라서, AI 설정부(1333)는, AI 데이터(1820)에 따라, 업스케일 DNN 정보를 영상 데이터(1831)의 복호화 이전에 획득 할 수 있다. 상기 업스케일 DNN 정보는 비디오 전체에 대하여 적용될 수 있다.The AI data 1820 of the sub bitstream 1810 may be decoded before the image data 1831 of the main bitstream 1830 . Accordingly, the AI setting unit 1333 may acquire upscale DNN information before decoding the image data 1831 according to the AI data 1820 . The upscale DNN information may be applied to the entire video.

또는 프레임 그룹 단위의 적응적 AI 업스케일을 위하여, 프레임 그룹 마다 다른 업스케일 DNN 정보가 획득될 수 있다. 또는, 프레임 단위의 적응적 AI 업스케일을 위하여, 업스케일 DNN 정보는 프레임마다 다르게 미리 획득될 수 있다.Alternatively, for adaptive AI upscaling in units of frame groups, different upscale DNN information may be obtained for each frame group. Alternatively, for frame-by-frame adaptive AI upscaling, upscale DNN information may be obtained differently for each frame in advance.

AI 설정부(1333)는 서브 비트스트림(1810)의 AI 데이터(1820)를, 메인 비트스트림(1830)의 영상 데이터(1831)의 복호화 순서에 따라, 복호화할 수 있다.The AI setting unit 1333 may decode the AI data 1820 of the sub bitstream 1810 according to the decoding order of the image data 1831 of the main bitstream 1830 .

비디오 AI 데이터(1822)의 복호화는 비디오 헤더(1832)의 복호화 바로 이전 또는 이후에 수행될 수 있다. 또는 비디오 AI 데이터(1822)는 비디오 헤더(1832)와 병렬적으로 복호화될 수 있다. 비디오 AI 데이터(1822)를 비디오 헤더(1832)의 복호화 순서에 따라 복호화하기 위하여, 동기화 데이터(1815)가 참조될 수 있다.Decoding of the video AI data 1822 may be performed immediately before or after decoding of the video header 1832 . Alternatively, the video AI data 1822 may be decoded in parallel with the video header 1832 . In order to decode the video AI data 1822 according to the decoding order of the video header 1832 , the synchronization data 1815 may be referred to.

마찬가지로, AI 설정부(1333)는 프레임 그룹 AI 데이터(1824)의 복호화를, 제1 복호화부(1332)에 따른 프레임 그룹 헤더(1836)의 복호화 바로 이전 또는 이후에, 수행할 수 있다. 또는 AI 설정부(1333)는 프레임 그룹 AI 데이터(1824)를, 제1 복호화부(1332)에 따른 프레임 그룹 헤더(1836)의 복호화와 병렬적으로, 복호화할 수 있다. 프레임 그룹 AI 데이터(1824)를 프레임 그룹 헤더(1836)의 복호화 순서에 따라 복호화하기 위하여, 동기화 데이터(1815)가 참조될 수 있다.Similarly, the AI setting unit 1333 may perform decoding of the frame group AI data 1824 immediately before or after decoding of the frame group header 1836 according to the first decoding unit 1332 . Alternatively, the AI setting unit 1333 may decode the frame group AI data 1824 in parallel with the decoding of the frame group header 1836 according to the first decoding unit 1332 . In order to decode the frame group AI data 1824 according to the decoding order of the frame group header 1836, the synchronization data 1815 may be referred to.

그리고 AI 설정부(1333)는 프레임 AI 데이터(1826)의 복호화를, 제1 복호화부(1332)에 따른 프레임 헤더(1840)의 복호화 바로 이전 또는 이후에, 수행할 수 있다. 또는 프레임 AI 데이터(1826)는, 제1 복호화부(1232)에 따른 프레임 헤더(1840)의 복호화와 병렬적으로, 복호화될 수 있다. 프레임 AI 데이터(1826)를 프레임 헤더(1840)의 복호화 순서에 따라 복호화하기 위하여, 동기화 데이터(1815)가 참조될 수 있다.In addition, the AI setting unit 1333 may perform decoding of the frame AI data 1826 immediately before or after decoding of the frame header 1840 according to the first decoding unit 1332 . Alternatively, the frame AI data 1826 may be decoded in parallel with the decoding of the frame header 1840 according to the first decoding unit 1232 . In order to decode the frame AI data 1826 according to the decoding order of the frame header 1840 , the synchronization data 1815 may be referred to.

도 19는 단일 파일 내에서 AI 데이터와 영상 데이터가 분리되어 있는 경우의 AI 부호화 데이터의 일 실시 예를 도시한다. 도 19에서 AI 부호화 데이터는 소정 컨테이너 포맷의 비디오 파일(1900)에 포함된다. 상기 소정 컨테이너 포맷은 MP4, AVI, MKV, FLV 등일 수 있다.19 shows an embodiment of AI encoded data when AI data and image data are separated in a single file. In FIG. 19 , AI-encoded data is included in a video file 1900 of a predetermined container format. The predetermined container format may be MP4, AVI, MKV, FLV, or the like.

비디오 파일(1900)은 메타데이터 박스(1910)와 미디어데이터 박스(1930)로 구성된다. 메타데이터 박스(1910)에는 미디어데이터 박스(1930)에 포함된 미디어 데이터에 관한 정보가 포함된다. 예를 들어, 메타데이터 박스(1910)에는 미디어 데이터의 종류, 미디어 데이터의 부호화에 사용된 코덱의 종류 및 미디어의 재생 시간 등에 관한 정보가 포함될 수 있다.The video file 1900 is composed of a metadata box 1910 and a media data box 1930 . The metadata box 1910 includes information about media data included in the media data box 1930 . For example, the metadata box 1910 may include information on a type of media data, a type of a codec used for encoding the media data, a media playback time, and the like.

메타데이터 박스(1910)에는 동기화 데이터(1915) 및 AI 데이터(1920)가 포함될 수 있다. 동기화 데이터(1915) 및 AI 데이터(1920)는 소정 컨테이너 포맷에서 제공하는 부호화 방식에 따라 부호화되어, 메타데이터 박스(1910)에 저장된다. The metadata box 1910 may include synchronization data 1915 and AI data 1920 . The synchronization data 1915 and the AI data 1920 are encoded according to an encoding method provided by a predetermined container format and stored in the metadata box 1910 .

파싱부(1381)는 메타데이터 박스(1910)로부터 동기화 데이터(1915) 및 AI 데이터(1920)를 추출할 수 있다. 그리고 파싱부(1381)는 미디어데이터 박스(1930)로부터 영상 데이터(1931)를 추출할 수 있다. 파싱부(1381)는 동기화 데이터(1915)에 따라, 영상 데이터(1931)를 제1 복호화부(1332)에 전송하고, AI 데이터(1920)를 AI 설정부(1333)에 전송할 수 있다. 또는 파싱부(1381)는 동기화 데이터(1915)를 AI 업스케일부(1334) 또는 AI 설정부(1333)를 통해 AI 업스케일부(1334)에 전송하고, AI 업스케일부(1334)가, 동기화 데이터(1915)에 따라, 영상 데이터(1931)와 AI 데이터(1920)의 동기화를 할 수 있다.The parsing unit 1381 may extract the synchronization data 1915 and the AI data 1920 from the metadata box 1910 . In addition, the parsing unit 1381 may extract the image data 1931 from the media data box 1930 . The parsing unit 1381 may transmit the image data 1931 to the first decoder 1332 according to the synchronization data 1915 , and transmit the AI data 1920 to the AI setting unit 1333 . Alternatively, the parsing unit 1381 transmits the synchronization data 1915 to the AI upscaling unit 1334 through the AI upscaling unit 1334 or the AI setting unit 1333, and the AI upscaling unit 1334 synchronizes According to the data 1915 , the image data 1931 and the AI data 1920 may be synchronized.

AI 데이터(1920)는 비디오 AI 데이터(1922), 프레임 그룹 AI 데이터(1924) 및 프레임 AI 데이터(1926)을 포함한다. 비디오 AI 데이터(1922)는 비디오 헤더(1932)와, 프레임 그룹 AI 데이터(1924)는 프레임 그룹 헤더(1936)와, 프레임 AI 데이터(1926)는 프레임 헤더(1940)와 상응하도록 설정된다.AI data 1920 includes video AI data 1922 , frame group AI data 1924 , and frame AI data 1926 . The video AI data 1922 is set to correspond to the video header 1932 , the frame group AI data 1924 to the frame group header 1936 , and the frame AI data 1926 to the frame header 1940 .

실시 예에 따라, 비디오의 모든 프레임들에 동일한 업스케일 DNN 정보가 이용될 경우, AI 데이터(1920)에서 프레임 그룹 AI 데이터(1924)와 프레임 AI 데이터(1926)는 생략될 수 있다. 또는 업스케일 DNN 정보가 프레임 그룹 단위마다 적응적으로 획득되고, 프레임 그룹의 모든 프레임들에 동일한 업스케일 DNN 정보가 사용될 경우, AI 데이터(1920)에서 프레임 AI 데이터(1926)는 생략될 수 있다.According to an embodiment, when the same upscale DNN information is used for all frames of a video, the frame group AI data 1924 and the frame AI data 1926 may be omitted from the AI data 1920 . Alternatively, when the upscale DNN information is adaptively obtained for each frame group unit and the same upscale DNN information is used for all frames of the frame group, the frame AI data 1926 may be omitted from the AI data 1920 .

동기화 데이터(1915)는 비디오 AI 데이터(1922), 프레임 그룹 AI 데이터(1924) 및 프레임 AI 데이터(1926)와 비디오 헤더(1932), 프레임 그룹 헤더(1936), 프레임 헤더(1940)의 동기화에 관한 정보를 포함한다. 예를 들어, 동기화 데이터(1915)는 미디어데이터 박스(1930)의 영상 데이터(1931)의 재생 순서 정보 또는 복호화 순서 정보를 포함할 수 있다. 따라서 AI 설정부(1333)는, 동기화 데이터(1915)의 재생 순서 정보 또는 복호화 순서 정보에 따라 결정된 AI 데이터로부터, 저해상도 영상의 AI 업스케일에 필요한 업스케일 DNN 정보를 획득할 수 있고, AI 업스케일부(1334)로 전달할 수 있다.The synchronization data 1915 relates to the synchronization of the video AI data 1922, the frame group AI data 1924, and the frame AI data 1926 with the video header 1932, the frame group header 1936, and the frame header 1940. include information. For example, the synchronization data 1915 may include playback order information or decoding order information of the image data 1931 of the media data box 1930 . Accordingly, the AI setting unit 1333 may acquire the upscale DNN information required for AI upscaling of the low-resolution image from the AI data determined according to the playback order information or the decoding order information of the synchronization data 1915, and the AI upscaling It may pass to some 1334 .

예를 들어, 프레임(1938)의 저해상도 영상을 AI 업스케일하기 위하여, 파싱부(1381) 또는 AI 설정부(1281)는 동기화 데이터(1915)에 기초하여 프레임 그룹(1934)에 대응되는 프레임 그룹 AI 데이터(1924)와 프레임(1938)에 대응되는 프레임 AI 데이터(1926)를 결정할 수 있다. 그리고 프레임 그룹 AI 데이터(1924) 및 프레임 AI 데이터(1926)와 함께 모든 프레임에 적용되는 비디오 AI 데이터(1922)를 고려하여, AI 설정부(1281)는 프레임(1938)의 저해상도 영상의 AI 업스케일을 위한 업스케일 DNN 정보를 획득할 수 있다.For example, in order to AI upscale the low-resolution image of the frame 1938, the parsing unit 1381 or the AI setting unit 1281 sets the frame group AI corresponding to the frame group 1934 based on the synchronization data 1915. Frame AI data 1926 corresponding to the data 1924 and the frame 1938 may be determined. And in consideration of the video AI data 1922 applied to all frames together with the frame group AI data 1924 and the frame AI data 1926, the AI setting unit 1281 AI upscales the low-resolution image of the frame 1938. It is possible to obtain upscale DNN information for

메타데이터 박스(1910)의 AI 데이터(1920)는 미디어 데이터 박스(1930)의 영상 데이터(1931)보다 먼저 복호화될 수 있다. 따라서, AI 설정부(1383)는, AI 데이터(1920)에 따라, 업스케일 DNN 정보를 영상 데이터(1931)의 복호화 이전에 획득 할 수 있다. 상기 업스케일 DNN 정보는 비디오 전체에 대하여 적용될 수 있다. 또는 프레임 그룹 단위의 적응적 AI 업스케일을 위하여, 프레임 그룹 마다 다른 업스케일 DNN 정보가 획득될 수 있다. 또는, 프레임 단위의 적응적 AI 업스케일을 위하여, 업스케일 DNN 정보는 프레임마다 다르게 미리 획득될 수 있다.The AI data 1920 of the metadata box 1910 may be decoded earlier than the image data 1931 of the media data box 1930 . Accordingly, the AI setting unit 1383 may acquire upscale DNN information prior to decoding the image data 1931 according to the AI data 1920 . The upscale DNN information may be applied to the entire video. Alternatively, for adaptive AI upscaling in units of frame groups, different upscale DNN information may be obtained for each frame group. Alternatively, for frame-by-frame adaptive AI upscaling, upscale DNN information may be obtained differently for each frame in advance.

AI 설정부(1383)는, 메타데이터 박스(1910)의 AI 데이터(1920)를, 미디어 데이터 박스(1930)의 영상 데이터(1931)의 복호화 순서에 따라, 복호화할 수 있다. 비디오 AI 데이터(1922)의 복호화는 비디오 헤더(1932)의 복호화 바로 이전 또는 이후에 수행될 수 있다. 또는 비디오 AI 데이터(1922)는 비디오 헤더(1932)와 병렬적으로 복호화될 수 있다. 비디오 AI 데이터(1922)를 비디오 헤더(1932)의 복호화 순서에 따라 복호화하기 위하여, 동기화 데이터(1915)가 참조될 수 있다.The AI setting unit 1383 may decode the AI data 1920 of the metadata box 1910 according to the decoding order of the image data 1931 of the media data box 1930 . Decoding of the video AI data 1922 may be performed immediately before or after decoding of the video header 1932 . Alternatively, the video AI data 1922 may be decoded in parallel with the video header 1932 . In order to decode the video AI data 1922 according to the decoding order of the video header 1932 , the synchronization data 1915 may be referred to.

마찬가지로, AI 설정부(1383)는 프레임 그룹 AI 데이터(1924)의 복호화를, 제1 복호화부(1382)에 따른 프레임 그룹 헤더(1936)의 복호화 바로 이전 또는 이후에, 수행할 수 있다. 또는 AI 설정부(1383)는 프레임 그룹 AI 데이터(1924)를, 제1 복호화부(1382)에 따른 프레임 그룹 헤더(1936)의 복호화와 병렬적으로, 복호화할 수 있다. 프레임 그룹 AI 데이터(1924)를 프레임 그룹 헤더(1936)의 복호화 순서에 따라 복호화하기 위하여, 동기화 데이터(1915)가 참조될 수 있다. Similarly, the AI setting unit 1383 may perform decoding of the frame group AI data 1924 immediately before or after decoding of the frame group header 1936 according to the first decoding unit 1382 . Alternatively, the AI setting unit 1383 may decode the frame group AI data 1924 in parallel with the decoding of the frame group header 1936 according to the first decoding unit 1382 . In order to decode the frame group AI data 1924 according to the decoding order of the frame group header 1936, the synchronization data 1915 may be referred to.

그리고 AI 설정부(1383)는 프레임 AI 데이터(1926)의 복호화를, 제1 복호화부(1382)에 따른 프레임 헤더(1940)의 복호화 바로 이전 또는 이후에, 수행할 수 있다. 또는 AI 설정부(1383)는 프레임 AI 데이터(1926)는, 제1 복호화부(1382)에 따른 프레임 헤더(1940)의 복호화와 병렬적으로, 복호화될 수 있다. 프레임 AI 데이터(1926)를 프레임 헤더(1940)의 복호화 순서에 따라 복호화하기 위하여, 동기화 데이터(1915)가 참조될 수 있다.In addition, the AI setting unit 1383 may perform decoding of the frame AI data 1926 immediately before or after decoding of the frame header 1940 according to the first decoding unit 1382 . Alternatively, the AI setting unit 1383 may decode the frame AI data 1926 in parallel with the decoding of the frame header 1940 according to the first decoding unit 1382 . In order to decode the frame AI data 1926 according to the decoding order of the frame header 1940 , the synchronization data 1915 may be referred to.

도 19에서는 설명의 편의를 위하여, 비디오 파일(1900)에 하나의 메타데이터 박스(1910)와 하나의 미디어데이터 박스(1930)가 포함된 것으로 설명되었다. 그러나 비디오 파일(1900)은 2개 이상의 메타데이터 박스와 2개 이상의 미디어 데이터 박스를 포함할 수 있다. 따라서, 영상 데이터가 소정의 시간 단위로 분할된 2개 이상의 영상 데이터 세그먼트들이, 2개 이상의 미디어 데이터 박스에 저장될 수 있다. 그리고 상기 2개 이상의 미디어 데이터 박스에 저장된 영상 데이터 세그먼트들에 대한 정보가 2개 이상의 메타 데이터 박스에 포함될 수 있다. 또한 2개 이상의 메타데이터 박스는 각각 AI 데이터를 포함할 수 있다.In FIG. 19 , for convenience of description, it has been described that one metadata box 1910 and one media data box 1930 are included in the video file 1900 . However, the video file 1900 may include two or more metadata boxes and two or more media data boxes. Accordingly, two or more image data segments in which image data is divided into predetermined time units may be stored in two or more media data boxes. In addition, information on the image data segments stored in the two or more media data boxes may be included in the two or more meta data boxes. Also, two or more metadata boxes may each contain AI data.

도 20a는 AI 데이터가 영상 데이터에 삽입된 경우의 AI 부호화 데이터의 일 실시 예를 도시한다.20A illustrates an example of AI encoded data when AI data is inserted into image data.

비디오 파일(2000)은, 도 19의 비디오 파일(1900)과 마찬가지로, 메타데이터 박스(1902)와 미디어데이터 박스(1904)을 포함한다. AI 데이터가 영상 데이터에 삽입된 바, 메타데이터 박스(1902)는 AI 데이터를 포함하지 않는다. 대신 AI 데이터가 삽입된 영상 데이터가 미디어데이터 박스(1904)에 포함된다. AI 데이터는 영상 데이터의 비디오 코덱에 따라 부호화될 수 있다. 예를 들어, 상기 영상 데이터의 비디오 코덱은 H.264, HEVC, AVS2.0, Xvid 등일 수 있다.The video file 2000, like the video file 1900 of FIG. 19 , includes a metadata box 1902 and a media data box 1904 . Since AI data is inserted into the image data, the metadata box 1902 does not include AI data. Instead, image data into which AI data is inserted is included in the media data box 1904 . AI data may be encoded according to a video codec of image data. For example, the video codec of the image data may be H.264, HEVC, AVS2.0, Xvid, or the like.

따라서 파싱부(232)는 메타데이터 박스(2002)로부터 AI 데이터를 추출하지 않는다. 대신 제1 복호화부(234)는 영상 데이터(2005)로부터 AI 데이터를 추출하고, 추출된 AI 데이터를 AI 설정부(238)에 전달할 수 있다. 그리고 상기 AI 데이터에 의해 획득된 업스케일 DNN 정보에 기초하여, AI 업스케일부(236)는 제1 복호화부(234)에 의하여 복원된 저해상도 영상을 AI 업스케일 할 수 있다.Accordingly, the parsing unit 232 does not extract AI data from the metadata box 2002 . Instead, the first decoder 234 may extract AI data from the image data 2005 and transmit the extracted AI data to the AI setting unit 238 . And, based on the upscale DNN information obtained by the AI data, the AI upscaling unit 236 may AI upscale the low-resolution image restored by the first decoding unit 234 .

도 19의 비디오 파일(1900)과 다르게, AI 데이터가 영상 데이터(2005) 안에서 영상 데이터(2005)의 복호화 순서에 따라 삽입되어 있으므로, 비디오 파일(2000)은 동기화 데이터를 포함하지 않을 수 있다. 따라서, AI 데이터는 영상 데이터(2005)가 복호화됨에 따라, 순차적으로 복호화된다.Unlike the video file 1900 of FIG. 19 , since AI data is inserted in the image data 2005 according to the decoding order of the image data 2005 , the video file 2000 may not include synchronization data. Accordingly, the AI data is sequentially decoded as the image data 2005 is decoded.

비디오 AI 데이터(2008)는 비디오의 파라미터 정보를 포함하는 비디오 헤더(2006)의 바로 이후에 위치할 수 있다. 따라서 비디오 AI 데이터(2008)는 비디오 헤더(2006)에 포함된 비디오 파라미터들이 복호화된 후에 복호화될 수 있다. 실시 예에 따라, 도 16a와 다르게, 비디오 AI 데이터(2008)가 비디오 헤더(2006)의 바로 이전에 위치할 수 있다.The video AI data 2008 may be located immediately after the video header 2006 including parameter information of the video. Accordingly, the video AI data 2008 may be decoded after video parameters included in the video header 2006 are decoded. According to an embodiment, different from FIG. 16A , the video AI data 2008 may be located immediately before the video header 2006 .

프레임 그룹 AI 데이터(2014)는 프레임 그룹(2010)의 파라미터 정보를 포함하는 프레임 그룹 헤더(2012)의 바로 이후에 위치할 수 있다. 따라서 프레임 그룹 AI 데이터(2014)는 프레임 그룹 헤더(2012)에 포함된 프레임 그룹 파라미터들이 복호화된 후에 복호화될 수 있다. 실시 예에 따라, 도 20a와 다르게, 프레임 그룹 AI 데이터(2014)가 프레임 그룹 헤더(2012)의 바로 이전에 위치할 수 있다. 프레임 그룹(2010) 이후에 복호화되는 나머지 프레임 그룹들의 프레임 그룹 헤더와 프레임 그룹 AI 데이터의 복호화 순서도 프레임 그룹 헤더(2012)와 프레임 그룹 AI 데이터(2014)의 복호화 순서와 동일하게 결정될 수 있다. The frame group AI data 2014 may be located immediately after the frame group header 2012 including parameter information of the frame group 2010 . Accordingly, the frame group AI data 2014 may be decoded after the frame group parameters included in the frame group header 2012 are decoded. According to an embodiment, unlike FIG. 20A , the frame group AI data 2014 may be located immediately before the frame group header 2012 . The decoding order of the frame group header and frame group AI data of the remaining frame groups decoded after the frame group 2010 may be determined in the same manner as the decoding order of the frame group header 2012 and the frame group AI data 2014 .

프레임 AI 데이터(2020)는 프레임(2016)의 파라미터 정보를 포함하는 프레임 헤더(2018)의 바로 이후에 위치할 수 있다. 따라서 프레임 AI 데이터(2020)는 프레임 헤더(2018)에 포함된 프레임 그룹 파라미터들이 복호화된 후에 복호화될 수 있다. 실시 예에 따라, 도 20a와 다르게, 프레임 AI 데이터(2020)가 프레임 헤더(2018)의 바로 이전에 위치할 수 있다. 프레임 (2016) 이후에 복호화되는 나머지 프레임들의 프레임 헤더와 프레임 AI 데이터의 복호화 순서도 프레임 헤더(2018)와 프레임 AI 데이터(2020)의 복호화 순서와 동일하게 결정될 수 있다.The frame AI data 2020 may be located immediately after the frame header 2018 including the parameter information of the frame 2016 . Accordingly, the frame AI data 2020 may be decoded after the frame group parameters included in the frame header 2018 are decoded. According to an embodiment, different from FIG. 20A , the frame AI data 2020 may be located immediately before the frame header 2018 . The decoding order of the frame header and frame AI data of the remaining frames decoded after the frame 2016 may be determined in the same manner as the decoding order of the frame header 2018 and the frame AI data 2020 .

도 20b는 AI 데이터가 영상 데이터에 삽입된 경우의 AI 부호화 데이터의 다른 실시 예를 도시한다.20B illustrates another embodiment of AI encoded data when AI data is inserted into image data.

도 20a의 비디오 파일(2000)과 마찬가지로, 비디오 파일(2020)은 메타데이터 박스(2022)와 미디어데이터 박스(2024)을 포함한다. 그리고 메타데이터 박스(2022)는 AI 데이터를 포함하지 않고, 대신 AI 데이터가 삽입된 영상 데이터(2025)가 미디어데이터 박스(2024)에 포함된다. 다만 도 15a의 비디오 파일(2000)과 다르게, 비디오 파일(2020)에는 AI 데이터가 대응되는 데이터 헤더에 삽입된다.Like the video file 2000 of FIG. 20A , the video file 2020 includes a metadata box 2022 and a media data box 2024 . In addition, the metadata box 2022 does not include AI data, instead, image data 2025 into which AI data is inserted is included in the media data box 2024 . However, unlike the video file 2000 of FIG. 15A , AI data is inserted into the corresponding data header in the video file 2020 .

비디오 AI 데이터(2028)는 비디오의 파라미터 정보를 포함하는 비디오 헤더(2026)에 포함할 수 있다. 따라서 비디오 AI 데이터(2028)는 비디오 헤더(2026)에 포함된 비디오 파라미터들과 함께 복호화될 수 있다.The video AI data 2028 may be included in the video header 2026 including parameter information of the video. Accordingly, the video AI data 2028 may be decoded together with the video parameters included in the video header 2026 .

프레임 그룹 AI 데이터(2034)는 프레임 그룹(2030)의 파라미터 정보를 포함하는 프레임 그룹 헤더(2032)에 포함할 수 있다. 따라서 프레임 그룹 AI 데이터(2034)는 프레임 그룹 헤더(2032)에 포함된 프레임 그룹 파라미터들과 함께 복호화될 수 있다. 프레임 그룹(2030) 이후에 복호화되는 나머지 프레임 그룹들의 프레임 그룹 AI 데이터도 프레임 그룹 헤더에 포함될 수 있다.The frame group AI data 2034 may be included in the frame group header 2032 including parameter information of the frame group 2030 . Accordingly, the frame group AI data 2034 may be decoded together with the frame group parameters included in the frame group header 2032 . Frame group AI data of the remaining frame groups decoded after the frame group 2030 may also be included in the frame group header.

프레임 AI 데이터(2040)는 프레임(2036)의 파라미터 정보를 포함하는 프레임 헤더(2038)에 포함할 수 있다. 따라서 프레임 AI 데이터(2040)는 프레임 헤더(2038)에 포함된 프레임 그룹 파라미터들과 함께 복호화될 수 있다. The frame AI data 2040 may be included in a frame header 2038 including parameter information of the frame 2036 . Accordingly, the frame AI data 2040 may be decoded together with the frame group parameters included in the frame header 2038 .

프레임(2036) 이후에 복호화되는 나머지 프레임들의 프레임 AI 데이터도 프레임 헤더에 포함될 수 있다.Frame AI data of the remaining frames decoded after the frame 2036 may also be included in the frame header.

도 20c는 일부 AI 데이터가 영상 데이터에 삽입되고 나머지 AI 데이터는 영상 데이터와 분리된 경우의 AI 부호화 데이터의 일 실시 예를 도시한다.20C illustrates an embodiment of AI-encoded data when some AI data is inserted into image data and the remaining AI data is separated from image data.

도 20a의 비디오 파일(2000)과 마찬가지로, 비디오 파일(2050)은 메타데이터 박스(2052)와 미디어데이터 박스(2056)을 포함한다. 메타데이터 박스(2052)는 비디오의 모든 프레임에 적용되는 비디오 AI 데이터(2054)를 포함한다. 그리고 프레임 그룹 AI 데이터와 프레임 AI 데이터는 미디어데이터 박스(2056)의 영상 데이터에 포함된다.Like the video file 2000 of FIG. 20A , the video file 2050 includes a metadata box 2052 and a media data box 2056 . Metadata box 2052 contains video AI data 2054 that applies to every frame of the video. In addition, the frame group AI data and the frame AI data are included in the image data of the media data box 2056 .

도 20a의 비디오 AI 데이터(2008) 및 도 20b의 비디오 AI 데이터(2028)와 달리 메타데이터 박스(2052)에 포함된 비디오 AI 데이터(2054)는 영상 데이터의 복호화 이전에 복호화될 수 있다. 그리고 프레임 그룹 AI 데이터와 프레임 AI 데이터는 영상 데이터가 복호화됨에 따라, 순차적으로 복호화된다.Unlike the video AI data 2008 of FIG. 20A and the video AI data 2028 of FIG. 20B , the video AI data 2054 included in the metadata box 2052 may be decoded prior to decoding of the image data. In addition, the frame group AI data and the frame AI data are sequentially decoded as the image data is decoded.

따라서 파싱부(232)는 메타데이터 박스(2052)로부터 비디오 AI 데이터(2054)를 추출할 수 있다. 그리고 파싱부(232)는 비디오 AI 데이터(2054)를 AI 설정부(238)에 전송할 수 있다. 또한 파싱부(232)는 영상 데이터(2057)를 제1 복호화부(234)에 전송할 수 있다. 그리고 제1 복호화부(234)는, 영상 데이터(2057)를 복호화함으로써, 저해상도 영상을 복원하고, 프레임 그룹 AI 데이터(2064)와 프레임 AI 데이터(2070)를 추출할 수 있다. 또한 제1 복호화부(234)는 프레임 그룹 AI 데이터(2064)와 프레임 AI 데이터(2070)를 AI 설정부(238)에 전송할 수 있다. 그리고 AI 설정부(238)는 비디오 AI 데이터(2054), 프레임 그룹 AI 데이터(2064), 및 프레임 AI 데이터(2070)에 따라 저해상도 영상의 AI 업스케일을 위한 업스케일 DNN 정보를 획득할 수 있다.Accordingly, the parsing unit 232 may extract the video AI data 2054 from the metadata box 2052 . In addition, the parsing unit 232 may transmit the video AI data 2054 to the AI setting unit 238 . Also, the parser 232 may transmit the image data 2057 to the first decoder 234 . In addition, the first decoder 234 may reconstruct a low-resolution image by decoding the image data 2057 , and extract the frame group AI data 2064 and the frame AI data 2070 . Also, the first decoding unit 234 may transmit the frame group AI data 2064 and the frame AI data 2070 to the AI setting unit 238 . In addition, the AI setting unit 238 may acquire upscale DNN information for AI upscaling of a low-resolution image according to the video AI data 2054 , the frame group AI data 2064 , and the frame AI data 2070 .

프레임 그룹 AI 데이터(2064)는 프레임 그룹(2060)의 파라미터 정보를 포함하는 프레임 그룹 헤더(2062)의 바로 이후에 위치할 수 있다. 그러나 실시 예에 따라, 프레임 그룹 AI 데이터(2064)는 프레임 그룹 헤더(2062)의 바로 이전에 위치할 수 있다. 또한 프레임 그룹 AI 데이터(2064)는 프레임 그룹 헤더(2062)에 포함될 수 있다.The frame group AI data 2064 may be located immediately after the frame group header 2062 including parameter information of the frame group 2060 . However, according to an embodiment, the frame group AI data 2064 may be located immediately before the frame group header 2062 . Also, the frame group AI data 2064 may be included in the frame group header 2062 .

프레임 AI 데이터(2070)는 프레임(2066)의 파라미터 정보를 포함하는 프레임 헤더(2068)의 바로 이후에 위치할 수 있다. 그러나 실시 예에 따라, 프레임 AI 데이터(2070)가 프레임 헤더(2068)의 바로 이전에 위치할 수 있다. 또한 프레임 AI 데이터(2070)는 프레임 헤더(2068)에 포함될 수 있다.The frame AI data 2070 may be located immediately after the frame header 2068 including parameter information of the frame 2066 . However, according to an embodiment, the frame AI data 2070 may be located immediately before the frame header 2068 . Also, the frame AI data 2070 may be included in the frame header 2068 .

도 20c에서는, 비디오 AI 데이터(2054)만 메타데이터 박스(2052)에 포함된다고 표현되었으나, 프레임 그룹 AI 데이터가 추가적으로 메타데이터 박스(2052)에 포함될 수 있다. 또는 프레임 그룹 AI 데이터의 일부가 메타데이터 박스(2052)에 포함될 수 있다. 또는 프레임 AI 데이터의 일부가 메타데이터 박스(2052)에 포함될 수 있다.In FIG. 20C , it is expressed that only the video AI data 2054 is included in the metadata box 2052 , but frame group AI data may be additionally included in the metadata box 2052 . Alternatively, a part of the frame group AI data may be included in the metadata box 2052 . Alternatively, a part of the frame AI data may be included in the metadata box 2052 .

도 20a 및 20c에서 미디어데이터 박스에 삽입된 프레임 그룹 AI 데이터(2014, 2064) 및 프레임 AI 데이터(2020, 2070)는 SEI (Supplementary Enhancement Information) 메시지의 형태로 삽입될 수 있다. SEI 메시지는 영상의 복호화에 반드시 필요하지 않은 영상에 관한 부가 정보가 포함되는 데이터 유닛이다. SEI 메시지는 프레임 그룹 단위 또는 프레임 단위로 전송될 수 있다. 리고 SEI 메시지는 파싱부(232)에서 추출되어 AI 설정부(238)로 전달될 수 있다.The frame group AI data 2014 and 2064 and the frame AI data 2020 and 2070 inserted into the media data box in FIGS. 20A and 20C may be inserted in the form of a Supplementary Enhancement Information (SEI) message. The SEI message is a data unit including additional information about an image that is not essential for decoding of the image. The SEI message may be transmitted in units of frame groups or frames. And the SEI message may be extracted from the parsing unit 232 and delivered to the AI setting unit 238 .

도 21은 도 19와 같이 AI 데이터와 영상 데이터가 분리된 경우, 비디오 세그먼트 단위로 분할된 AI 부호화 데이터의 일 실시 예를 도시한다.21 illustrates an embodiment of AI encoded data divided into video segment units when AI data and image data are separated as shown in FIG. 19 .

AI 데이터를 비롯한 메타 데이터의 크기가 크거나, 영상 데이터가 통신 채널을 통해 라이브 스트리밍되는 경우, AI 데이터를 비롯한 메타 데이터의 처리에 필요한 오버헤드를 줄이기 위하여, AI 부호화 데이터가 비디오 세그먼트 단위로 분할되어 비디오 파일(2100)에 저장될 수 있다. 비디오 세그먼트는 비디오의 일부분으로, 소정의 시간동안의 프레임을 포함한다. 예를 들어, 비디오 세그먼트는 1개 이상의 프레임 그룹만 포함할 수 있다. 만약, 비디오 세그먼트가 1개의 프레임 그룹을 포함할 경우, 비디오 파일(2100)은 영상 데이터의 프레임 그룹의 개수만큼의 비디오 세그먼트들을 포함할 수 있다.When the size of metadata including AI data is large or when video data is live streamed through a communication channel, in order to reduce the overhead required for processing metadata including AI data, AI-encoded data is divided into video segments. It may be stored in the video file 2100 . A video segment is a portion of a video and includes frames for a predetermined period of time. For example, a video segment may contain only one or more groups of frames. If the video segment includes one frame group, the video file 2100 may include as many video segments as the number of frame groups of image data.

비디오 세그먼트는 각각 메타데이터 박스와 미디어데이터 박스를 포함할 수 있다. AI 데이터를 비롯한 메타데이터가 복수의 비디오 세그먼트에 분할되어 저장된다. 따라서, AI 데이터가 영상 데이터 전체에 대한 메타데이터 박스(2110)뿐만 아니라, 비디오 세그먼트들에 대한 메타데이터 박스들에 분할되어 저장된다. 그러므로, 영상 데이터의 특정 부분을 저해상도 영상을 AI 업스케일할 때, 영상 데이터 전체에 대한 메타데이터 박스(2110)에 모든 AI 데이터가 저장된 경우에 비하여, AI 데이터가 상기 메타데이터 박스(2110)를 비롯하여 비디오 세그먼트들에 대한 메타데이터 박스들에 분산되어 저장된 경우, 더 빠르게 상기 특정 부분에 적합한 업스케일 DNN 정보를 획득하기 위한 AI 데이터가 획득될 수 있다.Each video segment may include a metadata box and a media data box. Metadata including AI data is divided and stored in a plurality of video segments. Accordingly, AI data is divided and stored in metadata boxes for video segments as well as the metadata box 2110 for the entire image data. Therefore, when AI upscaling a low-resolution image of a specific part of image data, AI data includes the metadata box 2110 as compared to a case where all AI data is stored in the metadata box 2110 for the entire image data. When distributed and stored in metadata boxes for video segments, AI data for obtaining upscale DNN information suitable for the specific part may be obtained faster.

예를 들어, 현재 비디오 세그먼트부터 재생이 될 때, 현재 비디오 세그먼트의 저해상도 영상의 AI 업스케일을 위하여, 메타데이터 박스(2110)의 비디오 AI 데이터(2112)와 현재 비디오 세그먼트 데이터 박스(2120)의 세그먼트 메타데이터 박스(2130)의 AI 데이터만 참조된다. 그리고 다른 비디오 세그먼트들의 메타데이터 박스들의 AI 데이터는 참조되지 않는다. 따라서, AI 데이터의 복호화에 따른 오버헤드가 감소할 수 있다.For example, when playing from the current video segment, for AI upscaling of the low-resolution image of the current video segment, the video AI data 2112 of the metadata box 2110 and the segment of the current video segment data box 2120 Only AI data in the metadata box 2130 is referenced. And AI data of metadata boxes of other video segments are not referenced. Accordingly, overhead according to the decoding of AI data may be reduced.

또한, 영상 데이터가 라이브 스트리밍되는 경우, AI 데이터가 최초 재생시에 한 번에 전송되지 않고, 비디오 세그먼트 단위로 분산되어 전송될 수 있다. 따라서, AI 데이터가 분산되어 순차적으로 전송됨으로써, AI 데이터의 복호화에 따른 오버헤드가 감소할 수 있다. 그러므로 비디오 세그먼트 단위로 분할하여 전송하는 것이 유리할 수 있다.Also, when video data is live-streamed, AI data may not be transmitted all at once during initial playback, but may be transmitted in a distributed manner in units of video segments. Accordingly, since the AI data is distributed and transmitted sequentially, the overhead according to the decoding of the AI data can be reduced. Therefore, it may be advantageous to divide and transmit the video segment unit.

도 21에서, 전체 영상 데이터에 대한 메타데이터 박스(2110)는 비디오 AI 데이터(2112)를 포함한다. 비디오 AI 데이터(2112)는 비디오에 포함된 모든 비디오 세그먼트들에 적용된다. 메타데이터 박스(2110)는 현재 비디오 세그먼트 데이터 박스(2120)보다 먼저 복호화될 수 있다.In FIG. 21 , the metadata box 2110 for the entire image data includes video AI data 2112 . Video AI data 2112 is applied to all video segments included in the video. The metadata box 2110 may be decoded earlier than the current video segment data box 2120 .

현재 비디오 세그먼트 데이터 박스(2120)는 세그먼트 메타데이터 박스(2130)와 세그먼트 미디어데이터 박스(2140)를 포함한다. 세그먼트 메타데이터 박스(2130)는 동기화 데이터(2131)와 AI 데이터(2132)를 포함할 수 있다. 그리고 세그먼트 미디어데이터 박스(2140)는 비디오 세그먼트 데이터(2141)을 포함한다.The current video segment data box 2120 includes a segment metadata box 2130 and a segment media data box 2140 . The segment metadata box 2130 may include synchronization data 2131 and AI data 2132 . And the segment media data box 2140 includes video segment data 2141 .

현재 비디오 세그먼트 데이터 박스(2120)의 AI 데이터(2132)는 비디오 세그먼트 AI 데이터(2134), 프레임 그룹 AI 데이터(2136) 및 프레임 AI 데이터(2138)를 포함할 수 있다. 비디오 세그먼트 AI 데이터(2134)는 현재 비디오 세그먼트에 포함된 모든 프레임 그룹들에 적용된다. 그리고 프레임 그룹 AI 데이터(2136) 현재 프레임 그룹에 포함된 모든 프레임들에 적용된다. 프레임 AI 데이터(2138)는 현재 프레임에 적용된다.AI data 2132 of current video segment data box 2120 may include video segment AI data 2134 , frame group AI data 2136 , and frame AI data 2138 . The video segment AI data 2134 is applied to all frame groups included in the current video segment. And the frame group AI data 2136 is applied to all frames included in the current frame group. Frame AI data 2138 is applied to the current frame.

실시 예에 따라, 비디오 세그먼트의 모든 프레임들에 동일한 업스케일 DNN 정보가 이용될 경우, 현재 비디오 세그먼트 데이터 박스(2120)의 AI 데이터(2132)에서 프레임 그룹 AI 데이터(2136)와 프레임 AI 데이터(2138)는 생략될 수 있다. 또는 업스케일 DNN 정보가 프레임 그룹 단위마다 적응적으로 결정되고, 프레임 그룹의 모든 프레임들에 동일한 업스케일 DNN 정보가 사용될 경우, 현재 비디오 세그먼트 데이터 박스(2120)의 AI 데이터(2132)에서 프레임 AI 데이터(2138)는 생략될 수 있다.According to an embodiment, when the same upscale DNN information is used for all frames of a video segment, the frame group AI data 2136 and the frame AI data 2138 in the AI data 2132 of the current video segment data box 2120 ) can be omitted. Alternatively, when upscale DNN information is adaptively determined for each frame group and the same upscale DNN information is used for all frames of a frame group, frame AI data from AI data 2132 of the current video segment data box 2120 (2138) may be omitted.

실시 예에 따라, 비디오 세그먼트가 하나의 프레임 그룹만 포함할 경우, 현재 비디오 세그먼트 데이터 박스(2120)의 AI 데이터(2132)에서 비디오 세그먼트 AI 데이터(2134)는 생략될 수 있다. 그리고 프레임 그룹 AI 데이터(2136)가 비디오 세그먼트 AI 데이터(2134)의 역할을 수행할 수 있다. 또는 비디오 세그먼트가 하나의 프레임 그룹만 포함하고, 프레임 그룹의 모든 프레임들에 동일한 업스케일 DNN 정보가 사용될 경우, 현재 비디오 세그먼트 데이터 박스(2120)의 AI 데이터(2132)에서 비디오 세그먼트 AI 데이터(2134)와 프레임 AI 데이터(2138)는 생략될 수 있다. 그리고 프레임 그룹 AI 데이터(2136)에 따른 업스케일 DNN 정보에 기초하여, 비디오 세그먼트의 모든 프레임에 AI 업스케일이 적용될 수 있다. 동기화 데이터(2131)는 비디오 세그먼트 AI 데이터(2134), 프레임 그룹 AI 데이터(2136) 및 프레임 AI 데이터(2138)와 비디오 세그먼트 헤더(2142), 프레임 그룹 헤더(2146), 프레임 헤더(2148)의 동기화에 관한 정보를 포함한다. 비디오 세그먼트 헤더(2142)는 비디오 세그먼트에 포함된 프레임들에 공통적으로 적용되는 비디오 세그먼트 파라미터를 포함한다. 예를 들어, 동기화 데이터(2131)는 세그먼트 미디어데이터 박스(2140)의 비디오 세그먼트 데이터(2141)의 재생 순서 정보 또는 복호화 순서 정보를 포함할 수 있다. 따라서 AI 설정부(238)는, 동기화 데이터(2131)에 따라 결정된 AI 데이터로부터, 저해상도 영상의 AI 업스케일에 필요한 업스케일 DNN 정보를 획득할 수 있다.According to an embodiment, when the video segment includes only one frame group, the video segment AI data 2134 may be omitted from the AI data 2132 of the current video segment data box 2120 . In addition, the frame group AI data 2136 may serve as the video segment AI data 2134 . Alternatively, when the video segment includes only one frame group and the same upscale DNN information is used for all frames of the frame group, the video segment AI data 2134 in the AI data 2132 of the current video segment data box 2120 and frame AI data 2138 may be omitted. And based on the upscale DNN information according to the frame group AI data 2136, AI upscaling may be applied to all frames of the video segment. The synchronization data 2131 includes the video segment AI data 2134 , the frame group AI data 2136 , and the frame AI data 2138 and the video segment header 2142 , the frame group header 2146 , and the frame header 2148 . includes information about The video segment header 2142 includes video segment parameters commonly applied to frames included in the video segment. For example, the synchronization data 2131 may include playback order information or decoding order information of the video segment data 2141 of the segment media data box 2140 . Accordingly, the AI setting unit 238 may acquire upscale DNN information required for AI upscaling of a low-resolution image from the AI data determined according to the synchronization data 2131 .

예를 들어, 프레임(2149)의 저해상도 영상을 AI 업스케일하기 위하여, 파싱부(232) 또는 AI 설정부(238)는 동기화 데이터(2131)에 기초하여 프레임 그룹(2144)에 대응되는 프레임 그룹 AI 데이터(2136)와 프레임(2149)에 대응되는 프레임 AI 데이터(2136)를 획득할 수 있다. 그리고 프레임 그룹 AI 데이터(2136) 및 프레임 AI 데이터(2138)와 함께 모든 프레임에 적용되는 비디오 세그먼트 AI 데이터(2134)를 고려하여, AI 설정부(238)는 프레임(2149)의 저해상도 영상의 AI 업스케일을 위한 업스케일 DNN 정보를 획득할 수 있다.For example, in order to AI upscale the low-resolution image of the frame 2149 , the parsing unit 232 or the AI setting unit 238 may set the frame group AI corresponding to the frame group 2144 based on the synchronization data 2131 . The data 2136 and the frame AI data 2136 corresponding to the frame 2149 may be acquired. And in consideration of the video segment AI data 2134 applied to all frames together with the frame group AI data 2136 and the frame AI data 2138 , the AI setting unit 238 raises the AI of the low-resolution image of the frame 2149 . Upscale DNN information for scale can be obtained.

일 실시 예에 따라, 세그먼트 메타데이터 박스(2130)의 AI 데이터(2132)는 세그먼트 미디어데이터 박스(2140)의 비디오 세그먼트 데이터(2141)보다 먼저 복호화될 수 있다. 따라서, AI 설정부(238)는, AI 데이터(2132)에 따라, 업스케일 DNN 정보를 비디오 세그먼트 데이터(2141)의 복호화 이전에 획득할 수 있다. 상기 획득된 업스케일 DNN 정보는 비디오 세그먼트 전체에 대하여 적용될 수 있다. 또는 프레임 그룹 단위의 적응적 AI 업스케일을 위하여, 업스케일 DNN 정보는 프레임 그룹 마다 다르게 미리 획득될 수 있다. 또는, 프레임 단위의 적응적 AI 업스케일을 위하여, 업스케일 DNN 정보는 프레임마다 다르게 미리 획득될 수 있다.According to an embodiment, the AI data 2132 of the segment metadata box 2130 may be decoded earlier than the video segment data 2141 of the segment media data box 2140 . Accordingly, the AI setting unit 238 may acquire upscale DNN information before decoding the video segment data 2141 according to the AI data 2132 . The obtained upscale DNN information may be applied to the entire video segment. Alternatively, for adaptive AI upscaling in units of frame groups, upscale DNN information may be differently obtained in advance for each frame group. Alternatively, for frame-by-frame adaptive AI upscaling, upscale DNN information may be obtained differently for each frame in advance.

일 실시 예에 따라, AI 설정부(238)는 세그먼트 메타데이터 박스(2130)의 AI 데이터(2132)를, 세그먼트 미디어데이터 박스(2140)의 비디오 세그먼트 데이터(2141)의 복호화 순서에 따라, 복호화할 수 있다. 예를 들어, AI 설정부(238)는 프레임 그룹 AI 데이터(2136)의 복호화를, 제1 복호화부(234)에 따른 프레임 그룹 헤더(2146)의 복호화 순서에 따라, 수행할 수 있다. 그리고 AI 설정부(238)는 프레임 AI 데이터(2138)의 복호화를, 제1 복호화부(234)에 따른 프레임 헤더(2148)의 복호화 순서에 따라, 수행할 수 있다. 동기화 데이터(2131)를 참조하여, 비디오 세그먼트 AI 데이터(2134), 프레임 그룹 AI 데이터(2136) 및 프레임 AI 데이터(2138)의 복호화 순서와 비디오 세그먼트 헤더(2142), 프레임 그룹 헤더(2146), 프레임 헤더(2148)의 복호화 순서가 동기화될 수 있다.According to an embodiment, the AI setting unit 238 decodes the AI data 2132 of the segment metadata box 2130 according to the decoding order of the video segment data 2141 of the segment media data box 2140. can For example, the AI setting unit 238 may decode the frame group AI data 2136 according to the decoding order of the frame group header 2146 according to the first decoding unit 234 . The AI setting unit 238 may decode the frame AI data 2138 according to the decoding order of the frame header 2148 according to the first decoding unit 234 . With reference to the synchronization data 2131, the decoding order of the video segment AI data 2134, the frame group AI data 2136, and the frame AI data 2138 and the video segment header 2142, the frame group header 2146, the frame The decoding order of the header 2148 may be synchronized.

현재 비디오 세그먼트 데이터 박스(2120) 이후의 나머지 비디오 세그먼트 데이터 박스들도 순차적으로 현재 비디오 세그먼트 데이터 박스(2120)와 동일한 방법으로 복호화될 수 있다.The remaining video segment data boxes after the current video segment data box 2120 may also be sequentially decoded in the same manner as the current video segment data box 2120 .

도 22는 2개의 별도 파일로 전송되는 AI 데이터(2240)와 영상 데이터(200)의 일 실시 예를 도시한다.22 illustrates an embodiment of AI data 2240 and image data 200 transmitted as two separate files.

AI 데이터(2240)가 수신부(210)에서 수신되지 않은 경우, 영상 데이터(2200)로부터 획득된 저해상도 영상은 AI 업스케일되지 않는다. 만약 AI 데이터(2240)가 수신부(210)에서 수신된 경우, AI 설정부(238)에 전송된 AI 데이터(220)에 따라 저해상도 영상의 AI 업스케일에 필요한 업스케일 DNN 정보가 획득된다.When the AI data 2240 is not received by the receiver 210 , the low resolution image obtained from the image data 2200 is not AI upscaled. If the AI data 2240 is received by the receiving unit 210 , upscale DNN information necessary for AI upscaling of the low resolution image is obtained according to the AI data 220 transmitted to the AI setting unit 238 .

영상 데이터(2200)는 비디오 헤더(2210), 프레임 그룹(2220)의 프레임 그룹 헤더(2222) 및 프레임(2230)의 프레임 헤더(2232)를 포함할 수 있다. 그리고 AI 데이터(2240)는 비디오 AI 데이터(2242), 프레임 그룹 AI 데이터(2250), 프레임 AI 데이터(2260)을 포함할 수 있다. 영상 데이터(2200)와 AI 데이터(2240)는 별개의 파일로 전송되므로, 영상 데이터(2200) 및/또는 AI 데이터(2240)는 영상 데이터(2200)와 AI 데이터(2240)의 동기화에 필요한 동기화 데이터를 포함할 수 있다. 동기화 데이터는 영상 데이터(2200)의 복호화 순서 또는 재생 순서를 나타낼 수 있다. The image data 2200 may include a video header 2210 , a frame group header 2222 of a frame group 2220 , and a frame header 2232 of a frame 2230 . The AI data 2240 may include video AI data 2242 , frame group AI data 2250 , and frame AI data 2260 . Since the image data 2200 and the AI data 2240 are transmitted as separate files, the image data 2200 and/or the AI data 2240 are synchronization data required for the synchronization of the image data 2200 and the AI data 2240 . may include The synchronization data may indicate a decoding order or a reproduction order of the image data 2200 .

파싱부(232) 또는 AI 설정부(238)는 동기화 데이터에 따라 비디오 AI 데이터(2242), 프레임 그룹 AI 데이터(2250), 프레임 AI 데이터(2260)의 재생 순서 또는 복호화 순서가 비디오 헤더(2210), 프레임 그룹 헤더(2222) 및 프레임 헤더(2232)의 재생 순서 또는 복호화 순서와 일치하도록 설정할 수 있다. 도 22의 비디오 AI 데이터(2242)와 비디오 헤더(2210) 간의 점선, 프레임 그룹 AI 데이터(2250)와 프레임 그룹 헤더(2222) 간의 점선, 및 프레임 AI 데이터(2260)와 프레임 헤더(2232) 간의 점선은 AI 데이터와 데이터 헤더 간의 동기화를 나타낸다.The parsing unit 232 or the AI setting unit 238 sets the playback order or decoding order of the video AI data 2242, the frame group AI data 2250, and the frame AI data 2260 according to the synchronization data to the video header 2210. , may be set to match the playback order or decoding order of the frame group header 2222 and the frame header 2232 . A dotted line between the video AI data 2242 and the video header 2210 of FIG. 22 , a dotted line between the frame group AI data 2250 and the frame group header 2222 , and a dotted line between the frame AI data 2260 and the frame header 2232 . represents the synchronization between AI data and data header.

영상 데이터(2200)와 AI 데이터(2240)에 두 데이터의 매칭을 위한 식별번호가 포함될 수 있다. 예를 들어, AI 데이터(2240)는 AI 데이터(2240)가 적용되는 영상 데이터(2200)의 식별번호를 포함할 수 있다. 반대로, 영상 데이터(2200)가 영상 데이터(2200)에 적용되는 AI 데이터(2240)의 식별 번호를 포함할 수 있다. 또는 영상 데이터(2200)와 AI 데이터(2240)에 모두 식별번호가 포함될 수 있다. 따라서, 영상 데이터(2200)와 AI 데이터(2240)가 동시에 전송되지 않은 경우에도, 영상 데이터(2200)와 AI 데이터(2240)는 식별 번호에 따라 서로 매칭될 수 있다.The image data 2200 and the AI data 2240 may include an identification number for matching the two data. For example, the AI data 2240 may include an identification number of the image data 2200 to which the AI data 2240 is applied. Conversely, the image data 2200 may include an identification number of the AI data 2240 applied to the image data 2200 . Alternatively, the identification number may be included in both the image data 2200 and the AI data 2240 . Accordingly, even when the image data 2200 and the AI data 2240 are not transmitted at the same time, the image data 2200 and the AI data 2240 may be matched with each other according to the identification number.

실시 예에 따라, 프레임 그룹 단위로 업스케일 DNN 정보가획득되는 경우, AI 데이터(2240)에서 프레임 AI 데이터(2260)는 생략될 수 있다. 그리고 비디오의 모든 프레임에 동일한 업데이트 DNN 정보가 사용되는 경우, AI 데이터(2240)에서 프레임 그룹 AI 데이터(2250) 및 프레임 AI 데이터(2260)는 생략될 수 있다.According to an embodiment, when upscale DNN information is acquired in units of frame groups, the frame AI data 2260 may be omitted from the AI data 2240 . In addition, when the same update DNN information is used for all frames of the video, the frame group AI data 2250 and the frame AI data 2260 may be omitted from the AI data 2240 .

도 23은 일 실시예에 따른 SEI 메시지의 구조를 도시한 도면이다.23 is a diagram illustrating a structure of an SEI message according to an embodiment.

도 23을 참조하면, 먼저 SEI 메시지는 itu_t_t35_country_code(2305)을 포함할 수 있다. itu_t_t35_country_code(2305)는 ITU-T T.35 표준의 Annex A 에 의해 국가 코드(country code)로 특정된 byte를 의미할 수 있다. 예를 들어, 그 값은 0xB5일 수 있고, 이는 ITU-T T.35 표준의 Annex A 에 의해 특정된 미국 국가 코드일 수 있다.Referring to FIG. 23 , first, the SEI message may include itu_t_t35_country_code 2305 . The itu_t_t35_country_code 2305 may mean a byte specified as a country code by Annex A of the ITU-T T.35 standard. For example, the value may be 0xB5, which may be the US country code specified by Annex A of the ITU-T T.35 standard.

그 다음으로, SEI 메시지는 itu_t_t35_terminal_provider_code(2310)를 포함할 수 있다. itu_t_t35_terminal_provider_code(2310)는 ITU-T T.35 표준에 의해 특정된 단말 제공자(terminal provider) 또는 기업체(entity)의 코드를 특정한 16bit(2btye)의 필드일 수 있다. 예를 들어, 그 값은 0x003C일 수 있고, 이는 S 사를 나타내는 코드일 수 있다.Next, the SEI message may include itu_t_t35_terminal_provider_code 2310 . The itu_t_t35_terminal_provider_code 2310 may be a 16-bit (2btye) field that specifies a code of a terminal provider or entity specified by the ITU-T T.35 standard. For example, the value may be 0x003C, which may be a code representing S company.

그 다음으로, SEI 메시지는 itu_t_t35_terminal_provider_oriented_code(2315)를 포함할 수 있다. itu_t_t35_terminal_provider_oriented_code는 ITU-T T.35 표준에 의해 특정된 단말 제공자(terminal provider) 또는 기업체(entity)가 정의한 코드를 의미한다. 예를 들어, 그 값은 0x0002일 수 있고, 이는 S사가 정의한 AI 코덱(Codec)을 나타낼 수 있다.Next, the SEI message may include itu_t_t35_terminal_provider_oriented_code 2315 . itu_t_t35_terminal_provider_oriented_code means a code defined by a terminal provider or entity specified by the ITU-T T.35 standard. For example, the value may be 0x0002, which may indicate an AI codec (Codec) defined by S company.

그 다음으로, SEI 메시지는 application_identifier(2320)를 포함할 수 있다. application_identifier는 HDR(High Dynamic Range) 의 동작 메타데이터(Dynamic Metadata)를 정의하는 표준인 ST-2094의 다양한 어플리케이션 방식 중 하나의 어플리케이션 방식을 나타내는 식별자일 수 있다. 이때, 그 값은 0x0004일 수 있고, 이는 ST 2094-40 표준의 S사 어플리케이션 방식을 나타낼 수 있다.Next, the SEI message may include application_identifier 2320 . application_identifier may be an identifier indicating one application method among various application methods of ST-2094, which is a standard for defining dynamic metadata of high dynamic range (HDR). In this case, the value may be 0x0004, which may indicate the S company application method of the ST 2094-40 standard.

그 다음으로, SEI 메시지는 소정의 신택스 엘리먼트 형태로 AI 데이터를 포함할 수 있다. 예를 들어, SEI 메시지는 application_version(2325)을 포함할 수 있다. application_version(2325)은 영상의 장르를 의미할 수 있다. 예를 들어, 그 값이 0x0001인 경우, 영상의 장르가 일반 영상임을 나타낼 수 있다.Next, the SEI message may include AI data in the form of a predetermined syntax element. For example, the SEI message may include application_version 2325 . application_version 2325 may mean a genre of an image. For example, when the value is 0x0001, it may indicate that the genre of the image is a general image.

그 다음으로, SEI 메시지는 aid_flag(2330)를 포함할 수 있다. aid_flag(2330)는 영상에 AI 다운스케일이 적용되었는지 여부 및 AI 업스케일을 수행하는지 여부를 나타낼 수 있다. 예를 들어, 그 값이 0X0001일 수 있고, 이는 영상에 AI 다운스케일이 적용되었고, 따라서, AI 업스케일을 수행함을 나타낼 수 있다.Next, the SEI message may include aid_flag 2330 . aid_flag 2330 may indicate whether AI downscaling is applied to an image and whether AI upscaling is performed. For example, the value may be 0X0001, which may indicate that AI downscaling has been applied to the image, and thus performing AI upscaling.

그 다음으로, SEI 메시지는 aid_average_qp(2335)을 포함할 수 있다. aid_average_qp(2335)는 영상에서 적용된(즉, 원본 영상의 제1 부호화시에 적용된) 양자화 파라메터의 평균으로, 그 값은 0x1F일 수 있고, 이는 영상에서 적용된 양자화 파라메터의 평균이 31임을 나타낼 수 있다.Next, the SEI message may include aid_average_qp 2335 . aid_average_qp 2335 is the average of the quantization parameters applied to the image (that is, applied during the first encoding of the original image), and the value may be 0x1F, which may indicate that the average of the quantization parameters applied to the image is 31.

그 다음으로, SEI 메시지는 aid_qp_selection(2340)을 포함할 수 있다. aid_qp_selection(2340)은 영상의 적어도 일부의 양자화 정도(degree)(또는 레벨)를 나타내는 지시자 정보로 인덱스 형태의 정보일 수 있다. 예를 들어, 그 값은 0x0000일 수 있다. aid_qp_selection(2340)에 대한 설명은 도 21을 참조하여 후술하도록 하겠다.Next, the SEI message may include aid_qp_selection 2340 . aid_qp_selection 2340 is indicator information indicating a quantization degree (or level) of at least a part of an image, and may be information in the form of an index. For example, the value may be 0x0000. A description of aid_qp_selection 2340 will be described later with reference to FIG. 21 .

그 다음으로, SEI 메시지는 aid_multiplication(2345)을 포함할 수 있다. aid_multiplication(2345)은 원본 영상과 제1 영상 간의 비율(또는 배수)을 나타내는 정보로, 복수의 원본 영상과 제1 영상 간의 비율(또는 배수) 중 하나를 나타내는 플래그 또는 인덱스 형태의 정보일 수 있다. 예를 들어, 그 값은 0x0000일 수 있고, 원본 영상과 제1 영상 간의 비율이 2x임을 나타낼 수 있다.Next, the SEI message may include aid_multiplication 2345 . aid_multiplication 2345 is information indicating the ratio (or multiple) between the original image and the first image, and may be information in the form of a flag or an index indicating one of the ratios (or multiples) between a plurality of original images and the first image. For example, the value may be 0x0000, and may indicate that the ratio between the original image and the first image is 2x.

그 다음으로, SEI 메시지는 aid_codec_information(2350)을 포함할 수 있다. aid_codec_information(2350)은 영상의 제1 부호화에 이용된 소정의 코덱을 나타내는 정보로, 인덱스 형태의 정보일 수 있다. 예를 들어, 그 값이 0x0000일 수 있고, 이는 H.264 코덱을 나타낼 수 있다.Next, the SEI message may include aid_codec_information 2350 . aid_codec_information 2350 is information indicating a predetermined codec used for the first encoding of an image, and may be information in the form of an index. For example, the value may be 0x0000, which may indicate the H.264 codec.

그 다음으로, SEI 메시지는 aid_resolution_information(2355)을 포함할 수 있다. aid_resolution_information(2355)은 원본 영상(또는 제1 영상)의 해상도를 나타내는 정보로, 다양한 형태일 수 있으나, 예를 들어, 복수의 원본 영상(또는 제1 영상)의 해상도 중 하나를 나타내는 인덱스 형태의 정보일 수 있다. 예를 들어, 그 값은 0x0000일 수 있고, 제1 영상의 해상도가 Full HD임을 나타낼 수 있다.Next, the SEI message may include aid_resolution_information 2355 . aid_resolution_information 2355 is information indicating the resolution of the original image (or the first image), and may be in various forms. For example, information in the form of an index indicating one of the resolutions of the plurality of original images (or the first image) can be For example, the value may be 0x0000, and may indicate that the resolution of the first image is Full HD.

그 다음으로, SEI 메시지는 aid_meta_flag(2360)을 포함할 수 있다. aid_meta_flag(2360)는 AI 업스케일 관련 추가 메타 데이터를 포함하는지 여부를 나타내는 플래그를 의미할 수 있다. 예를 들어, 그 값은 0x0000일 수 있고, 이는 AI 업스케일 관련 추가 메타 데이터를 포함하지 않음을 나타낼 수 있다.Next, the SEI message may include aid_meta_flag 2360 . aid_meta_flag 2360 may mean a flag indicating whether additional metadata related to AI upscaling is included. For example, the value may be 0x0000, which may indicate that no additional metadata related to AI upscaling is included.

일 실시예에 의하면, AI 업스케일 관련 추가 메타 데이터 중 일부는 aid_meta_flag(2360) 앞에 위치할 수 있고, 이 경우, 더 이상 추가 메타 데이터로 취급되지 않을 수 있다. 또는 일 실시예에 의하면, aid_meta_flag(2360) 앞에 위치하던 AI 업스케일 관련 데이터가 aid_meta_flag(2360) 이후에 위치할 수 있고, 이 경우, 해당 데이터는 추가 메타 데이터로 취급될 수 있다.According to an embodiment, some of the AI upscaling related additional metadata may be located before the aid_meta_flag 2360 , and in this case, it may not be treated as additional metadata any longer. Alternatively, according to an embodiment, AI upscaling related data located before aid_meta_flag 2360 may be located after aid_meta_flag 2360 , and in this case, the corresponding data may be treated as additional metadata.

앞서, SEI 메시지에 포함되는 다양한 데이터에 대해서 설명하였으나, 이는 일 예에 지나지 않고, SEI 메시지가 이 중 일부를 포함하거나, 추가로 다른 데이터를 더 포함할 수 있음을 당업자는 이해할 수 있고, 데이터의 순서는 모순되지 않는 한, 서로 변경될 수 있음을 당업자는 이해할 수 있다.Previously, various data included in the SEI message have been described, but this is only an example, and those skilled in the art can understand that the SEI message may include some of them or may further include other data. It will be understood by those skilled in the art that the order may be changed from one another as long as there is no contradiction.

다만 이에 제한되지 않고, 전술한 AI 데이터에 적용될 수 있는 데이터 구조는 전술한 SEI 메시지의 구조와 유사할 수 있다.However, the present invention is not limited thereto, and a data structure applicable to the aforementioned AI data may be similar to that of the aforementioned SEI message.

도 24은 일 실시예에 따른, AI 데이터를 포함하는 신택스 구조 테이블을 나타낸다.24 shows a syntax structure table including AI data, according to an embodiment.

도 24을 참조하면, aid_main 신택스 테이블(2400)에 의하면, aid_flag, aid_average_qp, aid_qp_selection, aid_multiplication, aid_codec_information, aid_resolution_information, aid_meta_flag 등과 같은 신택스 엘리먼트(syntax element)가 파싱될 수 있다.Referring to FIG. 24 , according to the aid_main syntax table 2400, syntax elements such as aid_flag, aid_average_qp, aid_qp_selection, aid_multiplication, aid_codec_information, aid_resolution_information, aid_meta_flag, etc. may be parsed.

aid_flag는 도 17의 aid_flag에 대응되는 AI 업스케일 활성화 플래그이다. aid_flag가 AI업스케일의 활성화를 나타내는 경우(if(aid_flag)), AI 서브 데이터에 대응되는 신택스 엘리먼트들이 파싱될 수 있다.aid_flag is an AI upscaling activation flag corresponding to aid_flag of FIG. 17 . When aid_flag indicates activation of AI upscaling (if(aid_flag)), syntax elements corresponding to AI sub-data may be parsed.

aid_flag가 AI업스케일이 활성화되지 않음을 나타내는 경우, AI 서브 데이터에 대응되는 신택스 엘리먼트들은 파싱되지 않는다.When aid_flag indicates that AI upscaling is not activated, syntax elements corresponding to AI sub data are not parsed.

AI 서브 데이터에 대응되는 신택스 요소는 aid_average_qp, aid_qp_selection, aid_multiplication, aid_codec_information, aid_resolution_information, aid_meta_flag를 포함할 수 있고, 도 17의 aid_average_qp, aid_qp_selection, aid_multiplication, aid_codec_information, aid_resolution_information, aid_meta_flag에 대응될 수 있다.The syntax element corresponding to the AI sub-data may include aid_average_qp, aid_qp_selection, aid_multiplication, aid_codec_information, aid_resolution_information, and aid_meta_flag, and may correspond to aid_average_qp, aid_qp_selection, aid_multiplication, aid_meta_resolutioninformation, aid.

aid_average_qp는 도 17의 aid_average_qp에 대응되는 신택스 엘리먼트로, 영상에서 적용된 양자화 파라메터의 평균값을 나타내는 정보일 수 있다. aid_qp_selection은 도 17의 aid_qp_selection에 대응되는 신택스 엘리먼트로, 영상의 적어도 일부의 양자화 정도(또는 레벨)를 나타내는 지시자 정보일 수 있다.aid_average_qp is a syntax element corresponding to aid_average_qp of FIG. 17 and may be information indicating an average value of a quantization parameter applied to an image. aid_qp_selection is a syntax element corresponding to aid_qp_selection of FIG. 17 and may be indicator information indicating a degree (or level) of quantization of at least a part of an image.

aid_multiplication은 도 17의 aid_multiplication에 대응되는 신택스 엘리먼트로, 원본 영상과 제1 영상 간의 비율(또는 배수)을 나타내는 정보일 수 있다.aid_multiplication is a syntax element corresponding to aid_multiplication of FIG. 17 and may be information indicating a ratio (or multiple) between the original image and the first image.

aid_codec_information은 도 17의 aid_codec_information에 대응되는 신택스 엘리먼트로, 영상의 제1 부호화에 이용된 소정의 코덱을 나타내는 정보일 수 있다.aid_codec_information is a syntax element corresponding to aid_codec_information of FIG. 17 and may be information indicating a predetermined codec used for first encoding of an image.

aid_resolution_information은 도 17의 aid_resolutaion_information에 대응되는 신택스 엘리먼트로, 원본 영상(또는 제1 영상)의 해상도를 나타내는 정보일 수 있다.aid_resolution_information is a syntax element corresponding to aid_resolutaion_information of FIG. 17 and may be information indicating the resolution of the original image (or the first image).

aid_meta_flag는 도 17의 aid_meta_flag에 대응되는 신택스 엘리먼트로, AI 업스케일 관련 추가 메타 데이터를 포함하는지 여부를 나타내는 플래그를 의미할 수 있다.aid_meta_flag is a syntax element corresponding to aid_meta_flag of FIG. 17 and may mean a flag indicating whether or not additional metadata related to AI upscaling is included.

aid_meta_flag가 , AI 업스케일 관련 추가 메타 데이터를 포함함을 나타내는 경우(if(aid_flag)), AI 업스케일 관련 추가 메타 데이터에 대응되는 신택스 엘리먼트들이 파싱될 수 있다.When aid_meta_flag indicates that the AI upscale-related additional metadata is included (if(aid_flag)), syntax elements corresponding to the AI upscale-related additional metadata may be parsed.

획득되는 추가적인 메타 데이터는 hdr_max_luminance, hdr_color_gamut, hdr_pq_type, 및 rate_control_type, aid_target_bitrate와 등이 포함될 수 있다. hdr_max_luminance는 고해상도 영상에 적용되는 HDR (High Dynamic Range) 최대 조도, hdr_color_gamut는 고해상도 영상에 적용되는 HDR 색역, hdr_pq_type는 고해상도 영상에 적용되는 HDR PQ (Perceptual Quantizer) 정보, rate_control_type는 제 1 부호화 결과 획득된 영상 데이터에 적용된 레이트 컨트롤 타입, aid_target_bitrate는 목표 비트레이트를 나타낼 수 있다. 실시 예에 따라, 추가적인 메타 데이터에 해당되는 상기 신택스 요소들 중 특정 신택스 요소가 파싱될 수 있다.The additional metadata obtained may include hdr_max_luminance, hdr_color_gamut, hdr_pq_type, rate_control_type, aid_target_bitrate, and the like. hdr_max_luminance is HDR (High Dynamic Range) maximum illuminance applied to high-resolution image, hdr_color_gamut is HDR color gamut applied to high-resolution image, hdr_pq_type is HDR PQ (Perceptual Quantizer) information applied to high-resolution image, rate_control_type is image obtained as a result of the first encoding A rate control type applied to data, aid_target_bitrate, may indicate a target bitrate. According to an embodiment, a specific syntax element among the syntax elements corresponding to additional metadata may be parsed.

도 24의 신택스 구조 테이블 (2400)은 예시에 불과하며, 도 23에 도시된 AI 데이터 중 일부에 대응되는 신택스 엘리먼트가 신택스 구조 테이블 (2400)에 포함될 수 있다. 또한, 도 23에 도시되지 않은 AI 데이터에 대응하는 신택스 엘리먼트가 신택스 구조 테이블 (2400)에 포함될 수 있다.The syntax structure table 2400 of FIG. 24 is only an example, and syntax elements corresponding to some of the AI data shown in FIG. 23 may be included in the syntax structure table 2400 . Also, a syntax element corresponding to AI data not shown in FIG. 23 may be included in the syntax structure table 2400 .

앞서, 도 23을 참조하여 설명할 때, 신택스 엘리먼트의 값이 byte 단위로 파싱되는 것처럼 설명하였으나, 이는 AI 데이터를 포함하는 페이로드 부분이 byte align을 고려하여, byte 단위로 파싱됨을 강조하기 위한 것으로, byte 단위로 각 신택스 엘리먼트의 값이 파싱될 수 있으나, 이에 제한되지 않고, 정의된 신택스 구조 테이블을 기초로 다양한 단위로(예를 들어, u(1) 또는 ae(v) 함수에 의해) 파싱될 수 있다.Earlier, when explaining with reference to FIG. 23, it was described as if the value of the syntax element was parsed in units of bytes, but this is to emphasize that the payload part including AI data is parsed in units of bytes in consideration of byte alignment. , the value of each syntax element may be parsed in units of byte, but is not limited thereto, and is parsed in various units (eg, by u(1) or ae(v) functions) based on a defined syntax structure table can be

다만 이에 제한되지 않고, 전술하여 설명된 AI 데이터에 적용될 수 있는 신택스 구조 테이블은 전술한 AI 데이터를 포함하는 신택스 구조 테이블과 유사할 수 있다.However, the present invention is not limited thereto, and the syntax structure table applicable to the above-described AI data may be similar to the syntax structure table including the above-described AI data.

도 25는 일 실시예에 따른, 비트스트림 기반 AI 부호화 장치 및 AI 복호화 장치의 동작을 설명하기 위한 도면이다.25 is a diagram for explaining operations of a bitstream-based AI encoding apparatus and an AI decoding apparatus according to an embodiment.

도 25를 참조하면, AI 부호화 장치(1400)는 원본 영상을 입력으로 받아, 비디오 비트스트림을 AI 복호화 장치(1300)로 출력할 수 있다. 예를 들어, AI 부호화 장치(1400)는 원본 영상의 AI 다운 스케일 여부를 결정하고, AI 다운 스케일 여부에 따라 원본 영상을 AI 다운 스케일하여 제1 영상을 생성할 수 있다. 이때, AI 다운 스케일은 AI 다운스케일부(1412)에서 수행될 수 있다. 만약 AI 다운 스케일이 수행되지 않는 경우, 제1 영상 대신 원본 영상이 제1 부호화부(1414)의 입력 영상이 될 수 있다.Referring to FIG. 25 , the AI encoding apparatus 1400 may receive an original image as an input and output a video bitstream to the AI decoding apparatus 1300 . For example, the AI encoding apparatus 1400 may determine whether the original image is AI downscaled, and may AI downscale the original image according to whether the AI downscale is performed to generate the first image. In this case, the AI downscaling may be performed by the AI downscaling unit 1412 . If AI downscaling is not performed, the original image may be the input image of the first encoder 1414 instead of the first image.

제1 부호화부(1414)는 소정의 코덱을 기초로, 제1 영상을 제1 부호화하여 영상 부호화 정보를 생성하고 영상 부호화 정보를 비트스트림 형태로 표현할 수 있다. 영상 부호화 정보는 소정의 코덱에서 정의된, 비트스트림 내 영상 부호화 정보가 포함될 수 있는 메인 비트스트림 영역에 포함될 수 있다. 예를 들어, 영상 부호화 정보는 소정의 코덱이 MPEG의 H.264, HEVC 및 VVC 코덱 중 하나인 경우, VPS,SPS,PPS, I 슬라이스, B 슬라이스, P 슬라이스의 타입을 갖는 NAL 유닛에 포함될 수 있다. 한편, 소정의 코덱이 AV1 코덱인 경우, 영상 부호화 정보는 OBU의 타입이 시퀀스 헤더 OBU, 프레임 헤더 OBU, 프레임 OBU, 및 타일 그룹 OBU 등인 OBU에 포함될 수 있다.The first encoder 1414 may generate image encoding information by first encoding a first image based on a predetermined codec, and may express the image encoding information in the form of a bitstream. The image encoding information may be included in a main bitstream region defined by a predetermined codec, in which image encoding information in a bitstream may be included. For example, when a predetermined codec is one of MPEG H.264, HEVC, and VVC codecs, the video encoding information may be included in a NAL unit having the types of VPS, SPS, PPS, I slice, B slice, and P slice. have. On the other hand, when the predetermined codec is the AV1 codec, the image encoding information may be included in OBUs of which the types of OBUs are sequence header OBU, frame header OBU, frame OBU, and tile group OBU.

제1 부호화부(1414)는 소정의 코덱을 기초로 AI 데이터를 비트스트림 형태로 표현할 수 있다. AI 데이터는 소정의 코덱에서 정의된, 비트스트림 내 부가 데이터가 포함될 수 있는 서브 비트스트림 영역에 포함될 수 있다.The first encoder 1414 may express AI data in the form of a bitstream based on a predetermined codec. The AI data may be included in a sub-bitstream region defined by a predetermined codec, in which additional data in the bitstream may be included.

AI 데이터는 AI 다운 스케일 여부에 대응하는 업스케일 여부를 나타내는 AI 업스케일 활성화 플래그 및 AI 다운 스케일에 대응하는 AI 업스케일에 이용되는 업스케일용 DNN 정보를 선택하기 위한 AI 서브 데이터를 포함할 수 있다. 예를 들어, AI 데이터는 소정의 코덱이 MPEG의 H.264, HEVC 및 VVC 코덱 중 하나인 경우, SEI 메시지의 NAL 유닛에 포함될 수 있다. 소정의 코덱이 AV1인 경우, AI 데이터는 메타데이터 OBU에 포함될 수 있다.AI data may include AI sub-data for selecting DNN information for upscaling used for AI upscaling corresponding to AI upscaling and an AI upscaling activation flag indicating whether upscaling corresponding to AI downscaling or not. . For example, AI data may be included in the NAL unit of the SEI message when a predetermined codec is one of MPEG H.264, HEVC, and VVC codecs. When the predetermined codec is AV1, AI data may be included in the metadata OBU.

제1 부호화부(1414)는 비트스트림 형태로 표현된 AI 데이터와 영상 부호화 정보를 포함하는 비디오 비트스트림을 생성할 수 있다.The first encoder 1414 may generate a video bitstream including AI data expressed in the form of a bitstream and image encoding information.

AI 복호화 장치(1300)는 AI 부호화 장치(1400)로부터 출력된 비디오 비트스트림을 수신한다. 제1 복호화부(1332)는 비디오 비트스트림에 포함된 영상 부호화 정보를 제1 복호화하여 제2 영상을 획득할 수 있다. 이때, 소정의 코덱이 MPEG 코덱인 경우, 비디오 비트스트림의 NAL 유닛 헤더에 포함된 영상 부호화 정보의 NAL 유닛 타입을 기초로, SPS, PPS, I슬라이스, P슬라이스 및 B슬라이스의 부호화 정보를 획득할 수 있고, 획득된 부호화 정보를 제1 복호화하여 제2 영상을 획득할 수 있다.The AI decoding apparatus 1300 receives the video bitstream output from the AI encoding apparatus 1400 . The first decoder 1332 may first decode image encoding information included in the video bitstream to obtain a second image. At this time, when the predetermined codec is an MPEG codec, based on the NAL unit type of the image encoding information included in the NAL unit header of the video bitstream, encoding information of SPS, PPS, I slice, P slice and B slice is obtained. and the obtained encoding information may be first decoded to obtain a second image.

제1 복호화부(1332)는 비디오 비트스트림에 포함된 AI 데이터를 획득할 수 있다. 예를 들어, 소정의 코덱이 MPEG 코덱인 경우, 비트스트림의 NAL 유닛 헤더에 포함된 AI 데이터의 NAL 유닛 타입을 기초로 AI 데이터를 획득할 수 있다. 즉, NAL 유닛 타입이 SEI 메시지인 경우, 제1 복호화부(1232)는 해당 NAL 유닛으로부터 AI 데이터를 획득할 수 있다. 이때, AI 데이터는, ITU-T T.35에 의해 등록된 사용자 데이터 또는 UUID에 의해 식별되는 등록되지 않은 사용자 데이터를 포함하는 SEI 메시지에 포함될 수 있다.The first decoder 1332 may acquire AI data included in the video bitstream. For example, when a predetermined codec is an MPEG codec, AI data may be obtained based on the NAL unit type of AI data included in the NAL unit header of the bitstream. That is, when the NAL unit type is an SEI message, the first decoder 1232 may acquire AI data from the corresponding NAL unit. In this case, the AI data may be included in an SEI message including user data registered by ITU-T T.35 or unregistered user data identified by UUID.

한편 소정의 코덱이 AV1 코덱인 경우, 제1 복호화부(1332)는 OBU 중 메타 데이터 OBU로부터 AI 데이터를 획득할 수 있다. 이때, AI 데이터는, ITU-T T.35에 의해 등록된 사용자 데이터를 포함하는 메타 데이터 OBU에 포함될 수 있다.Meanwhile, when the predetermined codec is the AV1 codec, the first decoder 1332 may obtain AI data from the metadata OBU among the OBUs. In this case, the AI data may be included in the metadata OBU including user data registered by ITU-T T.35.

AI 복호화 장치(1300)는 AI 데이터에 포함된 AI 업스케일 활성화 플래그를 기초로 AI 업스케일의 수행 여부를 결정할 수 있다.The AI decoding apparatus 1300 may determine whether to perform AI upscaling based on the AI upscaling activation flag included in the AI data.

AI 복호화 장치(1300)는 AI 업스케일 활성화 플래그가 AI 업스케일이 활성화되지 않음을 나타내는 경우, 제2 영상을 출력할 수 있다.The AI decoding apparatus 1300 may output the second image when the AI upscaling activation flag indicates that the AI upscaling is not activated.

AI 복호화 장치(1300)는 AI 업스케일 활성화 플래그가 AI 업스케일이 활성화됨을 나타내는 경우, 제2 영상이 AI 업스케일부(1334)로 입력되고, AI 데이터가 AI 설정부(1333)로 입력될 수 있다.The AI decoding apparatus 1300 may input the second image to the AI upscaling unit 1334 and the AI data to the AI setting unit 1333 when the AI upscaling activation flag indicates that the AI upscaling is activated. have.

AI 설정부(1333)는 AI 데이터를 기초로 복수의 업스케일용 DNN 정보 중 하나의 업스케일용 DNN 정보를 선택하고, AI 업스케일부(1334)는 선택된 업스케일용 DNN 정보를 기초로 설정된 업스케일용 DNN을 기초로 제2 영상에 대한 AI 업스케일을 수행하여 제3 영상을 출력할 수 있다.The AI setting unit 1333 selects one upscale DNN information from among a plurality of upscaling DNN information based on the AI data, and the AI upscaling unit 1334 selects upscaling DNN information based on the selected upscaling DNN information. A third image may be output by performing AI upscaling on the second image based on the scale DNN.

도 26은 여러 영상 관련 정보들과 여러 DNN 설정 정보들 사이의 매핑 관계를 나타내는 예시적인 도면이다.26 is an exemplary diagram illustrating a mapping relationship between various pieces of image-related information and various pieces of DNN configuration information.

도 26에 따른 실시예를 통해, 본 개시의 일 실시예의 AI 부호화/AI 복호화 과정은 해상도의 변화만을 고려하는 것이 아님을 알 수 있다. 도 26에 도시된 바와 같이, SD, HD, Full HD, 4K와 같은 해상도, 10Mbps, 15Mbps, 20Mbps, 25Mbps와 같은 비트레이트, 그리고 AV1, H.264, HEVC, VVC와 같은 코덱 정보, Sports,Movie, General과 같은 영상 장르 정보, QP level 정보를 개별적으로 또는 모두 고려하여 DNN 설정 정보의 선택이 이루어질 수 있다. 여기서 QP_level 정보는 도 17의 aid_qp_selection(또는 도 21의 QP indicator)가 가리키는 QP level일 수 있으나, 이에 제한되지 않고, 도 17의 aid_qp_selection, aid_average_qp나, 영상 부호화 정보를 제1 복호화할 때 획득되는 양자화 파라미터 중 적어도 하나에 의해 결정되는 QP 값의 범위일 수 있다. QP level(또는, QP 값의 범위)을 고려하여 DNN 설정 정보의 선택을 하는 실시예에 관한 내용은 도 22를 참조하여 후술하겠다.26 , it can be seen that the AI encoding/AI decoding process according to an embodiment of the present disclosure does not only consider a change in resolution. 26 , resolutions such as SD, HD, Full HD, 4K, bit rates such as 10Mbps, 15Mbps, 20Mbps, and 25Mbps, and codec information such as AV1, H.264, HEVC, and VVC, Sports,Movie DNN setting information can be selected individually or in consideration of video genre information such as , General, and QP level information. Here, the QP_level information may be the QP level indicated by aid_qp_selection of FIG. 17 (or the QP indicator of FIG. 21 ), but is not limited thereto, and the aid_qp_selection and aid_average_qp of FIG. 17 or a quantization parameter obtained when the image encoding information is first decoded It may be a range of the QP value determined by at least one of. An embodiment in which the DNN configuration information is selected in consideration of the QP level (or the range of the QP value) will be described later with reference to FIG. 22 .

이러한 고려를 위해서는 AI 훈련 과정에서 각각의 요소들을 고려한 훈련이 부호화, 복호화 과정에서 연계되어 이루어져야 한다.For this consideration, training that considers each element in the AI training process should be connected in the encoding and decoding process.

따라서, 훈련 내용에 따라서 도 26에 도시된 바와 같이, 코덱 타입, 영상의 해상도 등을 포함하는 영상 관련 정보에 기반하여 복수의 DNN 설정 정보가 구비된 경우, AI 복호화 장치는 AI 복호화 과정에서 전달받는 제 1 영상(115) 또는 원본 영상(105) 관련 정보에 기반하여 제 2 영상(135)의 AI 업스케일을 위한 DNN 설정 정보를 획득할 수 있다. 제 1 영상(115) 또는 원본 영상(105) 관련 정보는 영상 부호화 정보를 제1 복호화함으로써 획득될 수 있으나, AI 데이터로부터 획득될 수도 있다.Therefore, according to the training content, as shown in FIG. 26 , when a plurality of DNN setting information is provided based on image-related information including a codec type and image resolution, the AI decoding apparatus receives the information delivered in the AI decoding process. DNN setting information for AI upscaling of the second image 135 may be acquired based on information related to the first image 115 or the original image 105 . The information related to the first image 115 or the original image 105 may be obtained by first decoding image encoding information, but may also be obtained from AI data.

즉, AI 설정부(1333)는 도 26에 도시된 표의 좌측에 도시된 영상 관련 정보와 표 우측의 DNN 설정 정보를 매칭하고 있음으로써, 영상 관련 정보에 따른 DNN 설정 정보를 사용할 수 있는 것이다.That is, the AI setting unit 1333 may use the DNN setting information according to the image related information by matching the image related information shown on the left side of the table shown in FIG. 26 and the DNN setting information on the right side of the table.

도 26에 예시된 바와 같이, 제 1 영상(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 SD이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 10Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 1.5x이고, 제 1 영상(115)이 AV1 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 스포츠이고, QP level이 5인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 A DNN 설정 정보를 사용할 수 있다.As illustrated in FIG. 26 , the resolution of the first image 115 is SD from information related to the first image 115 or the original image 105 , and image data generated as a result of the first encoding of the first image 115 . has a bit rate of 10Mbps, a ratio of the first image 115 to the original image 105 is 1.5x, the first image 115 is first encoded with the AV1 codec, and the genre of the first image 115 is If it is sports and it is confirmed that the QP level is 5, the AI setting unit 1333 may use A DNN setting information among a plurality of DNN setting information.

또한, 제 1 영상 관련(115) 또는 원본 영상(105)_ 관련 정보로부터 제 1 영상(115)의 해상도가 SD이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 10Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 1.5x이고, 제 1 영상(115)이 AV1 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 영화이고, QP level이 5인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 B DNN 설정 정보를 사용할 수 있다.In addition, from the information related to the first image 115 or the original image 105_, the resolution of the first image 115 is SD, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 10Mbps, the ratio of the first image 115 to the original image 105 is 1.5x, the first image 115 is first coded with the AV1 codec, the genre of the first image 115 is a movie, and QP When it is confirmed that the level is 5, the AI setting unit 1333 may use B DNN setting information among a plurality of DNN setting information.

제1 영상(115)의 장르가 스포츠인지, 영화인지, 일반인지에 따라 A DNN 설정 정보, B DNN 설정 정보 중에서 어느 하나가 선택된다. 다른 조건이 동일한 상태에서 영상의 장르가 상이할 수 있고, 제 1 DNN과 제 2 DNN은 영상의 장르에 기반하여 연계 훈련될 수 있으며, 이에 따라 AI 설정부(1333)는 제 2 영상(135)의 장르에 따라 DNN 설정 정보를 획득할 수 있다.Any one of A DNN setting information and B DNN setting information is selected according to whether the genre of the first image 115 is sports, a movie, or a general public. Under the same other conditions, the genre of the image may be different, and the first DNN and the second DNN may be jointly trained based on the genre of the image. DNN setting information can be obtained according to the genre of

또한, 제 1 영상 관련(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 SD이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 15Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 1.5x이고, 제 1 영상(115)이 AV1 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 영화이고, QP level이 5인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 C DNN 설정 정보를 사용할 수 있다.Also, from the information related to the first image 115 or the original image 105, the resolution of the first image 115 is SD, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 15 Mbps. , the ratio of the first image 115 to the original image 105 is 1.5x, the first image 115 is first encoded with the AV1 codec, the genre of the first image 115 is a movie, and the QP level If it is confirmed that this is 5, the AI setting unit 1333 may use the C DNN setting information among a plurality of DNN setting information.

영상 데이터의 비트레이트에 따라 B DNN 설정 정보, C DNN 설정 정보 중에서 어느 하나가 선택된다. 다른 조건이 동일한 상태에서 영상 데이터의 비트레이트가 상이할 수 있고, 제 1 DNN과 제 2 DNN은 영상 데이터의 비트레이트에 기반하여 연계 훈련될 수 있으며, 이에 따라 AI 설정부(1333)는 제 2 영상(135)의 장르에 따라 DNN 설정 정보를 획득할 수 있다.Either one of B DNN setting information and C DNN setting information is selected according to the bit rate of the image data. Under the same other conditions, the bit rate of the image data may be different, and the first DNN and the second DNN may be jointly trained based on the bit rate of the image data. DNN setting information may be acquired according to the genre of the image 135 .

또한, 제 1 영상 관련(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 SD이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 10Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 1.5x이고, 제 1 영상(115)이 AV1 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 일반이고, QP level이 5인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 C DNN 설정 정보를 사용할 수 있다.Also, from the information related to the first image 115 or the original image 105 , the resolution of the first image 115 is SD, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 10 Mbps. , the ratio of the first image 115 to the original image 105 is 1.5x, the first image 115 is first encoded with the AV1 codec, the genre of the first image 115 is general, and the QP level If it is confirmed that this is 5, the AI setting unit 1333 may use the C DNN setting information among a plurality of DNN setting information.

또한, 제 1 영상 관련(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 SD이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 10Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 2.0x이고, 제 1 영상(115)이 AV1 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 스포츠이고, QP level이 5인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 D DNN 설정 정보를 사용할 수 있다.Also, from the information related to the first image 115 or the original image 105 , the resolution of the first image 115 is SD, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 10 Mbps. , the ratio of the first image 115 to the original image 105 is 2.0x, the first image 115 is first encoded with the AV1 codec, the genre of the first image 115 is sports, and the QP level If it is confirmed that this is 5, the AI setting unit 1333 may use D DNN setting information among a plurality of DNN setting information.

제1 영상(115)와 원본 영상(105)의 비율이, 1.5x, 2.0x인지에 따라 C DNN 설정 정보, D DNN 설정 정보 중에서 어느 하나가 선택된다. 다른 조건이 동일한 상태에서 제1 영상(115)와 원본 영상(105)의 비율이 상이할 수 있고, 제 1 DNN과 제 2 DNN은 제1 영상(115)와 원본 영상(105)의 비율에 기반하여 연계 훈련될 수 있으며, 이에 따라 AI 설정부(1333)는 제1 영상(115)와 원본 영상(105)의 비율에 따라 DNN 설정 정보를 획득할 수 있다.Either one of C DNN setting information and D DNN setting information is selected according to whether the ratio of the first image 115 and the original image 105 is 1.5x or 2.0x. The ratio of the first image 115 and the original image 105 may be different under the same other conditions, and the first DNN and the second DNN are based on the ratio of the first image 115 and the original image 105 . Thus, the AI setting unit 1333 may acquire DNN setting information according to the ratio of the first image 115 to the original image 105 .

또한, 제 1 영상 관련(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 SD이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 10Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 2.0x이고, 제 1 영상(115)이 AV1 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 스포츠이고, QP level이 4인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 E DNN 설정 정보를 사용할 수 있다.Also, from the information related to the first image 115 or the original image 105 , the resolution of the first image 115 is SD, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 10 Mbps. , the ratio of the first image 115 to the original image 105 is 2.0x, the first image 115 is first encoded with the AV1 codec, the genre of the first image 115 is sports, and the QP level If it is confirmed that this is 4, the AI setting unit 1333 may use E DNN setting information among a plurality of DNN setting information.

제1 영상(115)의 QP level(또는범위)에 따라 D DNN 설정 정보, E DNN 설정 정보 중에서 어느 하나가 선택된다. 다른 조건이 동일한 상태에서 QP level이 상이할 수 있고, 제 1 DNN과 제 2 DNN은 QP level에 기반하여 연계 훈련될 수 있으며, 이에 따라 AI 설정부(1333)는 QP level에 따라 DNN 설정 정보를 획득할 수 있다.Any one of D DNN setting information and E DNN setting information is selected according to the QP level (or range) of the first image 115 . In other conditions, the QP level may be different, and the first DNN and the second DNN may be jointly trained based on the QP level. can be obtained

또한, 제 1 영상 관련(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 HD이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 15Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 1.5x이고, 제 1 영상(115)이 H.264 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 스포츠이고, QP level이 3인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 F DNN 설정 정보를 사용할 수 있다.In addition, from the information related to the first image 115 or the original image 105 , the resolution of the first image 115 is HD, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 15 Mbps. , the ratio of the first image 115 to the original image 105 is 1.5x, the first image 115 is first encoded with the H.264 codec, the genre of the first image 115 is sports, When it is confirmed that the QP level is 3, the AI setting unit 1333 may use F DNN setting information among a plurality of DNN setting information.

또한, 제 1 영상 관련(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 HD이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 15Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 1.5x이고, 제 1 영상(115)이 AV1 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 일반이고, QP level이 3인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 G DNN 설정 정보를 사용할 수 있다.In addition, from the information related to the first image 115 or the original image 105 , the resolution of the first image 115 is HD, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 15 Mbps. , the ratio of the first image 115 to the original image 105 is 1.5x, the first image 115 is first encoded with the AV1 codec, the genre of the first image 115 is general, and the QP level If it is confirmed that this is 3, the AI setting unit 1333 may use G DNN setting information among a plurality of DNN setting information.

코덱의 종류에 따라 F DNN 설정 정보, G DNN 설정 정보 중에서 어느 하나가 선택된다. 다른 조건이 동일한 상태에서 코덱의 종류가 상이할 수 있고, 제 1 DNN과 제 2 DNN은 코덱의 종류에 기반하여 연계 훈련될 수 있으며, 이에 따라 AI 설정부(1333)는 코덱의 종류에 따라 DNN 설정 정보를 획득할 수 있다.Either one of F DNN setting information and G DNN setting information is selected according to the type of codec. Under the same other conditions, the type of codec may be different, and the first DNN and the second DNN may be jointly trained based on the type of the codec. Setting information can be obtained.

또한, 제 1 영상 관련(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 Full HD이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 15Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 1.5x이고, 제 1 영상(115)이 AV1 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 일반이고, QP level이 3인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 H DNN 설정 정보를 사용할 수 있다.In addition, from the information related to the first image 115 or the original image 105, the resolution of the first image 115 is Full HD, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 15Mbps, the ratio of the first image 115 to the original image 105 is 1.5x, the first image 115 is first coded with the AV1 codec, the genre of the first image 115 is general, and QP When it is confirmed that the level is 3, the AI setting unit 1333 may use H DNN setting information among a plurality of DNN setting information.

제1 영상(115)의 해상도에 따라 G DNN 설정 정보, H DNN 설정 정보 중에서 어느 하나가 선택된다. 다른 조건이 동일한 상태에서 제1 영상(115)의 해상도가 상이할 수 있고, 제 1 DNN과 제 2 DNN은 제1 영상(115)의 해상도에 기반하여 연계 훈련될 수 있으며, 이에 따라 AI 설정부(1333)는 제1 영상(115)의 해상도에 따라 DNN 설정 정보를 획득할 수 있다.Any one of G DNN setting information and H DNN setting information is selected according to the resolution of the first image 115 . Under the same other conditions, the resolution of the first image 115 may be different, and the first DNN and the second DNN may be jointly trained based on the resolution of the first image 115 . Accordingly, the AI setting unit 1333 may acquire DNN setting information according to the resolution of the first image 115 .

또한, 제 1 영상 관련(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 Full HD이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 20Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 1.5x이고, 제 1 영상(115)이 HEVC 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 영화이고, QP level이 2인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 I DNN 설정 정보를 사용할 수 있다.In addition, from the information related to the first image 115 or the original image 105, the resolution of the first image 115 is Full HD, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 20Mbps, the ratio of the first image 115 to the original image 105 is 1.5x, the first image 115 is first coded with the HEVC codec, the genre of the first image 115 is a movie, and QP When it is confirmed that the level is 2, the AI setting unit 1333 may use I DNN setting information among a plurality of DNN setting information.

또한, 제 1 영상 관련(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 4k이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 25Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 1.5x이고, 제 1 영상(115)이 VVC 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 스포츠이고, QP level이 2인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 J DNN 설정 정보를 사용할 수 있다.Also, from the information related to the first image 115 or the original image 105, the resolution of the first image 115 is 4k, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 25 Mbps. , the ratio of the first image 115 to the original image 105 is 1.5x, the first image 115 is first encoded with the VVC codec, the genre of the first image 115 is sports, and the QP level If it is confirmed that this is 2, the AI setting unit 1333 may use J DNN setting information among a plurality of DNN setting information.

또한, 제 1 영상 관련(115) 또는 원본 영상(105) 관련 정보로부터 제 1 영상(115)의 해상도가 4k이고, 제 1 영상(115)의 제 1 부호화 결과 생성된 영상 데이터의 비트레이트가 25Mbps이고, 제1 영상(115)와 원본 영상(105)의 비율이 1.5x이고, 제 1 영상(115)이 VVC 코덱으로 제 1 부호화되고, 제1 영상(115)의 장르가 영화이고, QP level이 2인 것으로 확인되면, AI 설정부(1333)는 복수의 DNN 설정 정보 중 K DNN 설정 정보를 사용할 수 있다.Also, from the information related to the first image 115 or the original image 105, the resolution of the first image 115 is 4k, and the bit rate of image data generated as a result of the first encoding of the first image 115 is 25 Mbps. , the ratio of the first image 115 to the original image 105 is 1.5x, the first image 115 is first encoded with the VVC codec, the genre of the first image 115 is a movie, and the QP level When it is confirmed that this is 2, the AI setting unit 1333 may use K DNN setting information among a plurality of DNN setting information.

또 다른 실시예에서, AI 설정부(1333)는 제 1 복호화부(1232)로부터 제공되는 정보(모드 정보, 양자화 파라미터 정보 등)와 AI 데이터에 포함된 제 1 영상(115) 관련 정보를 모두 고려하여 복수의 DNN 설정 정보 중 제 2 영상(135)을 AI 업스케일하기 위한 DNN 설정 정보를 획득할 수도 있다. 예를 들어, AI 설정부(1333)는 제 1 복호화부(232)로부터 제 1 영상(115)의 제 1 부호화 과정에서 이용된 양자화 파라미터 정보를 전달받고, AI 데이터로부터 제 1 영상(115)의 부호화 결과 생성된 영상 데이터의 비트레이트를 확인하고, 양자화 파라미터 및 비트레이트에 대응하는 DNN 설정 정보를 획득할 수도 있다. 동일한 비트레이트라도 영상의 복잡도에 따라 복원 영상의 화질 정도에 차이가 있을 수 있으며, 비트레이트는 제 1 부호화되는 제 1 영상(115) 전체를 대표하는 값으로서 제 1 영상(115) 내에서도 각 프레임의 화질이 서로 다를 수 있다. 따라서, 제 1 복호화부(1232)로부터 프레임, 프레임 그룹, 비디오 별로 획득할 수 있는 모드 정보 (예를 들어, 예측 모드 정보, 움직임 정보 등) 및/또는 양자화 파라미터를 함께 고려하면, AI 데이터만 이용하는 것에 비해 제 2 영상(135)에 보다 적합한 DNN 설정 정보를 획득할 수 있다.In another embodiment, the AI setting unit 1333 considers both the information (mode information, quantization parameter information, etc.) provided from the first decoder 1232 and the information related to the first image 115 included in the AI data. Thus, it is possible to obtain DNN setting information for AI upscaling of the second image 135 among a plurality of DNN setting information. For example, the AI setting unit 1333 receives quantization parameter information used in the first encoding process of the first image 115 from the first decoder 232 , and receives the quantization parameter information from the AI data of the first image 115 . The bit rate of the image data generated as a result of encoding may be checked, and DNN setting information corresponding to the quantization parameter and the bit rate may be obtained. Even at the same bit rate, there may be a difference in the quality of the reconstructed image depending on the complexity of the image, and the bit rate is a value representative of the entire first image 115 to be first encoded, and the bit rate of each frame in the first image 115 is The picture quality may be different. Accordingly, when mode information (eg, prediction mode information, motion information, etc.) and/or quantization parameters obtainable for each frame, frame group, and video from the first decoder 1232 are considered together, AI data only is used. In comparison, more suitable DNN setting information for the second image 135 may be obtained.

또한, 구현예에 따라, AI 데이터는 상호 약속된 DNN 설정 정보의 식별자를 포함할 수 있다. DNN 설정 정보의 식별자는, 제 1 DNN의 다운스케일 타겟에 대응하는 업스케일 타겟으로, 제 2 영상(135)을 AI 업스케일할 수 있도록, 제 1 DNN과 제 2 DNN 간 연계 훈련된 DNN 설정 정보의 쌍을 구분하기 위한 정보이다. AI 설정부(1333)는 AI 데이터에 포함된 DNN 설정 정보의 식별자를 획득한 후, DNN 설정 정보의 식별자에 대응하는 DNN 설정 정보를 사용하여 제 2 영상(135)을 AI 업스케일할 수 있다.Also, depending on the implementation, the AI data may include an identifier of mutually agreed DNN configuration information. The identifier of the DNN setting information is an upscale target corresponding to the downscale target of the first DNN, and the DNN setting information trained in association between the first DNN and the second DNN so that the second image 135 can be AI upscaled. It is information for distinguishing pairs of . After acquiring the identifier of the DNN setting information included in the AI data, the AI setting unit 1333 may AI upscale the second image 135 by using the DNN setting information corresponding to the identifier of the DNN setting information.

또한, 구현예에 따라, AI 데이터는 DNN 설정 정보를 포함할 수도 있다. AI 설정부(1333)는 AI 데이터에 포함된 DNN 설정 정보를 획득한 후, AI 업스케일부(1334)는 해당 DNN 설정 정보를 사용하여 제 2 영상(135)을 AI 업스케일할 수도 있다.Also, according to implementation, AI data may include DNN configuration information. After the AI setting unit 1333 obtains the DNN setting information included in the AI data, the AI upscaling unit 1334 may AI upscale the second image 135 by using the corresponding DNN setting information.

구현예에 따라, DNN 설정 정보를 구성하는 정보들(예를 들어, 컨볼루션 레이어의 수, 컨볼루션 레이어별 필터 커널의 개수, 각 필터 커널의 파라미터 등)들이 룩업 테이블 형태로 저장되어 있는 경우, AI 설정부(1333)는 AI 데이터에 포함된 정보에 기초하여 룩업 테이블 값들 중에서 선택된 일부를 조합하여 DNN 설정 정보를 획득하고, AI 업스케일부(1334)는 획득된 DNN 설정 정보를 사용하여 제 2 영상(135)을 AI 업스케일할 수도 있다.According to the embodiment, when information constituting the DNN setting information (eg, the number of convolution layers, the number of filter kernels for each convolutional layer, parameters of each filter kernel, etc.) is stored in the form of a lookup table, The AI setting unit 1333 obtains DNN setting information by combining some selected among the lookup table values based on the information included in the AI data, and the AI upscaling unit 1334 uses the obtained DNN setting information to obtain a second The image 135 may be upscaled by AI.

구현예에 따라, AI 설정부(1333)는 업스케일 타겟에 대응되는 DNN의 구조가 결정되면, 결정된 DNN의 구조에 대응하는 DNN 설정 정보, 예를 들어, 필터 커널의 파라미터들을 획득할 수도 있다.According to an embodiment, when the structure of the DNN corresponding to the upscale target is determined, the AI setting unit 1333 may obtain DNN setting information corresponding to the determined structure of the DNN, for example, parameters of the filter kernel.

일 실시예에서, AI 설정부(1333)는 AI 데이터에 포함된 제 3 영상(145)의 해상도 정보에 기초하여, 복수의 DNN 설정 정보 중 제 2 영상(135)을 AI 업스케일하기 위한 DNN 설정 정보를 획득할 수도 있다.In an embodiment, the AI setting unit 1333 sets a DNN for AI upscaling the second image 135 among a plurality of DNN setting information based on the resolution information of the third image 145 included in the AI data. You can also obtain information.

AI 설정부(1333)는 제 1 DNN과 관련된 정보를 포함하는 AI 데이터를 통해 제 2 DNN의 DNN 설정 정보를 획득하고, AI 업스케일부(1334)는 획득된 DNN 설정 정보로 세팅된 제 2 DNN을 통해 제 2 영상(135)을 AI 업스케일하는 데, 이는, 제 2 영상(135)의 특징을 직접 분석하여 업스케일하는 것과 비교하여 메모리 사용량과 연산량이 감소될 수 있다.The AI setting unit 1333 obtains DNN setting information of the second DNN through AI data including information related to the first DNN, and the AI upscaling unit 1334 sets the second DNN setting information to the obtained DNN setting information. AI upscales the second image 135 through AI, which can reduce memory usage and computational amount compared to upscaling by directly analyzing the characteristics of the second image 135 .

일 실시예에서, AI 설정부(1333)는 디스플레이 장치의 성능 정보, AI 복호화 장치(1300)에 미리 저장된 설정 값 및 사용자로부터 입력받은 설정 값 중 적어도 하나를 고려하여, 복수의 DNN 설정 정보 중 제 2 영상(135)의 AI 업스케일을 위한 DNN 설정 정보를 획득할 수도 있다.In an embodiment, the AI setting unit 1333 considers at least one of the performance information of the display device, the setting value stored in advance in the AI decoding apparatus 1300, and the setting value input from the user, and selects the first one of the plurality of DNN setting information. 2 It is also possible to obtain DNN configuration information for AI upscaling of the image 135 .

일 예로, AI 설정부(1333)는 AI 복호화 장치(1300)에 미리 저장된 설정 값에 대응하는 DNN 설정 정보를 획득할 수 있다. 예를 들어, AI 복호화 장치(1300)에 특정의 화질 및/또는 해상도가 미리 저장된 경우, AI 설정부(1333)는 미리 저장된 특정의 화질 및/또는 해상도를 갖는 제 3 영상(145)을 생성하기 위한 DNN 설정 정보를 획득할 수 있다.For example, the AI setting unit 1333 may acquire DNN setting information corresponding to a setting value stored in advance in the AI decoding apparatus 1300 . For example, when a specific picture quality and/or resolution is previously stored in the AI decoding apparatus 1300, the AI setting unit 1333 generates a third image 145 having a specific picture quality and/or resolution stored in advance. It is possible to obtain DNN configuration information for

다른 예로, AI 설정부(1333)는 사용자에 의해 입력된 설정 값에 대응하는 DNN 설정 정보를 획득할 수 있다. 예를 들어 AI 설정부(1333)는 특정 화질 및/또는 해상도가 사용자에 의해 입력된 경우, 입력된 특정 화질 및/또는 해상도를 갖는 제 3 영상(145)을 생성하기 위한 DNN 설정 정보를 획득할 수도 있다.As another example, the AI setting unit 1333 may acquire DNN setting information corresponding to the setting value input by the user. For example, when a specific picture quality and/or resolution is input by the user, the AI setting unit 1333 may obtain DNN setting information for generating the third image 145 having the input specific picture quality and/or resolution. may be

다른 예로, AI 설정부(1333)는 제 3 영상(145) 또는 후처리된 제 3 영상(145)을 재생할 디스플레이 장치의 성능 정보(예를 들어, 디스플레이 장치가 재생할 수 있는 영상의 해상도 정보, 디스플레이 장치가 재생할 수 있는 영상의 화질 정보 등)를 고려하여, 특정의 화질 및/또는 해상도를 갖는 제 3 영상(145)을 생성하기 위한 DNN 설정 정보를 획득할 수도 있다. 예를 들어, 디스플레이 장치가 최대 해상도로서 1920x1080의 FHD(Full HD) 해상도만을 지원하고, 제 2 영상(135)의 해상도가 1280x720인 경우, AI 설정부(1333)는 제 2 영상(135)의 해상도를 약 2배 증가시킬 수 있는 DNN 설정 정보를 획득할 수 있다.As another example, the AI setting unit 1333 may include performance information (eg, resolution information of an image that can be reproduced by the display device, display DNN setting information for generating the third image 145 having a specific image quality and/or resolution may be acquired in consideration of the image quality information that the device can reproduce. For example, when the display device supports only FHD (Full HD) resolution of 1920x1080 as the maximum resolution and the resolution of the second image 135 is 1280x720, the AI setting unit 1333 sets the resolution of the second image 135 It is possible to obtain DNN configuration information that can increase .

일 실시예에서, 제 2 영상(135)이 복수의 프레임으로 구성된 경우, AI AI 설정부(1333)는 소정 개수의 프레임 별로 DNN 설정 정보를 독립적으로 획득할 수 있고, 또는, 전체 프레임에 대해 공통된 DNN 설정 정보를 획득할 수도 있다.In an embodiment, when the second image 135 consists of a plurality of frames, the AI AI setting unit 1333 may independently acquire DNN setting information for each predetermined number of frames, or common for all frames. It is also possible to obtain DNN configuration information.

도 27은, 일 실시예에 따라, 영상의 적어도 일부의 대표 QP 값을 기초로 양자화 파라미터의 지시자(또는 레벨) 정보를 결정하는 것을 설명하기 위한 도면이다.27 is a diagram for explaining determining indicator (or level) information of a quantization parameter based on a representative QP value of at least a part of an image, according to an embodiment.

도 27을 참조하면, AI 부호화 장치/복호화 장치는 영상의 적어도 일부의 대표 QP 값을 결정할 수 있다. 대표 QP 값은 영상의 화질을 결정하는 중요한 요소일 수 있다. 여기서 영상의 적어도 일부는 프레임 서브 그룹(예를 들어, 슬라이스), 프레임, 프레임 그룹, 비디오 시퀀스 등 다양한 영상 데이터 단위를 의미할 수 있다. 대표 QP 값은 영상의 적어도 일부의 QP 값들을 대표하는 QP 값으로, 일반적으로는 QP 평균값일 수 있으나, 이에 제한되지 않고, 중간값 등의 값일 수 있다.Referring to FIG. 27 , the AI encoding apparatus/decoding apparatus may determine a representative QP value of at least a part of an image. The representative QP value may be an important factor determining image quality. Here, at least a part of an image may refer to various image data units such as a frame subgroup (eg, a slice), a frame, a frame group, and a video sequence. The representative QP value is a QP value representing at least a portion of QP values of an image, and may generally be a QP average value, but is not limited thereto, and may be a value such as a median value.

일 예로, AI 부호화 장치/복호화 장치는 대표 QP 값이 0~17, 18~24, 25~31, 32~38, 39~45 및 46~51인 경우로 구별할 수 있고, QP 값의 범위에 대응하는 양자화 그룹 #1 내지 양자화 그룹 #6를 결정할 수 있다. 즉, AI 부호화 장치/복호화 장치는 QP값을 그룹화하여 복수의 그룹을 결정할 수 있다.As an example, the AI encoding device/decoding device can be distinguished into cases where the representative QP values are 0-17, 18-24, 25-31, 32-38, 39-45, and 46-51, and in the range of QP values The corresponding quantization group #1 to quantization group #6 may be determined. That is, the AI encoding apparatus/decoding apparatus may determine a plurality of groups by grouping the QP values.

예를 들어, AI 부호화 장치(1400)는 대표 QP 값이 30인 경우, 양자화 그룹 #3을 결정할 수 있고, 양자화 그룹 #3에 대응하는 QP indicator 값을 3으로 결정하고, QP indicator 정보를 AI 복호화 장치(1300)로 전송할 수 있다. 이때, QP indicator는 미리 저장된 복수의 DNN 설정 정보 중 하나의 DNN 설정 정보를 결정하기 위한 요소로 이용될 수 있다. 도 28를 참조하여 QP indicator를 이용하여 하나의 DNN 설정 정보를 결정하는 방법을 후술하겠다.For example, when the representative QP value is 30, the AI encoding apparatus 1400 may determine quantization group #3, determine the QP indicator value corresponding to quantization group #3 as 3, and AI-decode QP indicator information may be transmitted to the device 1300 . In this case, the QP indicator may be used as an element for determining one DNN configuration information among a plurality of pre-stored DNN configuration information. A method of determining one piece of DNN configuration information using a QP indicator will be described later with reference to FIG. 28 .

앞서, 도 27을 참조하여, 양자화 그룹의 개수가 6개임을 전제로 설명하였으나, 이에 제한되지 않고, 양자화 그룹의 개수는 다양할 수 있다. 또한, QP 값의 범위는 양자화 그룹마다 상이할 수 있다. QP indicator는 QP 값을 그대로 전달하지 않고, QP 값을 그룹화(레벨화)하여 복수의 양자화 그룹(또는 레벨)을 결정하고, 양자화 그룹에 대한 정보를 명시적으로 시그널링함으로써 시그널링되는 정보의 양을 크게 늘리지 않으면서 제 2 영상(135)의 적어도 일부에 보다 적합한 DNN 설정 정보를 획득할 수 있다.The above description has been made on the assumption that the number of quantization groups is six with reference to FIG. 27 , but the present invention is not limited thereto, and the number of quantization groups may vary. Also, the range of the QP value may be different for each quantization group. The QP indicator does not deliver the QP value as it is, but determines a plurality of quantization groups (or levels) by grouping (leveling) the QP values, and increases the amount of signaled information by explicitly signaling information on the quantization group. It is possible to obtain DNN setting information more suitable for at least a part of the second image 135 without increasing the number.

도 28은 QP 값과 여러 DNN 설정 정보들 사이의 매핑 관계를 나타내는 예시적인 도면이다.28 is an exemplary diagram illustrating a mapping relationship between a QP value and various pieces of DNN configuration information.

도 28에 예시된 바와 같이, AI 데이터에 포함된 영상의 적어도 일부의 양자화 그룹을 나타내는 QP indicator 값에 따라, AI 설정부(1333)는 복수의 DNN 설정 정보(예를 들어, A 내지 G DNN 설정 정보) 중 하나의 DNN 설정 정보를 결정할 수 있다.As illustrated in FIG. 28 , according to a QP indicator value indicating a quantization group of at least a part of an image included in AI data, the AI setting unit 1333 configures a plurality of DNN setting information (eg, A to G DNN settings). information), one of DNN configuration information may be determined.

또한, AI 데이터에 포함된 영상에 대한 QP 평균값이 속한 QP 값의 범위에 따라, AI 설정부(1333)는 영상에 대하여 복수의 DNN 설정 정보 중 하나의 DNN 설정 정보를 결정할 수 있다. 또한, 영상 부호화 정보에 포함된 영상의 적어도 일부의 양자화 파라미터를 기초로 QP의 대표값이 결정되고, QP 대표값이 속한 QP 값의 범위에 따라, AI 설정부(1333)는 영상의 적어도 일부에 대한 복수의 DNN 설정 정보 중 하나의 DNN 설정 정보를 결정할 수 있다.Also, according to the range of the QP value to which the average QP value for the image included in the AI data belongs, the AI setting unit 1333 may determine one piece of DNN setting information among a plurality of DNN setting information for the image. In addition, the representative value of QP is determined based on the quantization parameter of at least a part of the image included in the image encoding information, and according to the range of the QP value to which the representative QP value belongs, the AI setting unit 1333 is applied to at least a part of the image. It is possible to determine one DNN configuration information among a plurality of DNN configuration information.

앞서, AI 데이터에 포함된 영상의 적어도 일부의 양자화 그룹(또는 QP level)을 나타내는 QP indicator의 값, AI 데이터에 포함된 영상에 대한 QP 평균값 또는 영상 부호화 정보에 포함된 영상의 적어도 일부의 양자화 파라미터를 기초로 결정된 QP 대표값을 기초로 복수의 DNN 설정 정보 중 하나의 DNN 설정 정보를 결정하는 방법을 설명하였으나, 이에 제한되지 않고, 상기 언급된 QP 관련 값 정보들을 조합하여 복수의 DNN 설정 정보 중 하나의 DNN 설정 정보를 결정할 수 있음을 당업자는 이해할 수 있다. 또한, 제1 영상 또는 원본 영상 관련 정보 중 적어도 일부와 상기 QP 관련 값 정보 중 적어도 일부를 조합하여 복수의 DNN 설정 정보 중 하나의 DNN 설정 정보를 결정할 수 있음을 당업자는 이해할 수 있다.Previously, a value of a QP indicator indicating a quantization group (or QP level) of at least a part of an image included in AI data, a QP average value for an image included in AI data, or a quantization parameter of at least a part of an image included in image encoding information A method of determining one DNN configuration information among a plurality of DNN configuration information based on the QP representative value determined based on has been described, but the present invention is not limited thereto. Those skilled in the art can understand that one piece of DNN configuration information can be determined. In addition, those skilled in the art can understand that one piece of DNN configuration information among a plurality of DNN configuration information may be determined by combining at least a part of the first image or the original image related information and at least part of the QP related value information.

한편, 상술한 본 개시의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램 또는 인스트럭션으로 작성가능하고, 작성된 프로그램 또는 인스트럭션은 매체에 저장될 수 있다.Meanwhile, the above-described embodiments of the present disclosure can be written as a program or instruction that can be executed in a computer, and the written program or instruction can be stored in a medium.

매체는 컴퓨터로 실행 가능한 프로그램 또는 인스트럭션을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 애플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다.The medium may continuously store a computer-executable program or instructions, or may be a temporary storage for execution or download. In addition, the medium may be various recording means or storage means in the form of a single or several hardware combined, it is not limited to a medium directly connected to any computer system, and may exist distributed on a network. Examples of the medium include a hard disk, a magnetic medium such as a floppy disk and a magnetic tape, an optical recording medium such as CD-ROM and DVD, a magneto-optical medium such as a floppy disk, and those configured to store program instructions, including ROM, RAM, flash memory, and the like. In addition, examples of other media include recording media or storage media managed by an app store that distributes applications, sites that supply or distribute various other software, and servers.

한편, 상술한 DNN과 관련된 모델은, 소프트웨어 모듈로 구현될 수 있다. 소프트웨어 모듈(예를 들어, 명령어(instruction)를 포함하는 프로그램 모듈)로 구현되는 경우, DNN 모델은 컴퓨터로 읽을 수 있는 판독 가능한 기록매체에 저장될 수 있다.Meanwhile, the above-described DNN-related model may be implemented as a software module. When implemented as a software module (eg, a program module including instructions), the DNN model may be stored in a computer-readable recording medium.

또한, DNN 모델은 하드웨어 칩 형태로 집적되어 전술한 AI 복호화 장치(200) 또는 AI 복호화 장치(1300)의 일부가 될 수도 있다. 예를 들어, DNN 모델은 인공 지능을 위한 전용 하드웨어 칩 형태로 제작될 수도 있고, 또는 기존의 범용 프로세서(예를 들어, CPU 또는 애플리케이션 프로세서) 또는 그래픽 전용 프로세서(예를 들어, GPU)의 일부로 제작될 수도 있다.In addition, the DNN model may be integrated in the form of a hardware chip to become a part of the AI decoding apparatus 200 or the AI decoding apparatus 1300 described above. For example, a DNN model may be built in the form of a dedicated hardware chip for artificial intelligence, or as part of an existing general-purpose processor (eg, CPU or application processor) or graphics-only processor (eg, GPU). it might be

또한, DNN 모델은 다운로드 가능한 소프트웨어 형태로 제공될 수도 있다. 컴퓨터 프로그램 제품은 제조사 또는 전자 마켓을 통해 전자적으로 배포되는 소프트웨어 프로그램 형태의 상품(예를 들어, 다운로드 가능한 애플리케이션)을 포함할 수 있다. 전자적 배포를 위하여, 소프트웨어 프로그램의 적어도 일부는 저장 매체에 저장되거나, 임시적으로 생성될 수 있다. 이 경우, 저장 매체는 제조사 또는 전자 마켓의 서버, 또는 중계 서버의 저장매체가 될 수 있다.In addition, the DNN model may be provided in the form of downloadable software. The computer program product may include a product (eg, a downloadable application) in the form of a software program distributed electronically through a manufacturer or an electronic market. For electronic distribution, at least a portion of the software program may be stored in a storage medium or may be temporarily generated. In this case, the storage medium may be a server of a manufacturer or an electronic market, or a storage medium of a relay server.

이상, 본 개시의 기술적 사상을 바람직한 실시예를 들어 상세하게 설명하였으나, 본 개시의 기술적 사상은 상기 실시예들에 한정되지 않고, 본 개시의 기술적 사상의 범위 내에서 당 분야에서 통상의 지식을 가진 자에 의하여 여러 가지 변형 및 변경이 가능하다.In the above, the technical idea of the present disclosure has been described in detail with reference to preferred embodiments, but the technical idea of the present disclosure is not limited to the above embodiments, and those of ordinary skill in the art within the scope of the technical spirit of the present disclosure Various modifications and changes are possible by the person.

100: AI 부호화 장치
200: AI 복호화 장치
1300, 1350: AI 복호화 장치
1400, 1450: AI 부호화 장치
100: AI encoding device
200: AI decryption device
1300, 1350: AI decryption device
1400, 1450: AI encoding device

Claims (18)

하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고,
상기 프로세서는,
제 1 영상의 제 1 부호화 결과 획득된 영상 데이터를 포함하는 메인 비트스트림과 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 획득하고,
상기 메인 비트스트림에 포함된 영상 데이터를 제 1 복호화하여 상기 제 1 영상에 대응하는 제 2 영상을 획득하고,
상기 서브 비트스트림의 AI 데이터에 포함된 AI 업스케일 활성화 플래그 정보를 획득하고, 상기 AI 업스케일 활성화 플래그 정보를 기초로 상기 제 2 영상에 대한 AI 업스케일 수행 여부를 결정하고,
상기 제 2 영상에 대해 AI 업스케일을 수행하는 것으로 결정된 경우,
상기 영상 데이터의 적어도 일부 및 상기 서브 비트스트림에 포함된 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN을 통해, 상기 제 2 영상으로부터 AI 업스케일된 제 3 영상을 획득하고,
상기 제 3 영상이 획득된 경우, 상기 제 3 영상을 출력하고,
상기 제 2 영상에 대해 상기 AI 업스케일을 수행하지 않는 것으로 결정된 경우, 상기 제 2 영상을 출력하고,
상기 AI 업스케일 활성화 플래그 정보는 상기 제 2 영상에 AI 업스케일을 수행하는지 또는 수행하지 않는지를 나타내는 플래그 정보인 것을 특징으로 하는 AI 복호화 장치.
at least one processor executing one or more instructions;
The processor is
Obtaining a video bitstream including a main bitstream including image data obtained as a result of the first encoding of the first image and a sub-bitstream including AI data,
obtaining a second image corresponding to the first image by first decoding image data included in the main bitstream;
obtaining AI upscaling activation flag information included in the AI data of the sub-bitstream, and determining whether to perform AI upscaling on the second image based on the AI upscaling activation flag information;
When it is determined to perform AI upscaling on the second image,
Upscaling DNN set according to selected upscaling DNN information from among a plurality of upscaling DNN information stored in advance based on at least one of at least a portion of the image data and at least one of the AI sub data included in the sub bitstream Through, to obtain an AI upscaled third image from the second image,
When the third image is obtained, output the third image,
When it is determined not to perform the AI upscaling on the second image, the second image is output,
The AI upscaling activation flag information is flag information indicating whether AI upscaling is performed or not performed on the second image.
제 1 항에 있어서,
상기 서브 비트스트림에 포함된 AI 서브 데이터는, 영상의 장르를 나타내는 영상 장르 정보, 제 1 영상의 평균 양자화 값을 나타내는 평균 양자화 파라미터 정보, 제 1 영상의 적어도 일부의 양자화 정도(degree)를 나타내는 양자화 파라미터 지시자 정보, 원본 영상 및 제 1 영상 중 적어도 하나의 영상의 해상도를 나타내는 영상 해상도 정보, 원본 영상과 제 1 영상의 비율(ratio)을 나타내는 영상 비율 정보, 제 1 영상의 부호화시 이용된 코덱을 나타내는 코덱 정보, AI 업스케일 관련 추가 메타 데이터를 포함하는지 여부를 나타내는 메타 데이터 플래그 정보 및 AI 업스케일 관련 추가 메타 데이터 정보 중 적어도 하나를 포함하는 것을 특징으로 하는 AI 복호화 장치.
The method of claim 1,
AI sub data included in the sub bitstream includes image genre information indicating the genre of the image, average quantization parameter information indicating the average quantization value of the first image, and quantization indicating the quantization degree of at least a part of the first image. parameter indicator information, image resolution information indicating the resolution of at least one of the original image and the first image, image ratio information indicating the ratio of the original image and the first image, and the codec used for encoding the first image An AI decoding apparatus comprising at least one of codec information indicating, metadata flag information indicating whether additional metadata related to AI upscaling is included, and additional metadata information related to AI upscaling.
제 2 항에 있어서,
상기 프로세서는,
상기 영상 장르 정보, 상기 평균 양자화 파라미터 정보, 상기 양자화 파라미터 지시자 정보, 상기 영상 해상도 정보, 상기 영상 비율 정보 및 상기 AI 업스케일 관련 추가 메타 데이터 정보 중 적어도 하나를 기초로 복수의 업스케일용 DNN 정보 중 하나의 업스케일용 DNN 정보로 상기 업스케일용 DNN을 설정하는 것을 특징으로 하는 AI 복호화 장치.
3. The method of claim 2,
The processor is
Among the plurality of upscaling DNN information based on at least one of the image genre information, the average quantization parameter information, the quantization parameter indicator information, the image resolution information, the image ratio information, and the AI upscaling related additional metadata information AI decoding apparatus, characterized in that the upscaling DNN is set as one upscaling DNN information.
제 3 항에 있어서,
상기 양자화 파라미터 지시자 정보는 미리 결정된 복수의 양자화 파라미터 그룹 중 하나의 양자화 파라미터 그룹을 나타내는 인덱스 정보일 수 있고,
상기 프로세서는, 복수의 업스케일용 DNN 정보 중 상기 인덱스 정보가 나타내는 하나의 양자화 파라미터 그룹에 대응하는 업스케일용 DNN 정보로 업스케일용 DNN을 설정하는 것을 특징으로 하는 AI 복호화 장치.
4. The method of claim 3,
The quantization parameter indicator information may be index information indicating one quantization parameter group among a plurality of predetermined quantization parameter groups,
and the processor sets the upscaling DNN as upscaling DNN information corresponding to one quantization parameter group indicated by the index information among a plurality of upscaling DNN information.
제 2 항에 있어서,
상기 양자화 파라미터 지시자 정보는 프레임 내 서브 그룹, 프레임, 프레임 그룹, 비디오 시퀀스 중 적어도 하나의 양자화 파라미터의 (평균) 값이 포함된 양자화 파라미터 그룹을 가리키는 인덱스 정보인 것을 특징으로 하는 AI 복호화 장치.
3. The method of claim 2,
The quantization parameter indicator information is index information indicating a quantization parameter group including an (average) value of at least one quantization parameter among a subgroup in a frame, a frame, a frame group, and a video sequence.
제 1 항에 있어서,
상기 프로세서는, 상기 메인 비트스트림의 영상 데이터로부터 획득된 양자화 파라미터 정보를 기초로 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보로 상기 업스케일용 DNN를 설정한 것을 특징으로 하는 AI 복호화 장치.
The method of claim 1,
and the processor sets the upscaling DNN as the upscaling DNN information selected from among a plurality of upscaling DNN information based on the quantization parameter information obtained from the image data of the main bitstream. .
제 1 항에 있어서,
상기 메인 비트스트림은 소정의 코덱에서 정의된 비디오 비트스트림 내 소정의 메인 비트스트림 영역에 포함되고, 상기 서브 비트스트림은 소정의 코덱에서 정의된 비디오 비트스트림 내 소정의 서브 비트스트림 영역에 포함된 것을 특징으로 하는 AI 복호화 장치.
The method of claim 1,
The main bitstream is included in a predetermined main bitstream area in a video bitstream defined by a predetermined codec, and the sub-bitstream is included in a predetermined sub-bitstream area in a video bitstream defined by a predetermined codec Characterized AI decryption device.
제 7 항에 있어서,
상기 서브 비트스트림은 SEI(Supplemental Enhancement Information) 메시지인 것을 특징으로 하는 AI 복호화 장치.
8. The method of claim 7,
The sub-bitstream is an AI decoding apparatus, characterized in that the SEI (Supplemental Enhancement Information) message.
제 8 항에 있어서,
상기 SEI 메시지는 소정의 표준에 의해 등록된 사용자 데이터 또는 UUID(Universally Unique Identifier)에 의해 식별되는 등록되지 않은(Unregistered) 사용자 데이터를 포함하는 SEI 메시지인 것을 특징으로 하는 AI 복호화 장치.
9. The method of claim 8,
The SEI message is an SEI message including user data registered by a predetermined standard or unregistered user data identified by a Universally Unique Identifier (UUID).
제 2 항에 있어서,
상기 서브 비트스트림은 메타데이터 OBU(Open Bitstream Unit)인 것을 특징으로 하는 AI 복호화 장치.
3. The method of claim 2,
The sub-bitstream is an AI decoding apparatus, characterized in that the metadata OBU (Open Bitstream Unit).
AI 부호화 데이터를 포함하는 비디오 비트스트림이 저장된 컴퓨터로 기록가능한 기록 매체에 있어서,
상기 비디오 비트스트림은,
원본 영상을 AI 다운스케일하여 획득된 제 1 영상의 부호화 정보를 포함하는 메인 비트스트림; 및
제 2 영상의 AI 업스케일에 대한 AI 데이터를 포함하는 서브 비트스트림을 포함하고, 상기 제 2 영상은 상기 메인 비트스트림에 포함된 제1 영상의 부호화 정보를 복호화하여 획득된, 상기 제 1 영상의 대응 영상이고,
상기 서브 비트스트림은,
상기 제 2 영상에 대한 AI 업스케일을 수행하는지 또는 수행하지 않는지를 나타내는 AI 업스케일 활성화 플래그 정보; 및
상기 제 2 영상에 대한 AI 업스케일이 수행되는 경우, 미리 저장된 복수의 업스케일용 DNN 정보 중 업스케일용 DNN 정보를 선택하기 위해 이용되는 AI 서브 데이터를 포함하는 것을 특징으로 하는 컴퓨터로 기록가능한 기록 매체.
A computer-recordable recording medium storing a video bitstream including AI-encoded data, the recording medium comprising:
The video bitstream is
a main bitstream including encoding information of a first image obtained by AI downscaling the original image; and
and a sub-bitstream including AI data for AI upscaling of a second image, wherein the second image is obtained by decoding encoding information of the first image included in the main bitstream. corresponding video,
The sub-bitstream is
AI upscaling activation flag information indicating whether AI upscaling is performed or not performed on the second image; and
When AI upscaling of the second image is performed, computer recordable record comprising AI sub data used to select upscaling DNN information from among a plurality of pre-stored upscaling DNN information media.
하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고,
상기 프로세서는,
원본 영상의 AI 다운스케일 여부를 결정하고,
상기 결정 결과를 기초로, 다운스케일용 DNN을 이용하여 상기 원본 영상으로부터 AI 다운스케일된 제 1 영상을 획득하고,
상기 제 1 영상을 제 1 부호화하여 영상 데이터를 획득하고,
상기 원본 영상의 AI 다운스케일 여부에 대응하는 AI 업스케일 여부를 나타내는 AI 업스케일 활성화 플래그 정보를 생성하고,
상기 원본 영상에 대해 상기 AI 다운스케일을 수행하는 것으로 결정된 경우, 상기 AI 다운스케일에 대응하는 AI 업스케일과 관련된 AI 서브 데이터를 생성하고,
상기 AI 업스케일 활성화 플래그 정보 및 상기 AI 서브 데이터를 포함하는 AI 데이터를 생성하고,
상기 영상 데이터를 포함하는 메인 비트스트림과 상기 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 생성하고,
상기 비디오 비트스트림을 전송하고,
상기 영상 데이터의 적어도 일부 및 상기 AI 업스케일과 관련된 AI 서브 데이터의 적어도 일부 중 적어도 하나는 미리 저장된 복수의 업스케일용 DNN 설정 정보 중 업스케일용 DNN 설정 정보를 선택하기 위해 이용되는 정보이고,
상기 선택된 업스케일용 DNN 설정 정보로 AI 업스케일에 이용되는 업스케일용 DNN이 설정되고,
상기 AI 업스케일 활성화 플래그 정보는 AI 업스케일을 수행하는지 또는 수행하지 않는지를 나타내는 플래그 정보인 것을 특징으로 하는 AI 부호화 장치.
at least one processor executing one or more instructions;
The processor is
Determines whether or not to downscale the original video by AI,
Based on the determination result, an AI downscaled first image is obtained from the original image using a downscale DNN,
Obtaining image data by first encoding the first image,
generating AI upscaling activation flag information indicating whether AI upscaling corresponding to AI downscaling of the original video;
When it is determined to perform the AI downscaling on the original image, generate AI sub data related to AI upscaling corresponding to the AI downscaling,
generating AI data including the AI upscale activation flag information and the AI sub data;
generating a video bitstream including a main bitstream including the image data and a sub bitstream including the AI data;
transmit the video bitstream;
At least one of at least a part of the image data and at least a part of the AI sub data related to the AI upscaling is information used to select DNN setting information for upscaling from among a plurality of pre-stored DNN setting information for upscaling,
The DNN for upscaling used for AI upscaling is set as the selected DNN for upscaling setting information,
The AI upscaling activation flag information is flag information indicating whether AI upscaling is performed or not.
영상의 AI 복호화 방법에 있어서,
제 1 영상의 제 1 부호화 결과 획득된 영상 데이터를 포함하는 메인 비트스트림 및 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 획득하는 단계;
상기 메인 비트스트림에 포함된 영상 데이터를 제 1 복호화하여 상기 제 1 영상에 대응하는 제 2 영상을 획득하는 단계;
상기 서브 비트스트림의 AI 데이터에 포함된 AI 업스케일 활성화 플래그 정보를 획득하고,
상기 AI 업스케일 활성화 플래그 정보를 기초로, 상기 제 2 영상에 대한 AI 업스케일 수행 여부를 결정하는 단계;
상기 제 2 영상에 대해 AI 업스케일을 수행하는 것으로 결정된 경우,
상기 영상 데이터의 적어도 일부 및 상기 서브 비트스트림에 포함된 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN을 통해, 상기 제 2 영상으로부터 AI 업스케일된 제 3 영상을 획득하는 단계;
상기 제 3 영상이 획득된 경우, 상기 제 3 영상을 출력하는 단계; 및
상기 제 2 영상에 대해 상기 AI 업스케일을 수행하지 않는 것으로 결정된 경우, 상기 제 2 영상을 출력하는 단계를 포함하고,
상기 AI 업스케일 활성화 플래그 정보는 상기 제 2 영상에 AI 업스케일을 수행하는지 또는 수행하지 않는지를 나타내는 것을 특징으로 하는 AI 복호화 방법.
In the AI decoding method of an image,
obtaining a video bitstream including a main bitstream including image data obtained as a result of a first encoding of a first image and a sub bitstream including AI data;
obtaining a second image corresponding to the first image by first decoding image data included in the main bitstream;
Obtaining AI upscaling activation flag information included in AI data of the sub-bitstream,
determining whether to perform AI upscaling on the second image based on the AI upscaling activation flag information;
When it is determined to perform AI upscaling on the second image,
Upscaling DNN set according to selected upscaling DNN information from among a plurality of upscaling DNN information stored in advance based on at least one of at least a portion of the image data and at least one of the AI sub data included in the sub bitstream through, acquiring an AI upscaled third image from the second image;
outputting the third image when the third image is obtained; and
outputting the second image when it is determined not to perform the AI upscaling on the second image;
The AI upscaling activation flag information indicates whether AI upscaling is performed or not performed on the second image.
영상의 AI 부호화 방법에 있어서,
원본 영상의 AI 다운스케일 여부를 결정하는 단계;
상기 결정 결과를 기초로, 다운스케일용 DNN을 이용하여 상기 원본 영상으로부터 AI 다운스케일된 제 1 영상을 획득하는 단계;
상기 제 1 영상을 제 1 부호화하여 영상 데이터를 획득하는 단계;
상기 원본 영상의 AI 다운스케일 여부에 대응하는 AI 업스케일 활성화 플래그 정보를 생성하고, 상기 원본 영상에 대해 상기 AI 다운스케일을 수행하는 것으로 결정된 경우, 상기 AI 다운스케일에 대응하는 AI 업스케일과 관련된 AI 서브 데이터를 생성하는 단계;
상기 AI 업스케일 활성화 플래그 정보 및 상기 AI 서브 데이터를 포함하는 AI 데이터를 생성하는 단계;
상기 영상 데이터를 포함하는 메인 비트스트림과 상기 AI 데이터를 포함하는 서브 비트스트림을 포함하는 비디오 비트스트림을 생성하는 단계; 및
상기 비디오 비트스트림을 전송하는 단계를 포함하고,
상기 영상 데이터의 적어도 일부 및 상기 AI 업스케일과 관련된 AI 서브 데이터의 적어도 일부 중 적어도 하나는 미리 저장된 복수의 업스케일용 DNN 설정 정보 중 업스케일용 DNN 설정 정보를 선택하기 위해 이용되는 정보이고,
상기 선택된 업스케일용 DNN 설정 정보로 AI 업스케일에 이용되는 업스케일용 DNN이 설정되고,
상기 AI 업스케일 활성화 플래그 정보는 AI 업스케일을 수행하는지 또는 수행하지 않는지를 나타내는 플래그 정보인 것을 특징으로 하는 AI 부호화 방법.
In the AI encoding method of an image,
determining whether to downscale the original video by AI;
obtaining an AI downscaled first image from the original image using a downscaling DNN based on the determination result;
obtaining image data by first encoding the first image;
Generates AI upscaling activation flag information corresponding to whether or not to downscale the AI of the original video, and when it is determined to perform the AI downscaling on the original video, AI related to the AI upscaling corresponding to the AI downscaling generating sub data;
generating AI data including the AI upscale activation flag information and the AI sub data;
generating a video bitstream including a main bitstream including the image data and a sub bitstream including the AI data; and
transmitting the video bitstream;
At least one of at least a part of the image data and at least a part of the AI sub data related to the AI upscaling is information used to select DNN setting information for upscaling from among a plurality of pre-stored DNN setting information for upscaling,
The DNN for upscaling used for AI upscaling is set as the selected DNN for upscaling setting information,
The AI upscaling activation flag information is flag information indicating whether AI upscaling is performed or not.
제 13 항의 방법을 실행하기 위한 프로그램을 기록하는 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium recording a program for executing the method of claim 13. 하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고,
상기 프로세서는,
제 1 영상의 제 1 부호화 결과 획득된 영상 데이터 및 AI 데이터를 포함하는 비디오 비트스트림을 획득하고,
상기 영상 데이터를 제 1 복호화하여 상기 제 1 영상에 대응하는 제 2 영상을 획득하고,
상기 AI 데이터에 포함된 AI 업스케일 활성화 플래그 정보를 획득하고, 상기 AI 업스케일 활성화 플래그 정보를 기초로 상기 제 2 영상에 대한 AI 업스케일 수행 여부를 결정하고,
상기 제 2 영상에 대해 AI 업스케일을 수행하는 것으로 결정된 경우,
상기 영상 데이터의 적어도 일부 및 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로, 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN을 통해, 상기 제 2 영상으로부터 AI 업스케일된 제 3 영상을 획득하고,
상기 제 3 영상이 획득된 경우, 상기 제 3 영상을 출력하고,
상기 제 2 영상에 대해 상기 AI 업스케일을 수행하지 않는 것으로 결정된 경우, 상기 제 2 영상을 출력하고,
상기 AI 업스케일 활성화 플래그 정보는 상기 제 2 영상에 AI 업스케일을 수행하는지 또는 수행하지 않는지를 나타내는 플래그 정보이고,
상기 AI 데이터는 상기 영상 데이터와 관련된 부호화 파라미터를 포함하는 소정의 데이터 단위의 헤더에 포함되는 것을 특징으로 하는 AI 복호화 장치.
at least one processor executing one or more instructions;
The processor is
Obtaining a video bitstream including image data and AI data obtained as a result of the first encoding of the first image,
obtaining a second image corresponding to the first image by first decoding the image data;
obtaining AI upscaling activation flag information included in the AI data, and determining whether to perform AI upscaling on the second image based on the AI upscaling activation flag information;
When it is determined to perform AI upscaling on the second image,
Based on at least one of at least a portion of the image data and at least a portion of the AI sub-data, through the upscaling DNN set according to the upscaling DNN information selected from among a plurality of pre-stored upscaling DNN information, the second image Acquire the AI upscaled third image from
When the third image is obtained, output the third image,
When it is determined not to perform the AI upscaling on the second image, the second image is output,
The AI upscaling activation flag information is flag information indicating whether AI upscaling is performed or not performed on the second image,
The AI decoding apparatus according to claim 1, wherein the AI data is included in a header of a predetermined data unit including an encoding parameter related to the image data.
하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고,
상기 프로세서는,
제 1 영상의 제 1 부호화 결과 획득된 영상 데이터와 AI 데이터를 포함하는 AI 부호화 데이터를 포함하는 비디오 파일을 획득하고,
상기 영상 데이터를 제 1 복호화하여 상기 제 1 영상에 대응하는 제 2 영상을 획득하고,
상기 AI 데이터에 포함된 AI 업스케일 활성화 플래그 정보를 획득하고, 상기 AI 업스케일 활성화 플래그 정보를 기초로 상기 제 2 영상에 대한 AI 업스케일 수행 여부를 결정하고,
상기 제 2 영상에 대해 AI 업스케일을 수행하는 것으로 결정된 경우,
상기 영상 데이터의 적어도 일부 및 AI 서브 데이터의 적어도 일부 중 적어도 하나를 기초로 미리 저장된 복수의 업스케일용 DNN 정보 중 선택된 업스케일용 DNN 정보에 따라 설정된 업스케일용 DNN을 통해, 상기 제 2 영상으로부터 AI 업스케일된 제 3 영상을 획득하고,
상기 제 3 영상이 획득된 경우, 상기 제 3 영상을 출력하고,
상기 제 2 영상에 대해 상기 AI 업스케일을 수행하지 않는 것으로 결정된 경우, 상기 제 2 영상을 출력하고,
상기 AI 업스케일 활성화 플래그 정보는 상기 제 2 영상에 AI 업스케일을 수행하는지 또는 수행하지 않는지를 나타내는 플래그 정보이고,
상기 비디오 파일은 상기 영상 데이터를 포함하는 미디어 데이터 박스; 및 상기 영상 데이터에 관한 메타 데이터를 포함하는 메타 데이터 박스를 포함하고, 상기 메타 데이터 박스는 상기 AI 데이터를 포함하는 것을 특징으로 하는 AI 복호화 장치.
at least one processor executing one or more instructions;
The processor is
Obtaining a video file including AI-encoded data including image data obtained as a result of the first encoding of the first image and AI data,
obtaining a second image corresponding to the first image by first decoding the image data;
obtaining AI upscaling activation flag information included in the AI data, and determining whether to perform AI upscaling on the second image based on the AI upscaling activation flag information;
When it is determined to perform AI upscaling on the second image,
From the second image through the upscaling DNN set according to the selected upscaling DNN information from among a plurality of upscaling DNN information stored in advance based on at least one of at least one of at least a portion of the image data and at least one of the AI sub data Acquire the AI upscaled third image,
When the third image is obtained, output the third image,
When it is determined not to perform the AI upscaling on the second image, the second image is output,
The AI upscaling activation flag information is flag information indicating whether AI upscaling is performed or not performed on the second image,
The video file may include: a media data box including the image data; and a metadata box including metadata related to the image data, wherein the metadata box includes the AI data.
하나 이상의 인스트럭션들을 실행하는 적어도 하나의 프로세서를 포함하고,
상기 프로세서는,
원본 영상의 AI 다운스케일 여부를 결정하고,
상기 결정 결과를 기초로, 다운스케일용 DNN을 이용하여 상기 원본 영상으로부터 AI 다운스케일된 제 1 영상을 획득하고,
상기 제 1 영상을 제 1 부호화하여 영상 데이터를 획득하고,
상기 원본 영상의 AI 다운스케일 여부에 대응하는 AI 업스케일 활성화 플래그 정보를 생성하고,
상기 원본 영상에 대해 상기 AI 다운스케일을 수행하는 것으로 결정된 경우, 상기 AI 다운스케일에 대응하는 AI 업스케일과 관련된 AI 서브 데이터를 생성하고,
상기 AI 업스케일 활성화 플래그 정보 및 상기 AI 서브 데이터를 포함하는 AI 데이터를 생성하고,
상기 영상 데이터 및 상기 AI 데이터를 포함하는 AI 부호화 데이터를 포함하는 비디오 파일을 전송하고,
상기 영상 데이터의 적어도 일부 및 상기 AI 업스케일과 관련된 AI 서브 데이터의 적어도 일부 중 적어도 하나는 미리 저장된 복수의 업스케일용 DNN 설정 정보 중 업스케일용 DNN 설정 정보를 선택하기 위해 이용되는 정보이고,
상기 선택된 업스케일용 DNN 설정 정보로 AI 업스케일에 이용되는 업스케일용 DNN이 설정되고,
상기 비디오 파일은 상기 영상 데이터를 포함하는 미디어 데이터 박스; 및 상기 영상 데이터에 관한 메타 데이터를 포함하는 메타 데이터 박스를 포함하고, 상기 메타 데이터 박스는 상기 AI 데이터를 포함하고,
상기 AI 업스케일 활성화 플래그 정보는 AI 업스케일을 수행하는지 또는 수행하지 않는지를 나타내는 플래그 정보인 것을 특징으로 하는, AI 부호화 장치.
at least one processor executing one or more instructions;
The processor is
Determines whether or not to downscale the original video by AI,
Based on the determination result, an AI downscaled first image is obtained from the original image using a downscale DNN,
Obtaining image data by first encoding the first image,
generating AI upscaling activation flag information corresponding to whether AI downscaling of the original video is performed,
When it is determined to perform the AI downscaling on the original image, generate AI sub data related to AI upscaling corresponding to the AI downscaling,
generating AI data including the AI upscale activation flag information and the AI sub data;
Transmitting a video file including AI-encoded data including the image data and the AI data,
At least one of at least a part of the image data and at least a part of the AI sub data related to the AI upscaling is information used to select DNN setting information for upscaling from among a plurality of pre-stored DNN setting information for upscaling,
The DNN for upscaling used for AI upscaling is set as the selected DNN for upscaling setting information,
The video file may include: a media data box including the image data; and a metadata box including metadata about the image data, wherein the metadata box includes the AI data,
The AI upscaling activation flag information is flag information indicating whether AI upscaling is performed or not.
KR1020200132976A 2020-05-29 2020-10-14 Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding of image KR102421720B1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US17/333,541 US11223841B2 (en) 2020-05-29 2021-05-28 Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding on image
CN202180027171.1A CN115398481A (en) 2020-05-29 2021-05-31 Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding on image
PCT/KR2021/006735 WO2021242066A1 (en) 2020-05-29 2021-05-31 Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding on image
EP21812423.8A EP4052226A4 (en) 2020-05-29 2021-05-31 Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding on image

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20200065182 2020-05-29
KR1020200065182 2020-05-29

Publications (2)

Publication Number Publication Date
KR20210147830A KR20210147830A (en) 2021-12-07
KR102421720B1 true KR102421720B1 (en) 2022-07-18

Family

ID=78868601

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200132976A KR102421720B1 (en) 2020-05-29 2020-10-14 Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding of image

Country Status (1)

Country Link
KR (1) KR102421720B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023172017A1 (en) * 2022-03-07 2023-09-14 엘지전자 주식회사 Feature encoding/decoding method, device, recording medium storing bitstream, and method for transmitting bitstream

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5592960B2 (en) * 2010-03-03 2014-09-17 サムスン エレクトロニクス カンパニー リミテッド Apparatus and method for recording and reproducing media file and recording medium thereof
KR20130116782A (en) * 2012-04-16 2013-10-24 한국전자통신연구원 Scalable layer description for scalable coded video bitstream
MX2019000506A (en) * 2016-07-14 2019-03-28 Samsung Electronics Co Ltd Video decoding method and device therefor, and video encoding method and device therefor.
KR102525577B1 (en) * 2018-10-19 2023-04-26 삼성전자주식회사 Method and apparatus for streaming data

Also Published As

Publication number Publication date
KR20210147830A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
KR102525578B1 (en) Method and Apparatus for video encoding and Method and Apparatus for video decoding
US11778171B2 (en) Apparatus, a method and a computer program for video coding and decoding
KR102287947B1 (en) Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding of image
US20220239949A1 (en) An apparatus, a method and a computer program for video encoding and decoding
EP3906699A1 (en) An apparatus, a method and a computer program for video coding and decoding
US20140307775A1 (en) Method and device for partitioning an image
US11223841B2 (en) Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding on image
KR101751221B1 (en) Efficient transcoding for backward-compatible vdr codec
EP3906675A1 (en) An apparatus, a method and a computer program for video coding and decoding
KR20210113131A (en) Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding of image
CN112868229A (en) Method and apparatus for streaming data
KR102287942B1 (en) Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding of image using pre-processing
KR102421720B1 (en) Apparatus and method for performing artificial intelligence encoding and artificial intelligence decoding of image
KR102436512B1 (en) Method and Apparatus for video encoding and Method and Apparatus for video decoding
US20220405884A1 (en) Method and apparatus for adaptive artificial intelligence downscaling for upscaling during video telephone call
US11816872B2 (en) Method and apparatus for performing artificial intelligence encoding and artificial intelligence decoding
KR20220063063A (en) A method and an apparatus for performing artificial intelligence encoding and artificial intelligence decoding
KR102421718B1 (en) A method and an apparatus for performing artificial intelligence encoding and artificial intelligence decoding
US20230196505A1 (en) Artificial intelligence-based image providing apparatus and method, and artificial intelligence-based display apparatus and method
EP4228268A1 (en) Method and device for performing artificial intelligence encoding and artificial intelligence decoding
EP4195154A1 (en) Ai encoding apparatus and operation method thereof, and ai decoding apparatus and operation method thereof
KR20210154700A (en) A method and an apparatus for adaptive artificial intelligence downscaling for upscaling during video telephone call
CN116601963A (en) Method and apparatus for generating/receiving media file including NAL unit array information and method for transmitting the media file
JP2023516249A (en) High-level syntax for video encoding and decoding
JP2019097013A (en) Method for restructuring display-adaptive hdr image and device

Legal Events

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