[MPlayer-dev-eng] [PATCH] Add video acceleration infrastructure
Uoti Urpala
uoti.urpala at pp1.inet.fi
Mon Sep 28 16:33:53 CEST 2009
On Mon, 2009-09-28 at 15:23 +0200, Gwenole Beauchesne wrote:
> This patch adds video acceleration infrastructure based on the AVHWAccel
> v2 infrastructure (see ffmpeg-devel@). This changes very few existing
> files.
>
> With a future patch, ./mplayer -vo xv /path/to/some/file will:
> - Automatically use e.g. VAAPI for a supported codec
> - Automatically fallback to SW decoding when there is no HW accelerator
There should be a way for the user to force software decoding. And it's
not clear whether hardware decoding should be the default even if it is
available. For codecs that require little CPU like MPEG2 hardware
decoding is likely to create extra problems but give little if any
benefit.
Is there currently any case where using VAAPI decoding would be the
preferred choice in practice?
> +static uintptr_t *video_accel_attrs;
> +static unsigned int video_accel_attrs_size;
> +static enum VideoAccelStatus video_accel_status = VIDEO_ACCEL_STATUS_IDLE;
> +static VideoAccelerator *video_accels;
> +static unsigned int video_accels_count;
> +static VideoAccelerator *video_accel;
You should use a context struct instead of adding global/static data.
More information about the MPlayer-dev-eng
mailing list