mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
Add ff_ prefix to (externally) visible variables
Originally committed as revision 8951 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2a2072fe1e
commit
a5c14fcaef
186
libavcodec/vc1.c
186
libavcodec/vc1.c
@ -119,44 +119,44 @@ static int vc1_init_common(VC1Context *v)
|
||||
if(!done)
|
||||
{
|
||||
done = 1;
|
||||
init_vlc(&vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23,
|
||||
vc1_bfraction_bits, 1, 1,
|
||||
vc1_bfraction_codes, 1, 1, 1);
|
||||
init_vlc(&vc1_norm2_vlc, VC1_NORM2_VLC_BITS, 4,
|
||||
vc1_norm2_bits, 1, 1,
|
||||
vc1_norm2_codes, 1, 1, 1);
|
||||
init_vlc(&vc1_norm6_vlc, VC1_NORM6_VLC_BITS, 64,
|
||||
vc1_norm6_bits, 1, 1,
|
||||
vc1_norm6_codes, 2, 2, 1);
|
||||
init_vlc(&vc1_imode_vlc, VC1_IMODE_VLC_BITS, 7,
|
||||
vc1_imode_bits, 1, 1,
|
||||
vc1_imode_codes, 1, 1, 1);
|
||||
init_vlc(&ff_vc1_bfraction_vlc, VC1_BFRACTION_VLC_BITS, 23,
|
||||
ff_vc1_bfraction_bits, 1, 1,
|
||||
ff_vc1_bfraction_codes, 1, 1, 1);
|
||||
init_vlc(&ff_vc1_norm2_vlc, VC1_NORM2_VLC_BITS, 4,
|
||||
ff_vc1_norm2_bits, 1, 1,
|
||||
ff_vc1_norm2_codes, 1, 1, 1);
|
||||
init_vlc(&ff_vc1_norm6_vlc, VC1_NORM6_VLC_BITS, 64,
|
||||
ff_vc1_norm6_bits, 1, 1,
|
||||
ff_vc1_norm6_codes, 2, 2, 1);
|
||||
init_vlc(&ff_vc1_imode_vlc, VC1_IMODE_VLC_BITS, 7,
|
||||
ff_vc1_imode_bits, 1, 1,
|
||||
ff_vc1_imode_codes, 1, 1, 1);
|
||||
for (i=0; i<3; i++)
|
||||
{
|
||||
init_vlc(&vc1_ttmb_vlc[i], VC1_TTMB_VLC_BITS, 16,
|
||||
vc1_ttmb_bits[i], 1, 1,
|
||||
vc1_ttmb_codes[i], 2, 2, 1);
|
||||
init_vlc(&vc1_ttblk_vlc[i], VC1_TTBLK_VLC_BITS, 8,
|
||||
vc1_ttblk_bits[i], 1, 1,
|
||||
vc1_ttblk_codes[i], 1, 1, 1);
|
||||
init_vlc(&vc1_subblkpat_vlc[i], VC1_SUBBLKPAT_VLC_BITS, 15,
|
||||
vc1_subblkpat_bits[i], 1, 1,
|
||||
vc1_subblkpat_codes[i], 1, 1, 1);
|
||||
init_vlc(&ff_vc1_ttmb_vlc[i], VC1_TTMB_VLC_BITS, 16,
|
||||
ff_vc1_ttmb_bits[i], 1, 1,
|
||||
ff_vc1_ttmb_codes[i], 2, 2, 1);
|
||||
init_vlc(&ff_vc1_ttblk_vlc[i], VC1_TTBLK_VLC_BITS, 8,
|
||||
ff_vc1_ttblk_bits[i], 1, 1,
|
||||
ff_vc1_ttblk_codes[i], 1, 1, 1);
|
||||
init_vlc(&ff_vc1_subblkpat_vlc[i], VC1_SUBBLKPAT_VLC_BITS, 15,
|
||||
ff_vc1_subblkpat_bits[i], 1, 1,
|
||||
ff_vc1_subblkpat_codes[i], 1, 1, 1);
|
||||
}
|
||||
for(i=0; i<4; i++)
|
||||
{
|
||||
init_vlc(&vc1_4mv_block_pattern_vlc[i], VC1_4MV_BLOCK_PATTERN_VLC_BITS, 16,
|
||||
vc1_4mv_block_pattern_bits[i], 1, 1,
|
||||
vc1_4mv_block_pattern_codes[i], 1, 1, 1);
|
||||
init_vlc(&vc1_cbpcy_p_vlc[i], VC1_CBPCY_P_VLC_BITS, 64,
|
||||
vc1_cbpcy_p_bits[i], 1, 1,
|
||||
vc1_cbpcy_p_codes[i], 2, 2, 1);
|
||||
init_vlc(&vc1_mv_diff_vlc[i], VC1_MV_DIFF_VLC_BITS, 73,
|
||||
vc1_mv_diff_bits[i], 1, 1,
|
||||
vc1_mv_diff_codes[i], 2, 2, 1);
|
||||
init_vlc(&ff_vc1_4mv_block_pattern_vlc[i], VC1_4MV_BLOCK_PATTERN_VLC_BITS, 16,
|
||||
ff_vc1_4mv_block_pattern_bits[i], 1, 1,
|
||||
ff_vc1_4mv_block_pattern_codes[i], 1, 1, 1);
|
||||
init_vlc(&ff_vc1_cbpcy_p_vlc[i], VC1_CBPCY_P_VLC_BITS, 64,
|
||||
ff_vc1_cbpcy_p_bits[i], 1, 1,
|
||||
ff_vc1_cbpcy_p_codes[i], 2, 2, 1);
|
||||
init_vlc(&ff_vc1_mv_diff_vlc[i], VC1_MV_DIFF_VLC_BITS, 73,
|
||||
ff_vc1_mv_diff_bits[i], 1, 1,
|
||||
ff_vc1_mv_diff_codes[i], 2, 2, 1);
|
||||
}
|
||||
for(i=0; i<8; i++)
|
||||
init_vlc(&vc1_ac_coeff_table[i], AC_VLC_BITS, vc1_ac_sizes[i],
|
||||
init_vlc(&ff_vc1_ac_coeff_table[i], AC_VLC_BITS, vc1_ac_sizes[i],
|
||||
&vc1_ac_tables[i][0][1], 8, 4,
|
||||
&vc1_ac_tables[i][0][0], 8, 4, 1);
|
||||
init_vlc(&ff_msmp4_mb_i_vlc, MB_INTRA_VLC_BITS, 64,
|
||||
@ -251,7 +251,7 @@ static int bitplane_decoding(uint8_t* data, int *raw_flag, VC1Context *v)
|
||||
height = v->s.mb_height;
|
||||
stride = v->s.mb_stride;
|
||||
invert = get_bits(gb, 1);
|
||||
imode = get_vlc2(gb, vc1_imode_vlc.table, VC1_IMODE_VLC_BITS, 1);
|
||||
imode = get_vlc2(gb, ff_vc1_imode_vlc.table, VC1_IMODE_VLC_BITS, 1);
|
||||
|
||||
*raw_flag = 0;
|
||||
switch (imode)
|
||||
@ -270,7 +270,7 @@ static int bitplane_decoding(uint8_t* data, int *raw_flag, VC1Context *v)
|
||||
else offset = 0;
|
||||
// decode bitplane as one long line
|
||||
for (y = offset; y < height * width; y += 2) {
|
||||
code = get_vlc2(gb, vc1_norm2_vlc.table, VC1_NORM2_VLC_BITS, 1);
|
||||
code = get_vlc2(gb, ff_vc1_norm2_vlc.table, VC1_NORM2_VLC_BITS, 1);
|
||||
*planep++ = code & 1;
|
||||
offset++;
|
||||
if(offset == width) {
|
||||
@ -290,7 +290,7 @@ static int bitplane_decoding(uint8_t* data, int *raw_flag, VC1Context *v)
|
||||
if(!(height % 3) && (width % 3)) { // use 2x3 decoding
|
||||
for(y = 0; y < height; y+= 3) {
|
||||
for(x = width & 1; x < width; x += 2) {
|
||||
code = get_vlc2(gb, vc1_norm6_vlc.table, VC1_NORM6_VLC_BITS, 2);
|
||||
code = get_vlc2(gb, ff_vc1_norm6_vlc.table, VC1_NORM6_VLC_BITS, 2);
|
||||
if(code < 0){
|
||||
av_log(v->s.avctx, AV_LOG_DEBUG, "invalid NORM-6 VLC\n");
|
||||
return -1;
|
||||
@ -309,7 +309,7 @@ static int bitplane_decoding(uint8_t* data, int *raw_flag, VC1Context *v)
|
||||
planep += (height & 1) * stride;
|
||||
for(y = height & 1; y < height; y += 2) {
|
||||
for(x = width % 3; x < width; x += 3) {
|
||||
code = get_vlc2(gb, vc1_norm6_vlc.table, VC1_NORM6_VLC_BITS, 2);
|
||||
code = get_vlc2(gb, ff_vc1_norm6_vlc.table, VC1_NORM6_VLC_BITS, 2);
|
||||
if(code < 0){
|
||||
av_log(v->s.avctx, AV_LOG_DEBUG, "invalid NORM-6 VLC\n");
|
||||
return -1;
|
||||
@ -996,7 +996,7 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
|
||||
if(get_bits1(gb))
|
||||
ar = get_bits(gb, 4);
|
||||
if(ar && ar < 14){
|
||||
v->s.avctx->sample_aspect_ratio = vc1_pixel_aspect[ar];
|
||||
v->s.avctx->sample_aspect_ratio = ff_vc1_pixel_aspect[ar];
|
||||
}else if(ar == 15){
|
||||
w = get_bits(gb, 8);
|
||||
h = get_bits(gb, 8);
|
||||
@ -1012,8 +1012,8 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
|
||||
nr = get_bits(gb, 8);
|
||||
dr = get_bits(gb, 4);
|
||||
if(nr && nr < 8 && dr && dr < 3){
|
||||
v->s.avctx->time_base.num = vc1_fps_dr[dr - 1];
|
||||
v->s.avctx->time_base.den = vc1_fps_nr[nr - 1] * 1000;
|
||||
v->s.avctx->time_base.num = ff_vc1_fps_dr[dr - 1];
|
||||
v->s.avctx->time_base.den = ff_vc1_fps_nr[nr - 1] * 1000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1106,8 +1106,8 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
|
||||
|
||||
v->bi_type = 0;
|
||||
if(v->s.pict_type == B_TYPE) {
|
||||
v->bfraction = get_vlc2(gb, vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
|
||||
v->bfraction = vc1_bfraction_lut[v->bfraction];
|
||||
v->bfraction = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
|
||||
v->bfraction = ff_vc1_bfraction_lut[v->bfraction];
|
||||
if(v->bfraction == 0) {
|
||||
v->s.pict_type = BI_TYPE;
|
||||
}
|
||||
@ -1124,9 +1124,9 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
|
||||
/* Quantizer stuff */
|
||||
pqindex = get_bits(gb, 5);
|
||||
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
|
||||
v->pq = vc1_pquant_table[0][pqindex];
|
||||
v->pq = ff_vc1_pquant_table[0][pqindex];
|
||||
else
|
||||
v->pq = vc1_pquant_table[1][pqindex];
|
||||
v->pq = ff_vc1_pquant_table[1][pqindex];
|
||||
|
||||
v->pquantizer = 1;
|
||||
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
|
||||
@ -1166,11 +1166,11 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
|
||||
else v->tt_index = 2;
|
||||
|
||||
lowquant = (v->pq > 12) ? 0 : 1;
|
||||
v->mv_mode = vc1_mv_pmode_table[lowquant][get_prefix(gb, 1, 4)];
|
||||
v->mv_mode = ff_vc1_mv_pmode_table[lowquant][get_prefix(gb, 1, 4)];
|
||||
if (v->mv_mode == MV_PMODE_INTENSITY_COMP)
|
||||
{
|
||||
int scale, shift, i;
|
||||
v->mv_mode2 = vc1_mv_pmode_table2[lowquant][get_prefix(gb, 1, 3)];
|
||||
v->mv_mode2 = ff_vc1_mv_pmode_table2[lowquant][get_prefix(gb, 1, 3)];
|
||||
v->lumscale = get_bits(gb, 6);
|
||||
v->lumshift = get_bits(gb, 6);
|
||||
v->use_ic = 1;
|
||||
@ -1221,8 +1221,8 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
|
||||
"Imode: %i, Invert: %i\n", status>>1, status&1);
|
||||
|
||||
/* Hopefully this is correct for P frames */
|
||||
v->s.mv_table_index = get_bits(gb, 2); //but using vc1_ tables
|
||||
v->cbpcy_vlc = &vc1_cbpcy_p_vlc[get_bits(gb, 2)];
|
||||
v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables
|
||||
v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
|
||||
|
||||
if (v->dquant)
|
||||
{
|
||||
@ -1236,7 +1236,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
|
||||
v->ttmbf = get_bits(gb, 1);
|
||||
if (v->ttmbf)
|
||||
{
|
||||
v->ttfrm = vc1_ttfrm_to_tt[get_bits(gb, 2)];
|
||||
v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)];
|
||||
}
|
||||
} else {
|
||||
v->ttmbf = 1;
|
||||
@ -1263,7 +1263,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
|
||||
"Imode: %i, Invert: %i\n", status>>1, status&1);
|
||||
|
||||
v->s.mv_table_index = get_bits(gb, 2);
|
||||
v->cbpcy_vlc = &vc1_cbpcy_p_vlc[get_bits(gb, 2)];
|
||||
v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
|
||||
|
||||
if (v->dquant)
|
||||
{
|
||||
@ -1277,7 +1277,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
|
||||
v->ttmbf = get_bits(gb, 1);
|
||||
if (v->ttmbf)
|
||||
{
|
||||
v->ttfrm = vc1_ttfrm_to_tt[get_bits(gb, 2)];
|
||||
v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)];
|
||||
}
|
||||
} else {
|
||||
v->ttmbf = 1;
|
||||
@ -1349,8 +1349,8 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
|
||||
v->uvsamp = get_bits1(gb);
|
||||
if(v->finterpflag) v->interpfrm = get_bits(gb, 1);
|
||||
if(v->s.pict_type == B_TYPE) {
|
||||
v->bfraction = get_vlc2(gb, vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
|
||||
v->bfraction = vc1_bfraction_lut[v->bfraction];
|
||||
v->bfraction = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1);
|
||||
v->bfraction = ff_vc1_bfraction_lut[v->bfraction];
|
||||
if(v->bfraction == 0) {
|
||||
v->s.pict_type = BI_TYPE; /* XXX: should not happen here */
|
||||
}
|
||||
@ -1358,9 +1358,9 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
|
||||
pqindex = get_bits(gb, 5);
|
||||
v->pqindex = pqindex;
|
||||
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
|
||||
v->pq = vc1_pquant_table[0][pqindex];
|
||||
v->pq = ff_vc1_pquant_table[0][pqindex];
|
||||
else
|
||||
v->pq = vc1_pquant_table[1][pqindex];
|
||||
v->pq = ff_vc1_pquant_table[1][pqindex];
|
||||
|
||||
v->pquantizer = 1;
|
||||
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
|
||||
@ -1408,11 +1408,11 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
|
||||
else v->tt_index = 2;
|
||||
|
||||
lowquant = (v->pq > 12) ? 0 : 1;
|
||||
v->mv_mode = vc1_mv_pmode_table[lowquant][get_prefix(gb, 1, 4)];
|
||||
v->mv_mode = ff_vc1_mv_pmode_table[lowquant][get_prefix(gb, 1, 4)];
|
||||
if (v->mv_mode == MV_PMODE_INTENSITY_COMP)
|
||||
{
|
||||
int scale, shift, i;
|
||||
v->mv_mode2 = vc1_mv_pmode_table2[lowquant][get_prefix(gb, 1, 3)];
|
||||
v->mv_mode2 = ff_vc1_mv_pmode_table2[lowquant][get_prefix(gb, 1, 3)];
|
||||
v->lumscale = get_bits(gb, 6);
|
||||
v->lumshift = get_bits(gb, 6);
|
||||
/* fill lookup tables for intensity compensation */
|
||||
@ -1463,8 +1463,8 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
|
||||
"Imode: %i, Invert: %i\n", status>>1, status&1);
|
||||
|
||||
/* Hopefully this is correct for P frames */
|
||||
v->s.mv_table_index = get_bits(gb, 2); //but using vc1_ tables
|
||||
v->cbpcy_vlc = &vc1_cbpcy_p_vlc[get_bits(gb, 2)];
|
||||
v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables
|
||||
v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
|
||||
if (v->dquant)
|
||||
{
|
||||
av_log(v->s.avctx, AV_LOG_DEBUG, "VOP DQuant info\n");
|
||||
@ -1477,7 +1477,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
|
||||
v->ttmbf = get_bits(gb, 1);
|
||||
if (v->ttmbf)
|
||||
{
|
||||
v->ttfrm = vc1_ttfrm_to_tt[get_bits(gb, 2)];
|
||||
v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)];
|
||||
}
|
||||
} else {
|
||||
v->ttmbf = 1;
|
||||
@ -1513,7 +1513,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
|
||||
"Imode: %i, Invert: %i\n", status>>1, status&1);
|
||||
|
||||
v->s.mv_table_index = get_bits(gb, 2);
|
||||
v->cbpcy_vlc = &vc1_cbpcy_p_vlc[get_bits(gb, 2)];
|
||||
v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
|
||||
|
||||
if (v->dquant)
|
||||
{
|
||||
@ -1527,7 +1527,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
|
||||
v->ttmbf = get_bits(gb, 1);
|
||||
if (v->ttmbf)
|
||||
{
|
||||
v->ttfrm = vc1_ttfrm_to_tt[get_bits(gb, 2)];
|
||||
v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)];
|
||||
}
|
||||
} else {
|
||||
v->ttmbf = 1;
|
||||
@ -1609,7 +1609,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
|
||||
* @param _dmv_y Vertical differential for decoded MV
|
||||
*/
|
||||
#define GET_MVDATA(_dmv_x, _dmv_y) \
|
||||
index = 1 + get_vlc2(gb, vc1_mv_diff_vlc[s->mv_table_index].table,\
|
||||
index = 1 + get_vlc2(gb, ff_vc1_mv_diff_vlc[s->mv_table_index].table,\
|
||||
VC1_MV_DIFF_VLC_BITS, 2); \
|
||||
if (index > 36) \
|
||||
{ \
|
||||
@ -2236,12 +2236,12 @@ static inline int vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n,
|
||||
if(c_avail && (n!= 1 && n!=3)) {
|
||||
q2 = s->current_picture.qscale_table[mb_pos - 1];
|
||||
if(q2 && q2 != q1)
|
||||
c = (c * s->y_dc_scale_table[q2] * vc1_dqscale[s->y_dc_scale_table[q1] - 1] + 0x20000) >> 18;
|
||||
c = (c * s->y_dc_scale_table[q2] * ff_vc1_dqscale[s->y_dc_scale_table[q1] - 1] + 0x20000) >> 18;
|
||||
}
|
||||
if(a_avail && (n!= 2 && n!=3)) {
|
||||
q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride];
|
||||
if(q2 && q2 != q1)
|
||||
a = (a * s->y_dc_scale_table[q2] * vc1_dqscale[s->y_dc_scale_table[q1] - 1] + 0x20000) >> 18;
|
||||
a = (a * s->y_dc_scale_table[q2] * ff_vc1_dqscale[s->y_dc_scale_table[q1] - 1] + 0x20000) >> 18;
|
||||
}
|
||||
if(a_avail && c_avail && (n!=3)) {
|
||||
int off = mb_pos;
|
||||
@ -2249,7 +2249,7 @@ static inline int vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n,
|
||||
if(n != 2) off -= s->mb_stride;
|
||||
q2 = s->current_picture.qscale_table[off];
|
||||
if(q2 && q2 != q1)
|
||||
b = (b * s->y_dc_scale_table[q2] * vc1_dqscale[s->y_dc_scale_table[q1] - 1] + 0x20000) >> 18;
|
||||
b = (b * s->y_dc_scale_table[q2] * ff_vc1_dqscale[s->y_dc_scale_table[q1] - 1] + 0x20000) >> 18;
|
||||
}
|
||||
|
||||
if(a_avail && c_avail) {
|
||||
@ -2322,7 +2322,7 @@ static void vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value,
|
||||
GetBitContext *gb = &v->s.gb;
|
||||
int index, escape, run = 0, level = 0, lst = 0;
|
||||
|
||||
index = get_vlc2(gb, vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3);
|
||||
index = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3);
|
||||
if (index != vc1_ac_sizes[codingset] - 1) {
|
||||
run = vc1_index_decode_table[codingset][index][0];
|
||||
level = vc1_index_decode_table[codingset][index][1];
|
||||
@ -2332,7 +2332,7 @@ static void vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value,
|
||||
} else {
|
||||
escape = decode210(gb);
|
||||
if (escape != 2) {
|
||||
index = get_vlc2(gb, vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3);
|
||||
index = get_vlc2(gb, ff_vc1_ac_coeff_table[codingset].table, AC_VLC_BITS, 3);
|
||||
run = vc1_index_decode_table[codingset][index][0];
|
||||
level = vc1_index_decode_table[codingset][index][1];
|
||||
lst = index >= vc1_last_decode_table[codingset];
|
||||
@ -2451,11 +2451,11 @@ static int vc1_decode_i_block(VC1Context *v, DCTELEM block[64], int n, int coded
|
||||
|
||||
if(v->s.ac_pred) {
|
||||
if(!dc_pred_dir)
|
||||
zz_table = vc1_horizontal_zz;
|
||||
zz_table = ff_vc1_horizontal_zz;
|
||||
else
|
||||
zz_table = vc1_vertical_zz;
|
||||
zz_table = ff_vc1_vertical_zz;
|
||||
} else
|
||||
zz_table = vc1_normal_zz;
|
||||
zz_table = ff_vc1_normal_zz;
|
||||
|
||||
ac_val = s->ac_val[0][0] + s->block_index[n] * 16;
|
||||
ac_val2 = ac_val;
|
||||
@ -2636,11 +2636,11 @@ static int vc1_decode_i_block_adv(VC1Context *v, DCTELEM block[64], int n, int c
|
||||
|
||||
if(v->s.ac_pred) {
|
||||
if(!dc_pred_dir)
|
||||
zz_table = vc1_horizontal_zz;
|
||||
zz_table = ff_vc1_horizontal_zz;
|
||||
else
|
||||
zz_table = vc1_vertical_zz;
|
||||
zz_table = ff_vc1_vertical_zz;
|
||||
} else
|
||||
zz_table = vc1_normal_zz;
|
||||
zz_table = ff_vc1_normal_zz;
|
||||
|
||||
while (!last) {
|
||||
vc1_decode_ac_coeff(v, &last, &skip, &value, codingset);
|
||||
@ -2659,10 +2659,10 @@ static int vc1_decode_i_block_adv(VC1Context *v, DCTELEM block[64], int n, int c
|
||||
|
||||
if(dc_pred_dir) { //left
|
||||
for(k = 1; k < 8; k++)
|
||||
block[k << 3] += (ac_val[k] * q2 * vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
block[k << 3] += (ac_val[k] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
} else { //top
|
||||
for(k = 1; k < 8; k++)
|
||||
block[k] += (ac_val[k + 8] * q2 * vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
block[k] += (ac_val[k + 8] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
}
|
||||
} else {
|
||||
if(dc_pred_dir) { //left
|
||||
@ -2700,7 +2700,7 @@ static int vc1_decode_i_block_adv(VC1Context *v, DCTELEM block[64], int n, int c
|
||||
q1 = q1 * 2 + ((q1 == v->pq) ? v->halfpq : 0) - 1;
|
||||
q2 = q2 * 2 + ((q2 == v->pq) ? v->halfpq : 0) - 1;
|
||||
for(k = 1; k < 8; k++)
|
||||
ac_val2[k] = (ac_val2[k] * q2 * vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
ac_val2[k] = (ac_val2[k] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
}
|
||||
}
|
||||
} else {//top
|
||||
@ -2710,7 +2710,7 @@ static int vc1_decode_i_block_adv(VC1Context *v, DCTELEM block[64], int n, int c
|
||||
q1 = q1 * 2 + ((q1 == v->pq) ? v->halfpq : 0) - 1;
|
||||
q2 = q2 * 2 + ((q2 == v->pq) ? v->halfpq : 0) - 1;
|
||||
for(k = 1; k < 8; k++)
|
||||
ac_val2[k + 8] = (ac_val2[k + 8] * q2 * vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
ac_val2[k + 8] = (ac_val2[k + 8] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2841,7 +2841,7 @@ static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, int c
|
||||
const int8_t *zz_table;
|
||||
int k;
|
||||
|
||||
zz_table = vc1_simple_progressive_8x8_zz;
|
||||
zz_table = ff_vc1_simple_progressive_8x8_zz;
|
||||
|
||||
while (!last) {
|
||||
vc1_decode_ac_coeff(v, &last, &skip, &value, codingset);
|
||||
@ -2860,10 +2860,10 @@ static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, int c
|
||||
|
||||
if(dc_pred_dir) { //left
|
||||
for(k = 1; k < 8; k++)
|
||||
block[k << 3] += (ac_val[k] * q2 * vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
block[k << 3] += (ac_val[k] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
} else { //top
|
||||
for(k = 1; k < 8; k++)
|
||||
block[k] += (ac_val[k + 8] * q2 * vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
block[k] += (ac_val[k + 8] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
}
|
||||
} else {
|
||||
if(dc_pred_dir) { //left
|
||||
@ -2901,7 +2901,7 @@ static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, int c
|
||||
q1 = q1 * 2 + ((q1 == v->pq) ? v->halfpq : 0) - 1;
|
||||
q2 = q2 * 2 + ((q2 == v->pq) ? v->halfpq : 0) - 1;
|
||||
for(k = 1; k < 8; k++)
|
||||
ac_val2[k] = (ac_val2[k] * q2 * vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
ac_val2[k] = (ac_val2[k] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
}
|
||||
}
|
||||
} else {//top
|
||||
@ -2911,7 +2911,7 @@ static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, int c
|
||||
q1 = q1 * 2 + ((q1 == v->pq) ? v->halfpq : 0) - 1;
|
||||
q2 = q2 * 2 + ((q2 == v->pq) ? v->halfpq : 0) - 1;
|
||||
for(k = 1; k < 8; k++)
|
||||
ac_val2[k + 8] = (ac_val2[k + 8] * q2 * vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
ac_val2[k + 8] = (ac_val2[k + 8] * q2 * ff_vc1_dqscale[q1 - 1] + 0x20000) >> 18;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2951,10 +2951,10 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquan
|
||||
int ttblk = ttmb & 7;
|
||||
|
||||
if(ttmb == -1) {
|
||||
ttblk = vc1_ttblk_to_tt[v->tt_index][get_vlc2(gb, vc1_ttblk_vlc[v->tt_index].table, VC1_TTBLK_VLC_BITS, 1)];
|
||||
ttblk = ff_vc1_ttblk_to_tt[v->tt_index][get_vlc2(gb, ff_vc1_ttblk_vlc[v->tt_index].table, VC1_TTBLK_VLC_BITS, 1)];
|
||||
}
|
||||
if(ttblk == TT_4X4) {
|
||||
subblkpat = ~(get_vlc2(gb, vc1_subblkpat_vlc[v->tt_index].table, VC1_SUBBLKPAT_VLC_BITS, 1) + 1);
|
||||
subblkpat = ~(get_vlc2(gb, ff_vc1_subblkpat_vlc[v->tt_index].table, VC1_SUBBLKPAT_VLC_BITS, 1) + 1);
|
||||
}
|
||||
if((ttblk != TT_8X8 && ttblk != TT_4X4) && (v->ttmbf || (ttmb != -1 && (ttmb & 8) && !first_block))) {
|
||||
subblkpat = decode012(gb);
|
||||
@ -2982,7 +2982,7 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquan
|
||||
i += skip;
|
||||
if(i > 63)
|
||||
break;
|
||||
idx = vc1_simple_progressive_8x8_zz[i++];
|
||||
idx = ff_vc1_simple_progressive_8x8_zz[i++];
|
||||
block[idx] = value * scale;
|
||||
if(!v->pquantizer)
|
||||
block[idx] += (block[idx] < 0) ? -mquant : mquant;
|
||||
@ -2999,7 +2999,7 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquan
|
||||
i += skip;
|
||||
if(i > 15)
|
||||
break;
|
||||
idx = vc1_simple_progressive_4x4_zz[i++];
|
||||
idx = ff_vc1_simple_progressive_4x4_zz[i++];
|
||||
block[idx + off] = value * scale;
|
||||
if(!v->pquantizer)
|
||||
block[idx + off] += (block[idx + off] < 0) ? -mquant : mquant;
|
||||
@ -3019,9 +3019,9 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquan
|
||||
if(i > 31)
|
||||
break;
|
||||
if(v->profile < PROFILE_ADVANCED)
|
||||
idx = vc1_simple_progressive_8x4_zz[i++];
|
||||
idx = ff_vc1_simple_progressive_8x4_zz[i++];
|
||||
else
|
||||
idx = vc1_adv_progressive_8x4_zz[i++];
|
||||
idx = ff_vc1_adv_progressive_8x4_zz[i++];
|
||||
block[idx + off] = value * scale;
|
||||
if(!v->pquantizer)
|
||||
block[idx + off] += (block[idx + off] < 0) ? -mquant : mquant;
|
||||
@ -3041,9 +3041,9 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n, int mquan
|
||||
if(i > 31)
|
||||
break;
|
||||
if(v->profile < PROFILE_ADVANCED)
|
||||
idx = vc1_simple_progressive_4x8_zz[i++];
|
||||
idx = ff_vc1_simple_progressive_4x8_zz[i++];
|
||||
else
|
||||
idx = vc1_adv_progressive_4x8_zz[i++];
|
||||
idx = ff_vc1_adv_progressive_4x8_zz[i++];
|
||||
block[idx + off] = value * scale;
|
||||
if(!v->pquantizer)
|
||||
block[idx + off] += (block[idx + off] < 0) ? -mquant : mquant;
|
||||
@ -3127,7 +3127,7 @@ static int vc1_decode_p_mb(VC1Context *v)
|
||||
s->current_picture.qscale_table[mb_pos] = mquant;
|
||||
|
||||
if (!v->ttmbf && !s->mb_intra && mb_has_coeffs)
|
||||
ttmb = get_vlc2(gb, vc1_ttmb_vlc[v->tt_index].table,
|
||||
ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table,
|
||||
VC1_TTMB_VLC_BITS, 2);
|
||||
if(!s->mb_intra) vc1_mc_1mv(v, 0);
|
||||
dst_idx = 0;
|
||||
@ -3236,7 +3236,7 @@ static int vc1_decode_p_mb(VC1Context *v)
|
||||
else s->ac_pred = 0;
|
||||
}
|
||||
if (!v->ttmbf && coded_inter)
|
||||
ttmb = get_vlc2(gb, vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);
|
||||
ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);
|
||||
for (i=0; i<6; i++)
|
||||
{
|
||||
dst_idx += i >> 2;
|
||||
@ -3376,7 +3376,7 @@ static void vc1_decode_b_mb(VC1Context *v)
|
||||
mb_has_coeffs = 0;
|
||||
s->current_picture.qscale_table[mb_pos] = mquant;
|
||||
if(!v->ttmbf)
|
||||
ttmb = get_vlc2(gb, vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);
|
||||
ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);
|
||||
dmv_x[0] = dmv_y[0] = dmv_x[1] = dmv_y[1] = 0;
|
||||
vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);
|
||||
vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
|
||||
@ -3413,7 +3413,7 @@ static void vc1_decode_b_mb(VC1Context *v)
|
||||
GET_MQUANT();
|
||||
s->current_picture.qscale_table[mb_pos] = mquant;
|
||||
if(!v->ttmbf && !s->mb_intra && mb_has_coeffs)
|
||||
ttmb = get_vlc2(gb, vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);
|
||||
ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);
|
||||
}
|
||||
}
|
||||
dst_idx = 0;
|
||||
|
@ -30,27 +30,27 @@
|
||||
#include "vc1data.h"
|
||||
|
||||
/** Table for conversion between TTBLK and TTMB */
|
||||
const int vc1_ttblk_to_tt[3][8] = {
|
||||
const int ff_vc1_ttblk_to_tt[3][8] = {
|
||||
{ TT_8X4, TT_4X8, TT_8X8, TT_4X4, TT_8X4_TOP, TT_8X4_BOTTOM, TT_4X8_RIGHT, TT_4X8_LEFT },
|
||||
{ TT_8X8, TT_4X8_RIGHT, TT_4X8_LEFT, TT_4X4, TT_8X4, TT_4X8, TT_8X4_BOTTOM, TT_8X4_TOP },
|
||||
{ TT_8X8, TT_4X8, TT_4X4, TT_8X4_BOTTOM, TT_4X8_RIGHT, TT_4X8_LEFT, TT_8X4, TT_8X4_TOP }
|
||||
};
|
||||
|
||||
const int vc1_ttfrm_to_tt[4] = { TT_8X8, TT_8X4, TT_4X8, TT_4X4 };
|
||||
const int ff_vc1_ttfrm_to_tt[4] = { TT_8X8, TT_8X4, TT_4X8, TT_4X4 };
|
||||
|
||||
/** MV P mode - the 5th element is only used for mode 1 */
|
||||
const uint8_t vc1_mv_pmode_table[2][5] = {
|
||||
const uint8_t ff_vc1_mv_pmode_table[2][5] = {
|
||||
{ MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_1MV, MV_PMODE_1MV_HPEL, MV_PMODE_INTENSITY_COMP, MV_PMODE_MIXED_MV },
|
||||
{ MV_PMODE_1MV, MV_PMODE_MIXED_MV, MV_PMODE_1MV_HPEL, MV_PMODE_INTENSITY_COMP, MV_PMODE_1MV_HPEL_BILIN }
|
||||
};
|
||||
const uint8_t vc1_mv_pmode_table2[2][4] = {
|
||||
const uint8_t ff_vc1_mv_pmode_table2[2][4] = {
|
||||
{ MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_1MV, MV_PMODE_1MV_HPEL, MV_PMODE_MIXED_MV },
|
||||
{ MV_PMODE_1MV, MV_PMODE_MIXED_MV, MV_PMODE_1MV_HPEL, MV_PMODE_1MV_HPEL_BILIN }
|
||||
};
|
||||
|
||||
const int vc1_fps_nr[5] = { 24, 25, 30, 50, 60 },
|
||||
vc1_fps_dr[2] = { 1000, 1001 };
|
||||
const uint8_t vc1_pquant_table[3][32] = {
|
||||
const int ff_vc1_fps_nr[5] = { 24, 25, 30, 50, 60 },
|
||||
ff_vc1_fps_dr[2] = { 1000, 1001 };
|
||||
const uint8_t ff_vc1_pquant_table[3][32] = {
|
||||
{ /* Implicit quantizer */
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 11, 12,
|
||||
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 29, 31
|
||||
@ -70,34 +70,34 @@ const uint8_t vc1_pquant_table[3][32] = {
|
||||
*/
|
||||
//@{
|
||||
#define VC1_BFRACTION_VLC_BITS 7
|
||||
VLC vc1_bfraction_vlc;
|
||||
VLC ff_vc1_bfraction_vlc;
|
||||
#define VC1_IMODE_VLC_BITS 4
|
||||
VLC vc1_imode_vlc;
|
||||
VLC ff_vc1_imode_vlc;
|
||||
#define VC1_NORM2_VLC_BITS 3
|
||||
VLC vc1_norm2_vlc;
|
||||
VLC ff_vc1_norm2_vlc;
|
||||
#define VC1_NORM6_VLC_BITS 9
|
||||
VLC vc1_norm6_vlc;
|
||||
VLC ff_vc1_norm6_vlc;
|
||||
/* Could be optimized, one table only needs 8 bits */
|
||||
#define VC1_TTMB_VLC_BITS 9 //12
|
||||
VLC vc1_ttmb_vlc[3];
|
||||
VLC ff_vc1_ttmb_vlc[3];
|
||||
#define VC1_MV_DIFF_VLC_BITS 9 //15
|
||||
VLC vc1_mv_diff_vlc[4];
|
||||
VLC ff_vc1_mv_diff_vlc[4];
|
||||
#define VC1_CBPCY_P_VLC_BITS 9 //14
|
||||
VLC vc1_cbpcy_p_vlc[4];
|
||||
VLC ff_vc1_cbpcy_p_vlc[4];
|
||||
#define VC1_4MV_BLOCK_PATTERN_VLC_BITS 6
|
||||
VLC vc1_4mv_block_pattern_vlc[4];
|
||||
VLC ff_vc1_4mv_block_pattern_vlc[4];
|
||||
#define VC1_TTBLK_VLC_BITS 5
|
||||
VLC vc1_ttblk_vlc[3];
|
||||
VLC ff_vc1_ttblk_vlc[3];
|
||||
#define VC1_SUBBLKPAT_VLC_BITS 6
|
||||
VLC vc1_subblkpat_vlc[3];
|
||||
VLC ff_vc1_subblkpat_vlc[3];
|
||||
|
||||
VLC vc1_ac_coeff_table[8];
|
||||
VLC ff_vc1_ac_coeff_table[8];
|
||||
//@}
|
||||
|
||||
|
||||
#if B_FRACTION_DEN==840 //original bfraction from vc9data.h, not conforming to standard
|
||||
/* bfraction is fractional, we scale to the GCD 3*5*7*8 = 840 */
|
||||
const int16_t vc1_bfraction_lut[23] = {
|
||||
const int16_t ff_vc1_bfraction_lut[23] = {
|
||||
420 /*1/2*/, 280 /*1/3*/, 560 /*2/3*/, 210 /*1/4*/,
|
||||
630 /*3/4*/, 168 /*1/5*/, 336 /*2/5*/,
|
||||
504 /*3/5*/, 672 /*4/5*/, 140 /*1/6*/, 700 /*5/6*/,
|
||||
@ -108,7 +108,7 @@ const int16_t vc1_bfraction_lut[23] = {
|
||||
};
|
||||
#else
|
||||
/* pre-computed scales for all bfractions and base=256 */
|
||||
const int16_t vc1_bfraction_lut[23] = {
|
||||
const int16_t ff_vc1_bfraction_lut[23] = {
|
||||
128 /*1/2*/, 85 /*1/3*/, 170 /*2/3*/, 64 /*1/4*/,
|
||||
192 /*3/4*/, 51 /*1/5*/, 102 /*2/5*/,
|
||||
153 /*3/5*/, 204 /*4/5*/, 43 /*1/6*/, 215 /*5/6*/,
|
||||
@ -119,7 +119,7 @@ const int16_t vc1_bfraction_lut[23] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
const uint8_t vc1_bfraction_bits[23] = {
|
||||
const uint8_t ff_vc1_bfraction_bits[23] = {
|
||||
3, 3, 3, 3,
|
||||
3, 3, 3,
|
||||
7, 7, 7, 7,
|
||||
@ -128,7 +128,7 @@ const uint8_t vc1_bfraction_bits[23] = {
|
||||
7, 7,
|
||||
7, 7
|
||||
};
|
||||
const uint8_t vc1_bfraction_codes[23] = {
|
||||
const uint8_t ff_vc1_bfraction_codes[23] = {
|
||||
0, 1, 2, 3,
|
||||
4, 5, 6,
|
||||
112, 113, 114, 115,
|
||||
@ -139,7 +139,7 @@ const uint8_t vc1_bfraction_codes[23] = {
|
||||
};
|
||||
|
||||
//Same as H.264
|
||||
const AVRational vc1_pixel_aspect[16]={
|
||||
const AVRational ff_vc1_pixel_aspect[16]={
|
||||
{0, 1},
|
||||
{1, 1},
|
||||
{12, 11},
|
||||
@ -159,36 +159,36 @@ const AVRational vc1_pixel_aspect[16]={
|
||||
};
|
||||
|
||||
/* BitPlane IMODE - such a small table... */
|
||||
const uint8_t vc1_imode_codes[7] = {
|
||||
const uint8_t ff_vc1_imode_codes[7] = {
|
||||
0, 2, 1, 3, 1, 2, 3
|
||||
};
|
||||
const uint8_t vc1_imode_bits[7] = {
|
||||
const uint8_t ff_vc1_imode_bits[7] = {
|
||||
4, 2, 3, 2, 4, 3, 3
|
||||
};
|
||||
|
||||
/* Normal-2 imode */
|
||||
const uint8_t vc1_norm2_codes[4] = {
|
||||
const uint8_t ff_vc1_norm2_codes[4] = {
|
||||
0, 4, 5, 3
|
||||
};
|
||||
const uint8_t vc1_norm2_bits[4] = {
|
||||
const uint8_t ff_vc1_norm2_bits[4] = {
|
||||
1, 3, 3, 2
|
||||
};
|
||||
|
||||
const uint16_t vc1_norm6_codes[64] = {
|
||||
const uint16_t ff_vc1_norm6_codes[64] = {
|
||||
0x001, 0x002, 0x003, 0x000, 0x004, 0x001, 0x002, 0x047, 0x005, 0x003, 0x004, 0x04B, 0x005, 0x04D, 0x04E, 0x30E,
|
||||
0x006, 0x006, 0x007, 0x053, 0x008, 0x055, 0x056, 0x30D, 0x009, 0x059, 0x05A, 0x30C, 0x05C, 0x30B, 0x30A, 0x037,
|
||||
0x007, 0x00A, 0x00B, 0x043, 0x00C, 0x045, 0x046, 0x309, 0x00D, 0x049, 0x04A, 0x308, 0x04C, 0x307, 0x306, 0x036,
|
||||
0x00E, 0x051, 0x052, 0x305, 0x054, 0x304, 0x303, 0x035, 0x058, 0x302, 0x301, 0x034, 0x300, 0x033, 0x032, 0x007,
|
||||
};
|
||||
|
||||
const uint8_t vc1_norm6_bits[64] = {
|
||||
const uint8_t ff_vc1_norm6_bits[64] = {
|
||||
1, 4, 4, 8, 4, 8, 8, 10, 4, 8, 8, 10, 8, 10, 10, 13,
|
||||
4, 8, 8, 10, 8, 10, 10, 13, 8, 10, 10, 13, 10, 13, 13, 9,
|
||||
4, 8, 8, 10, 8, 10, 10, 13, 8, 10, 10, 13, 10, 13, 13, 9,
|
||||
8, 10, 10, 13, 10, 13, 13, 9, 10, 13, 13, 9, 13, 9, 9, 6,
|
||||
};
|
||||
/* Normal-6 imode */
|
||||
const uint8_t vc1_norm6_spec[64][5] = {
|
||||
const uint8_t ff_vc1_norm6_spec[64][5] = {
|
||||
{ 0, 1, 1 },
|
||||
{ 1, 2, 4 },
|
||||
{ 2, 3, 4 },
|
||||
@ -256,13 +256,13 @@ const uint8_t vc1_norm6_spec[64][5] = {
|
||||
};
|
||||
|
||||
/* 4MV Block pattern VLC tables */
|
||||
const uint8_t vc1_4mv_block_pattern_codes[4][16] = {
|
||||
const uint8_t ff_vc1_4mv_block_pattern_codes[4][16] = {
|
||||
{ 14, 58, 59, 25, 12, 26, 15, 15, 13, 24, 27, 0, 28, 1, 2, 2},
|
||||
{ 8, 18, 19, 4, 20, 5, 30, 11, 21, 31, 6, 12, 7, 13, 14, 0},
|
||||
{ 15, 6, 7, 2, 8, 3, 28, 9, 10, 29, 4, 11, 5, 12, 13, 0},
|
||||
{ 0, 11, 12, 4, 13, 5, 30, 16, 14, 31, 6, 17, 7, 18, 19, 10}
|
||||
};
|
||||
const uint8_t vc1_4mv_block_pattern_bits[4][16] = {
|
||||
const uint8_t ff_vc1_4mv_block_pattern_bits[4][16] = {
|
||||
{ 5, 6, 6, 5, 5, 5, 5, 4, 5, 5, 5, 3, 5, 3, 3, 2},
|
||||
{ 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4, 4, 4, 4, 4, 2},
|
||||
{ 4, 4, 4, 4, 4, 4, 5, 4, 4, 5, 4, 4, 4, 4, 4, 3},
|
||||
@ -275,7 +275,7 @@ const uint8_t wmv3_dc_scale_table[32]={
|
||||
|
||||
/* P-Picture CBPCY VLC tables */
|
||||
#if 1 // Looks like original tables are not conforming to standard at all. Are they used for old WMV?
|
||||
const uint16_t vc1_cbpcy_p_codes[4][64] = {
|
||||
const uint16_t ff_vc1_cbpcy_p_codes[4][64] = {
|
||||
{
|
||||
0, 6, 15, 13, 13, 11, 3, 13, 5, 8, 49, 10, 12, 114, 102, 119,
|
||||
1, 54, 96, 8, 10, 111, 5, 15, 12, 10, 2, 12, 13, 115, 53, 63,
|
||||
@ -302,7 +302,7 @@ const uint16_t vc1_cbpcy_p_codes[4][64] = {
|
||||
}
|
||||
};
|
||||
|
||||
const uint8_t vc1_cbpcy_p_bits[4][64] = {
|
||||
const uint8_t ff_vc1_cbpcy_p_bits[4][64] = {
|
||||
{
|
||||
13, 13, 7, 13, 7, 13, 13, 12, 6, 13, 7, 12, 6, 8, 8, 8,
|
||||
5, 7, 8, 12, 6, 8, 13, 12, 7, 13, 13, 12, 6, 8, 7, 7,
|
||||
@ -329,7 +329,7 @@ const uint8_t vc1_cbpcy_p_bits[4][64] = {
|
||||
}
|
||||
};
|
||||
#else
|
||||
const uint16_t vc1_cbpcy_p_codes[4][64] = {
|
||||
const uint16_t ff_vc1_cbpcy_p_codes[4][64] = {
|
||||
{
|
||||
0, 1, 1, 4, 5, 1, 12, 4, 13, 14, 10, 11, 12, 7, 13, 2,
|
||||
15, 1, 96, 1, 49, 97, 2, 100, 3, 4, 5, 101, 102, 52, 53, 4,
|
||||
@ -355,7 +355,7 @@ const uint16_t vc1_cbpcy_p_codes[4][64] = {
|
||||
44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 28, 29, 30, 31
|
||||
}
|
||||
};
|
||||
const uint8_t vc1_cbpcy_p_bits[4][64] = {
|
||||
const uint8_t ff_vc1_cbpcy_p_bits[4][64] = {
|
||||
{
|
||||
13, 6, 5, 6, 6, 7, 7, 5, 7, 7, 6, 6, 6, 5, 6, 3,
|
||||
7, 8, 8, 13, 7, 8, 13, 8, 13, 13, 13, 8, 8, 7, 7, 3,
|
||||
@ -391,7 +391,7 @@ const uint8_t vc1_cbpcy_p_bits[4][64] = {
|
||||
* 8x4:MB:btm 8x4:MB:top 8x4,MB,both
|
||||
* 4x8,MB,right 4x8,MB,left
|
||||
* 4x4,MB */
|
||||
const uint16_t vc1_ttmb_codes[3][16] = {
|
||||
const uint16_t ff_vc1_ttmb_codes[3][16] = {
|
||||
{
|
||||
0x0003,
|
||||
0x002E, 0x005F, 0x0000,
|
||||
@ -421,7 +421,7 @@ const uint16_t vc1_ttmb_codes[3][16] = {
|
||||
}
|
||||
};
|
||||
|
||||
const uint8_t vc1_ttmb_bits[3][16] = {
|
||||
const uint8_t ff_vc1_ttmb_bits[3][16] = {
|
||||
{
|
||||
2,
|
||||
6, 7, 2,
|
||||
@ -452,31 +452,31 @@ const uint8_t vc1_ttmb_bits[3][16] = {
|
||||
};
|
||||
|
||||
/* TTBLK (Transform Type per Block) tables */
|
||||
const uint8_t vc1_ttblk_codes[3][8] = {
|
||||
const uint8_t ff_vc1_ttblk_codes[3][8] = {
|
||||
{ 0, 1, 3, 5, 16, 17, 18, 19},
|
||||
{ 3, 0, 1, 2, 3, 5, 8, 9},
|
||||
{ 1, 0, 1, 4, 6, 7, 10, 11}
|
||||
};
|
||||
const uint8_t vc1_ttblk_bits[3][8] = {
|
||||
const uint8_t ff_vc1_ttblk_bits[3][8] = {
|
||||
{ 2, 2, 2, 3, 5, 5, 5, 5},
|
||||
{ 2, 3, 3, 3, 3, 3, 4, 4},
|
||||
{ 2, 3, 3, 3, 3, 3, 4, 4}
|
||||
};
|
||||
|
||||
/* SUBBLKPAT tables, p93-94, reordered */
|
||||
const uint8_t vc1_subblkpat_codes[3][15] = {
|
||||
const uint8_t ff_vc1_subblkpat_codes[3][15] = {
|
||||
{ 14, 12, 7, 11, 9, 26, 2, 10, 27, 8, 0, 6, 1, 15, 1},
|
||||
{ 14, 0, 8, 15, 10, 4, 23, 13, 5, 9, 25, 3, 24, 22, 1},
|
||||
{ 5, 6, 2, 2, 8, 0, 28, 3, 1, 3, 29, 1, 19, 18, 15}
|
||||
};
|
||||
const uint8_t vc1_subblkpat_bits[3][15] = {
|
||||
const uint8_t ff_vc1_subblkpat_bits[3][15] = {
|
||||
{ 5, 5, 5, 5, 5, 6, 4, 5, 6, 5, 4, 5, 4, 5, 1},
|
||||
{ 4, 3, 4, 4, 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 2},
|
||||
{ 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4}
|
||||
};
|
||||
|
||||
/* MV differential tables, p265 */
|
||||
const uint16_t vc1_mv_diff_codes[4][73] = {
|
||||
const uint16_t ff_vc1_mv_diff_codes[4][73] = {
|
||||
{
|
||||
0, 2, 3, 8, 576, 3, 2, 6,
|
||||
5, 577, 578, 7, 8, 9, 40, 19,
|
||||
@ -526,7 +526,7 @@ const uint16_t vc1_mv_diff_codes[4][73] = {
|
||||
15 /* 73 elements */
|
||||
}
|
||||
};
|
||||
const uint8_t vc1_mv_diff_bits[4][73] = {
|
||||
const uint8_t ff_vc1_mv_diff_bits[4][73] = {
|
||||
{
|
||||
6, 7, 7, 8, 14, 6, 5, 6, 7, 14, 14, 6, 6, 6, 8, 9,
|
||||
10, 9, 7, 7, 7, 14, 14, 10, 9, 10, 8, 10, 10, 14, 14, 14,
|
||||
@ -561,7 +561,7 @@ const uint8_t vc1_mv_diff_bits[4][73] = {
|
||||
/* DC differentials low+hi-mo, p217 are the same as in msmpeg4data .h */
|
||||
|
||||
/* Scantables/ZZ scan are at 11.9 (p262) and 8.1.1.12 (p10) */
|
||||
const int8_t vc1_normal_zz[64] = {
|
||||
const int8_t ff_vc1_normal_zz[64] = {
|
||||
0, 8, 1, 2, 9, 16, 24, 17,
|
||||
10, 3, 4, 11, 18, 25, 32, 40,
|
||||
33, 48, 26, 19, 12, 5, 6, 13,
|
||||
@ -572,7 +572,7 @@ const int8_t vc1_normal_zz[64] = {
|
||||
61, 46, 39, 47, 54, 62, 55, 63
|
||||
};
|
||||
|
||||
const int8_t vc1_horizontal_zz [64] = /* Table 227 */
|
||||
const int8_t ff_vc1_horizontal_zz [64] = /* Table 227 */
|
||||
{
|
||||
0, 1, 8, 2, 3, 9, 16, 24,
|
||||
17, 10, 4, 5, 11, 18, 25, 32,
|
||||
@ -584,7 +584,7 @@ const int8_t vc1_horizontal_zz [64] = /* Table 227 */
|
||||
46, 39, 47, 54, 61, 62, 55, 63
|
||||
};
|
||||
|
||||
const int8_t vc1_vertical_zz [64] = /* Table 228 */
|
||||
const int8_t ff_vc1_vertical_zz [64] = /* Table 228 */
|
||||
{
|
||||
0, 8, 16, 1, 24, 32, 40, 9,
|
||||
2, 3, 10, 17, 25, 48, 56, 41,
|
||||
@ -596,7 +596,7 @@ const int8_t vc1_vertical_zz [64] = /* Table 228 */
|
||||
46, 39, 47, 54, 61, 62, 55, 63
|
||||
};
|
||||
|
||||
const int8_t vc1_simple_progressive_8x8_zz [64] =
|
||||
const int8_t ff_vc1_simple_progressive_8x8_zz [64] =
|
||||
/* Table 229 */
|
||||
{
|
||||
0, 8, 1, 2, 9, 16, 24, 17,
|
||||
@ -609,7 +609,7 @@ const int8_t vc1_simple_progressive_8x8_zz [64] =
|
||||
61, 62, 54, 46, 39, 47, 55, 63
|
||||
};
|
||||
|
||||
const int8_t vc1_simple_progressive_8x4_zz [32] = /* Table 230 */
|
||||
const int8_t ff_vc1_simple_progressive_8x4_zz [32] = /* Table 230 */
|
||||
{
|
||||
0, 1, 2, 8, 3, 9, 10, 16,
|
||||
4, 11, 17, 24, 18, 12, 5, 19,
|
||||
@ -617,7 +617,7 @@ const int8_t vc1_simple_progressive_8x4_zz [32] = /* Table 230 */
|
||||
14, 22, 29, 7, 30, 15, 23, 31
|
||||
};
|
||||
|
||||
const int8_t vc1_simple_progressive_4x8_zz [32] = /* Table 231 */
|
||||
const int8_t ff_vc1_simple_progressive_4x8_zz [32] = /* Table 231 */
|
||||
{
|
||||
0, 8, 1, 16,
|
||||
9, 24, 17, 2,
|
||||
@ -630,7 +630,7 @@ const int8_t vc1_simple_progressive_4x8_zz [32] = /* Table 231 */
|
||||
};
|
||||
|
||||
/* Table 232 */
|
||||
const int8_t vc1_simple_progressive_4x4_zz [16] =
|
||||
const int8_t ff_vc1_simple_progressive_4x4_zz [16] =
|
||||
{
|
||||
0, 8, 16, 1,
|
||||
9, 24, 17, 2,
|
||||
@ -638,7 +638,7 @@ const int8_t vc1_simple_progressive_4x4_zz [16] =
|
||||
11, 26, 19, 27
|
||||
};
|
||||
|
||||
const int8_t vc1_adv_progressive_8x4_zz [32] = /* Table 233 */
|
||||
const int8_t ff_vc1_adv_progressive_8x4_zz [32] = /* Table 233 */
|
||||
{
|
||||
0, 8, 1, 16, 2, 9, 10, 3,
|
||||
24, 17, 4, 11, 18, 12, 5, 19,
|
||||
@ -646,7 +646,7 @@ const int8_t vc1_adv_progressive_8x4_zz [32] = /* Table 233 */
|
||||
14, 22, 29, 7, 30, 15, 23, 31
|
||||
};
|
||||
|
||||
const int8_t vc1_adv_progressive_4x8_zz [32] = /* Table 234 */
|
||||
const int8_t ff_vc1_adv_progressive_4x8_zz [32] = /* Table 234 */
|
||||
{
|
||||
0, 1, 8, 2,
|
||||
9, 16, 17, 24,
|
||||
@ -658,7 +658,7 @@ const int8_t vc1_adv_progressive_4x8_zz [32] = /* Table 234 */
|
||||
35, 43, 51, 59
|
||||
};
|
||||
|
||||
const int8_t vc1_adv_interlaced_8x8_zz [64] = /* Table 235 */
|
||||
const int8_t ff_vc1_adv_interlaced_8x8_zz [64] = /* Table 235 */
|
||||
{
|
||||
0, 8, 1, 16, 24, 9, 2, 32,
|
||||
40, 48, 56, 17, 10, 3, 25, 18,
|
||||
@ -670,7 +670,7 @@ const int8_t vc1_adv_interlaced_8x8_zz [64] = /* Table 235 */
|
||||
61, 62, 54, 46, 39, 47, 55, 63
|
||||
};
|
||||
|
||||
const int8_t vc1_adv_interlaced_8x4_zz [32] = /* Table 236 */
|
||||
const int8_t ff_vc1_adv_interlaced_8x4_zz [32] = /* Table 236 */
|
||||
{
|
||||
0, 8, 16, 24, 1, 9, 2, 17,
|
||||
25, 10, 3, 18, 26, 4, 11, 19,
|
||||
@ -678,7 +678,7 @@ const int8_t vc1_adv_interlaced_8x4_zz [32] = /* Table 236 */
|
||||
14, 22, 29, 7, 30, 15, 23, 31
|
||||
};
|
||||
|
||||
const int8_t vc1_adv_interlaced_4x8_zz [32] = /* Table 237 */
|
||||
const int8_t ff_vc1_adv_interlaced_4x8_zz [32] = /* Table 237 */
|
||||
{
|
||||
0, 1, 2, 8,
|
||||
16, 9, 24, 17,
|
||||
@ -690,7 +690,7 @@ const int8_t vc1_adv_interlaced_4x8_zz [32] = /* Table 237 */
|
||||
35, 43, 51, 59
|
||||
};
|
||||
|
||||
const int8_t vc1_adv_interlaced_4x4_zz [16] = /* Table 238 */
|
||||
const int8_t ff_vc1_adv_interlaced_4x4_zz [16] = /* Table 238 */
|
||||
{
|
||||
0, 8, 16, 24,
|
||||
1, 9, 17, 2,
|
||||
@ -700,7 +700,7 @@ const int8_t vc1_adv_interlaced_4x4_zz [16] = /* Table 238 */
|
||||
|
||||
|
||||
/* DQScale as specified in 8.1.3.9 - almost identical to 0x40000/i */
|
||||
const int32_t vc1_dqscale[63] = {
|
||||
const int32_t ff_vc1_dqscale[63] = {
|
||||
0x40000, 0x20000, 0x15555, 0x10000, 0xCCCD, 0xAAAB, 0x9249, 0x8000,
|
||||
0x71C7, 0x6666, 0x5D17, 0x5555, 0x4EC5, 0x4925, 0x4444, 0x4000,
|
||||
0x3C3C, 0x38E4, 0x35E5, 0x3333, 0x30C3, 0x2E8C, 0x2C86, 0x2AAB,
|
||||
|
@ -29,88 +29,88 @@
|
||||
#define VC1DATA_H
|
||||
|
||||
/** Table for conversion between TTBLK and TTMB */
|
||||
extern const int vc1_ttblk_to_tt[3][8];
|
||||
extern const int ff_vc1_ttblk_to_tt[3][8];
|
||||
|
||||
extern const int vc1_ttfrm_to_tt[4];
|
||||
extern const int ff_vc1_ttfrm_to_tt[4];
|
||||
|
||||
/** MV P mode - the 5th element is only used for mode 1 */
|
||||
extern const uint8_t vc1_mv_pmode_table[2][5];
|
||||
extern const uint8_t vc1_mv_pmode_table2[2][4];
|
||||
extern const uint8_t ff_vc1_mv_pmode_table[2][5];
|
||||
extern const uint8_t ff_vc1_mv_pmode_table2[2][4];
|
||||
|
||||
extern const int vc1_fps_nr[5], vc1_fps_dr[2];
|
||||
extern const uint8_t vc1_pquant_table[3][32];
|
||||
extern const int ff_vc1_fps_nr[5], ff_vc1_fps_dr[2];
|
||||
extern const uint8_t ff_vc1_pquant_table[3][32];
|
||||
|
||||
/** @name VC-1 VLC tables and defines
|
||||
* @todo TODO move this into the context
|
||||
*/
|
||||
//@{
|
||||
#define VC1_BFRACTION_VLC_BITS 7
|
||||
extern VLC vc1_bfraction_vlc;
|
||||
extern VLC ff_vc1_bfraction_vlc;
|
||||
#define VC1_IMODE_VLC_BITS 4
|
||||
extern VLC vc1_imode_vlc;
|
||||
extern VLC ff_vc1_imode_vlc;
|
||||
#define VC1_NORM2_VLC_BITS 3
|
||||
extern VLC vc1_norm2_vlc;
|
||||
extern VLC ff_vc1_norm2_vlc;
|
||||
#define VC1_NORM6_VLC_BITS 9
|
||||
extern VLC vc1_norm6_vlc;
|
||||
extern VLC ff_vc1_norm6_vlc;
|
||||
/* Could be optimized, one table only needs 8 bits */
|
||||
#define VC1_TTMB_VLC_BITS 9 //12
|
||||
extern VLC vc1_ttmb_vlc[3];
|
||||
extern VLC ff_vc1_ttmb_vlc[3];
|
||||
#define VC1_MV_DIFF_VLC_BITS 9 //15
|
||||
extern VLC vc1_mv_diff_vlc[4];
|
||||
extern VLC ff_vc1_mv_diff_vlc[4];
|
||||
#define VC1_CBPCY_P_VLC_BITS 9 //14
|
||||
extern VLC vc1_cbpcy_p_vlc[4];
|
||||
extern VLC ff_vc1_cbpcy_p_vlc[4];
|
||||
#define VC1_4MV_BLOCK_PATTERN_VLC_BITS 6
|
||||
extern VLC vc1_4mv_block_pattern_vlc[4];
|
||||
extern VLC ff_vc1_4mv_block_pattern_vlc[4];
|
||||
#define VC1_TTBLK_VLC_BITS 5
|
||||
extern VLC vc1_ttblk_vlc[3];
|
||||
extern VLC ff_vc1_ttblk_vlc[3];
|
||||
#define VC1_SUBBLKPAT_VLC_BITS 6
|
||||
extern VLC vc1_subblkpat_vlc[3];
|
||||
extern VLC ff_vc1_subblkpat_vlc[3];
|
||||
|
||||
extern VLC vc1_ac_coeff_table[8];
|
||||
extern VLC ff_vc1_ac_coeff_table[8];
|
||||
//@}
|
||||
|
||||
|
||||
#if 0 //original bfraction from vc9data.h, not conforming to standard
|
||||
/* Denominator used for vc1_bfraction_lut */
|
||||
/* Denominator used for ff_vc1_bfraction_lut */
|
||||
#define B_FRACTION_DEN 840
|
||||
|
||||
/* bfraction is fractional, we scale to the GCD 3*5*7*8 = 840 */
|
||||
extern const int16_t vc1_bfraction_lut[23];
|
||||
extern const int16_t ff_vc1_bfraction_lut[23];
|
||||
#else
|
||||
/* Denominator used for vc1_bfraction_lut */
|
||||
/* Denominator used for ff_vc1_bfraction_lut */
|
||||
#define B_FRACTION_DEN 256
|
||||
|
||||
/* pre-computed scales for all bfractions and base=256 */
|
||||
extern const int16_t vc1_bfraction_lut[23];
|
||||
extern const int16_t ff_vc1_bfraction_lut[23];
|
||||
#endif
|
||||
|
||||
extern const uint8_t vc1_bfraction_bits[23];
|
||||
extern const uint8_t vc1_bfraction_codes[23];
|
||||
extern const uint8_t ff_vc1_bfraction_bits[23];
|
||||
extern const uint8_t ff_vc1_bfraction_codes[23];
|
||||
|
||||
//Same as H.264
|
||||
extern const AVRational vc1_pixel_aspect[16];
|
||||
extern const AVRational ff_vc1_pixel_aspect[16];
|
||||
|
||||
/* BitPlane IMODE - such a small table... */
|
||||
extern const uint8_t vc1_imode_codes[7];
|
||||
extern const uint8_t vc1_imode_bits[7];
|
||||
extern const uint8_t ff_vc1_imode_codes[7];
|
||||
extern const uint8_t ff_vc1_imode_bits[7];
|
||||
|
||||
/* Normal-2 imode */
|
||||
extern const uint8_t vc1_norm2_codes[4];
|
||||
extern const uint8_t vc1_norm2_bits[4];
|
||||
extern const uint16_t vc1_norm6_codes[64];
|
||||
extern const uint8_t vc1_norm6_bits[64];
|
||||
extern const uint8_t ff_vc1_norm2_codes[4];
|
||||
extern const uint8_t ff_vc1_norm2_bits[4];
|
||||
extern const uint16_t ff_vc1_norm6_codes[64];
|
||||
extern const uint8_t ff_vc1_norm6_bits[64];
|
||||
/* Normal-6 imode */
|
||||
extern const uint8_t vc1_norm6_spec[64][5];
|
||||
extern const uint8_t ff_vc1_norm6_spec[64][5];
|
||||
|
||||
/* 4MV Block pattern VLC tables */
|
||||
extern const uint8_t vc1_4mv_block_pattern_codes[4][16];
|
||||
extern const uint8_t vc1_4mv_block_pattern_bits[4][16];
|
||||
extern const uint8_t ff_vc1_4mv_block_pattern_codes[4][16];
|
||||
extern const uint8_t ff_vc1_4mv_block_pattern_bits[4][16];
|
||||
|
||||
extern const uint8_t wmv3_dc_scale_table[32];
|
||||
|
||||
/* P-Picture CBPCY VLC tables */
|
||||
extern const uint16_t vc1_cbpcy_p_codes[4][64];
|
||||
extern const uint8_t vc1_cbpcy_p_bits[4][64];
|
||||
extern const uint16_t ff_vc1_cbpcy_p_codes[4][64];
|
||||
extern const uint8_t ff_vc1_cbpcy_p_bits[4][64];
|
||||
|
||||
/* MacroBlock Transform Type: 7.1.3.11, p89
|
||||
* 8x8:B
|
||||
@ -120,40 +120,40 @@ extern const uint8_t vc1_cbpcy_p_bits[4][64];
|
||||
* 8x4:MB:btm 8x4:MB:top 8x4,MB,both
|
||||
* 4x8,MB,right 4x8,MB,left
|
||||
* 4x4,MB */
|
||||
extern const uint16_t vc1_ttmb_codes[3][16];
|
||||
extern const uint16_t ff_vc1_ttmb_codes[3][16];
|
||||
|
||||
extern const uint8_t vc1_ttmb_bits[3][16];
|
||||
extern const uint8_t ff_vc1_ttmb_bits[3][16];
|
||||
|
||||
/* TTBLK (Transform Type per Block) tables */
|
||||
extern const uint8_t vc1_ttblk_codes[3][8];
|
||||
extern const uint8_t vc1_ttblk_bits[3][8];
|
||||
extern const uint8_t ff_vc1_ttblk_codes[3][8];
|
||||
extern const uint8_t ff_vc1_ttblk_bits[3][8];
|
||||
|
||||
/* SUBBLKPAT tables, p93-94, reordered */
|
||||
extern const uint8_t vc1_subblkpat_codes[3][15];
|
||||
extern const uint8_t vc1_subblkpat_bits[3][15];
|
||||
extern const uint8_t ff_vc1_subblkpat_codes[3][15];
|
||||
extern const uint8_t ff_vc1_subblkpat_bits[3][15];
|
||||
|
||||
/* MV differential tables, p265 */
|
||||
extern const uint16_t vc1_mv_diff_codes[4][73];
|
||||
extern const uint8_t vc1_mv_diff_bits[4][73];
|
||||
extern const uint16_t ff_vc1_mv_diff_codes[4][73];
|
||||
extern const uint8_t ff_vc1_mv_diff_bits[4][73];
|
||||
|
||||
/* DC differentials low+hi-mo, p217 are the same as in msmpeg4data .h */
|
||||
|
||||
/* Scantables/ZZ scan are at 11.9 (p262) and 8.1.1.12 (p10) */
|
||||
extern const int8_t vc1_normal_zz[64];
|
||||
extern const int8_t vc1_horizontal_zz [64];
|
||||
extern const int8_t vc1_vertical_zz [64];
|
||||
extern const int8_t vc1_simple_progressive_8x8_zz [64];
|
||||
extern const int8_t vc1_simple_progressive_8x4_zz [32];
|
||||
extern const int8_t vc1_simple_progressive_4x8_zz [32];
|
||||
extern const int8_t vc1_simple_progressive_4x4_zz [16];
|
||||
extern const int8_t vc1_adv_progressive_8x4_zz [32];
|
||||
extern const int8_t vc1_adv_progressive_4x8_zz [32];
|
||||
extern const int8_t vc1_adv_interlaced_8x8_zz [64];
|
||||
extern const int8_t vc1_adv_interlaced_8x4_zz [32];
|
||||
extern const int8_t vc1_adv_interlaced_4x8_zz [32];
|
||||
extern const int8_t vc1_adv_interlaced_4x4_zz [16];
|
||||
extern const int8_t ff_vc1_normal_zz[64];
|
||||
extern const int8_t ff_vc1_horizontal_zz [64];
|
||||
extern const int8_t ff_vc1_vertical_zz [64];
|
||||
extern const int8_t ff_vc1_simple_progressive_8x8_zz [64];
|
||||
extern const int8_t ff_vc1_simple_progressive_8x4_zz [32];
|
||||
extern const int8_t ff_vc1_simple_progressive_4x8_zz [32];
|
||||
extern const int8_t ff_vc1_simple_progressive_4x4_zz [16];
|
||||
extern const int8_t ff_vc1_adv_progressive_8x4_zz [32];
|
||||
extern const int8_t ff_vc1_adv_progressive_4x8_zz [32];
|
||||
extern const int8_t ff_vc1_adv_interlaced_8x8_zz [64];
|
||||
extern const int8_t ff_vc1_adv_interlaced_8x4_zz [32];
|
||||
extern const int8_t ff_vc1_adv_interlaced_4x8_zz [32];
|
||||
extern const int8_t ff_vc1_adv_interlaced_4x4_zz [16];
|
||||
|
||||
/* DQScale as specified in 8.1.3.9 - almost identical to 0x40000/i */
|
||||
extern const int32_t vc1_dqscale[63];
|
||||
extern const int32_t ff_vc1_dqscale[63];
|
||||
|
||||
#endif /* VC1DATA_H */
|
||||
|
Loading…
Reference in New Issue
Block a user