|
From: Shuaijun Z. <sz...@re...> - 2012-01-27 12:04:00
|
Hi there,
Is it possible to change spatial during decoding without sending the full
video sequence?
I have a svc video. It has a IDR frame every 32 frames.
The following is the video information.
Layer Resolution Framerate Bitrate MinBitrate DTQ
0 320x180 7.5000 72.50 72.50 (0,0,0)
1 320x180 15.0000 94.90 94.90 (0,1,0)
2 320x180 30.0000 121.10 121.10 (0,2,0)
3 640x360 7.5000 239.40 239.40 (1,0,0)
4 640x360 15.0000 312.60 312.60 (1,1,0)
5 640x360 30.0000 391.70 391.70 (1,2,0)
6 1024x576 7.5000 812.30 812.30 (2,0,0)
7 1024x576 15.0000 952.10 952.10 (2,1,0)
8 1024x576 30.0000 1118.70 1118.70 (2,2,0)
I am wondering that during decoding, if I send different video layers (by *
extractor*) to decoder, is the decoder able to handle the different spatial
automatically.
For example: initially I send the video (layer 0 to layer 8) to decoder, so
it decodes 1024X576; after 300 frames, I send the video of (layer 0 to
layer 5) to decoder, is the decoder able to decode the video in 640X360
resolution.
I have checked the Mplayer with OpenSVC library. How it changes the video
layer is that it use the interface of *void UpdateLayer(int *DqIdTable, int
*CurrDqId, int *TemporalCom, int *TemporalId, int MaxDqId, int Command) *to
change the CurrDqId. Then set the layer by SetCommandLayer*(Layer, h ->
MaxDqId, h -> CurrDqId, &h -> TemporalCom, h -> TemporalId); *But no matter
how the layer is changed, the full video sequence (NAL sequence) is sending
to decoder
*
*
The difference in my case is I am sending only the corresponding NAL
sequence to the decoder whilst changing the layer. E.g. layer 0 to layer
2 if I only want 320X180, layer 0 to layer 5 if I only want 640X360. etc.
The current solution I am doing for my case is:
Whenever meeting a IDR Access Unit, I will get the DqIdMax by GetDqIdMax(buf,
buf_size, h -> nal_length_size*, h -> DqIdTable, h -> is_avc). *Then use
this DqIdMax as the CurrDqId to decode.
For every IDR sequence, I check its DqIdMax in case the layer is changed.
So that the decoding process can be changed at least in a new IDR sequence.
I have tried my solution. It is just partly working. The case is:
- Initially I play/decode the video in layer 5 (layer 0 to layer 5), The
decoded picture is 640X360 resolution. Later I only send layer 0 to layer 2
to decoder with the new DqIdMax, the decoded picture is changed to 360X180.
[*SUCCEED*]
- Initially I decode the video in layer 8 (layer 0 to layer 5). The
decoded picture is 1024X576. Later if I only send layer 5 (layer 0 to layer
5) to decoder with the new DqIdMax, the decoded picture was not changed [
*FAILED*]. Later if I continue sending less layer (layer 0 to layer 2)
to decoder with the new DqIdMax, the decoded picture was changed to
360X180. [*Partly Succeed*]
Here is my question:
1. Is my solution right or partly right?
2. Do you guys have other solution for my case?
If there is anything in my explanation unclear, please let me know.
thank you in advance.
Jason
|