#include "avcodec.h"#include "dsputil.h"#include "mpegvideo.h"#include "faandct.h"#include <limits.h>

Go to the source code of this file.
Defines | |
| #define | CONST_BITS 14 |
| #define | COPY(a) bak->a= src->a |
| #define | COPY(a) dst->a= src->a |
| #define | COLOR(theta, r) |
| #define | OBMC_FILTER(x, t, l, m, r, b) dst[x]= (t*top[x] + l*left[x] + m*mid[x] + r*right[x] + b*bottom[x] + 4)>>3 |
| #define | OBMC_FILTER4(x, t, l, m, r, b) |
| #define | MID 0 |
Functions | |
| static void | dct_unquantize_mpeg1_intra_c (MpegEncContext *s, DCTELEM *block, int n, int qscale) |
| static void | dct_unquantize_mpeg1_inter_c (MpegEncContext *s, DCTELEM *block, int n, int qscale) |
| static void | dct_unquantize_mpeg2_intra_c (MpegEncContext *s, DCTELEM *block, int n, int qscale) |
| static void | dct_unquantize_mpeg2_inter_c (MpegEncContext *s, DCTELEM *block, int n, int qscale) |
| static void | dct_unquantize_h263_intra_c (MpegEncContext *s, DCTELEM *block, int n, int qscale) |
| static void | dct_unquantize_h263_inter_c (MpegEncContext *s, DCTELEM *block, int n, int qscale) |
| static void | draw_edges_c (uint8_t *buf, int wrap, int width, int height, int w) |
| void | ff_init_scantable (uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable) |
| int | DCT_common_init (MpegEncContext *s) |
| static void | copy_picture (Picture *dst, Picture *src) |
| static void | copy_picture_attributes (MpegEncContext *s, AVFrame *dst, AVFrame *src) |
| static int | alloc_picture (MpegEncContext *s, Picture *pic, int shared) |
| static void | free_picture (MpegEncContext *s, Picture *pic) |
| static int | init_duplicate_context (MpegEncContext *s, MpegEncContext *base) |
| static void | free_duplicate_context (MpegEncContext *s) |
| static void | backup_duplicate_context (MpegEncContext *bak, MpegEncContext *src) |
| void | ff_update_duplicate_context (MpegEncContext *dst, MpegEncContext *src) |
| static void | update_duplicate_context_after_me (MpegEncContext *dst, MpegEncContext *src) |
| static void | MPV_common_defaults (MpegEncContext *s) |
| void | MPV_decode_defaults (MpegEncContext *s) |
| int | MPV_common_init (MpegEncContext *s) |
| void | MPV_common_end (MpegEncContext *s) |
| void | init_rl (RLTable *rl, int use_static) |
| int | ff_find_unused_picture (MpegEncContext *s, int shared) |
| static void | update_noise_reduction (MpegEncContext *s) |
| int | MPV_frame_start (MpegEncContext *s, AVCodecContext *avctx) |
| void | MPV_frame_end (MpegEncContext *s) |
| static void | draw_line (uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color) |
| static void | draw_arrow (uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color) |
| void | ff_print_debug_info (MpegEncContext *s, AVFrame *pict) |
| static void | gmc1_motion (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture) |
| static void | gmc_motion (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture) |
| void | ff_emulated_edge_mc (uint8_t *buf, uint8_t *src, int linesize, int block_w, int block_h, int src_x, int src_y, int w, int h) |
| static int | hpel_motion (MpegEncContext *s, uint8_t *dest, uint8_t *src, int field_based, int field_select, int src_x, int src_y, int width, int height, int stride, int h_edge_pos, int v_edge_pos, int w, int h, op_pixels_func *pix_op, int motion_x, int motion_y) |
| static int | hpel_motion_lowres (MpegEncContext *s, uint8_t *dest, uint8_t *src, int field_based, int field_select, int src_x, int src_y, int width, int height, int stride, int h_edge_pos, int v_edge_pos, int w, int h, h264_chroma_mc_func *pix_op, int motion_x, int motion_y) |
| static always_inline void | mpeg_motion (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, uint8_t **ref_picture, op_pixels_func(*pix_op)[4], int motion_x, int motion_y, int h) |
| static always_inline void | mpeg_motion_lowres (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, uint8_t **ref_picture, h264_chroma_mc_func *pix_op, int motion_x, int motion_y, int h) |
| static void | put_obmc (uint8_t *dst, uint8_t *src[5], int stride) |
| static void | obmc_motion (MpegEncContext *s, uint8_t *dest, uint8_t *src, int src_x, int src_y, op_pixels_func *pix_op, int16_t mv[5][2]) |
| static void | qpel_motion (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, uint8_t **ref_picture, op_pixels_func(*pix_op)[4], qpel_mc_func(*qpix_op)[16], int motion_x, int motion_y, int h) |
| int | ff_h263_round_chroma (int x) |
| static void | chroma_4mv_motion (MpegEncContext *s, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture, op_pixels_func *pix_op, int mx, int my) |
| static void | chroma_4mv_motion_lowres (MpegEncContext *s, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture, h264_chroma_mc_func *pix_op, int mx, int my) |
| static void | MPV_motion (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dir, uint8_t **ref_picture, op_pixels_func(*pix_op)[4], qpel_mc_func(*qpix_op)[16]) |
| static void | MPV_motion_lowres (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dir, uint8_t **ref_picture, h264_chroma_mc_func *pix_op) |
| static void | put_dct (MpegEncContext *s, DCTELEM *block, int i, uint8_t *dest, int line_size, int qscale) |
| static void | add_dct (MpegEncContext *s, DCTELEM *block, int i, uint8_t *dest, int line_size) |
| static void | add_dequant_dct (MpegEncContext *s, DCTELEM *block, int i, uint8_t *dest, int line_size, int qscale) |
| void | ff_clean_intra_table_entries (MpegEncContext *s) |
| static always_inline void | MPV_decode_mb_internal (MpegEncContext *s, DCTELEM block[12][64], int lowres_flag) |
| void | MPV_decode_mb (MpegEncContext *s, DCTELEM block[12][64]) |
| void | ff_draw_horiz_band (MpegEncContext *s, int y, int h) |
| void | ff_init_block_index (MpegEncContext *s) |
| void | ff_mpeg_flush (AVCodecContext *avctx) |
| static void | denoise_dct_c (MpegEncContext *s, DCTELEM *block) |
Variables | |
| void(* | draw_edges )(uint8_t *buf, int wrap, int width, int height, int w) = draw_edges_c |
| static const uint16_t | aanscales [64] |
| static const uint8_t | h263_chroma_roundtab [16] |
| static const uint8_t | ff_default_chroma_qscale_table [32] |
Definition in file mpegvideo.c.
| #define COLOR | ( | theta, | |||
| r | ) |
Value:
Referenced by ff_print_debug_info().
| #define CONST_BITS 14 |
Definition at line 81 of file mpegvideo.c.
Referenced by backup_duplicate_context(), idct_put_altivec(), and update_duplicate_context_after_me().
| #define MID 0 |
Referenced by obmc_motion().
| #define OBMC_FILTER | ( | x, | |||
| t, | |||||
| l, | |||||
| m, | |||||
| r, | |||||
| b | ) | dst[x]= (t*top[x] + l*left[x] + m*mid[x] + r*right[x] + b*bottom[x] + 4)>>3 |
Referenced by put_obmc().
Value:
OBMC_FILTER(x , t, l, m, r, b);\ OBMC_FILTER(x+1 , t, l, m, r, b);\ OBMC_FILTER(x +stride, t, l, m, r, b);\ OBMC_FILTER(x+1+stride, t, l, m, r, b);
Referenced by put_obmc().
| static void add_dct | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | i, | |||
| uint8_t * | dest, | |||
| int | line_size | |||
| ) | [inline, static] |
Definition at line 3596 of file mpegvideo.c.
References MpegEncContext::block_last_index, MpegEncContext::dsp, and DSPContext::idct_add.
Referenced by MPV_decode_mb_internal().
| static void add_dequant_dct | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | i, | |||
| uint8_t * | dest, | |||
| int | line_size, | |||
| int | qscale | |||
| ) | [inline, static] |
Definition at line 3604 of file mpegvideo.c.
References MpegEncContext::block_last_index, MpegEncContext::dct_unquantize_inter, MpegEncContext::dsp, and DSPContext::idct_add.
Referenced by MPV_decode_mb_internal().
| static int alloc_picture | ( | MpegEncContext * | s, | |
| Picture * | pic, | |||
| int | shared | |||
| ) | [static] |
allocates a Picture The pixels are allocated/set by calling get_buffer() if shared=0
Definition at line 338 of file mpegvideo.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::b4_stride, MpegEncContext::b8_stride, B_TYPE, AVCodecContext::debug, AVCodecContext::debug_mv, MpegEncContext::encoding, FF_BUFFER_TYPE_SHARED, FF_DEBUG_DCT_COEFF, FF_DEBUG_MV, FMT_H263, FMT_H264, AVCodecContext::get_buffer, MpegEncContext::linesize, MpegEncContext::mb_height, Picture::mb_mean, MpegEncContext::mb_stride, Picture::mb_type_base, Picture::mb_var, Picture::mc_mb_var, Picture::motion_val_base, NULL, MpegEncContext::out_format, MpegEncContext::pict_type, MpegEncContext::prev_pict_types, PREV_PICT_TYPES_BUFFER_SIZE, r, and MpegEncContext::uvlinesize.

| static void backup_duplicate_context | ( | MpegEncContext * | bak, | |
| MpegEncContext * | src | |||
| ) | [static] |
Definition at line 498 of file mpegvideo.c.
References COPY.
Referenced by ff_update_duplicate_context().
| static void chroma_4mv_motion | ( | MpegEncContext * | s, | |
| uint8_t * | dest_cb, | |||
| uint8_t * | dest_cr, | |||
| uint8_t ** | ref_picture, | |||
| op_pixels_func * | pix_op, | |||
| int | mx, | |||
| int | my | |||
| ) | [inline, static] |
h263 chorma 4mv motion compensation.
Definition at line 3116 of file mpegvideo.c.
References CODEC_FLAG_EMU_EDGE, MpegEncContext::edge_emu_buffer, ff_emulated_edge_mc(), ff_h263_round_chroma(), MpegEncContext::flags, MpegEncContext::h_edge_pos, MpegEncContext::height, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::uvlinesize, MpegEncContext::v_edge_pos, and MpegEncContext::width.
Referenced by MPV_motion().

| static void chroma_4mv_motion_lowres | ( | MpegEncContext * | s, | |
| uint8_t * | dest_cb, | |||
| uint8_t * | dest_cr, | |||
| uint8_t ** | ref_picture, | |||
| h264_chroma_mc_func * | pix_op, | |||
| int | mx, | |||
| int | my | |||
| ) | [inline, static] |
Definition at line 3162 of file mpegvideo.c.
References MpegEncContext::avctx, CODEC_FLAG_EMU_EDGE, MpegEncContext::edge_emu_buffer, ff_emulated_edge_mc(), ff_h263_round_chroma(), MpegEncContext::flags, MpegEncContext::h_edge_pos, AVCodecContext::lowres, lowres, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::quarter_sample, MpegEncContext::uvlinesize, and MpegEncContext::v_edge_pos.
Referenced by MPV_motion_lowres().

| static void copy_picture_attributes | ( | MpegEncContext * | s, | |
| AVFrame * | dst, | |||
| AVFrame * | src | |||
| ) | [static] |
Definition at line 295 of file mpegvideo.c.
References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::b8_stride, height, MpegEncContext::mb_height, MpegEncContext::mb_stride, MpegEncContext::mb_width, AVCodecContext::me_threshold, memcpy, and stride.

| int DCT_common_init | ( | MpegEncContext * | s | ) |
Definition at line 232 of file mpegvideo.c.
References MpegEncContext::alternate_scan, CODEC_FLAG_TRELLIS_QUANT, MpegEncContext::dct_quantize, MpegEncContext::dct_unquantize_h263_inter, dct_unquantize_h263_inter_c(), MpegEncContext::dct_unquantize_h263_intra, dct_unquantize_h263_intra_c(), MpegEncContext::dct_unquantize_mpeg1_inter, dct_unquantize_mpeg1_inter_c(), MpegEncContext::dct_unquantize_mpeg1_intra, dct_unquantize_mpeg1_intra_c(), MpegEncContext::dct_unquantize_mpeg2_inter, dct_unquantize_mpeg2_inter_c(), MpegEncContext::dct_unquantize_mpeg2_intra, dct_unquantize_mpeg2_intra_c(), MpegEncContext::denoise_dct, denoise_dct_c(), MpegEncContext::dsp, MpegEncContext::fast_dct_quantize, ff_alternate_horizontal_scan, ff_alternate_vertical_scan, ff_init_scantable(), ff_zigzag_direct, MpegEncContext::flags, DSPContext::idct_permutation, MpegEncContext::inter_scantable, MpegEncContext::intra_h_scantable, MpegEncContext::intra_scantable, MpegEncContext::intra_v_scantable, MPV_common_init_armv4l(), MPV_common_init_axp(), MPV_common_init_mlib(), MPV_common_init_mmi(), MPV_common_init_mmx(), and MPV_common_init_ppc().
Referenced by mjpeg_decode_init(), and MPV_common_init().

| static void dct_unquantize_h263_inter_c | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n, | |||
| int | qscale | |||
| ) | [static] |
Definition at line 6415 of file mpegvideo.c.
References MpegEncContext::block_last_index, MpegEncContext::inter_scantable, and ScanTable::raster_end.
Referenced by DCT_common_init().
| static void dct_unquantize_h263_intra_c | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n, | |||
| int | qscale | |||
| ) | [static] |
Definition at line 6378 of file mpegvideo.c.
References MpegEncContext::ac_pred, MpegEncContext::block_last_index, MpegEncContext::c_dc_scale, MpegEncContext::h263_aic, MpegEncContext::inter_scantable, ScanTable::raster_end, and MpegEncContext::y_dc_scale.
Referenced by DCT_common_init().
| static void dct_unquantize_mpeg1_inter_c | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n, | |||
| int | qscale | |||
| ) | [static] |
Definition at line 6288 of file mpegvideo.c.
References MpegEncContext::block_last_index, MpegEncContext::inter_matrix, MpegEncContext::intra_scantable, and ScanTable::permutated.
Referenced by DCT_common_init().
| static void dct_unquantize_mpeg1_intra_c | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n, | |||
| int | qscale | |||
| ) | [static] |
Definition at line 6256 of file mpegvideo.c.
References MpegEncContext::block_last_index, MpegEncContext::c_dc_scale, MpegEncContext::intra_matrix, MpegEncContext::intra_scantable, ScanTable::permutated, and MpegEncContext::y_dc_scale.
Referenced by DCT_common_init().
| static void dct_unquantize_mpeg2_inter_c | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n, | |||
| int | qscale | |||
| ) | [static] |
Definition at line 6347 of file mpegvideo.c.
References MpegEncContext::alternate_scan, MpegEncContext::block_last_index, MpegEncContext::inter_matrix, MpegEncContext::intra_scantable, and ScanTable::permutated.
Referenced by DCT_common_init().
| static void dct_unquantize_mpeg2_intra_c | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n, | |||
| int | qscale | |||
| ) | [static] |
Definition at line 6317 of file mpegvideo.c.
References MpegEncContext::alternate_scan, MpegEncContext::block_last_index, MpegEncContext::c_dc_scale, MpegEncContext::intra_matrix, MpegEncContext::intra_scantable, ScanTable::permutated, and MpegEncContext::y_dc_scale.
Referenced by DCT_common_init().
| static void denoise_dct_c | ( | MpegEncContext * | s, | |
| DCTELEM * | block | |||
| ) | [static] |
Definition at line 5462 of file mpegvideo.c.
References MpegEncContext::dct_count, MpegEncContext::dct_error_sum, MpegEncContext::dct_offset, and MpegEncContext::mb_intra.
Referenced by DCT_common_init().
| static void draw_arrow | ( | uint8_t * | buf, | |
| int | sx, | |||
| int | sy, | |||
| int | ex, | |||
| int | ey, | |||
| int | w, | |||
| int | h, | |||
| int | stride, | |||
| int | color | |||
| ) | [static] |
draws an arrow from (ex, ey) -> (sx, sy).
| w | width of the image | |
| h | height of the image | |
| stride | stride/linesize of the image | |
| color | color of the arrow |
Definition at line 1683 of file mpegvideo.c.
References draw_line().
Referenced by ff_print_debug_info().

| static void draw_edges_c | ( | uint8_t * | buf, | |
| int | wrap, | |||
| int | width, | |||
| int | height, | |||
| int | w | |||
| ) | [static] |
| static void draw_line | ( | uint8_t * | buf, | |
| int | sx, | |||
| int | sy, | |||
| int | ex, | |||
| int | ey, | |||
| int | w, | |||
| int | h, | |||
| int | stride, | |||
| int | color | |||
| ) | [static] |
draws an line from (ex, ey) -> (sx, sy).
| w | width of the image | |
| h | height of the image | |
| stride | stride/linesize of the image | |
| color | color of the arrow |
Definition at line 1634 of file mpegvideo.c.
Referenced by draw_arrow().
| void ff_clean_intra_table_entries | ( | MpegEncContext * | s | ) |
cleans dc, ac, coded_block for the current non intra MB
Definition at line 3617 of file mpegvideo.c.
References MpegEncContext::ac_val, MpegEncContext::b8_stride, MpegEncContext::block_index, MpegEncContext::coded_block, MpegEncContext::dc_val, MpegEncContext::mb_stride, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::mbintra_table, and MpegEncContext::msmpeg4_version.
Referenced by mpeg4_decode_partition_a(), and MPV_decode_mb_internal().
| void ff_draw_horiz_band | ( | MpegEncContext * | s, | |
| int | y, | |||
| int | h | |||
| ) |
| h | is the normal height, this will be reduced automatically if needed for the last row |
Definition at line 3974 of file mpegvideo.c.
References MpegEncContext::avctx, B_TYPE, MpegEncContext::chroma_y_shift, MpegEncContext::current_picture_ptr, AVCodecContext::draw_horiz_band, emms_c, MpegEncContext::first_field, FMT_H264, AVCodecContext::height, MpegEncContext::last_picture_ptr, MpegEncContext::linesize, MpegEncContext::low_delay, MpegEncContext::out_format, PICT_FRAME, MpegEncContext::pict_type, MpegEncContext::picture_structure, SLICE_FLAG_ALLOW_FIELD, SLICE_FLAG_CODED_ORDER, AVCodecContext::slice_flags, and MpegEncContext::uvlinesize.
Referenced by decode_slice(), mpeg_decode_slice(), and svq3_decode_frame().
| void ff_emulated_edge_mc | ( | uint8_t * | buf, | |
| uint8_t * | src, | |||
| int | linesize, | |||
| int | block_w, | |||
| int | block_h, | |||
| int | src_x, | |||
| int | src_y, | |||
| int | w, | |||
| int | h | |||
| ) |
Copies a rectangular area of samples to a temporary buffer and replicates the boarder samples.
| buf | destination buffer | |
| src | source buffer | |
| linesize | number of bytes between 2 vertically adjacent samples in both the source and destination buffers | |
| block_w | width of block | |
| block_h | height of block | |
| src_x | x coordinate of the top left sample of the block in the source buffer | |
| src_y | y coordinate of the top left sample of the block in the source buffer | |
| w | width of the source buffer | |
| h | height of the source buffer |
Definition at line 2580 of file mpegvideo.c.
Referenced by chroma_4mv_motion(), chroma_4mv_motion_lowres(), ff_mspel_motion(), gmc1_motion(), hpel_motion(), hpel_motion_lowres(), mc_dir_part(), mca(), mpeg_motion(), mpeg_motion_lowres(), MPV_motion(), qpel_motion(), render_fragments(), render_slice(), and svq3_mc_dir_part().
| int ff_find_unused_picture | ( | MpegEncContext * | s, | |
| int | shared | |||
| ) |
Definition at line 1413 of file mpegvideo.c.
References MAX_PICTURE_COUNT, NULL, and MpegEncContext::picture.
Referenced by ff_h263_decode_frame(), h261_decode_frame(), MPV_frame_start(), and vc9_decode_frame().
| int ff_h263_round_chroma | ( | int | x | ) | [inline] |
Definition at line 3104 of file mpegvideo.c.
References h263_chroma_roundtab.
Referenced by chroma_4mv_motion(), chroma_4mv_motion_lowres(), and h263_mv4_search().
| void ff_init_block_index | ( | MpegEncContext * | s | ) |
Definition at line 4013 of file mpegvideo.c.
References MpegEncContext::avctx, MpegEncContext::b8_stride, B_TYPE, MpegEncContext::block_index, MpegEncContext::chroma_x_shift, MpegEncContext::chroma_y_shift, MpegEncContext::current_picture, MpegEncContext::dest, AVCodecContext::draw_horiz_band, AVCodecContext::lowres, MpegEncContext::mb_height, MpegEncContext::mb_stride, MpegEncContext::mb_x, MpegEncContext::mb_y, PICT_FRAME, MpegEncContext::pict_type, and MpegEncContext::picture_structure.
Referenced by decode_slice(), ff_h261_reorder_mb_index(), h261_decode_mb(), h261_decode_mb_skipped(), mpeg4_decode_partition_a(), mpeg4_decode_partition_b(), mpeg_decode_slice(), and rv10_decode_packet().
| void ff_init_scantable | ( | uint8_t * | permutation, | |
| ScanTable * | st, | |||
| const uint8_t * | src_scantable | |||
| ) |
Definition at line 193 of file mpegvideo.c.
References ScanTable::permutated, ScanTable::raster_end, and ScanTable::scantable.
Referenced by common_init(), DCT_common_init(), decode_init(), decode_vop_header(), mpeg_decode_picture_coding_extension(), vp3_decode_init(), and wmv2_common_init().
| void ff_mpeg_flush | ( | AVCodecContext * | avctx | ) |
Definition at line 4327 of file mpegvideo.c.
References MpegEncContext::bitstream_buffer_size, MpegEncContext::current_picture_ptr, FF_BUFFER_TYPE_INTERNAL, FF_BUFFER_TYPE_USER, ParseContext::frame_start_found, ParseContext::index, ParseContext::last_index, MpegEncContext::last_picture_ptr, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::next_picture_ptr, ParseContext::overread, ParseContext::overread_index, MpegEncContext::parse_context, MpegEncContext::picture, AVCodecContext::priv_data, AVCodecContext::release_buffer, and ParseContext::state.
| void ff_print_debug_info | ( | MpegEncContext * | s, | |
| AVFrame * | pict | |||
| ) |
prints debuging info for the given picture.
Definition at line 1712 of file mpegvideo.c.
References av_log(), AV_LOG_DEBUG, avcodec_get_chroma_sub_sample(), MpegEncContext::avctx, c, MpegEncContext::codec_id, CODEC_ID_H264, COLOR, AVCodecContext::debug, AVCodecContext::debug_mv, draw_arrow(), FF_B_TYPE, FF_BUFFER_TYPE_COPY, FF_DEBUG_MB_TYPE, FF_DEBUG_QP, FF_DEBUG_SKIP, FF_DEBUG_VIS_MB_TYPE, FF_DEBUG_VIS_MV_B_BACK, FF_DEBUG_VIS_MV_B_FOR, FF_DEBUG_VIS_MV_P_FOR, FF_DEBUG_VIS_QP, FF_I_TYPE, FF_P_TYPE, FF_S_TYPE, FF_SI_TYPE, FF_SP_TYPE, AVCodecContext::height, height, IS_16X16, IS_16X8, IS_8X16, IS_8X8, IS_ACPRED, IS_DIRECT, IS_GMC, IS_INTERLACED, IS_INTRA, IS_INTRA16x16, IS_INTRA4x4, IS_PCM, IS_SKIP, MpegEncContext::linesize, MpegEncContext::low_delay, MpegEncContext::mb_height, MpegEncContext::mb_stride, MpegEncContext::mb_width, MpegEncContext::mbskip_table, memcpy, mv, AVCodecContext::pix_fmt, MpegEncContext::quarter_sample, USES_LIST, MpegEncContext::visualization_buffer, AVCodecContext::width, and width.
Referenced by decode_frame(), ff_h263_decode_frame(), h261_decode_frame(), rv10_decode_frame(), slice_end(), and vc9_decode_frame().

| void ff_update_duplicate_context | ( | MpegEncContext * | dst, | |
| MpegEncContext * | src | |||
| ) |
Definition at line 520 of file mpegvideo.c.
References backup_duplicate_context(), MpegEncContext::block, memcpy, and MpegEncContext::pblocks.
Referenced by mpeg_decode_frame().

| static void free_duplicate_context | ( | MpegEncContext * | s | ) | [static] |
Definition at line 482 of file mpegvideo.c.
References MpegEncContext::allocated_edge_emu_buffer, av_freep(), MpegEncContext::b_scratchpad, MpegEncContext::block, MpegEncContext::blocks, MpegEncContext::dct_error_sum, MpegEncContext::edge_emu_buffer, MotionEstContext::map, MpegEncContext::me, NULL, MpegEncContext::obmc_scratchpad, MpegEncContext::rd_scratchpad, MotionEstContext::score_map, and MotionEstContext::scratchpad.
Referenced by MPV_common_end().

| static void free_picture | ( | MpegEncContext * | s, | |
| Picture * | pic | |||
| ) | [static] |
deallocates a picture
Definition at line 422 of file mpegvideo.c.
References av_freep(), MpegEncContext::avctx, FF_BUFFER_TYPE_SHARED, Picture::mb_mean, Picture::mb_type_base, Picture::mb_var, Picture::mc_mb_var, Picture::motion_val_base, NULL, and AVCodecContext::release_buffer.
Referenced by MPV_common_end().

| static void gmc1_motion | ( | MpegEncContext * | s, | |
| uint8_t * | dest_y, | |||
| uint8_t * | dest_cb, | |||
| uint8_t * | dest_cr, | |||
| uint8_t ** | ref_picture | |||
| ) | [inline, static] |
Definition at line 2426 of file mpegvideo.c.
References CODEC_FLAG_EMU_EDGE, CODEC_FLAG_GRAY, MpegEncContext::dsp, MpegEncContext::edge_emu_buffer, ff_emulated_edge_mc(), MpegEncContext::flags, DSPContext::gmc1, MpegEncContext::h_edge_pos, MpegEncContext::height, MpegEncContext::linesize, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::no_rounding, DSPContext::put_no_rnd_pixels_tab, DSPContext::put_pixels_tab, MpegEncContext::sprite_offset, MpegEncContext::sprite_warping_accuracy, MpegEncContext::uvlinesize, MpegEncContext::v_edge_pos, and MpegEncContext::width.
Referenced by MPV_motion().

| static void gmc_motion | ( | MpegEncContext * | s, | |
| uint8_t * | dest_y, | |||
| uint8_t * | dest_cb, | |||
| uint8_t * | dest_cr, | |||
| uint8_t ** | ref_picture | |||
| ) | [inline, static] |
Definition at line 2512 of file mpegvideo.c.
References a, CODEC_FLAG_GRAY, MpegEncContext::dsp, MpegEncContext::flags, DSPContext::gmc, MpegEncContext::h_edge_pos, MpegEncContext::linesize, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::no_rounding, MpegEncContext::sprite_delta, MpegEncContext::sprite_offset, MpegEncContext::sprite_warping_accuracy, MpegEncContext::uvlinesize, and MpegEncContext::v_edge_pos.
Referenced by MPV_motion().
| static int hpel_motion | ( | MpegEncContext * | s, | |
| uint8_t * | dest, | |||
| uint8_t * | src, | |||
| int | field_based, | |||
| int | field_select, | |||
| int | src_x, | |||
| int | src_y, | |||
| int | width, | |||
| int | height, | |||
| int | stride, | |||
| int | h_edge_pos, | |||
| int | v_edge_pos, | |||
| int | w, | |||
| int | h, | |||
| op_pixels_func * | pix_op, | |||
| int | motion_x, | |||
| int | motion_y | |||
| ) | [inline, static] |
Definition at line 2639 of file mpegvideo.c.
References CODEC_FLAG_EMU_EDGE, MpegEncContext::edge_emu_buffer, ff_emulated_edge_mc(), MpegEncContext::flags, MpegEncContext::linesize, MpegEncContext::unrestricted_mv, and MpegEncContext::v_edge_pos.
Referenced by MPV_motion(), and obmc_motion().

| static int hpel_motion_lowres | ( | MpegEncContext * | s, | |
| uint8_t * | dest, | |||
| uint8_t * | src, | |||
| int | field_based, | |||
| int | field_select, | |||
| int | src_x, | |||
| int | src_y, | |||
| int | width, | |||
| int | height, | |||
| int | stride, | |||
| int | h_edge_pos, | |||
| int | v_edge_pos, | |||
| int | w, | |||
| int | h, | |||
| h264_chroma_mc_func * | pix_op, | |||
| int | motion_x, | |||
| int | motion_y | |||
| ) | [inline, static] |
Definition at line 2679 of file mpegvideo.c.
References MpegEncContext::avctx, MpegEncContext::edge_emu_buffer, ff_emulated_edge_mc(), MpegEncContext::linesize, AVCodecContext::lowres, lowres, and MpegEncContext::quarter_sample.
Referenced by MPV_motion_lowres().

| static int init_duplicate_context | ( | MpegEncContext * | s, | |
| MpegEncContext * | base | |||
| ) | [static] |
Definition at line 452 of file mpegvideo.c.
References MpegEncContext::allocated_edge_emu_buffer, MpegEncContext::avctx, MpegEncContext::b_scratchpad, MpegEncContext::block, MpegEncContext::blocks, MpegEncContext::dct_error_sum, MpegEncContext::edge_emu_buffer, MpegEncContext::encoding, MotionEstContext::map, MpegEncContext::me, ME_MAP_SIZE, AVCodecContext::noise_reduction, MpegEncContext::obmc_scratchpad, MpegEncContext::pblocks, MpegEncContext::rd_scratchpad, MotionEstContext::score_map, MotionEstContext::scratchpad, and MpegEncContext::width.
Referenced by MPV_common_init().
| void init_rl | ( | RLTable * | rl, | |
| int | use_static | |||
| ) |
Definition at line 1333 of file mpegvideo.c.
References av_malloc(), av_mallocz_static(), RLTable::index_run, RLTable::last, level, RLTable::max_level, MAX_LEVEL, RLTable::max_run, MAX_RUN, memcpy, RLTable::n, run, RLTable::table_level, and RLTable::table_run.
Referenced by ff_h261_encode_init(), ff_msmpeg4_decode_init(), h261_decode_init_vlc(), h263_decode_init_vlc(), and init_vlcs().

| static always_inline void mpeg_motion | ( | MpegEncContext * | s, | |
| uint8_t * | dest_y, | |||
| uint8_t * | dest_cb, | |||
| uint8_t * | dest_cr, | |||
| int | field_based, | |||
| int | bottom_field, | |||
| int | field_select, | |||
| uint8_t ** | ref_picture, | |||
| op_pixels_func(*) | pix_op[4], | |||
| int | motion_x, | |||
| int | motion_y, | |||
| int | h | |||
| ) | [static] |
Definition at line 2722 of file mpegvideo.c.
References av_log(), AV_LOG_DEBUG, MpegEncContext::avctx, MpegEncContext::chroma_x_shift, MpegEncContext::chroma_y_shift, CODEC_FLAG_GRAY, MpegEncContext::codec_id, CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO, MpegEncContext::current_picture, MpegEncContext::edge_emu_buffer, FF_BUG_HPEL_CHROMA, ff_emulated_edge_mc(), ff_h261_loop_filter(), MpegEncContext::flags, FMT_H261, FMT_H263, MpegEncContext::h_edge_pos, MpegEncContext::linesize, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::out_format, MpegEncContext::quarter_sample, MpegEncContext::uvlinesize, MpegEncContext::v_edge_pos, and MpegEncContext::workaround_bugs.
Referenced by MPV_motion().

| static always_inline void mpeg_motion_lowres | ( | MpegEncContext * | s, | |
| uint8_t * | dest_y, | |||
| uint8_t * | dest_cb, | |||
| uint8_t * | dest_cr, | |||
| int | field_based, | |||
| int | bottom_field, | |||
| int | field_select, | |||
| uint8_t ** | ref_picture, | |||
| h264_chroma_mc_func * | pix_op, | |||
| int | motion_x, | |||
| int | motion_y, | |||
| int | h | |||
| ) | [static] |
Definition at line 2839 of file mpegvideo.c.
References MpegEncContext::avctx, MpegEncContext::chroma_y_shift, CODEC_FLAG_GRAY, MpegEncContext::current_picture, MpegEncContext::edge_emu_buffer, ff_emulated_edge_mc(), MpegEncContext::flags, FMT_H261, FMT_H263, MpegEncContext::h_edge_pos, MpegEncContext::linesize, AVCodecContext::lowres, lowres, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::out_format, MpegEncContext::quarter_sample, MpegEncContext::uvlinesize, and MpegEncContext::v_edge_pos.
Referenced by MPV_motion_lowres().

| static void MPV_common_defaults | ( | MpegEncContext * | s | ) | [static] |
sets the given MpegEncContext to common defaults (same for encoding and decoding). the changed fields will not depend upon the prior state of the MpegEncContext.
Definition at line 555 of file mpegvideo.c.
References MpegEncContext::b_code, MpegEncContext::c_dc_scale_table, MpegEncContext::chroma_qscale_table, MpegEncContext::coded_picture_number, MpegEncContext::f_code, ff_default_chroma_qscale_table, ff_mpeg1_dc_scale_table, MpegEncContext::input_picture_number, PICT_FRAME, MpegEncContext::picture_in_gop_number, MpegEncContext::picture_number, MpegEncContext::picture_structure, MpegEncContext::progressive_frame, MpegEncContext::progressive_sequence, and MpegEncContext::y_dc_scale_table.
Referenced by MPV_decode_defaults().
| void MPV_common_end | ( | MpegEncContext * | s | ) |
Definition at line 801 of file mpegvideo.c.
References MpegEncContext::ac_stats, MpegEncContext::ac_val_base, MpegEncContext::allocated_bitstream_buffer_size, av_freep(), avcodec_default_free_buffers(), MpegEncContext::avctx, MpegEncContext::b_back_mv_table, MpegEncContext::b_back_mv_table_base, MpegEncContext::b_bidir_back_mv_table, MpegEncContext::b_bidir_back_mv_table_base, MpegEncContext::b_bidir_forw_mv_table, MpegEncContext::b_bidir_forw_mv_table_base, MpegEncContext::b_direct_mv_table, MpegEncContext::b_direct_mv_table_base, MpegEncContext::b_field_mv_table, MpegEncContext::b_field_mv_table_base, MpegEncContext::b_field_select_table, MpegEncContext::b_forw_mv_table, MpegEncContext::b_forw_mv_table_base, MpegEncContext::bitstream_buffer, ParseContext::buffer, ParseContext::buffer_size, MpegEncContext::cbp_table, MpegEncContext::coded_block_base, MpegEncContext::context_initialized, MpegEncContext::current_picture_ptr, MpegEncContext::dc_val_base, MpegEncContext::dct_offset, MpegEncContext::error_status_table, free_duplicate_context(), free_picture(), MpegEncContext::input_picture, MpegEncContext::lambda_table, MpegEncContext::last_picture_ptr, MpegEncContext::linesize, MAX_PICTURE_COUNT, MpegEncContext::mb_index2xy, MpegEncContext::mb_type, MpegEncContext::mbintra_table, MpegEncContext::mbskip_table, MpegEncContext::next_picture_ptr, NULL, MpegEncContext::p_field_mv_table, MpegEncContext::p_field_mv_table_base, MpegEncContext::p_field_select_table, MpegEncContext::p_mv_table, MpegEncContext::p_mv_table_base, MpegEncContext::parse_context, MpegEncContext::picture, MpegEncContext::pred_dir_table, MpegEncContext::prev_pict_types, MpegEncContext::q_inter_matrix, MpegEncContext::q_inter_matrix16, MpegEncContext::q_intra_matrix, MpegEncContext::q_intra_matrix16, MpegEncContext::reordered_input_picture, AVCodecContext::stats_out, MpegEncContext::thread_context, AVCodecContext::thread_count, MpegEncContext::uvlinesize, and MpegEncContext::visualization_buffer.
Referenced by decode_end(), decode_slice_header(), ff_h263_decode_end(), ff_h263_decode_frame(), h261_decode_end(), h261_decode_frame(), mpeg_decode_end(), mpeg_decode_postinit(), MPV_common_init(), rv10_decode_end(), svq1_decode_end(), vc9_decode_end(), and vcr2_init_sequence().

| int MPV_common_init | ( | MpegEncContext * | s | ) |
sets the given MpegEncContext to defaults for encoding. the changed fields will not depend upon the prior state of the MpegEncContext. init common structure for both encoder and decoder. this assumes that some variables like width/height are already set
Definition at line 612 of file mpegvideo.c.
References MpegEncContext::ac_stats, MpegEncContext::ac_val, MpegEncContext::ac_val_base, av_log(), AV_LOG_ERROR, av_malloc(), avcodec_check_dimensions(), avcodec_get_chroma_sub_sample(), MpegEncContext::avctx, MpegEncContext::b4_stride, MpegEncContext::b8_stride, MpegEncContext::b_back_mv_table, MpegEncContext::b_back_mv_table_base, MpegEncContext::b_bidir_back_mv_table, MpegEncContext::b_bidir_back_mv_table_base, MpegEncContext::b_bidir_forw_mv_table, MpegEncContext::b_bidir_forw_mv_table_base, MpegEncContext::b_direct_mv_table, MpegEncContext::b_direct_mv_table_base, MpegEncContext::b_field_mv_table, MpegEncContext::b_field_mv_table_base, MpegEncContext::b_field_select_table, MpegEncContext::b_forw_mv_table, MpegEncContext::b_forw_mv_table_base, MpegEncContext::block_wrap, MpegEncContext::cbp_table, MpegEncContext::chroma_x_shift, MpegEncContext::chroma_y_shift, CODEC_FLAG_INTERLACED_ME, MpegEncContext::codec_id, CODEC_ID_MPEG4, AVCodecContext::codec_tag, MpegEncContext::coded_block, MpegEncContext::coded_block_base, AVCodecContext::coded_frame, MpegEncContext::context_initialized, MpegEncContext::current_picture, MpegEncContext::dc_val, MpegEncContext::dc_val_base, DCT_common_init(), MpegEncContext::dct_offset, AVCodecContext::debug, AVCodecContext::debug_mv, MpegEncContext::dsp, dsputil_init(), EDGE_WIDTH, MpegEncContext::encoding, MpegEncContext::end_mb_y, MpegEncContext::error_status_table, FF_DEBUG_VIS_MB_TYPE, FF_DEBUG_VIS_QP, AVCodecContext::flags, MpegEncContext::flags, AVCodecContext::flags2, MpegEncContext::flags2, FMT_H263, MpegEncContext::h263_plus, MpegEncContext::h263_pred, MpegEncContext::h_edge_pos, MpegEncContext::height, init_duplicate_context(), MpegEncContext::input_picture, MpegEncContext::lambda_table, MAX_LEVEL, MAX_PICTURE_COUNT, MAX_RUN, MAX_THREADS, MpegEncContext::mb_height, MpegEncContext::mb_index2xy, MpegEncContext::mb_num, MpegEncContext::mb_stride, MpegEncContext::mb_type, MpegEncContext::mb_width, MpegEncContext::mbintra_table, MpegEncContext::mbskip_table, memcpy, MPV_common_end(), MpegEncContext::msmpeg4_version, AVCodecContext::noise_reduction, MpegEncContext::out_format, MpegEncContext::p_field_mv_table, MpegEncContext::p_field_mv_table_base, MpegEncContext::p_field_select_table, MpegEncContext::p_mv_table, MpegEncContext::p_mv_table_base, MpegEncContext::parse_context, MpegEncContext::picture, AVCodecContext::pix_fmt, MpegEncContext::pred_dir_table, MpegEncContext::prev_pict_types, PREV_PICT_TYPES_BUFFER_SIZE, MpegEncContext::q_inter_matrix, MpegEncContext::q_inter_matrix16, MpegEncContext::q_intra_matrix, MpegEncContext::q_intra_matrix16, MpegEncContext::reordered_input_picture, MpegEncContext::start_mb_y, ParseContext::state, AVCodecContext::stats_out, AVCodecContext::stream_codec_tag, MpegEncContext::thread_context, AVCodecContext::thread_count, MpegEncContext::v_edge_pos, MpegEncContext::visualization_buffer, and MpegEncContext::width.
Referenced by decode_slice_header(), ff_h263_decode_frame(), ff_h263_decode_init(), h261_decode_frame(), rv10_decode_init(), svq1_decode_init(), svq3_decode_frame(), vc9_decode_frame(), and vcr2_init_sequence().

| void MPV_decode_defaults | ( | MpegEncContext * | s | ) |
sets the given MpegEncContext to defaults for decoding. the changed fields will not depend upon the prior state of the MpegEncContext.
Definition at line 577 of file mpegvideo.c.
References MPV_common_defaults().
Referenced by decode_init(), ff_h263_decode_init(), h261_decode_init(), mpeg_decode_init(), rv10_decode_init(), and svq1_decode_init().

| void MPV_decode_mb | ( | MpegEncContext * | s, | |
| DCTELEM | block[12][64] | |||
| ) |
Definition at line 3881 of file mpegvideo.c.
References MpegEncContext::avctx, AVCodecContext::lowres, and MPV_decode_mb_internal().
Referenced by decode_mb(), decode_slice(), h261_decode_mb(), h261_decode_mb_skipped(), mpeg_decode_slice(), and rv10_decode_packet().

| static always_inline void MPV_decode_mb_internal | ( | MpegEncContext * | s, | |
| DCTELEM | block[12][64], | |||
| int | lowres_flag | |||
| ) | [static] |
Definition at line 3657 of file mpegvideo.c.
References add_dct(), add_dequant_dct(), MpegEncContext::avctx, AVDISCARD_ALL, AVDISCARD_NONKEY, AVDISCARD_NONREF, DSPContext::avg_h264_chroma_pixels_tab, DSPContext::avg_pixels_tab, DSPContext::avg_qpel_pixels_tab, MpegEncContext::b_scratchpad, B_TYPE, MpegEncContext::chroma_qscale, MpegEncContext::chroma_x_shift, MpegEncContext::chroma_y_shift, CODEC_FLAG_GRAY, CODEC_FLAG_PSNR, MpegEncContext::codec_id, CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO, CODEC_ID_MPEG4, CODEC_ID_WMV2, MpegEncContext::current_picture, AVCodecContext::debug, MpegEncContext::dest, AVCodecContext::draw_horiz_band, MpegEncContext::dsp, MpegEncContext::encoding, ff_clean_intra_table_entries(), FF_DEBUG_DCT_COEFF, ff_wmv2_add_mb(), MpegEncContext::flags, MpegEncContext::h263_aic, MpegEncContext::h263_msmpeg4, MpegEncContext::h263_pred, MpegEncContext::hurry_up, I_TYPE, DSPContext::idct_permutation, DSPContext::idct_put, MpegEncContext::interlaced_dct, MpegEncContext::intra_dc_precision, MpegEncContext::intra_only, MpegEncContext::last_dc, MpegEncContext::last_picture, AVCodecContext::lowres, MpegEncContext::mb_intra, MpegEncContext::mb_skipped, MpegEncContext::mb_stride, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::mbintra_table, MpegEncContext::mbskip_table, MpegEncContext::mpeg_quant, MPV_motion(), MPV_motion_lowres(), MpegEncContext::mv_dir, MV_DIR_BACKWARD, MV_DIR_FORWARD, MpegEncContext::next_picture, MpegEncContext::no_rounding, MpegEncContext::pict_type, put_dct(), DSPContext::put_h264_chroma_pixels_tab, DSPContext::put_no_rnd_pixels_tab, DSPContext::put_no_rnd_qpel_pixels_tab, DSPContext::put_pixels_tab, DSPContext::put_qpel_pixels_tab, MpegEncContext::qscale, AVCodecContext::skip_idct, skip_idct, and AVCodecContext::xvmc_acceleration.
Referenced by MPV_decode_mb().

| void MPV_frame_end | ( | MpegEncContext * | s | ) |
Definition at line 1578 of file mpegvideo.c.
References MpegEncContext::avctx, B_TYPE, CODEC_FLAG_EMU_EDGE, AVCodecContext::coded_frame, MpegEncContext::current_picture, MpegEncContext::current_picture_ptr, draw_edges, EDGE_WIDTH, emms_c, MpegEncContext::encoding, MpegEncContext::flags, MpegEncContext::h_edge_pos, MpegEncContext::intra_only, MpegEncContext::last_non_b_pict_type, MpegEncContext::last_pict_type, MpegEncContext::last_picture, MpegEncContext::linesize, MAX_PICTURE_COUNT, MpegEncContext::next_picture, MpegEncContext::pict_type, MpegEncContext::picture, AVCodecContext::release_buffer, MpegEncContext::unrestricted_mv, MpegEncContext::uvlinesize, MpegEncContext::v_edge_pos, and AVCodecContext::xvmc_acceleration.
Referenced by decode_nal_units(), ff_h263_decode_frame(), h261_decode_frame(), rv10_decode_frame(), slice_end(), svq1_decode_frame(), svq3_decode_frame(), and vc9_decode_frame().
| int MPV_frame_start | ( | MpegEncContext * | s, | |
| AVCodecContext * | avctx | |||
| ) |
generic function for encode/decode called after coding/decoding the header and before a frame is coded/decoded
Definition at line 1453 of file mpegvideo.c.
References alloc_picture(), av_log(), AV_LOG_ERROR, MpegEncContext::avctx, B_TYPE, MpegEncContext::codec_id, CODEC_ID_H264, CODEC_ID_SVQ3, MpegEncContext::coded_picture_number, MpegEncContext::current_picture_ptr, MpegEncContext::dropable, MpegEncContext::encoding, ff_find_unused_picture(), FMT_H264, MpegEncContext::last_picture_ptr, MAX_PICTURE_COUNT, MpegEncContext::mb_skipped, MpegEncContext::next_picture_ptr, NULL, MpegEncContext::out_format, MpegEncContext::pict_type, MpegEncContext::picture, MpegEncContext::progressive_frame, MpegEncContext::progressive_sequence, AVCodecContext::release_buffer, and MpegEncContext::top_field_first.
Referenced by ff_h263_decode_frame(), frame_start(), h261_decode_frame(), mpeg_field_start(), rv10_decode_packet(), svq1_decode_frame(), and vc9_decode_frame().

| static void MPV_motion | ( | MpegEncContext * | s, | |
| uint8_t * | dest_y, | |||
| uint8_t * | dest_cb, | |||
| uint8_t * | dest_cr, | |||
| int | dir, | |||
| uint8_t ** | ref_picture, | |||
| op_pixels_func(*) | pix_op[4], | |||
| qpel_mc_func(*) | qpix_op[16] | |||
| ) | [inline, static] |
motion compensation of a single macroblock
| s | context | |
| dest_y | luma destination pointer | |
| dest_cb | chroma cb/u destination pointer | |
| dest_cr | chroma cr/v destination pointer | |
| dir | direction (0->forward, 1->backward) | |
| ref_picture | array[3] of pointers to the 3 planes of the reference picture | |
| pic_op | halfpel motion compensation function (average or put normally) | |
| pic_op | qpel motion compensation function (average or put normally) the motion vectors are taken from s->mv and the MV type from s->mv_type |
Definition at line 3224 of file mpegvideo.c.
References DSPContext::avg_pixels_tab, MpegEncContext::b8_stride, B_TYPE, chroma_4mv_motion(), MpegEncContext::chroma_y_shift, CODEC_FLAG_EMU_EDGE, CODEC_FLAG_GRAY, MpegEncContext::current_picture, MpegEncContext::current_picture_ptr, MpegEncContext::dsp, MpegEncContext::edge_emu_buffer, ff_emulated_edge_mc(), ff_mspel_motion(), MpegEncContext::field_select, MpegEncContext::first_field, MpegEncContext::flags, gmc1_motion(), gmc_motion(), MpegEncContext::h_edge_pos, MpegEncContext::height, hpel_motion(), IS_INTRA, MpegEncContext::linesize, MpegEncContext::mb_skipped, MpegEncContext::mb_stride, MpegEncContext::mb_width, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::mcsel, memcpy, mpeg_motion(), MpegEncContext::mspel, MpegEncContext::mv, MpegEncContext::mv_type, MV_TYPE_16X16, MV_TYPE_16X8, MV_TYPE_8X8, MV_TYPE_DMV, MV_TYPE_FIELD, MpegEncContext::obmc, obmc_motion(), PICT_FRAME, MpegEncContext::pict_type, MpegEncContext::picture_structure, qpel_motion(), MpegEncContext::quarter_sample, MpegEncContext::real_sprite_warping_points, MpegEncContext::uvlinesize, MpegEncContext::v_edge_pos, and MpegEncContext::width.
Referenced by MPV_decode_mb_internal().

| static void MPV_motion_lowres | ( | MpegEncContext * | s, | |
| uint8_t * | dest_y, | |||
| uint8_t * | dest_cb, | |||
| uint8_t * | dest_cr, | |||
| int | dir, | |||
| uint8_t ** | ref_picture, | |||
| h264_chroma_mc_func * | pix_op | |||
| ) | [inline, static] |
motion compensation of a single macroblock
| s | context | |
| dest_y | luma destination pointer | |
| dest_cb | chroma cb/u destination pointer | |
| dest_cr | chroma cr/v destination pointer | |
| dir | direction (0->forward, 1->backward) | |
| ref_picture | array[3] of pointers to the 3 planes of the reference picture | |
| pic_op | halfpel motion compensation function (average or put normally) the motion vectors are taken from s->mv and the MV type from s->mv_type |
Definition at line 3472 of file mpegvideo.c.
References MpegEncContext::avctx, DSPContext::avg_h264_chroma_pixels_tab, B_TYPE, chroma_4mv_motion_lowres(), MpegEncContext::chroma_y_shift, CODEC_FLAG_GRAY, MpegEncContext::current_picture_ptr, MpegEncContext::dsp, MpegEncContext::field_select, MpegEncContext::first_field, MpegEncContext::flags, MpegEncContext::h_edge_pos, MpegEncContext::height, hpel_motion_lowres(), MpegEncContext::linesize, AVCodecContext::lowres, lowres, MpegEncContext::mb_x, MpegEncContext::mb_y, mpeg_motion_lowres(), MpegEncContext::mv, MpegEncContext::mv_type, MV_TYPE_16X16, MV_TYPE_16X8, MV_TYPE_8X8, MV_TYPE_DMV, MV_TYPE_FIELD, PICT_FRAME, MpegEncContext::pict_type, MpegEncContext::picture_structure, MpegEncContext::uvlinesize, MpegEncContext::v_edge_pos, and MpegEncContext::width.
Referenced by MPV_decode_mb_internal().

| static void obmc_motion | ( | MpegEncContext * | s, | |
| uint8_t * | dest, | |||
| uint8_t * | src, | |||
| int | src_x, | |||
| int | src_y, | |||
| op_pixels_func * | pix_op, | |||
| int16_t | mv[5][2] | |||
| ) | [inline, static] |
Definition at line 2988 of file mpegvideo.c.
References MpegEncContext::h_edge_pos, MpegEncContext::height, hpel_motion(), MpegEncContext::linesize, MID, MpegEncContext::obmc_scratchpad, put_obmc(), MpegEncContext::quarter_sample, MpegEncContext::v_edge_pos, and MpegEncContext::width.
Referenced by MPV_motion().

| static void put_dct | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | i, | |||
| uint8_t * | dest, | |||
| int | line_size, | |||
| int | qscale | |||
| ) | [inline, static] |
Definition at line 3588 of file mpegvideo.c.
References MpegEncContext::dct_unquantize_intra, MpegEncContext::dsp, and DSPContext::idct_put.
Referenced by MPV_decode_mb_internal().
| static void put_obmc | ( | uint8_t * | dst, | |
| uint8_t * | src[5], | |||
| int | stride | |||
| ) | [inline, static] |
Definition at line 2936 of file mpegvideo.c.
References OBMC_FILTER, and OBMC_FILTER4.
Referenced by obmc_motion().
| static void qpel_motion | ( | MpegEncContext * | s, | |
| uint8_t * | dest_y, | |||
| uint8_t * | dest_cb, | |||
| uint8_t * | dest_cr, | |||
| int | field_based, | |||
| int | bottom_field, | |||
| int | field_select, | |||
| uint8_t ** | ref_picture, | |||
| op_pixels_func(*) | pix_op[4], | |||
| qpel_mc_func(*) | qpix_op[16], | |||
| int | motion_x, | |||
| int | motion_y, | |||
| int | h | |||
| ) | [inline, static] |
Definition at line 3017 of file mpegvideo.c.
References CODEC_FLAG_GRAY, MpegEncContext::edge_emu_buffer, FF_BUG_QPEL_CHROMA, FF_BUG_QPEL_CHROMA2, ff_emulated_edge_mc(), MpegEncContext::flags, MpegEncContext::h_edge_pos, MpegEncContext::linesize, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::uvlinesize, MpegEncContext::v_edge_pos, and MpegEncContext::workaround_bugs.
Referenced by MPV_motion().

| static void update_duplicate_context_after_me | ( | MpegEncContext * | dst, | |
| MpegEncContext * | src | |||
| ) | [static] |
| static void update_noise_reduction | ( | MpegEncContext * | s | ) | [static] |
Definition at line 1433 of file mpegvideo.c.
References MpegEncContext::avctx, MpegEncContext::dct_count, MpegEncContext::dct_error_sum, MpegEncContext::dct_offset, and AVCodecContext::noise_reduction.
const uint16_t aanscales[64] [static] |
Initial value:
{
16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520,
22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270,
21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906,
19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315,
16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520,
12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552,
8867 , 12299, 11585, 10426, 8867, 6967, 4799, 2446,
4520 , 6270, 5906, 5315, 4520, 3552, 2446, 1247
}
Definition at line 83 of file mpegvideo.c.
| void(* draw_edges)(uint8_t *buf, int wrap, int width, int height, int w) = draw_edges_c |
Referenced by frame_start(), MPV_common_init_mmx(), and MPV_frame_end().
const uint8_t ff_default_chroma_qscale_table[32] [static] |
Initial value:
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
}
Definition at line 100 of file mpegvideo.c.
Referenced by MPV_common_defaults().
const uint8_t h263_chroma_roundtab[16] [static] |
Initial value:
{
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
}
Definition at line 95 of file mpegvideo.c.
Referenced by ff_h263_round_chroma().
1.5.5