[x264-devel] Re: param.i_threads == num of slices?
Alex Izvorski
aizvorski at gmail.com
Mon Feb 26 22:35:15 CET 2007
Peter, Gonzalo:
Slices are not that hard to add back in, and it will probably happen
eventually but probably not very soon. It's not that the developers
dislike the feature, it's just that they seem to be busy working on
other things and don't have time for it. If anyone is interested in
doing the work, stop by #x264dev or freenode irc and Loren or I will try
to give you some pointers. In the meantime, just downgrade to x264
revision < r609 and use the old threads==slices version.
Since the removal of slices has caused so much apparent upset, let me
just say a word as to the benefits - yes, really ;) The old threading
maxed out at roughly 2x the speed of a single-threaded version with
*any* number of processors and threads (i.e. running with 32 threads on
4 processors gave a speedup of 2x; 8 threads on 2 processors was about
1.6x). The new version scales perfectly with number of processors up to
very large numbers (I don't know the upper limit yet, but certainly >8
processors). In fact, it scales sightly better than linearly: the speed
with 4 processors is ~4.15-4.2x. Old threading caused substantially
more bitrate to be used for the same quality; new threading doesn't
(depending on your settings). So for most people who really care about
speed and not so much about the error resilience that slices provide,
this is a big win.
Again, this is not an either-or, it is possible to have both features
in, but it would have been even harder to completely overhaul threading
while completely overhauling slices at the same time since the two were
very closely linked in earlier versions.
Regards,
--Alex
P.S. I agree that it would be nice to add an option to output slices
sized to fit within (one or more) network packets. However NAL is a
"Network Abstraction Layer" not "adaptation" ;) and the H264 standard
certainly doesn't talk about "one slice == one packet".
On Mon, 2007-02-26 at 11:09 +0100, List, Peter wrote:
> Hallo all,
>
>
>
> after the discussion in January and this mail, may I ask again to
> introduce slices to x264 again, this time without the parallelism to
> multithreading of cause. The code is still there, so it shouldn’t be
> such a problem.
>
> Although useless for many applications, slices are definitely a great
> help for anything that goes in broadcasting mode over the internet (no
> retransmission). In my opinion, the “one slice == one packet” concept
> of the H.264-Network-Adaptation-Layer” is something that simply needs
> to be supported!
>
>
>
> Regards
>
> Peter
>
>
>
>
>
>
>
>
>
> > Hello everybody,
>
> >
>
> > I was able to encode with several slices using ffmpeg (and
>
> > ffmpeg was calling x264) with the parameter avctx thread_count.
>
> > But now I am calling directly the x264 API from my code and
>
> > changing the x4->params.i_threads parameter. However now the
>
> > result is only one slice per frame.
>
> > Could anybody help me and tell me how to make different slices
>
> > per frame?
>
> >
>
> > Thank you very much.
>
> > Gonzalo Berdeal.
--
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html
More information about the x264-devel
mailing list