[FFmpeg-devel] [PATCH] postproc: fix unaligned access
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Thu Jun 18 20:29:06 CEST 2015
QP_store is only 8-bit-aligned, so accessing it as uint32_t causes
SIGILL crashes on sparc.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
libpostproc/postprocess.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 92cc436..e4ea515 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -996,10 +996,7 @@ void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
if (QPStride >= 0){
int i;
const int count= FFMAX(mbHeight * QPStride, mbWidth);
- for(i=0; i<(count>>2); i++){
- ((uint32_t*)c->nonBQPTable)[i] = ((const uint32_t*)QP_store)[i] & 0x3F3F3F3F;
- }
- for(i<<=2; i<count; i++){
+ for(i=0; i<count; i++) {
c->nonBQPTable[i] = QP_store[i] & 0x3F;
}
} else {
--
2.1.4
More information about the ffmpeg-devel
mailing list