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

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

Include dependency graph for mpegvideo.c:

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]


Detailed Description

The simplest mpeg encoder (well, it was the simplest!).

Definition in file mpegvideo.c.


Define Documentation

#define COLOR ( theta,
r   ) 

Value:

u= (int)(128 + r*cos(theta*3.141592/180));\
v= (int)(128 + r*sin(theta*3.141592/180));

Referenced by ff_print_debug_info().

#define CONST_BITS   14

Definition at line 81 of file mpegvideo.c.

#define COPY ( a   )     dst->a= src->a

#define COPY ( a   )     bak->a= src->a

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

#define OBMC_FILTER4 ( x,
t,
l,
m,
r,
b   ) 

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


Function Documentation

static void add_dct ( MpegEncContext s,
DCTELEM block,
int  i,
uint8_t *  dest,
int  line_size 
) [inline, static]

static void add_dequant_dct ( MpegEncContext s,
DCTELEM block,
int  i,
uint8_t *  dest,
int  line_size,
int  qscale 
) [inline, static]

static int alloc_picture ( MpegEncContext s,
Picture pic,
int  shared 
) [static]

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]

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]

static void copy_picture ( Picture dst,
Picture src 
) [static]

Definition at line 290 of file mpegvideo.c.

References FF_BUFFER_TYPE_COPY.

static void copy_picture_attributes ( MpegEncContext s,
AVFrame dst,
AVFrame src 
) [static]

int DCT_common_init ( MpegEncContext s  ) 

static void dct_unquantize_h263_inter_c ( MpegEncContext s,
DCTELEM block,
int  n,
int  qscale 
) [static]

static void dct_unquantize_h263_intra_c ( MpegEncContext s,
DCTELEM block,
int  n,
int  qscale 
) [static]

static void dct_unquantize_mpeg1_inter_c ( MpegEncContext s,
DCTELEM block,
int  n,
int  qscale 
) [static]

static void dct_unquantize_mpeg1_intra_c ( MpegEncContext s,
DCTELEM block,
int  n,
int  qscale 
) [static]

static void dct_unquantize_mpeg2_inter_c ( MpegEncContext s,
DCTELEM block,
int  n,
int  qscale 
) [static]

static void dct_unquantize_mpeg2_intra_c ( MpegEncContext s,
DCTELEM block,
int  n,
int  qscale 
) [static]

static void denoise_dct_c ( MpegEncContext s,
DCTELEM block 
) [static]

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

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

Here is the call graph for this function:

static void draw_edges_c ( uint8_t *  buf,
int  wrap,
int  width,
int  height,
int  w 
) [static]

Definition at line 1386 of file mpegvideo.c.

References memcpy.

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

Parameters:
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.

References ABS, and t.

Referenced by draw_arrow().

void ff_clean_intra_table_entries ( MpegEncContext s  ) 

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_find_unused_picture ( MpegEncContext s,
int  shared 
)

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  ) 

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

void ff_mpeg_flush ( AVCodecContext avctx  ) 

void ff_print_debug_info ( MpegEncContext s,
AVFrame pict 
)

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:

static void free_duplicate_context ( MpegEncContext s  )  [static]

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

Here is the call graph for this function:

static void gmc1_motion ( MpegEncContext s,
uint8_t *  dest_y,
uint8_t *  dest_cb,
uint8_t *  dest_cr,
uint8_t **  ref_picture 
) [inline, static]

static void gmc_motion ( MpegEncContext s,
uint8_t *  dest_y,
uint8_t *  dest_cb,
uint8_t *  dest_cr,
uint8_t **  ref_picture 
) [inline, static]

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]

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]

static int init_duplicate_context ( MpegEncContext s,
MpegEncContext base 
) [static]

void init_rl ( RLTable rl,
int  use_static 
)

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]

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]

static void MPV_common_defaults ( MpegEncContext s  )  [static]

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:

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

Here is the call graph for this function:

void MPV_frame_end ( MpegEncContext s  ) 

int MPV_frame_start ( MpegEncContext s,
AVCodecContext avctx 
)

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

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

Here is the call graph for this function:

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

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

Here is the call graph for this function:

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]

static void put_dct ( MpegEncContext s,
DCTELEM block,
int  i,
uint8_t *  dest,
int  line_size,
int  qscale 
) [inline, static]

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]

static void update_duplicate_context_after_me ( MpegEncContext dst,
MpegEncContext src 
) [static]

Definition at line 534 of file mpegvideo.c.

References COPY.

static void update_noise_reduction ( MpegEncContext s  )  [static]


Variable Documentation

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

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


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