[FFmpeg-devel] [PATCH] FFV1 rectangular slice multithreading

Michael Niedermayer michaelni
Thu Oct 14 17:09:30 CEST 2010


On Thu, Oct 14, 2010 at 06:33:08AM -0700, Jason Garrett-Glaser wrote:
> On Thu, Oct 14, 2010 at 5:59 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Hi
> >
> > Following patchset makes ffv1.2 much faster on multiprocessor systems
> > (requires version to be set to 2, which needs you to edit the source if you
> > ?want to try as 1.2 bitstream is not finalized yet)
> >
> > Compression wise 4 slices with foreman and large gops (300 frames) perform
> > slightly better (0.05% IIRC) than 1 slice.
> > With small gops (50 frames) compression is worse with the rangecoder and the
> > large context model by 0.8% otherwise better too.
> > (its quite obvious why its worse in that case and ill be working on that ...)
> >
> > Comments welcome, bikesheds not, and ill apply this soon
> 
> >+    if(f->num_h_slices > 256U || f->num_v_slices > 256U){
> 
> The max slices is 256, but this allows for up to 65,536, which doesn't
> seem right.

oops, fixed locally with
+    if(f->num_h_slices > 256U || f->num_v_slices > 256U || f->num_h_slices*f->num_v_slices > MAX_SLICES){
-    if(f->num_h_slices > 256U || f->num_v_slices > 256U){

I thought i had that MAX_SLICES check elsewhere ...


> 
> How will this handle frames that aren't evenly divisible by the number
> necessary to slice the frame?  It doesn't seem to handle slices that
> aren't identical in size; will there be padding or what?

it does handle slices that arent identical in size
just to make sure i tried the reg tests with spliting the videos in 7x7=49
slices, decoded part is bit identical

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101014/44580f0e/attachment.pgp>



More information about the ffmpeg-devel mailing list