Mercurial > libavcodec.hg
diff h264.c @ 11192:e1b4f03037d5 libavcodec
Move predict_field_decoding_flag() from h264.h to .c as its only used there and belongs
there as well.
author | michael |
---|---|
date | Wed, 17 Feb 2010 02:25:05 +0000 |
parents | 5e583a785508 |
children | 778139a5e058 |
line wrap: on
line diff
--- a/h264.c Wed Feb 17 02:14:02 2010 +0000 +++ b/h264.c Wed Feb 17 02:25:05 2010 +0000 @@ -2200,6 +2200,17 @@ 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;