Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
74266843
Commit
74266843
authored
Apr 20, 2012
by
Andrey Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fix in calculate bitrate
parent
247e2d08
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cap_ffmpeg_impl_v2.hpp
modules/highgui/src/cap_ffmpeg_impl_v2.hpp
+3
-3
No files found.
modules/highgui/src/cap_ffmpeg_impl_v2.hpp
View file @
74266843
...
@@ -985,9 +985,9 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
...
@@ -985,9 +985,9 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
/* put sample parameters */
/* put sample parameters */
unsigned
long
long
lbit_rate
=
static_cast
<
unsigned
long
long
>
(
bitrate
);
unsigned
long
long
lbit_rate
=
static_cast
<
unsigned
long
long
>
(
bitrate
);
lbit_rate
+=
(
bitrate
/
4
);
lbit_rate
+=
(
bitrate
/
2
);
lbit_rate
=
std
::
min
(
lbit_rate
,
static_cast
<
unsigned
long
long
>
(
std
::
numeric_limits
<
int
>::
max
()));
lbit_rate
=
std
::
min
(
lbit_rate
,
static_cast
<
unsigned
long
long
>
(
std
::
numeric_limits
<
int
>::
max
()));
c
->
bit_rate
=
bit
rate
;
c
->
bit_rate
=
lbit_
rate
;
// took advice from
// took advice from
// http://ffmpeg-users.933282.n4.nabble.com/warning-clipping-1-dct-coefficients-to-127-127-td934297.html
// http://ffmpeg-users.933282.n4.nabble.com/warning-clipping-1-dct-coefficients-to-127-127-td934297.html
...
@@ -1466,7 +1466,7 @@ void CvVideoWriter_FFMPEG::close()
...
@@ -1466,7 +1466,7 @@ void CvVideoWriter_FFMPEG::close()
}
}
unsigned
long
long
lbit_rate
=
static_cast
<
unsigned
long
long
>
(
c
->
bit_rate
);
unsigned
long
long
lbit_rate
=
static_cast
<
unsigned
long
long
>
(
c
->
bit_rate
);
lbit_rate
+=
(
bitrate
/
4
);
lbit_rate
+=
(
bitrate
/
2
);
lbit_rate
=
std
::
min
(
lbit_rate
,
static_cast
<
unsigned
long
long
>
(
std
::
numeric_limits
<
int
>::
max
()));
lbit_rate
=
std
::
min
(
lbit_rate
,
static_cast
<
unsigned
long
long
>
(
std
::
numeric_limits
<
int
>::
max
()));
c
->
bit_rate_tolerance
=
static_cast
<
int
>
(
lbit_rate
);
c
->
bit_rate_tolerance
=
static_cast
<
int
>
(
lbit_rate
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment