51 int motion_x, motion_y;
56 motion_x = s->
mv[0][0][0];
57 motion_y = s->
mv[0][0][1];
60 motion_x = s->
mv[0][0][0] + s->
mv[0][1][0];
61 motion_y = s->
mv[0][0][1] + s->
mv[0][1][1];
62 motion_x = (motion_x>>1) | (motion_x&1);
101 x = 2 * s->
mb_x + (n & 1);
102 y = 2 * s->
mb_y + ((n & 2) >> 1);
109 dc_val = s->
dc_val[n - 4 + 1];
114 a = dc_val[(x - 1) + (y) *
wrap];
115 c = dc_val[(x) + (y - 1) *
wrap];
123 if (a != 1024 && c != 1024)
124 pred_dc = (a +
c) >> 1;
131 *dc_val_ptr = &dc_val[x + y *
wrap];
156 int qp_dt, qp_tt, qp_tc;
223 int16_t *dc_val, *ac_val, *ac_val1;
227 x = 2 * s->
mb_x + (n & 1);
228 y = 2 * s->
mb_y + (n>> 1);
237 dc_val = s->
dc_val[n - 4 + 1];
238 ac_val = s->
ac_val[n - 4 + 1][0];
242 ac_val += ((y) * wrap + (x)) * 16;
248 a = dc_val[(x - 1) + (y) *
wrap];
249 c = dc_val[(x) + (y - 1) *
wrap];
280 if (a != 1024 && c != 1024)
281 pred_dc = (a +
c) >> 1;
289 block[0]=block[0]*scale +
pred_dc;
297 dc_val[(x) + (y) *
wrap] = block[0];
311 int16_t *
A, *
B, *
C, (*mot_val)[2];
312 static const int off[4]= {2, 1, 1, -1};
348 B = mot_val[ -
wrap];
357 B = mot_val[ -
wrap];
int16_t(*[3] ac_val)[16]
used for MPEG-4 AC prediction, all 3 arrays must be continuous
int16_t(*[2][2] p_field_mv_table)[2]
MV table (2MV per MB) interlaced P-frame encoding.
int16_t * ff_h263_pred_motion(MpegEncContext *s, int block, int dir, int *px, int *py)
int encoding
true if we are encoding (vs decoding)
Picture current_picture
copy of the current picture structure.
int ff_h263_pred_dc(MpegEncContext *s, int n, int16_t **dc_val_ptr)
int mb_height
number of MBs horizontally & vertically
int16_t * dc_val[3]
used for MPEG-4 DC prediction, all 3 arrays must be continuous
int mb_skipped
MUST BE SET only during DECODING.
int resync_mb_x
x position of last resync marker
void ff_h263_loop_filter(MpegEncContext *s)
int16_t(*[2] motion_val)[2]
static void FUNC() pred_dc(uint8_t *_src, const uint8_t *_top, const uint8_t *_left, ptrdiff_t stride, int log2_size, int c_idx)
uint8_t idct_permutation[64]
IDCT input permutation.
int block_index[6]
index to current MB in block based arrays with edges
#define MV_TYPE_16X16
1 vector for the whole mb
int first_slice_line
used in MPEG-4 too to handle resync markers
Libavcodec external API header.
void ff_h263_update_motion_val(MpegEncContext *s)
ptrdiff_t linesize
line size, in bytes, may be different from width
ptrdiff_t uvlinesize
line size, for chroma in bytes, may be different from width
int h263_pred
use MPEG-4/H.263 ac/dc predictions
int mv[2][4][2]
motion vectors for a macroblock first coordinate : 0 = forward 1 = backward second " : depend...
int b8_stride
2*mb_width+1 used for some 8x8 block arrays to allow simple addressing
int mb_stride
mb_width+1 used for some arrays to allow simple addressing of left & top MBs without sig11 ...
void ff_h263_pred_acdc(MpegEncContext *s, int16_t *block, int n)
void(* h263_v_loop_filter)(uint8_t *src, int stride, int qscale)
const uint8_t * chroma_qscale_table
qscale -> chroma_qscale (H.263)
void(* h263_h_loop_filter)(uint8_t *src, int stride, int qscale)
uint32_t * mb_type
types and macros are defined in mpegutils.h
#define MV_TYPE_8X8
4 vectors (H.263, MPEG-4 4MV)
int h263_aic_dir
AIC direction: 0 = left, 1 = top.