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"
#include "profiles.h"

Go to the source code of this file.

Macros

#define HWACCEL_MAX   (CONFIG_HEVC_DXVA2_HWACCEL + CONFIG_HEVC_D3D11VA_HWACCEL + CONFIG_HEVC_VDPAU_HWACCEL)
 
#define CTB(tab, x, y)   ((tab)[(y) * s->ps.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 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 void export_stream_params (AVCodecContext *avctx, const HEVCParamSets *ps, const HEVCSPS *sps)
 
static enum AVPixelFormat get_format (HEVCContext *s, const HEVCSPS *sps)
 
static int set_sps (HEVCContext *s, const HEVCSPS *sps, enum AVPixelFormat pix_fmt)
 
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 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, int pred_idx)
 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, int pred_idx)
 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 hevc_luma_mv_mpv_mode (HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int part_idx, int merge_idx, MvField *mv)
 
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 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 H2645NAL *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, 3 }
 
const uint8_t ff_hevc_qpel_extra_after [4] = { 0, 4, 4, 4 }
 
const uint8_t ff_hevc_qpel_extra [4] = { 0, 7, 7, 7 }
 
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]
 
static const uint8_t diag_scan4x4_inv [4][4]
 
static const uint8_t diag_scan8x8_inv [8][8]
 
static const AVOption options []
 
static const AVClass hevc_decoder_class
 
AVCodec ff_hevc_decoder
 

Macro Definition Documentation

◆ HWACCEL_MAX

Referenced by get_format().

◆ CTB

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

Definition at line 800 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:800

Definition at line 802 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:1347

Referenced by hls_coding_quadtree(), and hls_transform_tree().

◆ POS

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

Referenced by hls_prediction_unit().

◆ SUBDIVIDE [2/2]

#define SUBDIVIDE (   x,
 
)
Value:
do { \
if (x < s->ps.sps->width && y < s->ps.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:2189

◆ OFFSET

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

Definition at line 3055 of file hevc.c.

◆ PAR

Definition at line 3056 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 114 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 138 of file hevc.c.

Referenced by set_sps().

◆ pred_weight_table()

static void pred_weight_table ( HEVCContext s,
GetBitContext gb 
)
static

Definition at line 194 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 283 of file hevc.c.

Referenced by hls_slice_header().

◆ export_stream_params()

static void export_stream_params ( AVCodecContext avctx,
const HEVCParamSets ps,
const HEVCSPS sps 
)
static

Definition at line 335 of file hevc.c.

Referenced by hevc_decode_extradata(), and set_sps().

◆ get_format()

static enum AVPixelFormat get_format ( HEVCContext s,
const HEVCSPS sps 
)
static

Definition at line 381 of file hevc.c.

Referenced by hls_slice_header().

◆ set_sps()

static int set_sps ( HEVCContext s,
const HEVCSPS sps,
enum AVPixelFormat  pix_fmt 
)
static

Definition at line 407 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 450 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 814 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 885 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  blk_idx,
int  cbf_luma,
int  cbf_cb,
int  cbf_cr 
)
static

Definition at line 1246 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 1332 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 1347 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 1444 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 1474 of file hevc.c.

Referenced by hevc_luma_mv_mpv_mode().

◆ 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,
int  pred_idx 
)
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 1511 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,
int  pred_idx 
)
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 1565 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 1627 of file hevc.c.

Referenced by hls_prediction_unit().

◆ hevc_luma_mv_mpv_mode()

static void hevc_luma_mv_mpv_mode ( HEVCContext s,
int  x0,
int  y0,
int  nPbW,
int  nPbH,
int  log2_cb_size,
int  part_idx,
int  merge_idx,
MvField mv 
)
static

Definition at line 1634 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 1678 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 1877 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 1965 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 1978 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 2018 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 2040 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 2189 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 2240 of file hevc.c.

Referenced by hls_slice_data().

◆ hls_slice_data()

static int hls_slice_data ( HEVCContext s)
static

Definition at line 2290 of file hevc.c.

Referenced by decode_nal_unit().

◆ restore_tqb_pixels()

static void restore_tqb_pixels ( HEVCContext s)
static

Definition at line 2331 of file hevc.c.

Referenced by decode_nal_unit().

◆ set_side_data()

static int set_side_data ( HEVCContext s)
static

Definition at line 2358 of file hevc.c.

Referenced by hevc_frame_start().

◆ hevc_frame_start()

static int hevc_frame_start ( HEVCContext s)
static

Definition at line 2407 of file hevc.c.

Referenced by decode_nal_unit().

◆ decode_nal_unit()

static int decode_nal_unit ( HEVCContext s,
const H2645NAL nal 
)
static

Definition at line 2457 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 2600 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 2640 of file hevc.c.

Referenced by verify_md5().

◆ verify_md5()

static int verify_md5 ( HEVCContext s,
AVFrame frame 
)
static

Definition at line 2647 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 2713 of file hevc.c.

◆ hevc_ref_frame()

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

Definition at line 2763 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 2802 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 2831 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 2870 of file hevc.c.

◆ hevc_decode_extradata()

static int hevc_decode_extradata ( HEVCContext s)
static

Definition at line 2938 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 3012 of file hevc.c.

◆ hevc_init_thread_copy()

static av_cold int hevc_init_thread_copy ( AVCodecContext avctx)
static

Definition at line 3034 of file hevc.c.

◆ hevc_decode_flush()

static void hevc_decode_flush ( AVCodecContext avctx)
static

Definition at line 3048 of file hevc.c.

Variable Documentation

◆ ff_hevc_qpel_extra_before

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

Definition at line 42 of file hevc.c.

Referenced by luma_mc().

◆ ff_hevc_qpel_extra_after

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

Definition at line 43 of file hevc.c.

Referenced by luma_mc().

◆ ff_hevc_qpel_extra

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

Definition at line 44 of file hevc.c.

Referenced by luma_mc().

◆ scan_1x1

const uint8_t scan_1x1[1] = { 0 }
static

Definition at line 46 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 48 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 50 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 52 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 59 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 66 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 77 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 79 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 81 of file hevc.c.

Referenced by hls_residual_coding().

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

Referenced by hls_residual_coding().

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

Referenced by hls_residual_coding().

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

Definition at line 3058 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:3058
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
av_default_item_name
Definition: dnxhdenc.c:55

Definition at line 3064 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,
.close = hevc_decode_free,
.update_thread_context = hevc_update_thread_context,
.init_thread_copy = hevc_init_thread_copy,
}
static int hevc_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
Definition: hevc.c:2870
#define AV_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:863
static void hevc_decode_flush(AVCodecContext *avctx)
Definition: hevc.c:3048
const AVProfile ff_hevc_profiles[]
Definition: profiles.c:67
static av_cold int hevc_init_thread_copy(AVCodecContext *avctx)
Definition: hevc.c:3034
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
static const AVClass hevc_decoder_class
Definition: hevc.c:3064
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:893
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: avconv.c:1288
static av_cold int hevc_decode_init(AVCodecContext *avctx)
Definition: hevc.c:3012
static const AVProfile profiles[]
Definition: libdcadec.c:181
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:2713
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:582
static av_cold int hevc_decode_free(AVCodecContext *avctx)
Definition: hevc.c:2802
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:838

Definition at line 3071 of file hevc.c.