Libav
Macros | Functions | Variables
hevc.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/md5.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/stereo3d.h"
#include "bytestream.h"
#include "cabac_functions.h"
#include "dsputil.h"
#include "golomb.h"
#include "hevc.h"

Go to the source code of this file.

Macros

#define CTB(tab, x, y)   ((tab)[(y) * s->sps->ctb_width + (x)])
 
#define SET_SAO(elem, value)
 
#define GET_COORD(offset, n)
 
#define POS(c_idx, x, y)
 
#define SUBDIVIDE(x, y)
 
#define STARTCODE_TEST
 
#define OFFSET(x)   offsetof(HEVCContext, x)
 
#define PAR   (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
 

Functions

static void pic_arrays_free (HEVCContext *s)
 NOTE: Each function hls_foo correspond to the function foo in the specification (HLS stands for High Level Syntax). More...
 
static int pic_arrays_init (HEVCContext *s, const HEVCSPS *sps)
 
static void pred_weight_table (HEVCContext *s, GetBitContext *gb)
 
static int decode_lt_rps (HEVCContext *s, LongTermRPS *rps, GetBitContext *gb)
 
static int set_sps (HEVCContext *s, const HEVCSPS *sps)
 
static int hls_slice_header (HEVCContext *s)
 
static void hls_sao_param (HEVCContext *s, int rx, int ry)
 
static void hls_residual_coding (HEVCContext *s, int x0, int y0, int log2_trafo_size, enum ScanType scan_idx, int c_idx)
 
static int hls_transform_unit (HEVCContext *s, int x0, int y0, int xBase, int yBase, int cb_xBase, int cb_yBase, int log2_cb_size, int log2_trafo_size, int trafo_depth, int blk_idx)
 
static void set_deblocking_bypass (HEVCContext *s, int x0, int y0, int log2_cb_size)
 
static int hls_transform_tree (HEVCContext *s, int x0, int y0, int xBase, int yBase, int cb_xBase, int cb_yBase, int log2_cb_size, int log2_trafo_size, int trafo_depth, int blk_idx)
 
static int hls_pcm_sample (HEVCContext *s, int x0, int y0, int log2_cb_size)
 
static void hls_mvd_coding (HEVCContext *s, int x0, int y0, int log2_cb_size)
 
static void luma_mc (HEVCContext *s, int16_t *dst, ptrdiff_t dststride, AVFrame *ref, const Mv *mv, int x_off, int y_off, int block_w, int block_h)
 8.5.3.2.2.1 Luma sample interpolation process More...
 
static void chroma_mc (HEVCContext *s, int16_t *dst1, int16_t *dst2, ptrdiff_t dststride, AVFrame *ref, const Mv *mv, int x_off, int y_off, int block_w, int block_h)
 8.5.3.2.2.2 Chroma sample interpolation process More...
 
static void hevc_await_progress (HEVCContext *s, HEVCFrame *ref, const Mv *mv, int y0, int height)
 
static void hls_prediction_unit (HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int partIdx)
 
static int luma_intra_pred_mode (HEVCContext *s, int x0, int y0, int pu_size, int prev_intra_luma_pred_flag)
 8.4.1 More...
 
static av_always_inline void set_ct_depth (HEVCContext *s, int x0, int y0, int log2_cb_size, int ct_depth)
 
static void intra_prediction_unit (HEVCContext *s, int x0, int y0, int log2_cb_size)
 
static void intra_prediction_unit_default_value (HEVCContext *s, int x0, int y0, int log2_cb_size)
 
static int hls_coding_unit (HEVCContext *s, int x0, int y0, int log2_cb_size)
 
static int hls_coding_quadtree (HEVCContext *s, int x0, int y0, int log2_cb_size, int cb_depth)
 
static void hls_decode_neighbour (HEVCContext *s, int x_ctb, int y_ctb, int ctb_addr_ts)
 
static int hls_slice_data (HEVCContext *s)
 
static int hls_nal_unit (HEVCContext *s)
 
static void restore_tqb_pixels (HEVCContext *s)
 
static int set_side_data (HEVCContext *s)
 
static int hevc_frame_start (HEVCContext *s)
 
static int decode_nal_unit (HEVCContext *s, const uint8_t *nal, int length)
 
static int extract_rbsp (const uint8_t *src, int length, HEVCNAL *nal)
 
static int decode_nal_units (HEVCContext *s, const uint8_t *buf, int length)
 
static void print_md5 (void *log_ctx, int level, uint8_t md5[16])
 
static int verify_md5 (HEVCContext *s, AVFrame *frame)
 
static int hevc_decode_frame (AVCodecContext *avctx, void *data, int *got_output, AVPacket *avpkt)
 
static int hevc_ref_frame (HEVCContext *s, HEVCFrame *dst, HEVCFrame *src)
 
static av_cold int hevc_decode_free (AVCodecContext *avctx)
 
static av_cold int hevc_init_context (AVCodecContext *avctx)
 
static int hevc_update_thread_context (AVCodecContext *dst, const AVCodecContext *src)
 
static int hevc_decode_extradata (HEVCContext *s)
 
static av_cold int hevc_decode_init (AVCodecContext *avctx)
 
static av_cold int hevc_init_thread_copy (AVCodecContext *avctx)
 
static void hevc_decode_flush (AVCodecContext *avctx)
 

Variables

const uint8_t ff_hevc_qpel_extra_before [4] = { 0, 3, 3, 2 }
 
const uint8_t ff_hevc_qpel_extra_after [4] = { 0, 3, 4, 4 }
 
const uint8_t ff_hevc_qpel_extra [4] = { 0, 6, 7, 6 }
 
static const uint8_t scan_1x1 [1] = { 0 }
 
static const uint8_t horiz_scan2x2_x [4] = { 0, 1, 0, 1 }
 
static const uint8_t horiz_scan2x2_y [4] = { 0, 0, 1, 1 }
 
static const uint8_t horiz_scan4x4_x [16]
 
static const uint8_t horiz_scan4x4_y [16]
 
static const uint8_t horiz_scan8x8_inv [8][8]
 
static const uint8_t diag_scan2x2_x [4] = { 0, 0, 1, 1 }
 
static const uint8_t diag_scan2x2_y [4] = { 0, 1, 0, 1 }
 
static const uint8_t diag_scan2x2_inv [2][2]
 
const uint8_t ff_hevc_diag_scan4x4_x [16]
 
const uint8_t ff_hevc_diag_scan4x4_y [16]
 
static const uint8_t diag_scan4x4_inv [4][4]
 
const uint8_t ff_hevc_diag_scan8x8_x [64]
 
const uint8_t ff_hevc_diag_scan8x8_y [64]
 
static const uint8_t diag_scan8x8_inv [8][8]
 
static const AVProfile profiles []
 
static const AVOption options []
 
static const AVClass hevc_decoder_class
 
AVCodec ff_hevc_decoder
 

Macro Definition Documentation

#define CTB (   tab,
  x,
 
)    ((tab)[(y) * s->sps->ctb_width + (x)])

Definition at line 798 of file hevc.c.

Referenced by hls_sao_param().

#define SET_SAO (   elem,
  value 
)
Value:
do { \
if (!sao_merge_up_flag && !sao_merge_left_flag) \
sao->elem = value; \
else if (sao_merge_left_flag) \
sao->elem = CTB(s->sao, rx-1, ry).elem; \
else if (sao_merge_up_flag) \
sao->elem = CTB(s->sao, rx, ry-1).elem; \
else \
sao->elem = 0; \
} while (0)
if(ac->has_optimized_func)
#define CTB(tab, x, y)
Definition: hevc.c:798

Definition at line 800 of file hevc.c.

Referenced by hls_sao_param().

#define GET_COORD (   offset,
 
)
Value:
do { \
x_c = (scan_x_cg[offset >> 4] << 2) + scan_x_off[n]; \
y_c = (scan_y_cg[offset >> 4] << 2) + scan_y_off[n]; \
} while (0)

Referenced by hls_residual_coding().

#define POS (   c_idx,
  x,
 
)
Value:
&s->frame->data[c_idx][((y) >> s->sps->vshift[c_idx]) * s->frame->linesize[c_idx] + \
(((x) >> s->sps->hshift[c_idx]) << s->sps->pixel_shift)]

Referenced by hls_prediction_unit().

#define SUBDIVIDE (   x,
 
)
Value:
do { \
if (x < s->sps->width && y < s->sps->height) { \
int ret = hls_coding_quadtree(s, x, y, log2_cb_size, cb_depth);\
if (ret < 0) \
return ret; \
} \
} while (0)
return
if(ac->has_optimized_func)
static int hls_coding_quadtree(HEVCContext *s, int x0, int y0, int log2_cb_size, int cb_depth)
Definition: hevc.c:2228

Referenced by hls_coding_quadtree().

#define STARTCODE_TEST
Value:
if (i + 2 < length && src[i + 1] == 0 && src[i + 2] <= 3) { \
if (src[i + 2] != 3) { \
/* startcode, so we must be past the end */ \
length = i; \
} \
break; \
}
if(ac->has_optimized_func)

Referenced by extract_rbsp().

#define OFFSET (   x)    offsetof(HEVCContext, x)

Definition at line 3234 of file hevc.c.

Definition at line 3235 of file hevc.c.

Function Documentation

static void pic_arrays_free ( HEVCContext s)
static

NOTE: Each function hls_foo correspond to the function foo in the specification (HLS stands for High Level Syntax).

Section 5.7

Definition at line 164 of file hevc.c.

Referenced by hevc_decode_free(), pic_arrays_init(), and set_sps().

static int pic_arrays_init ( HEVCContext s,
const HEVCSPS sps 
)
static

Definition at line 189 of file hevc.c.

Referenced by set_sps().

static void pred_weight_table ( HEVCContext s,
GetBitContext gb 
)
static

Definition at line 247 of file hevc.c.

Referenced by hls_slice_header().

static int decode_lt_rps ( HEVCContext s,
LongTermRPS rps,
GetBitContext gb 
)
static

Definition at line 336 of file hevc.c.

Referenced by hls_slice_header().

static int set_sps ( HEVCContext s,
const HEVCSPS sps 
)
static

Definition at line 388 of file hevc.c.

Referenced by hevc_update_thread_context(), and hls_slice_header().

static int hls_slice_header ( HEVCContext s)
static

Definition at line 457 of file hevc.c.

Referenced by decode_nal_unit().

static void hls_sao_param ( HEVCContext s,
int  rx,
int  ry 
)
static

Definition at line 812 of file hevc.c.

Referenced by hls_slice_data().

static void hls_residual_coding ( HEVCContext s,
int  x0,
int  y0,
int  log2_trafo_size,
enum ScanType  scan_idx,
int  c_idx 
)
static

Definition at line 883 of file hevc.c.

Referenced by hls_transform_unit().

static int hls_transform_unit ( HEVCContext s,
int  x0,
int  y0,
int  xBase,
int  yBase,
int  cb_xBase,
int  cb_yBase,
int  log2_cb_size,
int  log2_trafo_size,
int  trafo_depth,
int  blk_idx 
)
static

Definition at line 1232 of file hevc.c.

Referenced by hls_transform_tree().

static void set_deblocking_bypass ( HEVCContext s,
int  x0,
int  y0,
int  log2_cb_size 
)
static

Definition at line 1320 of file hevc.c.

Referenced by hls_coding_unit(), and hls_transform_tree().

static int hls_transform_tree ( HEVCContext s,
int  x0,
int  y0,
int  xBase,
int  yBase,
int  cb_xBase,
int  cb_yBase,
int  log2_cb_size,
int  log2_trafo_size,
int  trafo_depth,
int  blk_idx 
)
static

Definition at line 1335 of file hevc.c.

Referenced by hls_coding_unit().

static int hls_pcm_sample ( HEVCContext s,
int  x0,
int  y0,
int  log2_cb_size 
)
static

Definition at line 1455 of file hevc.c.

Referenced by hls_coding_unit().

static void hls_mvd_coding ( HEVCContext s,
int  x0,
int  y0,
int  log2_cb_size 
)
static

Definition at line 1486 of file hevc.c.

Referenced by hls_prediction_unit().

static void luma_mc ( HEVCContext s,
int16_t *  dst,
ptrdiff_t  dststride,
AVFrame ref,
const Mv mv,
int  x_off,
int  y_off,
int  block_w,
int  block_h 
)
static

8.5.3.2.2.1 Luma sample interpolation process

Parameters
sHEVC decoding context
dsttarget buffer for block data at block position
dststridestride of the dst buffer
refreference picture buffer at origin (0, 0)
mvmotion vector (relative to block position) to get pixel data from
x_offhorizontal position of block from origin (0, 0)
y_offvertical position of block from origin (0, 0)
block_wwidth of block
block_hheight of block

Definition at line 1523 of file hevc.c.

Referenced by hls_prediction_unit().

static void chroma_mc ( HEVCContext s,
int16_t *  dst1,
int16_t *  dst2,
ptrdiff_t  dststride,
AVFrame ref,
const Mv mv,
int  x_off,
int  y_off,
int  block_w,
int  block_h 
)
static

8.5.3.2.2.2 Chroma sample interpolation process

Parameters
sHEVC decoding context
dst1target buffer for block data at block position (U plane)
dst2target buffer for block data at block position (V plane)
dststridestride of the dst1 and dst2 buffers
refreference picture buffer at origin (0, 0)
mvmotion vector (relative to block position) to get pixel data from
x_offhorizontal position of block from origin (0, 0)
y_offvertical position of block from origin (0, 0)
block_wwidth of block
block_hheight of block

Definition at line 1577 of file hevc.c.

Referenced by hls_prediction_unit().

static void hevc_await_progress ( HEVCContext s,
HEVCFrame ref,
const Mv mv,
int  y0,
int  height 
)
static

Definition at line 1642 of file hevc.c.

Referenced by hls_prediction_unit().

static void hls_prediction_unit ( HEVCContext s,
int  x0,
int  y0,
int  nPbW,
int  nPbH,
int  log2_cb_size,
int  partIdx 
)
static

Definition at line 1649 of file hevc.c.

Referenced by hls_coding_unit().

static int luma_intra_pred_mode ( HEVCContext s,
int  x0,
int  y0,
int  pu_size,
int  prev_intra_luma_pred_flag 
)
static

8.4.1

Definition at line 1913 of file hevc.c.

Referenced by intra_prediction_unit().

static av_always_inline void set_ct_depth ( HEVCContext s,
int  x0,
int  y0,
int  log2_cb_size,
int  ct_depth 
)
static

Definition at line 2001 of file hevc.c.

Referenced by hls_coding_unit().

static void intra_prediction_unit ( HEVCContext s,
int  x0,
int  y0,
int  log2_cb_size 
)
static

Definition at line 2014 of file hevc.c.

Referenced by hls_coding_unit().

static void intra_prediction_unit_default_value ( HEVCContext s,
int  x0,
int  y0,
int  log2_cb_size 
)
static

Definition at line 2054 of file hevc.c.

Referenced by hls_coding_unit().

static int hls_coding_unit ( HEVCContext s,
int  x0,
int  y0,
int  log2_cb_size 
)
static

Definition at line 2076 of file hevc.c.

Referenced by hls_coding_quadtree().

static int hls_coding_quadtree ( HEVCContext s,
int  x0,
int  y0,
int  log2_cb_size,
int  cb_depth 
)
static

Definition at line 2228 of file hevc.c.

Referenced by hls_slice_data().

static void hls_decode_neighbour ( HEVCContext s,
int  x_ctb,
int  y_ctb,
int  ctb_addr_ts 
)
static

Definition at line 2280 of file hevc.c.

Referenced by hls_slice_data().

static int hls_slice_data ( HEVCContext s)
static

Definition at line 2333 of file hevc.c.

Referenced by decode_nal_unit().

static int hls_nal_unit ( HEVCContext s)
static
Returns
AVERROR_INVALIDDATA if the packet is not a valid NAL unit, 0 if the unit should be skipped, 1 otherwise

Definition at line 2378 of file hevc.c.

Referenced by decode_nal_unit(), and decode_nal_units().

static void restore_tqb_pixels ( HEVCContext s)
static

Definition at line 2400 of file hevc.c.

Referenced by decode_nal_unit().

static int set_side_data ( HEVCContext s)
static

Definition at line 2427 of file hevc.c.

Referenced by hevc_frame_start().

static int hevc_frame_start ( HEVCContext s)
static

Definition at line 2462 of file hevc.c.

Referenced by decode_nal_unit().

static int decode_nal_unit ( HEVCContext s,
const uint8_t nal,
int  length 
)
static

Definition at line 2510 of file hevc.c.

Referenced by decode_nal_units().

static int extract_rbsp ( const uint8_t src,
int  length,
HEVCNAL nal 
)
static

Definition at line 2650 of file hevc.c.

Referenced by decode_nal_units().

static int decode_nal_units ( HEVCContext s,
const uint8_t buf,
int  length 
)
static

Definition at line 2745 of file hevc.c.

Referenced by hevc_decode_extradata(), and hevc_decode_frame().

static void print_md5 ( void log_ctx,
int  level,
uint8_t  md5[16] 
)
static

Definition at line 2837 of file hevc.c.

Referenced by verify_md5().

static int verify_md5 ( HEVCContext s,
AVFrame frame 
)
static

Definition at line 2844 of file hevc.c.

Referenced by hevc_decode_frame().

static int hevc_decode_frame ( AVCodecContext avctx,
void data,
int *  got_output,
AVPacket avpkt 
)
static

Definition at line 2910 of file hevc.c.

static int hevc_ref_frame ( HEVCContext s,
HEVCFrame dst,
HEVCFrame src 
)
static

Definition at line 2954 of file hevc.c.

Referenced by hevc_update_thread_context().

static av_cold int hevc_decode_free ( AVCodecContext avctx)
static

Definition at line 2986 of file hevc.c.

Referenced by hevc_decode_init(), and hevc_init_context().

static av_cold int hevc_init_context ( AVCodecContext avctx)
static

Definition at line 3018 of file hevc.c.

Referenced by hevc_decode_init(), hevc_init_thread_copy(), and hevc_update_thread_context().

static int hevc_update_thread_context ( AVCodecContext dst,
const AVCodecContext src 
)
static

Definition at line 3057 of file hevc.c.

static int hevc_decode_extradata ( HEVCContext s)
static

Definition at line 3125 of file hevc.c.

Referenced by hevc_decode_init().

static av_cold int hevc_decode_init ( AVCodecContext avctx)
static

Definition at line 3189 of file hevc.c.

static av_cold int hevc_init_thread_copy ( AVCodecContext avctx)
static

Definition at line 3213 of file hevc.c.

static void hevc_decode_flush ( AVCodecContext avctx)
static

Definition at line 3227 of file hevc.c.

Variable Documentation

const uint8_t ff_hevc_qpel_extra_before[4] = { 0, 3, 3, 2 }

Definition at line 40 of file hevc.c.

Referenced by luma_mc().

const uint8_t ff_hevc_qpel_extra_after[4] = { 0, 3, 4, 4 }

Definition at line 41 of file hevc.c.

Referenced by luma_mc().

const uint8_t ff_hevc_qpel_extra[4] = { 0, 6, 7, 6 }

Definition at line 42 of file hevc.c.

Referenced by luma_mc().

const uint8_t scan_1x1[1] = { 0 }
static

Definition at line 44 of file hevc.c.

Referenced by hls_residual_coding().

const uint8_t horiz_scan2x2_x[4] = { 0, 1, 0, 1 }
static

Definition at line 46 of file hevc.c.

Referenced by hls_residual_coding().

const uint8_t horiz_scan2x2_y[4] = { 0, 0, 1, 1 }
static

Definition at line 48 of file hevc.c.

Referenced by hls_residual_coding().

const uint8_t horiz_scan4x4_x[16]
static
Initial value:
= {
0, 1, 2, 3,
0, 1, 2, 3,
0, 1, 2, 3,
0, 1, 2, 3,
}

Definition at line 50 of file hevc.c.

Referenced by hls_residual_coding().

const uint8_t horiz_scan4x4_y[16]
static
Initial value:
= {
0, 0, 0, 0,
1, 1, 1, 1,
2, 2, 2, 2,
3, 3, 3, 3,
}

Definition at line 57 of file hevc.c.

Referenced by hls_residual_coding().

const uint8_t horiz_scan8x8_inv[8][8]
static
Initial value:
= {
{ 0, 1, 2, 3, 16, 17, 18, 19, },
{ 4, 5, 6, 7, 20, 21, 22, 23, },
{ 8, 9, 10, 11, 24, 25, 26, 27, },
{ 12, 13, 14, 15, 28, 29, 30, 31, },
{ 32, 33, 34, 35, 48, 49, 50, 51, },
{ 36, 37, 38, 39, 52, 53, 54, 55, },
{ 40, 41, 42, 43, 56, 57, 58, 59, },
{ 44, 45, 46, 47, 60, 61, 62, 63, },
}

Definition at line 64 of file hevc.c.

Referenced by hls_residual_coding().

const uint8_t diag_scan2x2_x[4] = { 0, 0, 1, 1 }
static

Definition at line 75 of file hevc.c.

Referenced by hls_residual_coding().

const uint8_t diag_scan2x2_y[4] = { 0, 1, 0, 1 }
static

Definition at line 77 of file hevc.c.

Referenced by hls_residual_coding().

const uint8_t diag_scan2x2_inv[2][2]
static
Initial value:
= {
{ 0, 2, },
{ 1, 3, },
}

Definition at line 79 of file hevc.c.

Referenced by hls_residual_coding().

const uint8_t ff_hevc_diag_scan4x4_x[16]
Initial value:
= {
0, 0, 1, 0,
1, 2, 0, 1,
2, 3, 1, 2,
3, 2, 3, 3,
}

Definition at line 84 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

const uint8_t ff_hevc_diag_scan4x4_y[16]
Initial value:
= {
0, 1, 0, 2,
1, 0, 3, 2,
1, 0, 3, 2,
1, 3, 2, 3,
}

Definition at line 91 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

const uint8_t diag_scan4x4_inv[4][4]
static
Initial value:
= {
{ 0, 2, 5, 9, },
{ 1, 4, 8, 12, },
{ 3, 7, 11, 14, },
{ 6, 10, 13, 15, },
}

Definition at line 98 of file hevc.c.

Referenced by hls_residual_coding().

const uint8_t ff_hevc_diag_scan8x8_x[64]
Initial value:
= {
0, 0, 1, 0,
1, 2, 0, 1,
2, 3, 0, 1,
2, 3, 4, 0,
1, 2, 3, 4,
5, 0, 1, 2,
3, 4, 5, 6,
0, 1, 2, 3,
4, 5, 6, 7,
1, 2, 3, 4,
5, 6, 7, 2,
3, 4, 5, 6,
7, 3, 4, 5,
6, 7, 4, 5,
6, 7, 5, 6,
7, 6, 7, 7,
}

Definition at line 105 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

const uint8_t ff_hevc_diag_scan8x8_y[64]
Initial value:
= {
0, 1, 0, 2,
1, 0, 3, 2,
1, 0, 4, 3,
2, 1, 0, 5,
4, 3, 2, 1,
0, 6, 5, 4,
3, 2, 1, 0,
7, 6, 5, 4,
3, 2, 1, 0,
7, 6, 5, 4,
3, 2, 1, 7,
6, 5, 4, 3,
2, 7, 6, 5,
4, 3, 7, 6,
5, 4, 7, 6,
5, 7, 6, 7,
}

Definition at line 124 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

const uint8_t diag_scan8x8_inv[8][8]
static
Initial value:
= {
{ 0, 2, 5, 9, 14, 20, 27, 35, },
{ 1, 4, 8, 13, 19, 26, 34, 42, },
{ 3, 7, 12, 18, 25, 33, 41, 48, },
{ 6, 11, 17, 24, 32, 40, 47, 53, },
{ 10, 16, 23, 31, 39, 46, 52, 57, },
{ 15, 22, 30, 38, 45, 51, 56, 60, },
{ 21, 29, 37, 44, 50, 55, 59, 62, },
{ 28, 36, 43, 49, 54, 58, 61, 63, },
}

Definition at line 143 of file hevc.c.

Referenced by hls_residual_coding().

const AVProfile profiles[]
static
Initial value:
= {
{ FF_PROFILE_HEVC_MAIN, "Main" },
{ FF_PROFILE_HEVC_MAIN_10, "Main 10" },
{ FF_PROFILE_HEVC_MAIN_STILL_PICTURE, "Main Still Picture" },
}
#define FF_PROFILE_HEVC_MAIN
Definition: avcodec.h:2670
#define FF_PROFILE_HEVC_MAIN_10
Definition: avcodec.h:2671
#define FF_PROFILE_UNKNOWN
Definition: avcodec.h:2597
#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE
Definition: avcodec.h:2672

Definition at line 3237 of file hevc.c.

const AVOption options[]
static
Initial value:
= {
{ "apply_defdispwin", "Apply default display window from VUI", OFFSET(apply_defdispwin),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, PAR },
{ NULL },
}
#define PAR
Definition: hevc.c:3235
#define OFFSET(x)
Definition: hevc.c:3234
NULL
Definition: eval.c:55

Definition at line 3244 of file hevc.c.

const AVClass hevc_decoder_class
static
Initial value:
= {
.class_name = "HEVC decoder",
.item_name = av_default_item_name,
.option = options,
}
static const AVOption options[]
Definition: hevc.c:3244
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
av_default_item_name
Definition: dnxhdenc.c:45

Definition at line 3250 of file hevc.c.

AVCodec ff_hevc_decoder
Initial value:
= {
.name = "hevc",
.long_name = NULL_IF_CONFIG_SMALL("HEVC (High Efficiency Video Coding)"),
.priv_data_size = sizeof(HEVCContext),
.priv_class = &hevc_decoder_class,
.update_thread_context = hevc_update_thread_context,
.init_thread_copy = hevc_init_thread_copy,
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY |
}
static int hevc_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
Definition: hevc.c:3057
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
Definition: mimic.c:269
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:711
static void hevc_decode_flush(AVCodecContext *avctx)
Definition: hevc.c:3227
static av_cold int hevc_init_thread_copy(AVCodecContext *avctx)
Definition: hevc.c:3213
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:740
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:142
static const AVClass hevc_decoder_class
Definition: hevc.c:3250
static av_cold int hevc_decode_init(AVCodecContext *avctx)
Definition: hevc.c:3189
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:489
#define CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:782
static av_cold void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
Definition: alsdec.c:1792
static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output, AVPacket *avpkt)
Definition: hevc.c:2910
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:498
static av_cold int hevc_decode_free(AVCodecContext *avctx)
Definition: hevc.c:2986
static const AVProfile profiles[]
Definition: hevc.c:3237

Definition at line 3257 of file hevc.c.