Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
dav1d
Commits
a0364377
Commit
a0364377
authored
Sep 25, 2018
by
Raphaël Zumer
Committed by
Ronald S. Bultje
Sep 26, 2018
Browse files
Fix attempt to copy chroma for monochrome streams
parent
82f7611b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/recon.c
View file @
a0364377
...
...
@@ -1488,8 +1488,7 @@ void bytefn(filter_sbrow)(Dav1dFrameContext *const f, const int sby) {
void
bytefn
(
backup_ipred_edge
)(
Dav1dTileContext
*
const
t
)
{
const
Dav1dFrameContext
*
const
f
=
t
->
f
;
Dav1dTileState
*
const
ts
=
t
->
ts
;
const
int
ss_ver
=
f
->
cur
.
p
.
p
.
layout
==
DAV1D_PIXEL_LAYOUT_I420
;
const
int
ss_hor
=
f
->
cur
.
p
.
p
.
layout
!=
DAV1D_PIXEL_LAYOUT_I444
;
const
int
monochrome
=
f
->
cur
.
p
.
p
.
layout
==
DAV1D_PIXEL_LAYOUT_I400
;
const
int
sby
=
t
->
by
>>
f
->
sb_shift
;
const
int
sby_off
=
f
->
sb128w
*
128
*
sby
;
const
int
x_off
=
ts
->
tiling
.
col_start
;
...
...
@@ -1499,10 +1498,16 @@ void bytefn(backup_ipred_edge)(Dav1dTileContext *const t) {
((
t
->
by
+
f
->
sb_step
)
*
4
-
1
)
*
PXSTRIDE
(
f
->
cur
.
p
.
stride
[
0
]);
pixel_copy
(
&
f
->
ipred_edge
[
0
][
sby_off
+
x_off
*
4
],
y
,
4
*
(
ts
->
tiling
.
col_end
-
x_off
));
const
ptrdiff_t
uv_off
=
(
x_off
*
4
>>
ss_hor
)
+
(((
t
->
by
+
f
->
sb_step
)
*
4
>>
ss_ver
)
-
1
)
*
PXSTRIDE
(
f
->
cur
.
p
.
stride
[
1
]);
for
(
int
pl
=
1
;
pl
<=
2
;
pl
++
)
pixel_copy
(
&
f
->
ipred_edge
[
pl
][
sby_off
+
(
x_off
*
4
>>
ss_hor
)],
&
((
const
pixel
*
)
f
->
cur
.
p
.
data
[
pl
])[
uv_off
],
4
*
(
ts
->
tiling
.
col_end
-
x_off
)
>>
ss_hor
);
if
(
!
monochrome
)
{
const
int
ss_ver
=
f
->
cur
.
p
.
p
.
layout
==
DAV1D_PIXEL_LAYOUT_I420
;
const
int
ss_hor
=
f
->
cur
.
p
.
p
.
layout
!=
DAV1D_PIXEL_LAYOUT_I444
;
const
ptrdiff_t
uv_off
=
(
x_off
*
4
>>
ss_hor
)
+
(((
t
->
by
+
f
->
sb_step
)
*
4
>>
ss_ver
)
-
1
)
*
PXSTRIDE
(
f
->
cur
.
p
.
stride
[
1
]);
for
(
int
pl
=
1
;
pl
<=
2
;
pl
++
)
pixel_copy
(
&
f
->
ipred_edge
[
pl
][
sby_off
+
(
x_off
*
4
>>
ss_hor
)],
&
((
const
pixel
*
)
f
->
cur
.
p
.
data
[
pl
])[
uv_off
],
4
*
(
ts
->
tiling
.
col_end
-
x_off
)
>>
ss_hor
);
}
}
Write
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!
Cancel
Please
register
or
sign in
to comment