Commit 62101030 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  swscale: fix byte overreads in SSE-optimized hscale().
  matroskadec: fix typo.
  matroskadec: bail on parsing of incorrect seek index segments
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents e78d1a59 ea540401
......@@ -1191,7 +1191,7 @@ static int matroska_parse_seekhead_entry(MatroskaDemuxContext *matroska, int idx
matroska->num_levels++;
matroska->current_id = 0;
ebml_parse(matroska, matroska_segment, matroska);
ret = ebml_parse(matroska, matroska_segment, matroska);
/* remove dummy level */
while (matroska->num_levels) {
......@@ -1383,7 +1383,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
if (encodings_list->nb_elem > 1) {
av_log(matroska->ctx, AV_LOG_ERROR,
"Multiple combined encodings no supported");
"Multiple combined encodings not supported");
} else if (encodings_list->nb_elem == 1) {
if (encodings[0].type ||
(encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP &&
......
......@@ -186,8 +186,8 @@ static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSi
emms_c(); //FIXME this should not be required but it IS (even for non-MMX versions)
// NOTE: the +1 is for the MMX scaler which reads over the end
FF_ALLOC_OR_GOTO(NULL, *filterPos, (dstW+1)*sizeof(int16_t), fail);
// NOTE: the +3 is for the MMX(+1)/SSE(+3) scaler which reads over the end
FF_ALLOC_OR_GOTO(NULL, *filterPos, (dstW+3)*sizeof(int16_t), fail);
if (FFABS(xInc - 0x10000) <10) { // unscaled
int i;
......@@ -473,7 +473,7 @@ static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSi
// Note the +1 is for the MMX scaler which reads over the end
/* align at 16 for AltiVec (needed by hScale_altivec_real) */
FF_ALLOCZ_OR_GOTO(NULL, *outFilter, *outFilterSize*(dstW+1)*sizeof(int16_t), fail);
FF_ALLOCZ_OR_GOTO(NULL, *outFilter, *outFilterSize*(dstW+3)*sizeof(int16_t), fail);
/* normalize & store in outFilter */
for (i=0; i<dstW; i++) {
......@@ -493,10 +493,14 @@ static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSi
}
}
(*filterPos)[dstW]= (*filterPos)[dstW-1]; // the MMX scaler will read over the end
(*filterPos)[dstW+0] =
(*filterPos)[dstW+1] =
(*filterPos)[dstW+2] = (*filterPos)[dstW-1]; // the MMX/SSE scaler will read over the end
for (i=0; i<*outFilterSize; i++) {
int j= dstW*(*outFilterSize);
(*outFilter)[j + i]= (*outFilter)[j + i - (*outFilterSize)];
int k= (dstW - 1) * (*outFilterSize) + i;
(*outFilter)[k + 1 * (*outFilterSize)] =
(*outFilter)[k + 2 * (*outFilterSize)] =
(*outFilter)[k + 3 * (*outFilterSize)] = (*outFilter)[k];
}
ret=0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment