libavcodec/mpegvideo.h File Reference

mpegvideo header. More...

#include "dsputil.h"
#include "get_bits.h"
#include "put_bits.h"
#include "ratecontrol.h"
#include "parser.h"
#include "mpeg12data.h"
#include "rl.h"

Go to the source code of this file.

Data Structures

struct  Picture
 Picture. More...
struct  MotionEstContext
 Motion estimation context. More...
struct  MpegEncContext
 MpegEncContext. More...

Defines

#define FRAME_SKIPPED   100
 return value for header parsers if frame is not coded
#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   16
#define MAX_PICTURE_COUNT   32
#define ME_MAP_SIZE   64
#define ME_MAP_SHIFT   3
#define ME_MAP_MV_BITS   11
#define MAX_MB_BYTES   (30*16*16*3/8 + 120)
#define INPLACE_OFFSET   16
#define SEQ_END_CODE   0x000001b7
#define SEQ_START_CODE   0x000001b3
#define GOP_START_CODE   0x000001b8
#define PICTURE_START_CODE   0x00000100
#define SLICE_MIN_START_CODE   0x00000101
#define SLICE_MAX_START_CODE   0x000001af
#define EXT_START_CODE   0x000001b5
#define USER_START_CODE   0x000001b2
#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 does not work if subMBs
#define HAS_CBP(a)   ((a)&MB_TYPE_CBP)
#define PREV_PICT_TYPES_BUFFER_SIZE   256
#define MV_DIR_FORWARD   1
#define MV_DIR_BACKWARD   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 CANDIDATE_MB_TYPE_DIRECT0   0x1000
#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 REBASE_PICTURE(pic, new_ctx, old_ctx)

Enumerations

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

Functions

void MPV_decode_defaults (MpegEncContext *s)
 sets the given MpegEncContext to defaults for decoding.
int MPV_common_init (MpegEncContext *s)
 init common structure for both encoder and decoder.
void MPV_common_end (MpegEncContext *s)
void MPV_decode_mb (MpegEncContext *s, DCTELEM block[12][64])
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
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 MPV_common_init_mmx (MpegEncContext *s)
void MPV_common_init_axp (MpegEncContext *s)
void MPV_common_init_mlib (MpegEncContext *s)
void MPV_common_init_mmi (MpegEncContext *s)
void MPV_common_init_arm (MpegEncContext *s)
void MPV_common_init_altivec (MpegEncContext *s)
void MPV_common_init_bfin (MpegEncContext *s)
void ff_clean_intra_table_entries (MpegEncContext *s)
 cleans dc, ac, coded_block for the current non intra MB
void ff_draw_horiz_band (MpegEncContext *s, int y, int h)
void ff_mpeg_flush (AVCodecContext *avctx)
void ff_print_debug_info (MpegEncContext *s, AVFrame *pict)
 prints debuging info for the given picture.
void ff_write_quant_matrix (PutBitContext *pb, uint16_t *matrix)
void ff_release_unused_pictures (MpegEncContext *s, int remove_current)
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)
int MPV_lowest_referenced_row (MpegEncContext *s, int dir)
 find the lowest MB row referenced in the MVs
void MPV_report_decode_progress (MpegEncContext *s)
int ff_mpeg_update_thread_context (AVCodecContext *dst, const AVCodecContext *src)
const uint8_t * ff_find_start_code (const uint8_t *p, const uint8_t *end, uint32_t *state)
void ff_set_qscale (MpegEncContext *s, int qscale)
 set qscale and update qscale dependent variables.
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)
 adds a slice.
int ff_dct_common_init (MpegEncContext *s)
void ff_convert_matrix (DSPContext *dsp, int(*qmat)[64], uint16_t(*qmat16)[2][64], const uint16_t *quant_matrix, int bias, int qmin, int qmax, int intra)
void ff_init_block_index (MpegEncContext *s)
void ff_copy_picture (Picture *dst, Picture *src)
int ff_alloc_picture (MpegEncContext *s, Picture *pic, int shared)
 allocates a Picture The pixels are allocated/set by calling get_buffer() if shared=0
static void ff_update_block_index (MpegEncContext *s)
static int get_bits_diff (MpegEncContext *s)
static int ff_h263_round_chroma (int x)
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)
int 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, AVCodecParserContext *s)
 Find the end of the current frame in the bitstream.
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_h261_get_picture_format (int width, int height)
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 (AVCodecContext *avctx)
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)

Variables

enum PixelFormat ff_pixfmt_list_420 []
enum PixelFormat ff_hwaccel_pixfmt_list_420 []
const uint8_t ff_mpeg1_dc_scale_table [128]
const uint8_t *const ff_mpeg2_dc_scale_table [4]
const uint8_t ff_aic_dc_scale_table [32]
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 CANDIDATE_MB_TYPE_BACKWARD   0x40

#define CANDIDATE_MB_TYPE_BACKWARD_I   0x400

#define CANDIDATE_MB_TYPE_BIDIR   0x80

#define CANDIDATE_MB_TYPE_BIDIR_I   0x800

#define CANDIDATE_MB_TYPE_DIRECT   0x10

Definition at line 405 of file mpegvideo.h.

Referenced by encode_thread(), ff_clean_mpeg4_qscales(), and ff_estimate_b_frame_motion().

#define CANDIDATE_MB_TYPE_DIRECT0   0x1000

Definition at line 415 of file mpegvideo.h.

Referenced by encode_thread(), and ff_estimate_b_frame_motion().

#define CANDIDATE_MB_TYPE_FORWARD   0x20

#define CANDIDATE_MB_TYPE_FORWARD_I   0x200

#define CANDIDATE_MB_TYPE_INTER   0x02

#define CANDIDATE_MB_TYPE_INTER4V   0x04

#define CANDIDATE_MB_TYPE_INTER_I   0x100

#define CANDIDATE_MB_TYPE_INTRA   0x01

#define CANDIDATE_MB_TYPE_SKIPPED   0x08

Definition at line 402 of file mpegvideo.h.

Referenced by encode_thread(), and ff_estimate_p_frame_motion().

#define CHROMA_420   1

#define CHROMA_422   2

Definition at line 634 of file mpegvideo.h.

Referenced by encode_mb_internal(), and MPV_encode_init().

#define CHROMA_444   3

Definition at line 635 of file mpegvideo.h.

#define DC_END   32

#define DC_ERROR   4

#define EXT_START_CODE   0x000001b5

Definition at line 76 of file mpegvideo.h.

#define FRAME_SKIPPED   100

return value for header parsers if frame is not coded

Definition at line 39 of file mpegvideo.h.

Referenced by decode_vop_header(), ff_h263_decode_frame(), ff_mpeg4_decode_picture_header(), and rv20_decode_picture_header().

#define GOP_START_CODE   0x000001b8

Definition at line 72 of file mpegvideo.h.

Referenced by decode_chunks(), and mpeg1_encode_sequence_header().

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

Definition at line 117 of file mpegvideo.h.

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

#define INPLACE_OFFSET   16

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

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

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

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

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

Definition at line 113 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))))

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

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

Definition at line 104 of file mpegvideo.h.

Referenced by ff_print_debug_info().

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

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

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

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

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

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

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

Definition at line 97 of file mpegvideo.h.

Referenced by ff_print_debug_info().

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

Definition at line 114 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)&MB_TYPE_SKIP)

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

Definition at line 112 of file mpegvideo.h.

Referenced by await_references(), and hl_motion().

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

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

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

#define MAX_FCODE   7

Definition at line 54 of file mpegvideo.h.

Referenced by ff_mpeg1_encode_init(), and init_mv_penalty_and_fcode().

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

Definition at line 65 of file mpegvideo.h.

Referenced by encode_thread().

#define MAX_MV   2048

#define MAX_PICTURE_COUNT   32

#define MAX_THREADS   16

Definition at line 57 of file mpegvideo.h.

Referenced by dnxhd_encode_init(), free_tables(), and 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 49 of file mpegvideo.h.

#define MV_DIR_BACKWARD   2

#define MV_DIR_FORWARD   1

#define MV_DIRECT   4

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

Definition at line 371 of file mpegvideo.h.

Referenced by encode_mb_internal(), encode_thread(), ff_h263_decode_mb(), mpeg4_decode_mb(), and mpeg4_encode_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 375 of file mpegvideo.h.

Referenced by ff_xvmc_decode_mb(), mpeg_decode_mb(), MPV_lowest_referenced_row(), MPV_motion_internal(), and MPV_motion_lowres().

#define MV_TYPE_8X8   1

#define MV_TYPE_DMV   4

2 vectors, special mpeg2 Dual Prime Vectors

Definition at line 377 of file mpegvideo.h.

Referenced by ff_xvmc_decode_mb(), mpeg_decode_mb(), MPV_motion_internal(), and MPV_motion_lowres().

#define MV_TYPE_FIELD   3

#define PICT_BOTTOM_FIELD   2

#define PICT_FRAME   3

#define PICT_TOP_FIELD   1

#define PICTURE_START_CODE   0x00000100

#define PREV_PICT_TYPES_BUFFER_SIZE   256

Definition at line 313 of file mpegvideo.h.

Referenced by ff_alloc_picture(), ff_mpeg_update_thread_context(), and MPV_common_init().

#define QMAT_SHIFT   22

#define QMAT_SHIFT_MMX   16

Definition at line 51 of file mpegvideo.h.

Referenced by ff_convert_matrix().

#define QUANT_BIAS_SHIFT   8

#define REBASE_PICTURE ( pic,
new_ctx,
old_ctx   ) 

Value:

(pic ? \
    (pic >= old_ctx->picture && pic < old_ctx->picture+old_ctx->picture_count ?\
        &new_ctx->picture[pic - old_ctx->picture] : pic - (Picture*)old_ctx + (Picture*)new_ctx)\
    : NULL)

Definition at line 685 of file mpegvideo.h.

Referenced by copy_picture_range(), and ff_mpeg_update_thread_context().

#define SEQ_END_CODE   0x000001b7

Definition at line 70 of file mpegvideo.h.

Referenced by ff_mpeg1_find_frame_end(), and mpeg_decode_frame().

#define SEQ_START_CODE   0x000001b3

#define SLICE_END   -2

#define SLICE_ERROR   -1

Definition at line 656 of file mpegvideo.h.

Referenced by h261_decode_mb(), and rv10_decode_packet().

#define SLICE_MAX_START_CODE   0x000001af

Definition at line 75 of file mpegvideo.h.

#define SLICE_MIN_START_CODE   0x00000101

#define SLICE_NOEND   -3

no end marker or error found but mb count exceeded

Definition at line 658 of file mpegvideo.h.

Referenced by decode_slice(), and mpeg4_decode_partitioned_mb().

#define SLICE_OK   0

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

#define USER_START_CODE   0x000001b2

Definition at line 77 of file mpegvideo.h.

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

#define VP_START   1

current MB is the first after a resync marker

Definition at line 480 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 41 of file mpegvideo.h.


Function Documentation

int ff_alloc_picture ( MpegEncContext s,
Picture pic,
int  shared 
)

allocates a Picture The pixels are allocated/set by calling get_buffer() if shared=0

Definition at line 258 of file mpegvideo.c.

Referenced by load_input_picture(), MPV_frame_start(), and select_input_picture().

void ff_clean_intra_table_entries ( MpegEncContext s  ) 

cleans dc, ac, coded_block for the current non intra MB

Definition at line 1977 of file mpegvideo.c.

Referenced by encode_thread(), mpeg4_decode_partition_a(), and MPV_decode_mb_internal().

void ff_convert_matrix ( DSPContext dsp,
int(*)  qmat[64],
uint16_t(*)  qmat16[2][64],
const uint16_t *  quant_matrix,
int  bias,
int  qmin,
int  qmax,
int  intra 
)

Definition at line 63 of file mpegvideo_enc.c.

Referenced by dnxhd_init_qmat(), encode_picture(), and MPV_encode_init().

void ff_copy_picture ( Picture dst,
Picture src 
)

Definition at line 199 of file mpegvideo.c.

Referenced by decode_slice_header(), MPV_frame_start(), and select_input_picture().

int ff_dct_common_init ( MpegEncContext s  ) 

Definition at line 156 of file mpegvideo.c.

Referenced by dnxhd_encode_init(), ff_h263_decode_frame(), and MPV_common_init().

void ff_denoise_dct ( MpegEncContext s,
DCTELEM block 
)

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

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 occurred

Definition at line 728 of file error_resilience.c.

Referenced by decode_chunks(), decode_slice(), ff_intrax8_decode_picture(), ff_mpeg4_decode_partitions(), rv10_decode_packet(), rv34_decode_slice(), slice_decode_thread(), vc1_decode_b_blocks(), vc1_decode_i_blocks(), vc1_decode_i_blocks_adv(), vc1_decode_p_blocks(), and vc1_decode_skip_blocks().

void ff_er_frame_end ( MpegEncContext s  ) 

void ff_er_frame_start ( MpegEncContext s  ) 

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

Definition at line 1703 of file motion_est.c.

Referenced by estimate_motion_thread().

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

< the variance of the block (sum of squared (p[y][x]-average))

< sum of squared differences with the estimated motion vector

Definition at line 1013 of file motion_est.c.

Referenced by estimate_motion_thread(), and svq1_encode_plane().

const uint8_t* ff_find_start_code ( const uint8_t *  p,
const uint8_t *  end,
uint32_t *  state 
)

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 
)

Parameters:
truncate 1 for truncation, 0 for using intra

Definition at line 1972 of file motion_est.c.

Referenced by encode_picture(), and svq1_encode_plane().

void ff_fix_long_p_mvs ( MpegEncContext s  ) 

Definition at line 1921 of file motion_est.c.

Referenced by encode_picture(), and svq1_encode_plane().

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

Definition at line 1862 of file motion_est.c.

Referenced by encode_picture().

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  ) 

Definition at line 238 of file h261enc.c.

Referenced by MPV_encode_init().

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

Definition at line 156 of file h261enc.c.

Referenced by encode_mb_internal().

void ff_h261_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

Definition at line 52 of file h261enc.c.

Referenced by encode_picture().

int ff_h261_get_picture_format ( int  width,
int  height 
)

void ff_h261_loop_filter ( MpegEncContext s  ) 

Definition at line 36 of file h261.c.

Referenced by mpeg_motion_internal().

void ff_h261_reorder_mb_index ( MpegEncContext s  ) 

Definition at line 107 of file h261enc.c.

Referenced by encode_thread().

static int ff_h263_round_chroma ( int  x  )  [inline, static]

Definition at line 764 of file mpegvideo.h.

Referenced by chroma_4mv_motion(), chroma_4mv_motion_lowres(), and h263_mv4_search().

void ff_init_block_index ( MpegEncContext s  ) 

int ff_init_me ( MpegEncContext s  ) 

Definition at line 298 of file motion_est.c.

Referenced by encode_picture(), and svq1_encode_plane().

void ff_mpeg1_clean_buffers ( MpegEncContext s  ) 

Definition at line 126 of file mpeg12.c.

Referenced by encode_thread(), and mpeg_decode_slice().

void ff_mpeg1_encode_init ( MpegEncContext s  ) 

Definition at line 713 of file mpeg12enc.c.

Referenced by MPV_encode_init().

void ff_mpeg1_encode_slice_header ( MpegEncContext s  ) 

Definition at line 330 of file mpeg12enc.c.

Referenced by encode_thread(), and mpeg1_encode_picture_header().

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

Find 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 2210 of file mpeg12.c.

Referenced by mpeg_decode_frame(), and mpegvideo_parse().

void ff_mpeg_flush ( AVCodecContext avctx  ) 

Definition at line 2381 of file mpegvideo.c.

Referenced by flush(), and flush_dpb().

int ff_mpeg_update_thread_context ( AVCodecContext dst,
const AVCodecContext src 
)

Definition at line 463 of file mpegvideo.c.

Referenced by decode_update_thread_context(), and mpeg_decode_update_thread_context().

int ff_msmpeg4_decode_init ( AVCodecContext avctx  ) 

Definition at line 1262 of file msmpeg4.c.

Referenced by vc1_decode_init(), and wmv2_decode_init().

void ff_msmpeg4_encode_init ( MpegEncContext s  ) 

Referenced by MPV_encode_init().

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 
)

Definition at line 73 of file wmv2.c.

Referenced by MPV_motion_internal().

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

Definition at line 1259 of file motion_est.c.

Referenced by pre_estimate_motion_thread().

void ff_print_debug_info ( MpegEncContext s,
AVFrame pict 
)

prints debuging info for the given picture.

Definition at line 1320 of file mpegvideo.c.

Referenced by decode_frame(), ff_h263_decode_frame(), ff_rv34_decode_frame(), h261_decode_frame(), rv10_decode_frame(), slice_end(), and vc1_decode_frame().

void ff_release_unused_pictures ( MpegEncContext s,
int  remove_current 
)

Definition at line 952 of file mpegvideo.c.

Referenced by decode_slice_header(), and MPV_frame_start().

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 449 of file mpegvideo.c.

Referenced by decode_chunks(), and encode_picture().

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 59 of file wmv2.c.

Referenced by MPV_decode_mb_internal().

int ff_wmv2_decode_picture_header ( MpegEncContext s  ) 

Definition at line 114 of file wmv2dec.c.

Referenced by ff_h263_decode_frame().

int ff_wmv2_decode_secondary_picture_header ( MpegEncContext s  ) 

Definition at line 134 of file wmv2dec.c.

Referenced by ff_h263_decode_frame().

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

Definition at line 150 of file wmv2enc.c.

Referenced by encode_mb_internal().

int ff_wmv2_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

Definition at line 70 of file wmv2enc.c.

Referenced by encode_picture().

void ff_write_quant_matrix ( PutBitContext pb,
uint16_t *  matrix 
)

Definition at line 144 of file mpegvideo_enc.c.

Referenced by mpeg1_encode_sequence_header(), and mpeg4_encode_vol_header().

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

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

Definition at line 666 of file mpeg12enc.c.

Referenced by encode_mb_internal().

void mpeg1_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

Definition at line 341 of file mpeg12enc.c.

Referenced by encode_picture().

void MPV_common_end ( MpegEncContext s  ) 

int MPV_common_init ( MpegEncContext s  ) 

void MPV_common_init_altivec ( MpegEncContext s  ) 

Definition at line 572 of file mpegvideo_altivec.c.

Referenced by ff_dct_common_init().

void MPV_common_init_arm ( MpegEncContext s  ) 

Definition at line 41 of file mpegvideo_arm.c.

Referenced by ff_dct_common_init().

void MPV_common_init_axp ( MpegEncContext s  ) 

Definition at line 106 of file mpegvideo_alpha.c.

Referenced by ff_dct_common_init().

void MPV_common_init_bfin ( MpegEncContext s  ) 

Definition at line 144 of file mpegvideo_bfin.c.

Referenced by ff_dct_common_init().

void MPV_common_init_mlib ( MpegEncContext s  ) 

Definition at line 456 of file dsputil_mlib.c.

Referenced by ff_dct_common_init().

void MPV_common_init_mmi ( MpegEncContext s  ) 

Definition at line 83 of file mpegvideo_mmi.c.

Referenced by ff_dct_common_init().

void MPV_common_init_mmx ( MpegEncContext s  ) 

Definition at line 629 of file mpegvideo_mmx.c.

Referenced by ff_dct_common_init().

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 567 of file mpegvideo.c.

Referenced by ff_cavs_init(), ff_h263_decode_init(), ff_h264_decode_init(), ff_rv34_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] 
)

int MPV_encode_end ( AVCodecContext avctx  ) 

Definition at line 753 of file mpegvideo_enc.c.

int MPV_encode_init ( AVCodecContext avctx  ) 

Definition at line 242 of file mpegvideo_enc.c.

Referenced by encode_init(), and wmv2_encode_init().

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

Definition at line 1225 of file mpegvideo_enc.c.

void MPV_frame_end ( MpegEncContext s  ) 

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 1019 of file mpegvideo.c.

Referenced by ff_h263_decode_frame(), ff_h264_frame_start(), h261_decode_frame(), mpeg_field_start(), MPV_encode_picture(), rv10_decode_packet(), rv34_decode_slice(), svq1_decode_frame(), and vc1_decode_frame().

int MPV_lowest_referenced_row ( MpegEncContext s,
int  dir 
)

find the lowest MB row referenced in the MVs

Definition at line 1913 of file mpegvideo.c.

Referenced by MPV_decode_mb_internal().

void MPV_report_decode_progress ( MpegEncContext s  ) 

Definition at line 2643 of file mpegvideo.c.

Referenced by decode_slice(), and mpeg_decode_slice().

int msmpeg4_decode_ext_header ( MpegEncContext s,
int  buf_size 
)

Definition at line 1524 of file msmpeg4.c.

Referenced by ff_h263_decode_frame(), and msmpeg4_decode_picture_header().

int msmpeg4_decode_picture_header ( MpegEncContext s  ) 

Definition at line 1370 of file msmpeg4.c.

Referenced by ff_h263_decode_frame().

void msmpeg4_encode_ext_header ( MpegEncContext s  ) 

Referenced by encode_thread().

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

Referenced by encode_mb_internal().

void msmpeg4_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

Referenced by encode_picture().

void rv10_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

Definition at line 31 of file rv10enc.c.

Referenced by encode_picture().

void rv20_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

Definition at line 32 of file rv20enc.c.

Referenced by encode_picture().

int rv_decode_dc ( MpegEncContext s,
int  n 
)

Definition at line 185 of file rv10.c.

Referenced by h263_decode_block().


Variable Documentation

const uint8_t ff_aic_dc_scale_table[32]

const uint8_t ff_h263_chroma_qscale_table[32]

Definition at line 262 of file h263data.h.

Referenced by h263_decode_picture_header(), MPV_encode_init(), and rv10_decode_packet().

const uint8_t ff_h263_loop_filter_strength[32]

Definition at line 118 of file mpegvideo.c.

Referenced by decode_slice_header().

const uint8_t ff_mpeg1_dc_scale_table[128]

const uint8_t* const ff_mpeg2_dc_scale_table[4]

Definition at line 106 of file mpegvideo.c.

Referenced by encode_picture(), and ff_mpeg12_common_init().

Definition at line 113 of file mpegvideo.c.


Generated on Fri Oct 26 02:39:45 2012 for FFmpeg by  doxygen 1.5.8