[FFmpeg-devel] [PATCH] mpeg12.c: add HW acceleration hooks (take 2)

Michael Niedermayer michaelni
Thu Feb 26 13:26:48 CET 2009


On Thu, Feb 26, 2009 at 01:22:16PM +0100, Gwenole Beauchesne wrote:
> On Thu, 26 Feb 2009, Michael Niedermayer wrote:
> 
> >> @@ -2403,6 +2421,13 @@ static int decode_chunks(AVCodecContext *avctx,
> >>                      break;
> >>                  }
> >>
> >> +                if (avctx->hwaccel) {
> >> +                    ret = mpeg_decode_slice(s, mb_y, &buf_ptr, input_size);
> >> +                    if (ret != DECODE_SLICE_OK)
> >> +                        return -1;
> >> +                    break;
> >> +                }
> >
> > why is the call to mpeg_decode_slice a few lines latr in the else
> > not enough?
> 
> emms_c() would be superfluous,

doesnt hurt, its fast in respect to decoding a slice.


> and ff_er_add_slice() would trigger the 
> following: "internal error, slice end before start".

theres already a if(hwaccel) return in ff_erframe_end() another
in ff_er_add_slice shouldnt hurt.


> And since we removed 
> resync_mb_x et al. assignments, I would probably have to add an if 
> (avctx->hwaccel) return; in that function. Would that be ok with it?

i dont mind adding the resync_mb_x back if it simplifies some code,
iam just against it if its useless

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090226/69227724/attachment.pgp>



More information about the ffmpeg-devel mailing list