abwiz0086 / webm

Automatically exported from code.google.com/p/webm
1 stars 0 forks source link

For VP9 with temporal scalability, rate control does not seem to meet the target rate #959

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For 3 temporal layer scalability, the following configuration is used:
rc_target_bitrate = 1000;
ts_number_layers = 3;
ts_rate_decimator[0] = 4;
ts_rate_decimator[1] = 2;
ts_rate_decimator[2] = 1;
ts_target_bitrate[0] = rc_target_bitrate*6/10;
ts_target_bitrate[1] = rc_target_bitrate*8/10;
ts_target_bitrate[2] = rc_target_bitrate;
ts_periodicity = 4;
ts_layer_id[0] = 0;
ts_layer_id[1] = 2;
ts_layer_id[2] = 1;
ts_layer_id[3] = 2;

The same configuration seem to work fine with VP8, meeting the target rate, 
however with VP9, the encoder way overshoots (more than 200%!).

Original issue reported on code.google.com by danny.s....@gmail.com on 20 Feb 2015 at 2:06

GoogleCodeExporter commented 9 years ago
What encoder settings are you using?
Are you using the encoder vpx_temporal_svc_encoder (under examples), e.g.,  
examples/vpx_temporal_svc_encoder inputfile outfile vp9 1280 720 1 30 6 0 10 
400 600 1000

(this is for: 1000k target, 40/20/40 split for 3 layers using temporal 
pattern=10, 30fps, speed 6)

Original comment by marpan@google.com on 20 Feb 2015 at 5:56

GoogleCodeExporter commented 9 years ago
OK.  Found out what the problem is.  For VP9, it seems like I have to set
the temporal layer ID of each frame as follows:
vpx_codec_control(&encoder, VP9E_SET_SVC_LAYER_ID, &layer_id);

However, for VP8, the rate control seems to work fine even without setting
the layer id as follows:
vpx_codec_control(&codec, VP8E_SET_TEMPORAL_LAYER_ID,
layer_id.temporal_layer_id);

BR,
Danny

Original comment by danny.s....@gmail.com on 20 Feb 2015 at 7:20

GoogleCodeExporter commented 9 years ago
Right, you need to use the VP9E_SET_SVC_LAYER_ID for vp9. For vp8, it will 
still work without using VP8E_SET_TEMPORAL_LAYER_ID because there is an 
internal counter that will set/update the layer id (given the quantities 
ts_rate_decimator[] and ts_layer_id[]). That counter was put in a while ago in 
vp8, we planned to remove it and force the usage of the control 
VP8E_SET_TEMPORAL_LAYER_ID, but we haven't yet.. 

Original comment by mar...@webrtc.org on 20 Feb 2015 at 7:31

GoogleCodeExporter commented 9 years ago
Got it. Thanks!

Original comment by danny.s....@gmail.com on 20 Feb 2015 at 7:39

GoogleCodeExporter commented 9 years ago

Original comment by renganat...@google.com on 26 Feb 2015 at 11:05