Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c5a9ab69
Commit
c5a9ab69
authored
Mar 17, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmin/qmax cleanup
Originally committed as revision 1689 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
6c949d12
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
mpegvideo.c
libavcodec/mpegvideo.c
+0
-2
mpegvideo.h
libavcodec/mpegvideo.h
+0
-2
ratecontrol.c
libavcodec/ratecontrol.c
+3
-3
No files found.
libavcodec/mpegvideo.c
View file @
c5a9ab69
...
...
@@ -515,8 +515,6 @@ int MPV_encode_init(AVCodecContext *avctx)
s
->
rtp_payload_size
=
avctx
->
rtp_payload_size
;
if
(
avctx
->
rtp_callback
)
s
->
rtp_callback
=
avctx
->
rtp_callback
;
s
->
qmin
=
avctx
->
qmin
;
s
->
qmax
=
avctx
->
qmax
;
s
->
max_qdiff
=
avctx
->
max_qdiff
;
s
->
qcompress
=
avctx
->
qcompress
;
s
->
qblur
=
avctx
->
qblur
;
...
...
libavcodec/mpegvideo.h
View file @
c5a9ab69
...
...
@@ -208,8 +208,6 @@ typedef struct MpegEncContext {
int
fixed_qscale
;
///< fixed qscale if non zero
float
qcompress
;
///< amount of qscale change between easy & hard scenes (0.0-1.0)
float
qblur
;
///< amount of qscale smoothing over time (0.0-1.0)
int
qmin
;
///< min qscale
int
qmax
;
///< max qscale
int
max_qdiff
;
///< max qscale difference between frames
int
encoding
;
///< true if we are encoding (vs decoding)
int
flags
;
///< AVCodecContext.flags (HQ, MV4, ...)
...
...
libavcodec/ratecontrol.c
View file @
c5a9ab69
...
...
@@ -356,8 +356,8 @@ static double get_diff_limited_q(MpegEncContext *s, RateControlEntry *rce, doubl
* gets the qmin & qmax for pict_type
*/
static
void
get_qminmax
(
int
*
qmin_ret
,
int
*
qmax_ret
,
MpegEncContext
*
s
,
int
pict_type
){
int
qmin
=
s
->
qmin
;
int
qmax
=
s
->
qmax
;
int
qmin
=
s
->
avctx
->
qmin
;
int
qmax
=
s
->
avctx
->
qmax
;
if
(
pict_type
==
B_TYPE
){
qmin
=
(
int
)(
qmin
*
ABS
(
s
->
avctx
->
b_quant_factor
)
+
s
->
avctx
->
b_quant_offset
+
0
.
5
);
...
...
@@ -368,7 +368,7 @@ static void get_qminmax(int *qmin_ret, int *qmax_ret, MpegEncContext *s, int pic
}
if
(
qmin
<
1
)
qmin
=
1
;
if
(
qmin
==
1
&&
s
->
qmin
>
1
)
qmin
=
2
;
//avoid qmin=1 unless the user wants qmin=1
if
(
qmin
==
1
&&
s
->
avctx
->
qmin
>
1
)
qmin
=
2
;
//avoid qmin=1 unless the user wants qmin=1
if
(
qmin
<
3
&&
s
->
max_qcoeff
<=
128
&&
pict_type
==
I_TYPE
)
qmin
=
3
;
//reduce cliping problems
...
...
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