summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4videoenc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-04-27 19:13:25 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-05-22 15:34:39 +0100
commit848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42 (patch)
treee02dd312ec6d21fb183d1fda8172758156594e05 /libavcodec/mpeg4videoenc.c
parent29216d7fd14d1cec16821867d17c90b5c49e8c07 (diff)
mpegvideo: Drop flags and flags2
They are just duplicates of AVCodecContext members so use those instead.
Diffstat (limited to 'libavcodec/mpeg4videoenc.c')
-rw-r--r--libavcodec/mpeg4videoenc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index e9bc85f878..ab279dd849 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -430,7 +430,7 @@ static inline void mpeg4_encode_blocks(MpegEncContext *s, int16_t block[6][64],
int i;
if (scan_table) {
- if (s->flags2 & CODEC_FLAG2_NO_OUTPUT) {
+ if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) {
for (i = 0; i < 6; i++)
skip_put_bits(&s->pb,
mpeg4_get_block_length(s, block[i], i,
@@ -442,7 +442,7 @@ static inline void mpeg4_encode_blocks(MpegEncContext *s, int16_t block[6][64],
intra_dc[i], scan_table[i], dc_pb, ac_pb);
}
} else {
- if (s->flags2 & CODEC_FLAG2_NO_OUTPUT) {
+ if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) {
for (i = 0; i < 6; i++)
skip_put_bits(&s->pb,
mpeg4_get_block_length(s, block[i], i, 0,
@@ -507,7 +507,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
PutBitContext *const pb2 = s->data_partitioning ? &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;
+ const int interleaved_stats = (s->avctx->flags & CODEC_FLAG_PASS1) && !s->data_partitioning ? 1 : 0;
if (!s->mb_intra) {
int i, cbp;
@@ -822,7 +822,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
for (i = 0; i < 6; i++)
dc_diff[i] = ff_mpeg4_pred_dc(s, i, block[i][0], &dir[i], 1);
- if (s->flags & CODEC_FLAG_AC_PRED) {
+ if (s->avctx->flags & CODEC_FLAG_AC_PRED) {
s->ac_pred = decide_ac_pred(s, block, dir, scan_table, zigzag_last_index);
} else {
for (i = 0; i < 6; i++)
@@ -923,7 +923,7 @@ static void mpeg4_encode_gop_header(MpegEncContext *s)
put_bits(&s->pb, 1, 1);
put_bits(&s->pb, 6, seconds);
- put_bits(&s->pb, 1, !!(s->flags & CODEC_FLAG_CLOSED_GOP));
+ put_bits(&s->pb, 1, !!(s->avctx->flags & CODEC_FLAG_CLOSED_GOP));
put_bits(&s->pb, 1, 0); // broken link == NO
s->last_time_base = time / s->avctx->time_base.den;
@@ -1069,7 +1069,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s,
ff_mpeg4_stuffing(&s->pb);
/* user data */
- if (!(s->flags & CODEC_FLAG_BITEXACT)) {
+ if (!(s->avctx->flags & CODEC_FLAG_BITEXACT)) {
put_bits(&s->pb, 16, 0);
put_bits(&s->pb, 16, 0x1B2); /* user_data */
avpriv_put_string(&s->pb, LIBAVCODEC_IDENT, 0);
@@ -1083,7 +1083,7 @@ void ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
int time_div, time_mod;
if (s->pict_type == AV_PICTURE_TYPE_I) {
- if (!(s->flags & CODEC_FLAG_GLOBAL_HEADER)) {
+ if (!(s->avctx->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);
if (s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT || picture_number == 0) // HACK, the reference sw is buggy
@@ -1312,7 +1312,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->y_dc_scale_table = ff_mpeg4_y_dc_scale_table;
s->c_dc_scale_table = ff_mpeg4_c_dc_scale_table;
- if (s->flags & CODEC_FLAG_GLOBAL_HEADER) {
+ if (s->avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
s->avctx->extradata = av_malloc(1024);
init_put_bits(&s->pb, s->avctx->extradata, 1024);