Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
aom-rav1e
Commits
3af39b99
Commit
3af39b99
authored
10 years ago
by
Yaowu Xu
Committed by
Gerrit Code Review
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Fix src frame buffer copy and extend"
parents
924af1ed
d602500d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vp9/encoder/vp9_extend.c
+10
-10
10 additions, 10 deletions
vp9/encoder/vp9_extend.c
vp9/vp9_iface_common.h
+2
-0
2 additions, 0 deletions
vp9/vp9_iface_common.h
with
12 additions
and
10 deletions
vp9/encoder/vp9_extend.c
+
10
−
10
View file @
3af39b99
...
...
@@ -110,10 +110,10 @@ void vp9_copy_and_extend_frame(const YV12_BUFFER_CONFIG *src,
// Motion estimation may use src block variance with the block size up
// to 64x64, so the right and bottom need to be extended to 64 multiple
// or up to 16, whichever is greater.
const
int
eb_y
=
MAX
(
ALIGN_POWER_OF_TWO
(
src
->
y_width
,
6
)
-
src
->
y_width
,
16
)
;
const
int
er_y
=
MAX
(
ALIGN_POWER_OF_TWO
(
src
->
y_height
,
6
)
-
src
->
y_height
,
16
)
;
const
int
eb_y
=
MAX
(
src
->
y_width
+
16
,
ALIGN_POWER_OF_TWO
(
src
->
y_width
,
6
)
)
-
src
->
y_crop_width
;
const
int
er_y
=
MAX
(
src
->
y_height
+
16
,
ALIGN_POWER_OF_TWO
(
src
->
y_height
,
6
)
)
-
src
->
y_crop_height
;
const
int
uv_width_subsampling
=
(
src
->
uv_width
!=
src
->
y_width
);
const
int
uv_height_subsampling
=
(
src
->
uv_height
!=
src
->
y_height
);
const
int
et_uv
=
et_y
>>
uv_height_subsampling
;
...
...
@@ -125,17 +125,17 @@ void vp9_copy_and_extend_frame(const YV12_BUFFER_CONFIG *src,
if
(
src
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
highbd_copy_and_extend_plane
(
src
->
y_buffer
,
src
->
y_stride
,
dst
->
y_buffer
,
dst
->
y_stride
,
src
->
y_width
,
src
->
y_height
,
src
->
y_
crop_
width
,
src
->
y_
crop_
height
,
et_y
,
el_y
,
eb_y
,
er_y
);
highbd_copy_and_extend_plane
(
src
->
u_buffer
,
src
->
uv_stride
,
dst
->
u_buffer
,
dst
->
uv_stride
,
src
->
uv_width
,
src
->
uv_height
,
src
->
uv_
crop_
width
,
src
->
uv_
crop_
height
,
et_uv
,
el_uv
,
eb_uv
,
er_uv
);
highbd_copy_and_extend_plane
(
src
->
v_buffer
,
src
->
uv_stride
,
dst
->
v_buffer
,
dst
->
uv_stride
,
src
->
uv_width
,
src
->
uv_height
,
src
->
uv_
crop_
width
,
src
->
uv_
crop_
height
,
et_uv
,
el_uv
,
eb_uv
,
er_uv
);
return
;
}
...
...
@@ -143,17 +143,17 @@ void vp9_copy_and_extend_frame(const YV12_BUFFER_CONFIG *src,
copy_and_extend_plane
(
src
->
y_buffer
,
src
->
y_stride
,
dst
->
y_buffer
,
dst
->
y_stride
,
src
->
y_width
,
src
->
y_height
,
src
->
y_
crop_
width
,
src
->
y_
crop_
height
,
et_y
,
el_y
,
eb_y
,
er_y
);
copy_and_extend_plane
(
src
->
u_buffer
,
src
->
uv_stride
,
dst
->
u_buffer
,
dst
->
uv_stride
,
src
->
uv_width
,
src
->
uv_height
,
src
->
uv_
crop_
width
,
src
->
uv_
crop_
height
,
et_uv
,
el_uv
,
eb_uv
,
er_uv
);
copy_and_extend_plane
(
src
->
v_buffer
,
src
->
uv_stride
,
dst
->
v_buffer
,
dst
->
uv_stride
,
src
->
uv_width
,
src
->
uv_height
,
src
->
uv_
crop_
width
,
src
->
uv_
crop_
height
,
et_uv
,
el_uv
,
eb_uv
,
er_uv
);
}
...
...
This diff is collapsed.
Click to expand it.
vp9/vp9_iface_common.h
+
2
−
0
View file @
3af39b99
...
...
@@ -87,6 +87,8 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img,
:
yv12
->
y_width
;
yv12
->
uv_height
=
img
->
y_chroma_shift
==
1
?
(
1
+
yv12
->
y_height
)
/
2
:
yv12
->
y_height
;
yv12
->
uv_crop_width
=
yv12
->
uv_width
;
yv12
->
uv_crop_height
=
yv12
->
uv_height
;
yv12
->
y_stride
=
img
->
stride
[
VPX_PLANE_Y
];
yv12
->
uv_stride
=
img
->
stride
[
VPX_PLANE_U
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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