Anton Baskanov : wined3d: Simplify the odd line condition in gen_yv12_read().

Alexandre Julliard julliard at winehq.org
Wed Sep 1 15:45:10 CDT 2021


Module: wine
Branch: master
Commit: e3db02d0cb55155044bff1b3d4851124dad20a73
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e3db02d0cb55155044bff1b3d4851124dad20a73

Author: Anton Baskanov <baskanov at gmail.com>
Date:   Tue Aug 31 23:26:25 2021 +0700

wined3d: Simplify the odd line condition in gen_yv12_read().

Signed-off-by: Anton Baskanov <baskanov at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/glsl_shader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index c760d519b30..fb809052d83 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -12624,7 +12624,7 @@ static void gen_yv12_read(struct wined3d_string_buffer *buffer,
     /* Read odd lines from the right side (add 0.5 to the x coordinate). Keep
      * in mind that each line of the chroma plane corresponds to 2 lines of the
      * resulting image. */
-    shader_addline(buffer, "    if (fract(floor(texcoord.y * size.y) * 0.25 + 1.0 / 6.0) >= 0.5)\n");
+    shader_addline(buffer, "    if (fract(texcoord.y * size.y * 0.25) >= 0.5)\n");
     shader_addline(buffer, "        texcoord.x += 0.5;\n");
 
     /* Clamp, keep the half pixel origin in mind. */




More information about the wine-cvs mailing list