[x264-devel] Multislicing support

Etienne Bömcke etienne.bomcke at uclouvain.be
Mon Feb 18 15:10:57 CET 2008


Ok, so here's the patch I created to add support for multiple slices  
in one frame. I use the following two command-line options : --mb- 
slicesize and --no-mv-inter-slices. The first option allows one to  
specify the desired slice size in number of macroblocks, while the  
latter forbids any inter-slice prediction, allowing one slice to be  
completely removed without causing any harm to the decompression of  
the remaining ones. I tested it the way Lorren described in his e- 
mail. Comparing x264's fdec.yuv file and the output of the standard  
decoder (actual version, 13.2 I think) using the 'diff' utility gives  
a blank result, which means that both files are identical.
However, I haven't been able to test Mojtaba's part, ie the splitting  
of frames in multiple NALs when specifying a maximum NAL size in  
bytes. If anybody could take a look and tell me if it seems clean, I'd  
appreciate it.

One last thing : You'll notice that I changed the macroblock scanning  
condition in file encoder.c . Seems to me that the last macroblock of  
the slice (stored in sh->i_last_mb) should be the last macroblock  
contained in the slice, and not the first one just outside. I checked  
for further reference to that variable, but it seems like it's not  
used a lot, so this modification didn't break anything.

Etienne


-------------- next part --------------
A non-text attachment was scrubbed...
Name: MultipleSlicesInFrame.diff
Type: application/octet-stream
Size: 15380 bytes
Desc: not available
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20080218/fe9433fa/attachment.obj 
-------------- next part --------------



On 12 Feb 2008, at 18:13, Mojtaba Hosseini wrote:

>
>> I finally had some time to look at your patch, but it seems that the
>> archives of last year's mails has been erased and is not accessible
>> anymore. Could you please forward me Lorren's mail you mentioned in
>> the following mail? I also wanted to ask you some pointers about how
>> to make the slice headers array a dynamically growing array, instead
>> of a hard-coded 8 elements array as it is now.
>
> Loren's original email from gmane:
>
> http://article.gmane.org/gmane.comp.video.x264.devel/3167
>
> The patch I emailed does dynamically growing array of NALs so if you
> have a look here:
>
> http://article.gmane.org/gmane.comp.video.x264.devel/3183
>
> you'll see that you can use realloc to keep growing the number of  
> NALs.
>
>> Furthermore, I'm afraid I won't be able to merge our two patches, as
>> they don't really do the same thing. My patch breaks a frame in
>> multiple slices, forbidding both spatial and temporal prediction
>> between different slices. If I followed your method, I wouldn't have
>> any access to the prediction constraints.
>
> If I'm not mistaken, once a slice is created, then other slices  
> should NOT
> predict from it. This is already taken care of in x264 (someone  
> correct me
> if I'm wrong). So the main difference between the two patches is the
> criteria for starting a new slice: 1) slice size in bytes exceeding  
> a threshold
> versus 2) mbs in a slice exceeding a given number. I would expect  
> the common code
> to be plenty.
>
> Mojtaba
> <winmail.dat>_______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel

--
Etienne B?mcke
UCL - Laboratoire TELE
etienne.bomcke at uclouvain.be





More information about the x264-devel mailing list