54 int motion_x, motion_y;
59 motion_x = s->
mv[0][0][0];
60 motion_y = s->
mv[0][0][1];
63 motion_x = s->
mv[0][0][0] + s->
mv[0][1][0];
64 motion_y = s->
mv[0][0][1] + s->
mv[0][1][1];
65 motion_x = (motion_x>>1) | (motion_x&1);
104 x = 2 * s->
mb_x + (n & 1);
105 y = 2 * s->
mb_y + ((n & 2) >> 1);
112 dc_val = s->
dc_val[n - 4 + 1];
117 a = dc_val[(x - 1) + (y) *
wrap];
118 c = dc_val[(x) + (y - 1) *
wrap];
126 if (a != 1024 && c != 1024)
127 pred_dc = (a +
c) >> 1;
134 *dc_val_ptr = &dc_val[x + y *
wrap];
161 int qp_dt, qp_tt, qp_tc;
228 int16_t *dc_val, *ac_val, *ac_val1;
232 x = 2 * s->
mb_x + (n & 1);
233 y = 2 * s->
mb_y + (n>> 1);
242 dc_val = s->
dc_val[n - 4 + 1];
243 ac_val = s->
ac_val[n - 4 + 1][0];
247 ac_val += ((
y) * wrap + (x)) * 16;
253 a = dc_val[(x - 1) + (y) *
wrap];
254 c = dc_val[(x) + (y - 1) *
wrap];
285 if (a != 1024 && c != 1024)
286 pred_dc = (a +
c) >> 1;
294 block[0]=block[0]*scale +
pred_dc;
302 dc_val[(x) + (y) *
wrap] = block[0];
316 int16_t *
A, *
B, *
C, (*mot_val)[2];
317 static const int off[4]= {2, 1, 1, -1};
353 B = mot_val[ -
wrap];
362 B = mot_val[ -
wrap];
377 else if (s->
height <= 800)
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.
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.
Libavcodec external API header.
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.
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)
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]
int height
picture size. must be a multiple of 16
ptrdiff_t uvlinesize
line size, for chroma in bytes, may be different from width
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]
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)
const uint8_t * chroma_qscale_table
qscale -> chroma_qscale (h263)
#define MV_TYPE_8X8
4 vectors (h263, mpeg4 4MV)
int h263_aic_dir
AIC direction: 0 = left, 1 = top.