summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure5
-rw-r--r--libavcodec/vqavideo.c10
-rw-r--r--libavformat/utils.c9
-rw-r--r--libavutil/arm/intreadwrite.h4
4 files changed, 17 insertions, 11 deletions
diff --git a/configure b/configure
index 60a4b9e19a..66f46a0ba3 100755
--- a/configure
+++ b/configure
@@ -2481,9 +2481,12 @@ elif enabled ppc; then
74*|ppc74*|powerpc74*)
cpuflags="-mcpu=7400 -mpowerpc-gfxopt"
;;
- g5|970|ppc970|powerpc970|power4*)
+ g5|970|ppc970|powerpc970)
cpuflags="-mcpu=970 -mpowerpc-gfxopt -mpowerpc64"
;;
+ power[3-7]*)
+ cpuflags="-mcpu=$cpu -mpowerpc-gfxopt -mpowerpc64"
+ ;;
cell)
cpuflags="-mcpu=cell"
enable ldbrx
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index dcd81c73c5..6874b75201 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -155,6 +155,11 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
return -1;
}
+ if (s->width % s->vector_width || s->height % s->vector_height) {
+ av_log(avctx, AV_LOG_ERROR, "Image size not multiple of block size\n");
+ return AVERROR_INVALIDDATA;
+ }
+
/* allocate codebooks */
s->codebook_size = MAX_CODEBOOK_SIZE;
s->codebook = av_malloc(s->codebook_size);
@@ -164,11 +169,6 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
if (!s->next_codebook_buffer)
goto fail;
- if (s->width % s->vector_width || s->height % s->vector_height) {
- av_log(avctx, AV_LOG_ERROR, "Picture dimensions are not a multiple of the vector size\n");
- goto fail;
- }
-
/* allocate decode buffer */
s->decode_buffer_size = (s->width / s->vector_width) *
(s->height / s->vector_height) * 2;
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d9dc2fb731..fd9e4d5309 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1082,13 +1082,14 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
}
/* presentation is not delayed : PTS and DTS are the same */
- if(pkt->pts == AV_NOPTS_VALUE)
+ if (pkt->pts == AV_NOPTS_VALUE)
pkt->pts = pkt->dts;
- update_initial_timestamps(s, pkt->stream_index, pkt->pts, pkt->pts);
- if(pkt->pts == AV_NOPTS_VALUE)
+ update_initial_timestamps(s, pkt->stream_index, pkt->pts,
+ pkt->pts);
+ if (pkt->pts == AV_NOPTS_VALUE)
pkt->pts = st->cur_dts;
pkt->dts = pkt->pts;
- if(pkt->pts != AV_NOPTS_VALUE)
+ if (pkt->pts != AV_NOPTS_VALUE)
st->cur_dts = pkt->pts + duration;
}
}
diff --git a/libavutil/arm/intreadwrite.h b/libavutil/arm/intreadwrite.h
index 4a19a0cc22..0c1f7e82e4 100644
--- a/libavutil/arm/intreadwrite.h
+++ b/libavutil/arm/intreadwrite.h
@@ -30,7 +30,9 @@ static av_always_inline unsigned AV_RN16(const void *p)
{
const uint8_t *q = p;
unsigned v;
-#ifdef __thumb__
+#if !AV_GCC_VERSION_AT_LEAST(4,6)
+ __asm__ ("ldrh %0, %1" : "=r"(v) : "m"(*(const uint16_t *)q));
+#elif defined __thumb__
__asm__ ("ldrh %0, %1" : "=r"(v) : "m"(q[0]), "m"(q[1]));
#else
__asm__ ("ldrh %0, %1" : "=r"(v) : "Uq"(q[0]), "m"(q[1]));