Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

H264 Encoder max slice size



Using the Media SDK version 2012 H264 Encoder for Video Conferencing, what isthe way to set the encoded maximum slice size (or set the NAL Unit size).

Thank you,


0 Kudos
2 Replies

Hi Yoni,

Sorry, I dont believe the Media SDK has the ability to control the encoded maximum slice size.


0 Kudos
Yes currently there is no way to control the size of slice even in macroblocks not to mention in bit size. It is only possible to specify the number of slices. In this case in most cases (see below) macroblocks are divided evenly among slices with restrictions to slice boundaries to be on macroblock row and slice sizes no different from biggest to smallest than one macroblock row. The certain number of macroblocks per slice depends on resolution and is not specified other than by these restrictions.

There is one exception to this rule. If application specifies NumSlices==0 then in software implementation encoder encodes the number of slices equal to number of threads specified by application (or number of CPU cores if number of threads is not specified) when TargetUsage is maximum quality. In this case slice sizes differ from frame to frame and are calculated to achieve the maximum performance to load all CPU cores equally. Restrictions to slice sizes from previous paragraphs don't apply in this mode. But this modeof slice sizes calculation is not specified and may change in future versions.If you want to be sure of slice size in macroblocks, always assign NumSlices some value other than zero.
0 Kudos