|
FFmpeg
|
H.264 / AVC / MPEG-4 part10 codec. More...
#include "libavutil/mem_internal.h"#include "cabac.h"#include "error_resilience.h"#include "h264_parse.h"#include "h264_ps.h"#include "h264_sei.h"#include "h2645_parse.h"#include "h264chroma.h"#include "h264dsp.h"#include "h264pred.h"#include "h264qpel.h"#include "mpegutils.h"#include "threadframe.h"#include "videodsp.h"Go to the source code of this file.
Data Structures | |
| struct | MMCO |
| Memory management control operation. More... | |
| struct | H264Picture |
| struct | H264Ref |
| struct | H264SliceContext |
| struct | H264Context |
| H264Context. More... | |
Macros | |
| #define | H264_MAX_PICTURE_COUNT 36 |
| #define | ALLOW_INTERLACE |
| #define | FMO 0 |
| #define | MAX_SLICES 32 |
| The maximum number of slices supported by the decoder. | |
| #define | MB_MBAFF(h) |
| #define | MB_FIELD(sl) |
| #define | FRAME_MBAFF(h) |
| #define | FIELD_PICTURE(h) |
| #define | LEFT_MBS 2 |
| #define | LTOP 0 |
| #define | LBOT 1 |
| #define | LEFT(i) |
| #define | FIELD_OR_MBAFF_PICTURE(h) |
| #define | CABAC(h) |
| #define | CHROMA(h) |
| #define | CHROMA422(h) |
| #define | CHROMA444(h) |
| #define | IS_REF0(a) |
| #define | IS_8x8DCT(a) |
| #define | IS_SUB_8X8(a) |
| #define | IS_SUB_8X4(a) |
| #define | IS_SUB_4X8(a) |
| #define | IS_SUB_4X4(a) |
| #define | IS_DIR(a, part, list) |
| #define | USES_LIST(a, list) |
| #define | DELAYED_PIC_REF (1 << 2) |
| H264Picture.reference has this flag set, when the picture is held for delayed output. | |
| #define | LIST_NOT_USED -1 |
| #define | FRAME_RECOVERED_IDR (1 << 0) |
| We have seen an IDR, so all the following frames in coded order are correctly decodable. | |
| #define | FRAME_RECOVERED_SEI (1 << 1) |
| Sufficient number of frames have been decoded since a SEI recovery point, so all the following frames in presentation order are correct. | |
| #define | FRAME_RECOVERED_HEURISTIC (1 << 2) |
| Recovery point detected by heuristic. | |
| #define | LUMA_DC_BLOCK_INDEX 48 |
| #define | CHROMA_DC_BLOCK_INDEX 49 |
Variables | |
| const uint16_t | ff_h264_mb_sizes [4] |
H.264 / AVC / MPEG-4 part10 codec.
Definition in file h264dec.h.
| #define H264_MAX_PICTURE_COUNT 36 |
Definition at line 47 of file h264dec.h.
Referenced by copy_picture_range(), ff_h264_update_thread_context(), find_unused_picture(), h264_decode_end(), h264_decode_flush(), h264_init_context(), release_unused_pictures(), vk_h264_end_frame(), and vk_h264_start_frame().
| #define FMO 0 |
Definition at line 53 of file h264dec.h.
Referenced by ff_h264_alloc_tables(), fill_decode_neighbors(), and write_back_motion_list().
| #define MAX_SLICES 32 |
| #define MB_MBAFF | ( | h | ) |
Definition at line 62 of file h264dec.h.
Referenced by await_references(), backup_mb_border(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), fill_filter_caches_inter(), and xchg_mb_border().
| #define MB_FIELD | ( | sl | ) |
Definition at line 63 of file h264dec.h.
Referenced by decode_cabac_mb_skip(), decode_cabac_residual_internal(), decode_mb_skip(), fetch_diagonal_mv(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_filter_mb(), fill_decode_caches(), fill_decode_neighbors(), fill_filter_caches(), get_lowest_part_y(), hl_decode_mb(), hl_decode_mb_444(), loop_filter(), mc_dir_part(), mc_part_std(), mc_part_weighted(), and xchg_mb_border().
| #define FRAME_MBAFF | ( | h | ) |
Definition at line 64 of file h264dec.h.
Referenced by backup_mb_border(), decode_cabac_mb_skip(), decode_finish_row(), decode_slice(), fetch_diagonal_mv(), ff_h264_build_ref_list(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_direct_dist_scale_factor(), ff_h264_direct_ref_list_init(), ff_h264_filter_mb(), ff_h264_filter_mb_fast(), fill_decode_caches(), fill_decode_neighbors(), fill_filter_caches(), filter_mb_dir(), h264_slice_init(), hl_decode_mb(), hl_decode_mb_444(), implicit_weight_table(), loop_filter(), pred_spatial_direct_motion(), pred_temp_direct_motion(), and xchg_mb_border().
| #define FIELD_PICTURE | ( | h | ) |
Definition at line 65 of file h264dec.h.
Referenced by await_reference_mb_row(), await_references(), decode_cabac_mb_skip(), decode_finish_row(), decode_nal_units(), ff_h264_build_ref_list(), ff_h264_decode_ref_pic_marking(), ff_h264_direct_dist_scale_factor(), ff_h264_field_end(), ff_h264_queue_decode_slice(), generate_sliding_window_mmcos(), h264_field_start(), h264_filter_mb_fast_internal(), h264_initialise_ref_list(), nvdec_h264_start_frame(), pic_num_extract(), and vk_h264_start_frame().
| #define LEFT_MBS 2 |
Definition at line 66 of file h264dec.h.
Referenced by fill_decode_caches(), fill_decode_neighbors(), fill_filter_caches(), and fill_filter_caches_inter().
| #define LTOP 0 |
Definition at line 67 of file h264dec.h.
Referenced by decode_cabac_intra_mb_type(), decode_cabac_mb_chroma_pre_mode(), ff_h264_decode_mb_cabac(), ff_h264_filter_mb(), fill_decode_caches(), fill_decode_neighbors(), fill_filter_caches(), fill_filter_caches_inter(), filter_mb_dir(), h264_filter_mb_fast_internal(), and pred_pskip_motion().
| #define LBOT 1 |
Definition at line 68 of file h264dec.h.
Referenced by fill_decode_caches(), fill_decode_neighbors(), and fill_filter_caches().
| #define FIELD_OR_MBAFF_PICTURE | ( | h | ) |
Definition at line 82 of file h264dec.h.
Referenced by decode_slice(), ff_h264_execute_decode_slices(), fill_slice_long(), h264_export_frame_props(), h264_slice_init(), and vaapi_h264_decode_slice().
| #define CHROMA | ( | h | ) |
Definition at line 88 of file h264dec.h.
Referenced by add_tu(), alf_filter_chroma(), alloc_frame(), bcw_idx_decode(), check_alf_filter(), check_put_vvc_chroma(), check_put_vvc_chroma_uni(), config_input(), derive_dmvr_bdof_flag(), export_frame_params(), ff_h264_filter_mb(), ff_vvc_alf_dsp_init(), ff_vvc_deblock_bs(), ff_vvc_dsp_init_aarch64(), ff_vvc_dsp_init_riscv(), ff_vvc_inter_dsp_init(), ff_vvc_reconstruct(), ff_vvc_set_new_ref(), filter_frame(), h264_filter_mb_fast_internal(), hls_transform_unit(), intra_chroma_pred_modes(), max_filter_length_chroma(), min_cb_nz_tl_init(), min_cb_tl_init(), min_tu_nz_tl_init(), msm_tl_init(), pred_mode_decode(), pred_weight_table(), query_formats(), set_cu_tabs(), sh_partition_constraints(), and vvc_deblock_bs_chroma().
| #define CHROMA422 | ( | h | ) |
Definition at line 89 of file h264dec.h.
Referenced by backup_mb_border(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_filter_mb(), fill_decode_caches(), filter_mb_dir(), get_pixel_format(), h264_filter_mb_fast_internal(), and hl_decode_mb().
| #define CHROMA444 | ( | h | ) |
Definition at line 90 of file h264dec.h.
Referenced by backup_mb_border(), decode_cabac_residual_nondc(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_filter_mb(), ff_h264_hl_decode_mb(), fill_decode_caches(), filter_mb_dir(), get_pixel_format(), h264_filter_mb_fast_internal(), and loop_filter().
| #define IS_REF0 | ( | a | ) |
Definition at line 92 of file h264dec.h.
Referenced by ff_h264_decode_mb_cavlc().
| #define IS_8x8DCT | ( | a | ) |
Definition at line 93 of file h264dec.h.
Referenced by decode_cabac_luma_residual(), decode_luma_residual(), ff_h264_decode_mb_cabac(), ff_h264_filter_mb(), fill_decode_caches(), fill_filter_caches(), filter_mb_dir(), h264_filter_mb_fast_internal(), hl_decode_mb_idct_luma(), and hl_decode_mb_predict_luma().
| #define IS_SUB_8X8 | ( | a | ) |
Definition at line 94 of file h264dec.h.
Referenced by await_references(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), hl_motion(), pred_spatial_direct_motion(), and pred_temp_direct_motion().
| #define IS_SUB_8X4 | ( | a | ) |
Definition at line 95 of file h264dec.h.
Referenced by await_references(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), and hl_motion().
| #define IS_SUB_4X8 | ( | a | ) |
Definition at line 96 of file h264dec.h.
Referenced by await_references(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), and hl_motion().
| #define IS_SUB_4X4 | ( | a | ) |
Definition at line 97 of file h264dec.h.
Referenced by await_references(), and hl_motion().
| #define IS_DIR | ( | a, | |
| part, | |||
| list ) |
Definition at line 98 of file h264dec.h.
Referenced by await_references(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), and hl_motion().
| #define USES_LIST | ( | a, | |
| list ) |
Definition at line 101 of file h264dec.h.
Referenced by fill_decode_caches(), fill_filter_caches_inter(), hl_decode_mb(), hl_decode_mb_444(), hl_motion(), pred_pskip_motion(), and write_back_motion().
| #define DELAYED_PIC_REF (1 << 2) |
H264Picture.reference has this flag set, when the picture is held for delayed output.
| #define LIST_NOT_USED -1 |
Definition at line 395 of file h264dec.h.
Referenced by ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), fill_decode_caches(), fill_filter_caches_inter(), pred_pskip_motion(), and write_back_motion().
| #define FRAME_RECOVERED_IDR (1 << 0) |
We have seen an IDR, so all the following frames in coded order are correctly decodable.
Definition at line 522 of file h264dec.h.
Referenced by h264_field_start().
| #define FRAME_RECOVERED_SEI (1 << 1) |
Sufficient number of frames have been decoded since a SEI recovery point, so all the following frames in presentation order are correct.
Definition at line 527 of file h264dec.h.
Referenced by h264_field_start(), h264_select_output_frame(), and send_next_delayed_frame().
| #define FRAME_RECOVERED_HEURISTIC (1 << 2) |
Recovery point detected by heuristic.
Definition at line 531 of file h264dec.h.
Referenced by ff_h264_execute_ref_pic_marking().
| #define LUMA_DC_BLOCK_INDEX 48 |
Definition at line 666 of file h264dec.h.
Referenced by decode_cabac_luma_residual(), decode_cabac_residual_internal(), decode_luma_residual(), decode_residual(), get_cabac_cbf_ctx(), and hl_decode_mb_predict_luma().
| #define CHROMA_DC_BLOCK_INDEX 49 |
Definition at line 667 of file h264dec.h.
Referenced by decode_cabac_residual_internal(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), get_cabac_cbf_ctx(), and hl_decode_mb().
| int ff_h264_get_slice_type | ( | const H264SliceContext * | sl | ) |
Reconstruct bitstream slice_type.
Definition at line 2201 of file h264_slice.c.
Referenced by fill_slice_long(), and vaapi_h264_decode_slice().
| int ff_h264_alloc_tables | ( | H264Context * | h | ) |
Allocate tables.
needs width/height
Definition at line 187 of file h264dec.c.
Referenced by h264_slice_header_init().
| int ff_h264_decode_ref_pic_list_reordering | ( | H264SliceContext * | sl, |
| void * | logctx ) |
Definition at line 431 of file h264_refs.c.
Referenced by h264_slice_header_parse().
| int ff_h264_build_ref_list | ( | H264Context * | h, |
| H264SliceContext * | sl ) |
Definition at line 292 of file h264_refs.c.
Referenced by h264_slice_init().
| void ff_h264_remove_all_refs | ( | H264Context * | h | ) |
Definition at line 568 of file h264_refs.c.
Referenced by h264_decode_end(), and idr().
| int ff_h264_execute_ref_pic_marking | ( | H264Context * | h | ) |
Execute the reference picture marking (memory management control operations).
Definition at line 610 of file h264_refs.c.
Referenced by ff_h264_field_end(), ff_h264_update_thread_context(), and h264_field_start().
| int ff_h264_decode_ref_pic_marking | ( | H264SliceContext * | sl, |
| GetBitContext * | gb, | ||
| const H2645NAL * | nal, | ||
| void * | logctx ) |
Definition at line 832 of file h264_refs.c.
Referenced by h264_slice_header_parse().
| void ff_h264_hl_decode_mb | ( | const H264Context * | h, |
| H264SliceContext * | sl ) |
Definition at line 800 of file h264_mb.c.
Referenced by decode_slice(), and h264_er_decode_mb().
| void ff_h264_decode_init_vlc | ( | void | ) |
Definition at line 315 of file h264_cavlc.c.
Referenced by h264_decode_init().
| int ff_h264_decode_mb_cavlc | ( | const H264Context * | h, |
| H264SliceContext * | sl ) |
Decode a macroblock.
Definition at line 665 of file h264_cavlc.c.
Referenced by decode_slice().
| int ff_h264_decode_mb_cabac | ( | const H264Context * | h, |
| H264SliceContext * | sl ) |
Decode a CABAC coded macroblock.
Decode a CABAC coded macroblock.
Definition at line 1920 of file h264_cabac.c.
Referenced by decode_slice().
| void ff_h264_init_cabac_states | ( | const H264Context * | h, |
| H264SliceContext * | sl ) |
Definition at line 1262 of file h264_cabac.c.
Referenced by decode_slice().
| void ff_h264_direct_dist_scale_factor | ( | const H264Context *const | h, |
| H264SliceContext * | sl ) |
Definition at line 61 of file h264_direct.c.
Referenced by h264_slice_init().
| void ff_h264_direct_ref_list_init | ( | const H264Context *const | h, |
| H264SliceContext * | sl ) |
Definition at line 120 of file h264_direct.c.
Referenced by h264_slice_init().
| void ff_h264_pred_direct_motion | ( | const H264Context *const | h, |
| H264SliceContext * | sl, | ||
| int * | mb_type ) |
Definition at line 729 of file h264_direct.c.
Referenced by decode_mb_skip(), ff_h264_decode_mb_cabac(), and ff_h264_decode_mb_cavlc().
| void ff_h264_filter_mb_fast | ( | const H264Context * | h, |
| H264SliceContext * | sl, | ||
| int | mb_x, | ||
| int | mb_y, | ||
| uint8_t * | img_y, | ||
| uint8_t * | img_cb, | ||
| uint8_t * | img_cr, | ||
| unsigned int | linesize, | ||
| unsigned int | uvlinesize ) |
Definition at line 416 of file h264_loopfilter.c.
Referenced by loop_filter().
| void ff_h264_filter_mb | ( | const H264Context * | h, |
| H264SliceContext * | sl, | ||
| int | mb_x, | ||
| int | mb_y, | ||
| uint8_t * | img_y, | ||
| uint8_t * | img_cb, | ||
| uint8_t * | img_cr, | ||
| unsigned int | linesize, | ||
| unsigned int | uvlinesize ) |
Definition at line 716 of file h264_loopfilter.c.
Referenced by ff_h264_filter_mb_fast(), and loop_filter().
|
static |
Get the chroma qp.
Definition at line 672 of file h264dec.h.
Referenced by ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_filter_mb(), filter_mb_dir(), h264_filter_mb_fast_internal(), h264_slice_header_parse(), and loop_filter().
| int ff_h264_field_end | ( | H264Context * | h, |
| H264SliceContext * | sl, | ||
| int | in_setup ) |
Definition at line 189 of file h264_picture.c.
Referenced by ff_h264_queue_decode_slice(), and h264_decode_frame().
| int ff_h264_ref_picture | ( | H264Picture * | dst, |
| const H264Picture * | src ) |
Definition at line 108 of file h264_picture.c.
Referenced by ff_h264_remove_all_refs(), and h264_frame_start().
| int ff_h264_replace_picture | ( | H264Picture * | dst, |
| const H264Picture * | src ) |
Definition at line 135 of file h264_picture.c.
Referenced by ff_h264_update_thread_context().
| void ff_h264_unref_picture | ( | H264Picture * | pic | ) |
Definition at line 39 of file h264_picture.c.
Referenced by alloc_picture(), ff_h264_flush_change(), ff_h264_ref_picture(), ff_h264_remove_all_refs(), ff_h264_replace_picture(), h264_decode_flush(), h264_decode_frame(), h264_frame_start(), h264_free_pic(), and release_unused_pictures().
| void ff_h264_slice_context_init | ( | H264Context * | h, |
| H264SliceContext * | sl ) |
Init slice context.
Definition at line 264 of file h264dec.c.
Referenced by h264_slice_header_init().
| void ff_h264_draw_horiz_band | ( | const H264Context * | h, |
| H264SliceContext * | sl, | ||
| int | y, | ||
| int | height ) |
Definition at line 104 of file h264dec.c.
Referenced by d3d12va_h264_end_frame(), decode_finish_row(), dxva2_h264_end_frame(), vaapi_h264_end_frame(), and vdpau_h264_end_frame().
| int ff_h264_queue_decode_slice | ( | H264Context * | h, |
| const H2645NAL * | nal ) |
Submit a slice for decoding.
Parse the slice header, starting a new field/frame if necessary. If any slices are queued for the previous field, they are decoded.
Definition at line 2076 of file h264_slice.c.
Referenced by decode_nal_units().
| int ff_h264_execute_decode_slices | ( | H264Context * | h | ) |
Call decode_slice() for each context.
| h | h264 master context |
Definition at line 2783 of file h264_slice.c.
Referenced by decode_nal_units(), and ff_h264_queue_decode_slice().
| int ff_h264_update_thread_context | ( | AVCodecContext * | dst, |
| const AVCodecContext * | src ) |
Definition at line 338 of file h264_slice.c.
| int ff_h264_update_thread_context_for_user | ( | AVCodecContext * | dst, |
| const AVCodecContext * | src ) |
Definition at line 471 of file h264_slice.c.
| void ff_h264_flush_change | ( | H264Context * | h | ) |
Definition at line 451 of file h264dec.c.
Referenced by h264_decode_flush(), h264_decode_init(), and h264_init_ps().
| void ff_h264_free_tables | ( | H264Context * | h | ) |
Definition at line 142 of file h264dec.c.
Referenced by h264_decode_end(), h264_decode_flush(), and h264_slice_header_init().
| void ff_h264_set_erpic | ( | ERPicture * | dst, |
| const H264Picture * | src ) |
Definition at line 166 of file h264_picture.c.
Referenced by decode_nal_units(), and h264_frame_start().
|
extern |
Definition at line 60 of file h264dec.c.
Referenced by ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), and hl_decode_mb().