[vlc-devel] [PATCH 16/39] dxa9: the texture height is given by the texture description

Steve Lhomme robux4 at videolabs.io
Fri Jun 2 16:46:19 CEST 2017


it doesn't matter what the format says
---
 modules/video_chroma/dxa9.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/video_chroma/dxa9.c b/modules/video_chroma/dxa9.c
index eff8d7e214..ec1e2d27fc 100644
--- a/modules/video_chroma/dxa9.c
+++ b/modules/video_chroma/dxa9.c
@@ -95,9 +95,9 @@ static void DXA9_YV12(filter_t *p_filter, picture_t *src, picture_t *dst)
 
         uint8_t *plane[3] = {
             (uint8_t*)lock.pBits,
-            (uint8_t*)lock.pBits + pitch[0] * src->format.i_height,
-            (uint8_t*)lock.pBits + pitch[0] * src->format.i_height
-                                 + pitch[1] * src->format.i_height / 2,
+            (uint8_t*)lock.pBits + pitch[0] * desc.Height,
+            (uint8_t*)lock.pBits + pitch[0] * desc.Height
+                                 + pitch[1] * desc.Height / 2,
         };
 
         if (imc3) {
@@ -110,7 +110,7 @@ static void DXA9_YV12(filter_t *p_filter, picture_t *src, picture_t *dst)
     } else if (desc.Format == MAKEFOURCC('N','V','1','2')) {
         uint8_t *plane[2] = {
             lock.pBits,
-            (uint8_t*)lock.pBits + lock.Pitch * src->format.i_height
+            (uint8_t*)lock.pBits + lock.Pitch * desc.Height
         };
         size_t  pitch[2] = {
             lock.Pitch,
@@ -144,7 +144,7 @@ static void DXA9_NV12(filter_t *p_filter, picture_t *src, picture_t *dst)
     if (desc.Format == MAKEFOURCC('N','V','1','2')) {
         uint8_t *plane[2] = {
             lock.pBits,
-            (uint8_t*)lock.pBits + lock.Pitch * src->format.i_height
+            (uint8_t*)lock.pBits + lock.Pitch * desc.Height
         };
         size_t  pitch[2] = {
             lock.Pitch,
-- 
2.12.1



More information about the vlc-devel mailing list