Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-22 21:12:51 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-05-22 21:24:41 +0300
commitd9b264bc73723ce538d72f28a4a8fb4f85af7eca (patch)
tree7a2f93dbd9adf87534c29c932ed157941a2c4af6 /libavcodec/mpegvideo.c
parent337aa17e61091500b95d6127c9ffd65d9086decb (diff)
parent848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42 (diff)
Merge commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42'
* commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42': mpegvideo: Drop flags and flags2 Conflicts: libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/ratecontrol.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 11d6729195..61c9fae57c 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -405,7 +405,7 @@ static av_cold int dct_init(MpegEncContext *s)
s->dct_unquantize_mpeg1_intra = dct_unquantize_mpeg1_intra_c;
s->dct_unquantize_mpeg1_inter = dct_unquantize_mpeg1_inter_c;
s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_c;
- if (s->flags & CODEC_FLAG_BITEXACT)
+ if (s->avctx->flags & CODEC_FLAG_BITEXACT)
s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact;
s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c;
@@ -1122,8 +1122,6 @@ void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx)
s->height = avctx->coded_height;
s->codec_id = avctx->codec->id;
s->workaround_bugs = avctx->workaround_bugs;
- s->flags = avctx->flags;
- s->flags2 = avctx->flags2;
/* convert fourcc to upper case */
s->codec_tag = avpriv_toupper4(avctx->codec_tag);
@@ -1234,7 +1232,7 @@ static int init_context_frame(MpegEncContext *s)
}
if (s->codec_id == AV_CODEC_ID_MPEG4 ||
- (s->flags & CODEC_FLAG_INTERLACED_ME)) {
+ (s->avctx->flags & CODEC_FLAG_INTERLACED_ME)) {
/* interlaced direct mode decoding tables */
for (i = 0; i < 2; i++) {
int j, k;
@@ -1330,9 +1328,6 @@ av_cold int ff_mpv_common_init(MpegEncContext *s)
dct_init(s);
- s->flags = s->avctx->flags;
- s->flags2 = s->avctx->flags2;
-
/* set chroma shifts */
avcodec_get_chroma_sub_sample(s->avctx->pix_fmt,
&s->chroma_x_shift,
@@ -1839,7 +1834,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
s->current_picture_ptr->field_picture = s->picture_structure != PICT_FRAME;
s->current_picture_ptr->f->pict_type = s->pict_type;
- // if (s->flags && CODEC_FLAG_QSCALE)
+ // if (s->avctx->flags && CODEC_FLAG_QSCALE)
// s->current_picture_ptr->quality = s->new_picture_ptr->quality;
s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I;
@@ -2683,7 +2678,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
src_x, src_y << field_based, h_edge_pos,
v_edge_pos);
ptr_y = s->edge_emu_buffer;
- if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
uint8_t *ubuf = s->edge_emu_buffer + 18 * s->linesize;
uint8_t *vbuf =ubuf + 9 * s->uvlinesize;
s->vdsp.emulated_edge_mc(ubuf, ptr_cb,
@@ -2718,7 +2713,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
sy = (sy << 2) >> lowres;
pix_op[lowres - 1](dest_y, ptr_y, linesize, h, sx, sy);
- if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
int hc = s->chroma_y_shift ? (h+1-bottom_field)>>1 : h;
uvsx = (uvsx << 2) >> lowres;
uvsy = (uvsy << 2) >> lowres;
@@ -2838,7 +2833,7 @@ static inline void MPV_motion_lowres(MpegEncContext *s,
my += s->mv[dir][i][1];
}
- if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY))
+ if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY))
chroma_4mv_motion_lowres(s, dest_cb, dest_cr, ref_picture,
pix_op, mx, my);
break;
@@ -3078,9 +3073,9 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
else if (!is_mpeg12 && (s->h263_pred || s->h263_aic))
s->mbintra_table[mb_xy]=1;
- if ( (s->flags&CODEC_FLAG_PSNR)
- || s->avctx->frame_skip_threshold || s->avctx->frame_skip_factor
- || !(s->encoding && (s->intra_only || s->pict_type==AV_PICTURE_TYPE_B) && s->avctx->mb_decision != FF_MB_DECISION_RD)) { //FIXME precalc
+ if ((s->avctx->flags & CODEC_FLAG_PSNR) || s->avctx->frame_skip_threshold || s->avctx->frame_skip_factor ||
+ !(s->encoding && (s->intra_only || s->pict_type == AV_PICTURE_TYPE_B) &&
+ s->avctx->mb_decision != FF_MB_DECISION_RD)) { // FIXME precalc
uint8_t *dest_y, *dest_cb, *dest_cr;
int dct_linesize, dct_offset;
op_pixels_func (*op_pix)[4];
@@ -3181,7 +3176,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
add_dequant_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);
add_dequant_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale);
- if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
+ if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
if (s->chroma_y_shift){
add_dequant_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale);
add_dequant_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale);
@@ -3200,7 +3195,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize);
add_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize);
- if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
+ if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
if(s->chroma_y_shift){//Chroma420
add_dct(s, block[4], 4, dest_cb, uvlinesize);
add_dct(s, block[5], 5, dest_cr, uvlinesize);
@@ -3233,7 +3228,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);
put_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->qscale);
- if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
+ if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
if(s->chroma_y_shift){
put_dct(s, block[4], 4, dest_cb, uvlinesize, s->chroma_qscale);
put_dct(s, block[5], 5, dest_cr, uvlinesize, s->chroma_qscale);
@@ -3252,7 +3247,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
s->idsp.idct_put(dest_y + dct_offset, dct_linesize, block[2]);
s->idsp.idct_put(dest_y + dct_offset + block_size, dct_linesize, block[3]);
- if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
+ if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
if(s->chroma_y_shift){
s->idsp.idct_put(dest_cb, uvlinesize, block[4]);
s->idsp.idct_put(dest_cr, uvlinesize, block[5]);
@@ -3278,7 +3273,7 @@ void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64],
skip_idct:
if(!readable){
s->hdsp.put_pixels_tab[0][0](s->dest[0], dest_y , linesize,16);
- if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
+ if (!CONFIG_GRAY || !(s->avctx->flags & CODEC_FLAG_GRAY)) {
s->hdsp.put_pixels_tab[s->chroma_x_shift][0](s->dest[1], dest_cb, uvlinesize,16 >> s->chroma_y_shift);
s->hdsp.put_pixels_tab[s->chroma_x_shift][0](s->dest[2], dest_cr, uvlinesize,16 >> s->chroma_y_shift);
}