[FFmpeg-cvslog] libavcodec/exr : fix piz uncompress on big endian
ffmpeg | branch: master | Martin Vignali | Sun Apr 23 15:38:14 2017 +0200| [37f4d22075c331f7f4fd67ea80049188b0ba8814] | committer: Michael Niedermayer libavcodec/exr : fix piz uncompress on big endian Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37f4d22075c331f7f4fd67ea80049188b0ba8814 --- libavcodec/exr.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index c32eea1b8f..b37f91fa3f 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -45,6 +45,11 @@ #include "avcodec.h" #include "bytestream.h" + +#if HAVE_BIGENDIAN +#include "bswapdsp.h" +#endif + #include "get_bits.h" #include "internal.h" #include "mathops.h" @@ -116,6 +121,10 @@ typedef struct EXRContext { AVFrame *picture; AVCodecContext *avctx; +#if HAVE_BIGENDIAN +BswapDSPContext bbdsp; +#endif + enum ExrCompr compression; enum ExrPixelType pixel_type; int channel_offsets[4]; // 0 = red, 1 = green, 2 = blue and 3 = alpha @@ -751,7 +760,8 @@ static int piz_uncompress(EXRContext *s, const uint8_t *src, int ssize, uint16_t maxval, min_non_zero, max_non_zero; uint16_t *ptr; uint16_t *tmp = (uint16_t *)td->tmp; -uint8_t *out; +uint16_t *out; +uint16_t *in; int ret, i, j; int pixel_half_size;/* 1 for half, 2 for float and uint32 */ EXRChannel *channel; @@ -803,12 +813,11 @@ static int piz_uncompress(EXRContext *s, const uint8_t *src, int ssize, apply_lut(td->lut, tmp, dsize / sizeof(uint16_t)); -out = td->uncompressed_data; +out = (uint16_t *)td->uncompressed_data; for (i = 0; i < td->ysize; i++) { tmp_offset = 0; for (j = 0; j < s->nb_channels; j++) { -uint16_t *in; -EXRChannel *channel = &s->channels[j]; +channel = &s->channels[j]; if (channel->pixel_type == EXR_HALF) pixel_half_size = 1; else @@ -816,8 +825,13 @@ static int piz_uncompress(EXRContext *s, const uint8_t *src, int ssize, in = tmp + tmp_offset * td->xsize * td->ysize + i * td->xsize * pixel_half_size; tmp_offset += pixel_half_size; + +#if HAVE_BIGENDIAN +s->bbdsp.bswap16_buf(out, in, td->xsize * pixel_half_size); +#else memcpy(out, in, td->xsize * 2 * pixel_half_size); -out += td->xsize * 2 * pixel_half_size; +#endif +out += td->xsize * pixel_half_size; } } @@ -1793,6 +1807,10 @@ static av_cold int decode_init(AVCodecContext *avctx) s->avctx = avctx; +#if HAVE_BIGENDIAN +ff_bswapdsp_init(&s->bbdsp); +#endif + trc_func = avpriv_get_trc_function_from_trc(s->apply_trc_type); if (trc_func) { for (i = 0; i < 65536; ++i) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate/exr : add test for negative float value
ffmpeg | branch: master | Martin Vignali | Sun Apr 23 17:49:05 2017 +0200| [89812e423de61ea77ea6deae8c8ed4c4a4413646] | committer: Michael Niedermayer fate/exr : add test for negative float value the tested sample contain negative value in the red channel need to be clip to zero, and not set to MAX_RED Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=89812e423de61ea77ea6deae8c8ed4c4a4413646 --- tests/fate/image.mak | 3 +++ tests/ref/fate/exr-rgb-scanline-none-negative-red | 6 ++ 2 files changed, 9 insertions(+) diff --git a/tests/fate/image.mak b/tests/fate/image.mak index 4a2cb81629..17bb0cc2e5 100644 --- a/tests/fate/image.mak +++ b/tests/fate/image.mak @@ -268,6 +268,9 @@ fate-exr-rgb-scanline-half-piz-dw-t01: CMD = framecrc -i $(TARGET_SAMPLES)/exr/r FATE_EXR += fate-exr-rgb-scanline-float-piz-48x32 fate-exr-rgb-scanline-float-piz-48x32: CMD = framecrc -i $(TARGET_SAMPLES)/exr/rgb_scanline_float_piz_48x32.exr -pix_fmt rgb48le +FATE_EXR += fate-exr-rgb-scanline-none-negative-red +fate-exr-rgb-scanline-none-negative-red: CMD = framecrc -i $(TARGET_SAMPLES)/exr/rgb_scanline_none_negative_red.exr -pix_fmt rgb48le + FATE_EXR-$(call DEMDEC, IMAGE2, EXR) += $(FATE_EXR) FATE_IMAGE += $(FATE_EXR-yes) diff --git a/tests/ref/fate/exr-rgb-scanline-none-negative-red b/tests/ref/fate/exr-rgb-scanline-none-negative-red new file mode 100644 index 00..8c399b2f5e --- /dev/null +++ b/tests/ref/fate/exr-rgb-scanline-none-negative-red @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 4x4 +#sar 0: 1/1 +0, 0, 0,1, 96, 0x27bc131b ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate/exr : add tests for piz uncompress
ffmpeg | branch: master | Martin Vignali | Sun Apr 23 15:15:31 2017 +0200| [5ad18f279af11813d51a02df5ab77000885d698e] | committer: Michael Niedermayer fate/exr : add tests for piz uncompress Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ad18f279af11813d51a02df5ab77000885d698e --- tests/fate/image.mak| 12 tests/ref/fate/exr-rgb-scanline-float-piz-48x32 | 6 ++ tests/ref/fate/exr-rgb-scanline-half-piz-bw | 6 ++ tests/ref/fate/exr-rgb-scanline-half-piz-color | 6 ++ tests/ref/fate/exr-rgb-scanline-half-piz-dw-t01 | 6 ++ 5 files changed, 36 insertions(+) diff --git a/tests/fate/image.mak b/tests/fate/image.mak index 2b569cf256..4a2cb81629 100644 --- a/tests/fate/image.mak +++ b/tests/fate/image.mak @@ -256,6 +256,18 @@ fate-exr-rgb-scanline-pxr24-uint32: CMD = framecrc -i $(TARGET_SAMPLES)/exr/rgb_ FATE_EXR += fate-exr-rgb-scanline-zip1-half-float-l1-zero-offsets fate-exr-rgb-scanline-zip1-half-float-l1-zero-offsets: CMD = framecrc -i $(TARGET_SAMPLES)/exr/rgb_scanline_zip1_half_float_zero_offsets.exr -pix_fmt rgb48le +FATE_EXR += fate-exr-rgb-scanline-half-piz-bw +fate-exr-rgb-scanline-half-piz-bw: CMD = framecrc -i $(TARGET_SAMPLES)/exr/rgb_scanline_half_piz_bw.exr -pix_fmt rgb48le + +FATE_EXR += fate-exr-rgb-scanline-half-piz-color +fate-exr-rgb-scanline-half-piz-color: CMD = framecrc -i $(TARGET_SAMPLES)/exr/rgb_scanline_half_piz_color.exr -pix_fmt rgb48le + +FATE_EXR += fate-exr-rgb-scanline-half-piz-dw-t01 +fate-exr-rgb-scanline-half-piz-dw-t01: CMD = framecrc -i $(TARGET_SAMPLES)/exr/rgb_scanline_half_piz_dw_t01.exr -pix_fmt rgb48le + +FATE_EXR += fate-exr-rgb-scanline-float-piz-48x32 +fate-exr-rgb-scanline-float-piz-48x32: CMD = framecrc -i $(TARGET_SAMPLES)/exr/rgb_scanline_float_piz_48x32.exr -pix_fmt rgb48le + FATE_EXR-$(call DEMDEC, IMAGE2, EXR) += $(FATE_EXR) FATE_IMAGE += $(FATE_EXR-yes) diff --git a/tests/ref/fate/exr-rgb-scanline-float-piz-48x32 b/tests/ref/fate/exr-rgb-scanline-float-piz-48x32 new file mode 100644 index 00..d1a5d90ee2 --- /dev/null +++ b/tests/ref/fate/exr-rgb-scanline-float-piz-48x32 @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 48x32 +#sar 0: 1/1 +0, 0, 0,1, 9216, 0x5b3f7a8e diff --git a/tests/ref/fate/exr-rgb-scanline-half-piz-bw b/tests/ref/fate/exr-rgb-scanline-half-piz-bw new file mode 100644 index 00..6e08d528eb --- /dev/null +++ b/tests/ref/fate/exr-rgb-scanline-half-piz-bw @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 34x27 +#sar 0: 1/1 +0, 0, 0,1, 5508, 0x36d15e2e diff --git a/tests/ref/fate/exr-rgb-scanline-half-piz-color b/tests/ref/fate/exr-rgb-scanline-half-piz-color new file mode 100644 index 00..21510792ff --- /dev/null +++ b/tests/ref/fate/exr-rgb-scanline-half-piz-color @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 34x40 +#sar 0: 1/1 +0, 0, 0,1, 8160, 0x9dd67b7d diff --git a/tests/ref/fate/exr-rgb-scanline-half-piz-dw-t01 b/tests/ref/fate/exr-rgb-scanline-half-piz-dw-t01 new file mode 100644 index 00..e135aed3ba --- /dev/null +++ b/tests/ref/fate/exr-rgb-scanline-half-piz-dw-t01 @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 400x300 +#sar 0: 1/1 +0, 0, 0,1, 72, 0xe50fc9f8 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavformat/http: Ignore expired cookies
ffmpeg | branch: master | Micah Galizia | Sun Apr 30 14:25:29 2017 -0400| [28b24670741e1de25bfc7b5ea7c1d6dbae1aef6f] | committer: Michael Niedermayer libavformat/http: Ignore expired cookies Signed-off-by: Micah Galizia Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=28b24670741e1de25bfc7b5ea7c1d6dbae1aef6f --- libavformat/http.c | 213 +++-- 1 file changed, 156 insertions(+), 57 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 293a8a7204..d06103ab6d 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -29,6 +29,7 @@ #include "libavutil/avstring.h" #include "libavutil/opt.h" #include "libavutil/time.h" +#include "libavutil/parseutils.h" #include "avformat.h" #include "http.h" @@ -48,6 +49,8 @@ #define MAX_REDIRECTS 8 #define HTTP_SINGLE 1 #define HTTP_MUTLI2 +#define MAX_EXPIRY19 +#define WHITESPACES " \n\t\r" typedef enum { LOWER_PROTO, READ_HEADERS, @@ -680,10 +683,112 @@ static int parse_icy(HTTPContext *s, const char *tag, const char *p) return 0; } +static int parse_set_cookie_expiry_time(const char *exp_str, struct tm *buf) +{ +char exp_buf[MAX_EXPIRY]; +int i, j, exp_buf_len = MAX_EXPIRY-1; +char *expiry; + +// strip off any punctuation or whitespace +for (i = 0, j = 0; exp_str[i] != '\0' && j < exp_buf_len; i++) { +if ((exp_str[i] >= '0' && exp_str[i] <= '9') || +(exp_str[i] >= 'A' && exp_str[i] <= 'Z') || +(exp_str[i] >= 'a' && exp_str[i] <= 'z')) { +exp_buf[j] = exp_str[i]; +j++; +} +} +exp_buf[j] = '\0'; +expiry = exp_buf; + +// move the string beyond the day of week +while ((*expiry < '0' || *expiry > '9') && *expiry != '\0') +expiry++; + +return av_small_strptime(expiry, "%d%b%Y%H%M%S", buf) ? 0 : AVERROR(EINVAL); +} + +static int parse_set_cookie(const char *set_cookie, AVDictionary **dict) +{ +char *param, *next_param, *cstr, *back; + +if (!(cstr = av_strdup(set_cookie))) +return AVERROR(EINVAL); + +// strip any trailing whitespace +back = &cstr[strlen(cstr)-1]; +while (strchr(WHITESPACES, *back)) { +*back='\0'; +back--; +} + +next_param = cstr; +while ((param = av_strtok(next_param, ";", &next_param))) { +char *name, *value; +param += strspn(param, WHITESPACES); +if ((name = av_strtok(param, "=", &value))) { +if (av_dict_set(dict, name, value, 0) < 0) { +av_free(cstr); +return -1; +} +} +} + +av_free(cstr); +return 0; +} + static int parse_cookie(HTTPContext *s, const char *p, AVDictionary **cookies) { +AVDictionary *new_params = NULL; +AVDictionaryEntry *e, *cookie_entry; char *eql, *name; +// ensure the cookie is parsable +if (parse_set_cookie(p, &new_params)) +return -1; + +// if there is no cookie value there is nothing to parse +cookie_entry = av_dict_get(new_params, "", NULL, AV_DICT_IGNORE_SUFFIX); +if (!cookie_entry || !cookie_entry->value) { +av_dict_free(&new_params); +return -1; +} + +// ensure the cookie is not expired or older than an existing value +if ((e = av_dict_get(new_params, "expires", NULL, 0)) && e->value) { +struct tm new_tm = {0}; +if (!parse_set_cookie_expiry_time(e->value, &new_tm)) { +AVDictionaryEntry *e2; + +// if the cookie has already expired ignore it +if (av_timegm(&new_tm) < av_gettime() / 100) { +av_dict_free(&new_params); +return -1; +} + +// only replace an older cookie with the same name +e2 = av_dict_get(*cookies, cookie_entry->key, NULL, 0); +if (e2 && e2->value) { +AVDictionary *old_params = NULL; +if (!parse_set_cookie(p, &old_params)) { +e2 = av_dict_get(old_params, "expires", NULL, 0); +if (e2 && e2->value) { +struct tm old_tm = {0}; +if (!parse_set_cookie_expiry_time(e->value, &old_tm)) { +if (av_timegm(&new_tm) < av_timegm(&old_tm)) { +av_dict_free(&new_params); +av_dict_free(&old_params); +return -1; +} +} +} +} +av_dict_free(&old_params); +} +} +} + // duplicate the cookie name (dict will dupe the value) if (!(eql = strchr(p, '='))) return AVERROR(EINVAL); if (!(name = av_strndup(p, eql - p))) return AVERROR(ENOMEM); @@ -868,7 +973,7 @@ static int get_cookies(HTTPContext *s, char **cookies, const char *path, //
[FFmpeg-cvslog] avcodec/bmp: Use ff_set_dimensions()
ffmpeg | branch: master | Michael Niedermayer | Mon May 1 17:53:11 2017 +0200| [63b8d4146d78595638417e431ea390aaf01f560f] | committer: Michael Niedermayer avcodec/bmp: Use ff_set_dimensions() Fixes out of memory Fixes: 1282/clusterfuzz-testcase-minimized-5400131681648640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=63b8d4146d78595638417e431ea390aaf01f560f --- libavcodec/bmp.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index 72957499d3..65d239e4f8 100644 --- a/libavcodec/bmp.c +++ b/libavcodec/bmp.c @@ -133,8 +133,11 @@ static int bmp_decode_frame(AVCodecContext *avctx, alpha = bytestream_get_le32(&buf); } -avctx->width = width; -avctx->height = height > 0 ? height : -(unsigned)height; +ret = ff_set_dimensions(avctx, width, height > 0 ? height : -(unsigned)height); +if (ret < 0) { +av_log(avctx, AV_LOG_ERROR, "Failed to set dimensions %d %d\n", width, height); +return AVERROR_INVALIDDATA; +} avctx->pix_fmt = AV_PIX_FMT_NONE; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/developer: Add terse documentation of assumed C implementation defined behavior
ffmpeg | branch: master | Michael Niedermayer | Fri Apr 28 02:50:42 2017 +0200| [b706ddbae3f4a11c58560b914807931556108b55] | committer: Michael Niedermayer doc/developer: Add terse documentation of assumed C implementation defined behavior Suggested-by: "Ronald S. Bultje" Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b706ddbae3f4a11c58560b914807931556108b55 --- doc/developer.texi | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/developer.texi b/doc/developer.texi index dbe1f5421f..98540c8f99 100644 --- a/doc/developer.texi +++ b/doc/developer.texi @@ -131,6 +131,11 @@ designated struct initializers (@samp{struct s x = @{ .i = 17 @};}); @item compound literals (@samp{x = (struct s) @{ 17, 23 @};}). + +@item +Implementation defined behavior for signed integers is assumed to match the +expected behavior for two's complement. Non representable values in integer +casts are binary truncated. Shift right of signed values uses sign extension. @end itemize These features are supported by all compilers we care about, so we will not ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/indeo2: Check remaining bits in ir2_decode_plane()
ffmpeg | branch: master | Michael Niedermayer | Mon May 1 18:53:52 2017 +0200| [b29feec9829cfab2523c8d95e35bd69e689ea4af] | committer: Michael Niedermayer avcodec/indeo2: Check remaining bits in ir2_decode_plane() Fixes: 1290/clusterfuzz-testcase-minimized-5815578902134784 Fixes: timeout Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b29feec9829cfab2523c8d95e35bd69e689ea4af --- libavcodec/indeo2.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c index c89845233e..f1324e4635 100644 --- a/libavcodec/indeo2.c +++ b/libavcodec/indeo2.c @@ -77,6 +77,8 @@ static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst for (j = 1; j < height; j++) { out = 0; +if (get_bits_left(&ctx->gb) <= 0) +return AVERROR_INVALIDDATA; while (out < width) { int c = ir2_get_code(&ctx->gb); if (c >= 0x80) { /* we have a skip */ @@ -116,6 +118,8 @@ static int ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_ for (j = 0; j < height; j++) { out = 0; +if (get_bits_left(&ctx->gb) <= 0) +return AVERROR_INVALIDDATA; while (out < width) { c = ir2_get_code(&ctx->gb); if (c >= 0x80) { /* we have a skip */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/vp3: Check remaining bits in unpack_dct_coeffs()
ffmpeg | branch: master | Michael Niedermayer | Mon May 1 18:46:27 2017 +0200| [2f00300b779e7b247c85db0d7daef448225105ff] | committer: Michael Niedermayer avcodec/vp3: Check remaining bits in unpack_dct_coeffs() Decreases the time spend decoding junk. May fix: 1283/clusterfuzz-testcase-minimized-6221126759874560 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f00300b779e7b247c85db0d7daef448225105ff --- libavcodec/vp3.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 86e5852e32..b10cb39f8a 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1071,6 +1071,9 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb) s->dct_tokens[0][0] = s->dct_tokens_base; +if (get_bits_left(gb) < 16) +return AVERROR_INVALIDDATA; + /* fetch the DC table indexes */ dc_y_table = get_bits(gb, 4); dc_c_table = get_bits(gb, 4); @@ -1080,6 +1083,8 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb) 0, residual_eob_run); if (residual_eob_run < 0) return residual_eob_run; +if (get_bits_left(gb) < 8) +return AVERROR_INVALIDDATA; /* reverse prediction of the Y-plane DC coefficients */ reverse_dc_prediction(s, 0, s->fragment_width[0], s->fragment_height[0]); @@ -1102,6 +1107,8 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb) s->fragment_width[1], s->fragment_height[1]); } +if (get_bits_left(gb) < 8) +return AVERROR_INVALIDDATA; /* fetch the AC table indexes */ ac_y_table = get_bits(gb, 4); ac_c_table = get_bits(gb, 4); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/mips/hevc_idct_msa: Add missing const qualifier.
ffmpeg | branch: master | Carl Eugen Hoyos | Mon May 1 10:31:35 2017 +0200| [a88b0b0ba7b4ddae9a51d1e9f7ff83654f60807a] | committer: Carl Eugen Hoyos lavc/mips/hevc_idct_msa: Add missing const qualifier. Fixes many warnings: initialization discards 'const' qualifier from pointer target type > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a88b0b0ba7b4ddae9a51d1e9f7ff83654f60807a --- libavcodec/mips/hevc_idct_msa.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/mips/hevc_idct_msa.c b/libavcodec/mips/hevc_idct_msa.c index 975d91f8be..d483707e72 100644 --- a/libavcodec/mips/hevc_idct_msa.c +++ b/libavcodec/mips/hevc_idct_msa.c @@ -330,7 +330,7 @@ static void hevc_idct_4x4_msa(int16_t *coeffs) static void hevc_idct_8x8_msa(int16_t *coeffs) { -int16_t *filter = >8x8_cnst[0]; +const int16_t *filter = >8x8_cnst[0]; v8i16 in0, in1, in2, in3, in4, in5, in6, in7; LD_SH8(coeffs, 8, in0, in1, in2, in3, in4, in5, in6, in7); @@ -349,7 +349,7 @@ static void hevc_idct_16x16_msa(int16_t *coeffs) int16_t buf[256]; int16_t *buf_ptr = &buf[0]; int16_t *src = coeffs; -int16_t *filter = >16x16_cnst[0]; +const int16_t *filter = >16x16_cnst[0]; v8i16 in0, in1, in2, in3, in4, in5, in6, in7; v8i16 in8, in9, in10, in11, in12, in13, in14, in15; v8i16 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7; @@ -429,10 +429,10 @@ static void hevc_idct_8x32_column_msa(int16_t *coeffs, uint8_t buf_pitch, uint8_t round) { uint8_t i; -int16_t *filter_ptr0 = >32x32_cnst0[0]; -int16_t *filter_ptr1 = >32x32_cnst1[0]; -int16_t *filter_ptr2 = >32x32_cnst2[0]; -int16_t *filter_ptr3 = >32x32_cnst3[0]; +const int16_t *filter_ptr0 = >32x32_cnst0[0]; +const int16_t *filter_ptr1 = >32x32_cnst1[0]; +const int16_t *filter_ptr2 = >32x32_cnst2[0]; +const int16_t *filter_ptr3 = >32x32_cnst3[0]; int16_t *src0 = (coeffs + buf_pitch); int16_t *src1 = (coeffs + 2 * buf_pitch); int16_t *src2 = (coeffs + 4 * buf_pitch); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/mips/iirfilter_mips: Include config.h.
ffmpeg | branch: master | Carl Eugen Hoyos | Mon May 1 10:35:28 2017 +0200| [f4c133c708747b5c93a15360ac15d93e123326da] | committer: Carl Eugen Hoyos lavc/mips/iirfilter_mips: Include config.h. Fixes the following warning: libavcodec/mips/iirfilter_mips.c:57:5: warning: "HAVE_INLINE_ASM" is not defined > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f4c133c708747b5c93a15360ac15d93e123326da --- libavcodec/mips/iirfilter_mips.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/mips/iirfilter_mips.c b/libavcodec/mips/iirfilter_mips.c index 74f036fde6..3a1352a7e4 100644 --- a/libavcodec/mips/iirfilter_mips.c +++ b/libavcodec/mips/iirfilter_mips.c @@ -52,6 +52,7 @@ * Reference: libavcodec/iirfilter.c */ +#include "config.h" #include "libavcodec/iirfilter.h" #if HAVE_INLINE_ASM ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] tools/target_dec_fuzzer: Use avcodec_register_all() instead of register_all()
ffmpeg | branch: master | Michael Niedermayer | Tue May 2 00:28:39 2017 +0200| [56ddb923c63f1aa2ca2c9f503cdd214a0cd6445f] | committer: Michael Niedermayer tools/target_dec_fuzzer: Use avcodec_register_all() instead of register_all() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=56ddb923c63f1aa2ca2c9f503cdd214a0cd6445f --- tools/target_dec_fuzzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index ce58fe5eaf..65e79ebfe0 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -66,7 +66,7 @@ static AVCodec *c = NULL; static AVCodec *AVCodecInitialize(enum AVCodecID codec_id) { AVCodec *res; -av_register_all(); +avcodec_register_all(); av_log_set_level(AV_LOG_PANIC); res = avcodec_find_decoder(codec_id); if (!res) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/internal: update FF_CODEC_CAP_SETS_PKT_DTS doxy
ffmpeg | branch: master | James Almer | Mon May 1 20:37:41 2017 -0300| [0a6ca7aa0aa139b67f8e6bd1453c3aab291d4a26] | committer: James Almer avcodec/internal: update FF_CODEC_CAP_SETS_PKT_DTS doxy The code it refers to was moved to decode.c in 00fb745a10a151791ce2e49ba3e463bd17ea9251 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0a6ca7aa0aa139b67f8e6bd1453c3aab291d4a26 --- libavcodec/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/internal.h b/libavcodec/internal.h index caa46dcb92..e30d4aa73d 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -48,8 +48,8 @@ #define FF_CODEC_CAP_INIT_CLEANUP (1 << 1) /** * Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set - * AVFrame.pkt_dts manually. If the flag is set, utils.c won't overwrite - * this field. If it's unset, utils.c tries to guess the pkt_dts field + * AVFrame.pkt_dts manually. If the flag is set, decode.c won't overwrite + * this field. If it's unset, decode.c tries to guess the pkt_dts field * from the input AVPacket. */ #define FF_CODEC_CAP_SETS_PKT_DTS (1 << 2) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/nutdec: Fix an impossible condition, regression since e0c53c34.
ffmpeg | branch: master | Carl Eugen Hoyos | Tue May 2 08:43:12 2017 +0200| [20da4135020fdf66f6060bb14926befbcc42a7dd] | committer: Carl Eugen Hoyos lavf/nutdec: Fix an impossible condition, regression since e0c53c34. Fixes ticket #6362. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20da4135020fdf66f6060bb14926befbcc42a7dd --- libavformat/nutdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 4272f8816c..27440c88d4 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -202,7 +202,7 @@ static int decode_main_header(NUTContext *nut) end += avio_tell(bc); nut->version = ffio_read_varlen(bc); -if (nut->version < NUT_MIN_VERSION && +if (nut->version < NUT_MIN_VERSION || nut->version > NUT_MAX_VERSION) { av_log(s, AV_LOG_ERROR, "Version %d not supported.\n", nut->version); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog