52 int level, uni_code, uni_len;
54 for(level=-256; level<256; level++){
65 l= (-
level) ^ ((1 << size) - 1);
72 uni_code ^= (1<<uni_len)-1;
75 uni_code<<=
size; uni_code|=l;
78 uni_code<<=1; uni_code|=1;
88 uni_code ^= (1<<uni_len)-1;
91 uni_code<<=
size; uni_code|=l;
94 uni_code<<=1; uni_code|=1;
106 static int initialized=0;
128 #if CONFIG_VC1_DECODER
190 return FASTDIV((sum + (scale>>1)), scale);
195 int16_t **dc_val_ptr,
int *dir_ptr)
214 b = dc_val[ - 1 -
wrap];
225 #if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE
227 "movl %3, %%eax \n\t"
228 "shrl $1, %%eax \n\t"
229 "addl %%eax, %2 \n\t"
230 "addl %%eax, %1 \n\t"
231 "addl %0, %%eax \n\t"
233 "movl %%edx, %0 \n\t"
234 "movl %1, %%eax \n\t"
236 "movl %%edx, %1 \n\t"
237 "movl %2, %%eax \n\t"
239 "movl %%edx, %2 \n\t"
240 :
"+b" (
a),
"+c" (b),
"+D" (c)
247 a = (a + (8 >> 1)) / 8;
248 b = (b + (8 >> 1)) / 8;
249 c = (c + (8 >> 1)) / 8;
251 a =
FASTDIV((a + (scale >> 1)), scale);
252 b =
FASTDIV((b + (scale >> 1)), scale);
253 c =
FASTDIV((c + (scale >> 1)), scale);
270 if (abs(a - b) < abs(b - c)) {
285 if(s->
mb_x==0) a= (1024 + (scale>>1))/scale;
286 else a=
get_dc(dest-8, wrap, scale*8);
287 if(s->
mb_y==0) c= (1024 + (scale>>1))/scale;
288 else c=
get_dc(dest-8*wrap, wrap, scale*8);
315 if (abs(a - b) < abs(b - c)) {
324 if (abs(a - b) <= abs(b - c)) {
334 *dc_val_ptr = &dc_val[0];
ScanTable intra_v_scantable
const uint8_t ff_mpeg4_c_dc_scale_table[32]
const uint8_t * y_dc_scale_table
qscale -> y_dc_scale table
uint32_t ff_v2_dc_lum_table[512][2]
uint32_t ff_v2_dc_chroma_table[512][2]
int msmpeg4_version
0=not msmpeg4, 1=mp41, 2=mp42, 3=mp43/divx3 4=wmv1/7 5=wmv2/8
av_cold void ff_msmpeg4_common_init(MpegEncContext *s)
const uint32_t ff_inverse[257]
const uint8_t ff_wmv3_dc_scale_table[32]
Picture current_picture
copy of the current picture structure.
const uint8_t ff_mpeg4_DCtab_chrom[13][2]
const uint8_t ff_wmv1_c_dc_scale_table[32]
int16_t * dc_val[3]
used for mpeg4 DC prediction, all 3 arrays must be continuous
Libavcodec external API header.
const uint8_t ff_mpeg4_DCtab_lum[13][2]
const uint8_t ff_wmv1_scantable[WMV1_SCANTABLE_COUNT][64]
int ff_msmpeg4_pred_dc(MpegEncContext *s, int n, int16_t **dc_val_ptr, int *dir_ptr)
const uint8_t ff_mpeg4_y_dc_scale_table[32]
uint8_t idct_permutation[64]
IDCT input permutation.
int block_index[6]
index to current MB in block based arrays with edges
static const float pred[4]
int first_slice_line
used in mpeg4 too to handle resync markers
ptrdiff_t linesize
line size, in bytes, may be different from width
ScanTable intra_scantable
uint8_t * coded_block
used for coded block pattern prediction (msmpeg4v3, wmv1)
const uint8_t ff_mpeg1_dc_scale_table[128]
ScanTable intra_h_scantable
ptrdiff_t uvlinesize
line size, for chroma in bytes, may be different from width
const uint8_t * c_dc_scale_table
qscale -> c_dc_scale table
int b8_stride
2*mb_width+1 used for some 8x8 block arrays to allow simple addressing
const uint8_t ff_wmv1_y_dc_scale_table[32]
av_cold void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable)
const uint8_t ff_old_ff_y_dc_scale_table[32]
int workaround_bugs
workaround bugs in encoders which cannot be detected automatically
ScanTable inter_scantable
if inter == intra then intra should be used to reduce tha cache usage
int ff_msmpeg4_coded_block_pred(MpegEncContext *s, int n, uint8_t **coded_block_ptr)
int h263_aic_dir
AIC direction: 0 = left, 1 = top.
static av_cold void init_h263_dc_for_msmpeg4(void)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int get_dc(uint8_t *src, int stride, int scale)