Libav
Macros | Functions | Variables
hevc.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/display.h"
#include "libavutil/internal.h"
#include "libavutil/md5.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/stereo3d.h"
#include "bswapdsp.h"
#include "bytestream.h"
#include "cabac_functions.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 SUBDIVIDE(x, y, idx)
 
#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, int cbf_luma, int cbf_cb, int cbf_cr)
 
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, int cbf_cb, int cbf_cr)
 
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

§ CTB

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

Definition at line 799 of file hevc.c.

Referenced by hls_sao_param().

§ SET_SAO

#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)
#define CTB(tab, x, y)
Definition: hevc.c:799

Definition at line 801 of file hevc.c.

Referenced by hls_sao_param().

§ GET_COORD

#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().

§ SUBDIVIDE [1/2]

#define SUBDIVIDE (   x,
  y,
  idx 
)
Value:
do { \
ret = hls_transform_tree(s, x, y, x0, y0, cb_xBase, cb_yBase, log2_cb_size, \
log2_trafo_size - 1, trafo_depth + 1, idx, \
cbf_cb, cbf_cr); \
if (ret < 0) \
return ret; \
} while (0)
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, int cbf_cb, int cbf_cr)
Definition: hevc.c:1335

Referenced by hls_coding_quadtree(), and hls_transform_tree().

§ POS

#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().

§ SUBDIVIDE [2/2]

#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)
static int hls_coding_quadtree(HEVCContext *s, int x0, int y0, int log2_cb_size, int cb_depth)
Definition: hevc.c:2199

§ STARTCODE_TEST

#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; \
}

Referenced by extract_rbsp().

§ OFFSET

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

Definition at line 3217 of file hevc.c.

§ PAR

Definition at line 3218 of file hevc.c.

Function Documentation

§ pic_arrays_free()

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 165 of file hevc.c.

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

§ pic_arrays_init()

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

Definition at line 189 of file hevc.c.

Referenced by set_sps().

§ pred_weight_table()

static void pred_weight_table ( HEVCContext s,
GetBitContext gb 
)
static

Definition at line 245 of file hevc.c.

Referenced by hls_slice_header().

§ decode_lt_rps()

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

Definition at line 334 of file hevc.c.

Referenced by hls_slice_header().

§ set_sps()

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

Definition at line 386 of file hevc.c.

Referenced by hevc_update_thread_context(), and hls_slice_header().

§ hls_slice_header()

static int hls_slice_header ( HEVCContext s)
static

Definition at line 456 of file hevc.c.

Referenced by decode_nal_unit().

§ hls_sao_param()

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

Definition at line 813 of file hevc.c.

Referenced by hls_slice_data().

§ hls_residual_coding()

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 884 of file hevc.c.

Referenced by hls_transform_unit().

§ 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,
int  cbf_luma,
int  cbf_cb,
int  cbf_cr 
)
static

Definition at line 1233 of file hevc.c.

Referenced by hls_transform_tree().

§ set_deblocking_bypass()

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().

§ 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,
int  cbf_cb,
int  cbf_cr 
)
static

Definition at line 1335 of file hevc.c.

Referenced by hls_coding_unit().

§ hls_pcm_sample()

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

Definition at line 1432 of file hevc.c.

Referenced by hls_coding_unit().

§ hls_mvd_coding()

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

Definition at line 1462 of file hevc.c.

Referenced by hls_prediction_unit().

§ luma_mc()

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 1499 of file hevc.c.

Referenced by hls_prediction_unit().

§ chroma_mc()

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 1553 of file hevc.c.

Referenced by hls_prediction_unit().

§ hevc_await_progress()

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

Definition at line 1618 of file hevc.c.

Referenced by hls_prediction_unit().

§ 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 1625 of file hevc.c.

Referenced by hls_coding_unit().

§ luma_intra_pred_mode()

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 1888 of file hevc.c.

Referenced by intra_prediction_unit().

§ set_ct_depth()

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 1976 of file hevc.c.

Referenced by hls_coding_unit().

§ intra_prediction_unit()

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

Definition at line 1989 of file hevc.c.

Referenced by hls_coding_unit().

§ intra_prediction_unit_default_value()

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

Definition at line 2029 of file hevc.c.

Referenced by hls_coding_unit().

§ hls_coding_unit()

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

Definition at line 2051 of file hevc.c.

Referenced by hls_coding_quadtree().

§ 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 2199 of file hevc.c.

Referenced by hls_slice_data().

§ hls_decode_neighbour()

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

Definition at line 2250 of file hevc.c.

Referenced by hls_slice_data().

§ hls_slice_data()

static int hls_slice_data ( HEVCContext s)
static

Definition at line 2300 of file hevc.c.

Referenced by decode_nal_unit().

§ hls_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 2345 of file hevc.c.

Referenced by decode_nal_unit(), and decode_nal_units().

§ restore_tqb_pixels()

static void restore_tqb_pixels ( HEVCContext s)
static

Definition at line 2367 of file hevc.c.

Referenced by decode_nal_unit().

§ set_side_data()

static int set_side_data ( HEVCContext s)
static

Definition at line 2394 of file hevc.c.

Referenced by hevc_frame_start().

§ hevc_frame_start()

static int hevc_frame_start ( HEVCContext s)
static

Definition at line 2443 of file hevc.c.

Referenced by decode_nal_unit().

§ decode_nal_unit()

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

Definition at line 2493 of file hevc.c.

Referenced by decode_nal_units().

§ extract_rbsp()

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

Definition at line 2633 of file hevc.c.

Referenced by decode_nal_units().

§ decode_nal_units()

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

Definition at line 2728 of file hevc.c.

Referenced by hevc_decode_extradata(), and hevc_decode_frame().

§ print_md5()

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

Definition at line 2820 of file hevc.c.

Referenced by av_md5_sum(), and verify_md5().

§ verify_md5()

static int verify_md5 ( HEVCContext s,
AVFrame frame 
)
static

Definition at line 2827 of file hevc.c.

Referenced by hevc_decode_frame().

§ hevc_decode_frame()

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

Definition at line 2893 of file hevc.c.

§ hevc_ref_frame()

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

Definition at line 2937 of file hevc.c.

Referenced by hevc_update_thread_context().

§ hevc_decode_free()

static av_cold int hevc_decode_free ( AVCodecContext avctx)
static

Definition at line 2969 of file hevc.c.

Referenced by hevc_decode_init(), and hevc_init_context().

§ hevc_init_context()

static av_cold int hevc_init_context ( AVCodecContext avctx)
static

Definition at line 3001 of file hevc.c.

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

§ hevc_update_thread_context()

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

Definition at line 3040 of file hevc.c.

§ hevc_decode_extradata()

static int hevc_decode_extradata ( HEVCContext s)
static

Definition at line 3108 of file hevc.c.

Referenced by hevc_decode_init().

§ hevc_decode_init()

static av_cold int hevc_decode_init ( AVCodecContext avctx)
static

Definition at line 3172 of file hevc.c.

§ hevc_init_thread_copy()

static av_cold int hevc_init_thread_copy ( AVCodecContext avctx)
static

Definition at line 3196 of file hevc.c.

§ hevc_decode_flush()

static void hevc_decode_flush ( AVCodecContext avctx)
static

Definition at line 3210 of file hevc.c.

Variable Documentation

§ ff_hevc_qpel_extra_before

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

Definition at line 41 of file hevc.c.

Referenced by luma_mc().

§ ff_hevc_qpel_extra_after

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

Definition at line 42 of file hevc.c.

Referenced by luma_mc().

§ ff_hevc_qpel_extra

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

Definition at line 43 of file hevc.c.

Referenced by luma_mc().

§ scan_1x1

const uint8_t scan_1x1[1] = { 0 }
static

Definition at line 45 of file hevc.c.

Referenced by hls_residual_coding().

§ horiz_scan2x2_x

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

Definition at line 47 of file hevc.c.

Referenced by hls_residual_coding().

§ horiz_scan2x2_y

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

Definition at line 49 of file hevc.c.

Referenced by hls_residual_coding().

§ horiz_scan4x4_x

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 51 of file hevc.c.

Referenced by hls_residual_coding().

§ horiz_scan4x4_y

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 58 of file hevc.c.

Referenced by hls_residual_coding().

§ horiz_scan8x8_inv

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 65 of file hevc.c.

Referenced by hls_residual_coding().

§ diag_scan2x2_x

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

Definition at line 76 of file hevc.c.

Referenced by hls_residual_coding().

§ diag_scan2x2_y

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

Definition at line 78 of file hevc.c.

Referenced by hls_residual_coding().

§ diag_scan2x2_inv

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

Definition at line 80 of file hevc.c.

Referenced by hls_residual_coding().

§ ff_hevc_diag_scan4x4_x

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 85 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

§ ff_hevc_diag_scan4x4_y

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 92 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

§ diag_scan4x4_inv

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 99 of file hevc.c.

Referenced by hls_residual_coding().

§ ff_hevc_diag_scan8x8_x

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 106 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

§ ff_hevc_diag_scan8x8_y

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 125 of file hevc.c.

Referenced by hls_residual_coding(), and scaling_list_data().

§ diag_scan8x8_inv

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 144 of file hevc.c.

Referenced by hls_residual_coding().

§ profiles

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:2712
#define FF_PROFILE_HEVC_MAIN_10
Definition: avcodec.h:2713
#define FF_PROFILE_UNKNOWN
Definition: avcodec.h:2639
#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE
Definition: avcodec.h:2714

Definition at line 3220 of file hevc.c.

§ options

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:3218
#define OFFSET(x)
Definition: hevc.c:3217
NULL
Definition: eval.c:55

Definition at line 3227 of file hevc.c.

§ hevc_decoder_class

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:3227
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
av_default_item_name
Definition: dnxhdenc.c:52

Definition at line 3233 of file hevc.c.

§ ff_hevc_decoder

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:3040
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
Definition: mimic.c:275
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:684
static void hevc_decode_flush(AVCodecContext *avctx)
Definition: hevc.c:3210
static av_cold int hevc_init_thread_copy(AVCodecContext *avctx)
Definition: hevc.c:3196
#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:713
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:145
static const AVClass hevc_decoder_class
Definition: hevc.c:3233
static av_cold int hevc_decode_init(AVCodecContext *avctx)
Definition: hevc.c:3172
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:490
#define CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:755
static av_cold void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
Definition: alsdec.c:1797
static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output, AVPacket *avpkt)
Definition: hevc.c:2893
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:499
static av_cold int hevc_decode_free(AVCodecContext *avctx)
Definition: hevc.c:2969
static const AVProfile profiles[]
Definition: hevc.c:3220

Definition at line 3240 of file hevc.c.