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
724769d4
Commit
724769d4
authored
May 13, 2013
by
Dmitry Kovalev
Committed by
Gerrit Code Review
May 13, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Using loop through all planes inside scale_and_extend_frame function." into experimental
parents
571aa446
9f39ab66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
40 deletions
+22
-40
vp9/encoder/vp9_onyx_if.c
vp9/encoder/vp9_onyx_if.c
+22
-40
No files found.
vp9/encoder/vp9_onyx_if.c
View file @
724769d4
...
...
@@ -2128,49 +2128,31 @@ static void scale_and_extend_frame(YV12_BUFFER_CONFIG *src_fb,
const
int
in_h
=
src_fb
->
y_crop_height
;
const
int
out_w
=
dst_fb
->
y_crop_width
;
const
int
out_h
=
dst_fb
->
y_crop_height
;
int
x
,
y
;
int
x
,
y
,
i
;
uint8_t
*
srcs
[
3
]
=
{
src_fb
->
y_buffer
,
src_fb
->
u_buffer
,
src_fb
->
v_buffer
};
int
src_strides
[
3
]
=
{
src_fb
->
y_stride
,
src_fb
->
uv_stride
,
src_fb
->
uv_stride
};
uint8_t
*
dsts
[
3
]
=
{
dst_fb
->
y_buffer
,
dst_fb
->
u_buffer
,
dst_fb
->
v_buffer
};
int
dst_strides
[
3
]
=
{
dst_fb
->
y_stride
,
dst_fb
->
uv_stride
,
dst_fb
->
uv_stride
};
for
(
y
=
0
;
y
<
out_h
;
y
+=
16
)
{
for
(
x
=
0
;
x
<
out_w
;
x
+=
16
)
{
int
x_q4
=
x
*
16
*
in_w
/
out_w
;
int
y_q4
=
y
*
16
*
in_h
/
out_h
;
uint8_t
*
src
=
src_fb
->
y_buffer
+
y
*
in_h
/
out_h
*
src_fb
->
y_stride
+
x
*
in_w
/
out_w
;
uint8_t
*
dst
=
dst_fb
->
y_buffer
+
y
*
dst_fb
->
y_stride
+
x
;
int
src_stride
=
src_fb
->
y_stride
;
int
dst_stride
=
dst_fb
->
y_stride
;
vp9_convolve8
(
src
,
src_stride
,
dst
,
dst_stride
,
vp9_sub_pel_filters_8
[
x_q4
&
0xf
],
16
*
in_w
/
out_w
,
vp9_sub_pel_filters_8
[
y_q4
&
0xf
],
16
*
in_h
/
out_h
,
16
,
16
);
x_q4
>>=
1
;
y_q4
>>=
1
;
src_stride
=
src_fb
->
uv_stride
;
dst_stride
=
dst_fb
->
uv_stride
;
src
=
src_fb
->
u_buffer
+
y
/
2
*
in_h
/
out_h
*
src_fb
->
uv_stride
+
x
/
2
*
in_w
/
out_w
;
dst
=
dst_fb
->
u_buffer
+
y
/
2
*
dst_fb
->
uv_stride
+
x
/
2
;
vp9_convolve8
(
src
,
src_stride
,
dst
,
dst_stride
,
vp9_sub_pel_filters_8
[
x_q4
&
0xf
],
16
*
in_w
/
out_w
,
vp9_sub_pel_filters_8
[
y_q4
&
0xf
],
16
*
in_h
/
out_h
,
8
,
8
);
src
=
src_fb
->
v_buffer
+
y
/
2
*
in_h
/
out_h
*
src_fb
->
uv_stride
+
x
/
2
*
in_w
/
out_w
;
dst
=
dst_fb
->
v_buffer
+
y
/
2
*
dst_fb
->
uv_stride
+
x
/
2
;
vp9_convolve8
(
src
,
src_stride
,
dst
,
dst_stride
,
vp9_sub_pel_filters_8
[
x_q4
&
0xf
],
16
*
in_w
/
out_w
,
vp9_sub_pel_filters_8
[
y_q4
&
0xf
],
16
*
in_h
/
out_h
,
8
,
8
);
for
(
i
=
0
;
i
<
MAX_MB_PLANE
;
++
i
)
{
const
int
factor
=
i
==
0
?
1
:
2
;
const
int
x_q4
=
x
*
(
16
/
factor
)
*
in_w
/
out_w
;
const
int
y_q4
=
y
*
(
16
/
factor
)
*
in_h
/
out_h
;
const
int
src_stride
=
src_strides
[
i
];
const
int
dst_stride
=
dst_strides
[
i
];
uint8_t
*
src
=
srcs
[
i
]
+
y
/
factor
*
in_h
/
out_h
*
src_stride
+
x
/
factor
*
in_w
/
out_w
;
uint8_t
*
dst
=
dsts
[
i
]
+
y
*
dst_stride
+
x
;
vp9_convolve8
(
src
,
src_stride
,
dst
,
dst_stride
,
vp9_sub_pel_filters_8
[
x_q4
&
0xf
],
16
*
in_w
/
out_w
,
vp9_sub_pel_filters_8
[
y_q4
&
0xf
],
16
*
in_h
/
out_h
,
16
/
factor
,
16
/
factor
);
}
}
}
...
...
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