#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "internal.h"
#include "dsputil.h"
#include "avcodec.h"
#include "mpegvideo.h"
#include "h264.h"
#include "h264data.h"
#include "h264_mvpred.h"
#include "golomb.h"
#include "mathops.h"
#include "rectangle.h"
#include "thread.h"
#include "vdpau_internal.h"
#include "libavutil/avassert.h"
#include "cabac.h"
#include <assert.h>
Go to the source code of this file.
Defines | |
#define | UNCHECKED_BITSTREAM_READER 1 |
#define | RS 0 |
#define | IN_RANGE(a, b, size) (((a) >= (b)) && ((a) < ((b)+(size)))) |
#define | copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field) |
#define | XCHG(a, b, xchg) |
#define | hl_decode_mb_simple(sh, bits) |
Process a macroblock; this case avoids checks for expensive uncommon cases. | |
#define | T(x) (x>>2) | ((x<<2) & 0xF) |
#define | T(x) (x>>3) | ((x&7)<<3) |
Functions | |
int | ff_h264_check_intra4x4_pred_mode (H264Context *h) |
checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks. | |
static int | check_intra_pred_mode (H264Context *h, int mode, int is_chroma) |
int | ff_h264_check_intra16x16_pred_mode (H264Context *h, int mode) |
checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks. | |
int | ff_h264_check_intra_chroma_pred_mode (H264Context *h, int mode) |
checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks. | |
const uint8_t * | ff_h264_decode_nal (H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length) |
Decode a network abstraction layer unit. | |
static int | ff_h264_decode_rbsp_trailing (H264Context *h, const uint8_t *src) |
Identify the exact end of the bitstream. | |
static int | get_lowest_part_list_y (H264Context *h, Picture *pic, int n, int height, int y_offset, int list) |
static void | get_lowest_part_y (H264Context *h, int refs[2][48], int n, int height, int y_offset, int list0, int list1, int *nrefs) |
static void | await_references (H264Context *h) |
Wait until all reference frames are available for MC operations. | |
static av_always_inline void | mc_dir_part (H264Context *h, Picture *pic, int n, int square, int height, int delta, int list, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int src_x_offset, int src_y_offset, qpel_mc_func *qpix_op, h264_chroma_mc_func chroma_op, int pixel_shift, int chroma_idc) |
static av_always_inline void | mc_part_std (H264Context *h, int n, int square, int height, int delta, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int x_offset, int y_offset, qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, int list0, int list1, int pixel_shift, int chroma_idc) |
static av_always_inline void | mc_part_weighted (H264Context *h, int n, int square, int height, int delta, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int x_offset, int y_offset, qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, h264_weight_func luma_weight_op, h264_weight_func chroma_weight_op, h264_biweight_func luma_weight_avg, h264_biweight_func chroma_weight_avg, int list0, int list1, int pixel_shift, int chroma_idc) |
static av_always_inline void | mc_part (H264Context *h, int n, int square, int height, int delta, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int x_offset, int y_offset, qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, h264_weight_func *weight_op, h264_biweight_func *weight_avg, int list0, int list1, int pixel_shift, int chroma_idc) |
static av_always_inline void | prefetch_motion (H264Context *h, int list, int pixel_shift, int chroma_idc) |
static av_always_inline void | hl_motion (H264Context *h, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, qpel_mc_func(*qpix_put)[16], h264_chroma_mc_func(*chroma_put), qpel_mc_func(*qpix_avg)[16], h264_chroma_mc_func(*chroma_avg), h264_weight_func *weight_op, h264_biweight_func *weight_avg, int pixel_shift, int chroma_idc) |
static av_always_inline void | hl_motion_420 (H264Context *h, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, qpel_mc_func(*qpix_put)[16], h264_chroma_mc_func(*chroma_put), qpel_mc_func(*qpix_avg)[16], h264_chroma_mc_func(*chroma_avg), h264_weight_func *weight_op, h264_biweight_func *weight_avg, int pixel_shift) |
static av_always_inline void | hl_motion_422 (H264Context *h, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, qpel_mc_func(*qpix_put)[16], h264_chroma_mc_func(*chroma_put), qpel_mc_func(*qpix_avg)[16], h264_chroma_mc_func(*chroma_avg), h264_weight_func *weight_op, h264_biweight_func *weight_avg, int pixel_shift) |
static void | free_tables (H264Context *h, int free_rbsp) |
static void | init_dequant8_coeff_table (H264Context *h) |
static void | init_dequant4_coeff_table (H264Context *h) |
static void | init_dequant_tables (H264Context *h) |
int | ff_h264_alloc_tables (H264Context *h) |
Allocate tables. | |
static void | clone_tables (H264Context *dst, H264Context *src, int i) |
Mimic alloc_tables(), but for every context thread. | |
static int | context_init (H264Context *h) |
Init context Allocate buffers which are not shared amongst multiple threads. | |
static int | decode_nal_units (H264Context *h, const uint8_t *buf, int buf_size) |
static av_cold void | common_init (H264Context *h) |
int | ff_h264_decode_extradata (H264Context *h, const uint8_t *buf, int size) |
av_cold int | ff_h264_decode_init (AVCodecContext *avctx) |
static void | copy_picture_range (Picture **to, Picture **from, int count, MpegEncContext *new_base, MpegEncContext *old_base) |
static void | copy_parameter_set (void **to, void **from, int count, int size) |
static int | decode_init_thread_copy (AVCodecContext *avctx) |
static int | decode_update_thread_context (AVCodecContext *dst, const AVCodecContext *src) |
int | ff_h264_frame_start (H264Context *h) |
static void | decode_postinit (H264Context *h, int setup_finished) |
Run setup operations that must be run after slice header decoding. | |
static av_always_inline void | backup_mb_border (H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, int simple) |
static av_always_inline void | xchg_mb_border (H264Context *h, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, int xchg, int chroma444, int simple, int pixel_shift) |
static av_always_inline int | dctcoef_get (DCTELEM *mb, int high_bit_depth, int index) |
static av_always_inline void | dctcoef_set (DCTELEM *mb, int high_bit_depth, int index, int value) |
static av_always_inline void | hl_decode_mb_predict_luma (H264Context *h, int mb_type, int is_h264, int simple, int transform_bypass, int pixel_shift, int *block_offset, int linesize, uint8_t *dest_y, int p) |
static av_always_inline void | hl_decode_mb_idct_luma (H264Context *h, int mb_type, int is_h264, int simple, int transform_bypass, int pixel_shift, int *block_offset, int linesize, uint8_t *dest_y, int p) |
static av_always_inline void | hl_decode_mb_internal (H264Context *h, int simple, int pixel_shift) |
static av_always_inline void | hl_decode_mb_444_internal (H264Context *h, int simple, int pixel_shift) |
hl_decode_mb_simple (0, 8) | |
hl_decode_mb_simple (1, 16) | |
static void av_noinline | hl_decode_mb_complex (H264Context *h) |
Process a macroblock; this handles edge cases, such as interlacing. | |
static void av_noinline | hl_decode_mb_444_complex (H264Context *h) |
static void av_noinline | hl_decode_mb_444_simple (H264Context *h) |
void | ff_h264_hl_decode_mb (H264Context *h) |
static int | pred_weight_table (H264Context *h) |
static void | implicit_weight_table (H264Context *h, int field) |
Initialize implicit_weight table. | |
static void | idr (H264Context *h) |
instantaneous decoder refresh. | |
static void | flush_dpb (AVCodecContext *avctx) |
static int | init_poc (H264Context *h) |
static void | init_scan_tables (H264Context *h) |
initialize scan tables | |
static int | field_end (H264Context *h, int in_setup) |
static void | clone_slice (H264Context *dst, H264Context *src) |
Replicate H264 "master" context to thread contexts. | |
int | ff_h264_get_profile (SPS *sps) |
computes profile from profile_idc and constraint_set?_flags | |
static int | decode_slice_header (H264Context *h, H264Context *h0) |
decodes a slice header. | |
int | ff_h264_get_slice_type (const H264Context *h) |
Reconstruct bitstream slice_type. | |
static av_always_inline void | fill_filter_caches_inter (H264Context *h, MpegEncContext *const s, int mb_type, int top_xy, int left_xy[LEFT_MBS], int top_type, int left_type[LEFT_MBS], int mb_xy, int list) |
static int | fill_filter_caches (H264Context *h, int mb_type) |
static void | loop_filter (H264Context *h, int start_x, int end_x) |
static void | predict_field_decoding_flag (H264Context *h) |
static void | decode_finish_row (H264Context *h) |
Draw edges and report progress for the last MB row. | |
static int | decode_slice (struct AVCodecContext *avctx, void *arg) |
static int | execute_decode_slices (H264Context *h, int context_count) |
Call decode_slice() for each context. | |
static int | get_consumed_bytes (MpegEncContext *s, int pos, int buf_size) |
returns the number of bytes consumed for building the current frame | |
static int | decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) |
av_cold void | ff_h264_free_context (H264Context *h) |
Free any data that may have been allocated in the H264 context like SPS, PPS etc. | |
av_cold int | ff_h264_decode_end (AVCodecContext *avctx) |
Variables | |
static const uint8_t | rem6 [QP_MAX_NUM+1] |
static const uint8_t | div6 [QP_MAX_NUM+1] |
static enum PixelFormat | hwaccel_pixfmt_list_h264_jpeg_420 [] |
static const AVProfile | profiles [] |
static const AVOption | h264_options [] |
static const AVClass | h264_class |
static const AVClass | h264_vdpau_class |
AVCodec | ff_h264_decoder |
Definition in file h264.c.
#define copy_fields | ( | to, | |||
from, | |||||
start_field, | |||||
end_field | ) | memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field) |
Definition at line 1219 of file h264.c.
Referenced by decode_update_thread_context(), update_context_from_user(), and vp3_update_thread_context().
#define hl_decode_mb_simple | ( | sh, | |||
bits | ) |
Value:
static void hl_decode_mb_simple_ ## bits(H264Context *h){ \ hl_decode_mb_internal(h, 1, sh); \ }
#define RS 0 |
Referenced by ff_h264_decode_nal().
#define T | ( | x | ) | (x>>3) | ((x&7)<<3) |
#define T | ( | x | ) | (x>>2) | ((x<<2) & 0xF) |
#define XCHG | ( | a, | |||
b, | |||||
xchg | ) |
static void await_references | ( | H264Context * | h | ) | [static] |
Wait until all reference frames are available for MC operations.
h | the H264 context |
Definition at line 316 of file h264.c.
Referenced by hl_motion().
static av_always_inline void backup_mb_border | ( | H264Context * | h, | |
uint8_t * | src_y, | |||
uint8_t * | src_cb, | |||
uint8_t * | src_cr, | |||
int | linesize, | |||
int | uvlinesize, | |||
int | simple | |||
) | [static] |
Definition at line 1548 of file h264.c.
Referenced by filter_mb_row(), filter_mb_row_simple(), and loop_filter().
static int check_intra_pred_mode | ( | H264Context * | h, | |
int | mode, | |||
int | is_chroma | |||
) | [static] |
Definition at line 106 of file h264.c.
Referenced by ff_h264_check_intra16x16_pred_mode(), and ff_h264_check_intra_chroma_pred_mode().
static void clone_slice | ( | H264Context * | dst, | |
H264Context * | src | |||
) | [static] |
Replicate H264 "master" context to thread contexts.
Definition at line 2578 of file h264.c.
Referenced by decode_slice_header().
static void clone_tables | ( | H264Context * | dst, | |
H264Context * | src, | |||
int | i | |||
) | [static] |
Mimic alloc_tables(), but for every context thread.
Definition at line 1014 of file h264.c.
Referenced by decode_slice_header().
static av_cold void common_init | ( | H264Context * | h | ) | [static] |
static int context_init | ( | H264Context * | h | ) | [static] |
Init context Allocate buffers which are not shared amongst multiple threads.
Definition at line 1036 of file h264.c.
Referenced by decode_slice_header(), and decode_update_thread_context().
static void copy_parameter_set | ( | void ** | to, | |
void ** | from, | |||
int | count, | |||
int | size | |||
) | [static] |
static void copy_picture_range | ( | Picture ** | to, | |
Picture ** | from, | |||
int | count, | |||
MpegEncContext * | new_base, | |||
MpegEncContext * | old_base | |||
) | [static] |
static av_always_inline int dctcoef_get | ( | DCTELEM * | mb, | |
int | high_bit_depth, | |||
int | index | |||
) | [static] |
Definition at line 1729 of file h264.c.
Referenced by hl_decode_mb_idct_luma(), hl_decode_mb_internal(), and hl_decode_mb_predict_luma().
static av_always_inline void dctcoef_set | ( | DCTELEM * | mb, | |
int | high_bit_depth, | |||
int | index, | |||
int | value | |||
) | [static] |
static void decode_finish_row | ( | H264Context * | h | ) | [static] |
Draw edges and report progress for the last MB row.
Definition at line 3564 of file h264.c.
Referenced by decode_slice().
static int decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | data_size, | |||
AVPacket * | avpkt | |||
) | [static] |
static int decode_init_thread_copy | ( | AVCodecContext * | avctx | ) | [static] |
static int decode_nal_units | ( | H264Context * | h, | |
const uint8_t * | buf, | |||
int | buf_size | |||
) | [static] |
< thread context
< number of NALs that need decoding before the next frame thread starts
Definition at line 3771 of file h264.c.
Referenced by decode_frame(), and ff_h264_decode_extradata().
static void decode_postinit | ( | H264Context * | h, | |
int | setup_finished | |||
) | [static] |
Run setup operations that must be run after slice header decoding.
This includes finding the next displayed frame.
h | h264 master context | |
setup_finished | enough NALs have been read that we can call ff_thread_finish_setup() |
Definition at line 1383 of file h264.c.
Referenced by decode_frame(), and decode_nal_units().
static int decode_slice | ( | struct AVCodecContext * | avctx, | |
void * | arg | |||
) | [static] |
static int decode_slice_header | ( | H264Context * | h, | |
H264Context * | h0 | |||
) | [static] |
decodes a slice header.
This will also call MPV_common_init() and frame_start() as needed.
h | h264context | |
h0 | h264 master context (differs from 'h' when doing sliced based parallel decoding) |
static int decode_update_thread_context | ( | AVCodecContext * | dst, | |
const AVCodecContext * | src | |||
) | [static] |
static int execute_decode_slices | ( | H264Context * | h, | |
int | context_count | |||
) | [static] |
Call decode_slice() for each context.
h | h264 master context | |
context_count | number of contexts to execute |
Definition at line 3736 of file h264.c.
Referenced by decode_nal_units().
int ff_h264_alloc_tables | ( | H264Context * | h | ) |
Allocate tables.
needs width/height
Definition at line 967 of file h264.c.
Referenced by decode_slice_header(), decode_update_thread_context(), and svq3_decode_init().
int ff_h264_check_intra16x16_pred_mode | ( | H264Context * | h, | |
int | mode | |||
) |
checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks.
Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks.
Definition at line 141 of file h264.c.
Referenced by ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), and svq3_decode_mb().
int ff_h264_check_intra4x4_pred_mode | ( | H264Context * | h | ) |
checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks.
Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks.
Definition at line 70 of file h264.c.
Referenced by ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), and svq3_decode_mb().
int ff_h264_check_intra_chroma_pred_mode | ( | H264Context * | h, | |
int | mode | |||
) |
checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks.
Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks.
Definition at line 149 of file h264.c.
Referenced by ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), and svq3_decode_mb().
av_cold int ff_h264_decode_end | ( | AVCodecContext * | avctx | ) |
int ff_h264_decode_extradata | ( | H264Context * | h, | |
const uint8_t * | buf, | |||
int | size | |||
) |
Definition at line 1075 of file h264.c.
Referenced by decode_frame(), ff_h264_decode_init(), and h264_parse().
av_cold int ff_h264_decode_init | ( | AVCodecContext * | avctx | ) |
const uint8_t* ff_h264_decode_nal | ( | H264Context * | h, | |
const uint8_t * | src, | |||
int * | dst_length, | |||
int * | consumed, | |||
int | length | |||
) |
Decode a network abstraction layer unit.
consumed | is the number of bytes used as input | |
length | is the length of the array | |
dst_length | is the number of decoded bytes FIXME here or a decode rbsp tailing? |
Definition at line 155 of file h264.c.
Referenced by decode_nal_units(), and parse_nal_units().
static int ff_h264_decode_rbsp_trailing | ( | H264Context * | h, | |
const uint8_t * | src | |||
) | [static] |
Identify the exact end of the bitstream.
Definition at line 253 of file h264.c.
Referenced by decode_nal_units().
int ff_h264_frame_start | ( | H264Context * | h | ) |
Definition at line 1313 of file h264.c.
Referenced by decode_slice_header(), and svq3_decode_frame().
av_cold void ff_h264_free_context | ( | H264Context * | h | ) |
Free any data that may have been allocated in the H264 context like SPS, PPS etc.
Definition at line 4239 of file h264.c.
Referenced by close(), ff_h264_decode_end(), and svq3_decode_end().
int ff_h264_get_profile | ( | SPS * | sps | ) |
computes profile from profile_idc and constraint_set?_flags
compute profile from sps
sps | SPS |
Definition at line 2609 of file h264.c.
Referenced by decode_slice_header(), and parse_nal_units().
int ff_h264_get_slice_type | ( | const H264Context * | h | ) |
Reconstruct bitstream slice_type.
Definition at line 3270 of file h264.c.
Referenced by decode_slice(), and fill_slice_long().
void ff_h264_hl_decode_mb | ( | H264Context * | h | ) |
Definition at line 2225 of file h264.c.
Referenced by decode_mb(), decode_slice(), and svq3_decode_frame().
static int field_end | ( | H264Context * | h, | |
int | in_setup | |||
) | [static] |
static int fill_filter_caches | ( | H264Context * | h, | |
int | mb_type | |||
) | [static] |
Definition at line 3362 of file h264.c.
Referenced by loop_filter().
static av_always_inline void fill_filter_caches_inter | ( | H264Context * | h, | |
MpegEncContext *const | s, | |||
int | mb_type, | |||
int | top_xy, | |||
int | left_xy[LEFT_MBS], | |||
int | top_type, | |||
int | left_type[LEFT_MBS], | |||
int | mb_xy, | |||
int | list | |||
) | [static] |
static void flush_dpb | ( | AVCodecContext * | avctx | ) | [static] |
static void free_tables | ( | H264Context * | h, | |
int | free_rbsp | |||
) | [static] |
Definition at line 865 of file h264.c.
Referenced by decode_slice_header(), ff_h264_alloc_tables(), and ff_h264_free_context().
static int get_consumed_bytes | ( | MpegEncContext * | s, | |
int | pos, | |||
int | buf_size | |||
) | [static] |
static int get_lowest_part_list_y | ( | H264Context * | h, | |
Picture * | pic, | |||
int | n, | |||
int | height, | |||
int | y_offset, | |||
int | list | |||
) | [inline, static] |
static void get_lowest_part_y | ( | H264Context * | h, | |
int | refs[2][48], | |||
int | n, | |||
int | height, | |||
int | y_offset, | |||
int | list0, | |||
int | list1, | |||
int * | nrefs | |||
) | [inline, static] |
static void av_noinline hl_decode_mb_444_complex | ( | H264Context * | h | ) | [static] |
static av_always_inline void hl_decode_mb_444_internal | ( | H264Context * | h, | |
int | simple, | |||
int | pixel_shift | |||
) | [static] |
Definition at line 2104 of file h264.c.
Referenced by hl_decode_mb_444_complex(), and hl_decode_mb_444_simple().
static void av_noinline hl_decode_mb_444_simple | ( | H264Context * | h | ) | [static] |
static void av_noinline hl_decode_mb_complex | ( | H264Context * | h | ) | [static] |
Process a macroblock; this handles edge cases, such as interlacing.
Definition at line 2213 of file h264.c.
Referenced by ff_h264_hl_decode_mb().
static av_always_inline void hl_decode_mb_idct_luma | ( | H264Context * | h, | |
int | mb_type, | |||
int | is_h264, | |||
int | simple, | |||
int | transform_bypass, | |||
int | pixel_shift, | |||
int * | block_offset, | |||
int | linesize, | |||
uint8_t * | dest_y, | |||
int | p | |||
) | [static] |
Definition at line 1846 of file h264.c.
Referenced by hl_decode_mb_444_internal(), and hl_decode_mb_internal().
static av_always_inline void hl_decode_mb_internal | ( | H264Context * | h, | |
int | simple, | |||
int | pixel_shift | |||
) | [static] |
static av_always_inline void hl_decode_mb_predict_luma | ( | H264Context * | h, | |
int | mb_type, | |||
int | is_h264, | |||
int | simple, | |||
int | transform_bypass, | |||
int | pixel_shift, | |||
int * | block_offset, | |||
int | linesize, | |||
uint8_t * | dest_y, | |||
int | p | |||
) | [static] |
Definition at line 1743 of file h264.c.
Referenced by hl_decode_mb_444_internal(), and hl_decode_mb_internal().
hl_decode_mb_simple | ( | 1 | , | |
16 | ||||
) |
hl_decode_mb_simple | ( | 0 | , | |
8 | ||||
) |
static av_always_inline void hl_motion | ( | H264Context * | h, | |
uint8_t * | dest_y, | |||
uint8_t * | dest_cb, | |||
uint8_t * | dest_cr, | |||
qpel_mc_func(*) | qpix_put[16], | |||
h264_chroma_mc_func * | chroma_put, | |||
qpel_mc_func(*) | qpix_avg[16], | |||
h264_chroma_mc_func * | chroma_avg, | |||
h264_weight_func * | weight_op, | |||
h264_biweight_func * | weight_avg, | |||
int | pixel_shift, | |||
int | chroma_idc | |||
) | [static] |
Definition at line 741 of file h264.c.
Referenced by hl_decode_mb_444_internal(), hl_motion_420(), and hl_motion_422().
static av_always_inline void hl_motion_420 | ( | H264Context * | h, | |
uint8_t * | dest_y, | |||
uint8_t * | dest_cb, | |||
uint8_t * | dest_cr, | |||
qpel_mc_func(*) | qpix_put[16], | |||
h264_chroma_mc_func * | chroma_put, | |||
qpel_mc_func(*) | qpix_avg[16], | |||
h264_chroma_mc_func * | chroma_avg, | |||
h264_weight_func * | weight_op, | |||
h264_biweight_func * | weight_avg, | |||
int | pixel_shift | |||
) | [static] |
static av_always_inline void hl_motion_422 | ( | H264Context * | h, | |
uint8_t * | dest_y, | |||
uint8_t * | dest_cb, | |||
uint8_t * | dest_cr, | |||
qpel_mc_func(*) | qpix_put[16], | |||
h264_chroma_mc_func * | chroma_put, | |||
qpel_mc_func(*) | qpix_avg[16], | |||
h264_chroma_mc_func * | chroma_avg, | |||
h264_weight_func * | weight_op, | |||
h264_biweight_func * | weight_avg, | |||
int | pixel_shift | |||
) | [static] |
static void idr | ( | H264Context * | h | ) | [static] |
instantaneous decoder refresh.
Definition at line 2374 of file h264.c.
Referenced by decode_nal_units(), flush_dpb(), and h264_probe().
static void implicit_weight_table | ( | H264Context * | h, | |
int | field | |||
) | [static] |
Initialize implicit_weight table.
field | 0/1 initialize the weight for interlaced MBAFF -1 initializes the rest |
Definition at line 2310 of file h264.c.
Referenced by decode_slice_header().
static void init_dequant4_coeff_table | ( | H264Context * | h | ) | [static] |
static void init_dequant8_coeff_table | ( | H264Context * | h | ) | [static] |
static void init_dequant_tables | ( | H264Context * | h | ) | [static] |
Definition at line 950 of file h264.c.
Referenced by decode_slice_header(), and ff_h264_alloc_tables().
static int init_poc | ( | H264Context * | h | ) | [static] |
static void init_scan_tables | ( | H264Context * | h | ) | [static] |
static void loop_filter | ( | H264Context * | h, | |
int | start_x, | |||
int | end_x | |||
) | [static] |
static av_always_inline void mc_dir_part | ( | H264Context * | h, | |
Picture * | pic, | |||
int | n, | |||
int | square, | |||
int | height, | |||
int | delta, | |||
int | list, | |||
uint8_t * | dest_y, | |||
uint8_t * | dest_cb, | |||
uint8_t * | dest_cr, | |||
int | src_x_offset, | |||
int | src_y_offset, | |||
qpel_mc_func * | qpix_op, | |||
h264_chroma_mc_func | chroma_op, | |||
int | pixel_shift, | |||
int | chroma_idc | |||
) | [static] |
static av_always_inline void mc_part | ( | H264Context * | h, | |
int | n, | |||
int | square, | |||
int | height, | |||
int | delta, | |||
uint8_t * | dest_y, | |||
uint8_t * | dest_cb, | |||
uint8_t * | dest_cr, | |||
int | x_offset, | |||
int | y_offset, | |||
qpel_mc_func * | qpix_put, | |||
h264_chroma_mc_func | chroma_put, | |||
qpel_mc_func * | qpix_avg, | |||
h264_chroma_mc_func | chroma_avg, | |||
h264_weight_func * | weight_op, | |||
h264_biweight_func * | weight_avg, | |||
int | list0, | |||
int | list1, | |||
int | pixel_shift, | |||
int | chroma_idc | |||
) | [static] |
static av_always_inline void mc_part_std | ( | H264Context * | h, | |
int | n, | |||
int | square, | |||
int | height, | |||
int | delta, | |||
uint8_t * | dest_y, | |||
uint8_t * | dest_cb, | |||
uint8_t * | dest_cr, | |||
int | x_offset, | |||
int | y_offset, | |||
qpel_mc_func * | qpix_put, | |||
h264_chroma_mc_func | chroma_put, | |||
qpel_mc_func * | qpix_avg, | |||
h264_chroma_mc_func | chroma_avg, | |||
int | list0, | |||
int | list1, | |||
int | pixel_shift, | |||
int | chroma_idc | |||
) | [static] |
static av_always_inline void mc_part_weighted | ( | H264Context * | h, | |
int | n, | |||
int | square, | |||
int | height, | |||
int | delta, | |||
uint8_t * | dest_y, | |||
uint8_t * | dest_cb, | |||
uint8_t * | dest_cr, | |||
int | x_offset, | |||
int | y_offset, | |||
qpel_mc_func * | qpix_put, | |||
h264_chroma_mc_func | chroma_put, | |||
h264_weight_func | luma_weight_op, | |||
h264_weight_func | chroma_weight_op, | |||
h264_biweight_func | luma_weight_avg, | |||
h264_biweight_func | chroma_weight_avg, | |||
int | list0, | |||
int | list1, | |||
int | pixel_shift, | |||
int | chroma_idc | |||
) | [static] |
static int pred_weight_table | ( | H264Context * | h | ) | [static] |
static void predict_field_decoding_flag | ( | H264Context * | h | ) | [static] |
static av_always_inline void prefetch_motion | ( | H264Context * | h, | |
int | list, | |||
int | pixel_shift, | |||
int | chroma_idc | |||
) | [static] |
Definition at line 719 of file h264.c.
Referenced by hl_motion(), MPV_motion_internal(), and vp8_decode_frame().
static av_always_inline void xchg_mb_border | ( | H264Context * | h, | |
uint8_t * | src_y, | |||
uint8_t * | src_cb, | |||
uint8_t * | src_cr, | |||
int | linesize, | |||
int | uvlinesize, | |||
int | xchg, | |||
int | chroma444, | |||
int | simple, | |||
int | pixel_shift | |||
) | [static] |
Definition at line 1644 of file h264.c.
Referenced by hl_decode_mb_444_internal(), hl_decode_mb_internal(), and intra_predict().
const uint8_t div6[QP_MAX_NUM+1] [static] |
Initial value:
{ 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,10,10,10,10, }
Definition at line 55 of file h264.c.
Referenced by init_dequant4_coeff_table(), and init_dequant8_coeff_table().
Initial value:
{ .name = "h264", .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_H264, .priv_data_size = sizeof(H264Context), .init = ff_h264_decode_init, .close = ff_h264_decode_end, .decode = decode_frame, .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS | CODEC_CAP_FRAME_THREADS, .flush= flush_dpb, .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), .init_thread_copy = ONLY_IF_THREADS_ENABLED(decode_init_thread_copy), .update_thread_context = ONLY_IF_THREADS_ENABLED(decode_update_thread_context), .profiles = NULL_IF_CONFIG_SMALL(profiles), .priv_class = &h264_class, }
const AVClass h264_class [static] |
Initial value:
{ "H264 Decoder", av_default_item_name, h264_options, LIBAVUTIL_VERSION_INT, }
const AVOption h264_options[] [static] |
Initial value:
{ {"is_avc", "is avc", 0x42, FF_OPT_TYPE_INT, {.dbl = 0}, 0, 1, 0}, {"nal_length_size", "nal_length_size", 0x42, FF_OPT_TYPE_INT, {.dbl = 0}, 0, 4, 0}, {NULL} }
const AVClass h264_vdpau_class [static] |
Initial value:
{ "H264 VDPAU Decoder", av_default_item_name, h264_options, LIBAVUTIL_VERSION_INT, }
enum PixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] [static] |
Initial value:
{ { FF_PROFILE_H264_BASELINE, "Baseline" }, { FF_PROFILE_H264_CONSTRAINED_BASELINE, "Constrained Baseline" }, { FF_PROFILE_H264_MAIN, "Main" }, { FF_PROFILE_H264_EXTENDED, "Extended" }, { FF_PROFILE_H264_HIGH, "High" }, { FF_PROFILE_H264_HIGH_10, "High 10" }, { FF_PROFILE_H264_HIGH_10_INTRA, "High 10 Intra" }, { FF_PROFILE_H264_HIGH_422, "High 4:2:2" }, { FF_PROFILE_H264_HIGH_422_INTRA, "High 4:2:2 Intra" }, { FF_PROFILE_H264_HIGH_444, "High 4:4:4" }, { FF_PROFILE_H264_HIGH_444_PREDICTIVE, "High 4:4:4 Predictive" }, { FF_PROFILE_H264_HIGH_444_INTRA, "High 4:4:4 Intra" }, { FF_PROFILE_H264_CAVLC_444, "CAVLC 4:4:4" }, { FF_PROFILE_UNKNOWN }, }
const uint8_t rem6[QP_MAX_NUM+1] [static] |
Initial value:
{ 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, }
Definition at line 51 of file h264.c.
Referenced by init_dequant4_coeff_table(), and init_dequant8_coeff_table().