diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-21 14:25:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-21 14:44:32 +0200 |
commit | 406cdddbdd229cead581eb1c7b978a2c59453b24 (patch) | |
tree | 0c36c4c2fcafb618ae80074a9a1c07a06872a91f | |
parent | 9543cd593ed8249e9885598fc53de163c9d4e2d3 (diff) | |
parent | e52e4fe10d96da4ed26e2acbe3c1ab69485ed75d (diff) | |
download | ffmpeg-406cdddbdd229cead581eb1c7b978a2c59453b24.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
libx264: add forgotten ;
matroskadec: fix a sanity check.
matroskadec: only return corrupt packets that actually contain data
lavf: zero data/size of the packet passed to read_packet().
ARM: use 2-operand syntax for ADD Rd, PC in Apple PIC code
ARM: align PIC offset pools to 4 bytes
ARM: swap source operands in some add instructions
configure: update tms470 detection for latest version
lavf probe: prevent codec probe with no data at all seen
motion_est: fix use of inline on extern functions
Conflicts:
libavcodec/motion_est_template.c
libavformat/matroskadec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | libavcodec/arm/ac3dsp_armv6.S | 2 | ||||
-rw-r--r-- | libavcodec/arm/dsputil_arm.S | 4 | ||||
-rw-r--r-- | libavcodec/arm/vp8_armv6.S | 6 | ||||
-rw-r--r-- | libavcodec/libx264.c | 2 | ||||
-rw-r--r-- | libavcodec/motion_est.c | 6 | ||||
-rw-r--r-- | libavcodec/motion_est_template.c | 18 | ||||
-rw-r--r-- | libavformat/matroskadec.c | 2 | ||||
-rw-r--r-- | libavformat/utils.c | 6 | ||||
-rw-r--r-- | libavutil/arm/asm.S | 3 |
10 files changed, 33 insertions, 18 deletions
@@ -2546,7 +2546,7 @@ probe_cc(){ _depflags='-MMD' _cflags_speed='-O3' _cflags_size='-Os' - elif $_cc -version 2>/dev/null | grep -q TMS470; then + elif $_cc -version 2>/dev/null | grep -Eq 'TMS470|TI ARM'; then _type=tms470 _ident=$($_cc -version | head -n1 | tr -s ' ') _flags='--gcc --abi=eabi -me' diff --git a/libavcodec/arm/ac3dsp_armv6.S b/libavcodec/arm/ac3dsp_armv6.S index f6f297a532..2028d0b89f 100644 --- a/libavcodec/arm/ac3dsp_armv6.S +++ b/libavcodec/arm/ac3dsp_armv6.S @@ -32,7 +32,7 @@ function ff_ac3_bit_alloc_calc_bap_armv6, export=1 ldrb r4, [r4, r2] add r1, r1, r2, lsl #1 @ psd + start add r0, r0, r4, lsl #1 @ mask + band - add r4, lr, r4 + add r4, r4, lr add r7, r7, r2 @ bap + start 1: ldrsh r9, [r0], #2 @ mask[band] diff --git a/libavcodec/arm/dsputil_arm.S b/libavcodec/arm/dsputil_arm.S index 3f0d07155f..92a37571c9 100644 --- a/libavcodec/arm/dsputil_arm.S +++ b/libavcodec/arm/dsputil_arm.S @@ -632,7 +632,7 @@ function ff_add_pixels_clamped_arm, export=1 ldrsh r7, [r0, #2] and r6, r4, #0xFF and r8, r4, #0xFF00 - add r6, r5, r6 + add r6, r6, r5 add r8, r7, r8, lsr #8 mvn r5, r5 mvn r7, r7 @@ -674,7 +674,7 @@ function ff_add_pixels_clamped_arm, export=1 ldrsh r7, [r0, #10] and r6, r4, #0xFF and r8, r4, #0xFF00 - add r6, r5, r6 + add r6, r6, r5 add r8, r7, r8, lsr #8 mvn r5, r5 mvn r7, r7 diff --git a/libavcodec/arm/vp8_armv6.S b/libavcodec/arm/vp8_armv6.S index 532e40996d..e7d25a45c1 100644 --- a/libavcodec/arm/vp8_armv6.S +++ b/libavcodec/arm/vp8_armv6.S @@ -88,7 +88,7 @@ function ff_decode_block_coeffs_armv6, export=1 add r4, r3, r3, lsl #5 sxth r12, r11 - add r4, r2, r4 + add r4, r4, r2 adds r6, r6, r9 add r4, r4, #11 lsl r8, r8, r9 @@ -138,7 +138,7 @@ A orrcs r8, r8, r10, lsl r6 2: add r4, r3, r3, lsl #5 cmp r3, #16 - add r4, r2, r4 + add r4, r4, r2 pkhtb r11, r11, r11, asr #16 bne 0b b 6b @@ -226,7 +226,7 @@ A orrcs r8, r8, r10, lsl r6 ldr r1, [sp, #4] 4: add r4, r3, r3, lsl #5 - add r4, r2, r4 + add r4, r4, r2 add r4, r4, #22 rac_get_128 r5, r6, r7, r8, r9, r10 it ge diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index d23ced1c0d..2c4ffa205a 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -72,7 +72,7 @@ typedef struct X264Context { int direct_pred; int slice_max_size; char *stats; - int nal_hrd + int nal_hrd; } X264Context; static void X264_log(void *p, int level, const char *fmt, va_list args) diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 5e3db18ace..a85605770d 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -1151,7 +1151,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s, dmin= c->sub_motion_search(s, &mx, &my, dmin, 0, 0, 0, 16); if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip) - dmin= ff_get_mb_score(s, mx, my, 0, 0, 0, 16, 1); + dmin= get_mb_score(s, mx, my, 0, 0, 0, 16, 1); if((s->flags&CODEC_FLAG_4MV) && !c->skip && varc>50<<8 && vard>10<<8){ @@ -1323,7 +1323,7 @@ static int ff_estimate_motion_b(MpegEncContext * s, dmin= c->sub_motion_search(s, &mx, &my, dmin, 0, ref_index, 0, 16); if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip) - dmin= ff_get_mb_score(s, mx, my, 0, ref_index, 0, 16, 1); + dmin= get_mb_score(s, mx, my, 0, ref_index, 0, 16, 1); //printf("%d %d %d %d//", s->mb_x, s->mb_y, mx, my); // s->mb_type[mb_y*s->mb_width + mb_x]= mb_type; @@ -1635,7 +1635,7 @@ static inline int direct_search(MpegEncContext * s, int mb_x, int mb_y) dmin = hpel_motion_search(s, &mx, &my, dmin, 0, 0, 0, 16); if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip) - dmin= ff_get_mb_score(s, mx, my, 0, 0, 0, 16, 1); + dmin= get_mb_score(s, mx, my, 0, 0, 0, 16, 1); get_limits(s, 16*mb_x, 16*mb_y); //restore c->?min/max, maybe not needed diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index 029fa96a46..0d732590d0 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -159,8 +159,9 @@ static int no_sub_motion_search(MpegEncContext * s, return dmin; } -av_extern_inline int ff_get_mb_score(MpegEncContext * s, int mx, int my, int src_index, - int ref_index, int size, int h, int add_rate) +static inline int get_mb_score(MpegEncContext *s, int mx, int my, + int src_index, int ref_index, int size, + int h, int add_rate) { // const int check_luma= s->dsp.me_sub_cmp != s->dsp.mb_cmp; MotionEstContext * const c= &s->me; @@ -186,6 +187,12 @@ av_extern_inline int ff_get_mb_score(MpegEncContext * s, int mx, int my, int src return d; } +int ff_get_mb_score(MpegEncContext *s, int mx, int my, int src_index, + int ref_index, int size, int h, int add_rate) +{ + return get_mb_score(s, mx, my, src_index, ref_index, size, h, add_rate); +} + #define CHECK_QUARTER_MV(dx, dy, x, y)\ {\ const int hx= 4*(x)+(dx);\ @@ -968,9 +975,10 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int } //this function is dedicated to the braindamaged gcc -av_extern_inline int ff_epzs_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr, - int P[10][2], int src_index, int ref_index, int16_t (*last_mv)[2], - int ref_mv_scale, int size, int h) +int ff_epzs_motion_search(MpegEncContext *s, int *mx_ptr, int *my_ptr, + int P[10][2], int src_index, int ref_index, + int16_t (*last_mv)[2], int ref_mv_scale, + int size, int h) { MotionEstContext * const c= &s->me; //FIXME convert other functions in the same way if faster diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index ef2f1748af..a270f0dfc7 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1939,7 +1939,7 @@ static int matroska_parse_laces(MatroskaDemuxContext *matroska, uint8_t **buf, } case 0x2: /* fixed-size lacing */ - if (size != (size / *laces) * *laces) { + if (size % (*laces)) { res = AVERROR_INVALIDDATA; break; } diff --git a/libavformat/utils.c b/libavformat/utils.c index f6a20caa1b..9c607d7307 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -691,6 +691,10 @@ static void probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt) } else { no_packet: st->probe_packets = 0; + if (!pd->buf_size) { + av_log(s, AV_LOG_WARNING, "nothing to probe for stream %d\n", + st->index); + } } end= s->raw_packet_buffer_remaining_size <= 0 @@ -746,6 +750,8 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt) } } + pkt->data = NULL; + pkt->size = 0; av_init_packet(pkt); ret= s->iformat->read_packet(s, pkt); if (ret < 0) { diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S index 340ee18e8a..b9d4b737ad 100644 --- a/libavutil/arm/asm.S +++ b/libavutil/arm/asm.S @@ -66,6 +66,7 @@ ELF .eabi_attribute 25, \val .set .Lpic_gp, 0 .macro endfunc .if .Lpic_idx + .align 2 .altmacro put_pic %(.Lpic_idx - 1) .noaltmacro @@ -142,7 +143,7 @@ ELF .size \name, . - \name .if \indir ldr \rd, [pc, \rd] .else - add \rd, pc, \rd + add \rd, pc .endif def_pic \val - (.Lpic\@ + (8 >> CONFIG_THUMB)), .Lpicoff\@ .endm |