Revision 69a28f3e

View differences:

libavcodec/h264.c
2200 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 2214
static int decode_slice(struct AVCodecContext *avctx, void *arg){
2204 2215
    H264Context *h = *(void**)arg;
2205 2216
    MpegEncContext * const s = &h->s;
libavcodec/h264.h
1451 1451
        return !(*(uint64_t*)h->sub_mb_type & ((MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8|MB_TYPE_DIRECT2)*0x0001000100010001ULL));
1452 1452
}
1453 1453

  
1454
static void predict_field_decoding_flag(H264Context *h){
1455
    MpegEncContext * const s = &h->s;
1456
    const int mb_xy= s->mb_x + s->mb_y*s->mb_stride;
1457
    int mb_type = (h->slice_table[mb_xy-1] == h->slice_num)
1458
                ? s->current_picture.mb_type[mb_xy-1]
1459
                : (h->slice_table[mb_xy-s->mb_stride] == h->slice_num)
1460
                ? s->current_picture.mb_type[mb_xy-s->mb_stride]
1461
                : 0;
1462
    h->mb_mbaff = h->mb_field_decoding_flag = IS_INTERLACED(mb_type) ? 1 : 0;
1463
}
1464

  
1465 1454
/**
1466 1455
 * decodes a P_SKIP or B_SKIP macroblock
1467 1456
 */

Also available in: Unified diff