[FFmpeg-devel] [PATCH][VAAPI][5/6] Add VC-1 bitstream decoding (take 4)
Kostya
kostya.shishkov
Sun Mar 22 06:23:14 CET 2009
On Sun, Mar 22, 2009 at 02:50:44AM +0100, Gwenole Beauchesne wrote:
> On Wed, 18 Mar 2009, Kostya wrote:
>
> >Isn't that part a bit useless until there's no HWAccel support in vc1.c?
>
> It's now in and a new patch is attached to cope with (applied) common
> parts. Besides, this also adds missing allcodecs.c part + now always sends
> "skipped" P-frames to the HW too. This is needed for the VDPAU backend and
> the VA API extended the picture_type (PTYPE) to 3 bits to hold that extra
> information.
[...]
> +
> +/** Checks whether the SKIPMB bitplane is present */
> +static inline int vc1_has_SKIPMB_bitplane(VC1Context *v)
> +{
> + return (v->s.pict_type == FF_P_TYPE || v->s.pict_type == FF_B_TYPE);
> +}
> +
> +/** Checks whether the DIRECTMB bitplane is present */
> +static inline int vc1_has_DIRECTMB_bitplane(VC1Context *v)
> +{
> + return v->s.pict_type == FF_B_TYPE;
> +}
> +
> +/** Checks whether the ACPRED bitplane is present */
> +static inline int vc1_has_ACPRED_bitplane(VC1Context *v)
> +{
> + return (v->profile == PROFILE_ADVANCED &&
> + (v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_BI_TYPE));
> +}
> +
> +/** Check whether the OVERFLAGS bitplane is present */
> +static inline int vc1_has_OVERFLAGS_bitplane(VC1Context *v)
> +{
> + return (v->profile == PROFILE_ADVANCED &&
> + (v->s.pict_type == FF_I_TYPE || v->s.pict_type == FF_BI_TYPE) &&
> + (v->overlap && v->pq <= 8) &&
> + v->condover == CONDOVER_SELECT);
> +}
Hmm, does that indicate cases where bitplane MAY be present or where it is decoded
explicitly (any bitplane may be coded as a bit in each macroblock header instead)?
[...]
> +
> +/** Reconstruct bitstream PTYPE (7.1.1.4) */
> +static int vc1_get_PTYPE(VC1Context *v)
> +{
> + MpegEncContext * const s = &v->s;
> + switch (s->pict_type) {
> + case FF_I_TYPE: return 0;
> + case FF_P_TYPE: return v->p_frame_skipped ? 4 : 1;
> + case FF_B_TYPE: return v->bi_type ? 3 : 2;
> + }
> + assert(0);
> + return 0;
> +}
No enums here?
[...]
the rest looks more or less ok to me
More information about the ffmpeg-devel
mailing list