[FFmpeg-devel] [PATCH] h264.c: add HW acceleration hooks (take 2)
Michael Niedermayer
michaelni
Fri Feb 27 14:03:14 CET 2009
On Fri, Feb 27, 2009 at 01:46:26PM +0100, Gwenole Beauchesne wrote:
> On Fri, 27 Feb 2009, Benoit Fouet wrote:
>
>>> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
>>> index 24dc201..160edb0 100644
>>> --- a/libavcodec/h264.c
>>> +++ b/libavcodec/h264.c
>>> @@ -7490,6 +7490,11 @@ static int decode_nal_units(H264Context *h, const
>>> uint8_t *buf, int buf_size){
>>> if((err = decode_slice_header(hx, h)))
>>> break;
>>>
>>> + if (s->avctx->hwaccel && h->current_slice == 1) {
>>> + if (s->avctx->hwaccel->start_frame(s->avctx, NULL, 0) <
>>> 0)
>>> + return -1;
>>> + }
>>> +
>>>
>>
>> the if()'s can be merged (not sure this is important though)
>
> Actually, I will probably only move the h->current_slice == 1 beneath
> instead. I'd like to keep the if (s->avctx->hwaccel) { ... } structure as
> is so that it could be converted to an if (CONFIG_HWACCEL &&
> s->avctx->hwaccel) {}?afterwards.
>
> Don't know what Michael think about it though.
i think all 3 in one if is maybe too crowded
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- 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/20090227/c55e93a7/attachment.pgp>
More information about the ffmpeg-devel
mailing list