Commit graph

10 commits

Author SHA1 Message Date
John-Mark Bell
8f684913cf vp8enc: improve unit tests
- make test_encode_simple cope with libvpx built with
    CONFIG_REALTIME_ONLY. Sadly, there's no way to detect this at
    runtime beyond trying to set lag-in-frames to >0, pushing a
    buffer and catching the GST_FLOW_NOT_NEGOTIATED return.

  - fix bitrot in test_encode_simple_when_bitrate_set_to_zero.

  - port test_encode_simple to GstHarness and introduce a separate
    test for the lag-in-frames property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/708>
2020-09-08 22:59:29 +00:00
Mikhail Fludkov
7b390a8bbd vpxenc: Add new bit-per-pixel property to select a better "default" bitrate
As part of this also change the default bitrate value to 0. The default
value was 256000 previously. In reality, if the property was not set the
bitrate value would be scaled according to the resolution which is not
very intuitive behavior. It is better to use 0 for this purpose. Now
together with newly introduced property "bits-per-pixel" 0 means to
assign the bitrate according to resolution/framerate.

The default bitrates are now
 - 1.2Mbps for VP8 720p@30fps
 - 0.8Mbps for VP9 720p@30fps
and scaled accordingly for different resolutions/framerates.

Previously the default bitrate was also not scaled according to the
framerate but only took the resolution into account.

This also fixes the side effect of setting bitrate to 0. Previously
encoder would not produce any data at all.

Addition from Sebastian Dröge <sebastian@centricular.com> to assume
30fps if no framerate is given in the caps instead of not calculating
any bitrate at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/611>
2020-06-04 20:14:03 +00:00
Nicolas Dufresne
c944987a2a vp8enc-test: Send inital events
https://bugzilla.gnome.org/show_bug.cgi?id=700033
2013-05-10 09:24:47 +02:00
Tim-Philipp Müller
230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Sebastian Dröge
e6dbdffbfe vp8enc: Update patch to the new property names 2012-09-16 15:46:31 +02:00
Wim Taymans
8337fcfe99 [MOVED FROM BAD 6/6] tests: fix more unit tests 2012-09-16 15:44:00 +02:00
René Stadler
caa34f7bf7 [MOVED FROM BAD 5/6] tests: update for gstcheck API change 2012-09-16 15:44:00 +02:00
Sebastian Dröge
b072086ec0 [MOVED FROM BAD 3/6] vp8enc: Improve unit test a bit 2012-09-16 15:44:00 +02:00
Sebastian Dröge
d983342dbd [MOVED FROM BAD 2/6] vp8enc: Also check the output caps in the unit test 2012-09-16 15:44:00 +02:00
Sebastian Dröge
63e28498c4 [MOVED FROM BAD 1/6] vp8enc: Add simple unit test 2012-09-16 15:44:00 +02:00