[FFmpeg-cvslog] lavc: stop exporting internal functions and tables
ffmpeg | branch: master | James Almer | Sat Aug 9 21:04:32 2014 -0300| [8f2634f970b237e36512a6fb920c78032756ec72] | committer: Michael Niedermayer lavc: stop exporting internal functions and tables Signed-off-by: James Almer Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f2634f970b237e36512a6fb920c78032756ec72 --- libavcodec/libavcodec.v | 18 -- 1 file changed, 18 deletions(-) diff --git a/libavcodec/libavcodec.v b/libavcodec/libavcodec.v index be74cb3..c923cd3 100644 --- a/libavcodec/libavcodec.v +++ b/libavcodec/libavcodec.v @@ -3,23 +3,5 @@ LIBAVCODEC_$MAJOR { #deprecated, remove after next bump audio_resample; audio_resample_close; -ff_raw_pix_fmt_tags; -ff_fft*; -ff_mdct*; -ff_dct*; -ff_rdft*; -ff_prores_idct_put_10_sse2; -ff_simple_idct*; -ff_aanscales; -ff_faan*; -ff_fdct*; -ff_idct_xvid*; -ff_jpeg_fdct*; -ff_dnxhd_get_cid_table; -ff_dnxhd_cid_table; -ff_idctdsp_init; -ff_fdctdsp_init; -ff_pixblockdsp_init; -ff_me_cmp_init; local: *; }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/idctdsp: move add/put_pixels_clamped_c to header
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 11 13:07:39 2014 +0200| [9eda4e8bd759bfa9d3cc68f2a82a4de6d8eb76ca] | committer: Michael Niedermayer avcodec/idctdsp: move add/put_pixels_clamped_c to header This allows sharing them with the xvid IDCT Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9eda4e8bd759bfa9d3cc68f2a82a4de6d8eb76ca --- libavcodec/idctdsp.c | 41 - libavcodec/idctdsp.h | 41 + 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c index 94bad73..4ca0734 100644 --- a/libavcodec/idctdsp.c +++ b/libavcodec/idctdsp.c @@ -80,27 +80,6 @@ av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation, } } -static void put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, - int line_size) -{ -int i; - -/* read the pixels */ -for (i = 0; i < 8; i++) { -pixels[0] = av_clip_uint8(block[0]); -pixels[1] = av_clip_uint8(block[1]); -pixels[2] = av_clip_uint8(block[2]); -pixels[3] = av_clip_uint8(block[3]); -pixels[4] = av_clip_uint8(block[4]); -pixels[5] = av_clip_uint8(block[5]); -pixels[6] = av_clip_uint8(block[6]); -pixels[7] = av_clip_uint8(block[7]); - -pixels += line_size; -block += 8; -} -} - static void put_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size) { @@ -154,26 +133,6 @@ static void put_signed_pixels_clamped_c(const int16_t *block, } } -static void add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, - int line_size) -{ -int i; - -/* read the pixels */ -for (i = 0; i < 8; i++) { -pixels[0] = av_clip_uint8(pixels[0] + block[0]); -pixels[1] = av_clip_uint8(pixels[1] + block[1]); -pixels[2] = av_clip_uint8(pixels[2] + block[2]); -pixels[3] = av_clip_uint8(pixels[3] + block[3]); -pixels[4] = av_clip_uint8(pixels[4] + block[4]); -pixels[5] = av_clip_uint8(pixels[5] + block[5]); -pixels[6] = av_clip_uint8(pixels[6] + block[6]); -pixels[7] = av_clip_uint8(pixels[7] + block[7]); -pixels += line_size; -block+= 8; -} -} - static void add_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size) { diff --git a/libavcodec/idctdsp.h b/libavcodec/idctdsp.h index 04510b1..bd5e875 100644 --- a/libavcodec/idctdsp.h +++ b/libavcodec/idctdsp.h @@ -106,4 +106,45 @@ void ff_idctdsp_init_ppc(IDCTDSPContext *c, AVCodecContext *avctx, void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth); +static inline void put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, +int line_size) +{ +int i; + +/* read the pixels */ +for (i = 0; i < 8; i++) { +pixels[0] = av_clip_uint8(block[0]); +pixels[1] = av_clip_uint8(block[1]); +pixels[2] = av_clip_uint8(block[2]); +pixels[3] = av_clip_uint8(block[3]); +pixels[4] = av_clip_uint8(block[4]); +pixels[5] = av_clip_uint8(block[5]); +pixels[6] = av_clip_uint8(block[6]); +pixels[7] = av_clip_uint8(block[7]); + +pixels += line_size; +block += 8; +} +} + +static inline void add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, +int line_size) +{ +int i; + +/* read the pixels */ +for (i = 0; i < 8; i++) { +pixels[0] = av_clip_uint8(pixels[0] + block[0]); +pixels[1] = av_clip_uint8(pixels[1] + block[1]); +pixels[2] = av_clip_uint8(pixels[2] + block[2]); +pixels[3] = av_clip_uint8(pixels[3] + block[3]); +pixels[4] = av_clip_uint8(pixels[4] + block[4]); +pixels[5] = av_clip_uint8(pixels[5] + block[5]); +pixels[6] = av_clip_uint8(pixels[6] + block[6]); +pixels[7] = av_clip_uint8(pixels[7] + block[7]); +pixels += line_size; +block+= 8; +} +} + #endif /* AVCODEC_IDCTDSP_H */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/raw: remove obsolete ff_raw_pix_fmt_tags cruft
ffmpeg | branch: master | James Almer | Sat Aug 9 22:01:46 2014 -0300| [59ecd4882df902e6a81986419333977e614faccf] | committer: Michael Niedermayer lavc/raw: remove obsolete ff_raw_pix_fmt_tags cruft Signed-off-by: James Almer Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=59ecd4882df902e6a81986419333977e614faccf --- libavcodec/raw.h |4 1 file changed, 4 deletions(-) diff --git a/libavcodec/raw.h b/libavcodec/raw.h index a79b851..24bf4cc 100644 --- a/libavcodec/raw.h +++ b/libavcodec/raw.h @@ -35,11 +35,7 @@ typedef struct PixelFormatTag { unsigned int fourcc; } PixelFormatTag; -#if LIBAVCODEC_VERSION_MAJOR < 56 -extern av_export const PixelFormatTag ff_raw_pix_fmt_tags[]; -#else extern const PixelFormatTag ff_raw_pix_fmt_tags[]; // exposed through avpriv_get_raw_pix_fmt_tags() -#endif const struct PixelFormatTag *avpriv_get_raw_pix_fmt_tags(void); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/mpegts: remove obsolete ff_mpegts_parse_* cruft
ffmpeg | branch: master | James Almer | Sat Aug 9 22:01:47 2014 -0300| [31b7ab9f0699ce06858f117243d16847cc0a40eb] | committer: Michael Niedermayer lavf/mpegts: remove obsolete ff_mpegts_parse_* cruft Signed-off-by: James Almer Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=31b7ab9f0699ce06858f117243d16847cc0a40eb --- libavformat/mpegts.c | 18 -- libavformat/mpegts.h |7 --- 2 files changed, 25 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index a2456a3..d2a2531 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2675,24 +2675,6 @@ void avpriv_mpegts_parse_close(MpegTSContext *ts) av_free(ts); } -#if LIBAVFORMAT_VERSION_MAJOR < 56 -MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s) -{ -return avpriv_mpegts_parse_open(s); -} - -int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, - const uint8_t *buf, int len) -{ -return avpriv_mpegts_parse_packet(ts, pkt, buf, len); -} - -void ff_mpegts_parse_close(MpegTSContext *ts) -{ -avpriv_mpegts_parse_close(ts); -} -#endif - AVInputFormat ff_mpegts_demuxer = { .name = "mpegts", .long_name = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport Stream)"), diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h index 1cd1ba1..84f3098 100644 --- a/libavformat/mpegts.h +++ b/libavformat/mpegts.h @@ -68,13 +68,6 @@ int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, const uint8_t *buf, int len); void avpriv_mpegts_parse_close(MpegTSContext *ts); -#if LIBAVFORMAT_VERSION_MAJOR < 56 -MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s); -int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, - const uint8_t *buf, int len); -void ff_mpegts_parse_close(MpegTSContext *ts); -#endif - typedef struct SLConfigDescr { int use_au_start; int use_au_end; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf: stop exporting internal functions
ffmpeg | branch: master | James Almer | Sat Aug 9 21:04:33 2014 -0300| [7b3de03c8fa7c7a49522b45dc90f9970417554b4] | committer: Michael Niedermayer lavf: stop exporting internal functions Except for those currently used by ffserver. Signed-off-by: James Almer Also left some others that seemed used by applications other than ffserver Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b3de03c8fa7c7a49522b45dc90f9970417554b4 --- libavformat/libavformat.v |6 -- 1 file changed, 6 deletions(-) diff --git a/libavformat/libavformat.v b/libavformat/libavformat.v index 8243994..e90aef7 100644 --- a/libavformat/libavformat.v +++ b/libavformat/libavformat.v @@ -3,9 +3,6 @@ LIBAVFORMAT_$MAJOR { #FIXME those are for ffserver ff_inet_aton; ff_socket_nonblock; -ff_mpegts_parse_close; -ff_mpegts_parse_open; -ff_mpegts_parse_packet; ff_rtsp_parse_line; ff_rtp_get_local_rtp_port; ff_rtp_get_local_rtcp_port; @@ -17,10 +14,7 @@ LIBAVFORMAT_$MAJOR { ffurl_seek; ffurl_size; ffurl_write; -ffurl_protocol_next; #those are deprecated, remove on next bump url_feof; -get_*; -ff_codec_get_id; local: *; }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/huffyuvdec: fix overread checks
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 11 15:16:29 2014 +0200| [ba47d519e537299179d20b9a599c5824589a3f7a] | committer: Michael Niedermayer avcodec/huffyuvdec: fix overread checks Fixes: ffvhuff_f.avi Found-by: Piotr Bandurski Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ba47d519e537299179d20b9a599c5824589a3f7a --- libavcodec/huffyuvdec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index f206207..06e99bc 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -628,9 +628,9 @@ static void decode_422_bitstream(HYuvContext *s, int count) READ_2PIX(s->temp[0][2 * i], s->temp[1][i], 1); READ_2PIX(s->temp[0][2 * i + 1], s->temp[2][i], 2); } -for (; i < count && get_bits_left(&s->gb) > 0; i++) { +for (; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { READ_2PIX(s->temp[0][2 * i], s->temp[1][i], 1); -if (get_bits_left(&s->gb) <= 0) break; +if (BITS_LEFT(re, &s->gb) <= 0) break; READ_2PIX(s->temp[0][2 * i + 1], s->temp[2][i], 2); } for (; i < count; i++) @@ -669,7 +669,7 @@ static void decode_plane_bitstream(HYuvContext *s, int count, int plane) if (s->bps <= 8) { OPEN_READER(re, &s->gb); if (count >= (get_bits_left(&s->gb)) / (32 * 2)) { -for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { +for (i = 0; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { READ_2PIX_PLANE(s->temp[0][2 * i], s->temp[0][2 * i + 1], plane, OP8bits); } } else { @@ -681,7 +681,7 @@ static void decode_plane_bitstream(HYuvContext *s, int count, int plane) } else if (s->bps <= 14) { OPEN_READER(re, &s->gb); if (count >= (get_bits_left(&s->gb)) / (32 * 2)) { -for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { +for (i = 0; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { READ_2PIX_PLANE(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane, OP14bits); } } else { @@ -710,7 +710,7 @@ static void decode_gray_bitstream(HYuvContext *s, int count) count /= 2; if (count >= (get_bits_left(&s->gb)) / (32 * 2)) { -for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { +for (i = 0; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { READ_2PIX(s->temp[0][2 * i], s->temp[0][2 * i + 1], 0); } } else { @@ -727,7 +727,7 @@ static av_always_inline void decode_bgr_1(HYuvContext *s, int count, int i; OPEN_READER(re, &s->gb); -for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { +for (i = 0; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { unsigned int index; int code, n; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/get_bits: add BITS_LEFT() for finding the bits left with an opened reader
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 11 15:15:19 2014 +0200| [11512d70facf42fb490168d33a5986448cf36074] | committer: Michael Niedermayer avcodec/get_bits: add BITS_LEFT() for finding the bits left with an opened reader Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11512d70facf42fb490168d33a5986448cf36074 --- libavcodec/get_bits.h |5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index fd32535..90235e3 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -113,6 +113,9 @@ typedef struct RL_VLC_ELEM { * LAST_SKIP_BITS(name, gb, num) * Like SKIP_BITS, to be used if next call is UPDATE_CACHE or CLOSE_READER. * + * BITS_LEFT(name, gb) + * Return the number of bits left + * * For examples see get_bits, show_bits, skip_bits, get_vlc. */ @@ -179,6 +182,8 @@ typedef struct RL_VLC_ELEM { name ## _index = FFMIN(name ## _size_plus8, name ## _index + (num)) #endif +#define BITS_LEFT(name, gb) ((int)((gb)->size_in_bits - name ## _index)) + #define SKIP_BITS(name, gb, num)\ do {\ SKIP_CACHE(name, gb, num); \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/snow: fix null pointer dereference in cleanup after allocation failure
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 11 15:36:22 2014 +0200| [9a162146ca6cc12ef7ad4a15164349482885962c] | committer: Michael Niedermayer avcodec/snow: fix null pointer dereference in cleanup after allocation failure Fixes: snowf.avi Found-by: Piotr Bandurski Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9a162146ca6cc12ef7ad4a15164349482885962c --- libavcodec/snow.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index dc80ce6..5660eba 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -703,7 +703,7 @@ av_cold void ff_snow_common_end(SnowContext *s) for(i=0; iref_mvs[i]); av_freep(&s->ref_scores[i]); -if(s->last_picture[i]->data[0]) { +if(s->last_picture[i] && s->last_picture[i]->data[0]) { av_assert0(s->last_picture[i]->data[0] != s->current_picture->data[0]); } av_frame_free(&s->last_picture[i]); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/vc1dec: do not crash when flushing without an allocated frame
ffmpeg | branch: release/2.3 | Michael Niedermayer | Mon Aug 11 02:16:43 2014 +0200| [a1fe3b41507300dbaa9a082eb43155f07fcf5124] | committer: Michael Niedermayer avcodec/vc1dec: do not crash when flushing without an allocated frame Fixes Ticket3837 Found-by: Piotr Bandurski Signed-off-by: Michael Niedermayer (cherry picked from commit 6801eb0a0981f113f5f09ed4799d9ae805af62a3) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a1fe3b41507300dbaa9a082eb43155f07fcf5124 --- libavcodec/vc1dec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 06deb7f..a73d615 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5514,7 +5514,7 @@ static void vc1_sprite_flush(AVCodecContext *avctx) Since we can't enforce it, clear to black the missing sprite. This is wrong but it looks better than doing nothing. */ -if (f->data[0]) +if (f && f->data[0]) for (plane = 0; plane < (s->flags&CODEC_FLAG_GRAY ? 1 : 3); plane++) for (i = 0; i < v->sprite_height>>!!plane; i++) memset(f->data[plane] + i * f->linesize[plane], ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/snow: fix null pointer dereference in cleanup after allocation failure
ffmpeg | branch: release/2.3 | Michael Niedermayer | Mon Aug 11 15:36:22 2014 +0200| [11420649d021e35a2b037cf156d8256a0c64c484] | committer: Michael Niedermayer avcodec/snow: fix null pointer dereference in cleanup after allocation failure Fixes: snowf.avi Found-by: Piotr Bandurski Signed-off-by: Michael Niedermayer (cherry picked from commit 9a162146ca6cc12ef7ad4a15164349482885962c) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11420649d021e35a2b037cf156d8256a0c64c484 --- libavcodec/snow.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 711d1a4..f7629c5 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -713,7 +713,7 @@ av_cold void ff_snow_common_end(SnowContext *s) for(i=0; iref_mvs[i]); av_freep(&s->ref_scores[i]); -if(s->last_picture[i]->data[0]) { +if(s->last_picture[i] && s->last_picture[i]->data[0]) { av_assert0(s->last_picture[i]->data[0] != s->current_picture->data[0]); } av_frame_free(&s->last_picture[i]); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/get_bits: add BITS_LEFT() for finding the bits left with an opened reader
ffmpeg | branch: release/2.3 | Michael Niedermayer | Mon Aug 11 15:15:19 2014 +0200| [6badd558ce19dffe8c3ea3e687812b933e0cb2ff] | committer: Michael Niedermayer avcodec/get_bits: add BITS_LEFT() for finding the bits left with an opened reader Signed-off-by: Michael Niedermayer (cherry picked from commit 11512d70facf42fb490168d33a5986448cf36074) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6badd558ce19dffe8c3ea3e687812b933e0cb2ff --- libavcodec/get_bits.h |5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index d8d7b6e..d67263c 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -113,6 +113,9 @@ typedef struct RL_VLC_ELEM { * LAST_SKIP_BITS(name, gb, num) * Like SKIP_BITS, to be used if next call is UPDATE_CACHE or CLOSE_READER. * + * BITS_LEFT(name, gb) + * Return the number of bits left + * * For examples see get_bits, show_bits, skip_bits, get_vlc. */ @@ -179,6 +182,8 @@ typedef struct RL_VLC_ELEM { name ## _index = FFMIN(name ## _size_plus8, name ## _index + (num)) #endif +#define BITS_LEFT(name, gb) ((int)((gb)->size_in_bits - name ## _index)) + #define SKIP_BITS(name, gb, num)\ do {\ SKIP_CACHE(name, gb, num); \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/huffyuvdec: fix overread checks
ffmpeg | branch: release/2.3 | Michael Niedermayer | Mon Aug 11 15:16:29 2014 +0200| [dbf5d7e5cd16d4f02b57c24922b1f77755c0427b] | committer: Michael Niedermayer avcodec/huffyuvdec: fix overread checks Fixes: ffvhuff_f.avi Found-by: Piotr Bandurski Signed-off-by: Michael Niedermayer (cherry picked from commit ba47d519e537299179d20b9a599c5824589a3f7a) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dbf5d7e5cd16d4f02b57c24922b1f77755c0427b --- libavcodec/huffyuvdec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index 74872d2..662095f 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -625,9 +625,9 @@ static void decode_422_bitstream(HYuvContext *s, int count) READ_2PIX(s->temp[0][2 * i], s->temp[1][i], 1); READ_2PIX(s->temp[0][2 * i + 1], s->temp[2][i], 2); } -for (; i < count && get_bits_left(&s->gb) > 0; i++) { +for (; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { READ_2PIX(s->temp[0][2 * i], s->temp[1][i], 1); -if (get_bits_left(&s->gb) <= 0) break; +if (BITS_LEFT(re, &s->gb) <= 0) break; READ_2PIX(s->temp[0][2 * i + 1], s->temp[2][i], 2); } for (; i < count; i++) @@ -666,7 +666,7 @@ static void decode_plane_bitstream(HYuvContext *s, int count, int plane) if (s->bps <= 8) { OPEN_READER(re, &s->gb); if (count >= (get_bits_left(&s->gb)) / (32 * 2)) { -for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { +for (i = 0; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { READ_2PIX_PLANE(s->temp[0][2 * i], s->temp[0][2 * i + 1], plane, OP8bits); } } else { @@ -678,7 +678,7 @@ static void decode_plane_bitstream(HYuvContext *s, int count, int plane) } else if (s->bps <= 14) { OPEN_READER(re, &s->gb); if (count >= (get_bits_left(&s->gb)) / (32 * 2)) { -for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { +for (i = 0; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { READ_2PIX_PLANE(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane, OP14bits); } } else { @@ -707,7 +707,7 @@ static void decode_gray_bitstream(HYuvContext *s, int count) count/=2; if (count >= (get_bits_left(&s->gb)) / (32 * 2)) { -for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { +for (i = 0; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { READ_2PIX(s->temp[0][2 * i], s->temp[0][2 * i + 1], 0); } } else { @@ -724,7 +724,7 @@ static av_always_inline void decode_bgr_1(HYuvContext *s, int count, int i; OPEN_READER(re, &s->gb); -for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { +for (i = 0; i < count && BITS_LEFT(re, &s->gb) > 0; i++) { unsigned int index; int code, n; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Changelog: update for 2.3.2
ffmpeg | branch: release/2.3 | Michael Niedermayer | Mon Aug 11 17:06:48 2014 +0200| [b88de7b31a4a5c35d10b1392d2d86d93fc942b4c] | committer: Michael Niedermayer Changelog: update for 2.3.2 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b88de7b31a4a5c35d10b1392d2d86d93fc942b4c --- Changelog | 13 + 1 file changed, 13 insertions(+) diff --git a/Changelog b/Changelog index 2faa83f..57dbfbe 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,19 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 2.3.2: +- snow: fix null pointer dereference +- huffyucdec: fix overread +- vc1dec: fix crash +- iff: fix out of array access +- matroskaenc: fix assertion failure +- cdgraphics: fix infinite loop +- dvdsub_parser: fix infinite loop +- mpeg12dec: support decoding some broken files +- v4l2enc: fix crash +- h264_parser: fix handling huge resolutions +- h264_mp4toannexb_bsf: multiple bugfixes + version 2.3.1: - public AVDCT API/ABI for DCT functions - g2meet: allow size changes within original sizes ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Tag n2.3.2 : FFmpeg 2.3.2 release
[ffmpeg] [branch: refs/tags/n2.3.2] Tag:fb94eacc5ec8e26d6a568918ae964ceca93d136e > http://git.videolan.org/gitweb.cgi/ffmpeg.git?a=tag;h=fb94eacc5ec8e26d6a568918ae964ceca93d136e Tagger: Michael Niedermayer Date: Mon Aug 11 17:53:34 2014 +0200 FFmpeg 2.3.2 release ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] [ffmpeg-web] branch master updated. d0b653c web/download: add FFmpeg 2.3.2
The branch, master has been updated via d0b653c7c55d071f97385dd9320a561ae2acad42 (commit) from 5668e9288181a98476aa4dde06155b0694bc4498 (commit) - Log - commit d0b653c7c55d071f97385dd9320a561ae2acad42 Author: Michael Niedermayer AuthorDate: Mon Aug 11 17:57:00 2014 +0200 Commit: Michael Niedermayer CommitDate: Mon Aug 11 17:57:00 2014 +0200 web/download: add FFmpeg 2.3.2 diff --git a/src/download b/src/download index 68fde72..0bc90e7 100644 --- a/src/download +++ b/src/download @@ -1,10 +1,10 @@ -http://ffmpeg.org/releases/ffmpeg-2.3.1.tar.bz2"; class="btn btn-success"> +http://ffmpeg.org/releases/ffmpeg-2.3.2.tar.bz2"; class="btn btn-success"> Download - ffmpeg-2.3.1.tar.bz2 + ffmpeg-2.3.2.tar.bz2 More releases @@ -255,10 +255,10 @@ -FFmpeg 2.3.1 "Mandelbrot" +FFmpeg 2.3.2 "Mandelbrot" -2.3.1 was released on 2014-07-31. It is the latest stable FFmpeg release +2.3.2 was released on 2014-08-11. It is the latest stable FFmpeg release from the 2.3 release branch, which was cut from master on 2014-07-16. Amongst lots of other changes, it includes all changes from ffmpeg-mt, libav master of 2014-07-15, libav 10.2 as of 2014-07-15. @@ -278,15 +278,15 @@ libpostproc52. 3.100 - Download bzip2 tarball - PGP signature + Download bzip2 tarball + PGP signature - Download gzip tarball - PGP signature + Download gzip tarball + PGP signature - http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n2.3.1";>Changelog + http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n2.3.2";>Changelog http://git.videolan.org/?p=ffmpeg.git;a=blob;f=RELEASE_NOTES;hb=489d066";>Release Notes --- Summary of changes: src/download | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) hooks/post-receive -- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mmvideo: check horizontal coordinate too
ffmpeg | branch: release/2.2 | Michael Niedermayer | Sun Aug 3 19:24:18 2014 +0100| [bea14966e2a37019cb4e38420868c5bb0542d487] | committer: Anton Khirnov mmvideo: check horizontal coordinate too Fixes out of array accesses. Bug-Id: CVE-2013-3672 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov (cherry picked from commit 70cd3b8e659c3522eea5c16a65d14b8658894a94) Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bea14966e2a37019cb4e38420868c5bb0542d487 --- libavcodec/mmvideo.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index abec2e8..d80c832 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -154,6 +154,8 @@ static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) int replace_array = bytestream2_get_byte(&s->gb); for(j=0; j<8; j++) { int replace = (replace_array >> (7-j)) & 1; +if (x + half_horiz >= s->avctx->width) +return AVERROR_INVALIDDATA; if (replace) { int color = bytestream2_get_byte(&data_ptr); s->frame->data[0][y*s->frame->linesize[0] + x] = color; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] wmalosslessdec: fix mclms_coeffs* array size
ffmpeg | branch: release/2.2 | Michael Niedermayer | Fri Feb 7 15:07:23 2014 +0100| [6be5a3c0451e8f199ef1da09961aa76c08c87afd] | committer: Anton Khirnov wmalosslessdec: fix mclms_coeffs* array size Fixes corruption of context Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-sta...@libav.org Bug-Id: CVE-2014-2098 Signed-off-by: Anton Khirnov (cherry picked from commit 849b9d34c7ef70b370c53e7af3940f51cbc07d0f) Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6be5a3c0451e8f199ef1da09961aa76c08c87afd --- libavcodec/wmalosslessdec.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 2f341c0..b12eabb 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -127,8 +127,8 @@ typedef struct WmallDecodeCtx { int8_t mclms_order; int8_t mclms_scaling; -int16_t mclms_coeffs[128]; -int16_t mclms_coeffs_cur[4]; +int16_t mclms_coeffs[WMALL_MAX_CHANNELS * WMALL_MAX_CHANNELS * 32]; +int16_t mclms_coeffs_cur[WMALL_MAX_CHANNELS * WMALL_MAX_CHANNELS]; int16_t mclms_prevvalues[WMALL_MAX_CHANNELS * 2 * 32]; int16_t mclms_updates[WMALL_MAX_CHANNELS * 2 * 32]; int mclms_recent; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] huffyuvdec: check width size for yuv422p
ffmpeg | branch: release/2.2 | Michael Niedermayer | Sun Aug 3 00:54:33 2014 +0100| [aa943bd31fada23db5cb9611215656ab9ebe5b94] | committer: Anton Khirnov huffyuvdec: check width size for yuv422p Avoid out of array accesses. CC: libav-sta...@libav.org Bug-Id: CVE-2013-0848 Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov (cherry picked from commit a7153444df9040bf6ae103e0bbf6104b66f974cb) Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aa943bd31fada23db5cb9611215656ab9ebe5b94 --- libavcodec/huffyuvdec.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index 016b0d6..1308bba 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -339,6 +339,13 @@ static av_cold int decode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } +if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P && +avctx->width % 4) { +av_log(avctx, AV_LOG_ERROR, "width must be multiple of 4 " + "for this combination of colorspace and predictor type.\n"); +return AVERROR_INVALIDDATA; +} + if ((ret = ff_huffyuv_alloc_temp(s)) < 0) return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'bea14966e2a37019cb4e38420868c5bb0542d487' into release/2.2
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 18:01:29 2014 +0200| [97cbad3d2c906ed5bd1c30f289f523ee2c15ab73] | committer: Michael Niedermayer Merge commit 'bea14966e2a37019cb4e38420868c5bb0542d487' into release/2.2 * commit 'bea14966e2a37019cb4e38420868c5bb0542d487': mmvideo: check horizontal coordinate too See: 8d3c99e825317b7efda5fd12e69896b47c700303 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97cbad3d2c906ed5bd1c30f289f523ee2c15ab73 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'aa943bd31fada23db5cb9611215656ab9ebe5b94' into release/2.2
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 18:02:19 2014 +0200| [45a529d805cf09d0d43342c925f38e3b56c3a6e5] | committer: Michael Niedermayer Merge commit 'aa943bd31fada23db5cb9611215656ab9ebe5b94' into release/2.2 * commit 'aa943bd31fada23db5cb9611215656ab9ebe5b94': huffyuvdec: check width size for yuv422p Conflicts: libavcodec/huffyuvdec.c See: 6abb9a901fca27da14d4fffbb01948288b5da3ba Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=45a529d805cf09d0d43342c925f38e3b56c3a6e5 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '6be5a3c0451e8f199ef1da09961aa76c08c87afd' into release/2.2
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 18:00:51 2014 +0200| [6419569a9d108fa4bfaa72504dac96efd84b80b4] | committer: Michael Niedermayer Merge commit '6be5a3c0451e8f199ef1da09961aa76c08c87afd' into release/2.2 * commit '6be5a3c0451e8f199ef1da09961aa76c08c87afd': wmalosslessdec: fix mclms_coeffs* array size See: ec9578d54d09b64bf112c2bf7a34b1ef3b93dbd3 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6419569a9d108fa4bfaa72504dac96efd84b80b4 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] jpeg2000: enable 4 component pixel formats
ffmpeg | branch: release/2.2 | Vittorio Giovara | Wed Aug 6 11:07:08 2014 +0100| [6598aaea1ad2cf82d40abb191ac26a5e4e5147ba] | committer: Vittorio Giovara jpeg2000: enable 4 component pixel formats Bug-Id: 721 CC: libav-sta...@libav.org Sample-Id: 31230.mov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6598aaea1ad2cf82d40abb191ac26a5e4e5147ba --- libavcodec/jpeg2000dec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index cc154c3..3b4efc3 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -178,7 +178,7 @@ static int get_siz(Jpeg2000DecoderContext *s) return AVERROR_INVALIDDATA; } -if (ncomponents > 3) { +if (ncomponents > 4) { avpriv_request_sample(s->avctx, "Support for %d components", s->ncomponents); return AVERROR_PATCHWELCOME; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] stereo3d: add missing include guards
ffmpeg | branch: release/2.2 | Vittorio Giovara | Mon Apr 21 02:33:35 2014 +0200| [a5992a274ff5f6c4bec3445cb410da0adce8ef70] | committer: Vittorio Giovara stereo3d: add missing include guards > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a5992a274ff5f6c4bec3445cb410da0adce8ef70 --- libavutil/stereo3d.h |5 + 1 file changed, 5 insertions(+) diff --git a/libavutil/stereo3d.h b/libavutil/stereo3d.h index 695d6f1..b1910b1 100644 --- a/libavutil/stereo3d.h +++ b/libavutil/stereo3d.h @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef AVUTIL_STEREO3D_H +#define AVUTIL_STEREO3D_H + #include #include "frame.h" @@ -145,3 +148,5 @@ AVStereo3D *av_stereo3d_alloc(void); * @return The AVStereo3D structure to be filled by caller. */ AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame); + +#endif /* AVUTIL_STEREO3D_H */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'a5992a274ff5f6c4bec3445cb410da0adce8ef70' into release/2.2
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 18:36:21 2014 +0200| [90a1c5e95c3f6bedcb97adb211e6e2b9de17d234] | committer: Michael Niedermayer Merge commit 'a5992a274ff5f6c4bec3445cb410da0adce8ef70' into release/2.2 * commit 'a5992a274ff5f6c4bec3445cb410da0adce8ef70': stereo3d: add missing include guards Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=90a1c5e95c3f6bedcb97adb211e6e2b9de17d234 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '6598aaea1ad2cf82d40abb191ac26a5e4e5147ba' into release/2.2
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 18:40:00 2014 +0200| [7b67ce9ade01abcf0d5d08ada62011b43526a646] | committer: Michael Niedermayer Merge commit '6598aaea1ad2cf82d40abb191ac26a5e4e5147ba' into release/2.2 * commit '6598aaea1ad2cf82d40abb191ac26a5e4e5147ba': jpeg2000: enable 4 component pixel formats See: f0358dc1d30cd4f4862489ab95c4d408b00a8b0d Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b67ce9ade01abcf0d5d08ada62011b43526a646 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '5bf5a35fb5d452ea4b30cd7b853d92df6705d250' into release/2.2
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 18:40:48 2014 +0200| [3301b248b0338ca53ad24ae77677bd733ed9d063] | committer: Michael Niedermayer Merge commit '5bf5a35fb5d452ea4b30cd7b853d92df6705d250' into release/2.2 * commit '5bf5a35fb5d452ea4b30cd7b853d92df6705d250': cdgraphics: switch to bytestream2 Conflicts: libavcodec/cdgraphics.c See: ad002e1a13a8df934bd6cb2c84175a4780ab8942 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3301b248b0338ca53ad24ae77677bd733ed9d063 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] cdgraphics: switch to bytestream2
ffmpeg | branch: release/2.2 | Anton Khirnov | Wed Aug 6 10:46:50 2014 +| [5bf5a35fb5d452ea4b30cd7b853d92df6705d250] | committer: Anton Khirnov cdgraphics: switch to bytestream2 Fixes possible invalid memory accesses on corrupted data. CC:libav-sta...@libav.org Bug-ID: CVE-2013-3674 (cherry picked from commit a1599f3f7ea8478d1f6a95e59e3bc6bc86d5f812) Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5bf5a35fb5d452ea4b30cd7b853d92df6705d250 --- libavcodec/cdgraphics.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index b8a6fb8..752003f 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -261,7 +261,7 @@ static void cdg_scroll(CDGraphicsContext *cc, uint8_t *data, static int cdg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { -const uint8_t *buf = avpkt->data; +GetByteContext gb; int buf_size = avpkt->size; int ret; uint8_t command, inst; @@ -269,10 +269,8 @@ static int cdg_decode_frame(AVCodecContext *avctx, AVFrame *frame = data; CDGraphicsContext *cc = avctx->priv_data; -if (buf_size < CDG_MINIMUM_PKT_SIZE) { -av_log(avctx, AV_LOG_ERROR, "buffer too small for decoder\n"); -return AVERROR(EINVAL); -} +bytestream2_init(&gb, avpkt->data, avpkt->size); + ret = ff_reget_buffer(avctx, cc->frame); if (ret) { @@ -282,11 +280,11 @@ static int cdg_decode_frame(AVCodecContext *avctx, if (!avctx->frame_number) memset(cc->frame->data[0], 0, cc->frame->linesize[0] * avctx->height); -command = bytestream_get_byte(&buf); -inst= bytestream_get_byte(&buf); +command = bytestream2_get_byte(&gb); +inst= bytestream2_get_byte(&gb); inst&= CDG_MASK; -buf += 2; /// skipping 2 unneeded bytes -bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE); +bytestream2_skip(&gb, 2); +bytestream2_get_buffer(&gb, cdg_data, sizeof(cdg_data)); if ((command & CDG_MASK) == CDG_COMMAND) { switch (inst) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] svq1: do not modify the input packet
ffmpeg | branch: release/2.2 | Anton Khirnov | Sun Aug 3 10:14:48 2014 +0200| [d513c6a0ee582d22b6e793286774abbde01f6680] | committer: Anton Khirnov svq1: do not modify the input packet The input data must remain constant, make a copy instead. This is in theory a performance hit, but since I failed to find any samples using this feature, this should not matter in practice. Also, check the size of the header, avoiding invalid reads on truncated data. CC:libav-sta...@libav.org (cherry picked from commit 7b588bb691644e1b3c168b99accf74248a24e3cf) Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d513c6a0ee582d22b6e793286774abbde01f6680 --- libavcodec/svq1dec.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 000487b..14ff41c 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -60,6 +60,10 @@ typedef struct SVQ1Context { HpelDSPContext hdsp; GetBitContext gb; AVFrame *prev; + +uint8_t *pkt_swapped; +int pkt_swapped_allocated; + int width; int height; int frame_code; @@ -626,7 +630,24 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data, /* swap some header bytes (why?) */ if (s->frame_code != 0x20) { -uint32_t *src = (uint32_t *)(buf + 4); +uint32_t *src; + +if (buf_size < 9 * 4) { +av_log(avctx, AV_LOG_ERROR, "Input packet too small\n"); +return AVERROR_INVALIDDATA; +} + +av_fast_malloc(s->pkt_swapped, &s->pkt_swapped_allocated, + buf_size); +if (!s->pkt_swapped) +return AVERROR(ENOMEM); + +memcpy(s->pkt_swapped, buf, buf_size); +buf = s->pkt_swapped; +init_get_bits(&s->gb, buf, buf_size * 8); +skip_bits(&s->gb, 22); + +src = (uint32_t *)(s->pkt_swapped + 4); for (i = 0; i < 4; i++) src[i] = ((src[i] << 16) | (src[i] >> 16)) ^ src[7 - i]; @@ -796,6 +817,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx) SVQ1Context *s = avctx->priv_data; av_frame_free(&s->prev); +av_freep(&s->pkt_swapped); return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'd513c6a0ee582d22b6e793286774abbde01f6680' into release/2.2
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 18:50:11 2014 +0200| [963514ea1a6ed4c6b601568e7efb1c0017b1cd50] | committer: Michael Niedermayer Merge commit 'd513c6a0ee582d22b6e793286774abbde01f6680' into release/2.2 * commit 'd513c6a0ee582d22b6e793286774abbde01f6680': svq1: do not modify the input packet Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=963514ea1a6ed4c6b601568e7efb1c0017b1cd50 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '18f48e05a22a73a389fb3ab4b3eaf78903bab5ef' into release/2.2
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 18:49:37 2014 +0200| [c11b3010c21a194a9e8da7f07c918ce1276e3d10] | committer: Michael Niedermayer Merge commit '18f48e05a22a73a389fb3ab4b3eaf78903bab5ef' into release/2.2 * commit '18f48e05a22a73a389fb3ab4b3eaf78903bab5ef': cdgraphics: do not return 0 from the decode function Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c11b3010c21a194a9e8da7f07c918ce1276e3d10 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '67134ad31f1f3bc1515eae129e4368401f7c3342' into release/2.2
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 18:51:22 2014 +0200| [0dc5868f141c1877dc530437643cc927f1c158b3] | committer: Michael Niedermayer Merge commit '67134ad31f1f3bc1515eae129e4368401f7c3342' into release/2.2 * commit '67134ad31f1f3bc1515eae129e4368401f7c3342': h264: fix interpretation of interleaved stereo modes Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0dc5868f141c1877dc530437643cc927f1c158b3 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/svq1dec: Fix multiple bugs from "svq1: do not modify the input packet"
ffmpeg | branch: release/2.2 | Michael Niedermayer | Thu Aug 7 02:27:07 2014 +0200| [723512ac71716d1f27ed33f4742913cba3e47ae5] | committer: Michael Niedermayer avcodec/svq1dec: Fix multiple bugs from "svq1: do not modify the input packet" Add padding, clear size, use the correct pointer. Signed-off-by: Michael Niedermayer (cherry picked from commit 4213fc5b9eebec53c7d22b770c3f1ceecca1c113) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=723512ac71716d1f27ed33f4742913cba3e47ae5 --- libavcodec/svq1dec.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index cab9bac..eb64344 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -635,7 +635,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_INVALIDDATA; } -av_fast_malloc(s->pkt_swapped, &s->pkt_swapped_allocated, +av_fast_padded_malloc(&s->pkt_swapped, &s->pkt_swapped_allocated, buf_size); if (!s->pkt_swapped) return AVERROR(ENOMEM); @@ -818,6 +818,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx) av_frame_free(&s->prev); av_freep(&s->pkt_swapped); +s->pkt_swapped_allocated = 0; return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] h264: fix interpretation of interleaved stereo modes
ffmpeg | branch: release/2.2 | Felix Abecassis | Thu Aug 7 11:42:36 2014 +0200| [67134ad31f1f3bc1515eae129e4368401f7c3342] | committer: Vittorio Giovara h264: fix interpretation of interleaved stereo modes Column and row frame packing arrangements were inverted. Signed-off-by: Vittorio Giovara > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67134ad31f1f3bc1515eae129e4368401f7c3342 --- libavcodec/h264.c|4 ++-- libavcodec/libx264.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 29b96c4..aee8db0 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2045,10 +2045,10 @@ static void decode_postinit(H264Context *h, int setup_finished) stereo->type = AV_STEREO3D_CHECKERBOARD; break; case 1: -stereo->type = AV_STEREO3D_LINES; +stereo->type = AV_STEREO3D_COLUMNS; break; case 2: -stereo->type = AV_STEREO3D_COLUMNS; +stereo->type = AV_STEREO3D_LINES; break; case 3: if (h->quincunx_subsampling) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index abf0a3e..78808f3 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -175,10 +175,10 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, case AV_STEREO3D_CHECKERBOARD: fpa_type = 0; break; -case AV_STEREO3D_LINES: +case AV_STEREO3D_COLUMNS: fpa_type = 1; break; -case AV_STEREO3D_COLUMNS: +case AV_STEREO3D_LINES: fpa_type = 2; break; case AV_STEREO3D_SIDEBYSIDE: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] cdgraphics: do not return 0 from the decode function
ffmpeg | branch: release/2.2 | Anton Khirnov | Wed Aug 6 10:56:34 2014 +| [18f48e05a22a73a389fb3ab4b3eaf78903bab5ef] | committer: Anton Khirnov cdgraphics: do not return 0 from the decode function 0 means no data consumed, so it can trigger an infinite loop in the caller. CC:libav-sta...@libav.org (cherry picked from commit c7d9b473e28238d4a4ef1b7e8b42c1cca256da36) Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18f48e05a22a73a389fb3ab4b3eaf78903bab5ef --- libavcodec/cdgraphics.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index 752003f..c3e42e7 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -349,10 +349,9 @@ static int cdg_decode_frame(AVCodecContext *avctx, *got_frame = 1; } else { *got_frame = 0; -buf_size = 0; } -return buf_size; +return avpkt->size; } static av_cold int cdg_decode_end(AVCodecContext *avctx) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/cpu: add aarch64 entries to 2nd table
ffmpeg | branch: release/2.2 | Michael Niedermayer | Wed Aug 6 13:59:18 2014 +0200| [ffc66ac0d641f3527d2f910dc3d37ea558513407] | committer: Michael Niedermayer avutil/cpu: add aarch64 entries to 2nd table Signed-off-by: Michael Niedermayer (cherry picked from commit efc4fe9d74a5040e465dbff80b29468dbc227c19) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ffc66ac0d641f3527d2f910dc3d37ea558513407 --- libavutil/cpu.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/cpu.c b/libavutil/cpu.c index d6d93a3..f4d3d14 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -224,6 +224,9 @@ int av_parse_cpu_caps(unsigned *flags, const char *s) { "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP },.unit = "flags" }, { "vfpv3",NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFPV3 },.unit = "flags" }, { "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON },.unit = "flags" }, +#elif ARCH_AARCH64 +{ "neon", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_NEON },.unit = "flags" }, +{ "vfp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VFP },.unit = "flags" }, #endif { NULL }, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/snow: fix null pointer dereference in cleanup after allocation failure
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 15:36:22 2014 +0200| [bb7f236c7fefa3a8918f1578bc4c82f38395ef94] | committer: Michael Niedermayer avcodec/snow: fix null pointer dereference in cleanup after allocation failure Fixes: snowf.avi Found-by: Piotr Bandurski Signed-off-by: Michael Niedermayer (cherry picked from commit 9a162146ca6cc12ef7ad4a15164349482885962c) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bb7f236c7fefa3a8918f1578bc4c82f38395ef94 --- libavcodec/snow.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index c645b12..5184acd 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -689,7 +689,7 @@ av_cold void ff_snow_common_end(SnowContext *s) for(i=0; iref_mvs[i]); av_freep(&s->ref_scores[i]); -if(s->last_picture[i]->data[0]) { +if(s->last_picture[i] && s->last_picture[i]->data[0]) { av_assert0(s->last_picture[i]->data[0] != s->current_picture->data[0]); } av_frame_free(&s->last_picture[i]); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffmpeg_opt: Use av_guess_codec() instead of AVOutputFormat->*codec
ffmpeg | branch: release/2.2 | Michael Niedermayer | Sat Aug 2 03:29:42 2014 +0200| [588e7226edb823392e6c43b0af81c52ceebc1128] | committer: Michael Niedermayer ffmpeg_opt: Use av_guess_codec() instead of AVOutputFormat->*codec Fixes part of ticket2236 Signed-off-by: Michael Niedermayer (cherry picked from commit 956f4087c6eb717e31f3b92fe03fd56a3747eccf) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=588e7226edb823392e6c43b0af81c52ceebc1128 --- ffmpeg_opt.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 3d50d77..c09675c 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -1783,7 +1783,7 @@ static int open_output_file(OptionsContext *o, const char *filename) /* pick the "best" stream of each type */ /* video: highest resolution */ -if (!o->video_disable && oc->oformat->video_codec != AV_CODEC_ID_NONE) { +if (!o->video_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_VIDEO) != AV_CODEC_ID_NONE) { int area = 0, idx = -1; int qcr = avformat_query_codec(oc->oformat, oc->oformat->video_codec, 0); for (i = 0; i < nb_input_streams; i++) { @@ -1805,7 +1805,7 @@ static int open_output_file(OptionsContext *o, const char *filename) } /* audio: most channels */ -if (!o->audio_disable && oc->oformat->audio_codec != AV_CODEC_ID_NONE) { +if (!o->audio_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_AUDIO) != AV_CODEC_ID_NONE) { int channels = 0, idx = -1; for (i = 0; i < nb_input_streams; i++) { ist = input_streams[i]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/iff: check pixfmt for rgb8 / rgbn
ffmpeg | branch: release/2.2 | Michael Niedermayer | Sun Aug 10 21:59:33 2014 +0200| [0397d434054ab9a80fbf8e2357538ca29d4fe427] | committer: Michael Niedermayer avcodec/iff: check pixfmt for rgb8 / rgbn Fixes out of array access Found-by: Piotr Bandurski Signed-off-by: Michael Niedermayer (cherry picked from commit 3539d6c63a16e1b2874bb037a86f317449c58770) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0397d434054ab9a80fbf8e2357538ca29d4fe427 --- libavcodec/iff.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/iff.c b/libavcodec/iff.c index f08a0f7..d93015c 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -847,9 +847,9 @@ static int decode_frame(AVCodecContext *avctx, break; case 4: bytestream2_init(&gb, buf, buf_size); -if (avctx->codec_tag == MKTAG('R', 'G', 'B', '8')) +if (avctx->codec_tag == MKTAG('R', 'G', 'B', '8') && avctx->pix_fmt == AV_PIX_FMT_RGB32) decode_rgb8(&gb, s->frame->data[0], avctx->width, avctx->height, s->frame->linesize[0]); -else if (avctx->codec_tag == MKTAG('R', 'G', 'B', 'N')) +else if (avctx->codec_tag == MKTAG('R', 'G', 'B', 'N') && avctx->pix_fmt == AV_PIX_FMT_RGB444) decode_rgbn(&gb, s->frame->data[0], avctx->width, avctx->height, s->frame->linesize[0]); else return unsupported(avctx); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Update for 2.2.7
ffmpeg | branch: release/2.2 | Michael Niedermayer | Mon Aug 11 20:16:12 2014 +0200| [c0ad5f9333f4bfb25ebfd95dcfd321d3175e076b] | committer: Michael Niedermayer Update for 2.2.7 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c0ad5f9333f4bfb25ebfd95dcfd321d3175e076b --- Changelog|6 ++ RELEASE |2 +- doc/Doxyfile |2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 8a87653..1339a7b 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,12 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 2.2.7 +- snow: fix null pointer dereference +- iff: fix out of array access +- svq1dec: fix input data corruption + + version 2.2.6 - fix infinite loop in dvbsub parser - fix some interlaced MPEG-2 videos diff --git a/RELEASE b/RELEASE index bda8fbe..5bc1cc4 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -2.2.6 +2.2.7 diff --git a/doc/Doxyfile b/doc/Doxyfile index e90c2b3..6e75771 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -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.6 +PROJECT_NUMBER = 2.2.7 # 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 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Add missing initialization for AVProbeData.
ffmpeg | branch: master | Reimar Döffinger | Mon Aug 11 19:55:26 2014 +0200| [2c0454cd208d1a7a955cc973df5de44c26166229] | committer: Reimar Döffinger Add missing initialization for AVProbeData. This has become necessary since the new mime field was added. Signed-off-by: Reimar Döffinger > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2c0454cd208d1a7a955cc973df5de44c26166229 --- libavformat/img2dec.c |2 +- tools/probetest.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index d70fc75..a82f50f 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -308,7 +308,7 @@ int ff_img_read_header(AVFormatContext *s1) int probe_buffer_size = 2048; uint8_t *probe_buffer = av_realloc(NULL, probe_buffer_size + AVPROBE_PADDING_SIZE); AVInputFormat *fmt = NULL; -AVProbeData pd; +AVProbeData pd = { 0 }; if (!probe_buffer) return AVERROR(ENOMEM); diff --git a/tools/probetest.c b/tools/probetest.c index b685e3d..78327de 100644 --- a/tools/probetest.c +++ b/tools/probetest.c @@ -78,7 +78,7 @@ static void print_times(void) int main(int argc, char **argv) { unsigned int p, i, type, size, retry; -AVProbeData pd; +AVProbeData pd = { 0 }; AVLFG state; PutBitContext pb; int retry_count= 4097; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] proresenc_kostya: report buffer overflow
ffmpeg | branch: master | Christophe Gisquet | Mon Aug 11 22:06:08 2014 +| [52b81ff4635c077b2bc8b8d3637d933b6629d803] | committer: Michael Niedermayer proresenc_kostya: report buffer overflow If the allocated size, despite best efforts, is too small, exit with the appropriate error. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52b81ff4635c077b2bc8b8d3637d933b6629d803 --- libavcodec/proresenc_kostya.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 24cb333..a70ae3c 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -570,6 +570,11 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, quant); } total_size += sizes[i]; +if (put_bits_left(pb) < 0) { +av_log(avctx, AV_LOG_ERROR, "Serious underevaluation of" + "required buffer size"); +return AVERROR_BUFFER_TOO_SMALL; +} } return total_size; } @@ -940,9 +945,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; -pkt_size = ctx->frame_size_upper_bound + FF_MIN_BUFFER_SIZE; +pkt_size = ctx->frame_size_upper_bound; -if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0) +if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size + FF_MIN_BUFFER_SIZE)) < 0) return ret; orig_buf = pkt->data; @@ -1019,7 +1024,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, slice_hdr = buf; buf += slice_hdr_size - 1; init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8); -encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); +ret = encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); +if (ret < 0) +return ret; bytestream_put_byte(&slice_hdr, q); slice_size = slice_hdr_size + sizes[ctx->num_planes - 1]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] proresenc_kostya: remove unneeded parameters
ffmpeg | branch: master | Christophe Gisquet | Mon Aug 11 22:06:07 2014 +| [bf10f09bccdcfdb41b9f5bbae01d55961bfd0693] | committer: Michael Niedermayer proresenc_kostya: remove unneeded parameters Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bf10f09bccdcfdb41b9f5bbae01d55961bfd0693 --- libavcodec/proresenc_kostya.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 93bcde7..24cb333 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -471,7 +471,6 @@ static void put_alpha_run(PutBitContext *pb, int run) // todo alpha quantisation for high quants static int encode_alpha_plane(ProresContext *ctx, PutBitContext *pb, - const uint16_t *src, int linesize, int mbs_per_slice, uint16_t *blocks, int quant) { @@ -566,7 +565,7 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, get_alpha_data(ctx, src, linesize, xp, yp, pwidth, avctx->height / ctx->pictures_per_frame, ctx->blocks[0], mbs_per_slice, ctx->alpha_bits); -sizes[i] = encode_alpha_plane(ctx, pb, src, linesize, +sizes[i] = encode_alpha_plane(ctx, pb, mbs_per_slice, ctx->blocks[0], quant); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter: ported lenscorrection filter from frei0r
ffmpeg | branch: master | Daniel Oberhoff | Tue Aug 12 00:52:45 2014 +0200| [9f617a14a00805ffd54dee4fce34e3e4099d21f3] | committer: Michael Niedermayer avfilter: ported lenscorrection filter from frei0r Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f617a14a00805ffd54dee4fce34e3e4099d21f3 --- Changelog |1 + MAINTAINERS |1 + doc/filters.texi| 46 + libavfilter/Makefile|1 + libavfilter/allfilters.c|1 + libavfilter/vf_lenscorrection.c | 198 +++ 6 files changed, 248 insertions(+) diff --git a/Changelog b/Changelog index 25dd210..2a9619b 100644 --- a/Changelog +++ b/Changelog @@ -3,6 +3,7 @@ releases are sorted from youngest to oldest. version : - Icecast protocol +- ported lenscorrection filter from frei0r filter version 2.3: diff --git a/MAINTAINERS b/MAINTAINERS index c383d3f..6948e22 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -354,6 +354,7 @@ Filters: vf_histogram.cPaul B Mahol vf_hqx.c Clément Bœsch vf_il.c Paul B Mahol + vf_lenscorrection.c Daniel Oberhoff vf_mergeplanes.c Paul B Mahol vf_psnr.c Paul B Mahol vf_scale.cMichael Niedermayer diff --git a/doc/filters.texi b/doc/filters.texi index e0759fc..54b4451 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5546,6 +5546,51 @@ kerndeint=map=1 @end example @end itemize +@section lenscorrection + +Correct radial lens distortion + +This filter can be used to correct for radial distortion as can result from the use +of wide angle lenses, and thereby re-rectify the image. To find the right parameters +one can use tools available for example as part of opencv or simply trial-and-error. +To use opencv use the calibration sample (under samples/cpp) from the opencv sources +and extract the k1 and k2 coefficients from the resulting matrix. + +Note that effectively the same filter is available in the open-source tools Krita and +Digikam from the KDE project. + +In contrast to the @ref{vignette} filter, which can also be used to compensate lens errors, +this filter corrects the distortion of the image, whereas @ref{vignette} corrects the +brightness distribution, so you may want to use both filters together in certain +cases, though you will have to take care of ordering, i.e. whether vignetting should +be applied before or after lens correction. + +@subsection Options + +The filter accepts the following options: + +@table @option +@item cx +Relative x-coordinate of the focal point of the image, and thereby the center of the +distrortion. This value has a range [0,1] and is expressed as fractions of the image +width. +@item cy +Relative y-coordinate of the focal point of the image, and thereby the center of the +distrortion. This value has a range [0,1] and is expressed as fractions of the image +height. +@item k1 +Coefficient of the quadratic correction term. 0.5 means no correction. +@item k2 +Coefficient of the double quadratic correction term. 0.5 means no correction. +@end table + +The formula that generates the correction is: + +@var{r_src} = @var{r_tgt} * (1 + @var{k1} * (@var{r_tgt} / @var{r_0})^2 + @var{k2} * (@var{r_tgt} / @var{r_0})^4) + +where @var{r_0} is halve of the image diagonal and @var{r_src} and @var{r_tgt} are the +distances from the focal point in the source and target images, respectively. + @anchor{lut3d} @section lut3d @@ -8758,6 +8803,7 @@ For example, to vertically flip a video with @command{ffmpeg}: ffmpeg -i in.avi -vf "vflip" out.avi @end example +@anchor{vignette} @section vignette Make or reverse a natural vignetting effect. diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 0f54381..e9c8456 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -138,6 +138,7 @@ OBJS-$(CONFIG_IL_FILTER) += vf_il.o OBJS-$(CONFIG_INTERLACE_FILTER) += vf_interlace.o OBJS-$(CONFIG_INTERLEAVE_FILTER) += f_interleave.o OBJS-$(CONFIG_KERNDEINT_FILTER) += vf_kerndeint.o +OBJS-$(CONFIG_LENSCORRECTION_FILTER) += vf_lenscorrection.o OBJS-$(CONFIG_LUT3D_FILTER) += vf_lut3d.o OBJS-$(CONFIG_LUT_FILTER)+= vf_lut.o OBJS-$(CONFIG_LUTRGB_FILTER) += vf_lut.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 1877557..b1d6ff5 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -156,6 +156,7 @@ void avfilter_register_all(void) REGISTER_FILTER(INTERLACE, interlace, vf); REGISTER_FILTER(INTERLEAVE, interleave, vf); REGISTER_FILTER(KERNDEINT, kerndeint, vf); +REGISTER_FILTER(LENSCORRECTION, lenscorrectio
[FFmpeg-cvslog] lavu: rename ff_opencl_set_parameter() to avpriv_opencl_set_parameter()
ffmpeg | branch: master | James Almer | Mon Aug 11 16:35:39 2014 -0300| [744f15b6b3801dc008e767be0846bad55b62444f] | committer: Michael Niedermayer lavu: rename ff_opencl_set_parameter() to avpriv_opencl_set_parameter() It was wrongly being exported and used by libavfilter. Signed-off-by: James Almer Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=744f15b6b3801dc008e767be0846bad55b62444f --- libavfilter/deshake_opencl.c |4 ++-- libavfilter/unsharp_opencl.c |6 +++--- libavutil/opencl_internal.c |2 +- libavutil/opencl_internal.h |2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libavfilter/deshake_opencl.c b/libavfilter/deshake_opencl.c index c66103c..2821248 100644 --- a/libavfilter/deshake_opencl.c +++ b/libavfilter/deshake_opencl.c @@ -57,7 +57,7 @@ int ff_opencl_transform(AVFilterContext *ctx, av_log(ctx, AV_LOG_ERROR, "Selected interpolate method is invalid\n"); return AVERROR(EINVAL); } -ret = ff_opencl_set_parameter(¶m_lu, +ret = avpriv_opencl_set_parameter(¶m_lu, FF_OPENCL_PARAM_INFO(deshake->opencl_ctx.cl_inbuf), FF_OPENCL_PARAM_INFO(deshake->opencl_ctx.cl_outbuf), FF_OPENCL_PARAM_INFO(packed_matrix_lu), @@ -70,7 +70,7 @@ int ff_opencl_transform(AVFilterContext *ctx, NULL); if (ret < 0) return ret; -ret = ff_opencl_set_parameter(¶m_ch, +ret = avpriv_opencl_set_parameter(¶m_ch, FF_OPENCL_PARAM_INFO(deshake->opencl_ctx.cl_inbuf), FF_OPENCL_PARAM_INFO(deshake->opencl_ctx.cl_outbuf), FF_OPENCL_PARAM_INFO(packed_matrix_ch), diff --git a/libavfilter/unsharp_opencl.c b/libavfilter/unsharp_opencl.c index e619cef..5c6b5ef 100644 --- a/libavfilter/unsharp_opencl.c +++ b/libavfilter/unsharp_opencl.c @@ -181,7 +181,7 @@ int ff_opencl_apply_unsharp(AVFilterContext *ctx, AVFrame *in, AVFrame *out) kernel1.ctx = ctx; kernel1.kernel = unsharp->opencl_ctx.kernel_luma; -ret = ff_opencl_set_parameter(&kernel1, +ret = avpriv_opencl_set_parameter(&kernel1, FF_OPENCL_PARAM_INFO(unsharp->opencl_ctx.cl_inbuf), FF_OPENCL_PARAM_INFO(unsharp->opencl_ctx.cl_outbuf), FF_OPENCL_PARAM_INFO(unsharp->opencl_ctx.cl_luma_mask), @@ -198,7 +198,7 @@ int ff_opencl_apply_unsharp(AVFilterContext *ctx, AVFrame *in, AVFrame *out) kernel2.ctx = ctx; kernel2.kernel = unsharp->opencl_ctx.kernel_chroma; -ret = ff_opencl_set_parameter(&kernel2, +ret = avpriv_opencl_set_parameter(&kernel2, FF_OPENCL_PARAM_INFO(unsharp->opencl_ctx.cl_inbuf), FF_OPENCL_PARAM_INFO(unsharp->opencl_ctx.cl_outbuf), FF_OPENCL_PARAM_INFO(unsharp->opencl_ctx.cl_chroma_mask), @@ -230,7 +230,7 @@ int ff_opencl_apply_unsharp(AVFilterContext *ctx, AVFrame *in, AVFrame *out) kernel1.ctx = ctx; kernel1.kernel = unsharp->opencl_ctx.kernel_default; -ret = ff_opencl_set_parameter(&kernel1, +ret = avpriv_opencl_set_parameter(&kernel1, FF_OPENCL_PARAM_INFO(unsharp->opencl_ctx.cl_inbuf), FF_OPENCL_PARAM_INFO(unsharp->opencl_ctx.cl_outbuf), FF_OPENCL_PARAM_INFO(unsharp->opencl_ctx.cl_luma_mask), diff --git a/libavutil/opencl_internal.c b/libavutil/opencl_internal.c index 3d996ab..bdb4193 100644 --- a/libavutil/opencl_internal.c +++ b/libavutil/opencl_internal.c @@ -23,7 +23,7 @@ #include "opencl_internal.h" #include "libavutil/log.h" -int ff_opencl_set_parameter(FFOpenclParam *opencl_param, ...) +int avpriv_opencl_set_parameter(FFOpenclParam *opencl_param, ...) { int ret = 0; va_list arg_ptr; diff --git a/libavutil/opencl_internal.h b/libavutil/opencl_internal.h index 34b39a0..dacd930 100644 --- a/libavutil/opencl_internal.h +++ b/libavutil/opencl_internal.h @@ -30,4 +30,4 @@ typedef struct { void *ctx; } FFOpenclParam; -int ff_opencl_set_parameter(FFOpenclParam *opencl_param, ...); +int avpriv_opencl_set_parameter(FFOpenclParam *opencl_param, ...); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavu: stop exporting internal functions
ffmpeg | branch: master | James Almer | Sat Aug 9 21:04:35 2014 -0300| [d6711ee648f840c446e729a4f07d67ea229192a5] | committer: Michael Niedermayer lavu: stop exporting internal functions Signed-off-by: James Almer Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d6711ee648f840c446e729a4f07d67ea229192a5 --- libavutil/libavutil.v |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/libavutil.v b/libavutil/libavutil.v index eb16ae1..e9f04cb 100644 --- a/libavutil/libavutil.v +++ b/libavutil/libavutil.v @@ -1,4 +1,4 @@ LIBAVUTIL_$MAJOR { -global: av*; ff_*; +global: av*; local: *; }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] proresenc_kostya: remove unneeded parameters
ffmpeg | branch: release/2.2 | Christophe Gisquet | Mon Aug 11 22:06:07 2014 +| [7740b111dd9af46ea52b3af60e59fdbd40250b31] | committer: Michael Niedermayer proresenc_kostya: remove unneeded parameters Signed-off-by: Michael Niedermayer (cherry picked from commit bf10f09bccdcfdb41b9f5bbae01d55961bfd0693) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7740b111dd9af46ea52b3af60e59fdbd40250b31 --- libavcodec/proresenc_kostya.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index ea1fd8a..e60f227 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -472,7 +472,6 @@ static void put_alpha_run(PutBitContext *pb, int run) // todo alpha quantisation for high quants static int encode_alpha_plane(ProresContext *ctx, PutBitContext *pb, - const uint16_t *src, int linesize, int mbs_per_slice, uint16_t *blocks, int quant) { @@ -567,7 +566,7 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, get_alpha_data(ctx, src, linesize, xp, yp, pwidth, avctx->height / ctx->pictures_per_frame, ctx->blocks[0], mbs_per_slice, ctx->alpha_bits); -sizes[i] = encode_alpha_plane(ctx, pb, src, linesize, +sizes[i] = encode_alpha_plane(ctx, pb, mbs_per_slice, ctx->blocks[0], quant); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] proresenc_kostya: report buffer overflow
ffmpeg | branch: release/2.2 | Christophe Gisquet | Mon Aug 11 22:06:08 2014 +| [1ad1723c24cd2683df6d00a83b6f28d3ff45fb96] | committer: Michael Niedermayer proresenc_kostya: report buffer overflow If the allocated size, despite best efforts, is too small, exit with the appropriate error. Signed-off-by: Michael Niedermayer (cherry picked from commit 52b81ff4635c077b2bc8b8d3637d933b6629d803) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ad1723c24cd2683df6d00a83b6f28d3ff45fb96 --- libavcodec/proresenc_kostya.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index e60f227..aac4b07 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -571,6 +571,11 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, quant); } total_size += sizes[i]; +if (put_bits_left(pb) < 0) { +av_log(avctx, AV_LOG_ERROR, "Serious underevaluation of" + "required buffer size"); +return AVERROR_BUFFER_TOO_SMALL; +} } return total_size; } @@ -941,9 +946,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; -pkt_size = ctx->frame_size_upper_bound + FF_MIN_BUFFER_SIZE; +pkt_size = ctx->frame_size_upper_bound; -if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0) +if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size + FF_MIN_BUFFER_SIZE)) < 0) return ret; orig_buf = pkt->data; @@ -1020,7 +1025,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, slice_hdr = buf; buf += slice_hdr_size - 1; init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8); -encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); +ret = encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice); +if (ret < 0) +return ret; bytestream_put_byte(&slice_hdr, q); slice_size = slice_hdr_size + sizes[ctx->num_planes - 1]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Changelog: add entry for proresenc
ffmpeg | branch: release/2.2 | Michael Niedermayer | Tue Aug 12 05:18:21 2014 +0200| [49fa398858df1a1e425740672de5fb4819b4d947] | committer: Michael Niedermayer Changelog: add entry for proresenc > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49fa398858df1a1e425740672de5fb4819b4d947 --- Changelog |1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 1339a7b..94c3a15 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ version 2.2.7 - snow: fix null pointer dereference - iff: fix out of array access - svq1dec: fix input data corruption +- proresenc_ks: check buffer size version 2.2.6 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Tag n2.2.7 : FFmpeg 2.2.7 release
[ffmpeg] [branch: refs/tags/n2.2.7] Tag:a7a6ada2b48cf47bb7710ffeb6c0de2d440618e5 > http://git.videolan.org/gitweb.cgi/ffmpeg.git?a=tag;h=a7a6ada2b48cf47bb7710ffeb6c0de2d440618e5 Tagger: Michael Niedermayer Date: Tue Aug 12 05:18:47 2014 +0200 FFmpeg 2.2.7 release ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] [ffmpeg-web] branch master updated. e4705d7 web/download: add FFmpeg 2.2.7
The branch, master has been updated via e4705d755ee9dc8b2a5614de51d0ad4366895299 (commit) from d0b653c7c55d071f97385dd9320a561ae2acad42 (commit) - Log - commit e4705d755ee9dc8b2a5614de51d0ad4366895299 Author: Michael Niedermayer AuthorDate: Tue Aug 12 05:34:21 2014 +0200 Commit: Michael Niedermayer CommitDate: Tue Aug 12 05:34:21 2014 +0200 web/download: add FFmpeg 2.2.7 diff --git a/src/download b/src/download index 0bc90e7..ca744eb 100644 --- a/src/download +++ b/src/download @@ -292,10 +292,10 @@ libpostproc52. 3.100 -FFmpeg 2.2.6 "Muybridge" +FFmpeg 2.2.7 "Muybridge" -2.2.6 was released on 2014-08-05. It is the latest stable FFmpeg release +2.2.7 was released on 2014-08-12. It is the latest stable FFmpeg release from the 2.2 release branch, which was cut from master on 2014-03-01. Amongst lots of other changes, it includes all changes from ffmpeg-mt, libav master of 2014-03-01, libav 10.3 as of 2014-08-04. @@ -315,15 +315,15 @@ libpostproc52. 3.100 - Download bzip2 tarball - PGP signature + Download bzip2 tarball + PGP signature - Download gzip tarball - PGP signature + Download gzip tarball + PGP signature - http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n2.2.6";>Changelog + http://git.videolan.org/?p=ffmpeg.git;a=shortlog;h=n2.2.7";>Changelog --- Summary of changes: src/download | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) hooks/post-receive -- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog