[FFmpeg-devel] [PATCH] Allow selecting VDPAU, XvMC via get_format for MPEG-2
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Fri Apr 1 19:17:19 CEST 2011
On Thu, Mar 31, 2011 at 10:00:39PM +0300, Ivan Kalvachev wrote:
> On 3/29/11, Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> > On Tue, Mar 29, 2011 at 06:59:34AM +0000, Carl Eugen Hoyos wrote:
> >> Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
> >>
> >> [...]
> >>
> >> > +static inline int uses_vdpau(AVCodecContext *avctx) {
> >> > + return avctx->pix_fmt == PIX_FMT_VDPAU_MPEG1 || avctx->pix_fmt ==
> >> PIX_FMT_VDPAU_MPEG2;
> >>
> >> Shouldn't this be CONFIG_MPEG_VDPAU_DECODER && ...?
> >
> > No, there isn't any reason to have a separare VDPAU decoder in that case,
> > so I'd actually be in favour of removing it with a major bump.
> >
> >> > - if (avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
> >> > {
> >> > + if (uses_vdpau(avctx)) {
> >>
> >> I still wonder if this is really simpler but I certainly have no
> >> objections.
> >
> > Not yet, but I think VDPAU can be switched to use AVHWAccel properly and
> > then
> > all this code goes away.
> > The first step was rather to make the codec easier to use (and as I noticed
> > it will
> > make VDPAU and VAAPI more consistent from a user's view).
>
> Have you committed/pushed this patch already?
Done now.
> I may try to port XvMC to hwaccel (at least partially), I won't mind
> discussing some implementation details first.
Might be a bit hard, AVHWAccel IMO currently is only intended for bitstream
acceleration.
Well, it might be possible to use it partially in a similar way to how I
hacked VDPAU now, but on the other hand I don't know if maybe xvmc can
run at least parts of the error concealment in a way that is reasonable?
Setting hwaccel will automatically disable a lot of error concealment code.
More information about the ffmpeg-devel
mailing list