Revision ce5e49b0 libavcodec/vaapi_vc1.c

View differences:

libavcodec/vaapi_vc1.c
42 42
{
43 43
    if (v->mv_type_is_raw)
44 44
        return 0;
45
    return (v->s.pict_type == FF_P_TYPE &&
45
    return (v->s.pict_type == AV_PICTURE_TYPE_P &&
46 46
            (v->mv_mode == MV_PMODE_MIXED_MV ||
47 47
             (v->mv_mode == MV_PMODE_INTENSITY_COMP &&
48 48
              v->mv_mode2 == MV_PMODE_MIXED_MV)));
......
53 53
{
54 54
    if (v->skip_is_raw)
55 55
        return 0;
56
    return (v->s.pict_type == FF_P_TYPE ||
57
            (v->s.pict_type == FF_B_TYPE && !v->bi_type));
56
    return (v->s.pict_type == AV_PICTURE_TYPE_P ||
57
            (v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type));
58 58
}
59 59

  
60 60
/** Check whether the DIRECTMB bitplane is present */
......
62 62
{
63 63
    if (v->dmb_is_raw)
64 64
        return 0;
65
    return v->s.pict_type == FF_B_TYPE && !v->bi_type;
65
    return v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type;
66 66
}
67 67

  
68 68
/** Check whether the ACPRED bitplane is present */
......
71 71
    if (v->acpred_is_raw)
72 72
        return 0;
73 73
    return (v->profile == PROFILE_ADVANCED &&
74
            (v->s.pict_type == FF_I_TYPE ||
75
             (v->s.pict_type == FF_B_TYPE && v->bi_type)));
74
            (v->s.pict_type == AV_PICTURE_TYPE_I ||
75
             (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type)));
76 76
}
77 77

  
78 78
/** Check whether the OVERFLAGS bitplane is present */
......
81 81
    if (v->overflg_is_raw)
82 82
        return 0;
83 83
    return (v->profile == PROFILE_ADVANCED &&
84
            (v->s.pict_type == FF_I_TYPE ||
85
             (v->s.pict_type == FF_B_TYPE && v->bi_type)) &&
84
            (v->s.pict_type == AV_PICTURE_TYPE_I ||
85
             (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type)) &&
86 86
            (v->overlap && v->pq <= 8) &&
87 87
            v->condover == CONDOVER_SELECT);
88 88
}
......
92 92
{
93 93
    MpegEncContext * const s = &v->s;
94 94
    switch (s->pict_type) {
95
    case FF_I_TYPE: return 0;
96
    case FF_P_TYPE: return v->p_frame_skipped ? 4 : 1;
97
    case FF_B_TYPE: return v->bi_type         ? 3 : 2;
95
    case AV_PICTURE_TYPE_I: return 0;
96
    case AV_PICTURE_TYPE_P: return v->p_frame_skipped ? 4 : 1;
97
    case AV_PICTURE_TYPE_B: return v->bi_type         ? 3 : 2;
98 98
    }
99 99
    return 0;
100 100
}
......
102 102
/** Reconstruct bitstream MVMODE (7.1.1.32) */
103 103
static inline VAMvModeVC1 vc1_get_MVMODE(VC1Context *v)
104 104
{
105
    if (v->s.pict_type == FF_P_TYPE ||
106
        (v->s.pict_type == FF_B_TYPE && !v->bi_type))
105
    if (v->s.pict_type == AV_PICTURE_TYPE_P ||
106
        (v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type))
107 107
        return get_VAMvModeVC1(v->mv_mode);
108 108
    return 0;
109 109
}
......
111 111
/** Reconstruct bitstream MVMODE2 (7.1.1.33) */
112 112
static inline VAMvModeVC1 vc1_get_MVMODE2(VC1Context *v)
113 113
{
114
    if (v->s.pict_type == FF_P_TYPE && v->mv_mode == MV_PMODE_INTENSITY_COMP)
114
    if (v->s.pict_type == AV_PICTURE_TYPE_P && v->mv_mode == MV_PMODE_INTENSITY_COMP)
115 115
        return get_VAMvModeVC1(v->mv_mode2);
116 116
    return 0;
117 117
}
......
245 245
    pic_param->transform_fields.bits.intra_transform_dc_table       = v->s.dc_table_index;
246 246

  
247 247
    switch (s->pict_type) {
248
    case FF_B_TYPE:
248
    case AV_PICTURE_TYPE_B:
249 249
        pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture);
250 250
        // fall-through
251
    case FF_P_TYPE:
251
    case AV_PICTURE_TYPE_P:
252 252
        pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture);
253 253
        break;
254 254
    }
......
259 259
        int x, y, n;
260 260

  
261 261
        switch (s->pict_type) {
262
        case FF_P_TYPE:
262
        case AV_PICTURE_TYPE_P:
263 263
            ff_bp[0] = pic_param->bitplane_present.flags.bp_direct_mb  ? v->direct_mb_plane    : NULL;
264 264
            ff_bp[1] = pic_param->bitplane_present.flags.bp_skip_mb    ? s->mbskip_table       : NULL;
265 265
            ff_bp[2] = pic_param->bitplane_present.flags.bp_mv_type_mb ? v->mv_type_mb_plane   : NULL;
266 266
            break;
267
        case FF_B_TYPE:
267
        case AV_PICTURE_TYPE_B:
268 268
            if (!v->bi_type) {
269 269
                ff_bp[0] = pic_param->bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL;
270 270
                ff_bp[1] = pic_param->bitplane_present.flags.bp_skip_mb   ? s->mbskip_table    : NULL;
......
272 272
                break;
273 273
            }
274 274
            /* fall-through (BI-type) */
275
        case FF_I_TYPE:
275
        case AV_PICTURE_TYPE_I:
276 276
            ff_bp[0] = NULL; /* XXX: interlaced frame (FIELDTX plane) */
277 277
            ff_bp[1] = pic_param->bitplane_present.flags.bp_ac_pred    ? v->acpred_plane       : NULL;
278 278
            ff_bp[2] = pic_param->bitplane_present.flags.bp_overflags  ? v->over_flags_plane   : NULL;

Also available in: Unified diff