58 int motion_x, motion_y;
63 motion_x = s->
mv[0][0][0];
64 motion_y = s->
mv[0][0][1];
67 motion_x = s->
mv[0][0][0] + s->
mv[0][1][0];
68 motion_y = s->
mv[0][0][1] + s->
mv[0][1][1];
69 motion_x = (motion_x>>1) | (motion_x&1);
103 int x, y,
wrap,
a, c, pred_dc;
108 x = 2 * s->
mb_x + (n & 1);
109 y = 2 * s->
mb_y + ((n & 2) >> 1);
116 dc_val = s->
dc_val[n - 4 + 1];
121 a = dc_val[(x - 1) + (y) *
wrap];
122 c = dc_val[(x) + (y - 1) *
wrap];
130 if (a != 1024 && c != 1024)
131 pred_dc = (a + c) >> 1;
138 *dc_val_ptr = &dc_val[x + y *
wrap];
165 int qp_dt, qp_tt, qp_tc;
232 int16_t *dc_val, *ac_val, *ac_val1;
236 x = 2 * s->
mb_x + (n & 1);
237 y = 2 * s->
mb_y + (n>> 1);
246 dc_val = s->
dc_val[n - 4 + 1];
247 ac_val = s->
ac_val[n - 4 + 1][0];
251 ac_val += ((y) * wrap + (x)) * 16;
257 a = dc_val[(x - 1) + (y) *
wrap];
258 c = dc_val[(x) + (y - 1) *
wrap];
289 if (a != 1024 && c != 1024)
290 pred_dc = (a + c) >> 1;
298 block[0]=block[0]*scale + pred_dc;
306 dc_val[(x) + (y) *
wrap] = block[0];
320 int16_t *
A, *
B, *C, (*mot_val)[2];
321 static const int off[4]= {2, 1, 1, -1};
357 B = mot_val[ -
wrap];
366 B = mot_val[ -
wrap];
381 else if (s->
height <= 800)
int16_t(*[3] ac_val)[16]
used for 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.
uint8_t idct_permutation[64]
idct input permutation.
int ff_h263_pred_dc(MpegEncContext *s, int n, int16_t **dc_val_ptr)
int mb_height
number of MBs horizontally & vertically
void(* h263_h_loop_filter)(uint8_t *src, int stride, int qscale)
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.
int resync_mb_x
x position of last resync marker
void ff_h263_loop_filter(MpegEncContext *s)
int ff_h263_get_gob_height(MpegEncContext *s)
Get the GOB height based on picture height.
int block_index[6]
index to current MB in block based arrays with edges
uint32_t * mb_type
macroblock type table mb_type_base + mb_width + 2
#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)
uint8_t ff_h263_static_rl_table_store[2][2][2 *MAX_RUN+MAX_LEVEL+3]
int height
picture size. must be a multiple of 16
int16_t(*[2] motion_val)[2]
motion vector table
int8_t * ref_index[2]
motion reference frame index the order in which these are stored can depend on the codec...
DSPContext dsp
pointers for accelerated dsp functions
void(* h263_v_loop_filter)(uint8_t *src, int stride, int qscale)
int h263_pred
use mpeg4/h263 ac/dc predictions
static const uint16_t scale[4]
int8_t * qscale_table
QP table.
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
void ff_h263_pred_acdc(MpegEncContext *s, DCTELEM *block, int n)
int mb_stride
mb_width+1 used for some arrays to allow simple addressing of left & top MBs without sig11 ...
const uint8_t * chroma_qscale_table
qscale -> chroma_qscale (h263)
int linesize
line size, in bytes, may be different from width
uint8_t * mbskip_table
mbskip_table[mb]>=1 if MB didn't change stride= mb_width = (width+15)>>4
#define MV_TYPE_8X8
4 vectors (h263, mpeg4 4MV)
int h263_aic_dir
AIC direction: 0 = left, 1 = top.
int uvlinesize
line size, for chroma in bytes, may be different from width