FFmpeg
Data Structures | Macros | Functions | Variables
dnxhddec.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "blockdsp.h"
#include "get_bits.h"
#include "dnxhddata.h"
#include "idctdsp.h"
#include "internal.h"
#include "profiles.h"
#include "thread.h"

Go to the source code of this file.

Data Structures

struct  RowContext
 
struct  DNXHDContext
 

Macros

#define UNCHECKED_BITSTREAM_READER   1
 
#define DNXHD_VLC_BITS   9
 
#define DNXHD_DC_VLC_BITS   7
 

Functions

static int dnxhd_decode_dct_block_8 (const DNXHDContext *ctx, RowContext *row, int n)
 
static int dnxhd_decode_dct_block_10 (const DNXHDContext *ctx, RowContext *row, int n)
 
static int dnxhd_decode_dct_block_10_444 (const DNXHDContext *ctx, RowContext *row, int n)
 
static int dnxhd_decode_dct_block_12 (const DNXHDContext *ctx, RowContext *row, int n)
 
static int dnxhd_decode_dct_block_12_444 (const DNXHDContext *ctx, RowContext *row, int n)
 
static av_cold int dnxhd_decode_init (AVCodecContext *avctx)
 
static int dnxhd_init_vlc (DNXHDContext *ctx, uint32_t cid, int bitdepth)
 
static int dnxhd_get_profile (int cid)
 
static int dnxhd_decode_header (DNXHDContext *ctx, AVFrame *frame, const uint8_t *buf, int buf_size, int first_field)
 
static av_always_inline int dnxhd_decode_dct_block (const DNXHDContext *ctx, RowContext *row, int n, int index_bits, int level_bias, int level_shift, int dc_shift)
 
static int dnxhd_decode_macroblock (const DNXHDContext *ctx, RowContext *row, AVFrame *frame, int x, int y)
 
static int dnxhd_decode_row (AVCodecContext *avctx, void *data, int rownb, int threadnb)
 
static int dnxhd_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int dnxhd_decode_close (AVCodecContext *avctx)
 

Variables

const AVCodec ff_dnxhd_decoder
 

Macro Definition Documentation

◆ UNCHECKED_BITSTREAM_READER

#define UNCHECKED_BITSTREAM_READER   1

Definition at line 32 of file dnxhddec.c.

◆ DNXHD_VLC_BITS

#define DNXHD_VLC_BITS   9

Definition at line 79 of file dnxhddec.c.

◆ DNXHD_DC_VLC_BITS

#define DNXHD_DC_VLC_BITS   7

Definition at line 80 of file dnxhddec.c.

Function Documentation

◆ dnxhd_decode_dct_block_8()

static int dnxhd_decode_dct_block_8 ( const DNXHDContext ctx,
RowContext row,
int  n 
)
static

Definition at line 456 of file dnxhddec.c.

Referenced by dnxhd_decode_header().

◆ dnxhd_decode_dct_block_10()

static int dnxhd_decode_dct_block_10 ( const DNXHDContext ctx,
RowContext row,
int  n 
)
static

Definition at line 462 of file dnxhddec.c.

Referenced by dnxhd_decode_header().

◆ dnxhd_decode_dct_block_10_444()

static int dnxhd_decode_dct_block_10_444 ( const DNXHDContext ctx,
RowContext row,
int  n 
)
static

Definition at line 468 of file dnxhddec.c.

Referenced by dnxhd_decode_header().

◆ dnxhd_decode_dct_block_12()

static int dnxhd_decode_dct_block_12 ( const DNXHDContext ctx,
RowContext row,
int  n 
)
static

Definition at line 474 of file dnxhddec.c.

Referenced by dnxhd_decode_header().

◆ dnxhd_decode_dct_block_12_444()

static int dnxhd_decode_dct_block_12_444 ( const DNXHDContext ctx,
RowContext row,
int  n 
)
static

Definition at line 480 of file dnxhddec.c.

Referenced by dnxhd_decode_header().

◆ dnxhd_decode_init()

static av_cold int dnxhd_decode_init ( AVCodecContext avctx)
static

Definition at line 93 of file dnxhddec.c.

◆ dnxhd_init_vlc()

static int dnxhd_init_vlc ( DNXHDContext ctx,
uint32_t  cid,
int  bitdepth 
)
static

Definition at line 113 of file dnxhddec.c.

Referenced by dnxhd_decode_header().

◆ dnxhd_get_profile()

static int dnxhd_get_profile ( int  cid)
static

Definition at line 158 of file dnxhddec.c.

Referenced by dnxhd_decode_header().

◆ dnxhd_decode_header()

static int dnxhd_decode_header ( DNXHDContext ctx,
AVFrame frame,
const uint8_t *  buf,
int  buf_size,
int  first_field 
)
static

Definition at line 175 of file dnxhddec.c.

Referenced by dnxhd_decode_frame().

◆ dnxhd_decode_dct_block()

static av_always_inline int dnxhd_decode_dct_block ( const DNXHDContext ctx,
RowContext row,
int  n,
int  index_bits,
int  level_bias,
int  level_shift,
int  dc_shift 
)
static

◆ dnxhd_decode_macroblock()

static int dnxhd_decode_macroblock ( const DNXHDContext ctx,
RowContext row,
AVFrame frame,
int  x,
int  y 
)
static

Definition at line 486 of file dnxhddec.c.

Referenced by dnxhd_decode_row().

◆ dnxhd_decode_row()

static int dnxhd_decode_row ( AVCodecContext avctx,
void *  data,
int  rownb,
int  threadnb 
)
static

Definition at line 588 of file dnxhddec.c.

Referenced by dnxhd_decode_frame().

◆ dnxhd_decode_frame()

static int dnxhd_decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 615 of file dnxhddec.c.

◆ dnxhd_decode_close()

static av_cold int dnxhd_decode_close ( AVCodecContext avctx)
static

Definition at line 715 of file dnxhddec.c.

Variable Documentation

◆ ff_dnxhd_decoder

const AVCodec ff_dnxhd_decoder
Initial value:

Definition at line 728 of file dnxhddec.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
DNXHDContext
Definition: dnxhddec.c:52
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
dnxhd_decode_close
static av_cold int dnxhd_decode_close(AVCodecContext *avctx)
Definition: dnxhddec.c:715
dnxhd_decode_frame
static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: dnxhddec.c:615
ff_dnxhd_profiles
const AVProfile ff_dnxhd_profiles[]
Definition: profiles.c:48
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:113
dnxhd_decode_init
static av_cold int dnxhd_decode_init(AVCodecContext *avctx)
Definition: dnxhddec.c:93
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_CODEC_CAP_SLICE_THREADS
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: codec.h:117
profiles
static const AVProfile profiles[]
Definition: libfdk-aacenc.c:429
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_DNXHD
@ AV_CODEC_ID_DNXHD
Definition: codec_id.h:149