diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-05 00:44:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-05 00:54:28 +0200 |
commit | bce42e95d13e3cc9c32bcd75d127c0152e51471d (patch) | |
tree | ec7e1e19748ce5ee666d2f89aa0fc306d8f462e5 | |
parent | b18c9f1eb024abd239c16636f1ef3a9a02d6f262 (diff) | |
parent | 313f9fbfbb5a45eefe4bfe7b04e6c83f9b5f77c7 (diff) | |
download | ffmpeg-bce42e95d13e3cc9c32bcd75d127c0152e51471d.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
configure: add POWER[5-7] support
arm: intreadwrite: revert 16-bit load asm to old version for gcc < 4.6
vqavideo: return error if image size is not a multiple of block size
cosmetics: indentation
avformat: only fill-in interpolated timestamps if duration is non-zero
avformat: remove a workaround for broken timestamps
Conflicts:
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-x | configure | 5 | ||||
-rw-r--r-- | libavcodec/vqavideo.c | 10 | ||||
-rw-r--r-- | libavformat/utils.c | 9 | ||||
-rw-r--r-- | libavutil/arm/intreadwrite.h | 4 |
4 files changed, 17 insertions, 11 deletions
@@ -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])); |