mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
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>
This commit is contained in:
commit
406cdddbdd
2
configure
vendored
2
configure
vendored
@ -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'
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user