summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
diff options
context:
space:
mode:
authorMark Thompson <[email protected]>2017-07-15 19:51:56 +0100
committerEmil Velikov <[email protected]>2017-07-17 15:24:56 +0100
commit63dcfed81f011dae5ca68af3369433be28135415 (patch)
tree29c1144b5bc99808c6dc85256dced14d80053038 /src/gallium/auxiliary/vl
parent4168c162c5bcbbfc6c712466b9c3d7d0dbac06e5 (diff)
st/va: Fix scaling list ordering for H.265
Mesa here requires the scaling lists in diagonal scan order, but VAAPI passes them in raster scan order. Therefore, rearrange the elements when copying. v2: Move scan tables to vl_zscan.c. Fix type in size assertion. Cc: [email protected] Signed-off-by: Mark Thompson <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_zscan.c21
-rw-r--r--src/gallium/auxiliary/vl/vl_zscan.h2
2 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/vl/vl_zscan.c b/src/gallium/auxiliary/vl/vl_zscan.c
index 24d64525b76..75013c42bfe 100644
--- a/src/gallium/auxiliary/vl/vl_zscan.c
+++ b/src/gallium/auxiliary/vl/vl_zscan.c
@@ -95,6 +95,27 @@ const int vl_zscan_alternate[] =
38,46,54,62,39,47,55,63
};
+const int vl_zscan_h265_up_right_diagonal_16[] =
+{
+ /* Up-right diagonal scan order for 4x4 blocks - see H.265 section 6.5.3. */
+ 0, 4, 1, 8, 5, 2, 12, 9,
+ 6, 3, 13, 10, 7, 14, 11, 15,
+};
+
+const int vl_zscan_h265_up_right_diagonal[] =
+{
+ /* Up-right diagonal scan order for 8x8 blocks - see H.265 section 6.5.3. */
+ 0, 8, 1, 16, 9, 2, 24, 17,
+ 10, 3, 32, 25, 18, 11, 4, 40,
+ 33, 26, 19, 12, 5, 48, 41, 34,
+ 27, 20, 13, 6, 56, 49, 42, 35,
+ 28, 21, 14, 7, 57, 50, 43, 36,
+ 29, 22, 15, 58, 51, 44, 37, 30,
+ 23, 59, 52, 45, 38, 31, 60, 53,
+ 46, 39, 61, 54, 47, 62, 55, 63,
+};
+
+
static void *
create_vert_shader(struct vl_zscan *zscan)
{
diff --git a/src/gallium/auxiliary/vl/vl_zscan.h b/src/gallium/auxiliary/vl/vl_zscan.h
index 268cf0a6e32..292152e873e 100644
--- a/src/gallium/auxiliary/vl/vl_zscan.h
+++ b/src/gallium/auxiliary/vl/vl_zscan.h
@@ -68,6 +68,8 @@ 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[];
+extern const int vl_zscan_h265_up_right_diagonal_16[];
+extern const int vl_zscan_h265_up_right_diagonal[];
struct pipe_sampler_view *
vl_zscan_layout(struct pipe_context *pipe, const int layout[64], unsigned blocks_per_line);