Mercurial > libavcodec.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
11191:5e583a785508 | 11192:e1b4f03037d5 |
---|---|
2198 s->mb_y= end_mb_y - FRAME_MBAFF; | 2198 s->mb_y= end_mb_y - FRAME_MBAFF; |
2199 h->chroma_qp[0] = get_chroma_qp(h, 0, s->qscale); | 2199 h->chroma_qp[0] = get_chroma_qp(h, 0, s->qscale); |
2200 h->chroma_qp[1] = get_chroma_qp(h, 1, s->qscale); | 2200 h->chroma_qp[1] = get_chroma_qp(h, 1, s->qscale); |
2201 } | 2201 } |
2202 | 2202 |
2203 static void predict_field_decoding_flag(H264Context *h){ | |
2204 MpegEncContext * const s = &h->s; | |
2205 const int mb_xy= s->mb_x + s->mb_y*s->mb_stride; | |
2206 int mb_type = (h->slice_table[mb_xy-1] == h->slice_num) | |
2207 ? s->current_picture.mb_type[mb_xy-1] | |
2208 : (h->slice_table[mb_xy-s->mb_stride] == h->slice_num) | |
2209 ? s->current_picture.mb_type[mb_xy-s->mb_stride] | |
2210 : 0; | |
2211 h->mb_mbaff = h->mb_field_decoding_flag = IS_INTERLACED(mb_type) ? 1 : 0; | |
2212 } | |
2213 | |
2203 static int decode_slice(struct AVCodecContext *avctx, void *arg){ | 2214 static int decode_slice(struct AVCodecContext *avctx, void *arg){ |
2204 H264Context *h = *(void**)arg; | 2215 H264Context *h = *(void**)arg; |
2205 MpegEncContext * const s = &h->s; | 2216 MpegEncContext * const s = &h->s; |
2206 const int part_mask= s->partitioned_frame ? (AC_END|AC_ERROR) : 0x7F; | 2217 const int part_mask= s->partitioned_frame ? (AC_END|AC_ERROR) : 0x7F; |
2207 | 2218 |