FFmpeg
|
#include "config_components.h"
#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/film_grain_params.h"
#include "libavutil/internal.h"
#include "libavutil/md5.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/stereo3d.h"
#include "libavutil/timecode.h"
#include "aom_film_grain.h"
#include "bswapdsp.h"
#include "cabac_functions.h"
#include "codec_internal.h"
#include "container_fifo.h"
#include "decode.h"
#include "golomb.h"
#include "hevc.h"
#include "parse.h"
#include "hevcdec.h"
#include "hwaccel_internal.h"
#include "hwconfig.h"
#include "internal.h"
#include "profiles.h"
#include "progressframe.h"
#include "refstruct.h"
#include "thread.h"
#include "threadprogress.h"
Go to the source code of this file.
Macros | |
#define | HWACCEL_MAX |
#define | CTB(tab, x, y) ((tab)[(y) * sps->ctb_width + (x)]) |
#define | SET_SAO(elem, value) |
#define | SUBDIVIDE(x, y, idx) |
#define | POS(c_idx, x, y) |
#define | MD5_PRI "%016" PRIx64 "%016" PRIx64 |
#define | MD5_PRI_ARG(buf) AV_RB64(buf), AV_RB64((const uint8_t*)(buf) + 8) |
#define | OFFSET(x) offsetof(HEVCContext, x) |
#define | PAR (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM) |
Functions | |
static void | pic_arrays_free (HEVCLayerContext *l) |
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 (HEVCLayerContext *l, const HEVCSPS *sps) |
static int | pred_weight_table (SliceHeader *sh, void *logctx, const HEVCSPS *sps, GetBitContext *gb) |
static int | decode_lt_rps (const HEVCSPS *sps, LongTermRPS *rps, GetBitContext *gb, int cur_poc, int poc_lsb) |
static void | export_stream_params (HEVCContext *s, const HEVCSPS *sps) |
static int | export_stream_params_from_sei (HEVCContext *s) |
static int | export_multilayer (HEVCContext *s, const HEVCVPS *vps) |
static int | setup_multilayer (HEVCContext *s, const HEVCVPS *vps) |
static enum AVPixelFormat | get_format (HEVCContext *s, const HEVCSPS *sps) |
static int | set_sps (HEVCContext *s, HEVCLayerContext *l, const HEVCSPS *sps) |
static int | hls_slice_header (SliceHeader *sh, const HEVCContext *s, GetBitContext *gb) |
static void | hls_sao_param (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int rx, int ry) |
static int | hls_cross_component_pred (HEVCLocalContext *lc, int idx) |
static int | hls_transform_unit (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, 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 (uint8_t *is_pcm, const HEVCSPS *sps, int x0, int y0, int log2_cb_size) |
static int | hls_transform_tree (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, 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, const int *base_cbf_cb, const int *base_cbf_cr) |
static int | hls_pcm_sample (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int x0, int y0, int log2_cb_size) |
static void | luma_mc_uni (HEVCLocalContext *lc, const HEVCPPS *pps, const HEVCSPS *sps, uint8_t *dst, ptrdiff_t dststride, const AVFrame *ref, const Mv *mv, int x_off, int y_off, int block_w, int block_h, int luma_weight, int luma_offset) |
8.5.3.2.2.1 Luma sample unidirectional interpolation process More... | |
static void | luma_mc_bi (HEVCLocalContext *lc, const HEVCPPS *pps, const HEVCSPS *sps, uint8_t *dst, ptrdiff_t dststride, const AVFrame *ref0, const Mv *mv0, int x_off, int y_off, int block_w, int block_h, const AVFrame *ref1, const Mv *mv1, struct MvField *current_mv) |
8.5.3.2.2.1 Luma sample bidirectional interpolation process More... | |
static void | chroma_mc_uni (HEVCLocalContext *lc, const HEVCPPS *pps, const HEVCSPS *sps, uint8_t *dst0, ptrdiff_t dststride, const uint8_t *src0, ptrdiff_t srcstride, int reflist, int x_off, int y_off, int block_w, int block_h, const struct MvField *current_mv, int chroma_weight, int chroma_offset) |
8.5.3.2.2.2 Chroma sample uniprediction interpolation process More... | |
static void | chroma_mc_bi (HEVCLocalContext *lc, const HEVCPPS *pps, const HEVCSPS *sps, uint8_t *dst0, ptrdiff_t dststride, const AVFrame *ref0, const AVFrame *ref1, int x_off, int y_off, int block_w, int block_h, const MvField *current_mv, int cidx) |
8.5.3.2.2.2 Chroma sample bidirectional interpolation process More... | |
static void | hevc_await_progress (const HEVCContext *s, const HEVCFrame *ref, const Mv *mv, int y0, int height) |
static void | hevc_luma_mv_mvp_mode (HEVCLocalContext *lc, const HEVCPPS *pps, const HEVCSPS *sps, 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 (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int partIdx, int idx) |
static int | luma_intra_pred_mode (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCSPS *sps, 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 (const HEVCSPS *sps, uint8_t *tab_ct_depth, int x0, int y0, int log2_cb_size, int ct_depth) |
static void | intra_prediction_unit (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCSPS *sps, int x0, int y0, int log2_cb_size) |
static void | intra_prediction_unit_default_value (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCSPS *sps, int x0, int y0, int log2_cb_size) |
static int | hls_coding_unit (HEVCLocalContext *lc, const HEVCContext *s, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0, int log2_cb_size) |
static int | hls_coding_quadtree (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0, int log2_cb_size, int cb_depth) |
static void | hls_decode_neighbour (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x_ctb, int y_ctb, int ctb_addr_ts) |
static int | hls_decode_entry (HEVCContext *s, GetBitContext *gb) |
static int | hls_decode_entry_wpp (AVCodecContext *avctx, void *hevc_lclist, int job, int thread) |
static int | wpp_progress_init (HEVCContext *s, unsigned count) |
static int | hls_slice_data_wpp (HEVCContext *s, const H2645NAL *nal) |
static int | decode_slice_data (HEVCContext *s, const HEVCLayerContext *l, const H2645NAL *nal, GetBitContext *gb) |
static int | set_side_data (HEVCContext *s) |
static int | find_finish_setup_nal (const HEVCContext *s) |
static int | hevc_frame_start (HEVCContext *s, HEVCLayerContext *l, unsigned nal_idx) |
static int | verify_md5 (HEVCContext *s, AVFrame *frame) |
static int | hevc_frame_end (HEVCContext *s, HEVCLayerContext *l) |
static int | decode_slice (HEVCContext *s, unsigned nal_idx, GetBitContext *gb) |
static int | decode_nal_unit (HEVCContext *s, unsigned nal_idx) |
static int | decode_nal_units (HEVCContext *s, const uint8_t *buf, int length) |
static int | hevc_decode_extradata (HEVCContext *s, uint8_t *buf, int length, int first) |
static int | hevc_receive_frame (AVCodecContext *avctx, AVFrame *frame) |
static int | hevc_ref_frame (HEVCFrame *dst, const HEVCFrame *src) |
static av_cold int | hevc_decode_free (AVCodecContext *avctx) |
static av_cold int | hevc_init_context (AVCodecContext *avctx) |
static av_cold int | hevc_decode_init (AVCodecContext *avctx) |
static void | hevc_decode_flush (AVCodecContext *avctx) |
Variables | |
static const uint8_t | hevc_pel_weight [65] = { [2] = 0, [4] = 1, [6] = 2, [8] = 3, [12] = 4, [16] = 5, [24] = 6, [32] = 7, [48] = 8, [64] = 9 } |
static const uint8_t | tab_mode_idx [] |
static const AVOption | options [] |
static const AVClass | hevc_decoder_class |
const FFCodec | ff_hevc_decoder |
#define HWACCEL_MAX |
#define SET_SAO | ( | elem, | |
value | |||
) |
#define SUBDIVIDE | ( | x, | |
y, | |||
idx | |||
) |
#define POS | ( | c_idx, | |
x, | |||
y | |||
) |
#define MD5_PRI "%016" PRIx64 "%016" PRIx64 |
#define OFFSET | ( | x | ) | offsetof(HEVCContext, x) |
#define PAR (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM) |
|
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 71 of file hevcdec.c.
Referenced by hevc_decode_free(), pic_arrays_init(), and set_sps().
|
static |
|
static |
Definition at line 172 of file hevcdec.c.
Referenced by hls_slice_header().
|
static |
Definition at line 289 of file hevcdec.c.
Referenced by hls_slice_header().
|
static |
Definition at line 346 of file hevcdec.c.
Referenced by hevc_decode_extradata(), and hevc_frame_start().
|
static |
Definition at line 402 of file hevcdec.c.
Referenced by hevc_decode_extradata(), and hevc_frame_start().
|
static |
Definition at line 422 of file hevcdec.c.
Referenced by get_format(), and hevc_decode_extradata().
|
static |
Definition at line 461 of file hevcdec.c.
Referenced by get_format().
|
static |
Definition at line 525 of file hevcdec.c.
Referenced by hevc_frame_start().
|
static |
Definition at line 675 of file hevcdec.c.
Referenced by hevc_frame_start().
|
static |
Definition at line 705 of file hevcdec.c.
Referenced by decode_slice().
|
static |
Definition at line 1144 of file hevcdec.c.
Referenced by hls_decode_entry(), and hls_decode_entry_wpp().
|
static |
Definition at line 1220 of file hevcdec.c.
Referenced by hls_transform_unit().
|
static |
Definition at line 1236 of file hevcdec.c.
Referenced by hls_transform_tree().
|
static |
Definition at line 1448 of file hevcdec.c.
Referenced by hls_coding_unit(), and hls_transform_tree().
|
static |
Definition at line 1464 of file hevcdec.c.
Referenced by hls_coding_unit().
|
static |
Definition at line 1592 of file hevcdec.c.
Referenced by hls_coding_unit().
|
static |
8.5.3.2.2.1 Luma sample unidirectional interpolation process
s | HEVC decoding context |
dst | target buffer for block data at block position |
dststride | stride of the dst buffer |
ref | reference picture buffer at origin (0, 0) |
mv | motion vector (relative to block position) to get pixel data from |
x_off | horizontal position of block from origin (0, 0) |
y_off | vertical position of block from origin (0, 0) |
block_w | width of block |
block_h | height of block |
luma_weight | weighting factor applied to the luma prediction |
luma_offset | additive offset applied to the luma prediction value |
Definition at line 1651 of file hevcdec.c.
Referenced by hls_prediction_unit().
|
static |
8.5.3.2.2.1 Luma sample bidirectional interpolation process
s | HEVC decoding context |
dst | target buffer for block data at block position |
dststride | stride of the dst buffer |
ref0 | reference picture0 buffer at origin (0, 0) |
mv0 | motion vector0 (relative to block position) to get pixel data from |
x_off | horizontal position of block from origin (0, 0) |
y_off | vertical position of block from origin (0, 0) |
block_w | width of block |
block_h | height of block |
ref1 | reference picture1 buffer at origin (0, 0) |
mv1 | motion vector1 (relative to block position) to get pixel data from |
current_mv | current motion vector structure |
Definition at line 1715 of file hevcdec.c.
Referenced by hls_prediction_unit().
|
static |
8.5.3.2.2.2 Chroma sample uniprediction interpolation process
s | HEVC decoding context |
dst1 | target buffer for block data at block position (U plane) |
dst2 | target buffer for block data at block position (V plane) |
dststride | stride of the dst1 and dst2 buffers |
ref | reference picture buffer at origin (0, 0) |
mv | motion vector (relative to block position) to get pixel data from |
x_off | horizontal position of block from origin (0, 0) |
y_off | vertical position of block from origin (0, 0) |
block_w | width of block |
block_h | height of block |
chroma_weight | weighting factor applied to the chroma prediction |
chroma_offset | additive offset applied to the chroma prediction value |
Definition at line 1809 of file hevcdec.c.
Referenced by hls_prediction_unit().
|
static |
8.5.3.2.2.2 Chroma sample bidirectional interpolation process
s | HEVC decoding context |
dst | target buffer for block data at block position |
dststride | stride of the dst buffer |
ref0 | reference picture0 buffer at origin (0, 0) |
mv0 | motion vector0 (relative to block position) to get pixel data from |
x_off | horizontal position of block from origin (0, 0) |
y_off | vertical position of block from origin (0, 0) |
block_w | width of block |
block_h | height of block |
ref1 | reference picture1 buffer at origin (0, 0) |
mv1 | motion vector1 (relative to block position) to get pixel data from |
current_mv | current motion vector structure |
cidx | chroma component(cb, cr) |
Definition at line 1879 of file hevcdec.c.
Referenced by hls_prediction_unit().
|
static |
Definition at line 1972 of file hevcdec.c.
Referenced by hls_prediction_unit().
|
static |
Definition at line 1982 of file hevcdec.c.
Referenced by hls_prediction_unit().
|
static |
Definition at line 2029 of file hevcdec.c.
Referenced by hls_coding_unit().
|
static |
|
static |
Definition at line 2240 of file hevcdec.c.
Referenced by hls_coding_unit().
|
static |
Definition at line 2258 of file hevcdec.c.
Referenced by hls_coding_unit().
|
static |
Definition at line 2328 of file hevcdec.c.
Referenced by hls_coding_unit().
|
static |
Definition at line 2353 of file hevcdec.c.
Referenced by hls_coding_quadtree().
|
static |
Definition at line 2540 of file hevcdec.c.
Referenced by hls_decode_entry(), and hls_decode_entry_wpp().
|
static |
Definition at line 2633 of file hevcdec.c.
Referenced by hls_decode_entry(), and hls_decode_entry_wpp().
|
static |
Definition at line 2684 of file hevcdec.c.
Referenced by decode_slice_data().
|
static |
Definition at line 2738 of file hevcdec.c.
Referenced by hls_slice_data_wpp().
|
static |
Definition at line 2833 of file hevcdec.c.
Referenced by hls_slice_data_wpp().
|
static |
Definition at line 2859 of file hevcdec.c.
Referenced by decode_slice_data().
|
static |
Definition at line 2961 of file hevcdec.c.
Referenced by decode_slice().
|
static |
Definition at line 3015 of file hevcdec.c.
Referenced by hevc_frame_start().
|
static |
Definition at line 3103 of file hevcdec.c.
Referenced by hevc_frame_start().
|
static |
Definition at line 3146 of file hevcdec.c.
Referenced by decode_slice().
|
static |
Definition at line 3336 of file hevcdec.c.
Referenced by hevc_frame_end().
|
static |
Definition at line 3405 of file hevcdec.c.
Referenced by decode_nal_units().
|
static |
Definition at line 3452 of file hevcdec.c.
Referenced by decode_nal_unit(), and decode_slice_data().
|
static |
Definition at line 3517 of file hevcdec.c.
Referenced by decode_nal_units().
|
static |
Definition at line 3604 of file hevcdec.c.
Referenced by hevc_receive_frame().
|
static |
Definition at line 3707 of file hevcdec.c.
Referenced by hevc_decode_init(), and hevc_receive_frame().
|
static |
|
static |
|
static |
Definition at line 3878 of file hevcdec.c.
Referenced by hevc_decode_init().
|
static |
|
static |
|
static |
Definition at line 59 of file hevcdec.c.
Referenced by chroma_mc_bi(), chroma_mc_uni(), luma_mc_bi(), and luma_mc_uni().
|
static |
Definition at line 2254 of file hevcdec.c.
Referenced by intra_prediction_unit().
|
static |
|
static |