Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
7a197b2d
Commit
7a197b2d
authored
Jan 21, 2014
by
Alex Converse
Committed by
Gerrit Code Review
Jan 21, 2014
Browse files
Merge "Have check_initial_width() take subsampling as arguments directly."
parents
000efb57
0428579b
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_onyx_if.c
View file @
7a197b2d
...
...
@@ -3279,12 +3279,12 @@ static void Pass2Encode(VP9_COMP *cpi, size_t *size,
vp9_twopass_postencode_update
(
cpi
,
*
size
);
}
static
void
check_initial_width
(
VP9_COMP
*
cpi
,
YV12_BUFFER_CONFIG
*
sd
)
{
static
void
check_initial_width
(
VP9_COMP
*
cpi
,
int
subsampling_x
,
int
subsampling_y
)
{
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
if
(
!
cpi
->
initial_width
)
{
// TODO(agrange) Subsampling defaults to assuming sampled chroma.
cm
->
subsampling_x
=
sd
!=
NULL
?
(
sd
->
uv_width
<
sd
->
y_width
)
:
1
;
cm
->
subsampling_y
=
sd
!=
NULL
?
(
sd
->
uv_height
<
sd
->
y_height
)
:
1
;
cm
->
subsampling_x
=
subsampling_x
;
cm
->
subsampling_y
=
subsampling_y
;
alloc_raw_frame_buffers
(
cpi
);
cpi
->
initial_width
=
cm
->
width
;
cpi
->
initial_height
=
cm
->
height
;
...
...
@@ -3298,8 +3298,10 @@ int vp9_receive_raw_frame(VP9_PTR ptr, unsigned int frame_flags,
VP9_COMP
*
cpi
=
(
VP9_COMP
*
)
ptr
;
struct
vpx_usec_timer
timer
;
int
res
=
0
;
const
int
subsampling_x
=
sd
->
uv_width
<
sd
->
y_width
;
const
int
subsampling_y
=
sd
->
uv_height
<
sd
->
y_height
;
check_initial_width
(
cpi
,
s
d
);
check_initial_width
(
cpi
,
s
ubsampling_x
,
subsampling_y
);
vpx_usec_timer_start
(
&
timer
);
if
(
vp9_lookahead_push
(
cpi
->
lookahead
,
sd
,
time_stamp
,
end_time
,
frame_flags
,
cpi
->
active_map_enabled
?
cpi
->
active_map
:
NULL
))
...
...
@@ -3798,7 +3800,7 @@ int vp9_set_size_literal(VP9_PTR comp, unsigned int width,
VP9_COMP
*
cpi
=
(
VP9_COMP
*
)
comp
;
VP9_COMMON
*
cm
=
&
cpi
->
common
;
check_initial_width
(
cpi
,
NULL
);
check_initial_width
(
cpi
,
1
,
1
);
if
(
width
)
{
cm
->
width
=
width
;
...
...
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