[Mesa-dev] [PATCH] vl/util: Fix YV12/I420 convert to NV12 U/V reversal.

Andy Furniss adf.lists at gmail.com
Thu Jul 28 23:46:36 UTC 2016


Fix VAAPI YV12/I420 convert to NV12 U/V reversal.
Input order is YVU when this is called.

Signed-off-by: Andy Furniss <adf.lists at gmail.com>
---
  src/gallium/auxiliary/util/u_video.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_video.h 
b/src/gallium/auxiliary/util/u_video.h
index 7e743de..2c02156 100644
--- a/src/gallium/auxiliary/util/u_video.h
+++ b/src/gallium/auxiliary/util/u_video.h
@@ -148,7 +148,7 @@ u_copy_yv12_img_to_nv12_surf(ubyte *const *src,
     } else if (field == 1) {
        const ubyte *src_1 = src[field];
        const ubyte *src_2 = src[field+1];
-      bool odd = false;
+      bool odd = true;
        for (unsigned i = 0; i < height ; i++) {
           for (unsigned j = 0; j < width*2 ; j++) {
              if (odd == false) {
-- 
2.7.0


More information about the mesa-dev mailing list