mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Add pre-YUV output clamping to YUV444P12.
A better solution would cover all the ouput transforms, but... later.
This commit is contained in:
parent
0476bbfdce
commit
37245085a9
@ -205,6 +205,9 @@ __global__ void f32_to_yuv444p12(
|
|||||||
mwc_st rctx = rctxs[rb_incr(rb->head, tid)];
|
mwc_st rctx = rctxs[rb_incr(rb->head, tid)];
|
||||||
|
|
||||||
float4 in = src[isrc];
|
float4 in = src[isrc];
|
||||||
|
in.x = fminf(1.0f, in.x);
|
||||||
|
in.y = fminf(1.0f, in.y);
|
||||||
|
in.z = fminf(1.0f, in.z);
|
||||||
ushort3 out = make_ushort3(
|
ushort3 out = make_ushort3(
|
||||||
dclampf(rctx, 4095.0f, 0.299f * in.x + 0.587f * in.y + 0.114f * in.z),
|
dclampf(rctx, 4095.0f, 0.299f * in.x + 0.587f * in.y + 0.114f * in.z),
|
||||||
dclampf(rctx, 4095.0f, -0.168736f * in.x - 0.331264f * in.y + 0.5f * in.z + 0.5f),
|
dclampf(rctx, 4095.0f, -0.168736f * in.x - 0.331264f * in.y + 0.5f * in.z + 0.5f),
|
||||||
|
Loading…
Reference in New Issue
Block a user