From: Andrey Morozov Date: Fri, 13 Apr 2012 09:57:41 +0000 (+0000) Subject: increased bitrate of recorded video on 25% X-Git-Tag: accepted/2.0/20130307.220821~677 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c273b867e2391e4f97c41eeaccecfe00d7fa468;p=profile%2Fivi%2Fopencv.git increased bitrate of recorded video on 25% --- diff --git a/modules/highgui/src/cap_ffmpeg_impl_v2.hpp b/modules/highgui/src/cap_ffmpeg_impl_v2.hpp index f356134..e9ca872 100755 --- a/modules/highgui/src/cap_ffmpeg_impl_v2.hpp +++ b/modules/highgui/src/cap_ffmpeg_impl_v2.hpp @@ -983,7 +983,11 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc, c->codec_type = AVMEDIA_TYPE_VIDEO; /* put sample parameters */ - c->bit_rate = bitrate; + unsigned long long lbit_rate = static_cast(bitrate); + lbit_rate += (bitrate / 4); + lbit_rate = std::min(lbit_rate, static_cast(std::numeric_limits::max())); + c->bit_rate = static_cast(lbit_rate); + // took advice from // http://ffmpeg-users.933282.n4.nabble.com/warning-clipping-1-dct-coefficients-to-127-127-td934297.html c->qmin = 3;