summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/omx
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2016-02-01 13:32:31 -0500
committerLeo Liu <leo.liu@amd.com>2016-02-02 20:29:47 -0500
commit6ad2e55a1405ac3757439dae55ed86425bb65806 (patch)
treee6c268e9477b2580910a515c90d2c323fbc7490a /src/gallium/state_trackers/omx
parent4f598f2173c6555a52aad942ce6ea75c65afe21a (diff)
downloadexternal_mesa3d-6ad2e55a1405ac3757439dae55ed86425bb65806.zip
external_mesa3d-6ad2e55a1405ac3757439dae55ed86425bb65806.tar.gz
external_mesa3d-6ad2e55a1405ac3757439dae55ed86425bb65806.tar.bz2
st/omx/dec/h264: fix corruption when scaling matrix present flag set
The scaling list should be filled out with zig zag scan v2: integrate zig zag scan for list 4x4 to vl(Christian) v3: move list determination out from the loop(Ilia) Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'src/gallium/state_trackers/omx')
-rw-r--r--src/gallium/state_trackers/omx/vid_dec_h264.c7
1 files changed, 5 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..b453682 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"
@@ -205,6 +206,7 @@ static void scaling_list(struct vl_rbsp *rbsp, uint8_t *scalingList, unsigned si
const uint8_t *defaultList, const uint8_t *fallbackList)
{
unsigned lastScale = 8, nextScale = 8;
+ const int *list;
unsigned i;
/* (pic|seq)_scaling_list_present_flag[i] */
@@ -214,6 +216,7 @@ static void scaling_list(struct vl_rbsp *rbsp, uint8_t *scalingList, unsigned si
return;
}
+ list = (sizeOfScalingList == 16) ? vl_zscan_normal_16 : vl_zscan_normal;
for (i = 0; i < sizeOfScalingList; ++i ) {
if (nextScale != 0) {
@@ -224,8 +227,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[list[i]] = nextScale == 0 ? lastScale : nextScale;
+ lastScale = scalingList[list[i]];
}
}