[x264-devel] Multislicing support

Loren Merritt lorenm at u.washington.edu
Fri Feb 22 21:34:06 CET 2008


On Wed, 13 Feb 2008, Etienne Bömcke wrote:

> - The slice header array is now defined this way : 'x264_slice_header_t 
> *shs;'.
> - At run time, once the slice number has been determined from the frame size 
> and the slice size in macroblock, memory is allocated to the slice header 
> array using x264_malloc : 'h->shs = x264_malloc(sizeof(x264_slice_header_t) * 
> param->i_slices_number);'.
> - Right before the closing of the encoder, the buffer h->shs is freed using 
> x264_free.
>
> As the size of this array isn't supposed to change during the whole encoding 
> process, I don't think I have to provide a way to grow it dynamically. Is 
> this a clean way to proceed? Another question : Should I create/free the shs 
> buffer each time a frame is encoded, or is it better to do this one time only 
> (after x264_encoder_open and before x264_encoder_close)? I don't have 
> sufficient knowledge of the C language to answer this question.

Why do you even need an array? You don't encode multiple slices at once, 
so just overwrite the previous x264_slice_header_t.

--Loren Merritt


More information about the x264-devel mailing list