From: Sreerenj Balachandran <[email protected]>

Fix the calculation of horizontal and vertical CTU position for next slice.

Signed-off-by: Sreerenj Balachandran <[email protected]>
---
 src/gen9_mfc_hevc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gen9_mfc_hevc.c b/src/gen9_mfc_hevc.c
index b31e66d..940146b 100644
--- a/src/gen9_mfc_hevc.c
+++ b/src/gen9_mfc_hevc.c
@@ -737,8 +737,8 @@ gen9_hcpe_hevc_slice_state(VADriverContextP ctx,
     slice_hor_pos = slice_param->slice_segment_address % width_in_ctb;
     slice_ver_pos = slice_param->slice_segment_address / width_in_ctb;
 
-    next_slice_hor_pos = (slice_param->slice_segment_address + 
slice_param->num_ctu_in_slice + 1) % width_in_ctb;
-    next_slice_ver_pos = (slice_param->slice_segment_address + 
slice_param->num_ctu_in_slice + 1) / width_in_ctb;
+    next_slice_hor_pos = (slice_param->slice_segment_address + 
slice_param->num_ctu_in_slice) % width_in_ctb;
+    next_slice_ver_pos = (slice_param->slice_segment_address + 
slice_param->num_ctu_in_slice) / width_in_ctb;
 
     /* only support multi slice begin from row start address */
     assert((slice_param->slice_segment_address % width_in_ctb) == 0);
-- 
2.1.4

_______________________________________________
Libva mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libva

Reply via email to