[x264-devel] NAL slice support patch added?

Mojtaba Hosseini Mojtaba.Hosseini at magorcorp.com
Mon Oct 22 16:15:44 CEST 2007


On Mon, 2007-10-15 at 22:02 -0700, Tom Harper wrote:
> Quite a bit of stuff changed since this patch was posted- I updated it 
> once already, but currently it may not be working. I'll post an updated  
> one when I get a chance and get some feedback.
> 
> Tom

Hello,
  I've attached my attempt at adding a 'multiple NALs in frame based on
x  byte slice size' in a patch. It is based on Tom Harper's earlier
patch + some suggestions that followed on the mailing list + a 
discussion I had on the irc. I appreciate general feedback but 
especially regarding these:
1) There was a suggestion to split frame into slices each having
identical N number of MBs. This is easy to add but should I?
2) The current patch does not do anything specific for rate control.
Is this ok? That is, from the code, I do not see how this patch 
could affect rate control but please advise if otherwise.
3) As per suggestion given on irc, number of NALs is allocated
dynamically (because number of NALs in frame can potentially be
very large). The default allocation is 20 and it grows by steps
of 20, every time there is a need to grow. Is this a reasonable
approach? Is 20 a good step size?
4) I have tested this patch with multiple threads and it worked.
Is there a set of tests I should do to increase confidence in the
patch?
5) As some of you may know, ffmpeg has an interface for its h263+ and
mpeg4 encoders to specify number of bytes per 'slice' (started with
a resync marker). The interface then allows a callback function provided
by user to be called every time a 'slice' is made. The current 
implementation of x264 would allow us to have a similar interface except
that user callback would be called at end of encoding process 
(after x264_encoder_encoder() and when calling individual
x264_encode_NAL() functions). Is there opposition to adding
a callback function so that user can be called when a NAL is ready to
be encoded? Or is this too much change?
  Final note: currently I happen to have a lot of cycles to spend on
this patch so I feel it is a good time to take advantage of this
opportunity.
  Thanks.

Mojtaba Hosseini
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MultipleNALInFramePatch.txt
Type: text/x-patch
Size: 8056 bytes
Desc: not available
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20071022/da5f99f7/attachment.bin 


More information about the x264-devel mailing list