lieff/minih264

how to set temporal layer size to 3?

richardor opened this issue · 8 comments

// Number of SVC layers: // 1 = AVC // 2 = SVC with 2-layers of spatial scalability int num_layers;
if I want to encode 3 temporal layers, 1 spatial layer, what should I do?

lieff commented

Hi)
You need num_layers=1 and enable ENABLE_TEMPORAL_SCALABILITY in minih264e_test.c sample which uses frame_type = H264E_FRAME_TYPE_CUSTOM; and long_term_idx_update/long_term_idx_use indexes.
By manipulating long_term_idx_update/long_term_idx_use you can achieve any prediction pattern (and any temporal layers pattern in the particular case).

@lieff
I did it, and run "./h264enc_x86 vector/foreman.cif". the output file is out.264.
i canot see any svc extensions in the pps/sps.

image
image

can you post your temporal svc file here?
thank you!

lieff commented

Such temporal scalability is the AVC feature. It do not use SVC specific features and compatible with the AVC decoders.
You can read more info here:
http://www.ti.com/lit/an/sprabg3/sprabg3.pdf
https://www.hhi.fraunhofer.de/en/departments/vca/research-groups/image-video-coding/research-topics/svc-extension-of-h264avc/temporal-scalability-in-h264avc.html

Only spatial scalability enables SVC bitstream generation.

Hi)
You need num_layers=1 and enable ENABLE_TEMPORAL_SCALABILITY in minih264e_test.c sample which uses frame_type = H264E_FRAME_TYPE_CUSTOM; and long_term_idx_update/long_term_idx_use indexes.
By manipulating long_term_idx_update/long_term_idx_use you can achieve any prediction pattern (and any temporal layers pattern in the particular case).

I did it as you said, and I found the temporal layers is just 2. Am I right?
thank you!

lieff commented

Yes, default temporal layers number in example is 2, IIRC you can change it to 3 by modify logmod = 1 to logmod = 2.