Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
ded9e191
Commit
ded9e191
authored
Apr 05, 2014
by
Guillaume Martres
Browse files
vp9_firstpass: Get rid of magic number in bits per MB calculation
Change-Id: Ib3886cb7cafc211581f4f9e7f76782d9d1984434
parent
bda5352b
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_firstpass.c
View file @
ded9e191
...
...
@@ -916,9 +916,10 @@ int vp9_twopass_worst_quality(VP9_COMP *cpi, FIRSTPASS_STATS *fpstats,
if
(
section_target_bandwitdh
<=
0
)
return
rc
->
worst_quality
;
// Highest value allowed
target_norm_bits_per_mb
=
section_target_bandwitdh
<
(
1
<<
20
)
?
(
512
*
section_target_bandwitdh
)
/
num_mbs
:
512
*
(
section_target_bandwitdh
/
num_mbs
);
target_norm_bits_per_mb
=
section_target_bandwitdh
<
(
1
<<
20
)
?
(
section_target_bandwitdh
<<
BPER_MB_NORMBITS
)
/
num_mbs
:
(
section_target_bandwitdh
/
num_mbs
)
<<
BPER_MB_NORMBITS
;
// Try and pick a max Q that will be high enough to encode the
// content at the given rate.
...
...
vp9/encoder/vp9_ratectrl.c
View file @
ded9e191
...
...
@@ -35,9 +35,6 @@
#define MIN_BPB_FACTOR 0.005
#define MAX_BPB_FACTOR 50
// Bits Per MB at different Q (Multiplied by 512)
#define BPER_MB_NORMBITS 9
// Tables relating active max Q to active min Q
static
int
kf_low_motion_minq
[
QINDEX_RANGE
];
static
int
kf_high_motion_minq
[
QINDEX_RANGE
];
...
...
vp9/encoder/vp9_ratectrl.h
View file @
ded9e191
...
...
@@ -22,6 +22,9 @@ extern "C" {
#define FRAME_OVERHEAD_BITS 200
// Bits Per MB at different Q (Multiplied by 512)
#define BPER_MB_NORMBITS 9
typedef
struct
{
// Rate targetting variables
int
this_frame_target
;
...
...
Write
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!
Cancel
Please
register
or
sign in
to comment