From ad3b45ebc4fc771fd9d315ac53c8ab376276ed19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Wed, 10 Aug 2016 13:29:45 +0200 Subject: [PATCH] encoder: h264: fix C90 mixed declarations and code Commit 4259d1a introduced this compilation error. This patch fixes it. --- gst-libs/gst/vaapi/gstvaapiencoder_h264.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c index b46315b071..cc219b9cf6 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c @@ -2377,12 +2377,14 @@ ensure_bitrate (GstVaapiEncoderH264 * encoder) thus estimating +15% here ; and using adaptive 8x8 transforms in I-frames could bring up to +10% improvement. */ guint bits_per_mb = 48; + guint64 factor; + if (!encoder->use_cabac) bits_per_mb += (bits_per_mb * 15) / 100; if (!encoder->use_dct8x8) bits_per_mb += (bits_per_mb * 10) / 100; - guint64 factor = encoder->mb_width * encoder->mb_height * bits_per_mb; + factor = encoder->mb_width * encoder->mb_height * bits_per_mb; base_encoder->bitrate = gst_util_uint64_scale (factor, GST_VAAPI_ENCODER_FPS_N (encoder), GST_VAAPI_ENCODER_FPS_D (encoder)) / 1000;