Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

First version of Intra only decoder (#246)

Supports only I frames without loopfilter ( deblocking, cdef, self guided restoration filters not support)
Tiles not supported
Supports only Main profile 8bit 420
Tested only on Windows
  • Loading branch information
nijilk authored and hassount committed May 24, 2019
1 parent 4dc83fc commit c7b108ad518b2f223fa7d56c3fdbd482086bc261
Showing with 12,752 additions and 114 deletions.
  1. +70 −0 Docs/svt-av1_decoder_user_guide.md
  2. +7 −0 Source/API/EbSvtAv1.h
  3. +107 −26 Source/API/EbSvtAv1Dec.h
  4. +214 −17 Source/App/DecApp/EbDecAppMain.c
  5. +176 −0 Source/App/DecApp/EbDecParamParser.c
  6. +53 −0 Source/App/DecApp/EbDecParamParser.h
  7. +120 −0 Source/App/DecApp/EbFileUtils.c
  8. +56 −0 Source/App/DecApp/EbFileUtils.h
  9. +285 −0 Source/App/DecApp/EbMD5Utility.c
  10. +40 −0 Source/App/DecApp/EbMD5Utility.h
  11. +1 −1 Source/Lib/Common/Codec/EbBitstreamUnit.h
  12. +13 −5 Source/Lib/Common/Codec/EbCabacContextModel.h
  13. +9 −8 Source/Lib/Common/Codec/EbDefinitions.h
  14. +3 −5 Source/Lib/Common/Codec/EbEntropyCoding.c
  15. +4 −0 Source/Lib/Common/Codec/EbEntropyCoding.h
  16. +194 −42 Source/Lib/Common/Codec/EbIntraPrediction.c
  17. +237 −3 Source/Lib/Common/Codec/EbIntraPrediction.h
  18. +1 −3 Source/Lib/Common/Codec/EbModeDecision.c
  19. +4 −0 Source/Lib/Common/Codec/aom_dsp_rtcd.h
  20. +87 −0 Source/Lib/Decoder/Codec/EbDecBitReader.c
  21. +74 −0 Source/Lib/Decoder/Codec/EbDecBitReader.h
  22. +121 −0 Source/Lib/Decoder/Codec/EbDecBitstream.c
  23. +90 −0 Source/Lib/Decoder/Codec/EbDecBitstream.h
  24. +266 −0 Source/Lib/Decoder/Codec/EbDecBitstreamUnit.c
  25. +270 −0 Source/Lib/Decoder/Codec/EbDecBitstreamUnit.h
  26. +354 −0 Source/Lib/Decoder/Codec/EbDecBlock.h
  27. +523 −4 Source/Lib/Decoder/Codec/EbDecHandle.c
  28. +131 −0 Source/Lib/Decoder/Codec/EbDecHandle.h
  29. +722 −0 Source/Lib/Decoder/Codec/EbDecIntraPrediction.c
  30. +34 −0 Source/Lib/Decoder/Codec/EbDecIntraPrediction.h
  31. +234 −0 Source/Lib/Decoder/Codec/EbDecInverseQuantize.c
  32. +25 −0 Source/Lib/Decoder/Codec/EbDecInverseQuantize.h
  33. +321 −0 Source/Lib/Decoder/Codec/EbDecMemInit.c
  34. +147 −0 Source/Lib/Decoder/Codec/EbDecMemInit.h
  35. +145 −0 Source/Lib/Decoder/Codec/EbDecNbr.c
  36. +26 −0 Source/Lib/Decoder/Codec/EbDecNbr.h
  37. +2,896 −0 Source/Lib/Decoder/Codec/EbDecParseBlock.c
  38. +17 −0 Source/Lib/Decoder/Codec/EbDecParseFrame.c
  39. +650 −0 Source/Lib/Decoder/Codec/EbDecParseHelper.c
  40. +61 −0 Source/Lib/Decoder/Codec/EbDecParseHelper.h
  41. +2,351 −0 Source/Lib/Decoder/Codec/EbDecParseObu.c
  42. +395 −0 Source/Lib/Decoder/Codec/EbDecProcessBlock.c
  43. +25 −0 Source/Lib/Decoder/Codec/EbDecProcessBlock.h
  44. +132 −0 Source/Lib/Decoder/Codec/EbDecProcessFrame.c
  45. +54 −0 Source/Lib/Decoder/Codec/EbDecProcessFrame.h
  46. +800 −0 Source/Lib/Decoder/Codec/EbDecStruct.h
  47. +207 −0 Source/Lib/Decoder/Codec/EbObuParse.h
@@ -0,0 +1,70 @@
# Scalable Video Technology for AV1 Decoder (SVT-AV1 Decoder) User Guide

## Table of Contents
1. [Introduction](#introduction)
2. [Known Limitations] (#known-limitations)
3. [Sample Application Guide](#sample-application-guide)
- [Running the decoder](#running-the-decoder)
4. [Legal Disclaimer](#legal-disclaimer)

## Introduction

This document describes how to use the Scalable Video Technology for AV1 Decoder (SVT-AV1). In particular, this user guide describes how to run the sample application with the respective dynamically linked library.

## Known Limitations

Initial version
- Supports only I frames without loopfilter ( deblocking, cdef, self guided restoration filters not support)
- Tiles not supported
- Supports only Main profile 8bit 420
- Tested only on Windows

## Sample Application Guide

This section describes how to run the sample decoder application that uses the SVT-AV1 Decoder library. It describes the command line input parameters and the resulting outputs.

### Running the decoder

This section describes how to run the sample decoder application SvtAv1DecApp.exe (on Windows\*) or SvtAv1DecApp (on Linux\*) from the command line, including descriptions of the most commonly used input parameters and outputs.

The sample application typically takes the following command line parameters:

-help Show usage options and exit
-i <arg> Input file name
-o <arg> Output file name
-skip <arg> Skip the first n input frames
-limit <arg> Stop decoding after n frames
-bit-depth <arg> Input bitdepth. [400, 420, 422, 444]
-w <arg> Input picture width
-h <arg> Input picture height
-colour-space <arg> Input picture colour space
-md5 MD5 support flag


Sample usage
SvtAv1DecApp.exe -i test.ivf -o out.yuv

#### List of all configuration parameters


## Legal Disclaimer

Optimization Notice: Intel compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice Revision #20110804

Intel technologies features and benefits depend on system configuration and may require enabled hardware, software or service activation. Performance varies depending on system configuration. No computer system can be absolutely secure. Check with your system manufacturer or retailer.

No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document.

Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.

The products and services described may contain defects or errors known as errata which may cause deviations from published specifications. Current characterized errata are available on request. ** ** No product or component can be absolutely secure.

This document contains information on products, services and/or processes in development. All information provided here is subject to change without notice. Contact your Intel representative to obtain the latest forecast, schedule, specifications and roadmaps.

Intel, Intel Xeon, Intel Core, the Intel logo and others are trademarks of Intel Corporation and its subsidiaries in the U.S. and/or other countries.

\*Other names and brands may be claimed as the property of others.

Copyright 2019 Intel Corporation.
@@ -96,6 +96,7 @@ typedef enum EbErrorType
EB_DecUnsupportedBitstream = (int32_t)0x40001000,
EB_DecNoOutputPicture = (int32_t)0x40001004,
EB_DecDecodingError = (int32_t)0x40001008,
EB_Corrupt_Frame = (int32_t)0x4000100C,
EB_ErrorInsufficientResources = (int32_t)0x80001000,
EB_ErrorUndefined = (int32_t)0x80001001,
EB_ErrorInvalidComponent = (int32_t)0x80001004,
@@ -119,6 +120,12 @@ typedef enum EbAv1SeqProfile
} EbAv1SeqProfile;


typedef enum AomBitDepth {
AOM_BITS_8 = 8, /**< 8 bits */
AOM_BITS_10 = 10, /**< 10 bits */
AOM_BITS_12 = 12, /**< 12 bits */
} AomBitDepth;

// For 8-bit and 10-bit packed inputs and outputs, the luma, cb, and cr fields should be used
// for the three input picture planes. However, for 10-bit unpacked planes the
// lumaExt, cbExt, and crExt fields should be used hold the extra 2-bits of
@@ -1,5 +1,5 @@
/*
* Copyright(c) 2019 Intel Corporation
* Copyright(c) 2019 Netflix, Inc.
* SPDX - License - Identifier: BSD - 2 - Clause - Patent
*/

@@ -14,16 +14,114 @@ extern "C" {
#include "EbSvtAv1.h"
#include "EbSvtAv1ExtFrameBuf.h"

typedef struct EbAV1OperatingPoint
{

typedef struct EbOperatingParametersInfo {

/*!<Specifies the time interval between the arrival of the first bit in the
* smoothing buffer and the subsequent removal of the data that belongs to
* the first coded frame for operating point*/
uint32_t decoder_buffer_delay;

/*!<Specifies, in combination with decoder_buffer_delay[op] syntax element,
* the first bit arrival time of frames to be decoded to the smoothing
* buffer */
uint32_t encoder_buffer_delay;

/*!< Equal to 1 indicates that the smoothing buffer operates in low-delay
* mode for operating point*/
uint8_t low_delay_mode_flag;

} EbOperatingParametersInfo;

typedef struct EbAV1OperatingPoint {

uint32_t op_idc;
uint32_t seq_level_idx;
uint32_t seq_tier;
uint32_t display_model_param_present;

/*!< 1 -> Indicates that there is a decoder model associated with operating
point,
* 0 -> Indicates that there is not a decoder model associated with
operating point*/
uint8_t decoder_model_present_for_this_op;

/*!< Operating Parameters Information structure*/
EbOperatingParametersInfo operating_parameters_info;

uint32_t initial_display_delay_present_for_this_op;
uint32_t initial_display_delay;
} EbAv1OperatingPoint;

typedef struct EbColorConfig {

/*!< bit depth */
AomBitDepth bit_depth;

/*!< 1: Indicates that the video does not contain U and V color planes.
* 0: Indicates that the video contains Y, U, and V color planes. */
EbBool mono_chrome;

/*!< Specify the chroma subsampling format */
uint8_t subsampling_x;

/*!< Specify the chroma subsampling format */
uint8_t subsampling_y;

/*!< 1: Specifies that color_primaries, transfer_characteristics, and
matrix_coefficients are present. color_description_present_flag
* 0: Specifies that color_primaries, transfer_characteristics and
matrix_coefficients are not present */
EbBool color_description_present_flag;

/*!< An integer that is defined by the "Color primaries" section of
* ISO/IEC 23091-4/ITU-T H.273 */
EbColorPrimaries color_primaries;

/*!< An integer that is defined by the "Transfer characteristics" section
* of ISO/IEC 23091-4/ITU-T H.273 */
EbTransferCharacteristics transfer_characteristics;

/*!< An integer that is defined by the "Matrix coefficients" section of
* ISO/IEC 23091-4/ITU-T H.273 */
EbMatrixCoefficients matrix_coefficients;

/*!< 0: shall be referred to as the studio swing representation
* 1: shall be referred to as the full swing representation */
EbColorRange color_range;

/*!< Specifies the sample position for subsampled streams */
EbChromaSamplePosition chroma_sample_position;

/*!< 1: Indicates that the U and V planes may have separate delta quantizer
* 0: Indicates that the U and V planes will share the same delta
quantizer value */
EbBool separate_uv_delta_q;

} EbColorConfig;

typedef struct EbTimingInfo {
/*!< Timing info present flag */
EbBool timing_info_present;

/*!< Number of time units of a clock operating at the frequency time_scale
* Hz that corresponds to one increment of a clock tick counter*/
uint32_t num_units_in_display_tick;

/*!< Number of time units that pass in one second*/
uint32_t time_scale;

/*!< Equal to 1 indicates that pictures should be displayed according to
* their output order with the number of ticks between two consecutive
* pictures specified by num_ticks_per_picture.*/
uint8_t equal_picture_interval;

/*!< Specifies the number of clock ticks corresponding to output time
* between two consecutive pictures in the output order.
* Range - [0 to (1 << 32) - 2]*/
uint32_t num_ticks_per_picture;

} EbTimingInfo;

typedef struct EbAV1StreamInfo
{
/*seq_profile*/
@@ -38,26 +136,10 @@ typedef struct EbAV1StreamInfo
EbAv1OperatingPoint op_points[EB_MAX_NUM_OPERATING_POINTS];

/* Display Timing Info*/
EbBool timing_info_present; // check the names
uint32_t num_units_in_display_tick;
uint32_t time_scale;
uint32_t equal_picture_interval;
uint32_t num_ticks_per_picture;

/* Color format configuration */
EbBitDepth bit_depth;
EbColorFormat color_format;
EbTimingInfo timing_info;

/* Color description */

EbBool color_description_present_flag;

EbColorPrimaries color_primaries;
EbTransferCharacteristics transfer_characteristics;
EbMatrixCoefficients matrix_coefficients;

EbChromaSamplePosition chroma_sample_position;
EbColorRange color_range;
EbColorConfig color_config;

/* Film Grain Synthesis Present */
EbBool film_grain_params_present;
@@ -170,7 +252,7 @@ typedef struct EbSvtAv1DecConfiguration
* @ *p_app_data Callback data.
* @ *config_ptr Pointer passed back to the client during callbacks, it will be
* loaded with default parameters from the library. */
EB_API EbErrorType eb_init_handle(
EB_API EbErrorType eb_dec_init_handle(
EbComponentType** p_handle,
void* p_app_data,
EbSvtAv1DecConfiguration *config_ptr);
@@ -288,7 +370,7 @@ typedef struct EbSvtAv1DecConfiguration
*
* Parameter:
* @ *svt_dec_component Decoder handle */
EB_API EbErrorType eb_deinit_handle(
EB_API EbErrorType eb_dec_deinit_handle(
EbComponentType *svt_dec_component);

/* Flush a decoder
@@ -333,5 +415,4 @@ typedef struct EbSvtAv1DecConfiguration
#ifdef __cplusplus
}
#endif // __cplusplus

#endif // EbSvtAv1Dec_h
#endif // EbSvtAv1Dec_h

0 comments on commit c7b108a

Please sign in to comment.