[FFmpeg-cvslog] avcodec/arm/cabac: fix inline cabac reader with the UNCHECKED bitstream reader
Michael Niedermayer
git at videolan.org
Sat Mar 15 01:29:07 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Mar 15 01:08:45 2014 +0100| [41d08ca57564e1b9d8a4a12cfafe67a2a85914aa] | committer: Michael Niedermayer
avcodec/arm/cabac: fix inline cabac reader with the UNCHECKED bitstream reader
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=41d08ca57564e1b9d8a4a12cfafe67a2a85914aa
---
libavcodec/arm/cabac.h | 6 ++++++
libavcodec/h264_cabac.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavcodec/arm/cabac.h b/libavcodec/arm/cabac.h
index f581d86..fdbf86b 100644
--- a/libavcodec/arm/cabac.h
+++ b/libavcodec/arm/cabac.h
@@ -59,12 +59,18 @@ static av_always_inline int get_cabac_inline_arm(CABACContext *c,
"tst %[r_c] , %[r_c] \n\t"
"bne 2f \n\t"
"ldr %[r_c] , [%[c], %[byte]] \n\t"
+#if UNCHECKED_BITSTREAM_READER
+ "ldrh %[tmp] , [%[r_c]] \n\t"
+ "add %[r_c] , %[r_c] , #2 \n\t"
+ "str %[r_c] , [%[c], %[byte]] \n\t"
+#else
"ldr %[r_b] , [%[c], %[end]] \n\t"
"ldrh %[tmp] , [%[r_c]] \n\t"
"cmp %[r_c] , %[r_b] \n\t"
"itt lt \n\t"
"addlt %[r_c] , %[r_c] , #2 \n\t"
"strlt %[r_c] , [%[c], %[byte]] \n\t"
+#endif
"sub %[r_c] , %[low] , #1 \n\t"
"add %[r_b] , %[tables] , %[norm_off] \n\t"
"eor %[r_c] , %[low] , %[r_c] \n\t"
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index e6fc652..1f7320c 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -1620,7 +1620,7 @@ decode_cabac_residual_internal(H264Context *h, int16_t *block,
cc.range = h->cabac.range;
cc.low = h->cabac.low;
cc.bytestream= h->cabac.bytestream;
-#if !UNCHECKED_BITSTREAM_READER || ARCH_ARM || ARCH_AARCH64
+#if !UNCHECKED_BITSTREAM_READER || ARCH_AARCH64
cc.bytestream_end = h->cabac.bytestream_end;
#endif
#else
More information about the ffmpeg-cvslog
mailing list