[x264-devel] NAL slice support patch added?

Mojtaba Hosseini Mojtaba.Hosseini at magorcorp.com
Fri Oct 26 20:44:08 CEST 2007


On Fri, 2007-10-26 at 03:13 -0600, Loren Merritt wrote:
> > 2) I'm still not sure about compute/print stats in frame_end()
> > function of encoder.c (these 2 lines):
> >    h->stat.i_slice_count[h->sh.i_type]++;
> >    h->stat.i_slice_size[h->sh.i_type] += h->out.i_frame_size +
> >                                          NALU_OVERHEAD;
> > This doesn't seem right. Should I be changing this to be updated for
> > all slices in a frame? If so, I can move them to slice_write()
> > function of encoder.c.
> 
> Those variables really count frames, not slices. Only NALU_OVERHEAD should 
> be multiplied.
> 
I've attached the latest patch. Note:
1) NALU_OVERHEAD is multiplied by total number of NALs in frame. This
includes sps and fps NALs since they also have the 5 byte overhead. 
2) Each NAL also stores # of macroblocks. This was added to facilitate
a future ffmpeg patch related to rtp_callback for x264.
(ffmpeg's rtp_callback reports # of macroblocks per slice). 
3) I will continue to test the patch with different x264 options and
will report any problems I see. Please advise if you have specific
tests in mind that you think will exercise this patch.
  Thanks for all the feedback and help.

Mojtaba Hosseini

-------------- next part --------------
A non-text attachment was scrubbed...
Name: MultipleNALInFramePatch3.txt
Type: text/x-patch
Size: 10990 bytes
Desc: not available
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20071026/a95e3415/attachment.bin 


More information about the x264-devel mailing list