aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-17 02:25:05 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-17 02:25:05 +0000
commit69a28f3e2bdbf10ac5b4e73fafa447eb570e1da4 (patch)
treeb125caecd28872a90c33319c81a9fc69e049595c /libavcodec/h264.c
parent69cc31832f47f00be8cac9c2c97a04ebb4844dec (diff)
downloadffmpeg-69a28f3e2bdbf10ac5b4e73fafa447eb570e1da4.tar.gz
Move predict_field_decoding_flag() from h264.h to .c as its only used there and belongs
there as well. Originally committed as revision 21861 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 62ee92090a..6b42cbbcf2 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2200,6 +2200,17 @@ static void loop_filter(H264Context *h){
h->chroma_qp[1] = get_chroma_qp(h, 1, s->qscale);
}
+static void predict_field_decoding_flag(H264Context *h){
+ MpegEncContext * const s = &h->s;
+ const int mb_xy= s->mb_x + s->mb_y*s->mb_stride;
+ int mb_type = (h->slice_table[mb_xy-1] == h->slice_num)
+ ? s->current_picture.mb_type[mb_xy-1]
+ : (h->slice_table[mb_xy-s->mb_stride] == h->slice_num)
+ ? s->current_picture.mb_type[mb_xy-s->mb_stride]
+ : 0;
+ h->mb_mbaff = h->mb_field_decoding_flag = IS_INTERLACED(mb_type) ? 1 : 0;
+}
+
static int decode_slice(struct AVCodecContext *avctx, void *arg){
H264Context *h = *(void**)arg;
MpegEncContext * const s = &h->s;