52 int motion_x, motion_y;
57 motion_x = s->
mv[0][0][0];
58 motion_y = s->
mv[0][0][1];
61 motion_x = s->
mv[0][0][0] + s->
mv[0][1][0];
62 motion_y = s->
mv[0][0][1] + s->
mv[0][1][1];
63 motion_x = (motion_x>>1) | (motion_x&1);
102 x = 2 * s->
mb_x + (n & 1);
103 y = 2 * s->
mb_y + ((n & 2) >> 1);
110 dc_val = s->
dc_val[n - 4 + 1];
115 a = dc_val[(x - 1) + (y) *
wrap];
116 c = dc_val[(x) + (y - 1) *
wrap];
124 if (a != 1024 && c != 1024)
125 pred_dc = (a +
c) >> 1;
132 *dc_val_ptr = &dc_val[x + y *
wrap];
159 int qp_dt, qp_tt, qp_tc;
226 int16_t *dc_val, *ac_val, *ac_val1;
230 x = 2 * s->
mb_x + (n & 1);
231 y = 2 * s->
mb_y + (n>> 1);
240 dc_val = s->
dc_val[n - 4 + 1];
241 ac_val = s->
ac_val[n - 4 + 1][0];
245 ac_val += ((
y) * wrap + (x)) * 16;
251 a = dc_val[(x - 1) + (y) *
wrap];
252 c = dc_val[(x) + (y - 1) *
wrap];
283 if (a != 1024 && c != 1024)
284 pred_dc = (a +
c) >> 1;
292 block[0]=block[0]*scale +
pred_dc;
300 dc_val[(x) + (y) *
wrap] = block[0];
314 int16_t *
A, *
B, *
C, (*mot_val)[2];
315 static const int off[4]= {2, 1, 1, -1};
351 B = mot_val[ -
wrap];
360 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
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.