Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
1ca24708
Commit
1ca24708
authored
Oct 24, 2016
by
Yaowu Xu
Committed by
Gerrit Code Review
Oct 24, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Correct data size estimation for odd size video" into nextgenv2
parents
0c78ebb2
abc7d81b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
av1/av1_cx_iface.c
av1/av1_cx_iface.c
+4
-2
No files found.
av1/av1_cx_iface.c
View file @
1ca24708
...
@@ -953,11 +953,13 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
...
@@ -953,11 +953,13 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
// failure condition, encoder setup is done fully in init() currently.
// failure condition, encoder setup is done fully in init() currently.
if
(
res
==
AOM_CODEC_OK
)
{
if
(
res
==
AOM_CODEC_OK
)
{
#if CONFIG_EXT_REFS
#if CONFIG_EXT_REFS
data_sz
=
ctx
->
cfg
.
g_w
*
ctx
->
cfg
.
g_h
*
get_image_bps
(
img
);
data_sz
=
ALIGN_POWER_OF_TWO
(
ctx
->
cfg
.
g_w
,
5
)
*
ALIGN_POWER_OF_TWO
(
ctx
->
cfg
.
g_h
,
5
)
*
get_image_bps
(
img
);
#else
#else
// There's no codec control for multiple alt-refs so check the encoder
// There's no codec control for multiple alt-refs so check the encoder
// instance for its status to determine the compressed data size.
// instance for its status to determine the compressed data size.
data_sz
=
ctx
->
cfg
.
g_w
*
ctx
->
cfg
.
g_h
*
get_image_bps
(
img
)
/
8
*
data_sz
=
ALIGN_POWER_OF_TWO
(
ctx
->
cfg
.
g_w
,
5
)
*
ALIGN_POWER_OF_TWO
(
ctx
->
cfg
.
g_h
,
5
)
*
get_image_bps
(
img
)
/
8
*
(
cpi
->
multi_arf_allowed
?
8
:
2
);
(
cpi
->
multi_arf_allowed
?
8
:
2
);
#endif // CONFIG_EXT_REFS
#endif // CONFIG_EXT_REFS
if
(
data_sz
<
kMinCompressedSize
)
data_sz
=
kMinCompressedSize
;
if
(
data_sz
<
kMinCompressedSize
)
data_sz
=
kMinCompressedSize
;
...
...
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