hvirtual/quicktime/ffmpeg/libavcodec/mpegvideo.h File Reference

#include "dsputil.h"
#include "bitstream.h"

Include dependency graph for mpegvideo.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Predictor
struct  RateControlEntry
struct  RateControlContext
struct  ScanTable
struct  Picture
struct  ParseContext
struct  MotionEstContext
struct  MpegEncContext
struct  RLTable

Defines

#define FRAME_SKIPPED   100
 return value for header parsers if frame is not coded
#define EDGE_WIDTH   16
#define MPEG_BUF_SIZE   (16 * 1024)
#define QMAT_SHIFT_MMX   16
#define QMAT_SHIFT   22
#define MAX_FCODE   7
#define MAX_MV   2048
#define MAX_THREADS   8
#define MAX_PICTURE_COUNT   32
#define ME_MAP_SIZE   64
#define ME_MAP_SHIFT   3
#define ME_MAP_MV_BITS   11
#define MAX_RUN   64
#define MAX_LEVEL   64
#define I_TYPE   FF_I_TYPE
 Intra.
#define P_TYPE   FF_P_TYPE
 Predicted.
#define B_TYPE   FF_B_TYPE
 Bi-dir predicted.
#define S_TYPE   FF_S_TYPE
 S(GMC)-VOP MPEG4.
#define SI_TYPE   FF_SI_TYPE
 Switching Intra.
#define SP_TYPE   FF_SP_TYPE
 Switching Predicted.
#define MAX_MB_BYTES   (30*16*16*3/8 + 120)
#define MB_TYPE_INTRA   MB_TYPE_INTRA4x4
#define IS_INTRA4x4(a)   ((a)&MB_TYPE_INTRA4x4)
#define IS_INTRA16x16(a)   ((a)&MB_TYPE_INTRA16x16)
#define IS_PCM(a)   ((a)&MB_TYPE_INTRA_PCM)
#define IS_INTRA(a)   ((a)&7)
#define IS_INTER(a)   ((a)&(MB_TYPE_16x16|MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8))
#define IS_SKIP(a)   ((a)&MB_TYPE_SKIP)
#define IS_INTRA_PCM(a)   ((a)&MB_TYPE_INTRA_PCM)
#define IS_INTERLACED(a)   ((a)&MB_TYPE_INTERLACED)
#define IS_DIRECT(a)   ((a)&MB_TYPE_DIRECT2)
#define IS_GMC(a)   ((a)&MB_TYPE_GMC)
#define IS_16X16(a)   ((a)&MB_TYPE_16x16)
#define IS_16X8(a)   ((a)&MB_TYPE_16x8)
#define IS_8X16(a)   ((a)&MB_TYPE_8x16)
#define IS_8X8(a)   ((a)&MB_TYPE_8x8)
#define IS_SUB_8X8(a)   ((a)&MB_TYPE_16x16)
#define IS_SUB_8X4(a)   ((a)&MB_TYPE_16x8)
#define IS_SUB_4X8(a)   ((a)&MB_TYPE_8x16)
#define IS_SUB_4X4(a)   ((a)&MB_TYPE_8x8)
#define IS_ACPRED(a)   ((a)&MB_TYPE_ACPRED)
#define IS_QUANT(a)   ((a)&MB_TYPE_QUANT)
#define IS_DIR(a, part, list)   ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
#define USES_LIST(a, list)   ((a) & ((MB_TYPE_P0L0|MB_TYPE_P1L0)<<(2*(list))))
 does this mb use listX, note doesnt work if subMBs
#define HAS_CBP(a)   ((a)&MB_TYPE_CBP)
#define PREV_PICT_TYPES_BUFFER_SIZE   256
#define MV_DIR_BACKWARD   1
#define MV_DIR_FORWARD   2
#define MV_DIRECT   4
 bidirectional mode where the difference equals the MV of the last P/S/I-Frame (mpeg4)
#define MV_TYPE_16X16   0
 1 vector for the whole mb
#define MV_TYPE_8X8   1
 4 vectors (h263, mpeg4 4MV)
#define MV_TYPE_16X8   2
 2 vectors, one per 16x8 block
#define MV_TYPE_FIELD   3
 2 vectors, one per field
#define MV_TYPE_DMV   4
 2 vectors, special mpeg2 Dual Prime Vectors
#define CANDIDATE_MB_TYPE_INTRA   0x01
#define CANDIDATE_MB_TYPE_INTER   0x02
#define CANDIDATE_MB_TYPE_INTER4V   0x04
#define CANDIDATE_MB_TYPE_SKIPPED   0x08
#define CANDIDATE_MB_TYPE_DIRECT   0x10
#define CANDIDATE_MB_TYPE_FORWARD   0x20
#define CANDIDATE_MB_TYPE_BACKWARD   0x40
#define CANDIDATE_MB_TYPE_BIDIR   0x80
#define CANDIDATE_MB_TYPE_INTER_I   0x100
#define CANDIDATE_MB_TYPE_FORWARD_I   0x200
#define CANDIDATE_MB_TYPE_BACKWARD_I   0x400
#define CANDIDATE_MB_TYPE_BIDIR_I   0x800
#define QUANT_BIAS_SHIFT   8
#define UNI_AC_ENC_INDEX(run, level)   ((run)*128 + (level))
#define VP_START   1
 current MB is the first after a resync marker
#define AC_ERROR   2
#define DC_ERROR   4
#define MV_ERROR   8
#define AC_END   16
#define DC_END   32
#define MV_END   64
#define PICT_TOP_FIELD   1
#define PICT_BOTTOM_FIELD   2
#define PICT_FRAME   3
#define CHROMA_420   1
#define CHROMA_422   2
#define CHROMA_444   3
#define SLICE_OK   0
#define SLICE_ERROR   -1
#define SLICE_END   -2
 end marker found
#define SLICE_NOEND   -3
 no end marker or error found but mb count exceeded
#define END_NOT_FOUND   -100

Enumerations

enum  OutputFormat {
  FMT_MPEG1, FMT_H261, FMT_H263, FMT_MJPEG,
  FMT_H264
}

Functions

int DCT_common_init (MpegEncContext *s)
void MPV_decode_defaults (MpegEncContext *s)
int MPV_common_init (MpegEncContext *s)
void MPV_common_end (MpegEncContext *s)
void MPV_decode_mb (MpegEncContext *s, DCTELEM block[12][64])
int MPV_frame_start (MpegEncContext *s, AVCodecContext *avctx)
void MPV_frame_end (MpegEncContext *s)
int MPV_encode_init (AVCodecContext *avctx)
int MPV_encode_end (AVCodecContext *avctx)
int MPV_encode_picture (AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data)
void ff_copy_bits (PutBitContext *pb, uint8_t *src, int length)
void ff_clean_intra_table_entries (MpegEncContext *s)
void ff_init_scantable (uint8_t *, ScanTable *st, const uint8_t *src_scantable)
void ff_draw_horiz_band (MpegEncContext *s, int y, int h)
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)
int ff_combine_frame (ParseContext *pc, int next, uint8_t **buf, int *buf_size)
void ff_parse_close (AVCodecParserContext *s)
void ff_mpeg_flush (AVCodecContext *avctx)
void ff_print_debug_info (MpegEncContext *s, AVFrame *pict)
void ff_write_quant_matrix (PutBitContext *pb, int16_t *matrix)
int ff_find_unused_picture (MpegEncContext *s, int shared)
void ff_denoise_dct (MpegEncContext *s, DCTELEM *block)
void ff_update_duplicate_context (MpegEncContext *dst, MpegEncContext *src)
void ff_er_frame_start (MpegEncContext *s)
void ff_er_frame_end (MpegEncContext *s)
void ff_er_add_slice (MpegEncContext *s, int startx, int starty, int endx, int endy, int status)
void ff_init_block_index (MpegEncContext *s)
static void ff_update_block_index (MpegEncContext *s)
static int get_bits_diff (MpegEncContext *s)
void ff_estimate_p_frame_motion (MpegEncContext *s, int mb_x, int mb_y)
void ff_estimate_b_frame_motion (MpegEncContext *s, int mb_x, int mb_y)
int ff_get_best_fcode (MpegEncContext *s, int16_t(*mv_table)[2], int type)
void ff_fix_long_p_mvs (MpegEncContext *s)
void ff_fix_long_mvs (MpegEncContext *s, uint8_t *field_select_table, int field_select, int16_t(*mv_table)[2], int f_code, int type, int truncate)
void ff_init_me (MpegEncContext *s)
int ff_pre_estimate_p_frame_motion (MpegEncContext *s, int mb_x, int mb_y)
int ff_epzs_motion_search (MpegEncContext *s, int *mx_ptr, int *my_ptr, int P[10][2], int src_index, int ref_index, int16_t(*last_mv)[2], int ref_mv_scale, int size, int h)
int ff_get_mb_score (MpegEncContext *s, int mx, int my, int src_index, int ref_index, int size, int h, int add_rate)
void mpeg1_encode_picture_header (MpegEncContext *s, int picture_number)
void mpeg1_encode_mb (MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
void ff_mpeg1_encode_init (MpegEncContext *s)
void ff_mpeg1_encode_slice_header (MpegEncContext *s)
void ff_mpeg1_clean_buffers (MpegEncContext *s)
int ff_mpeg1_find_frame_end (ParseContext *pc, const uint8_t *buf, int buf_size)
void init_rl (RLTable *rl, int use_static)
void init_vlc_rl (RLTable *rl, int use_static)
static int get_rl_index (const RLTable *rl, int last, int run, int level)
void ff_h261_loop_filter (MpegEncContext *s)
void ff_h261_reorder_mb_index (MpegEncContext *s)
void ff_h261_encode_mb (MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
void ff_h261_encode_picture_header (MpegEncContext *s, int picture_number)
void ff_h261_encode_init (MpegEncContext *s)
int ff_h263_decode_init (AVCodecContext *avctx)
int ff_h263_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
int ff_h263_decode_end (AVCodecContext *avctx)
void h263_encode_mb (MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
void mpeg4_encode_mb (MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
void h263_encode_picture_header (MpegEncContext *s, int picture_number)
void ff_flv_encode_picture_header (MpegEncContext *s, int picture_number)
void h263_encode_gob_header (MpegEncContext *s, int mb_line)
int16_t * h263_pred_motion (MpegEncContext *s, int block, int dir, int *px, int *py)
void mpeg4_pred_ac (MpegEncContext *s, DCTELEM *block, int n, int dir)
void ff_set_mpeg4_time (MpegEncContext *s, int picture_number)
void mpeg4_encode_picture_header (MpegEncContext *s, int picture_number)
void h263_encode_init (MpegEncContext *s)
void h263_decode_init_vlc (MpegEncContext *s)
int h263_decode_picture_header (MpegEncContext *s)
int ff_h263_decode_gob_header (MpegEncContext *s)
int ff_mpeg4_decode_picture_header (MpegEncContext *s, GetBitContext *gb)
void ff_h263_update_motion_val (MpegEncContext *s)
void ff_h263_loop_filter (MpegEncContext *s)
void ff_set_qscale (MpegEncContext *s, int qscale)
int ff_h263_decode_mba (MpegEncContext *s)
void ff_h263_encode_mba (MpegEncContext *s)
int intel_h263_decode_picture_header (MpegEncContext *s)
int flv_h263_decode_picture_header (MpegEncContext *s)
int ff_h263_decode_mb (MpegEncContext *s, DCTELEM block[6][64])
int ff_mpeg4_decode_mb (MpegEncContext *s, DCTELEM block[6][64])
int h263_get_picture_format (int width, int height)
void ff_mpeg4_encode_video_packet_header (MpegEncContext *s)
void ff_mpeg4_clean_buffers (MpegEncContext *s)
void ff_mpeg4_stuffing (PutBitContext *pbc)
void ff_mpeg4_init_partitions (MpegEncContext *s)
void ff_mpeg4_merge_partitions (MpegEncContext *s)
void ff_clean_mpeg4_qscales (MpegEncContext *s)
void ff_clean_h263_qscales (MpegEncContext *s)
int ff_mpeg4_decode_partitions (MpegEncContext *s)
int ff_mpeg4_get_video_packet_prefix_length (MpegEncContext *s)
int ff_h263_resync (MpegEncContext *s)
int ff_h263_get_gob_height (MpegEncContext *s)
int ff_mpeg4_set_direct_mv (MpegEncContext *s, int mx, int my)
int ff_h263_round_chroma (int x)
void ff_h263_encode_motion (MpegEncContext *s, int val, int f_code)
int ff_mpeg4_find_frame_end (ParseContext *pc, const uint8_t *buf, int buf_size)
void rv10_encode_picture_header (MpegEncContext *s, int picture_number)
int rv_decode_dc (MpegEncContext *s, int n)
void rv20_encode_picture_header (MpegEncContext *s, int picture_number)
void msmpeg4_encode_picture_header (MpegEncContext *s, int picture_number)
void msmpeg4_encode_ext_header (MpegEncContext *s)
void msmpeg4_encode_mb (MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
int msmpeg4_decode_picture_header (MpegEncContext *s)
int msmpeg4_decode_ext_header (MpegEncContext *s, int buf_size)
int ff_msmpeg4_decode_init (MpegEncContext *s)
void ff_msmpeg4_encode_init (MpegEncContext *s)
int ff_wmv2_decode_picture_header (MpegEncContext *s)
int ff_wmv2_decode_secondary_picture_header (MpegEncContext *s)
void ff_wmv2_add_mb (MpegEncContext *s, DCTELEM block[6][64], uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr)
void ff_mspel_motion (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture, op_pixels_func(*pix_op)[4], int motion_x, int motion_y, int h)
int ff_wmv2_encode_picture_header (MpegEncContext *s, int picture_number)
void ff_wmv2_encode_mb (MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
int mjpeg_init (MpegEncContext *s)
void mjpeg_close (MpegEncContext *s)
void mjpeg_encode_mb (MpegEncContext *s, DCTELEM block[6][64])
void mjpeg_picture_header (MpegEncContext *s)
void mjpeg_picture_trailer (MpegEncContext *s)
void ff_mjpeg_stuffing (PutBitContext *pbc)
int ff_rate_control_init (MpegEncContext *s)
float ff_rate_estimate_qscale (MpegEncContext *s)
void ff_write_pass1_stats (MpegEncContext *s)
void ff_rate_control_uninit (MpegEncContext *s)
double ff_eval (char *s, double *const_value, const char **const_name, double(**func1)(void *, double), const char **func1_name, double(**func2)(void *, double, double), char **func2_name, void *opaque)
int ff_vbv_update (MpegEncContext *s, int frame_size)

Variables

void(* draw_edges )(uint8_t *buf, int wrap, int width, int height, int w)
enum PixelFormat ff_yuv420p_list [2]
const int16_t ff_mpeg1_default_intra_matrix [64]
const int16_t ff_mpeg1_default_non_intra_matrix [64]
const uint8_t ff_mpeg1_dc_scale_table [128]
const uint8_t ff_mpeg4_y_dc_scale_table [32]
const uint8_t ff_mpeg4_c_dc_scale_table [32]
const uint8_t ff_aic_dc_scale_table [32]
const int16_t ff_mpeg4_default_intra_matrix [64]
const int16_t ff_mpeg4_default_non_intra_matrix [64]
const uint8_t ff_h263_chroma_qscale_table [32]
const uint8_t ff_h263_loop_filter_strength [32]


Detailed Description

mpegvideo header.

Definition in file mpegvideo.h.


Define Documentation

#define AC_END   16

#define AC_ERROR   2

#define B_TYPE   FF_B_TYPE

Bi-dir predicted.

Definition at line 66 of file mpegvideo.h.

#define CANDIDATE_MB_TYPE_BACKWARD   0x40

Definition at line 446 of file mpegvideo.h.

Referenced by check_input_motion(), and ff_estimate_b_frame_motion().

#define CANDIDATE_MB_TYPE_BACKWARD_I   0x400

Definition at line 451 of file mpegvideo.h.

Referenced by check_input_motion(), and ff_estimate_b_frame_motion().

#define CANDIDATE_MB_TYPE_BIDIR   0x80

Definition at line 447 of file mpegvideo.h.

Referenced by check_input_motion(), and ff_estimate_b_frame_motion().

#define CANDIDATE_MB_TYPE_BIDIR_I   0x800

Definition at line 452 of file mpegvideo.h.

Referenced by check_input_motion(), and ff_estimate_b_frame_motion().

#define CANDIDATE_MB_TYPE_DIRECT   0x10

Definition at line 444 of file mpegvideo.h.

Referenced by ff_estimate_b_frame_motion().

#define CANDIDATE_MB_TYPE_FORWARD   0x20

Definition at line 445 of file mpegvideo.h.

Referenced by check_input_motion(), and ff_estimate_b_frame_motion().

#define CANDIDATE_MB_TYPE_FORWARD_I   0x200

Definition at line 450 of file mpegvideo.h.

Referenced by check_input_motion(), and ff_estimate_b_frame_motion().

#define CANDIDATE_MB_TYPE_INTER   0x02

Definition at line 439 of file mpegvideo.h.

Referenced by check_input_motion(), and ff_estimate_p_frame_motion().

#define CANDIDATE_MB_TYPE_INTER4V   0x04

Definition at line 440 of file mpegvideo.h.

Referenced by check_input_motion(), ff_estimate_p_frame_motion(), and ff_fix_long_p_mvs().

#define CANDIDATE_MB_TYPE_INTER_I   0x100

Definition at line 449 of file mpegvideo.h.

Referenced by check_input_motion(), and ff_estimate_p_frame_motion().

#define CANDIDATE_MB_TYPE_INTRA   0x01

#define CANDIDATE_MB_TYPE_SKIPPED   0x08

Definition at line 441 of file mpegvideo.h.

Referenced by ff_estimate_p_frame_motion().

#define CHROMA_420   1

Definition at line 671 of file mpegvideo.h.

#define CHROMA_422   2

Definition at line 672 of file mpegvideo.h.

#define CHROMA_444   3

Definition at line 673 of file mpegvideo.h.

#define DC_END   32

#define DC_ERROR   4

#define EDGE_WIDTH   16

#define END_NOT_FOUND   -100

#define FRAME_SKIPPED   100

#define HAS_CBP ( a   )     ((a)&MB_TYPE_CBP)

Definition at line 169 of file mpegvideo.h.

Referenced by ff_h261_encode_mb(), ff_h263_decode_mb(), h261_decode_mb(), and mpeg_decode_mb().

#define I_TYPE   FF_I_TYPE

Intra.

Definition at line 64 of file mpegvideo.h.

#define IS_16X16 ( a   )     ((a)&MB_TYPE_16x16)

#define IS_16X8 ( a   )     ((a)&MB_TYPE_16x8)

Definition at line 158 of file mpegvideo.h.

Referenced by decode_mb_cabac(), decode_mb_cavlc(), ff_print_debug_info(), and hl_motion().

#define IS_8X16 ( a   )     ((a)&MB_TYPE_8x16)

Definition at line 159 of file mpegvideo.h.

Referenced by decode_mb_cabac(), decode_mb_cavlc(), ff_print_debug_info(), and hl_motion().

#define IS_8X8 ( a   )     ((a)&MB_TYPE_8x8)

#define IS_ACPRED ( a   )     ((a)&MB_TYPE_ACPRED)

Definition at line 165 of file mpegvideo.h.

Referenced by ff_print_debug_info(), and mpeg4_decode_partitioned_mb().

#define IS_DIR ( a,
part,
list   )     ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))

Definition at line 167 of file mpegvideo.h.

Referenced by decode_mb_cabac(), decode_mb_cavlc(), and hl_motion().

#define IS_DIRECT ( a   )     ((a)&MB_TYPE_DIRECT2)

#define IS_GMC ( a   )     ((a)&MB_TYPE_GMC)

Definition at line 156 of file mpegvideo.h.

Referenced by ff_print_debug_info().

#define IS_INTER ( a   )     ((a)&(MB_TYPE_16x16|MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8))

#define IS_INTERLACED ( a   )     ((a)&MB_TYPE_INTERLACED)

#define IS_INTRA ( a   )     ((a)&7)

#define IS_INTRA16x16 ( a   )     ((a)&MB_TYPE_INTRA16x16)

#define IS_INTRA4x4 ( a   )     ((a)&MB_TYPE_INTRA4x4)

#define IS_INTRA_PCM ( a   )     ((a)&MB_TYPE_INTRA_PCM)

Definition at line 153 of file mpegvideo.h.

Referenced by decode_mb_cabac(), decode_mb_cavlc(), and hl_decode_mb().

#define IS_PCM ( a   )     ((a)&MB_TYPE_INTRA_PCM)

Definition at line 149 of file mpegvideo.h.

Referenced by ff_print_debug_info().

#define IS_QUANT ( a   )     ((a)&MB_TYPE_QUANT)

Definition at line 166 of file mpegvideo.h.

Referenced by ff_h261_encode_mb(), ff_h263_decode_mb(), h261_decode_mb(), and mpeg_decode_mb().

#define IS_SKIP ( a   )     ((a)&MB_TYPE_SKIP)

#define IS_SUB_4X4 ( a   )     ((a)&MB_TYPE_8x8)

Definition at line 164 of file mpegvideo.h.

Referenced by decode_mb_cabac(), decode_mb_cavlc(), and hl_motion().

#define IS_SUB_4X8 ( a   )     ((a)&MB_TYPE_8x16)

Definition at line 163 of file mpegvideo.h.

Referenced by decode_mb_cabac(), decode_mb_cavlc(), and hl_motion().

#define IS_SUB_8X4 ( a   )     ((a)&MB_TYPE_16x8)

Definition at line 162 of file mpegvideo.h.

Referenced by decode_mb_cabac(), decode_mb_cavlc(), and hl_motion().

#define IS_SUB_8X8 ( a   )     ((a)&MB_TYPE_16x16)

Definition at line 161 of file mpegvideo.h.

Referenced by decode_mb_cabac(), decode_mb_cavlc(), get_dct8x8_allowed(), and hl_motion().

#define MAX_FCODE   7

Definition at line 49 of file mpegvideo.h.

#define MAX_LEVEL   64

#define MAX_MB_BYTES   (30*16*16*3/8 + 120)

Definition at line 71 of file mpegvideo.h.

#define MAX_MV   2048

#define MAX_PICTURE_COUNT   32

#define MAX_RUN   64

#define MAX_THREADS   8

Definition at line 52 of file mpegvideo.h.

Referenced by MPV_common_init().

#define MB_TYPE_INTRA   MB_TYPE_INTRA4x4

#define ME_MAP_MV_BITS   11

#define ME_MAP_SHIFT   3

#define ME_MAP_SIZE   64

#define MPEG_BUF_SIZE   (16 * 1024)

Definition at line 44 of file mpegvideo.h.

#define MV_DIR_BACKWARD   1

#define MV_DIR_FORWARD   2

#define MV_DIRECT   4

bidirectional mode where the difference equals the MV of the last P/S/I-Frame (mpeg4)

Definition at line 408 of file mpegvideo.h.

Referenced by ff_h263_decode_mb(), and ff_mpeg4_decode_mb().

#define MV_END   64

#define MV_ERROR   8

#define MV_TYPE_16X16   0

#define MV_TYPE_16X8   2

2 vectors, one per 16x8 block

Definition at line 412 of file mpegvideo.h.

Referenced by mpeg_decode_mb(), MPV_motion(), and MPV_motion_lowres().

#define MV_TYPE_8X8   1

#define MV_TYPE_DMV   4

2 vectors, special mpeg2 Dual Prime Vectors

Definition at line 414 of file mpegvideo.h.

Referenced by mpeg_decode_mb(), MPV_motion(), and MPV_motion_lowres().

#define MV_TYPE_FIELD   3

2 vectors, one per field

Definition at line 413 of file mpegvideo.h.

Referenced by ff_mpeg4_decode_mb(), ff_mpeg4_set_direct_mv(), mpeg_decode_mb(), mpeg_decode_slice(), MPV_motion(), and MPV_motion_lowres().

#define P_TYPE   FF_P_TYPE

Predicted.

Definition at line 65 of file mpegvideo.h.

#define PICT_BOTTOM_FIELD   2

Definition at line 658 of file mpegvideo.h.

Referenced by init_poc(), and mpeg_field_start().

#define PICT_FRAME   3

#define PICT_TOP_FIELD   1

Definition at line 657 of file mpegvideo.h.

Referenced by decode_slice_header(), init_poc(), and mpeg_decode_mb().

#define PREV_PICT_TYPES_BUFFER_SIZE   256

Definition at line 352 of file mpegvideo.h.

Referenced by alloc_picture(), and MPV_common_init().

#define QMAT_SHIFT   22

Definition at line 47 of file mpegvideo.h.

Referenced by dct_quantize_altivec().

#define QMAT_SHIFT_MMX   16

Definition at line 46 of file mpegvideo.h.

#define QUANT_BIAS_SHIFT   8

Definition at line 465 of file mpegvideo.h.

Referenced by dct_quantize_altivec().

#define S_TYPE   FF_S_TYPE

#define SI_TYPE   FF_SI_TYPE

#define SLICE_END   -2

#define SLICE_ERROR   -1

Definition at line 694 of file mpegvideo.h.

Referenced by h261_decode_mb(), and rv10_decode_packet().

#define SLICE_NOEND   -3

no end marker or error found but mb count exceeded

Definition at line 696 of file mpegvideo.h.

Referenced by decode_slice(), and mpeg4_decode_partitioned_mb().

#define SLICE_OK   0

#define SP_TYPE   FF_SP_TYPE

Switching Predicted.

Definition at line 69 of file mpegvideo.h.

Referenced by av_get_pict_type_char(), decode_cabac_mb_skip(), decode_mb_cavlc(), and decode_slice_header().

#define UNI_AC_ENC_INDEX ( run,
level   )     ((run)*128 + (level))

Definition at line 477 of file mpegvideo.h.

Referenced by bit8x8_c(), and rd8x8_c().

#define USES_LIST ( a,
list   )     ((a) & ((MB_TYPE_P0L0|MB_TYPE_P1L0)<<(2*(list))))

does this mb use listX, note doesnt work if subMBs

Definition at line 168 of file mpegvideo.h.

Referenced by check_input_motion(), ff_h263_decode_mb(), ff_mpeg4_decode_mb(), ff_print_debug_info(), fill_caches(), mpeg_decode_mb(), and write_back_motion().

#define VP_START   1

current MB is the first after a resync marker

Definition at line 522 of file mpegvideo.h.

Referenced by ff_er_add_slice(), ff_er_frame_end(), and ff_er_frame_start().


Enumeration Type Documentation

Enumerator:
FMT_MPEG1 
FMT_H261 
FMT_H263 
FMT_MJPEG 
FMT_H264 

Definition at line 34 of file mpegvideo.h.


Function Documentation

int DCT_common_init ( MpegEncContext s  ) 

void ff_clean_h263_qscales ( MpegEncContext s  ) 

void ff_clean_intra_table_entries ( MpegEncContext s  ) 

void ff_clean_mpeg4_qscales ( MpegEncContext s  ) 

int ff_combine_frame ( ParseContext pc,
int  next,
uint8_t **  buf,
int *  buf_size 
)

void ff_copy_bits ( PutBitContext pb,
uint8_t *  src,
int  length 
)

void ff_denoise_dct ( MpegEncContext s,
DCTELEM block 
)

void ff_draw_horiz_band ( MpegEncContext s,
int  y,
int  h 
)

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.

Parameters:
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_epzs_motion_search ( MpegEncContext s,
int *  mx_ptr,
int *  my_ptr,
int  P[10][2],
int  src_index,
int  ref_index,
int16_t(*)  last_mv[2],
int  ref_mv_scale,
int  size,
int  h 
) [inline]

void ff_er_add_slice ( MpegEncContext s,
int  startx,
int  starty,
int  endx,
int  endy,
int  status 
)

adds a slice.

Parameters:
endx x component of the last macroblock, can be -1 for the last of the previous line
status the status at the end (MV_END, AC_ERROR, ...), it is assumed that no earlier end or error of the same type occured

Definition at line 612 of file error_resilience.c.

References AC_END, AC_ERROR, MpegEncContext::avctx, DC_END, DC_ERROR, MpegEncContext::error_count, MpegEncContext::error_resilience, MpegEncContext::error_status_table, MpegEncContext::mb_index2xy, MpegEncContext::mb_num, MpegEncContext::mb_width, MV_END, MV_ERROR, AVCodecContext::skip_top, AVCodecContext::thread_count, and VP_START.

Referenced by decode_slice(), ff_mpeg4_decode_partitions(), mpeg_decode_frame(), and slice_decode_thread().

void ff_er_frame_end ( MpegEncContext s  ) 

Definition at line 663 of file error_resilience.c.

References AC_END, AC_ERROR, av_log(), AV_LOG_DEBUG, AV_LOG_ERROR, AV_LOG_INFO, av_mallocz(), MpegEncContext::avctx, MpegEncContext::b8_stride, B_TYPE, MpegEncContext::block, DSPContext::clear_blocks, MpegEncContext::current_picture, MpegEncContext::current_picture_ptr, DC_END, DC_ERROR, MpegEncContext::dc_val, AVCodecContext::debug, decode_mb(), MpegEncContext::dsp, error(), AVCodecContext::error_concealment, MpegEncContext::error_count, MpegEncContext::error_resilience, MpegEncContext::error_status_table, FF_DEBUG_ER, FF_EC_DEBLOCK, filter181(), guess_dc(), guess_mv(), h_block_filter(), IS_8X8, IS_INTER, IS_INTRA, is_intra_more_likely(), MpegEncContext::linesize, MpegEncContext::mb_height, MpegEncContext::mb_index2xy, MpegEncContext::mb_intra, MpegEncContext::mb_num, MpegEncContext::mb_skipped, MpegEncContext::mb_stride, MB_TYPE_16x16, MB_TYPE_INTRA4x4, MB_TYPE_L0, MpegEncContext::mb_width, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::mbintra_table, MpegEncContext::mbskip_table, Picture::motion_val_base, MpegEncContext::mv, MpegEncContext::mv_dir, MV_DIR_BACKWARD, MV_DIR_FORWARD, MV_END, MV_ERROR, MpegEncContext::mv_type, MV_TYPE_16X16, MV_TYPE_8X8, MpegEncContext::next_picture, NULL, MpegEncContext::partitioned_frame, MpegEncContext::pb_time, MpegEncContext::pict_type, MpegEncContext::pp_time, put_dc(), AVCodecContext::skip_bottom, AVCodecContext::skip_top, MpegEncContext::uvlinesize, v_block_filter(), VP_START, and AVCodecContext::xvmc_acceleration.

Referenced by decode_nal_units(), ff_h263_decode_frame(), slice_end(), and vc9_decode_frame().

Here is the call graph for this function:

void ff_er_frame_start ( MpegEncContext s  ) 

void ff_estimate_b_frame_motion ( MpegEncContext s,
int  mb_x,
int  mb_y 
)

void ff_estimate_p_frame_motion ( MpegEncContext s,
int  mb_x,
int  mb_y 
)

Definition at line 1139 of file motion_est.c.

References MotionEstContext::avctx, MpegEncContext::b8_stride, MpegEncContext::block_index, c, CANDIDATE_MB_TYPE_INTER, CANDIDATE_MB_TYPE_INTER4V, CANDIDATE_MB_TYPE_INTER_I, CANDIDATE_MB_TYPE_INTRA, CANDIDATE_MB_TYPE_SKIPPED, check_input_motion(), CODEC_FLAG_4MV, CODEC_FLAG_INTERLACED_ME, CODEC_FLAG_MV0, MotionEstContext::current_mv_penalty, MpegEncContext::current_picture, MpegEncContext::dc_val, MpegEncContext::dsp, MpegEncContext::f_code, FF_CMP_CHROMA, FF_CMP_SSE, ff_epzs_motion_search(), ff_get_mb_score(), FF_MB_DECISION_SIMPLE, MpegEncContext::first_slice_line, MpegEncContext::flags, FMT_H263, get_limits(), get_penalty_factor(), h263_mv4_search(), init_ref(), interlaced_search(), MpegEncContext::lambda, MpegEncContext::lambda2, MpegEncContext::last_dc, MpegEncContext::last_picture, MpegEncContext::linesize, MAX_MV, DSPContext::mb_cmp, AVCodecContext::mb_cmp, AVCodecContext::mb_decision, Picture::mb_mean, MotionEstContext::mb_penalty_factor, MpegEncContext::mb_stride, MpegEncContext::mb_type, Picture::mb_var, MotionEstContext::mb_var_sum_temp, Picture::mc_mb_var, MotionEstContext::mc_mb_var_sum_temp, MpegEncContext::me, AVCodecContext::me_cmp, ME_EPZS, ME_FULL, ME_LOG, MpegEncContext::me_method, ME_PHODS, AVCodecContext::me_sub_cmp, AVCodecContext::me_threshold, ME_X1, ME_ZERO, MotionEstContext::mv_penalty, MpegEncContext::new_picture, no_motion_search(), NULL, MpegEncContext::out_format, P, MpegEncContext::p_field_mv_table, MpegEncContext::p_field_select_table, P_LEFT, P_MEDIAN, MpegEncContext::p_mv_table, P_TOP, P_TOPRIGHT, MotionEstContext::penalty_factor, DSPContext::pix_norm1, DSPContext::pix_sum, MotionEstContext::pred_x, MotionEstContext::pred_y, MpegEncContext::qscale, MpegEncContext::quarter_sample, MotionEstContext::ref, MotionEstContext::scene_change_score, MotionEstContext::scratchpad, set_p_mv_tables(), shift(), MotionEstContext::skip, MotionEstContext::src, DSPContext::sse, MotionEstContext::stride, MotionEstContext::sub_motion_search, MotionEstContext::sub_penalty_factor, MpegEncContext::uvlinesize, MotionEstContext::uvstride, MotionEstContext::xmax, MotionEstContext::xmin, and MotionEstContext::ymax.

Here is the call graph for this function:

double ff_eval ( char *  s,
double *  const_value,
const char **  const_name,
double(**)(void *, double)  func1,
const char **  func1_name,
double(**)(void *, double, double)  func2,
char **  func2_name,
void *  opaque 
)

Definition at line 185 of file eval.c.

References Parser::const_name, Parser::const_value, evalExpression(), Parser::func1, Parser::func1_name, Parser::func2, Parser::func2_name, Parser::opaque, Parser::s, and Parser::stack_index.

Referenced by get_qscale().

Here is the call graph for this function:

int ff_find_unused_picture ( MpegEncContext s,
int  shared 
)

void ff_fix_long_mvs ( MpegEncContext s,
uint8_t *  field_select_table,
int  field_select,
int16_t(*)  mv_table[2],
int  f_code,
int  type,
int  truncate 
)

void ff_fix_long_p_mvs ( MpegEncContext s  ) 

void ff_flv_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

int ff_get_best_fcode ( MpegEncContext s,
int16_t(*)  mv_table[2],
int  type 
)

int ff_get_mb_score ( MpegEncContext s,
int  mx,
int  my,
int  src_index,
int  ref_index,
int  size,
int  h,
int  add_rate 
) [inline]

void ff_h261_encode_init ( MpegEncContext s  ) 

void ff_h261_encode_mb ( MpegEncContext s,
DCTELEM  block[6][64],
int  motion_x,
int  motion_y 
)

void ff_h261_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

void ff_h261_loop_filter ( MpegEncContext s  ) 

void ff_h261_reorder_mb_index ( MpegEncContext s  ) 

int ff_h263_decode_end ( AVCodecContext avctx  ) 

Definition at line 116 of file h263dec.c.

References MPV_common_end(), AVCodecContext::priv_data, and s.

Here is the call graph for this function:

int ff_h263_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
uint8_t *  buf,
int  buf_size 
)

Definition at line 414 of file h263dec.c.

References AC_ERROR, MpegEncContext::allocated_bitstream_buffer_size, av_fast_realloc(), av_log(), AV_LOG_DEBUG, AV_LOG_ERROR, avcodec_set_dimensions(), MpegEncContext::avctx, AVDISCARD_ALL, AVDISCARD_NONKEY, AVDISCARD_NONREF, B_TYPE, MpegEncContext::bitstream_buffer, MpegEncContext::bitstream_buffer_size, GetBitContext::buffer, ParseContext::buffer, CODEC_FLAG_BITEXACT, CODEC_FLAG_LOW_DELAY, CODEC_FLAG_TRUNCATED, MpegEncContext::codec_id, CODEC_ID_H263, CODEC_ID_H263I, CODEC_ID_H263P, CODEC_ID_MPEG4, AVCodecContext::codec_tag, AVCodecContext::coded_height, AVCodecContext::coded_width, MpegEncContext::context_initialized, MpegEncContext::current_picture, MpegEncContext::current_picture_ptr, MpegEncContext::data_partitioning, DC_ERROR, AVCodecContext::debug, decode_slice(), MpegEncContext::divx_build, MpegEncContext::divx_packed, MpegEncContext::divx_version, MpegEncContext::dropable, MpegEncContext::error_status_table, AVCodecContext::extradata, AVCodecContext::extradata_size, FF_BUG_AUTODETECT, FF_BUG_DC_CLIP, FF_BUG_DIRECT_BLOCKSIZE, FF_BUG_EDGE, FF_BUG_HPEL_CHROMA, FF_BUG_NO_PADDING, FF_BUG_QPEL_CHROMA, FF_BUG_QPEL_CHROMA2, FF_BUG_STD_QPEL, FF_BUG_UMP4, FF_BUG_XVID_ILACE, ff_combine_frame(), FF_DEBUG_BUGS, ff_er_frame_end(), ff_er_frame_start(), ff_find_unused_picture(), ff_h263_get_gob_height(), ff_h263_resync(), FF_IDCT_AUTO, FF_IDCT_LIBMPEG2MMX, FF_INPUT_BUFFER_PADDING_SIZE, ff_mpeg4_clean_buffers(), ff_mpeg4_decode_picture_header(), ff_mpeg4_find_frame_end(), ff_print_debug_info(), ff_wmv2_decode_picture_header(), ff_wmv2_decode_secondary_picture_header(), AVCodecContext::flags, MpegEncContext::flags, AVCodecContext::flags2, MpegEncContext::flags2, flv_h263_decode_picture_header(), fopen(), fprintf, AVCodecContext::frame_number, FRAME_SKIPPED, MpegEncContext::gb, get_bits_count(), get_consumed_bytes(), MpegEncContext::gob_index, h263_decode_picture_header(), h263_find_frame_end(), MpegEncContext::h263_flv, MpegEncContext::h263_msmpeg4, MpegEncContext::h263_pred, AVCodecContext::has_b_frames, MpegEncContext::height, AVCodecContext::hurry_up, I_TYPE, AVCodecContext::idct_algo, init_get_bits(), intel_h263_decode_picture_header(), MpegEncContext::last_picture, MpegEncContext::last_picture_ptr, MpegEncContext::lavc_build, MpegEncContext::low_delay, MpegEncContext::mb_height, MpegEncContext::mb_num, MpegEncContext::mb_x, MpegEncContext::mb_y, memcpy, mm_flags, MPV_common_end(), MPV_common_init(), MPV_frame_end(), MPV_frame_start(), msmpeg4_decode_ext_header(), msmpeg4_decode_picture_header(), MpegEncContext::msmpeg4_version, MV_ERROR, MpegEncContext::next_p_frame_damaged, MpegEncContext::next_picture_ptr, NULL, MpegEncContext::padding_bug_score, MpegEncContext::parse_context, MpegEncContext::pict_type, MpegEncContext::picture, MpegEncContext::picture_number, AVCodecContext::priv_data, MpegEncContext::qscale, MpegEncContext::resync_marker, s, SET_QPEL_FUNC, GetBitContext::size_in_bits, AVCodecContext::skip_frame, MpegEncContext::slice_height, AVCodecContext::stream_codec_tag, MpegEncContext::vo_type, MpegEncContext::vol_control_parameters, MpegEncContext::width, MpegEncContext::workaround_bugs, and MpegEncContext::xvid_build.

Here is the call graph for this function:

int ff_h263_decode_gob_header ( MpegEncContext s  ) 

int ff_h263_decode_init ( AVCodecContext avctx  ) 

int ff_h263_decode_mb ( MpegEncContext s,
DCTELEM  block[6][64] 
)

Definition at line 3893 of file h263.c.

References MpegEncContext::ac_pred, MpegEncContext::alt_inter_vlc, av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::b8_stride, B_TYPE, MpegEncContext::block, MpegEncContext::block_last_index, CBPC_B_VLC_BITS, CBPY_VLC_BITS, DSPContext::clear_blocks, MpegEncContext::current_picture, MpegEncContext::dsp, ff_mpeg4_set_direct_mv(), MpegEncContext::gb, get_bits1(), get_bits_count(), get_vlc2(), MpegEncContext::h263_aic, MpegEncContext::h263_aic_dir, h263_decode_block(), h263_decode_dquant(), h263_decode_motion(), h263_mb_type_b_map, H263_MBTYPE_B_VLC_BITS, MpegEncContext::h263_pred, h263_pred_motion(), h263p_decode_umotion(), HAS_CBP, INTER_MCBPC_VLC_BITS, INTRA_MCBPC_VLC_BITS, IS_DIRECT, IS_INTRA, IS_QUANT, MpegEncContext::loop_filter, MpegEncContext::mb_intra, MpegEncContext::mb_num_left, MpegEncContext::mb_skipped, MpegEncContext::mb_stride, MB_TYPE_16x16, MB_TYPE_8x8, MB_TYPE_ACPRED, MB_TYPE_INTRA, MB_TYPE_L0, MB_TYPE_SKIP, MpegEncContext::mb_width, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::mv, MpegEncContext::mv_dir, MV_DIR_BACKWARD, MV_DIR_FORWARD, MV_DIRECT, MpegEncContext::mv_type, MV_TYPE_16X16, MV_TYPE_8X8, MpegEncContext::obmc, P_TYPE, MpegEncContext::pict_type, preview_obmc(), show_bits(), GetBitContext::size_in_bits, skip_bits1(), SLICE_END, SLICE_OK, stride, VLC::table, MpegEncContext::umvplus, and USES_LIST.

Referenced by ff_h263_decode_init(), and rv10_decode_packet().

Here is the call graph for this function:

int ff_h263_decode_mba ( MpegEncContext s  ) 

void ff_h263_encode_mba ( MpegEncContext s  ) 

Definition at line 2997 of file h263.c.

References ff_mba_length, ff_mba_max, MpegEncContext::mb_num, MpegEncContext::mb_width, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::pb, and put_bits().

Here is the call graph for this function:

void ff_h263_encode_motion ( MpegEncContext s,
int  val,
int  f_code 
)

int ff_h263_get_gob_height ( MpegEncContext s  ) 

Get the GOB height based on picture height.

Definition at line 2974 of file h263.c.

References MpegEncContext::height.

Referenced by ff_h263_decode_frame().

void ff_h263_loop_filter ( MpegEncContext s  ) 

int ff_h263_resync ( MpegEncContext s  ) 

decodes the group of blocks / video packet header.

Returns:
<0 if no resync found

Definition at line 3309 of file h263.c.

References align_get_bits(), MpegEncContext::codec_id, CODEC_ID_MPEG4, MpegEncContext::gb, get_bits_count(), h263_decode_gob_header(), MpegEncContext::last_resync_gb, mpeg4_decode_video_packet_header(), show_bits(), GetBitContext::size_in_bits, skip_bits(), and skip_bits1().

Referenced by ff_h263_decode_frame().

Here is the call graph for this function:

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_h263_update_motion_val ( MpegEncContext s  ) 

void ff_init_block_index ( MpegEncContext s  ) 

void ff_init_me ( MpegEncContext s  ) 

void ff_init_scantable ( uint8_t *  ,
ScanTable st,
const uint8_t *  src_scantable 
)

void ff_mjpeg_stuffing ( PutBitContext pbc  ) 

void ff_mpeg1_clean_buffers ( MpegEncContext s  ) 

void ff_mpeg1_encode_init ( MpegEncContext s  ) 

void ff_mpeg1_encode_slice_header ( MpegEncContext s  ) 

int ff_mpeg1_find_frame_end ( ParseContext pc,
const uint8_t *  buf,
int  buf_size 
)

finds the end of the current frame in the bitstream.

Returns:
the position of the first byte of the next frame, or -1

Definition at line 2996 of file mpeg12.c.

References END_NOT_FOUND, ParseContext::frame_start_found, SLICE_MAX_START_CODE, SLICE_MIN_START_CODE, and ParseContext::state.

Referenced by mpeg_decode_frame(), and mpegvideo_parse().

void ff_mpeg4_clean_buffers ( MpegEncContext s  ) 

int ff_mpeg4_decode_mb ( MpegEncContext s,
DCTELEM  block[6][64] 
)

Definition at line 4159 of file h263.c.

References MpegEncContext::ac_pred, av_log(), AV_LOG_ERROR, MpegEncContext::avctx, MpegEncContext::b_code, B_TYPE, MpegEncContext::block, MpegEncContext::block_last_index, CBPY_VLC_BITS, DSPContext::clear_blocks, MpegEncContext::codec_id, CODEC_ID_MPEG4, MpegEncContext::current_picture, MpegEncContext::dsp, MpegEncContext::f_code, FF_BUG_XVID_ILACE, ff_mpeg4_set_direct_mv(), ff_set_qscale(), MpegEncContext::field_select, MpegEncContext::gb, get_amv(), get_bits(), get_bits1(), get_vlc2(), GMC_SPRITE, h263_decode_motion(), MpegEncContext::h263_pred, h263_pred_motion(), INTER_MCBPC_VLC_BITS, MpegEncContext::interlaced_dct, INTRA_MCBPC_VLC_BITS, IS_DIRECT, IS_SKIP, MpegEncContext::last_mv, MpegEncContext::mb_intra, MpegEncContext::mb_skipped, MpegEncContext::mb_stride, MB_TYPE_16x16, MB_TYPE_16x8, MB_TYPE_8x8, MB_TYPE_ACPRED, mb_type_b_map, MB_TYPE_B_VLC_BITS, MB_TYPE_DIRECT2, MB_TYPE_GMC, MB_TYPE_INTERLACED, MB_TYPE_INTRA, MB_TYPE_L0, MB_TYPE_L0L1, MB_TYPE_SKIP, MpegEncContext::mb_width, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::mcsel, mpeg4_decode_block(), mpeg4_is_resync(), MpegEncContext::mv, MpegEncContext::mv_dir, MV_DIR_BACKWARD, MV_DIR_FORWARD, MV_DIRECT, MpegEncContext::mv_type, MV_TYPE_16X16, MV_TYPE_8X8, MV_TYPE_FIELD, MpegEncContext::next_picture, P_TYPE, MpegEncContext::pict_type, MpegEncContext::progressive_sequence, MpegEncContext::qscale, S_TYPE, SLICE_END, SLICE_OK, VLC::table, USES_LIST, MpegEncContext::vol_sprite_usage, and MpegEncContext::workaround_bugs.

Referenced by decode_vop_header(), and ff_h263_decode_init().

Here is the call graph for this function:

int ff_mpeg4_decode_partitions ( MpegEncContext s  ) 

int ff_mpeg4_decode_picture_header ( MpegEncContext s,
GetBitContext gb 
)

void ff_mpeg4_encode_video_packet_header ( MpegEncContext s  ) 

int ff_mpeg4_find_frame_end ( ParseContext pc,
const uint8_t *  buf,
int  buf_size 
)

finds the end of the current frame in the bitstream.

Returns:
the position of the first byte of the next frame, or -1

Definition at line 321 of file h263dec.c.

References END_NOT_FOUND, ParseContext::frame_start_found, and ParseContext::state.

Referenced by ff_h263_decode_frame(), and mpeg4video_parse().

int ff_mpeg4_get_video_packet_prefix_length ( MpegEncContext s  ) 

void ff_mpeg4_init_partitions ( MpegEncContext s  ) 

void ff_mpeg4_merge_partitions ( MpegEncContext s  ) 

int ff_mpeg4_set_direct_mv ( MpegEncContext s,
int  mx,
int  my 
)

void ff_mpeg4_stuffing ( PutBitContext pbc  ) 

void ff_mpeg_flush ( AVCodecContext avctx  ) 

int ff_msmpeg4_decode_init ( MpegEncContext s  ) 

void ff_msmpeg4_encode_init ( MpegEncContext s  ) 

void ff_mspel_motion ( MpegEncContext s,
uint8_t *  dest_y,
uint8_t *  dest_cb,
uint8_t *  dest_cr,
uint8_t **  ref_picture,
op_pixels_func(*)  pix_op[4],
int  motion_x,
int  motion_y,
int  h 
)

void ff_parse_close ( AVCodecParserContext s  ) 

Definition at line 468 of file parser.c.

References av_free(), ParseContext::buffer, and AVCodecParserContext::priv_data.

Here is the call graph for this function:

int ff_pre_estimate_p_frame_motion ( MpegEncContext s,
int  mb_x,
int  mb_y 
)

void ff_print_debug_info ( MpegEncContext s,
AVFrame pict 
)

int ff_rate_control_init ( MpegEncContext s  ) 

Definition at line 47 of file ratecontrol.c.

References av_log(), AV_LOG_ERROR, av_mallocz(), av_q2d(), MpegEncContext::avctx, RateControlEntry::b_code, B_TYPE, MpegEncContext::bit_rate, bits, RateControlContext::buffer_index, CODEC_FLAG_PASS2, Predictor::coeff, Predictor::count, Predictor::decay, e, emms_c, RateControlContext::entry, RateControlEntry::f_code, FF_QP2LAMBDA, MpegEncContext::flags, RateControlContext::frame_count, get_qscale(), MpegEncContext::gop_size, RateControlEntry::i_count, RateControlContext::i_cplx_sum, RateControlEntry::i_tex_bits, I_TYPE, init_pass2(), RateControlContext::last_qscale_for, MpegEncContext::max_b_frames, MpegEncContext::mb_num, RateControlEntry::mb_var_sum, RateControlEntry::mc_mb_var_sum, RateControlEntry::misc_bits, RateControlEntry::mv_bits, RateControlContext::mv_bits_sum, RateControlEntry::new_pict_type, RateControlEntry::new_qscale, RateControlContext::num_entries, RateControlContext::p_cplx_sum, RateControlEntry::p_tex_bits, P_TYPE, RateControlContext::pass1_rc_eq_output_sum, RateControlContext::pass1_wanted_bits, MpegEncContext::pict_type, RateControlEntry::pict_type, RateControlContext::pred, RateControlEntry::qscale, RateControlContext::qscale_sum, MpegEncContext::rc_context, AVCodecContext::rc_initial_buffer_occupancy, AVCodecContext::rc_initial_cplx, RateControlContext::short_term_qcount, RateControlContext::short_term_qsum, AVCodecContext::stats_in, strchr, and AVCodecContext::time_base.

Referenced by encode_init().

Here is the call graph for this function:

void ff_rate_control_uninit ( MpegEncContext s  ) 

Definition at line 178 of file ratecontrol.c.

References av_freep(), emms_c, RateControlContext::entry, and MpegEncContext::rc_context.

Here is the call graph for this function:

float ff_rate_estimate_qscale ( MpegEncContext s  ) 

Definition at line 612 of file ratecontrol.c.

References a, MpegEncContext::adaptive_quant, adaptive_quantization(), av_get_pict_type_char(), av_log(), AV_LOG_DEBUG, av_q2d(), MpegEncContext::avctx, MpegEncContext::b_code, RateControlEntry::b_code, MpegEncContext::bit_rate, AVCodecContext::bit_rate_tolerance, bits, CODEC_FLAG_PASS2, MpegEncContext::current_picture, AVCodecContext::debug, emms_c, RateControlContext::entry, RateControlEntry::expected_bits, MpegEncContext::f_code, RateControlEntry::f_code, FF_DEBUG_RC, FF_QP2LAMBDA, MpegEncContext::flags, MpegEncContext::frame_bits, RateControlContext::frame_count, get_diff_limited_q(), get_qminmax(), get_qscale(), RateControlEntry::i_count, RateControlContext::i_cplx_sum, MpegEncContext::i_tex_bits, RateControlEntry::i_tex_bits, I_TYPE, MpegEncContext::intra_only, RateControlContext::last_mb_var_sum, RateControlContext::last_mc_mb_var_sum, MpegEncContext::last_pict_type, RateControlContext::last_qscale, MpegEncContext::mb_num, RateControlEntry::mb_var_sum, Picture::mb_var_sum, RateControlEntry::mc_mb_var_sum, Picture::mc_mb_var_sum, RateControlEntry::misc_bits, modify_qscale(), MpegEncContext::mv_bits, RateControlEntry::mv_bits, RateControlContext::mv_bits_sum, RateControlEntry::new_pict_type, RateControlEntry::new_qscale, RateControlContext::p_cplx_sum, MpegEncContext::p_tex_bits, RateControlEntry::p_tex_bits, P_TYPE, RateControlContext::pass1_rc_eq_output_sum, RateControlContext::pass1_wanted_bits, RateControlEntry::pict_type, MpegEncContext::pict_type, MpegEncContext::picture_number, RateControlContext::pred, predict_size(), AVCodecContext::qblur, RateControlEntry::qscale, MpegEncContext::rc_context, RateControlContext::short_term_qcount, RateControlContext::short_term_qsum, AVCodecContext::time_base, MpegEncContext::total_bits, and update_predictor().

Referenced by encode_frame().

Here is the call graph for this function:

void ff_set_mpeg4_time ( MpegEncContext s,
int  picture_number 
)

void ff_set_qscale ( MpegEncContext s,
int  qscale 
)

static void ff_update_block_index ( MpegEncContext s  )  [inline, static]

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().

Here is the call graph for this function:

int ff_vbv_update ( MpegEncContext s,
int  frame_size 
)

void ff_wmv2_add_mb ( MpegEncContext s,
DCTELEM  block[6][64],
uint8_t *  dest_y,
uint8_t *  dest_cb,
uint8_t *  dest_cr 
)

Definition at line 611 of file wmv2.c.

References CODEC_FLAG_GRAY, MpegEncContext::flags, MpegEncContext::linesize, MpegEncContext::uvlinesize, and wmv2_add_block().

Referenced by MPV_decode_mb_internal().

Here is the call graph for this function:

int ff_wmv2_decode_picture_header ( MpegEncContext s  ) 

int ff_wmv2_decode_secondary_picture_header ( MpegEncContext s  ) 

void ff_wmv2_encode_mb ( MpegEncContext s,
DCTELEM  block[6][64],
int  motion_x,
int  motion_y 
)

int ff_wmv2_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

void ff_write_pass1_stats ( MpegEncContext s  ) 

void ff_write_quant_matrix ( PutBitContext pb,
int16_t *  matrix 
)

int flv_h263_decode_picture_header ( MpegEncContext s  ) 

static int get_bits_diff ( MpegEncContext s  )  [inline, static]

Definition at line 792 of file mpegvideo.h.

References bits, MpegEncContext::last_bits, MpegEncContext::pb, and put_bits_count().

Here is the call graph for this function:

static int get_rl_index ( const RLTable rl,
int  last,
int  run,
int  level 
) [inline, static]

Definition at line 850 of file mpegvideo.h.

References RLTable::index_run, RLTable::max_level, and RLTable::n.

Referenced by h261_encode_block(), and msmpeg4_encode_block().

void h263_decode_init_vlc ( MpegEncContext s  ) 

int h263_decode_picture_header ( MpegEncContext s  ) 

void h263_encode_gob_header ( MpegEncContext s,
int  mb_line 
)

void h263_encode_init ( MpegEncContext s  ) 

Referenced by encode_init().

void h263_encode_mb ( MpegEncContext s,
DCTELEM  block[6][64],
int  motion_x,
int  motion_y 
)

void h263_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

int h263_get_picture_format ( int  width,
int  height 
)

Definition at line 119 of file h263.c.

int16_t* h263_pred_motion ( MpegEncContext s,
int  block,
int  dir,
int *  px,
int *  py 
)

void init_rl ( RLTable rl,
int  use_static 
)

void init_vlc_rl ( RLTable rl,
int  use_static 
)

int intel_h263_decode_picture_header ( MpegEncContext s  ) 

void mjpeg_close ( MpegEncContext s  ) 

void mjpeg_encode_mb ( MpegEncContext s,
DCTELEM  block[6][64] 
)

int mjpeg_init ( MpegEncContext s  ) 

void mjpeg_picture_header ( MpegEncContext s  ) 

void mjpeg_picture_trailer ( MpegEncContext s  ) 

void mpeg1_encode_mb ( MpegEncContext s,
DCTELEM  block[6][64],
int  motion_x,
int  motion_y 
)

void mpeg1_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

void mpeg4_encode_mb ( MpegEncContext s,
DCTELEM  block[6][64],
int  motion_x,
int  motion_y 
)

void mpeg4_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

void mpeg4_pred_ac ( MpegEncContext s,
DCTELEM block,
int  n,
int  dir 
)

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

int MPV_encode_end ( AVCodecContext avctx  ) 

int MPV_encode_init ( AVCodecContext avctx  ) 

int MPV_encode_picture ( AVCodecContext avctx,
unsigned char *  buf,
int  buf_size,
void *  data 
)

void MPV_frame_end ( MpegEncContext s  ) 

int MPV_frame_start ( MpegEncContext s,
AVCodecContext avctx 
)

int msmpeg4_decode_ext_header ( MpegEncContext s,
int  buf_size 
)

int msmpeg4_decode_picture_header ( MpegEncContext s  ) 

void msmpeg4_encode_ext_header ( MpegEncContext s  ) 

void msmpeg4_encode_mb ( MpegEncContext s,
DCTELEM  block[6][64],
int  motion_x,
int  motion_y 
)

void msmpeg4_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

void rv10_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

void rv20_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

int rv_decode_dc ( MpegEncContext s,
int  n 
)

Definition at line 180 of file rv10.c.

References av_log(), AV_LOG_ERROR, MpegEncContext::avctx, DC_VLC_BITS, MpegEncContext::gb, get_bits(), get_vlc2(), and VLC::table.

Referenced by h263_decode_block().

Here is the call graph for this function:


Variable Documentation

void(* draw_edges)(uint8_t *buf, int wrap, int width, int height, int w)

const uint8_t ff_aic_dc_scale_table[32]

Definition at line 254 of file h263data.h.

Referenced by h263_decode_picture_header(), and rv10_decode_packet().

const uint8_t ff_h263_chroma_qscale_table[32]

Definition at line 268 of file h263data.h.

Referenced by h263_decode_picture_header(), and rv10_decode_packet().

const uint8_t ff_h263_loop_filter_strength[32]

const uint8_t ff_mpeg1_dc_scale_table[128]

const int16_t ff_mpeg1_default_intra_matrix[64]

Definition at line 17 of file mpeg12data.h.

Referenced by mpeg1_decode_sequence(), and vcr2_init_sequence().

const uint8_t ff_mpeg4_c_dc_scale_table[32]

Definition at line 390 of file mpeg4data.h.

Referenced by common_init(), and decode_vop_header().

const int16_t ff_mpeg4_default_intra_matrix[64]

Definition at line 364 of file mpeg4data.h.

Referenced by decode_vol_header().

Definition at line 375 of file mpeg4data.h.

Referenced by decode_vol_header().

const uint8_t ff_mpeg4_y_dc_scale_table[32]

Definition at line 386 of file mpeg4data.h.

Referenced by common_init(), and decode_vop_header().


Generated on Mon Apr 28 14:05:33 2008 for Cinelerra by  doxygen 1.5.5