Libav
|
H.264 / AVC / MPEG4 part10 codec. More...
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/timer.h"
#include "internal.h"
#include "cabac.h"
#include "cabac_functions.h"
#include "error_resilience.h"
#include "avcodec.h"
#include "h264.h"
#include "h264data.h"
#include "h264chroma.h"
#include "h264_mvpred.h"
#include "golomb.h"
#include "mathops.h"
#include "mpegutils.h"
#include "rectangle.h"
#include "thread.h"
Go to the source code of this file.
Macros | |
#define | IN_RANGE(a, b, size) (((a) >= (b)) && ((a) < ((b) + (size)))) |
#define | REBASE_PICTURE(pic, new_ctx, old_ctx) |
#define | copy_fields(to, from, start_field, end_field) |
#define | TRANSPOSE(x) (x >> 2) | ((x << 2) & 0xF) |
#define | TRANSPOSE(x) (x >> 3) | ((x & 7) << 3) |
Functions | |
static void | release_unused_pictures (H264Context *h, int remove_current) |
static int | alloc_scratch_buffers (H264Context *h, int linesize) |
static int | init_table_pools (H264Context *h) |
static int | alloc_picture (H264Context *h, H264Picture *pic) |
static int | pic_is_unused (H264Context *h, H264Picture *pic) |
static int | find_unused_picture (H264Context *h) |
static void | init_dequant8_coeff_table (H264Context *h) |
static void | init_dequant4_coeff_table (H264Context *h) |
void | h264_init_dequant_tables (H264Context *h) |
static void | clone_tables (H264Context *dst, H264Context *src, int i) |
Mimic alloc_tables(), but for every context thread. More... | |
static void | copy_picture_range (H264Picture **to, H264Picture **from, int count, H264Context *new_base, H264Context *old_base) |
static int | copy_parameter_set (void **to, void **from, int count, int size) |
static int | h264_slice_header_init (H264Context *h, int reinit) |
int | ff_h264_update_thread_context (AVCodecContext *dst, const AVCodecContext *src) |
static int | h264_frame_start (H264Context *h) |
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 void | implicit_weight_table (H264Context *h, int field) |
Initialize implicit_weight table. More... | |
static void | init_scan_tables (H264Context *h) |
initialize scan tables More... | |
static int | clone_slice (H264Context *dst, H264Context *src) |
Replicate H264 "master" context to thread contexts. More... | |
static enum AVPixelFormat | get_pixel_format (H264Context *h) |
static int | init_dimensions (H264Context *h) |
int | ff_h264_decode_slice_header (H264Context *h, H264Context *h0) |
Decode a slice header. More... | |
int | ff_h264_get_slice_type (const H264Context *h) |
Reconstruct bitstream slice_type. More... | |
static av_always_inline void | fill_filter_caches_inter (H264Context *h, 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. More... | |
static void | er_add_slice (H264Context *h, int startx, int starty, int endx, int endy, int status) |
static int | decode_slice (struct AVCodecContext *avctx, void *arg) |
int | ff_h264_execute_decode_slices (H264Context *h, unsigned context_count) |
Call decode_slice() for each context. More... | |
Variables | |
static const uint8_t | rem6 [QP_MAX_NUM+1] |
static const uint8_t | div6 [QP_MAX_NUM+1] |
static const uint8_t | field_scan [16] |
static const uint8_t | field_scan8x8 [64] |
static const uint8_t | field_scan8x8_cavlc [64] |
static const uint8_t | zigzag_scan8x8_cavlc [64] |
static const uint8_t | dequant4_coeff_init [6][3] |
static const uint8_t | dequant8_coeff_init_scan [16] |
static const uint8_t | dequant8_coeff_init [6][6] |
static enum AVPixelFormat | h264_hwaccel_pixfmt_list_420 [] |
static enum AVPixelFormat | h264_hwaccel_pixfmt_list_jpeg_420 [] |
H.264 / AVC / MPEG4 part10 codec.
Definition in file h264_slice.c.
Definition at line 424 of file h264_slice.c.
Referenced by copy_picture_range().
#define REBASE_PICTURE | ( | pic, | |
new_ctx, | |||
old_ctx | |||
) |
Definition at line 426 of file h264_slice.c.
Referenced by copy_picture_range(), ff_h264_update_thread_context(), and ff_mpeg_update_thread_context().
#define copy_fields | ( | to, | |
from, | |||
start_field, | |||
end_field | |||
) |
Definition at line 466 of file h264_slice.c.
Referenced by ff_h264_update_thread_context().
#define TRANSPOSE | ( | x | ) | (x >> 2) | ((x << 2) & 0xF) |
Referenced by avfilter_register_all(), and init_scan_tables().
#define TRANSPOSE | ( | x | ) | (x >> 3) | ((x & 7) << 3) |
|
static |
Definition at line 183 of file h264_slice.c.
Referenced by ff_h264_decode_slice_header(), and h264_frame_start().
|
static |
Definition at line 196 of file h264_slice.c.
Referenced by ff_h264_update_thread_context(), and h264_frame_start().
|
static |
Definition at line 217 of file h264_slice.c.
Referenced by alloc_picture().
|
static |
Definition at line 244 of file h264_slice.c.
Referenced by h264_frame_start().
|
inlinestatic |
Definition at line 300 of file h264_slice.c.
Referenced by find_unused_picture().
|
static |
Definition at line 309 of file h264_slice.c.
Referenced by h264_frame_start().
|
static |
Definition at line 329 of file h264_slice.c.
Referenced by h264_init_dequant_tables().
|
static |
Definition at line 356 of file h264_slice.c.
Referenced by h264_init_dequant_tables().
void h264_init_dequant_tables | ( | H264Context * | h | ) |
Definition at line 382 of file h264_slice.c.
Referenced by ff_h264_alloc_tables(), and ff_h264_decode_slice_header().
|
static |
Mimic alloc_tables(), but for every context thread.
Definition at line 402 of file h264_slice.c.
Referenced by h264_slice_header_init().
|
static |
Definition at line 431 of file h264_slice.c.
Referenced by ff_h264_update_thread_context().
Definition at line 446 of file h264_slice.c.
Referenced by ff_h264_update_thread_context().
|
static |
Definition at line 1079 of file h264_slice.c.
Referenced by ff_h264_decode_slice_header(), and ff_h264_update_thread_context().
int ff_h264_update_thread_context | ( | AVCodecContext * | dst, |
const AVCodecContext * | src | ||
) |
Definition at line 472 of file h264_slice.c.
|
static |
Definition at line 671 of file h264_slice.c.
Referenced by ff_h264_decode_slice_header().
|
static |
Definition at line 752 of file h264_slice.c.
Referenced by loop_filter().
|
static |
Initialize implicit_weight table.
field | 0/1 initialize the weight for interlaced MBAFF -1 initializes the rest |
Definition at line 853 of file h264_slice.c.
Referenced by ff_h264_decode_slice_header().
|
static |
initialize scan tables
Definition at line 917 of file h264_slice.c.
Referenced by h264_slice_header_init().
|
static |
Replicate H264 "master" context to thread contexts.
Definition at line 954 of file h264_slice.c.
Referenced by ff_h264_decode_slice_header().
|
static |
Definition at line 979 of file h264_slice.c.
Referenced by ff_h264_decode_slice_header().
|
static |
Definition at line 1041 of file h264_slice.c.
Referenced by ff_h264_decode_slice_header().
int ff_h264_decode_slice_header | ( | H264Context * | h, |
H264Context * | h0 | ||
) |
Decode a slice header.
This will (re)intialize the decoder and call h264_frame_start() as needed.
h | h264context |
h0 | h264 master context (differs from 'h' when doing sliced based parallel decoding) |
Definition at line 1188 of file h264_slice.c.
Referenced by decode_nal_units().
int ff_h264_get_slice_type | ( | const H264Context * | h | ) |
Reconstruct bitstream slice_type.
Definition at line 1826 of file h264_slice.c.
Referenced by fill_slice_long(), and vaapi_h264_decode_slice().
|
static |
Definition at line 1844 of file h264_slice.c.
Referenced by fill_filter_caches().
|
static |
Definition at line 1928 of file h264_slice.c.
Referenced by loop_filter().
|
static |
Definition at line 2073 of file h264_slice.c.
Referenced by decode_slice(), and xmv_read_extradata().
|
static |
Definition at line 2142 of file h264_slice.c.
Referenced by decode_slice().
|
static |
Draw edges and report progress for the last MB row.
Definition at line 2155 of file h264_slice.c.
Referenced by decode_slice().
|
static |
Definition at line 2186 of file h264_slice.c.
Referenced by decode_slice().
|
static |
Definition at line 2197 of file h264_slice.c.
Referenced by ff_h264_execute_decode_slices().
int ff_h264_execute_decode_slices | ( | H264Context * | h, |
unsigned | context_count | ||
) |
Call decode_slice() for each context.
h | h264 master context |
context_count | number of contexts to execute |
Definition at line 2361 of file h264_slice.c.
Referenced by decode_nal_units().
|
static |
Definition at line 47 of file h264_slice.c.
Referenced by hls_residual_coding(), init_dequant4_coeff_table(), and init_dequant8_coeff_table().
|
static |
Definition at line 53 of file h264_slice.c.
Referenced by hls_residual_coding(), init_dequant4_coeff_table(), and init_dequant8_coeff_table().
|
static |
Definition at line 59 of file h264_slice.c.
Referenced by init_scan_tables().
|
static |
Definition at line 66 of file h264_slice.c.
Referenced by init_scan_tables().
|
static |
Definition at line 85 of file h264_slice.c.
Referenced by init_scan_tables().
|
static |
Definition at line 105 of file h264_slice.c.
Referenced by init_scan_tables().
|
static |
Definition at line 124 of file h264_slice.c.
Referenced by init_dequant4_coeff_table().
|
static |
Definition at line 133 of file h264_slice.c.
Referenced by init_dequant8_coeff_table().
|
static |
Definition at line 137 of file h264_slice.c.
Referenced by init_dequant8_coeff_table().
|
static |
Definition at line 146 of file h264_slice.c.
Referenced by get_pixel_format().
|
static |
Definition at line 164 of file h264_slice.c.
Referenced by get_pixel_format().