On 02/01/2016 12:59 PM, Ilia Mirkin wrote:
On Mon, Feb 1, 2016 at 12:35 PM, Leo Liu <leo....@amd.com> wrote:
The scaling list should be filled out with zig zag scan

v2: integrate zig zag scan for list 4x4 to vl(Christian)

Cc: "11.0 11.1" <mesa-sta...@lists.freedesktop.org>
Signed-off-by: Leo Liu <leo....@amd.com>
---
  src/gallium/state_trackers/omx/vid_dec_h264.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/omx/vid_dec_h264.c 
b/src/gallium/state_trackers/omx/vid_dec_h264.c
index f66ed89..f17be91 100644
--- a/src/gallium/state_trackers/omx/vid_dec_h264.c
+++ b/src/gallium/state_trackers/omx/vid_dec_h264.c
@@ -35,6 +35,7 @@
  #include "util/u_memory.h"
  #include "util/u_video.h"
  #include "vl/vl_rbsp.h"
+#include "vl/vl_zscan.h"

  #include "entrypoint.h"
  #include "vid_dec.h"
@@ -215,6 +216,7 @@ static void scaling_list(struct vl_rbsp *rbsp, uint8_t 
*scalingList, unsigned si
     }

     for (i = 0; i < sizeOfScalingList; ++i ) {
+      unsigned scan = (sizeOfScalingList == 16) ? vl_zscan_normal_16[i] : 
vl_zscan_normal[i];
Perhaps determine the list just once rather than on each loop iter?
Also (and more importantly) it appears like you forgot to add
vl_zscan_normal_16?

patch 1 is sent, not sure why it haven't arrived.



        if (nextScale != 0) {
           signed delta_scale = vl_rbsp_se(rbsp);
@@ -224,8 +226,8 @@ static void scaling_list(struct vl_rbsp *rbsp, uint8_t 
*scalingList, unsigned si
              return;
           }
        }
-      scalingList[i] = nextScale == 0 ? lastScale : nextScale;
-      lastScale = scalingList[i];
+      scalingList[scan] = nextScale == 0 ? lastScale : nextScale;
+      lastScale = scalingList[scan];
     }
  }

--
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

>From cbd5f19734aaa9a0b99b93c0b2fcb2f8da736289 Mon Sep 17 00:00:00 2001
From: Leo Liu <leo....@amd.com>
Date: Mon, 1 Feb 2016 12:04:34 -0500
Subject: [PATCH v2 1/2] vl: add zig zag scan for list 4x4

Cc: "11.0 11.1" <mesa-sta...@lists.freedesktop.org>
Signed-off-by: Leo Liu <leo....@amd.com>
---
 src/gallium/auxiliary/vl/vl_zscan.c | 7 +++++++
 src/gallium/auxiliary/vl/vl_zscan.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/src/gallium/auxiliary/vl/vl_zscan.c b/src/gallium/auxiliary/vl/vl_zscan.c
index 1c6cdd4..5241471 100644
--- a/src/gallium/auxiliary/vl/vl_zscan.c
+++ b/src/gallium/auxiliary/vl/vl_zscan.c
@@ -49,6 +49,13 @@ enum VS_OUTPUT
    VS_O_VTEX = 0
 };
 
+const int vl_zscan_normal_16[] =
+{
+   /* Zig-Zag scan pattern */
+    0, 1, 4, 8, 5, 2, 3, 6,
+    9,12,13,10, 7,11,14,15
+};
+
 const int vl_zscan_linear[] =
 {
    /* Linear scan pattern */
diff --git a/src/gallium/auxiliary/vl/vl_zscan.h b/src/gallium/auxiliary/vl/vl_zscan.h
index eacee2d..268cf0a 100644
--- a/src/gallium/auxiliary/vl/vl_zscan.h
+++ b/src/gallium/auxiliary/vl/vl_zscan.h
@@ -64,6 +64,7 @@ struct vl_zscan_buffer
    struct pipe_surface *dst;
 };
 
+extern const int vl_zscan_normal_16[];
 extern const int vl_zscan_linear[];
 extern const int vl_zscan_normal[];
 extern const int vl_zscan_alternate[];
-- 
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to