Blame SOURCES/vp8enc-bitrate-fix.patch

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