[FFmpeg-devel] [PATCH] HWAccel infrastructure (take 6)
Gwenole Beauchesne
gbeauchesne
Fri Feb 20 17:25:49 CET 2009
Le 20 f?vr. 09 ? 15:36, Michael Niedermayer a ?crit :
>>> i still think this is ugly implemented ...
>>
>> Well, I need at least two things: the slice size and mb_y. I
>> preferred
>> regrouping everything into the original mpeg_decode_slice(),
>> otherwise, with a buf temporary, we would have to maintain at least 3
>> locations where we (i) update mb_y, (ii) record current slice
>> position, (iii) early on top do buf-prev_buf to get the size and call
>> hwaccel->decode_slice() and even (iv) for the very last slice.
>>
>> What would you suggest?
>
> dunno, lets leave it for now if you dont see a way to improve it
> little in the patch depends on how mpeg1/2 is dealt with ...
Moving the code back into decode_chunks() and getting rid of the extra
ff_find_start_code() would require either of the following solutions:
(1) Perform one hwaccel->decode_slice() at the end of the frame
(before slice_end() check) and another call down in the normal "slice"
case + in both case, updating s->mb_{x,y} et al.
-or-
(2) Perform a single hwaccel->decode_slice() at the begining of the
loop but maintain another variable (beyond the "old_buf_start"): an
"old_start_code" one to actually know if the previous iteration dealt
with a slice.
I really think keeping the current code in the original
mpeg_decode_slice() better, because it's a single (and natural, IMO)
location to maintain.
Here is a new patch. Is this OK now?
+commit db6b465c156b7c741e5dbbd60990c1c0397bc885
+Author: Gwenole Beauchesne <gbeauchesne at splitted-desktop.com>
+Date: Fri Feb 20 16:05:13 2009 +0000
+
+ Drop PIX_FMT_NONE check in ff_query_hwaccel_codec(). Lookup
hwaccel in array differently. A user can't sanely return an unknown
pix_fmt unless he was under drugs influence while writing his code.
+
+commit bc0c9291d4a5ef753e41f99d9669b2e3ecb57a9d
+Author: Gwenole Beauchesne <gbeauchesne at splitted-desktop.com>
+Date: Fri Feb 20 15:58:36 2009 +0000
+
+ Drop pix_fmt bounds checking in ff_is_hwaccel_pix_fmt().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.hwaccel.6.patch
Type: application/octet-stream
Size: 29174 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090220/0be8a2e7/attachment.obj>
-------------- next part --------------
More information about the ffmpeg-devel
mailing list