mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-17 03:21:07 +01:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c14b09caf | ||
|
|
a2908d49d1 | ||
|
|
fc9514bf4d | ||
|
|
e863d17e62 | ||
|
|
3757ef017c | ||
|
|
ef1d4873a0 | ||
|
|
800d974cc4 | ||
|
|
82d3dd44aa | ||
|
|
684f86391d | ||
|
|
2b69da7b5a | ||
|
|
0df90898f5 | ||
|
|
67a4811c88 | ||
|
|
733cb1c6c5 | ||
|
|
57f271ce41 | ||
|
|
83ac312c3c | ||
|
|
8f026e2b38 | ||
|
|
3852b172e7 | ||
|
|
e63f330a1c | ||
|
|
6496cbee69 | ||
|
|
5b4e58ed4c | ||
|
|
c701506525 | ||
|
|
33877cd276 | ||
|
|
691dbc628a | ||
|
|
58e055cb26 | ||
|
|
fdb8a35b02 | ||
|
|
3ce32f6401 | ||
|
|
0bcb669ecc | ||
|
|
0b51e0baea |
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 2.2.14
|
||||
PROJECT_NUMBER = 2.2.15
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
|
||||
@@ -225,10 +225,14 @@ Possible flags for this option are:
|
||||
@item sse4.1
|
||||
@item sse4.2
|
||||
@item avx
|
||||
@item avx2
|
||||
@item xop
|
||||
@item fma3
|
||||
@item fma4
|
||||
@item 3dnow
|
||||
@item 3dnowext
|
||||
@item bmi1
|
||||
@item bmi2
|
||||
@item cmov
|
||||
@end table
|
||||
@item ARM
|
||||
@@ -240,6 +244,11 @@ Possible flags for this option are:
|
||||
@item vfpv3
|
||||
@item neon
|
||||
@end table
|
||||
@item AArch64
|
||||
@table @samp
|
||||
@item vfp
|
||||
@item neon
|
||||
@end table
|
||||
@item PowerPC
|
||||
@table @samp
|
||||
@item altivec
|
||||
|
||||
10
ffmpeg.c
10
ffmpeg.c
@@ -2382,11 +2382,13 @@ static int transcode_init(void)
|
||||
codec->rc_max_rate = icodec->rc_max_rate;
|
||||
codec->rc_buffer_size = icodec->rc_buffer_size;
|
||||
codec->field_order = icodec->field_order;
|
||||
codec->extradata = av_mallocz(extra_size);
|
||||
if (!codec->extradata) {
|
||||
return AVERROR(ENOMEM);
|
||||
if (icodec->extradata_size) {
|
||||
codec->extradata = av_mallocz(extra_size);
|
||||
if (!codec->extradata) {
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
memcpy(codec->extradata, icodec->extradata, icodec->extradata_size);
|
||||
}
|
||||
memcpy(codec->extradata, icodec->extradata, icodec->extradata_size);
|
||||
codec->extradata_size= icodec->extradata_size;
|
||||
codec->bits_per_coded_sample = icodec->bits_per_coded_sample;
|
||||
|
||||
|
||||
@@ -425,7 +425,7 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
|
||||
* Save current output configuration if and only if it has been locked.
|
||||
*/
|
||||
static void push_output_configuration(AACContext *ac) {
|
||||
if (ac->oc[1].status == OC_LOCKED) {
|
||||
if (ac->oc[1].status == OC_LOCKED || ac->oc[0].status == OC_NONE) {
|
||||
ac->oc[0] = ac->oc[1];
|
||||
}
|
||||
ac->oc[1].status = OC_NONE;
|
||||
@@ -881,7 +881,7 @@ static int decode_eld_specific_config(AACContext *ac, AVCodecContext *avctx,
|
||||
if (len == 15 + 255)
|
||||
len += get_bits(gb, 16);
|
||||
if (get_bits_left(gb) < len * 8 + 4) {
|
||||
av_log(ac->avctx, AV_LOG_ERROR, overread_err);
|
||||
av_log(avctx, AV_LOG_ERROR, overread_err);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
skip_bits_long(gb, 8 * len);
|
||||
|
||||
@@ -727,7 +727,10 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
|
||||
if (active_lines > 0.0f)
|
||||
band->thr = calc_reduced_thr_3gpp(band, coeffs[g].min_snr, reduction);
|
||||
pe += calc_pe_3gpp(band);
|
||||
band->norm_fac = band->active_lines / band->thr;
|
||||
if (band->thr > 0.0f)
|
||||
band->norm_fac = band->active_lines / band->thr;
|
||||
else
|
||||
band->norm_fac = 0.0f;
|
||||
norm_fac += band->norm_fac;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
|
||||
return ret;
|
||||
|
||||
/* report that the buffer was completely consumed */
|
||||
return buf_size;
|
||||
return avpkt->size;
|
||||
}
|
||||
|
||||
static av_cold int aasc_decode_end(AVCodecContext *avctx)
|
||||
|
||||
@@ -131,6 +131,9 @@ int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,
|
||||
int band_start, band_end, begin, end1;
|
||||
int lowcomp, fastleak, slowleak;
|
||||
|
||||
if (end <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
/* excitation function */
|
||||
band_start = ff_ac3_bin_to_band_tab[start];
|
||||
band_end = ff_ac3_bin_to_band_tab[end-1] + 1;
|
||||
|
||||
@@ -599,8 +599,8 @@ void ff_atrac3p_ipqf(FFTContext *dct_ctx, Atrac3pIPQFChannelCtx *hist,
|
||||
const float *in, float *out)
|
||||
{
|
||||
int i, s, sb, t, pos_now, pos_next;
|
||||
DECLARE_ALIGNED(32, float, idct_in)[ATRAC3P_SUBBANDS];
|
||||
DECLARE_ALIGNED(32, float, idct_out)[ATRAC3P_SUBBANDS];
|
||||
LOCAL_ALIGNED(32, float, idct_in, [ATRAC3P_SUBBANDS]);
|
||||
LOCAL_ALIGNED(32, float, idct_out, [ATRAC3P_SUBBANDS]);
|
||||
|
||||
memset(out, 0, ATRAC3P_FRAME_SAMPLES * sizeof(*out));
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame, int x, int
|
||||
dest_u = frame->data[1] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444));
|
||||
dest_v = frame->data[2] + ((y * dct_linesize_chroma) << 4) + (x << (3 + shift1 + ctx->is_444));
|
||||
|
||||
if (ctx->cur_field) {
|
||||
if (frame->interlaced_frame && ctx->cur_field) {
|
||||
dest_y += frame->linesize[0];
|
||||
dest_u += frame->linesize[1];
|
||||
dest_v += frame->linesize[2];
|
||||
|
||||
@@ -3512,6 +3512,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
int field_pic_flag, bottom_field_flag;
|
||||
int first_slice = h == h0 && !h0->current_slice;
|
||||
int frame_num, picture_structure, droppable;
|
||||
int mb_aff_frame, last_mb_aff_frame;
|
||||
PPS *pps;
|
||||
|
||||
h->me.qpel_put = h->h264qpel.put_h264_qpel_pixels_tab;
|
||||
@@ -3727,7 +3728,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
}
|
||||
|
||||
h->mb_mbaff = 0;
|
||||
h->mb_aff_frame = 0;
|
||||
mb_aff_frame = 0;
|
||||
last_mb_aff_frame = h0->mb_aff_frame;
|
||||
last_pic_structure = h0->picture_structure;
|
||||
last_pic_droppable = h0->droppable;
|
||||
droppable = h->nal_ref_idc == 0;
|
||||
@@ -3745,12 +3747,13 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
picture_structure = PICT_TOP_FIELD + bottom_field_flag;
|
||||
} else {
|
||||
picture_structure = PICT_FRAME;
|
||||
h->mb_aff_frame = h->sps.mb_aff;
|
||||
mb_aff_frame = h->sps.mb_aff;
|
||||
}
|
||||
}
|
||||
if (h0->current_slice) {
|
||||
if (last_pic_structure != picture_structure ||
|
||||
last_pic_droppable != droppable) {
|
||||
last_pic_droppable != droppable ||
|
||||
last_mb_aff_frame != mb_aff_frame) {
|
||||
av_log(h->avctx, AV_LOG_ERROR,
|
||||
"Changing field mode (%d -> %d) between slices is not allowed\n",
|
||||
last_pic_structure, h->picture_structure);
|
||||
@@ -3766,6 +3769,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
h->picture_structure = picture_structure;
|
||||
h->droppable = droppable;
|
||||
h->frame_num = frame_num;
|
||||
h->mb_aff_frame = mb_aff_frame;
|
||||
h->mb_field_decoding_flag = picture_structure != PICT_FRAME;
|
||||
|
||||
if (h0->current_slice == 0) {
|
||||
@@ -4635,8 +4639,17 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
|
||||
|
||||
for (;;) {
|
||||
// START_TIMER
|
||||
int ret = ff_h264_decode_mb_cabac(h);
|
||||
int eos;
|
||||
int ret, eos;
|
||||
|
||||
if (h->mb_x + h->mb_y * h->mb_width >= h->mb_index_end) {
|
||||
av_log(h->avctx, AV_LOG_ERROR, "Slice overlaps next at %d\n",
|
||||
h->mb_index_end);
|
||||
er_add_slice(h, h->resync_mb_x, h->resync_mb_y, h->mb_x,
|
||||
h->mb_y, ER_MB_ERROR);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
ret = ff_h264_decode_mb_cabac(h);
|
||||
// STOP_TIMER("decode_mb_cabac")
|
||||
|
||||
if (ret >= 0)
|
||||
@@ -4698,7 +4711,17 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
|
||||
}
|
||||
} else {
|
||||
for (;;) {
|
||||
int ret = ff_h264_decode_mb_cavlc(h);
|
||||
int ret;
|
||||
|
||||
if (h->mb_x + h->mb_y * h->mb_width >= h->mb_index_end) {
|
||||
av_log(h->avctx, AV_LOG_ERROR, "Slice overlaps next at %d\n",
|
||||
h->mb_index_end);
|
||||
er_add_slice(h, h->resync_mb_x, h->resync_mb_y, h->mb_x,
|
||||
h->mb_y, ER_MB_ERROR);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
ret = ff_h264_decode_mb_cavlc(h);
|
||||
|
||||
if (ret >= 0)
|
||||
ff_h264_hl_decode_mb(h);
|
||||
@@ -4789,19 +4812,33 @@ static int execute_decode_slices(H264Context *h, unsigned context_count)
|
||||
|
||||
av_assert0(h->mb_y < h->mb_height);
|
||||
|
||||
h->mb_index_end = INT_MAX;
|
||||
|
||||
if (h->avctx->hwaccel ||
|
||||
h->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
|
||||
return 0;
|
||||
if (context_count == 1) {
|
||||
return decode_slice(avctx, &h);
|
||||
} else {
|
||||
int j, mb_index;
|
||||
av_assert0(context_count > 0);
|
||||
for (i = 1; i < context_count; i++) {
|
||||
for (i = 0; i < context_count; i++) {
|
||||
int mb_index_end = h->mb_width * h->mb_height;
|
||||
hx = h->thread_context[i];
|
||||
if (CONFIG_ERROR_RESILIENCE) {
|
||||
mb_index = hx->resync_mb_x + hx->resync_mb_y * h->mb_width;
|
||||
if (CONFIG_ERROR_RESILIENCE && i) {
|
||||
hx->er.error_count = 0;
|
||||
}
|
||||
hx->x264_build = h->x264_build;
|
||||
for (j = 0; j < context_count; j++) {
|
||||
H264Context *sl2 = h->thread_context[j];
|
||||
int mb_index2 = sl2->resync_mb_x + sl2->resync_mb_y * h->mb_width;
|
||||
|
||||
if (i==j || mb_index > mb_index2)
|
||||
continue;
|
||||
mb_index_end = FFMIN(mb_index_end, mb_index2);
|
||||
}
|
||||
hx->mb_index_end = mb_index_end;
|
||||
}
|
||||
|
||||
avctx->execute(avctx, decode_slice, h->thread_context,
|
||||
@@ -4974,9 +5011,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
|
||||
continue;
|
||||
|
||||
again:
|
||||
if ( (!(avctx->active_thread_type & FF_THREAD_FRAME) || nals_needed >= nal_index)
|
||||
&& !h->current_slice)
|
||||
h->au_pps_id = -1;
|
||||
/* Ignore per frame NAL unit type during extradata
|
||||
* parsing. Decoding slices is not possible in codec init
|
||||
* with frame-mt */
|
||||
@@ -5006,8 +5040,14 @@ again:
|
||||
ret = -1;
|
||||
goto end;
|
||||
}
|
||||
if(!idr_cleared)
|
||||
if(!idr_cleared) {
|
||||
if (h->current_slice && (avctx->active_thread_type & FF_THREAD_SLICE)) {
|
||||
av_log(h, AV_LOG_ERROR, "invalid mixed IDR / non IDR frames cannot be decoded in slice multithreading mode\n");
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto end;
|
||||
}
|
||||
idr(h); // FIXME ensure we don't lose some frames if there is reordering
|
||||
}
|
||||
idr_cleared = 1;
|
||||
h->has_recovery_point = 1;
|
||||
case NAL_SLICE:
|
||||
@@ -5016,6 +5056,10 @@ again:
|
||||
hx->inter_gb_ptr = &hx->gb;
|
||||
hx->data_partitioning = 0;
|
||||
|
||||
if ( nals_needed >= nal_index
|
||||
|| (!(avctx->active_thread_type & FF_THREAD_FRAME) && !context_count))
|
||||
h->au_pps_id = -1;
|
||||
|
||||
if ((err = decode_slice_header(hx, h)))
|
||||
break;
|
||||
|
||||
@@ -5180,8 +5224,14 @@ again:
|
||||
|
||||
if (err < 0) {
|
||||
av_log(h->avctx, AV_LOG_ERROR, "decode_slice_header error\n");
|
||||
h->ref_count[0] = h->ref_count[1] = h->list_count = 0;
|
||||
hx->ref_count[0] = hx->ref_count[1] = hx->list_count = 0;
|
||||
} else if (err == 1) {
|
||||
if (context_count > 1) {
|
||||
ret = execute_decode_slices(h, context_count - 1);
|
||||
if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE))
|
||||
goto end;
|
||||
context_count = 0;
|
||||
}
|
||||
/* Slice could not be decoded in parallel mode, copy down
|
||||
* NAL unit stuff to context 0 and restart. Note that
|
||||
* rbsp_buffer is not transferred, but since we no longer
|
||||
|
||||
@@ -488,6 +488,7 @@ typedef struct H264Context {
|
||||
int mb_x, mb_y;
|
||||
int resync_mb_x;
|
||||
int resync_mb_y;
|
||||
int mb_index_end;
|
||||
int mb_skip_run;
|
||||
int mb_height, mb_width;
|
||||
int mb_stride;
|
||||
|
||||
@@ -703,7 +703,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count)
|
||||
*/
|
||||
if (h->short_ref_count && h->short_ref[0] == h->cur_pic_ptr) {
|
||||
/* Just mark the second field valid */
|
||||
h->cur_pic_ptr->reference = PICT_FRAME;
|
||||
h->cur_pic_ptr->reference |= h->picture_structure;
|
||||
} else if (h->cur_pic_ptr->long_ref) {
|
||||
av_log(h->avctx, AV_LOG_ERROR, "illegal short term reference "
|
||||
"assignment for second field "
|
||||
|
||||
@@ -283,10 +283,10 @@ typedef struct RefPicListTab {
|
||||
} RefPicListTab;
|
||||
|
||||
typedef struct HEVCWindow {
|
||||
int left_offset;
|
||||
int right_offset;
|
||||
int top_offset;
|
||||
int bottom_offset;
|
||||
unsigned int left_offset;
|
||||
unsigned int right_offset;
|
||||
unsigned int top_offset;
|
||||
unsigned int bottom_offset;
|
||||
} HEVCWindow;
|
||||
|
||||
typedef struct VUI {
|
||||
|
||||
@@ -898,7 +898,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
|
||||
(sps->output_window.left_offset + sps->output_window.right_offset);
|
||||
sps->output_height = sps->height -
|
||||
(sps->output_window.top_offset + sps->output_window.bottom_offset);
|
||||
if (sps->output_width <= 0 || sps->output_height <= 0) {
|
||||
if (sps->width <= sps->output_window.left_offset + (int64_t)sps->output_window.right_offset ||
|
||||
sps->height <= sps->output_window.top_offset + (int64_t)sps->output_window.bottom_offset) {
|
||||
av_log(s->avctx, AV_LOG_WARNING, "Invalid visible frame dimensions: %dx%d.\n",
|
||||
sps->output_width, sps->output_height);
|
||||
if (s->avctx->err_recognition & AV_EF_EXPLODE) {
|
||||
@@ -907,10 +908,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
|
||||
}
|
||||
av_log(s->avctx, AV_LOG_WARNING,
|
||||
"Displaying the whole video surface.\n");
|
||||
sps->pic_conf_win.left_offset =
|
||||
sps->pic_conf_win.right_offset =
|
||||
sps->pic_conf_win.top_offset =
|
||||
sps->pic_conf_win.bottom_offset = 0;
|
||||
memset(&sps->pic_conf_win, 0, sizeof(sps->pic_conf_win));
|
||||
memset(&sps->output_window, 0, sizeof(sps->output_window));
|
||||
sps->output_width = sps->width;
|
||||
sps->output_height = sps->height;
|
||||
}
|
||||
|
||||
@@ -36,17 +36,15 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
|
||||
unsigned char rle_code;
|
||||
unsigned char extra_byte, odd_pixel;
|
||||
unsigned char stream_byte;
|
||||
unsigned int pixel_ptr = 0;
|
||||
int row_dec = pic->linesize[0];
|
||||
int row_ptr = (avctx->height - 1) * row_dec;
|
||||
int frame_size = row_dec * avctx->height;
|
||||
int pixel_ptr = 0;
|
||||
int line = avctx->height - 1;
|
||||
int i;
|
||||
|
||||
while (row_ptr >= 0) {
|
||||
while (line >= 0 && pixel_ptr <= avctx->width) {
|
||||
if (bytestream2_get_bytes_left(gb) <= 0) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"MS RLE: bytestream overrun, %d rows left\n",
|
||||
row_ptr);
|
||||
"MS RLE: bytestream overrun, %dx%d left\n",
|
||||
avctx->width - pixel_ptr, line);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
rle_code = stream_byte = bytestream2_get_byteu(gb);
|
||||
@@ -55,7 +53,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
|
||||
stream_byte = bytestream2_get_byte(gb);
|
||||
if (stream_byte == 0) {
|
||||
/* line is done, goto the next one */
|
||||
row_ptr -= row_dec;
|
||||
line--;
|
||||
pixel_ptr = 0;
|
||||
} else if (stream_byte == 1) {
|
||||
/* decode is done */
|
||||
@@ -65,13 +63,12 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
|
||||
stream_byte = bytestream2_get_byte(gb);
|
||||
pixel_ptr += stream_byte;
|
||||
stream_byte = bytestream2_get_byte(gb);
|
||||
row_ptr -= stream_byte * row_dec;
|
||||
} else {
|
||||
// copy pixels from encoded stream
|
||||
odd_pixel = stream_byte & 1;
|
||||
rle_code = (stream_byte + 1) / 2;
|
||||
extra_byte = rle_code & 0x01;
|
||||
if (row_ptr + pixel_ptr + stream_byte > frame_size ||
|
||||
if (pixel_ptr + 2*rle_code - odd_pixel > avctx->width ||
|
||||
bytestream2_get_bytes_left(gb) < rle_code) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"MS RLE: frame/stream ptr just went out of bounds (copy)\n");
|
||||
@@ -82,13 +79,13 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
|
||||
if (pixel_ptr >= avctx->width)
|
||||
break;
|
||||
stream_byte = bytestream2_get_byteu(gb);
|
||||
pic->data[0][row_ptr + pixel_ptr] = stream_byte >> 4;
|
||||
pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte >> 4;
|
||||
pixel_ptr++;
|
||||
if (i + 1 == rle_code && odd_pixel)
|
||||
break;
|
||||
if (pixel_ptr >= avctx->width)
|
||||
break;
|
||||
pic->data[0][row_ptr + pixel_ptr] = stream_byte & 0x0F;
|
||||
pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte & 0x0F;
|
||||
pixel_ptr++;
|
||||
}
|
||||
|
||||
@@ -98,7 +95,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
|
||||
}
|
||||
} else {
|
||||
// decode a run of data
|
||||
if (row_ptr + pixel_ptr + stream_byte > frame_size) {
|
||||
if (pixel_ptr + rle_code > avctx->width + 1) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"MS RLE: frame ptr just went out of bounds (run)\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
@@ -108,9 +105,9 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
|
||||
if (pixel_ptr >= avctx->width)
|
||||
break;
|
||||
if ((i & 1) == 0)
|
||||
pic->data[0][row_ptr + pixel_ptr] = stream_byte >> 4;
|
||||
pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte >> 4;
|
||||
else
|
||||
pic->data[0][row_ptr + pixel_ptr] = stream_byte & 0x0F;
|
||||
pic->data[0][line * pic->linesize[0] + pixel_ptr] = stream_byte & 0x0F;
|
||||
pixel_ptr++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2345,6 +2345,9 @@ static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref,
|
||||
av_strlcat(filename, "../", sizeof(filename));
|
||||
|
||||
av_strlcat(filename, ref->path + l + 1, sizeof(filename));
|
||||
if (!use_absolute_path)
|
||||
if(strstr(ref->path + l + 1, "..") || ref->nlvl_from > 1)
|
||||
return AVERROR(ENOENT);
|
||||
|
||||
if (strlen(filename) + 1 == sizeof(filename))
|
||||
return AVERROR(ENOENT);
|
||||
|
||||
@@ -49,6 +49,7 @@ static int flags, checked;
|
||||
void av_force_cpu_flags(int arg){
|
||||
if ( (arg & ( AV_CPU_FLAG_3DNOW |
|
||||
AV_CPU_FLAG_3DNOWEXT |
|
||||
AV_CPU_FLAG_MMXEXT |
|
||||
AV_CPU_FLAG_SSE |
|
||||
AV_CPU_FLAG_SSE2 |
|
||||
AV_CPU_FLAG_SSE2SLOW |
|
||||
|
||||
@@ -41,12 +41,20 @@ PCA *ff_pca_init(int n){
|
||||
return NULL;
|
||||
|
||||
pca= av_mallocz(sizeof(*pca));
|
||||
if (!pca)
|
||||
return NULL;
|
||||
|
||||
pca->n= n;
|
||||
pca->z = av_malloc(sizeof(*pca->z) * n);
|
||||
pca->count=0;
|
||||
pca->covariance= av_calloc(n*n, sizeof(double));
|
||||
pca->mean= av_calloc(n, sizeof(double));
|
||||
|
||||
if (!pca->z || !pca->covariance || !pca->mean) {
|
||||
ff_pca_free(pca);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return pca;
|
||||
}
|
||||
|
||||
|
||||
@@ -200,12 +200,14 @@ pixfmts(){
|
||||
$showfiltfmts $filter | awk -F '[ \r]' '/^INPUT/{ fmt=substr($3, 5); print fmt }' | sort >$in_fmts
|
||||
pix_fmts=$(comm -12 $scale_exclude_fmts $in_fmts)
|
||||
|
||||
outertest=$test
|
||||
for pix_fmt in $pix_fmts; do
|
||||
test=$pix_fmt
|
||||
video_filter "${prefilter_chain}format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt
|
||||
done
|
||||
|
||||
rm $in_fmts $scale_in_fmts $scale_out_fmts $scale_exclude_fmts
|
||||
test=$outertest
|
||||
}
|
||||
|
||||
mkdir -p "$outdir"
|
||||
|
||||
@@ -111,8 +111,8 @@ echo ${version} >version-$slot
|
||||
rm -rf "${build}" *.log
|
||||
mkdir -p ${build}
|
||||
|
||||
configure >configure.log 2>&1 || fail $? "error configuring"
|
||||
compile >compile.log 2>&1 || fail $? "error compiling"
|
||||
fate >test.log 2>&1 || fail $? "error testing"
|
||||
configure >configure.log 2>&1 || fail 3 "error configuring"
|
||||
compile >compile.log 2>&1 || fail 2 "error compiling"
|
||||
fate >test.log 2>&1 || fail 1 "error testing"
|
||||
report 0 success
|
||||
clean
|
||||
|
||||
Reference in New Issue
Block a user