flaccidware / webm

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

vp8_encode_frame returns inaccurate projected_frame_size #1007

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
in our configuration, we use REALTIME, CBR mode for encoding vp8 frames. When I 
debugged into the code, I found the returned projected_frame_size is very 
inaccurate (in function encode_frame_to_data_rate).

1. vp8_encode_frame says it returns projected_frame_size in number of bytes 
(from the comments), but it is compared against other parameters like 
this_frame_target etc which are in number of bits.

2. Even after adjusting bytes to bits, I still see the projected_frame_size is 
way off comparing against size returned by vp8_pack_bitstream.

Original issue reported on code.google.com by zhp...@gmail.com on 1 Jun 2015 at 8:55

GoogleCodeExporter commented 9 years ago
Marco told me that in real-time the encoding/mode selection is not base on 
actual cost, so thats why we don't have good estimate in vp8_encode_frame.

It would be helpful to return actual cost in vp8_encode_frame. extra cpu time 
will be tolerable in our use case.

Original comment by zhp...@gmail.com on 1 Jun 2015 at 10:47

GoogleCodeExporter commented 9 years ago
After switching to vp8_rd_pick_intra_mode from vp8_pick_intra_mode, we were 
able to get accurate projected_frame_size at cpu cost. we tweak sf.RD to gain 
the control instead of adding another flag.

Original comment by zhp...@gmail.com on 2 Jun 2015 at 6:51

GoogleCodeExporter commented 9 years ago

Original comment by ya...@google.com on 4 Jun 2015 at 10:14