|
FFmpeg
|
#include "libavutil/buffer.h"#include "libavutil/md5.h"#include "avcodec.h"#include "cabac.h"#include "dsputil.h"#include "get_bits.h"#include "hevcpred.h"#include "hevcdsp.h"#include "internal.h"#include "thread.h"#include "videodsp.h"Go to the source code of this file.
Data Structures | |
| struct | ShortTermRPS |
| struct | LongTermRPS |
| struct | RefPicList |
| struct | RefPicListTab |
| struct | HEVCWindow |
| struct | VUI |
| struct | PTL |
| struct | VPS |
| struct | ScalingList |
| struct | HEVCSPS |
| struct | HEVCPPS |
| struct | SliceHeader |
| struct | CodingTree |
| struct | CodingUnit |
| struct | Mv |
| struct | MvField |
| struct | NeighbourAvailable |
| struct | PredictionUnit |
| struct | TransformTree |
| struct | TransformUnit |
| struct | SAOParams |
| struct | DBParams |
| struct | HEVCFrame |
| struct | HEVCNAL |
| struct | HEVCLocalContext |
| struct | HEVCContext |
Macros | |
| #define | MAX_DPB_SIZE 16 |
| #define | MAX_REFS 16 |
| #define | MAX_NB_THREADS 16 |
| #define | SHIFT_CTB_WPP 2 |
| #define | MAX_SUB_LAYERS 7 |
| 7.4.2.1 | |
| #define | MAX_VPS_COUNT 16 |
| #define | MAX_SPS_COUNT 32 |
| #define | MAX_PPS_COUNT 256 |
| #define | MAX_SHORT_TERM_RPS_COUNT 64 |
| #define | MAX_CU_SIZE 128 |
| #define | MAX_TRANSFORM_DEPTH 5 |
| #define | MAX_TB_SIZE 32 |
| #define | MAX_PB_SIZE 64 |
| #define | MAX_LOG2_CTB_SIZE 6 |
| #define | MAX_QP 51 |
| #define | DEFAULT_INTRA_TC_OFFSET 2 |
| #define | HEVC_CONTEXTS 183 |
| #define | MRG_MAX_NUM_CANDS 5 |
| #define | L0 0 |
| #define | L1 1 |
| #define | EPEL_EXTRA_BEFORE 1 |
| #define | EPEL_EXTRA_AFTER 2 |
| #define | EPEL_EXTRA 3 |
| #define | SAMPLE(tab, x, y) ((tab)[(y) * s->sps->width + (x)]) |
| Value of the luma sample at position (x, y) in the 2D array tab. | |
| #define | SAMPLE_CTB(tab, x, y) ((tab)[(y) * min_cb_width + (x)]) |
| #define | SAMPLE_CBF(tab, x, y) ((tab)[((y) & ((1<<log2_trafo_size)-1)) * MAX_CU_SIZE + ((x) & ((1<<log2_trafo_size)-1))]) |
| #define | IS_IDR(s) (s->nal_unit_type == NAL_IDR_W_RADL || s->nal_unit_type == NAL_IDR_N_LP) |
| #define | IS_BLA(s) |
| #define | HEVC_FRAME_FLAG_OUTPUT (1 << 0) |
| #define | HEVC_FRAME_FLAG_SHORT_REF (1 << 1) |
| #define | HEVC_FRAME_FLAG_LONG_REF (1 << 2) |
Variables | |
| const uint8_t | ff_hevc_qpel_extra_before [4] |
| const uint8_t | ff_hevc_qpel_extra_after [4] |
| const uint8_t | ff_hevc_qpel_extra [4] |
| const uint8_t | ff_hevc_diag_scan4x4_x [16] |
| const uint8_t | ff_hevc_diag_scan4x4_y [16] |
| const uint8_t | ff_hevc_diag_scan8x8_x [64] |
| const uint8_t | ff_hevc_diag_scan8x8_y [64] |
| #define MAX_DPB_SIZE 16 |
Definition at line 39 of file hevc.h.
Referenced by ff_hevc_decode_nal_sps(), and ff_hevc_decode_nal_vps().
| #define MAX_REFS 16 |
Definition at line 40 of file hevc.h.
Referenced by ff_hevc_decode_short_term_rps(), ff_hevc_slice_rpl(), and hls_slice_header().
| #define SHIFT_CTB_WPP 2 |
Definition at line 43 of file hevc.h.
Referenced by hls_decode_entry_wpp().
| #define MAX_SUB_LAYERS 7 |
7.4.2.1
Definition at line 48 of file hevc.h.
Referenced by ff_hevc_decode_nal_sps(), and ff_hevc_decode_nal_vps().
| #define MAX_VPS_COUNT 16 |
Definition at line 49 of file hevc.h.
Referenced by ff_hevc_decode_nal_sps(), and ff_hevc_decode_nal_vps().
| #define MAX_SHORT_TERM_RPS_COUNT 64 |
Definition at line 52 of file hevc.h.
Referenced by ff_hevc_decode_nal_sps().
| #define MAX_TB_SIZE 32 |
Definition at line 58 of file hevc.h.
Referenced by ff_hevc_hls_residual_coding(), intra_pred(), and pred_angular().
| #define MAX_PB_SIZE 64 |
Definition at line 59 of file hevc.h.
Referenced by hevc_frame_start(), hls_prediction_unit(), hls_slice_data_wpp(), and put_hevc_epel_hv().
| #define MAX_LOG2_CTB_SIZE 6 |
Definition at line 60 of file hevc.h.
Referenced by ff_hevc_decode_nal_sps().
| #define MAX_QP 51 |
Definition at line 61 of file hevc.h.
Referenced by deblocking_filter_CTB().
| #define DEFAULT_INTRA_TC_OFFSET 2 |
Definition at line 62 of file hevc.h.
Referenced by chroma_tc().
| #define HEVC_CONTEXTS 183 |
Definition at line 64 of file hevc.h.
Referenced by cabac_init_state(), ff_hevc_save_states(), hevc_init_context(), and load_states().
| #define L0 0 |
Definition at line 68 of file hevc.h.
Referenced by hls_prediction_unit(), hls_slice_header(), and pred_weight_table().
| #define L1 1 |
Definition at line 69 of file hevc.h.
Referenced by derive_temporal_colocated_mvs(), hls_prediction_unit(), hls_slice_header(), and pred_weight_table().
| #define EPEL_EXTRA_BEFORE 1 |
Definition at line 71 of file hevc.h.
Referenced by chroma_mc(), and put_hevc_epel_hv().
| #define EPEL_EXTRA_AFTER 2 |
Definition at line 72 of file hevc.h.
Referenced by chroma_mc().
| #define EPEL_EXTRA 3 |
Definition at line 73 of file hevc.h.
Referenced by chroma_mc(), and put_hevc_epel_hv().
Value of the luma sample at position (x, y) in the 2D array tab.
Definition at line 78 of file hevc.h.
Referenced by hls_coding_quadtree().
Definition at line 79 of file hevc.h.
Referenced by ff_hevc_skip_flag_decode(), hls_coding_unit(), and hls_prediction_unit().
| #define SAMPLE_CBF | ( | tab, | |
| x, | |||
| y | |||
| ) | ((tab)[((y) & ((1<<log2_trafo_size)-1)) * MAX_CU_SIZE + ((x) & ((1<<log2_trafo_size)-1))]) |
Definition at line 80 of file hevc.h.
Referenced by hls_transform_tree(), and hls_transform_unit().
| #define IS_IDR | ( | s | ) | (s->nal_unit_type == NAL_IDR_W_RADL || s->nal_unit_type == NAL_IDR_N_LP) |
Definition at line 82 of file hevc.h.
Referenced by decode_nal_unit(), hls_slice_header(), and parse_nal_units().
| #define IS_BLA | ( | s | ) |
Definition at line 83 of file hevc.h.
Referenced by decode_nal_unit(), and hls_slice_header().
| #define HEVC_FRAME_FLAG_OUTPUT (1 << 0) |
Definition at line 683 of file hevc.h.
Referenced by ff_hevc_output_frame(), and ff_hevc_set_new_ref().
| #define HEVC_FRAME_FLAG_SHORT_REF (1 << 1) |
Definition at line 684 of file hevc.h.
Referenced by ff_hevc_clear_refs(), ff_hevc_frame_rps(), ff_hevc_set_new_ref(), and mark_ref().
| #define HEVC_FRAME_FLAG_LONG_REF (1 << 2) |
Definition at line 685 of file hevc.h.
Referenced by ff_hevc_clear_refs(), ff_hevc_frame_rps(), and mark_ref().
| enum NALUnitType |
Table 7-3: NAL unit type codes.
| enum RPSType |
| enum SyntaxElement |
| enum PartMode |
| enum InterPredIdc |
| enum IntraPredMode |
| enum SAOEOClass |
| int ff_hevc_decode_short_term_rps | ( | HEVCContext * | s, |
| ShortTermRPS * | rps, | ||
| const HEVCSPS * | sps, | ||
| int | is_slice_header | ||
| ) |
Definition at line 72 of file hevc_ps.c.
Referenced by ff_hevc_decode_nal_sps(), and hls_slice_header().
| int ff_hevc_decode_nal_vps | ( | HEVCContext * | s | ) |
Definition at line 321 of file hevc_ps.c.
Referenced by decode_nal_unit(), and parse_nal_units().
| int ff_hevc_decode_nal_sps | ( | HEVCContext * | s | ) |
Definition at line 596 of file hevc_ps.c.
Referenced by decode_nal_unit(), and parse_nal_units().
| int ff_hevc_decode_nal_pps | ( | HEVCContext * | s | ) |
6.5
Definition at line 967 of file hevc_ps.c.
Referenced by decode_nal_unit(), and parse_nal_units().
| int ff_hevc_decode_nal_sei | ( | HEVCContext * | s | ) |
Definition at line 123 of file hevc_sei.c.
Referenced by decode_nal_unit(), and parse_nal_units().
| int ff_hevc_extract_rbsp | ( | HEVCContext * | s, |
| const uint8_t * | src, | ||
| int | length, | ||
| HEVCNAL * | nal | ||
| ) |
Definition at line 2228 of file hevc.c.
Referenced by decode_nal_units(), and parse_nal_units().
| void ff_hevc_clear_refs | ( | HEVCContext * | s | ) |
Mark all frames in DPB as unused for reference.
Definition at line 65 of file hevc_refs.c.
Referenced by hls_slice_header().
| void ff_hevc_flush_dpb | ( | HEVCContext * | s | ) |
Drop all frames currently in DPB.
Definition at line 73 of file hevc_refs.c.
Referenced by hevc_decode_flush().
| int ff_hevc_compute_poc | ( | HEVCContext * | s, |
| int | poc_lsb | ||
| ) |
Compute POC of the current frame and return it.
Definition at line 442 of file hevc_refs.c.
Referenced by hls_slice_header(), and parse_nal_units().
| RefPicList* ff_hevc_get_ref_list | ( | HEVCContext * | s, |
| HEVCFrame * | frame, | ||
| int | x0, | ||
| int | y0 | ||
| ) |
Definition at line 52 of file hevc_refs.c.
Referenced by ff_hevc_deblocking_boundary_strengths().
| int ff_hevc_frame_rps | ( | HEVCContext * | s | ) |
Construct the reference picture sets for the current frame.
Definition at line 383 of file hevc_refs.c.
Referenced by hevc_frame_start().
| int ff_hevc_slice_rpl | ( | HEVCContext * | s | ) |
Construct the reference picture list(s) for the current slice.
Definition at line 224 of file hevc_refs.c.
Referenced by decode_nal_unit().
| void ff_hevc_save_states | ( | HEVCContext * | s, |
| int | ctb_addr_ts | ||
| ) |
Definition at line 504 of file hevc_cabac.c.
Referenced by hls_decode_entry(), and hls_decode_entry_wpp().
| void ff_hevc_cabac_init | ( | HEVCContext * | s, |
| int | ctb_addr_ts | ||
| ) |
Definition at line 555 of file hevc_cabac.c.
Referenced by hls_decode_entry(), and hls_decode_entry_wpp().
| int ff_hevc_sao_merge_flag_decode | ( | HEVCContext * | s | ) |
Definition at line 600 of file hevc_cabac.c.
Referenced by hls_sao_param().
| int ff_hevc_sao_type_idx_decode | ( | HEVCContext * | s | ) |
Definition at line 605 of file hevc_cabac.c.
Referenced by hls_sao_param().
| int ff_hevc_sao_band_position_decode | ( | HEVCContext * | s | ) |
Definition at line 615 of file hevc_cabac.c.
Referenced by hls_sao_param().
| int ff_hevc_sao_offset_abs_decode | ( | HEVCContext * | s | ) |
Definition at line 625 of file hevc_cabac.c.
Referenced by hls_sao_param().
| int ff_hevc_sao_offset_sign_decode | ( | HEVCContext * | s | ) |
Definition at line 635 of file hevc_cabac.c.
Referenced by hls_sao_param().
| int ff_hevc_sao_eo_class_decode | ( | HEVCContext * | s | ) |
Definition at line 640 of file hevc_cabac.c.
Referenced by hls_sao_param().
| int ff_hevc_end_of_slice_flag_decode | ( | HEVCContext * | s | ) |
Definition at line 647 of file hevc_cabac.c.
Referenced by hls_coding_quadtree().
| int ff_hevc_cu_transquant_bypass_flag_decode | ( | HEVCContext * | s | ) |
Definition at line 652 of file hevc_cabac.c.
Referenced by hls_coding_unit().
| int ff_hevc_skip_flag_decode | ( | HEVCContext * | s, |
| int | x0, | ||
| int | y0, | ||
| int | x_cb, | ||
| int | y_cb | ||
| ) |
Definition at line 657 of file hevc_cabac.c.
Referenced by hls_coding_unit().
| int ff_hevc_pred_mode_decode | ( | HEVCContext * | s | ) |
Definition at line 702 of file hevc_cabac.c.
Referenced by hls_coding_unit().
| int ff_hevc_split_coding_unit_flag_decode | ( | HEVCContext * | s, |
| int | ct_depth, | ||
| int | x0, | ||
| int | y0 | ||
| ) |
Definition at line 707 of file hevc_cabac.c.
Referenced by hls_coding_quadtree().
| int ff_hevc_part_mode_decode | ( | HEVCContext * | s, |
| int | log2_cb_size | ||
| ) |
Definition at line 725 of file hevc_cabac.c.
Referenced by hls_coding_unit().
| int ff_hevc_pcm_flag_decode | ( | HEVCContext * | s | ) |
Definition at line 762 of file hevc_cabac.c.
Referenced by hls_coding_unit().
| int ff_hevc_prev_intra_luma_pred_flag_decode | ( | HEVCContext * | s | ) |
Definition at line 767 of file hevc_cabac.c.
Referenced by intra_prediction_unit().
| int ff_hevc_mpm_idx_decode | ( | HEVCContext * | s | ) |
Definition at line 772 of file hevc_cabac.c.
Referenced by intra_prediction_unit().
| int ff_hevc_rem_intra_luma_pred_mode_decode | ( | HEVCContext * | s | ) |
Definition at line 780 of file hevc_cabac.c.
Referenced by intra_prediction_unit().
| int ff_hevc_intra_chroma_pred_mode_decode | ( | HEVCContext * | s | ) |
Definition at line 790 of file hevc_cabac.c.
Referenced by intra_prediction_unit().
| int ff_hevc_merge_idx_decode | ( | HEVCContext * | s | ) |
Definition at line 801 of file hevc_cabac.c.
Referenced by hls_prediction_unit().
| int ff_hevc_merge_flag_decode | ( | HEVCContext * | s | ) |
Definition at line 812 of file hevc_cabac.c.
Referenced by hls_prediction_unit().
| int ff_hevc_inter_pred_idc_decode | ( | HEVCContext * | s, |
| int | nPbW, | ||
| int | nPbH | ||
| ) |
Definition at line 817 of file hevc_cabac.c.
Referenced by hls_prediction_unit().
| int ff_hevc_ref_idx_lx_decode | ( | HEVCContext * | s, |
| int | num_ref_idx_lx | ||
| ) |
Definition at line 827 of file hevc_cabac.c.
Referenced by hls_prediction_unit().
| int ff_hevc_mvp_lx_flag_decode | ( | HEVCContext * | s | ) |
Definition at line 843 of file hevc_cabac.c.
Referenced by hls_prediction_unit().
| int ff_hevc_no_residual_syntax_flag_decode | ( | HEVCContext * | s | ) |
Definition at line 848 of file hevc_cabac.c.
Referenced by hls_coding_unit().
| int ff_hevc_split_transform_flag_decode | ( | HEVCContext * | s, |
| int | log2_trafo_size | ||
| ) |
Definition at line 884 of file hevc_cabac.c.
Referenced by hls_transform_tree().
| int ff_hevc_cbf_cb_cr_decode | ( | HEVCContext * | s, |
| int | trafo_depth | ||
| ) |
Definition at line 889 of file hevc_cabac.c.
Referenced by hls_transform_tree().
| int ff_hevc_cbf_luma_decode | ( | HEVCContext * | s, |
| int | trafo_depth | ||
| ) |
Definition at line 894 of file hevc_cabac.c.
Referenced by hls_transform_tree().
| int ff_hevc_transform_skip_flag_decode | ( | HEVCContext * | s, |
| int | c_idx | ||
| ) |
Definition at line 899 of file hevc_cabac.c.
Referenced by ff_hevc_hls_residual_coding().
| int ff_hevc_frame_nb_refs | ( | HEVCContext * | s | ) |
Get the number of candidate references for the current frame.
Definition at line 465 of file hevc_refs.c.
Referenced by hls_slice_header().
| int ff_hevc_set_new_ref | ( | HEVCContext * | s, |
| AVFrame ** | frame, | ||
| int | poc | ||
| ) |
Definition at line 118 of file hevc_refs.c.
Referenced by hevc_frame_start().
| int ff_hevc_output_frame | ( | HEVCContext * | s, |
| AVFrame * | frame, | ||
| int | flush | ||
| ) |
Find next frame in output order and put a reference to it in frame.
Definition at line 150 of file hevc_refs.c.
Referenced by hevc_decode_frame(), and hevc_frame_start().
| void ff_hevc_unref_frame | ( | HEVCContext * | s, |
| HEVCFrame * | frame, | ||
| int | flags | ||
| ) |
Definition at line 30 of file hevc_refs.c.
Referenced by alloc_frame(), ff_hevc_clear_refs(), ff_hevc_flush_dpb(), ff_hevc_frame_rps(), ff_hevc_output_frame(), hevc_decode_frame(), hevc_decode_free(), hevc_ref_frame(), and hevc_update_thread_context().
| void ff_hevc_set_neighbour_available | ( | HEVCContext * | s, |
| int | x0, | ||
| int | y0, | ||
| int | nPbW, | ||
| int | nPbH | ||
| ) |
Definition at line 41 of file hevc_mvs.c.
Referenced by ff_hevc_luma_mv_merge_mode(), hls_prediction_unit(), and hls_transform_unit().
| void ff_hevc_luma_mv_merge_mode | ( | HEVCContext * | s, |
| int | x0, | ||
| int | y0, | ||
| int | nPbW, | ||
| int | nPbH, | ||
| int | log2_cb_size, | ||
| int | part_idx, | ||
| int | merge_idx, | ||
| MvField * | mv | ||
| ) |
Definition at line 529 of file hevc_mvs.c.
Referenced by hls_prediction_unit().
| void ff_hevc_luma_mv_mvp_mode | ( | HEVCContext * | s, |
| int | x0, | ||
| int | y0, | ||
| int | nPbW, | ||
| int | nPbH, | ||
| int | log2_cb_size, | ||
| int | part_idx, | ||
| int | merge_idx, | ||
| MvField * | mv, | ||
| int | mvp_lx_flag, | ||
| int | LX | ||
| ) |
Definition at line 620 of file hevc_mvs.c.
Referenced by hls_prediction_unit().
| void ff_hevc_set_qPy | ( | HEVCContext * | s, |
| int | xC, | ||
| int | yC, | ||
| int | xBase, | ||
| int | yBase, | ||
| int | log2_cb_size | ||
| ) |
Definition at line 152 of file hevc_filter.c.
Referenced by hls_coding_unit(), and hls_transform_unit().
| void ff_hevc_deblocking_boundary_strengths | ( | HEVCContext * | s, |
| int | x0, | ||
| int | y0, | ||
| int | log2_trafo_size, | ||
| int | slice_or_tiles_up_boundary, | ||
| int | slice_or_tiles_left_boundary | ||
| ) |
Definition at line 552 of file hevc_filter.c.
Referenced by hls_coding_unit(), hls_pcm_sample(), and hls_transform_tree().
| int ff_hevc_cu_qp_delta_sign_flag | ( | HEVCContext * | s | ) |
Definition at line 697 of file hevc_cabac.c.
Referenced by hls_transform_unit().
| int ff_hevc_cu_qp_delta_abs | ( | HEVCContext * | s | ) |
Definition at line 672 of file hevc_cabac.c.
Referenced by hls_transform_unit().
| void ff_hevc_hls_filter | ( | HEVCContext * | s, |
| int | x, | ||
| int | y | ||
| ) |
Definition at line 676 of file hevc_filter.c.
Referenced by ff_hevc_hls_filters(), hls_decode_entry(), and hls_decode_entry_wpp().
| void ff_hevc_hls_filters | ( | HEVCContext * | s, |
| int | x_ctb, | ||
| int | y_ctb, | ||
| int | ctb_size | ||
| ) |
Definition at line 683 of file hevc_filter.c.
Referenced by hls_decode_entry(), and hls_decode_entry_wpp().
| void ff_hevc_hls_residual_coding | ( | HEVCContext * | s, |
| int | x0, | ||
| int | y0, | ||
| int | log2_trafo_size, | ||
| enum ScanType | scan_idx, | ||
| int | c_idx | ||
| ) |
Definition at line 1058 of file hevc_cabac.c.
Referenced by hls_transform_unit().
| void ff_hevc_hls_mvd_coding | ( | HEVCContext * | s, |
| int | x0, | ||
| int | y0, | ||
| int | log2_cb_size | ||
| ) |
Definition at line 1401 of file hevc_cabac.c.
Referenced by hls_prediction_unit().
| const uint8_t ff_hevc_qpel_extra_before[4] |
| const uint8_t ff_hevc_qpel_extra_after[4] |
| const uint8_t ff_hevc_diag_scan4x4_x[16] |
Definition at line 434 of file hevc_cabac.c.
Referenced by ff_hevc_hls_residual_coding(), and scaling_list_data().
| const uint8_t ff_hevc_diag_scan4x4_y[16] |
Definition at line 441 of file hevc_cabac.c.
Referenced by ff_hevc_hls_residual_coding(), and scaling_list_data().
| const uint8_t ff_hevc_diag_scan8x8_x[64] |
Definition at line 455 of file hevc_cabac.c.
Referenced by ff_hevc_hls_residual_coding(), and scaling_list_data().
| const uint8_t ff_hevc_diag_scan8x8_y[64] |
Definition at line 474 of file hevc_cabac.c.
Referenced by ff_hevc_hls_residual_coding(), and scaling_list_data().
1.8.2