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
19ba5a94
Commit
19ba5a94
authored
Sep 25, 2018
by
Ronald S. Bultje
Browse files
Fix minor reconstruction bugs for 10-bit content.
parent
d88abfec
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ipred.c
View file @
19ba5a94
...
...
@@ -133,26 +133,40 @@ dc_lfn(width, height,, unsigned dc = (width + height) >> 1; \
dc += topleft[-(i + 1)]; \
dc_gen)
#if BITDEPTH == 8
#define MULTIPLIER_1x2 0x5556
#define MULTIPLIER_1x4 0x3334
#define BASE_SHIFT 16
#else
#define MULTIPLIER_1x2 0xAAAB
#define MULTIPLIER_1x4 0x6667
#define BASE_SHIFT 17
#endif
dc2d_lfn
(
4
,
4
,
dc
>>=
3
)
dc2d_lfn
(
4
,
8
,
dc
=
iclip_pixel
(
0x5556
*
dc
>>
18
))
dc2d_lfn
(
4
,
16
,
dc
=
iclip_pixel
(
0x3334
*
dc
>>
18
))
dc2d_lfn
(
8
,
4
,
dc
=
iclip_pixel
(
0x5556
*
dc
>>
18
))
dc2d_lfn
(
4
,
8
,
dc
=
iclip_pixel
(
MULTIPLIER_1x2
*
dc
>>
(
BASE_SHIFT
+
2
)
))
dc2d_lfn
(
4
,
16
,
dc
=
iclip_pixel
(
MULTIPLIER_1x4
*
dc
>>
(
BASE_SHIFT
+
2
)
))
dc2d_lfn
(
8
,
4
,
dc
=
iclip_pixel
(
MULTIPLIER_1x2
*
dc
>>
(
BASE_SHIFT
+
2
)
))
dc2d_lfn
(
8
,
8
,
dc
>>=
4
)
dc2d_lfn
(
8
,
16
,
dc
=
iclip_pixel
(
0x5556
*
dc
>>
19
))
dc2d_lfn
(
8
,
32
,
dc
=
iclip_pixel
(
0x3334
*
dc
>>
19
))
dc2d_lfn
(
16
,
4
,
dc
=
iclip_pixel
(
0x3334
*
dc
>>
18
))
dc2d_lfn
(
16
,
8
,
dc
=
iclip_pixel
(
0x5556
*
dc
>>
19
))
dc2d_lfn
(
8
,
16
,
dc
=
iclip_pixel
(
MULTIPLIER_1x2
*
dc
>>
(
BASE_SHIFT
+
3
)
))
dc2d_lfn
(
8
,
32
,
dc
=
iclip_pixel
(
MULTIPLIER_1x4
*
dc
>>
(
BASE_SHIFT
+
3
)
))
dc2d_lfn
(
16
,
4
,
dc
=
iclip_pixel
(
MULTIPLIER_1x4
*
dc
>>
(
BASE_SHIFT
+
2
)
))
dc2d_lfn
(
16
,
8
,
dc
=
iclip_pixel
(
MULTIPLIER_1x2
*
dc
>>
(
BASE_SHIFT
+
3
)
))
dc2d_lfn
(
16
,
16
,
dc
>>=
5
)
dc2d_lfn
(
16
,
32
,
dc
=
iclip_pixel
(
0x5556
*
dc
>>
20
))
dc2d_lfn
(
16
,
64
,
dc
=
iclip_pixel
(
0x3334
*
dc
>>
20
))
dc2d_lfn
(
32
,
8
,
dc
=
iclip_pixel
(
0x3334
*
dc
>>
19
))
dc2d_lfn
(
32
,
16
,
dc
=
iclip_pixel
(
0x5556
*
dc
>>
20
))
dc2d_lfn
(
16
,
32
,
dc
=
iclip_pixel
(
MULTIPLIER_1x2
*
dc
>>
(
BASE_SHIFT
+
4
)
))
dc2d_lfn
(
16
,
64
,
dc
=
iclip_pixel
(
MULTIPLIER_1x4
*
dc
>>
(
BASE_SHIFT
+
4
)
))
dc2d_lfn
(
32
,
8
,
dc
=
iclip_pixel
(
MULTIPLIER_1x4
*
dc
>>
(
BASE_SHIFT
+
3
)
))
dc2d_lfn
(
32
,
16
,
dc
=
iclip_pixel
(
MULTIPLIER_1x2
*
dc
>>
(
BASE_SHIFT
+
4
)
))
dc2d_lfn
(
32
,
32
,
dc
>>=
6
)
dc2d_lfn
(
32
,
64
,
dc
=
iclip_pixel
(
0x5556
*
dc
>>
21
))
dc2d_lfn
(
64
,
16
,
dc
=
iclip_pixel
(
0x3334
*
dc
>>
20
))
dc2d_lfn
(
64
,
32
,
dc
=
iclip_pixel
(
0x5556
*
dc
>>
21
))
dc2d_lfn
(
32
,
64
,
dc
=
iclip_pixel
(
MULTIPLIER_1x2
*
dc
>>
(
BASE_SHIFT
+
5
)
))
dc2d_lfn
(
64
,
16
,
dc
=
iclip_pixel
(
MULTIPLIER_1x4
*
dc
>>
(
BASE_SHIFT
+
4
)
))
dc2d_lfn
(
64
,
32
,
dc
=
iclip_pixel
(
MULTIPLIER_1x2
*
dc
>>
(
BASE_SHIFT
+
5
)
))
dc2d_lfn
(
64
,
64
,
dc
>>=
7
)
#undef MULTIPLIER_1x2
#undef MULTIPLIER_1x4
#undef BASE_SHIFT
#define dc128_lfn(width, height) \
dc_lfn(width, height, 128, const unsigned dc = (1 << BITDEPTH) >> 1)
...
...
src/loopfilter.c
View file @
19ba5a94
...
...
@@ -136,16 +136,16 @@ loop_filter(pixel *dst, int E, int I, int H,
int
f
=
iclip_diff
(
p1
-
q1
),
f1
,
f2
;
f
=
iclip_diff
(
3
*
(
q0
-
p0
)
+
f
);
f1
=
imin
(
f
+
4
,
12
7
)
>>
3
;
f2
=
imin
(
f
+
3
,
12
7
)
>>
3
;
f1
=
imin
(
f
+
4
,
(
12
8
<<
(
BITDEPTH
-
8
))
-
1
)
>>
3
;
f2
=
imin
(
f
+
3
,
(
12
8
<<
(
BITDEPTH
-
8
))
-
1
)
>>
3
;
dst
[
strideb
*
-
1
]
=
iclip_pixel
(
p0
+
f2
);
dst
[
strideb
*
+
0
]
=
iclip_pixel
(
q0
-
f1
);
}
else
{
int
f
=
iclip_diff
(
3
*
(
q0
-
p0
)),
f1
,
f2
;
f1
=
imin
(
f
+
4
,
12
7
)
>>
3
;
f2
=
imin
(
f
+
3
,
12
7
)
>>
3
;
f1
=
imin
(
f
+
4
,
(
12
8
<<
(
BITDEPTH
-
8
))
-
1
)
>>
3
;
f2
=
imin
(
f
+
3
,
(
12
8
<<
(
BITDEPTH
-
8
))
-
1
)
>>
3
;
dst
[
strideb
*
-
1
]
=
iclip_pixel
(
p0
+
f2
);
dst
[
strideb
*
+
0
]
=
iclip_pixel
(
q0
-
f1
);
...
...
src/recon.c
View file @
19ba5a94
...
...
@@ -1237,8 +1237,8 @@ void bytefn(recon_b_inter)(Dav1dTileContext *const t, const enum BlockSize bs,
0
,
uvdst
,
f
->
cur
.
p
.
stride
[
1
],
top_sb_edge
,
m
,
&
angle
,
cbw4
,
cbh4
,
tl_edge
);
dsp
->
ipred
.
intra_pred
[
ii_tx
][
m
](
tmp
,
cbw4
*
4
,
tl_edge
,
0
);
dsp
->
mc
.
blend
(
uvdst
,
f
->
cur
.
p
.
stride
[
1
],
tmp
,
cbw4
*
4
,
dsp
->
ipred
.
intra_pred
[
ii_tx
][
m
](
tmp
,
cbw4
*
4
*
sizeof
(
pixel
)
,
tl_edge
,
0
);
dsp
->
mc
.
blend
(
uvdst
,
f
->
cur
.
p
.
stride
[
1
],
tmp
,
cbw4
*
4
*
sizeof
(
pixel
)
,
cbw4
*
4
,
cbh4
*
4
,
ii_mask
,
cbw4
*
4
);
}
}
...
...
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