mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
msmpeg4: Add ff_ prefixes to nonstatic symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
35e02a3d0e
commit
1fec055066
@ -696,9 +696,9 @@ av_cold void ff_intrax8_common_init(IntraX8Context * w, MpegEncContext * const s
|
||||
assert(s->mb_width>0);
|
||||
w->prediction_table=av_mallocz(s->mb_width*2*2);//two rows, 2 blocks per cannon mb
|
||||
|
||||
ff_init_scantable(s->dsp.idct_permutation, &w->scantable[0], wmv1_scantable[0]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &w->scantable[1], wmv1_scantable[2]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &w->scantable[2], wmv1_scantable[3]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &w->scantable[0], ff_wmv1_scantable[0]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &w->scantable[1], ff_wmv1_scantable[2]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &w->scantable[2], ff_wmv1_scantable[3]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -138,8 +138,8 @@ static av_cold void common_init(MpegEncContext * s)
|
||||
break;
|
||||
case 3:
|
||||
if(s->workaround_bugs){
|
||||
s->y_dc_scale_table= old_ff_y_dc_scale_table;
|
||||
s->c_dc_scale_table= wmv1_c_dc_scale_table;
|
||||
s->y_dc_scale_table= ff_old_ff_y_dc_scale_table;
|
||||
s->c_dc_scale_table= ff_wmv1_c_dc_scale_table;
|
||||
} else{
|
||||
s->y_dc_scale_table= ff_mpeg4_y_dc_scale_table;
|
||||
s->c_dc_scale_table= ff_mpeg4_c_dc_scale_table;
|
||||
@ -147,8 +147,8 @@ static av_cold void common_init(MpegEncContext * s)
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
s->y_dc_scale_table= wmv1_y_dc_scale_table;
|
||||
s->c_dc_scale_table= wmv1_c_dc_scale_table;
|
||||
s->y_dc_scale_table= ff_wmv1_y_dc_scale_table;
|
||||
s->c_dc_scale_table= ff_wmv1_c_dc_scale_table;
|
||||
break;
|
||||
#if CONFIG_VC1_DECODER
|
||||
case 6:
|
||||
@ -161,10 +161,10 @@ static av_cold void common_init(MpegEncContext * s)
|
||||
|
||||
|
||||
if(s->msmpeg4_version>=4){
|
||||
ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable , wmv1_scantable[1]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &s->intra_h_scantable, wmv1_scantable[2]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, wmv1_scantable[3]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable , wmv1_scantable[0]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable , ff_wmv1_scantable[1]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &s->intra_h_scantable, ff_wmv1_scantable[2]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, ff_wmv1_scantable[3]);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable , ff_wmv1_scantable[0]);
|
||||
}
|
||||
//Note the default tables are set in common_init in mpegvideo.c
|
||||
|
||||
@ -259,10 +259,10 @@ av_cold void ff_msmpeg4_encode_init(MpegEncContext *s)
|
||||
if (!init_done) {
|
||||
/* init various encoding tables */
|
||||
init_done = 1;
|
||||
init_mv_table(&mv_tables[0]);
|
||||
init_mv_table(&mv_tables[1]);
|
||||
init_mv_table(&ff_mv_tables[0]);
|
||||
init_mv_table(&ff_mv_tables[1]);
|
||||
for(i=0;i<NB_RL_TABLES;i++)
|
||||
ff_init_rl(&rl_table[i], static_rl_table_store[i]);
|
||||
ff_init_rl(&ff_rl_table[i], static_rl_table_store[i]);
|
||||
|
||||
for(i=0; i<NB_RL_TABLES; i++){
|
||||
int level;
|
||||
@ -271,7 +271,7 @@ av_cold void ff_msmpeg4_encode_init(MpegEncContext *s)
|
||||
for(run=0; run<=MAX_RUN; run++){
|
||||
int last;
|
||||
for(last=0; last<2; last++){
|
||||
rl_length[i][level][run][last]= get_size_of_code(s, &rl_table[ i], last, run, level, 0);
|
||||
rl_length[i][level][run][last]= get_size_of_code(s, &ff_rl_table[ i], last, run, level, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -474,7 +474,7 @@ void ff_msmpeg4_encode_motion(MpegEncContext * s,
|
||||
(unsigned)my >= 64)
|
||||
av_log(s->avctx, AV_LOG_ERROR, "error mx=%d my=%d\n", mx, my);
|
||||
#endif
|
||||
mv = &mv_tables[s->mv_table_index];
|
||||
mv = &ff_mv_tables[s->mv_table_index];
|
||||
|
||||
code = mv->table_mv_index[(mx << 6) | my];
|
||||
put_bits(&s->pb,
|
||||
@ -564,8 +564,8 @@ void msmpeg4_encode_mb(MpegEncContext * s,
|
||||
|
||||
if(s->msmpeg4_version<=2){
|
||||
put_bits(&s->pb,
|
||||
v2_mb_type[cbp&3][1],
|
||||
v2_mb_type[cbp&3][0]);
|
||||
ff_v2_mb_type[cbp&3][1],
|
||||
ff_v2_mb_type[cbp&3][0]);
|
||||
if((cbp&3) != 3) coded_cbp= cbp ^ 0x3C;
|
||||
else coded_cbp= cbp;
|
||||
|
||||
@ -580,8 +580,8 @@ void msmpeg4_encode_mb(MpegEncContext * s,
|
||||
msmpeg4v2_encode_motion(s, motion_y - pred_y);
|
||||
}else{
|
||||
put_bits(&s->pb,
|
||||
table_mb_non_intra[cbp + 64][1],
|
||||
table_mb_non_intra[cbp + 64][0]);
|
||||
ff_table_mb_non_intra[cbp + 64][1],
|
||||
ff_table_mb_non_intra[cbp + 64][0]);
|
||||
|
||||
s->misc_bits += get_bits_diff(s);
|
||||
|
||||
@ -617,13 +617,13 @@ void msmpeg4_encode_mb(MpegEncContext * s,
|
||||
if(s->msmpeg4_version<=2){
|
||||
if (s->pict_type == AV_PICTURE_TYPE_I) {
|
||||
put_bits(&s->pb,
|
||||
v2_intra_cbpc[cbp&3][1], v2_intra_cbpc[cbp&3][0]);
|
||||
ff_v2_intra_cbpc[cbp&3][1], ff_v2_intra_cbpc[cbp&3][0]);
|
||||
} else {
|
||||
if (s->use_skip_mb_code)
|
||||
put_bits(&s->pb, 1, 0); /* mb coded */
|
||||
put_bits(&s->pb,
|
||||
v2_mb_type[(cbp&3) + 4][1],
|
||||
v2_mb_type[(cbp&3) + 4][0]);
|
||||
ff_v2_mb_type[(cbp&3) + 4][1],
|
||||
ff_v2_mb_type[(cbp&3) + 4][0]);
|
||||
}
|
||||
put_bits(&s->pb, 1, 0); /* no AC prediction yet */
|
||||
put_bits(&s->pb,
|
||||
@ -637,13 +637,13 @@ void msmpeg4_encode_mb(MpegEncContext * s,
|
||||
if (s->use_skip_mb_code)
|
||||
put_bits(&s->pb, 1, 0); /* mb coded */
|
||||
put_bits(&s->pb,
|
||||
table_mb_non_intra[cbp][1],
|
||||
table_mb_non_intra[cbp][0]);
|
||||
ff_table_mb_non_intra[cbp][1],
|
||||
ff_table_mb_non_intra[cbp][0]);
|
||||
}
|
||||
put_bits(&s->pb, 1, 0); /* no AC prediction yet */
|
||||
if(s->inter_intra_pred){
|
||||
s->h263_aic_dir=0;
|
||||
put_bits(&s->pb, table_inter_intra[s->h263_aic_dir][1], table_inter_intra[s->h263_aic_dir][0]);
|
||||
put_bits(&s->pb, ff_table_inter_intra[s->h263_aic_dir][1], ff_table_inter_intra[s->h263_aic_dir][0]);
|
||||
}
|
||||
}
|
||||
s->misc_bits += get_bits_diff(s);
|
||||
@ -927,15 +927,15 @@ void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n)
|
||||
msmpeg4_encode_dc(s, block[0], n, &dc_pred_dir);
|
||||
i = 1;
|
||||
if (n < 4) {
|
||||
rl = &rl_table[s->rl_table_index];
|
||||
rl = &ff_rl_table[s->rl_table_index];
|
||||
} else {
|
||||
rl = &rl_table[3 + s->rl_chroma_table_index];
|
||||
rl = &ff_rl_table[3 + s->rl_chroma_table_index];
|
||||
}
|
||||
run_diff = s->msmpeg4_version>=4;
|
||||
scantable= s->intra_scantable.permutated;
|
||||
} else {
|
||||
i = 0;
|
||||
rl = &rl_table[3 + s->rl_table_index];
|
||||
rl = &ff_rl_table[3 + s->rl_table_index];
|
||||
if(s->msmpeg4_version<=2)
|
||||
run_diff = 0;
|
||||
else
|
||||
@ -1271,20 +1271,20 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
|
||||
done = 1;
|
||||
|
||||
for(i=0;i<NB_RL_TABLES;i++) {
|
||||
ff_init_rl(&rl_table[i], static_rl_table_store[i]);
|
||||
ff_init_rl(&ff_rl_table[i], static_rl_table_store[i]);
|
||||
}
|
||||
INIT_VLC_RL(rl_table[0], 642);
|
||||
INIT_VLC_RL(rl_table[1], 1104);
|
||||
INIT_VLC_RL(rl_table[2], 554);
|
||||
INIT_VLC_RL(rl_table[3], 940);
|
||||
INIT_VLC_RL(rl_table[4], 962);
|
||||
INIT_VLC_RL(rl_table[5], 554);
|
||||
INIT_VLC_RL(ff_rl_table[0], 642);
|
||||
INIT_VLC_RL(ff_rl_table[1], 1104);
|
||||
INIT_VLC_RL(ff_rl_table[2], 554);
|
||||
INIT_VLC_RL(ff_rl_table[3], 940);
|
||||
INIT_VLC_RL(ff_rl_table[4], 962);
|
||||
INIT_VLC_RL(ff_rl_table[5], 554);
|
||||
|
||||
mv = &mv_tables[0];
|
||||
mv = &ff_mv_tables[0];
|
||||
INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, mv->n + 1,
|
||||
mv->table_mv_bits, 1, 1,
|
||||
mv->table_mv_code, 2, 2, 3714);
|
||||
mv = &mv_tables[1];
|
||||
mv = &ff_mv_tables[1];
|
||||
INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, mv->n + 1,
|
||||
mv->table_mv_bits, 1, 1,
|
||||
mv->table_mv_code, 2, 2, 2694);
|
||||
@ -1310,35 +1310,35 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
|
||||
&v2_dc_chroma_table[0][0], 8, 4, 1506);
|
||||
|
||||
INIT_VLC_STATIC(&v2_intra_cbpc_vlc, V2_INTRA_CBPC_VLC_BITS, 4,
|
||||
&v2_intra_cbpc[0][1], 2, 1,
|
||||
&v2_intra_cbpc[0][0], 2, 1, 8);
|
||||
&ff_v2_intra_cbpc[0][1], 2, 1,
|
||||
&ff_v2_intra_cbpc[0][0], 2, 1, 8);
|
||||
INIT_VLC_STATIC(&v2_mb_type_vlc, V2_MB_TYPE_VLC_BITS, 8,
|
||||
&v2_mb_type[0][1], 2, 1,
|
||||
&v2_mb_type[0][0], 2, 1, 128);
|
||||
&ff_v2_mb_type[0][1], 2, 1,
|
||||
&ff_v2_mb_type[0][0], 2, 1, 128);
|
||||
INIT_VLC_STATIC(&v2_mv_vlc, V2_MV_VLC_BITS, 33,
|
||||
&ff_mvtab[0][1], 2, 1,
|
||||
&ff_mvtab[0][0], 2, 1, 538);
|
||||
|
||||
INIT_VLC_STATIC(&ff_mb_non_intra_vlc[0], MB_NON_INTRA_VLC_BITS, 128,
|
||||
&wmv2_inter_table[0][0][1], 8, 4,
|
||||
&wmv2_inter_table[0][0][0], 8, 4, 1636);
|
||||
&ff_wmv2_inter_table[0][0][1], 8, 4,
|
||||
&ff_wmv2_inter_table[0][0][0], 8, 4, 1636);
|
||||
INIT_VLC_STATIC(&ff_mb_non_intra_vlc[1], MB_NON_INTRA_VLC_BITS, 128,
|
||||
&wmv2_inter_table[1][0][1], 8, 4,
|
||||
&wmv2_inter_table[1][0][0], 8, 4, 2648);
|
||||
&ff_wmv2_inter_table[1][0][1], 8, 4,
|
||||
&ff_wmv2_inter_table[1][0][0], 8, 4, 2648);
|
||||
INIT_VLC_STATIC(&ff_mb_non_intra_vlc[2], MB_NON_INTRA_VLC_BITS, 128,
|
||||
&wmv2_inter_table[2][0][1], 8, 4,
|
||||
&wmv2_inter_table[2][0][0], 8, 4, 1532);
|
||||
&ff_wmv2_inter_table[2][0][1], 8, 4,
|
||||
&ff_wmv2_inter_table[2][0][0], 8, 4, 1532);
|
||||
INIT_VLC_STATIC(&ff_mb_non_intra_vlc[3], MB_NON_INTRA_VLC_BITS, 128,
|
||||
&wmv2_inter_table[3][0][1], 8, 4,
|
||||
&wmv2_inter_table[3][0][0], 8, 4, 2488);
|
||||
&ff_wmv2_inter_table[3][0][1], 8, 4,
|
||||
&ff_wmv2_inter_table[3][0][0], 8, 4, 2488);
|
||||
|
||||
INIT_VLC_STATIC(&ff_msmp4_mb_i_vlc, MB_INTRA_VLC_BITS, 64,
|
||||
&ff_msmp4_mb_i_table[0][1], 4, 2,
|
||||
&ff_msmp4_mb_i_table[0][0], 4, 2, 536);
|
||||
|
||||
INIT_VLC_STATIC(&ff_inter_intra_vlc, INTER_INTRA_VLC_BITS, 4,
|
||||
&table_inter_intra[0][1], 2, 1,
|
||||
&table_inter_intra[0][0], 2, 1, 8);
|
||||
&ff_table_inter_intra[0][1], 2, 1,
|
||||
&ff_table_inter_intra[0][0], 2, 1, 8);
|
||||
}
|
||||
|
||||
switch(s->msmpeg4_version){
|
||||
@ -1627,13 +1627,13 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
|
||||
else return -1;
|
||||
}
|
||||
if (n < 4) {
|
||||
rl = &rl_table[s->rl_table_index];
|
||||
rl = &ff_rl_table[s->rl_table_index];
|
||||
if(level > 256*s->y_dc_scale){
|
||||
av_log(s->avctx, AV_LOG_ERROR, "dc overflow+ L qscale: %d//\n", s->qscale);
|
||||
if(!s->inter_intra_pred) return -1;
|
||||
}
|
||||
} else {
|
||||
rl = &rl_table[3 + s->rl_chroma_table_index];
|
||||
rl = &ff_rl_table[3 + s->rl_chroma_table_index];
|
||||
if(level > 256*s->c_dc_scale){
|
||||
av_log(s->avctx, AV_LOG_ERROR, "dc overflow+ C qscale: %d//\n", s->qscale);
|
||||
if(!s->inter_intra_pred) return -1;
|
||||
@ -1659,7 +1659,7 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
|
||||
qmul = s->qscale << 1;
|
||||
qadd = (s->qscale - 1) | 1;
|
||||
i = -1;
|
||||
rl = &rl_table[3 + s->rl_table_index];
|
||||
rl = &ff_rl_table[3 + s->rl_table_index];
|
||||
|
||||
if(s->msmpeg4_version==2)
|
||||
run_diff = 0;
|
||||
@ -1846,7 +1846,7 @@ int ff_msmpeg4_decode_motion(MpegEncContext * s,
|
||||
MVTable *mv;
|
||||
int code, mx, my;
|
||||
|
||||
mv = &mv_tables[s->mv_table_index];
|
||||
mv = &ff_mv_tables[s->mv_table_index];
|
||||
|
||||
code = get_vlc2(&s->gb, mv->vlc.table, MV_VLC_BITS, 2);
|
||||
if (code < 0){
|
||||
|
@ -54,7 +54,7 @@ const uint16_t ff_msmp4_mb_i_table[64][2] = {
|
||||
};
|
||||
|
||||
/* non intra picture macroblock coded block pattern + mb type */
|
||||
const uint32_t table_mb_non_intra[128][2] = {
|
||||
const uint32_t ff_table_mb_non_intra[128][2] = {
|
||||
{ 0x40, 7 },{ 0x13c9, 13 },{ 0x9fd, 12 },{ 0x1fc, 15 },
|
||||
{ 0x9fc, 12 },{ 0xa83, 18 },{ 0x12d34, 17 },{ 0x83bc, 16 },
|
||||
{ 0x83a, 12 },{ 0x7f8, 17 },{ 0x3fd, 16 },{ 0x3ff, 16 },
|
||||
@ -600,7 +600,7 @@ extern const uint16_t ff_mpeg4_intra_vlc[103][2];
|
||||
extern const int8_t ff_mpeg4_intra_level[102];
|
||||
extern const int8_t ff_mpeg4_intra_run[102];
|
||||
|
||||
RLTable rl_table[NB_RL_TABLES] = {
|
||||
RLTable ff_rl_table[NB_RL_TABLES] = {
|
||||
/* intra luminance tables */
|
||||
/* low motion */
|
||||
{
|
||||
@ -1784,7 +1784,7 @@ static const uint8_t table1_mvy[1099] = {
|
||||
34, 28, 21,
|
||||
};
|
||||
|
||||
MVTable mv_tables[2] = {
|
||||
MVTable ff_mv_tables[2] = {
|
||||
{
|
||||
1099,
|
||||
table0_mv_code,
|
||||
@ -1801,30 +1801,30 @@ MVTable mv_tables[2] = {
|
||||
}
|
||||
};
|
||||
|
||||
const uint8_t v2_mb_type[8][2] = {
|
||||
const uint8_t ff_v2_mb_type[8][2] = {
|
||||
{1, 1}, {0 , 2}, {3 , 3}, {9 , 5},
|
||||
{5, 4}, {0x21, 7}, {0x20, 7}, {0x11, 6},
|
||||
};
|
||||
|
||||
const uint8_t v2_intra_cbpc[4][2] = {
|
||||
const uint8_t ff_v2_intra_cbpc[4][2] = {
|
||||
{1, 1}, {0, 3}, {1, 3}, {1, 2},
|
||||
};
|
||||
|
||||
const uint8_t wmv1_y_dc_scale_table[32]={
|
||||
const uint8_t ff_wmv1_y_dc_scale_table[32]={
|
||||
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
|
||||
0, 8, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21
|
||||
};
|
||||
const uint8_t wmv1_c_dc_scale_table[32]={
|
||||
const uint8_t ff_wmv1_c_dc_scale_table[32]={
|
||||
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
|
||||
0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22
|
||||
};
|
||||
|
||||
const uint8_t old_ff_y_dc_scale_table[32]={
|
||||
const uint8_t ff_old_ff_y_dc_scale_table[32]={
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
||||
0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39
|
||||
};
|
||||
|
||||
const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64]={
|
||||
const uint8_t ff_wmv1_scantable[WMV1_SCANTABLE_COUNT][64]={
|
||||
{
|
||||
0x00, 0x08, 0x01, 0x02, 0x09, 0x10, 0x18, 0x11,
|
||||
0x0A, 0x03, 0x04, 0x0B, 0x12, 0x19, 0x20, 0x28,
|
||||
@ -1867,7 +1867,7 @@ const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64]={
|
||||
}
|
||||
};
|
||||
|
||||
const uint8_t table_inter_intra[4][2]={
|
||||
const uint8_t ff_table_inter_intra[4][2]={
|
||||
{0,1} /*Luma-Left Chroma-Left*/,
|
||||
{2,2} /*Luma-Top Chroma-Left*/,
|
||||
{6,3} /*luma-Left Chroma-Top */,
|
||||
@ -1979,21 +1979,21 @@ static const uint32_t table_mb_non_intra4[128][2] = {
|
||||
{0x000011, 5}, {0x0001AC, 9}, {0x0000F3, 8}, {0x000439, 11},
|
||||
};
|
||||
|
||||
const uint32_t (* const wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2]={
|
||||
const uint32_t (* const ff_wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2]={
|
||||
table_mb_non_intra2,
|
||||
table_mb_non_intra3,
|
||||
table_mb_non_intra4,
|
||||
table_mb_non_intra,
|
||||
ff_table_mb_non_intra,
|
||||
};
|
||||
|
||||
const uint8_t wmv2_scantableA[64]={
|
||||
const uint8_t ff_wmv2_scantableA[64]={
|
||||
0x00, 0x01, 0x02, 0x08, 0x03, 0x09, 0x0A, 0x10,
|
||||
0x04, 0x0B, 0x11, 0x18, 0x12, 0x0C, 0x05, 0x13,
|
||||
0x19, 0x0D, 0x14, 0x1A, 0x1B, 0x06, 0x15, 0x1C,
|
||||
0x0E, 0x16, 0x1D, 0x07, 0x1E, 0x0F, 0x17, 0x1F,
|
||||
};
|
||||
|
||||
const uint8_t wmv2_scantableB[64]={
|
||||
const uint8_t ff_wmv2_scantableB[64]={
|
||||
0x00, 0x08, 0x01, 0x10, 0x09, 0x18, 0x11, 0x02,
|
||||
0x20, 0x0A, 0x19, 0x28, 0x12, 0x30, 0x21, 0x1A,
|
||||
0x38, 0x29, 0x22, 0x03, 0x31, 0x39, 0x0B, 0x2A,
|
||||
|
@ -54,23 +54,23 @@ extern const uint16_t ff_msmp4_mb_i_table[64][2];
|
||||
|
||||
#define WMV1_SCANTABLE_COUNT 4
|
||||
|
||||
extern const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64];
|
||||
extern const uint8_t ff_wmv1_scantable[WMV1_SCANTABLE_COUNT][64];
|
||||
|
||||
#define NB_RL_TABLES 6
|
||||
|
||||
extern RLTable rl_table[NB_RL_TABLES];
|
||||
extern RLTable ff_rl_table[NB_RL_TABLES];
|
||||
|
||||
extern const uint8_t wmv1_y_dc_scale_table[32];
|
||||
extern const uint8_t wmv1_c_dc_scale_table[32];
|
||||
extern const uint8_t old_ff_y_dc_scale_table[32];
|
||||
extern const uint8_t ff_wmv1_y_dc_scale_table[32];
|
||||
extern const uint8_t ff_wmv1_c_dc_scale_table[32];
|
||||
extern const uint8_t ff_old_ff_y_dc_scale_table[32];
|
||||
|
||||
extern MVTable mv_tables[2];
|
||||
extern MVTable ff_mv_tables[2];
|
||||
|
||||
extern const uint8_t v2_mb_type[8][2];
|
||||
extern const uint8_t v2_intra_cbpc[4][2];
|
||||
extern const uint8_t ff_v2_mb_type[8][2];
|
||||
extern const uint8_t ff_v2_intra_cbpc[4][2];
|
||||
|
||||
extern const uint32_t table_mb_non_intra[128][2];
|
||||
extern const uint8_t table_inter_intra[4][2];
|
||||
extern const uint32_t ff_table_mb_non_intra[128][2];
|
||||
extern const uint8_t ff_table_inter_intra[4][2];
|
||||
|
||||
extern const uint32_t ff_table0_dc_lum[120][2];
|
||||
extern const uint32_t ff_table1_dc_lum[120][2];
|
||||
@ -78,9 +78,9 @@ extern const uint32_t ff_table0_dc_chroma[120][2];
|
||||
extern const uint32_t ff_table1_dc_chroma[120][2];
|
||||
|
||||
#define WMV2_INTER_CBP_TABLE_COUNT 4
|
||||
extern const uint32_t (* const wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2];
|
||||
extern const uint32_t (* const ff_wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2];
|
||||
|
||||
extern const uint8_t wmv2_scantableA[64];
|
||||
extern const uint8_t wmv2_scantableB[64];
|
||||
extern const uint8_t ff_wmv2_scantableA[64];
|
||||
extern const uint8_t ff_wmv2_scantableB[64];
|
||||
|
||||
#endif /* AVCODEC_MSMPEG4DATA_H */
|
||||
|
@ -304,8 +304,8 @@ int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitConte
|
||||
v->zz_4x8 = ff_vc1_adv_progressive_4x8_zz;
|
||||
return decode_sequence_header_adv(v, gb);
|
||||
} else {
|
||||
v->zz_8x4 = wmv2_scantableA;
|
||||
v->zz_4x8 = wmv2_scantableB;
|
||||
v->zz_8x4 = ff_wmv2_scantableA;
|
||||
v->zz_4x8 = ff_wmv2_scantableB;
|
||||
v->res_y411 = get_bits1(gb);
|
||||
v->res_sprite = get_bits1(gb);
|
||||
if (v->res_y411) {
|
||||
|
@ -5351,16 +5351,16 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
|
||||
if (v->profile == PROFILE_ADVANCED || v->res_fasttx) {
|
||||
for (i = 0; i < 64; i++) {
|
||||
#define transpose(x) ((x >> 3) | ((x & 7) << 3))
|
||||
v->zz_8x8[0][i] = transpose(wmv1_scantable[0][i]);
|
||||
v->zz_8x8[1][i] = transpose(wmv1_scantable[1][i]);
|
||||
v->zz_8x8[2][i] = transpose(wmv1_scantable[2][i]);
|
||||
v->zz_8x8[3][i] = transpose(wmv1_scantable[3][i]);
|
||||
v->zz_8x8[0][i] = transpose(ff_wmv1_scantable[0][i]);
|
||||
v->zz_8x8[1][i] = transpose(ff_wmv1_scantable[1][i]);
|
||||
v->zz_8x8[2][i] = transpose(ff_wmv1_scantable[2][i]);
|
||||
v->zz_8x8[3][i] = transpose(ff_wmv1_scantable[3][i]);
|
||||
v->zzi_8x8[i] = transpose(ff_vc1_adv_interlaced_8x8_zz[i]);
|
||||
}
|
||||
v->left_blk_sh = 0;
|
||||
v->top_blk_sh = 3;
|
||||
} else {
|
||||
memcpy(v->zz_8x8, wmv1_scantable, 4*64);
|
||||
memcpy(v->zz_8x8, ff_wmv1_scantable, 4*64);
|
||||
v->left_blk_sh = 3;
|
||||
v->top_blk_sh = 0;
|
||||
}
|
||||
|
@ -28,8 +28,8 @@
|
||||
av_cold void ff_wmv2_common_init(Wmv2Context * w){
|
||||
MpegEncContext * const s= &w->s;
|
||||
|
||||
ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[0], wmv2_scantableA);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[1], wmv2_scantableB);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[0], ff_wmv2_scantableA);
|
||||
ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[1], ff_wmv2_scantableB);
|
||||
}
|
||||
|
||||
static void wmv2_add_block(Wmv2Context *w, DCTELEM *block1, uint8_t *dst, int stride, int n){
|
||||
|
@ -167,8 +167,8 @@ void ff_wmv2_encode_mb(MpegEncContext * s,
|
||||
}
|
||||
|
||||
put_bits(&s->pb,
|
||||
wmv2_inter_table[w->cbp_table_index][cbp + 64][1],
|
||||
wmv2_inter_table[w->cbp_table_index][cbp + 64][0]);
|
||||
ff_wmv2_inter_table[w->cbp_table_index][cbp + 64][1],
|
||||
ff_wmv2_inter_table[w->cbp_table_index][cbp + 64][0]);
|
||||
|
||||
/* motion vector */
|
||||
ff_h263_pred_motion(s, 0, 0, &pred_x, &pred_y);
|
||||
@ -196,13 +196,13 @@ void ff_wmv2_encode_mb(MpegEncContext * s,
|
||||
ff_msmp4_mb_i_table[coded_cbp][1], ff_msmp4_mb_i_table[coded_cbp][0]);
|
||||
} else {
|
||||
put_bits(&s->pb,
|
||||
wmv2_inter_table[w->cbp_table_index][cbp][1],
|
||||
wmv2_inter_table[w->cbp_table_index][cbp][0]);
|
||||
ff_wmv2_inter_table[w->cbp_table_index][cbp][1],
|
||||
ff_wmv2_inter_table[w->cbp_table_index][cbp][0]);
|
||||
}
|
||||
put_bits(&s->pb, 1, 0); /* no AC prediction yet */
|
||||
if(s->inter_intra_pred){
|
||||
s->h263_aic_dir=0;
|
||||
put_bits(&s->pb, table_inter_intra[s->h263_aic_dir][1], table_inter_intra[s->h263_aic_dir][0]);
|
||||
put_bits(&s->pb, ff_table_inter_intra[s->h263_aic_dir][1], ff_table_inter_intra[s->h263_aic_dir][0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user