mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
vc1: Add ff_ prefix to nonstatic symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
1fec055066
commit
5f2c159c0f
@ -721,7 +721,7 @@ av_cold void ff_intrax8_common_end(IntraX8Context * w)
|
||||
* @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
|
||||
* @param quant_offset offset away from zero
|
||||
*/
|
||||
//FIXME extern uint8_t wmv3_dc_scale_table[32];
|
||||
//FIXME extern uint8_t ff_wmv3_dc_scale_table[32];
|
||||
int ff_intrax8_decode_picture(IntraX8Context * const w, int dquant, int quant_offset){
|
||||
MpegEncContext * const s= w->s;
|
||||
int mb_xy;
|
||||
|
@ -60,7 +60,7 @@ static uint32_t v2_dc_lum_table[512][2];
|
||||
static uint32_t v2_dc_chroma_table[512][2];
|
||||
|
||||
/* vc1 externs */
|
||||
extern const uint8_t wmv3_dc_scale_table[32];
|
||||
extern const uint8_t ff_wmv3_dc_scale_table[32];
|
||||
|
||||
#include "msmpeg4data.h"
|
||||
|
||||
@ -152,8 +152,8 @@ static av_cold void common_init(MpegEncContext * s)
|
||||
break;
|
||||
#if CONFIG_VC1_DECODER
|
||||
case 6:
|
||||
s->y_dc_scale_table= wmv3_dc_scale_table;
|
||||
s->c_dc_scale_table= wmv3_dc_scale_table;
|
||||
s->y_dc_scale_table= ff_wmv3_dc_scale_table;
|
||||
s->c_dc_scale_table= ff_wmv3_dc_scale_table;
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -291,7 +291,7 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb);
|
||||
* @param gb GetBit context initialized from Codec context extra_data
|
||||
* @return Status
|
||||
*/
|
||||
int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
|
||||
int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
|
||||
{
|
||||
av_log(avctx, AV_LOG_DEBUG, "Header: %0X\n", show_bits(gb, 32));
|
||||
v->profile = get_bits(gb, 2);
|
||||
@ -524,7 +524,7 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
|
||||
int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -572,7 +572,7 @@ int vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *
|
||||
return 0;
|
||||
}
|
||||
|
||||
int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
|
||||
int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
|
||||
{
|
||||
int pqindex, lowquant, status;
|
||||
|
||||
@ -815,7 +815,7 @@ int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
|
||||
lutuv[i] = av_clip_uint8((scale * (i - 128) + 128*64 + 32) >> 6); \
|
||||
}
|
||||
|
||||
int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
|
||||
int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
|
||||
{
|
||||
int pqindex, lowquant;
|
||||
int status;
|
||||
|
@ -441,11 +441,11 @@ static av_always_inline int vc1_unescape_buffer(const uint8_t *src, int size, ui
|
||||
* @param gb GetBit context initialized from Codec context extra_data
|
||||
* @return Status
|
||||
*/
|
||||
int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb);
|
||||
int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb);
|
||||
|
||||
int vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb);
|
||||
int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb);
|
||||
|
||||
int vc1_parse_frame_header (VC1Context *v, GetBitContext *gb);
|
||||
int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb);
|
||||
int ff_vc1_parse_frame_header (VC1Context *v, GetBitContext *gb);
|
||||
int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb);
|
||||
|
||||
#endif /* AVCODEC_VC1_H */
|
||||
|
@ -57,16 +57,16 @@ static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
if(size <= 0) continue;
|
||||
switch(AV_RB32(start)){
|
||||
case VC1_CODE_SEQHDR:
|
||||
vc1_decode_sequence_header(avctx, &vpc->v, &gb);
|
||||
ff_vc1_decode_sequence_header(avctx, &vpc->v, &gb);
|
||||
break;
|
||||
case VC1_CODE_ENTRYPOINT:
|
||||
vc1_decode_entry_point(avctx, &vpc->v, &gb);
|
||||
ff_vc1_decode_entry_point(avctx, &vpc->v, &gb);
|
||||
break;
|
||||
case VC1_CODE_FRAME:
|
||||
if(vpc->v.profile < PROFILE_ADVANCED)
|
||||
vc1_parse_frame_header (&vpc->v, &gb);
|
||||
ff_vc1_parse_frame_header (&vpc->v, &gb);
|
||||
else
|
||||
vc1_parse_frame_header_adv(&vpc->v, &gb);
|
||||
ff_vc1_parse_frame_header_adv(&vpc->v, &gb);
|
||||
|
||||
/* keep AV_PICTURE_TYPE_BI internal to VC1 */
|
||||
if (vpc->v.s.pict_type == AV_PICTURE_TYPE_BI)
|
||||
|
@ -645,7 +645,7 @@ const uint8_t ff_vc1_2ref_mvdata_bits[8][126] = {
|
||||
}
|
||||
};
|
||||
|
||||
const uint8_t wmv3_dc_scale_table[32] = {
|
||||
const uint8_t ff_wmv3_dc_scale_table[32] = {
|
||||
0, 2, 4, 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
|
||||
};
|
||||
@ -1094,7 +1094,7 @@ const int32_t ff_vc1_dqscale[63] = {
|
||||
};
|
||||
|
||||
/* P Interlaced field picture MV predictor scaling values (Table 114) */
|
||||
const uint16_t vc1_field_mvpred_scales[2][7][4] = {
|
||||
const uint16_t ff_vc1_field_mvpred_scales[2][7][4] = {
|
||||
// Refdist:
|
||||
// 0 1 2 3 or greater
|
||||
{ // current field is first
|
||||
@ -1118,7 +1118,7 @@ const uint16_t vc1_field_mvpred_scales[2][7][4] = {
|
||||
};
|
||||
|
||||
/* B Interlaced field picture backward MV predictor scaling values for first field (Table 115) */
|
||||
const uint16_t vc1_b_field_mvpred_scales[7][4] = {
|
||||
const uint16_t ff_vc1_b_field_mvpred_scales[7][4] = {
|
||||
// BRFD:
|
||||
// 0 1 2 3 or greater
|
||||
{ 171, 205, 219, 228 }, // SCALESAME
|
||||
|
@ -126,7 +126,7 @@ extern const uint8_t ff_vc1_4mv_block_pattern_bits[4][16];
|
||||
extern const uint8_t ff_vc1_2mv_block_pattern_codes[4][4];
|
||||
extern const uint8_t ff_vc1_2mv_block_pattern_bits[4][4];
|
||||
|
||||
extern const uint8_t wmv3_dc_scale_table[32];
|
||||
extern const uint8_t ff_wmv3_dc_scale_table[32];
|
||||
|
||||
/* P-Picture CBPCY VLC tables */
|
||||
extern const uint16_t ff_vc1_cbpcy_p_codes[4][64];
|
||||
@ -197,7 +197,7 @@ extern const int8_t ff_vc1_intra_vert_8x8_zz [64];
|
||||
extern const int32_t ff_vc1_dqscale[63];
|
||||
|
||||
/* P Interlaced field picture MV predictor scaling values (Table 114) */
|
||||
extern const uint16_t vc1_field_mvpred_scales[2][7][4];
|
||||
extern const uint16_t ff_vc1_field_mvpred_scales[2][7][4];
|
||||
/* B Interlaced field picture backward MV predictor scaling values for first field (Table 115) */
|
||||
extern const uint16_t vc1_b_field_mvpred_scales[7][4];
|
||||
extern const uint16_t ff_vc1_b_field_mvpred_scales[7][4];
|
||||
#endif /* AVCODEC_VC1DATA_H */
|
||||
|
@ -1308,10 +1308,10 @@ static av_always_inline int scaleforsame_x(VC1Context *v, int n /* MV */, int di
|
||||
refdist = dir ? v->brfd : v->frfd;
|
||||
if (refdist > 3)
|
||||
refdist = 3;
|
||||
scalesame1 = vc1_field_mvpred_scales[table_index][1][refdist];
|
||||
scalesame2 = vc1_field_mvpred_scales[table_index][2][refdist];
|
||||
scalezone1_x = vc1_field_mvpred_scales[table_index][3][refdist];
|
||||
zone1offset_x = vc1_field_mvpred_scales[table_index][5][refdist];
|
||||
scalesame1 = ff_vc1_field_mvpred_scales[table_index][1][refdist];
|
||||
scalesame2 = ff_vc1_field_mvpred_scales[table_index][2][refdist];
|
||||
scalezone1_x = ff_vc1_field_mvpred_scales[table_index][3][refdist];
|
||||
zone1offset_x = ff_vc1_field_mvpred_scales[table_index][5][refdist];
|
||||
|
||||
if (FFABS(n) > 255)
|
||||
scaledvalue = n;
|
||||
@ -1341,10 +1341,10 @@ static av_always_inline int scaleforsame_y(VC1Context *v, int i, int n /* MV */,
|
||||
refdist = dir ? v->brfd : v->frfd;
|
||||
if (refdist > 3)
|
||||
refdist = 3;
|
||||
scalesame1 = vc1_field_mvpred_scales[table_index][1][refdist];
|
||||
scalesame2 = vc1_field_mvpred_scales[table_index][2][refdist];
|
||||
scalezone1_y = vc1_field_mvpred_scales[table_index][4][refdist];
|
||||
zone1offset_y = vc1_field_mvpred_scales[table_index][6][refdist];
|
||||
scalesame1 = ff_vc1_field_mvpred_scales[table_index][1][refdist];
|
||||
scalesame2 = ff_vc1_field_mvpred_scales[table_index][2][refdist];
|
||||
scalezone1_y = ff_vc1_field_mvpred_scales[table_index][4][refdist];
|
||||
zone1offset_y = ff_vc1_field_mvpred_scales[table_index][6][refdist];
|
||||
|
||||
if (FFABS(n) > 63)
|
||||
scaledvalue = n;
|
||||
@ -1372,10 +1372,10 @@ static av_always_inline int scaleforopp_x(VC1Context *v, int n /* MV */)
|
||||
int scaledvalue;
|
||||
|
||||
brfd = FFMIN(v->brfd, 3);
|
||||
scalezone1_x = vc1_b_field_mvpred_scales[3][brfd];
|
||||
zone1offset_x = vc1_b_field_mvpred_scales[5][brfd];
|
||||
scaleopp1 = vc1_b_field_mvpred_scales[1][brfd];
|
||||
scaleopp2 = vc1_b_field_mvpred_scales[2][brfd];
|
||||
scalezone1_x = ff_vc1_b_field_mvpred_scales[3][brfd];
|
||||
zone1offset_x = ff_vc1_b_field_mvpred_scales[5][brfd];
|
||||
scaleopp1 = ff_vc1_b_field_mvpred_scales[1][brfd];
|
||||
scaleopp2 = ff_vc1_b_field_mvpred_scales[2][brfd];
|
||||
|
||||
if (FFABS(n) > 255)
|
||||
scaledvalue = n;
|
||||
@ -1399,10 +1399,10 @@ static av_always_inline int scaleforopp_y(VC1Context *v, int n /* MV */, int dir
|
||||
int scaledvalue;
|
||||
|
||||
brfd = FFMIN(v->brfd, 3);
|
||||
scalezone1_y = vc1_b_field_mvpred_scales[4][brfd];
|
||||
zone1offset_y = vc1_b_field_mvpred_scales[6][brfd];
|
||||
scaleopp1 = vc1_b_field_mvpred_scales[1][brfd];
|
||||
scaleopp2 = vc1_b_field_mvpred_scales[2][brfd];
|
||||
scalezone1_y = ff_vc1_b_field_mvpred_scales[4][brfd];
|
||||
zone1offset_y = ff_vc1_b_field_mvpred_scales[6][brfd];
|
||||
scaleopp1 = ff_vc1_b_field_mvpred_scales[1][brfd];
|
||||
scaleopp2 = ff_vc1_b_field_mvpred_scales[2][brfd];
|
||||
|
||||
if (FFABS(n) > 63)
|
||||
scaledvalue = n;
|
||||
@ -1438,7 +1438,7 @@ static av_always_inline int scaleforsame(VC1Context *v, int i, int n /* MV */,
|
||||
return n;
|
||||
}
|
||||
brfd = FFMIN(v->brfd, 3);
|
||||
scalesame = vc1_b_field_mvpred_scales[0][brfd];
|
||||
scalesame = ff_vc1_b_field_mvpred_scales[0][brfd];
|
||||
|
||||
n = (n * scalesame >> 8) << hpel;
|
||||
return n;
|
||||
@ -1462,7 +1462,7 @@ static av_always_inline int scaleforopp(VC1Context *v, int n /* MV */,
|
||||
refdist = FFMIN(v->refdist, 3);
|
||||
else
|
||||
refdist = dir ? v->brfd : v->frfd;
|
||||
scaleopp = vc1_field_mvpred_scales[dir ^ v->second_field][0][refdist];
|
||||
scaleopp = ff_vc1_field_mvpred_scales[dir ^ v->second_field][0][refdist];
|
||||
|
||||
n = (n * scaleopp >> 8) << hpel;
|
||||
return n;
|
||||
@ -5281,7 +5281,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
|
||||
|
||||
init_get_bits(&gb, avctx->extradata, avctx->extradata_size*8);
|
||||
|
||||
if (vc1_decode_sequence_header(avctx, v, &gb) < 0)
|
||||
if (ff_vc1_decode_sequence_header(avctx, v, &gb) < 0)
|
||||
return -1;
|
||||
|
||||
count = avctx->extradata_size*8 - get_bits_count(&gb);
|
||||
@ -5316,14 +5316,14 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
|
||||
init_get_bits(&gb, buf2, buf2_size * 8);
|
||||
switch (AV_RB32(start)) {
|
||||
case VC1_CODE_SEQHDR:
|
||||
if (vc1_decode_sequence_header(avctx, v, &gb) < 0) {
|
||||
if (ff_vc1_decode_sequence_header(avctx, v, &gb) < 0) {
|
||||
av_free(buf2);
|
||||
return -1;
|
||||
}
|
||||
seq_initialized = 1;
|
||||
break;
|
||||
case VC1_CODE_ENTRYPOINT:
|
||||
if (vc1_decode_entry_point(avctx, v, &gb) < 0) {
|
||||
if (ff_vc1_decode_entry_point(avctx, v, &gb) < 0) {
|
||||
av_free(buf2);
|
||||
return -1;
|
||||
}
|
||||
@ -5501,7 +5501,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
||||
case VC1_CODE_ENTRYPOINT: /* it should be before frame data */
|
||||
buf_size2 = vc1_unescape_buffer(start + 4, size, buf2);
|
||||
init_get_bits(&s->gb, buf2, buf_size2 * 8);
|
||||
vc1_decode_entry_point(avctx, v, &s->gb);
|
||||
ff_vc1_decode_entry_point(avctx, v, &s->gb);
|
||||
break;
|
||||
case VC1_CODE_SLICE: {
|
||||
int buf_size3;
|
||||
@ -5600,11 +5600,11 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
||||
// do parse frame header
|
||||
v->pic_header_flag = 0;
|
||||
if (v->profile < PROFILE_ADVANCED) {
|
||||
if (vc1_parse_frame_header(v, &s->gb) == -1) {
|
||||
if (ff_vc1_parse_frame_header(v, &s->gb) == -1) {
|
||||
goto err;
|
||||
}
|
||||
} else {
|
||||
if (vc1_parse_frame_header_adv(v, &s->gb) == -1) {
|
||||
if (ff_vc1_parse_frame_header_adv(v, &s->gb) == -1) {
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
@ -5699,10 +5699,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
||||
if (i) {
|
||||
v->pic_header_flag = 0;
|
||||
if (v->field_mode && i == n_slices1 + 2)
|
||||
vc1_parse_frame_header_adv(v, &s->gb);
|
||||
ff_vc1_parse_frame_header_adv(v, &s->gb);
|
||||
else if (get_bits1(&s->gb)) {
|
||||
v->pic_header_flag = 1;
|
||||
vc1_parse_frame_header_adv(v, &s->gb);
|
||||
ff_vc1_parse_frame_header_adv(v, &s->gb);
|
||||
}
|
||||
}
|
||||
s->start_mb_y = (i == 0) ? 0 : FFMAX(0, slices[i-1].mby_start % mb_height);
|
||||
|
Loading…
x
Reference in New Issue
Block a user