55 int motion_x, motion_y;
60 motion_x = s->
mv[0][0][0];
61 motion_y = s->
mv[0][0][1];
64 motion_x = s->
mv[0][0][0] + s->
mv[0][1][0];
65 motion_y = s->
mv[0][0][1] + s->
mv[0][1][1];
66 motion_x = (motion_x>>1) | (motion_x&1);
105 x = 2 * s->
mb_x + (n & 1);
106 y = 2 * s->
mb_y + ((n & 2) >> 1);
113 dc_val = s->
dc_val[n - 4 + 1];
118 a = dc_val[(x - 1) + (y) *
wrap];
119 c = dc_val[(x) + (y - 1) *
wrap];
127 if (a != 1024 && c != 1024)
128 pred_dc = (a +
c) >> 1;
135 *dc_val_ptr = &dc_val[x + y *
wrap];
162 int qp_dt, qp_tt, qp_tc;
229 int16_t *dc_val, *ac_val, *ac_val1;
233 x = 2 * s->
mb_x + (n & 1);
234 y = 2 * s->
mb_y + (n>> 1);
243 dc_val = s->
dc_val[n - 4 + 1];
244 ac_val = s->
ac_val[n - 4 + 1][0];
248 ac_val += ((
y) * wrap + (x)) * 16;
254 a = dc_val[(x - 1) + (y) *
wrap];
255 c = dc_val[(x) + (y - 1) *
wrap];
286 if (a != 1024 && c != 1024)
287 pred_dc = (a +
c) >> 1;
295 block[0]=block[0]*scale +
pred_dc;
303 dc_val[(x) + (y) *
wrap] = block[0];
317 int16_t *
A, *
B, *
C, (*mot_val)[2];
318 static const int off[4]= {2, 1, 1, -1};
354 B = mot_val[ -
wrap];
363 B = mot_val[ -
wrap];
int16_t(*[3] ac_val)[16]
used for mpeg4 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 mpeg4 DC prediction, all 3 arrays must be continuous
int mb_skipped
MUST BE SET only during DECODING.
Libavcodec external API header.
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 mpeg4 too to handle resync markers
void ff_h263_update_motion_val(MpegEncContext *s)
ptrdiff_t linesize
line size, in bytes, may be different from width
uint8_t ff_h263_static_rl_table_store[2][2][2 *MAX_RUN+MAX_LEVEL+3]
ptrdiff_t uvlinesize
line size, for chroma in bytes, may be different from width
int h263_pred
use mpeg4/h263 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 (h263)
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 (h263, mpeg4 4MV)
int h263_aic_dir
AIC direction: 0 = left, 1 = top.