aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg4videoenc.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-04-29 18:53:57 +0200
committerDiego Biurrun <diego@biurrun.de>2011-05-02 12:18:44 +0200
commit975a1447f76e8d30fc01e6ea5466c84faf3d76e4 (patch)
treed462ee5cc7a2f59c44f797c97fc237c999c94e55 /libavcodec/mpeg4videoenc.c
parent6209669de4a0aa056ae05b0a2c78eaf2ca489b23 (diff)
downloadffmpeg-975a1447f76e8d30fc01e6ea5466c84faf3d76e4.tar.gz
Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/mpeg4videoenc.c')
-rw-r--r--libavcodec/mpeg4videoenc.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 33ecc0ae46..8a9bd198df 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -205,7 +205,7 @@ void ff_clean_mpeg4_qscales(MpegEncContext *s){
ff_clean_h263_qscales(s);
- if(s->pict_type== FF_B_TYPE){
+ if(s->pict_type== AV_PICTURE_TYPE_B){
int odd=0;
/* ok, come on, this isn't funny anymore, there's more code for handling this mpeg4 mess than for the actual adaptive quantization */
@@ -497,14 +497,14 @@ void mpeg4_encode_mb(MpegEncContext * s,
{
int cbpc, cbpy, pred_x, pred_y;
PutBitContext * const pb2 = s->data_partitioning ? &s->pb2 : &s->pb;
- PutBitContext * const tex_pb = s->data_partitioning && s->pict_type!=FF_B_TYPE ? &s->tex_pb : &s->pb;
- PutBitContext * const dc_pb = s->data_partitioning && s->pict_type!=FF_I_TYPE ? &s->pb2 : &s->pb;
+ PutBitContext * const tex_pb = s->data_partitioning && s->pict_type!=AV_PICTURE_TYPE_B ? &s->tex_pb : &s->pb;
+ PutBitContext * const dc_pb = s->data_partitioning && s->pict_type!=AV_PICTURE_TYPE_I ? &s->pb2 : &s->pb;
const int interleaved_stats= (s->flags&CODEC_FLAG_PASS1) && !s->data_partitioning ? 1 : 0;
if (!s->mb_intra) {
int i, cbp;
- if(s->pict_type==FF_B_TYPE){
+ if(s->pict_type==AV_PICTURE_TYPE_B){
static const int mb_type_table[8]= {-1, 3, 2, 1,-1,-1,-1, 0}; /* convert from mv_dir to type */
int mb_type= mb_type_table[s->mv_dir];
@@ -637,7 +637,7 @@ void mpeg4_encode_mb(MpegEncContext * s,
s->p_tex_bits+= get_bits_diff(s);
}
- }else{ /* s->pict_type==FF_B_TYPE */
+ }else{ /* s->pict_type==AV_PICTURE_TYPE_B */
cbp= get_p_cbp(s, block, motion_x, motion_y);
if ((cbp | motion_x | motion_y | s->dquant) == 0 && s->mv_type==MV_TYPE_16X16) {
@@ -662,7 +662,7 @@ void mpeg4_encode_mb(MpegEncContext * s,
int diff;
Picture *pic= s->reordered_input_picture[i+1];
- if(pic==NULL || pic->pict_type!=FF_B_TYPE) break;
+ if(pic==NULL || pic->pict_type!=AV_PICTURE_TYPE_B) break;
b_pic= pic->data[0] + offset;
if(pic->type != FF_BUFFER_TYPE_SHARED)
@@ -812,7 +812,7 @@ void mpeg4_encode_mb(MpegEncContext * s,
}
cbpc = cbp & 3;
- if (s->pict_type == FF_I_TYPE) {
+ if (s->pict_type == AV_PICTURE_TYPE_I) {
if(s->dquant) cbpc+=4;
put_bits(&s->pb,
ff_h263_intra_MCBPC_bits[cbpc],
@@ -864,7 +864,7 @@ void ff_mpeg4_stuffing(PutBitContext * pbc)
/* must be called before writing the header */
void ff_set_mpeg4_time(MpegEncContext * s){
- if(s->pict_type==FF_B_TYPE){
+ if(s->pict_type==AV_PICTURE_TYPE_B){
ff_mpeg4_init_direct_mv(s);
}else{
s->last_time_base= s->time_base;
@@ -1054,7 +1054,7 @@ void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
int time_incr;
int time_div, time_mod;
- if(s->pict_type==FF_I_TYPE){
+ if(s->pict_type==AV_PICTURE_TYPE_I){
if(!(s->flags&CODEC_FLAG_GLOBAL_HEADER)){
if(s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT) //HACK, the reference sw is buggy
mpeg4_encode_visual_object_header(s);
@@ -1065,7 +1065,7 @@ void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
mpeg4_encode_gop_header(s);
}
- s->partitioned_frame= s->data_partitioning && s->pict_type!=FF_B_TYPE;
+ s->partitioned_frame= s->data_partitioning && s->pict_type!=AV_PICTURE_TYPE_B;
put_bits(&s->pb, 16, 0); /* vop header */
put_bits(&s->pb, 16, VOP_STARTCODE); /* vop header */
@@ -1085,8 +1085,8 @@ void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
put_bits(&s->pb, s->time_increment_bits, time_mod); /* time increment */
put_bits(&s->pb, 1, 1); /* marker */
put_bits(&s->pb, 1, 1); /* vop coded */
- if ( s->pict_type == FF_P_TYPE
- || (s->pict_type == FF_S_TYPE && s->vol_sprite_usage==GMC_SPRITE)) {
+ if ( s->pict_type == AV_PICTURE_TYPE_P
+ || (s->pict_type == AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE)) {
put_bits(&s->pb, 1, s->no_rounding); /* rounding type */
}
put_bits(&s->pb, 3, 0); /* intra dc VLC threshold */
@@ -1098,9 +1098,9 @@ void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
put_bits(&s->pb, 5, s->qscale);
- if (s->pict_type != FF_I_TYPE)
+ if (s->pict_type != AV_PICTURE_TYPE_I)
put_bits(&s->pb, 3, s->f_code); /* fcode_for */
- if (s->pict_type == FF_B_TYPE)
+ if (s->pict_type == AV_PICTURE_TYPE_B)
put_bits(&s->pb, 3, s->b_code); /* fcode_back */
}
@@ -1305,7 +1305,7 @@ void ff_mpeg4_merge_partitions(MpegEncContext *s)
const int tex_pb_len= put_bits_count(&s->tex_pb);
const int bits= put_bits_count(&s->pb);
- if(s->pict_type==FF_I_TYPE){
+ if(s->pict_type==AV_PICTURE_TYPE_I){
put_bits(&s->pb, 19, DC_MARKER);
s->misc_bits+=19 + pb2_len + bits - s->last_bits;
s->i_tex_bits+= tex_pb_len;