Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
213f7b09
Commit
213f7b09
authored
14 years ago
by
Paul Wilkins
Committed by
Code Review
14 years ago
Browse files
Options
Download
Plain Diff
Merge "Relax rate control for last few frames"
parents
692b1085
513f8e68
v1.14.0-linphone
1.4.X
bali
cayuga
eider
experimental
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m29-baseline
m31-baseline
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
pcs-2013
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/atna/dec_sem_sync
sandbox/awatry/initial_opencl_implementation
sandbox/debargha/playground
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/hlundin/error-concealment
sandbox/holmer/error-concealment
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jkoleszar/cached-multibit
sandbox/jkoleszar/experimental-knobs
sandbox/jkoleszar/new-rate-control
sandbox/jkoleszar/new-rtcd
sandbox/jkoleszar/reuse-modemv
sandbox/jkoleszar/use-memcpy
sandbox/jzern@google.com/test
sandbox/slavarnway/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
stable-vp9-decoder
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
vp9-preview
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
v1.3.0
v1.2.0
v1.1.0
v1.0.0
v0.9.7
v0.9.7-p1
v0.9.6
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vp8/encoder/firstpass.c
+10
-23
vp8/encoder/firstpass.c
vp8/encoder/onyx_int.h
+0
-3
vp8/encoder/onyx_int.h
with
10 additions
and
26 deletions
vp8/encoder/firstpass.c
+
10
−
23
View file @
213f7b09
...
...
@@ -1439,7 +1439,7 @@ static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
// Boost for arf frame
Boost
=
(
cpi
->
gfu_boost
*
3
*
GFQ_ADJUSTMENT
)
/
(
2
*
100
);
Boost
+=
(
cpi
->
baseline_gf_interval
*
50
);
Boost
+=
(
i
*
50
);
allocation_chunks
=
(
i
*
100
)
+
Boost
;
// Normalize Altboost and allocations chunck down to prevent overflow
...
...
@@ -1738,16 +1738,6 @@ static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
vp8_avg_stats
(
&
sectionstats
);
if
(
sectionstats
.
pcnt_motion
<
.
17
)
cpi
->
section_is_low_motion
=
1
;
else
cpi
->
section_is_low_motion
=
0
;
if
(
sectionstats
.
mvc_abs
+
sectionstats
.
mvr_abs
>
45
)
cpi
->
section_is_fast_motion
=
1
;
else
cpi
->
section_is_fast_motion
=
0
;
cpi
->
section_intra_rating
=
sectionstats
.
intra_error
/
DOUBLE_DIVIDE_CHECK
(
sectionstats
.
coded_error
);
Ratio
=
sectionstats
.
intra_error
/
DOUBLE_DIVIDE_CHECK
(
sectionstats
.
coded_error
);
...
...
@@ -1980,7 +1970,14 @@ void vp8_second_pass(VP8_COMP *cpi)
cpi
->
ni_av_qi
=
cpi
->
worst_quality
;
}
}
else
// The last few frames of a clip almost always have to few or too many
// bits and for the sake of over exact rate control we dont want to make
// radical adjustments to the allowed quantizer range just to use up a
// few surplus bits or get beneath the target rate.
else
if
(
(
cpi
->
common
.
current_video_frame
<
(((
unsigned
int
)
cpi
->
total_stats
->
count
*
255
)
>>
8
))
&&
((
cpi
->
common
.
current_video_frame
+
cpi
->
baseline_gf_interval
)
<
(
unsigned
int
)
cpi
->
total_stats
->
count
)
)
{
if
(
frames_left
<
1
)
frames_left
=
1
;
...
...
@@ -2344,17 +2341,7 @@ void vp8_find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
vp8_avg_stats
(
&
sectionstats
);
if
(
sectionstats
.
pcnt_motion
<
.
17
)
cpi
->
section_is_low_motion
=
1
;
else
cpi
->
section_is_low_motion
=
0
;
if
(
sectionstats
.
mvc_abs
+
sectionstats
.
mvr_abs
>
45
)
cpi
->
section_is_fast_motion
=
1
;
else
cpi
->
section_is_fast_motion
=
0
;
cpi
->
section_intra_rating
=
sectionstats
.
intra_error
/
DOUBLE_DIVIDE_CHECK
(
sectionstats
.
coded_error
);
cpi
->
section_intra_rating
=
sectionstats
.
intra_error
/
DOUBLE_DIVIDE_CHECK
(
sectionstats
.
coded_error
);
Ratio
=
sectionstats
.
intra_error
/
DOUBLE_DIVIDE_CHECK
(
sectionstats
.
coded_error
);
// if( (Ratio > 11) ) //&& (sectionstats.pcnt_second_ref < .20) )
...
...
This diff is collapsed.
Click to expand it.
vp8/encoder/onyx_int.h
+
0
−
3
View file @
213f7b09
...
...
@@ -614,9 +614,6 @@ typedef struct
unsigned
int
tempdata2
;
int
base_skip_false_prob
[
128
];
unsigned
int
section_is_low_motion
;
unsigned
int
section_benefits_from_aggresive_q
;
unsigned
int
section_is_fast_motion
;
unsigned
int
section_intra_rating
;
double
section_max_qfactor
;
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets