Blame SOURCES/vp8enc-bitrate-fix.patch

56b13a
diff -ru gst-plugins-bad-0.10.23.orign/ext/vp8/gstvp8enc.c gst-plugins-bad-0.10.23/ext/vp8/gstvp8enc.c
56b13a
--- gst-plugins-bad-0.10.23.orign/ext/vp8/gstvp8enc.c	2012-01-25 18:10:21.000000000 +0100
56b13a
+++ gst-plugins-bad-0.10.23/ext/vp8/gstvp8enc.c	2012-05-28 14:21:16.552995768 +0200
56b13a
@@ -732,6 +732,11 @@
56b13a
     return FALSE;
56b13a
   }
56b13a
 
56b13a
+  /* Scale default bitrate to our size */
56b13a
+  cfg.rc_target_bitrate = gst_util_uint64_scale (cfg.rc_target_bitrate,
56b13a
+      state->width * state->height,
56b13a
+      cfg.g_w * cfg.g_h);
56b13a
+
56b13a
   cfg.g_w = state->width;
56b13a
   cfg.g_h = state->height;
56b13a
   cfg.g_timebase.num = state->fps_d;
56b13a
@@ -755,7 +760,6 @@
56b13a
   } else {
56b13a
     cfg.rc_min_quantizer = (gint) (63 - encoder->quality * 6.2);
56b13a
     cfg.rc_max_quantizer = (gint) (63 - encoder->quality * 6.2);
56b13a
-    cfg.rc_target_bitrate = encoder->bitrate;
56b13a
   }
56b13a
   cfg.rc_dropframe_thresh = encoder->drop_frame;
56b13a
   cfg.rc_resize_allowed = encoder->resize_allowed;