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
36ddfa9d
Commit
36ddfa9d
authored
11 years ago
by
Dmitry Kovalev
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Adding vpx_image_scale() function in vpxdec."
parents
50ca3c83
3c054811
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
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
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vpxdec.c
+20
-18
vpxdec.c
with
20 additions
and
18 deletions
vpxdec.c
+
20
−
18
View file @
36ddfa9d
...
...
@@ -131,6 +131,21 @@ static const arg_def_t *vp8_pp_args[] = {
};
#endif
static
int
vpx_image_scale
(
vpx_image_t
*
src
,
vpx_image_t
*
dst
,
FilterMode
mode
)
{
assert
(
src
->
fmt
==
VPX_IMG_FMT_I420
);
assert
(
dst
->
fmt
==
VPX_IMG_FMT_I420
);
return
I420Scale
(
src
->
planes
[
VPX_PLANE_Y
],
src
->
stride
[
VPX_PLANE_Y
],
src
->
planes
[
VPX_PLANE_U
],
src
->
stride
[
VPX_PLANE_U
],
src
->
planes
[
VPX_PLANE_V
],
src
->
stride
[
VPX_PLANE_V
],
src
->
d_w
,
src
->
d_h
,
dst
->
planes
[
VPX_PLANE_Y
],
dst
->
stride
[
VPX_PLANE_Y
],
dst
->
planes
[
VPX_PLANE_U
],
dst
->
stride
[
VPX_PLANE_U
],
dst
->
planes
[
VPX_PLANE_V
],
dst
->
stride
[
VPX_PLANE_V
],
dst
->
d_w
,
dst
->
d_h
,
mode
);
}
void
usage_exit
()
{
int
i
;
...
...
@@ -490,8 +505,6 @@ int main_loop(int argc, const char **argv_) {
int
num_external_frame_buffers
=
0
;
int
fb_lru_cache
=
0
;
vpx_codec_frame_buffer_t
*
frame_buffers
=
NULL
;
int
display_width
=
0
;
int
display_height
=
0
;
struct
VpxDecInputContext
input
=
{
0
};
struct
VpxInputContext
vpx_input_ctx
=
{
0
};
...
...
@@ -866,8 +879,8 @@ int main_loop(int argc, const char **argv_) {
// use the width and height specified in the container. If either of
// these is set to 0, use the display size set in the first frame
// header.
display_width
=
vpx_input_ctx
.
width
;
display_height
=
vpx_input_ctx
.
height
;
int
display_width
=
vpx_input_ctx
.
width
;
int
display_height
=
vpx_input_ctx
.
height
;
if
(
!
display_width
||
!
display_height
)
{
int
display_size
[
2
];
if
(
vpx_codec_control
(
&
decoder
,
VP9D_GET_DISPLAY_SIZE
,
...
...
@@ -884,23 +897,12 @@ int main_loop(int argc, const char **argv_) {
display_height
,
16
);
}
if
(
img
->
d_w
!=
display_width
||
img
->
d_h
!=
display_height
)
{
assert
(
img
->
fmt
==
VPX_IMG_FMT_I420
);
I420Scale
(
img
->
planes
[
VPX_PLANE_Y
],
img
->
stride
[
VPX_PLANE_Y
],
img
->
planes
[
VPX_PLANE_U
],
img
->
stride
[
VPX_PLANE_U
],
img
->
planes
[
VPX_PLANE_V
],
img
->
stride
[
VPX_PLANE_V
],
img
->
d_w
,
img
->
d_h
,
scaled_img
->
planes
[
VPX_PLANE_Y
],
scaled_img
->
stride
[
VPX_PLANE_Y
],
scaled_img
->
planes
[
VPX_PLANE_U
],
scaled_img
->
stride
[
VPX_PLANE_U
],
scaled_img
->
planes
[
VPX_PLANE_V
],
scaled_img
->
stride
[
VPX_PLANE_V
],
display_width
,
display_height
,
kFilterBox
);
if
(
img
->
d_w
!=
scaled_img
->
d_w
||
img
->
d_h
!=
scaled_img
->
d_h
)
{
vpx_image_scale
(
img
,
scaled_img
,
kFilterBox
);
img
=
scaled_img
;
}
}
if
(
img
)
{
const
int
PLANES_YUV
[]
=
{
VPX_PLANE_Y
,
VPX_PLANE_U
,
VPX_PLANE_V
};
const
int
PLANES_YVU
[]
=
{
VPX_PLANE_Y
,
VPX_PLANE_V
,
VPX_PLANE_U
};
...
...
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