[FFmpeg-cvslog] avformat/mpegts: fix Opus stream count
ffmpeg | branch: master | Rafaël Carré | Fri Dec 5 14:33:58 2014 +0100| [57bfafe76be58c269ce1c12d30e0e2dc8ae2249b] | committer: Michael Niedermayer avformat/mpegts: fix Opus stream count That number represents the number of streams, not the number of channels Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57bfafe76be58c269ce1c12d30e0e2dc8ae2249b --- libavformat/mpegts.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 97da0a3..f4250c8 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1758,10 +1758,9 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type if (channel_config_code <= 0x8) { st->codec->extradata[9] = channels = channel_config_code ? channel_config_code : 2; st->codec->extradata[18] = channels > 2; -st->codec->extradata[19] = channel_config_code; +st->codec->extradata[19] = channels - opus_coupled_stream_cnt[channel_config_code]; if (channel_config_code == 0) { /* Dual Mono */ st->codec->extradata[18] = 255; /* Mapping */ -st->codec->extradata[19] = 2; /* Stream Count */ } st->codec->extradata[20] = opus_coupled_stream_cnt[channel_config_code]; memcpy(&st->codec->extradata[21], opus_channel_map[channels - 1], channels); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/examples/filtering_video: fix frame rate
ffmpeg | branch: master | Piotr Fusik | Fri Dec 5 15:47:05 2014 +0100| [c99e5191ab846d4897dfc565ba446ec960e04aa9] | committer: Michael Niedermayer doc/examples/filtering_video: fix frame rate Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c99e5191ab846d4897dfc565ba446ec960e04aa9 --- doc/examples/filtering_video.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c index 8d59573..601c3d8 100644 --- a/doc/examples/filtering_video.c +++ b/doc/examples/filtering_video.c @@ -90,6 +90,7 @@ static int init_filters(const char *filters_descr) AVFilter *buffersink = avfilter_get_by_name("buffersink"); AVFilterInOut *outputs = avfilter_inout_alloc(); AVFilterInOut *inputs = avfilter_inout_alloc(); +AVRational time_base = fmt_ctx->streams[video_stream_index]->time_base; enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }; filter_graph = avfilter_graph_alloc(); @@ -102,7 +103,7 @@ static int init_filters(const char *filters_descr) snprintf(args, sizeof(args), "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt, -dec_ctx->time_base.num, dec_ctx->time_base.den, +time_base.num, time_base.den, dec_ctx->sample_aspect_ratio.num, dec_ctx->sample_aspect_ratio.den); ret = avfilter_graph_create_filter(&buffersrc_ctx, buffersrc, "in", ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/dvbsubdec: Pass context to av_log()
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 20:30:03 2014 +0100| [4ba01419215c335e68e6b4fe448f416283bb55ff] | committer: Michael Niedermayer avcodec/dvbsubdec: Pass context to av_log() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ba01419215c335e68e6b4fe448f416283bb55ff --- libavcodec/dvbsubdec.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index 261e161..a58b9b4 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -468,7 +468,8 @@ static av_cold int dvbsub_close_decoder(AVCodecContext *avctx) return 0; } -static int dvbsub_read_2bit_string(uint8_t *destbuf, int dbuf_len, +static int dvbsub_read_2bit_string(AVCodecContext *avctx, + uint8_t *destbuf, int dbuf_len, const uint8_t **srcbuf, int buf_size, int non_mod, uint8_t *map_table, int x_pos) { @@ -568,14 +569,14 @@ static int dvbsub_read_2bit_string(uint8_t *destbuf, int dbuf_len, } if (get_bits(&gb, 6)) -av_log(0, AV_LOG_ERROR, "DVBSub error: line overflow\n"); +av_log(avctx, AV_LOG_ERROR, "DVBSub error: line overflow\n"); (*srcbuf) += (get_bits_count(&gb) + 7) >> 3; return pixels_read; } -static int dvbsub_read_4bit_string(uint8_t *destbuf, int dbuf_len, +static int dvbsub_read_4bit_string(AVCodecContext *avctx, uint8_t *destbuf, int dbuf_len, const uint8_t **srcbuf, int buf_size, int non_mod, uint8_t *map_table, int x_pos) { @@ -691,14 +692,15 @@ static int dvbsub_read_4bit_string(uint8_t *destbuf, int dbuf_len, } if (get_bits(&gb, 8)) -av_log(0, AV_LOG_ERROR, "DVBSub error: line overflow\n"); +av_log(avctx, AV_LOG_ERROR, "DVBSub error: line overflow\n"); (*srcbuf) += (get_bits_count(&gb) + 7) >> 3; return pixels_read; } -static int dvbsub_read_8bit_string(uint8_t *destbuf, int dbuf_len, +static int dvbsub_read_8bit_string(AVCodecContext *avctx, + uint8_t *destbuf, int dbuf_len, const uint8_t **srcbuf, int buf_size, int non_mod, uint8_t *map_table, int x_pos) { @@ -746,7 +748,7 @@ static int dvbsub_read_8bit_string(uint8_t *destbuf, int dbuf_len, } if (*(*srcbuf)++) -av_log(0, AV_LOG_ERROR, "DVBSub error: line overflow\n"); +av_log(avctx, AV_LOG_ERROR, "DVBSub error: line overflow\n"); return pixels_read; } @@ -933,7 +935,7 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis else map_table = NULL; -x_pos = dvbsub_read_2bit_string(pbuf + (y_pos * region->width), +x_pos = dvbsub_read_2bit_string(avctx, pbuf + (y_pos * region->width), region->width, &buf, buf_end - buf, non_mod, map_table, x_pos); break; @@ -948,7 +950,7 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis else map_table = NULL; -x_pos = dvbsub_read_4bit_string(pbuf + (y_pos * region->width), +x_pos = dvbsub_read_4bit_string(avctx, pbuf + (y_pos * region->width), region->width, &buf, buf_end - buf, non_mod, map_table, x_pos); break; @@ -958,7 +960,7 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis return; } -x_pos = dvbsub_read_8bit_string(pbuf + (y_pos * region->width), +x_pos = dvbsub_read_8bit_string(avctx, pbuf + (y_pos * region->width), region->width, &buf, buf_end - buf, non_mod, NULL, x_pos); break; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/golomb: use NULL for pointers instead of 0
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 20:27:04 2014 +0100| [b0ae362a21bb3f235c4b2cf6c7abc892fa1fbecd] | committer: Michael Niedermayer avcodec/golomb: use NULL for pointers instead of 0 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0ae362a21bb3f235c4b2cf6c7abc892fa1fbecd --- libavcodec/golomb.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 81d8aee..c4b1354 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -69,7 +69,7 @@ static inline int get_ue_golomb(GetBitContext *gb) LAST_SKIP_BITS(re, gb, 32 - log); CLOSE_READER(re, gb); if (CONFIG_FTRAPV && log < 0) { -av_log(0, AV_LOG_ERROR, "Invalid UE golomb code\n"); +av_log(NULL, AV_LOG_ERROR, "Invalid UE golomb code\n"); return AVERROR_INVALIDDATA; } buf >>= log; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '56de2897a68e3a8795b0b3c593dad1c5832696e0'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 21:39:41 2014 +0100| [7a64f1684178169e38865b38b146f737142f0ba2] | committer: Michael Niedermayer Merge commit '56de2897a68e3a8795b0b3c593dad1c5832696e0' * commit '56de2897a68e3a8795b0b3c593dad1c5832696e0': h264: Fix memory leak on ff_h264_decode_init() failure Conflicts: libavcodec/h264.c See: 309a931a38b42c0a635f096cdbea9c21c5e54eab Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a64f1684178169e38865b38b146f737142f0ba2 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'd69d787dad77f62c89cbc7ea5d301641f45f36e3'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 21:41:53 2014 +0100| [47c066f22e68fa3cee74c3917d331d34c983ca2a] | committer: Michael Niedermayer Merge commit 'd69d787dad77f62c89cbc7ea5d301641f45f36e3' * commit 'd69d787dad77f62c89cbc7ea5d301641f45f36e3': h264: proper cleanup in ff_h264_alloc_tables() if DPB alloc fails See: 949057c95879e601bd33c8a42eeca39ced2b9a2d Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=47c066f22e68fa3cee74c3917d331d34c983ca2a --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] h264: proper cleanup in ff_h264_alloc_tables() if DPB alloc fails
ffmpeg | branch: master | Michael Niedermayer | Tue Dec 2 16:47:56 2014 +| [d69d787dad77f62c89cbc7ea5d301641f45f36e3] | committer: Vittorio Giovara h264: proper cleanup in ff_h264_alloc_tables() if DPB alloc fails CC: libav-de...@libav.org > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d69d787dad77f62c89cbc7ea5d301641f45f36e3 --- libavcodec/h264.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index cb29d36..67c7eef 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -449,7 +449,7 @@ int ff_h264_alloc_tables(H264Context *h) if (!h->DPB) { h->DPB = av_mallocz_array(H264_MAX_PICTURE_COUNT, sizeof(*h->DPB)); if (!h->DPB) -return AVERROR(ENOMEM); +goto fail; for (i = 0; i < H264_MAX_PICTURE_COUNT; i++) av_frame_unref(&h->DPB[i].f); av_frame_unref(&h->cur_pic.f); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] h264: Fix memory leak on ff_h264_decode_init() failure
ffmpeg | branch: master | Dale Curtis | Tue Dec 2 16:47:55 2014 +| [56de2897a68e3a8795b0b3c593dad1c5832696e0] | committer: Vittorio Giovara h264: Fix memory leak on ff_h264_decode_init() failure CC: libav-de...@libav.org > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=56de2897a68e3a8795b0b3c593dad1c5832696e0 --- libavcodec/h264.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index a392054..cb29d36 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -662,8 +662,10 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) if (avctx->extradata_size > 0 && avctx->extradata) { ret = ff_h264_decode_extradata(h); - if (ret < 0) + if (ret < 0) { + ff_h264_free_context(h); return ret; + } } if (h->sps.bitstream_restriction_flag && ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] exr: Add a gamma flag to exr loader to avoid banding
ffmpeg | branch: master | Gonzalo Garramuno | Tue Dec 2 16:48:25 2014 +| [e0bb74a1403ed77ef369b9d62866f8a4afaf3f1d] | committer: Vittorio Giovara exr: Add a gamma flag to exr loader to avoid banding This is needed to avoid banding artifacts when gammaing the picture. Currently, if done with a video filter, the process is done on uints instead of full float. Signed-off-by: Vittorio Giovara > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e0bb74a1403ed77ef369b9d62866f8a4afaf3f1d --- libavcodec/exr.c | 117 ++ 1 file changed, 110 insertions(+), 7 deletions(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 4aa6eaf..327a60e 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -27,12 +27,15 @@ * For more information on the OpenEXR format, visit: * http://openexr.com/ * - * exr_flt2uint() and exr_halflt2uint() is credited to Reimar Döffinger + * exr_flt2uint() and exr_halflt2uint() is credited to Reimar Döffinger. + * exr_half2float() is credited to Aaftab Munshi, Dan Ginsburg, Dave Shreiner. */ +#include #include #include "libavutil/imgutils.h" +#include "libavutil/intfloat.h" #include "libavutil/opt.h" #include "avcodec.h" @@ -106,8 +109,74 @@ typedef struct EXRContext { EXRThreadData *thread_data; const char *layer; + +float gamma; +uint16_t gamma_table[65536]; } EXRContext; +/* -15 stored using a single precision bias of 127 */ +#define HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP 0x3800 + +/* max exponent value in single precision that will be converted + * to Inf or Nan when stored as a half-float */ +#define HALF_FLOAT_MAX_BIASED_EXP_AS_SINGLE_FP_EXP 0x4780 + +/* 255 is the max exponent biased value */ +#define FLOAT_MAX_BIASED_EXP (0xFF << 23) + +#define HALF_FLOAT_MAX_BIASED_EXP (0x1F << 10) + +/** + * Convert a half float as a uint16_t into a full float. + * + * @param hf half float as uint16_t + * + * @return float value + */ +static union av_intfloat32 exr_half2float(uint16_t hf) +{ +unsigned int sign = (unsigned int) (hf >> 15); +unsigned int mantissa = (unsigned int) (hf & ((1 << 10) - 1)); +unsigned int exp = (unsigned int) (hf & HALF_FLOAT_MAX_BIASED_EXP); +union av_intfloat32 f; + +if (exp == HALF_FLOAT_MAX_BIASED_EXP) { +// we have a half-float NaN or Inf +// half-float NaNs will be converted to a single precision NaN +// half-float Infs will be converted to a single precision Inf +exp = FLOAT_MAX_BIASED_EXP; +if (mantissa) +mantissa = (1 << 23) - 1;// set all bits to indicate a NaN +} else if (exp == 0x0) { +// convert half-float zero/denorm to single precision value +if (mantissa) { +mantissa <<= 1; +exp = HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP; +// check for leading 1 in denorm mantissa +while ((mantissa & (1 << 10))) { +// for every leading 0, decrement single precision exponent by 1 +// and shift half-float mantissa value to the left +mantissa <<= 1; +exp -= (1 << 23); +} +// clamp the mantissa to 10-bits +mantissa &= ((1 << 10) - 1); +// shift left to generate single-precision mantissa of 23-bits +mantissa <<= 13; +} +} else { +// shift left to generate single-precision mantissa of 23-bits +mantissa <<= 13; +// generate single precision biased exponent value +exp = (exp << 13) + HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP; +} + +f.i = (sign << 31) | exp | mantissa; + +return f; +} + + /** * Convert from 32-bit float as uint32_t to uint16_t. * @@ -772,6 +841,7 @@ static int decode_block(AVCodecContext *avctx, void *tdata, int axmax = (avctx->width - (s->xmax + 1)) * 2 * s->desc->nb_components; int bxmin = s->xmin * 2 * s->desc->nb_components; int i, x, buf_size = s->buf_size; +float one_gamma = 1.0f / s->gamma; int ret; line_offset = AV_RL64(s->gb.buffer + jobnr * 8); @@ -852,18 +922,30 @@ static int decode_block(AVCodecContext *avctx, void *tdata, if (s->pixel_type == EXR_FLOAT) { // 32-bit for (x = 0; x < xdelta; x++) { -*ptr_x++ = exr_flt2uint(bytestream_get_le32(&r)); -*ptr_x++ = exr_flt2uint(bytestream_get_le32(&g)); -*ptr_x++ = exr_flt2uint(bytestream_get_le32(&b)); +union av_intfloat32 t; +t.i = bytestream_get_le32(&r); +if (t.f > 0.0f) /* avoid negative values */ +t.f = powf(t.f, one_gamma); +*ptr_x++ = exr_flt2uint(t.i); + +t.i = bytestream_get_le32(&g); +if (t.f > 0.0f) +t.f = powf(t.f, one_gamma); +*ptr_x++ = exr_flt2uint(t.i); + +t.i
[FFmpeg-cvslog] Merge commit 'e0bb74a1403ed77ef369b9d62866f8a4afaf3f1d'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 21:55:44 2014 +0100| [81f116d31cca87fa7e041e19eb944f489befd7bc] | committer: Michael Niedermayer Merge commit 'e0bb74a1403ed77ef369b9d62866f8a4afaf3f1d' * commit 'e0bb74a1403ed77ef369b9d62866f8a4afaf3f1d': exr: Add a gamma flag to exr loader to avoid banding Conflicts: libavcodec/exr.c See: cd3daad77ea420f3373d3c5feee46825d235 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=81f116d31cca87fa7e041e19eb944f489befd7bc --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'b56afb48aecb96e03347f5b569f16a64147c18b1'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 22:07:21 2014 +0100| [bcc43de51f37013621934991086a5d6dcb94f493] | committer: Michael Niedermayer Merge commit 'b56afb48aecb96e03347f5b569f16a64147c18b1' * commit 'b56afb48aecb96e03347f5b569f16a64147c18b1': mpeg12dec: Print error/warning messages on issues in mpeg1_decode_sequence() Conflicts: libavcodec/mpeg12dec.c See: 88b4c1a7316cf47f68bf04accf613375b7326992 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bcc43de51f37013621934991086a5d6dcb94f493 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mpeg12dec: Print error/warning messages on issues in mpeg1_decode_sequence ()
ffmpeg | branch: master | Michael Niedermayer | Mon Nov 24 17:04:58 2014 +| [b56afb48aecb96e03347f5b569f16a64147c18b1] | committer: Vittorio Giovara mpeg12dec: Print error/warning messages on issues in mpeg1_decode_sequence() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b56afb48aecb96e03347f5b569f16a64147c18b1 --- libavcodec/mpeg12dec.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index b66bdc1..c7ee5ae 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -2082,11 +2082,16 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, return -1; } s->frame_rate_index = get_bits(&s->gb, 4); -if (s->frame_rate_index == 0 || s->frame_rate_index > 13) +if (s->frame_rate_index == 0 || s->frame_rate_index > 13) { +av_log(avctx, AV_LOG_WARNING, + "frame_rate_index %d is invalid\n", s->frame_rate_index); return -1; +} s->bit_rate = get_bits(&s->gb, 18) * 400; -if (get_bits1(&s->gb) == 0) /* marker */ +if (get_bits1(&s->gb) == 0) { /* marker */ +av_log(avctx, AV_LOG_ERROR, "Marker in sequence header missing\n"); return -1; +} s->width = width; s->height = height; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '3a56bcee7cb7549b2813e39ce3bee3b7c522aecb'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 22:19:55 2014 +0100| [9d921cce4f5501e4c507cc921f76a283bee39d09] | committer: Michael Niedermayer Merge commit '3a56bcee7cb7549b2813e39ce3bee3b7c522aecb' * commit '3a56bcee7cb7549b2813e39ce3bee3b7c522aecb': mpeg12dec: Use more specific error codes Conflicts: libavcodec/mpeg12dec.c See: 1852b2a0f497d3c5437d5b50379d7874fc8c285a Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9d921cce4f5501e4c507cc921f76a283bee39d09 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mpeg12dec: Use more specific error codes
ffmpeg | branch: master | Michael Niedermayer | Mon Nov 24 17:05:00 2014 +| [3a56bcee7cb7549b2813e39ce3bee3b7c522aecb] | committer: Vittorio Giovara mpeg12dec: Use more specific error codes Signed-off-by: Vittorio Giovara > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3a56bcee7cb7549b2813e39ce3bee3b7c522aecb --- libavcodec/mpeg12dec.c | 102 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index c7ee5ae..1bf51f0 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -149,7 +149,7 @@ static inline int mpeg1_decode_block_intra(MpegEncContext *s, component = (n <= 3 ? 0 : n - 4 + 1); diff = decode_dc(&s->gb, component); if (diff >= 0x) -return -1; +return AVERROR_INVALIDDATA; dc = s->last_dc[component]; dc += diff; s->last_dc[component] = dc; @@ -545,7 +545,7 @@ static inline int mpeg2_decode_block_intra(MpegEncContext *s, } diff = decode_dc(&s->gb, component); if (diff >= 0x) -return -1; +return AVERROR_INVALIDDATA; dc = s->last_dc[component]; dc += diff; s->last_dc[component] = dc; @@ -625,7 +625,7 @@ static inline int mpeg2_fast_decode_block_intra(MpegEncContext *s, } diff = decode_dc(&s->gb, component); if (diff >= 0x) -return -1; +return AVERROR_INVALIDDATA; dc = s->last_dc[component]; dc += diff; s->last_dc[component] = dc; @@ -711,6 +711,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) { int i, j, k, cbp, val, mb_type, motion_type; const int mb_block_count = 4 + (1 << s->chroma_format); +int ret; av_dlog(s->avctx, "decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y); @@ -730,7 +731,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) // FIXME not sure if this is allowed in MPEG at all mb_type = s->current_picture.mb_type[s->mb_width + (s->mb_y - 1) * s->mb_stride - 1]; if (IS_INTRA(mb_type)) -return -1; +return AVERROR_INVALIDDATA; s->current_picture.mb_type[s->mb_x + s->mb_y * s->mb_stride] = mb_type | MB_TYPE_SKIP; //assert(s->current_picture.mb_type[s->mb_x + s->mb_y * s->mb_stride - 1] & (MB_TYPE_16x16 | MB_TYPE_16x8)); @@ -750,7 +751,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in I Frame at %d %d\n", s->mb_x, s->mb_y); -return -1; +return AVERROR_INVALIDDATA; } mb_type = MB_TYPE_QUANT | MB_TYPE_INTRA; } else { @@ -762,7 +763,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) if (mb_type < 0) { av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in P Frame at %d %d\n", s->mb_x, s->mb_y); -return -1; +return AVERROR_INVALIDDATA; } mb_type = ptype2mb_type[mb_type]; break; @@ -771,7 +772,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) if (mb_type < 0) { av_log(s->avctx, AV_LOG_ERROR, "invalid mb type in B Frame at %d %d\n", s->mb_x, s->mb_y); -return -1; +return AVERROR_INVALIDDATA; } mb_type = btype2mb_type[mb_type]; break; @@ -827,13 +828,13 @@ FF_ENABLE_DEPRECATION_WARNINGS mpeg2_fast_decode_block_intra(s, *s->pblocks[i], i); } else { for (i = 0; i < mb_block_count; i++) -if (mpeg2_decode_block_intra(s, *s->pblocks[i], i) < 0) -return -1; +if ((ret = mpeg2_decode_block_intra(s, *s->pblocks[i], i)) < 0) +return ret; } } else { for (i = 0; i < 6; i++) -if (mpeg1_decode_block_intra(s, *s->pblocks[i], i) < 0) -return -1; +if ((ret = mpeg1_decode_block_intra(s, *s->pblocks[i], i)) < 0) +return ret; } } else { if (mb_type & MB_TYPE_ZERO_MV) { @@ -1011,7 +1012,7 @@ FF_ENABLE_DEPRECATION_WARNINGS default: av_log(s->avctx, AV_LOG_ERROR, "00 motion_type at %d %d\n", s->mb_x, s->mb_y); -return -1; +return AVERROR_INVALIDDATA; } } @@ -1028,7 +1029,7 @@ FF_ENABLE_DEPRECATION_WARNINGS if (cbp <= 0) { av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y); -return -1; +return AVERROR_INVALIDDATA; } #if FF_
[FFmpeg-cvslog] mpegvideo: replace assert about interlaced EC with debug av_log()
ffmpeg | branch: master | Michael Niedermayer | Mon Nov 24 17:05:02 2014 +| [c45eeb2dbf42382d335da8068231a8026c08843b] | committer: Vittorio Giovara mpegvideo: replace assert about interlaced EC with debug av_log() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c45eeb2dbf42382d335da8068231a8026c08843b --- libavcodec/mpegvideo.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index da9f24f..2a46a68 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -370,7 +370,9 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type, s->dest[1] = s->current_picture.f->data[1] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift); s->dest[2] = s->current_picture.f->data[2] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift); -assert(ref == 0); +if (ref) +av_log(s->avctx, AV_LOG_DEBUG, + "Interlaced error concealment is not fully implemented\n"); ff_mpv_decode_mb(s, s->block); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'c45eeb2dbf42382d335da8068231a8026c08843b'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 22:46:46 2014 +0100| [9222a176e14847a8751e8d799799573e652550ad] | committer: Michael Niedermayer Merge commit 'c45eeb2dbf42382d335da8068231a8026c08843b' * commit 'c45eeb2dbf42382d335da8068231a8026c08843b': mpegvideo: replace assert about interlaced EC with debug av_log() Conflicts: libavcodec/mpegvideo.c See: c88bbc01eb7f67f7399fb89800bf1bfc89edb248 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9222a176e14847a8751e8d799799573e652550ad --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mpegvideo: exit cleanly when ff_mpv_common_frame_size_change() fails
ffmpeg | branch: master | Michael Niedermayer | Mon Nov 24 17:05:04 2014 +| [894545cb717427a47f800dc7738b923afde139a6] | committer: Vittorio Giovara mpegvideo: exit cleanly when ff_mpv_common_frame_size_change() fails Signed-off-by: Vittorio Giovara > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=894545cb717427a47f800dc7738b923afde139a6 --- libavcodec/mpegvideo.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 868f715..e6a48cd 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1436,8 +1436,8 @@ int ff_mpv_common_frame_size_change(MpegEncContext *s) s->mb_height = (s->height + 15) / 16; if ((s->width || s->height) && -av_image_check_size(s->width, s->height, 0, s->avctx)) -return AVERROR_INVALIDDATA; +(err = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0) +goto fail; if ((err = init_context_frame(s))) goto fail; @@ -1453,7 +1453,7 @@ int ff_mpv_common_frame_size_change(MpegEncContext *s) } for (i = 0; i < nb_slices; i++) { -if (init_duplicate_context(s->thread_context[i]) < 0) +if ((err = init_duplicate_context(s->thread_context[i])) < 0) goto fail; s->thread_context[i]->start_mb_y = (s->mb_height * (i) + nb_slices / 2) / nb_slices; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '894545cb717427a47f800dc7738b923afde139a6'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 23:07:47 2014 +0100| [d94a475c59e9ea871b7dc783acf6ccd5eca84339] | committer: Michael Niedermayer Merge commit '894545cb717427a47f800dc7738b923afde139a6' * commit '894545cb717427a47f800dc7738b923afde139a6': mpegvideo: exit cleanly when ff_mpv_common_frame_size_change() fails See: cfce6f7efd28130bf0dd409b2367ca0f8c9b2417 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d94a475c59e9ea871b7dc783acf6ccd5eca84339 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mpegvideo: free_context_frame() cannot fail, make it return void
ffmpeg | branch: master | Michael Niedermayer | Mon Nov 24 17:05:03 2014 +| [7a38987f245e3c280d81442f207b98b6233c] | committer: Vittorio Giovara mpegvideo: free_context_frame() cannot fail, make it return void Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a38987f245e3c280d81442f207b98b6233c --- libavcodec/mpegvideo.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 2a46a68..868f715 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1356,7 +1356,7 @@ av_cold int ff_mpv_common_init(MpegEncContext *s) * Is used during resolution changes to avoid a full reinitialization of the * codec. */ -static int free_context_frame(MpegEncContext *s) +static void free_context_frame(MpegEncContext *s) { int i, j, k; @@ -1402,8 +1402,6 @@ static int free_context_frame(MpegEncContext *s) av_freep(&s->bits_tab); s->linesize = s->uvlinesize = 0; - -return 0; } int ff_mpv_common_frame_size_change(MpegEncContext *s) @@ -1420,8 +1418,7 @@ int ff_mpv_common_frame_size_change(MpegEncContext *s) } else free_duplicate_context(s); -if ((err = free_context_frame(s)) < 0) -return err; +free_context_frame(s); if (s->picture) for (i = 0; i < MAX_PICTURE_COUNT; i++) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '7a38987f245e3c280d81442f207b983333b6233c'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 23:06:36 2014 +0100| [2e59e6ff682dcc77f992758ea503f81b5fc6e858] | committer: Michael Niedermayer Merge commit '7a38987f245e3c280d81442f207b98b6233c' * commit '7a38987f245e3c280d81442f207b98b6233c': mpegvideo: free_context_frame() cannot fail, make it return void See: 94c61cd9aede4c0b57632d524a725c2dda719eb3 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e59e6ff682dcc77f992758ea503f81b5fc6e858 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '69c1fe7c9c9bc85eebfc02c6a19caf7e88cd74ff'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 23:23:25 2014 +0100| [95f719fb8f475523d29f93a7e321a6db9f837631] | committer: Michael Niedermayer Merge commit '69c1fe7c9c9bc85eebfc02c6a19caf7e88cd74ff' * commit '69c1fe7c9c9bc85eebfc02c6a19caf7e88cd74ff': mkv: Validate ASS Start and End fields Conflicts: libavformat/matroskaenc.c No change as the changed code is not in FFmpeg Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95f719fb8f475523d29f93a7e321a6db9f837631 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: enable vda hwaccel by default
ffmpeg | branch: master | Vittorio Giovara | Wed Dec 3 03:12:40 2014 +| [7834a54c66d46471b246b411627efe2e8ef9dd47] | committer: Vittorio Giovara configure: enable vda hwaccel by default Following the old thread suggestions. Vittorio > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7834a54c66d46471b246b411627efe2e8ef9dd47 --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 355a95b..9ac4a8e 100755 --- a/configure +++ b/configure @@ -2245,7 +2245,7 @@ enable static enable swscale_alpha # By default, enable only those hwaccels that have no external dependencies. -enable dxva2 vdpau +enable dxva2 vda vdpau # build settings SHFLAGS='-shared -Wl,-soname,$$(@F)' ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mkv: Validate ASS Start and End fields
ffmpeg | branch: master | Luca Barbato | Wed Oct 29 20:39:46 2014 +0100| [69c1fe7c9c9bc85eebfc02c6a19caf7e88cd74ff] | committer: Vittorio Giovara mkv: Validate ASS Start and End fields CC: libav-sta...@libav.org > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=69c1fe7c9c9bc85eebfc02c6a19caf7e88cd74ff --- libavformat/matroskaenc.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 4ec474d..8a7cfa1 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1227,7 +1227,7 @@ static int mkv_blockgroup_size(int pkt_size) return size; } -static int ass_get_duration(const uint8_t *p) +static int ass_get_duration(AVFormatContext *s, const uint8_t *p) { int sh, sm, ss, sc, eh, em, es, ec; uint64_t start, end; @@ -1235,8 +1235,25 @@ static int ass_get_duration(const uint8_t *p) if (sscanf(p, "%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d", &sh, &sm, &ss, &sc, &eh, &em, &es, &ec) != 8) return 0; + +if (sh > 9 || sm > 59 || ss > 59 || sc > 99 || +eh > 9 || em > 59 || es > 59 || ec > 99) { +av_log(s, AV_LOG_WARNING, + "Non-standard time reference %d:%d:%d.%d,%d:%d:%d.%d\n", + sh, sm, ss, sc, eh, em, es, ec); +return 0; +} + start = 360 * sh + 6 * sm + 1000 * ss + 10 * sc; end = 360 * eh + 6 * em + 1000 * es + 10 * ec; + +if (start > end) { +av_log(s, AV_LOG_WARNING, + "Unexpected time reference %d:%d:%d.%d,%d:%d:%d.%d\n", + sh, sm, ss, sc, eh, em, es, ec); +return 0; +} + return end - start; } @@ -1250,7 +1267,7 @@ static int mkv_write_ass_blocks(AVFormatContext *s, AVIOContext *pb, char buffer[2048]; while (data_size) { -int duration = ass_get_duration(data); +int duration = ass_get_duration(s, data); max_duration = FFMAX(duration, max_duration); end = memchr(data, '\n', data_size); size = line_size = end ? end - data + 1 : data_size; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '7834a54c66d46471b246b411627efe2e8ef9dd47'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 23:20:01 2014 +0100| [fa4c3130ee1f3f9e2b86a14feaa11e720747bdf3] | committer: Michael Niedermayer Merge commit '7834a54c66d46471b246b411627efe2e8ef9dd47' * commit '7834a54c66d46471b246b411627efe2e8ef9dd47': configure: enable vda hwaccel by default Conflicts: configure See: 942cded690bc6dc931c60078f39cf0f339a89058 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa4c3130ee1f3f9e2b86a14feaa11e720747bdf3 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/options: don't copy priv context when it is not AVOption object
ffmpeg | branch: master | Lukasz Marek | Tue Dec 2 23:24:15 2014 +0100| [53b2809f2c1b942adf4d876ac446ef97f812ac0c] | committer: Lukasz Marek lavc/options: don't copy priv context when it is not AVOption object This prevents potential crash when opt API is used without a class. Signed-off-by: Lukasz Marek > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=53b2809f2c1b942adf4d876ac446ef97f812ac0c --- libavcodec/options.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/options.c b/libavcodec/options.c index 7f9fb07..49c8b40 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -195,11 +195,12 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) av_opt_copy(dest, src); dest->priv_data = orig_priv_data; +dest->codec = orig_codec; -if (orig_priv_data) +if (orig_priv_data && src->codec && src->codec->priv_class && +dest->codec && dest->codec->priv_class) av_opt_copy(orig_priv_data, src->priv_data); -dest->codec = orig_codec; /* set values specific to opened codecs back to their default state */ dest->slice_offset= NULL; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] APIchanges: mark the release 11 branch point
ffmpeg | branch: master | wm4 | Wed Dec 3 15:01:49 2014 +0100| [1eec9bfc383f6dca29d83a2bfb45433dd66561c9] | committer: Vittorio Giovara APIchanges: mark the release 11 branch point > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1eec9bfc383f6dca29d83a2bfb45433dd66561c9 --- doc/APIchanges | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 44af215..3d1b72f 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -40,12 +40,16 @@ API changes, most recent first: Add av_vdpau_bind_context(). This function should now be used for creating (or resetting) a AVVDPAUContext instead of av_vdpau_alloc_context(). -2014-08-xx - xxx - lavc 56.1.0 - avcodec.h - Add AV_PKT_DATA_STEREO3D to export container-level stereo3d information. - 2014-08-xx - xxx - lavf 56.03.0 - avformat.h Add AVFormatContext.max_ts_probe. +--8<- + 11 branch was cut here +->8-- + +2014-08-28 - 9301486 - lavc 56.1.0 - avcodec.h + Add AV_PKT_DATA_STEREO3D to export container-level stereo3d information. + 2014-08-13 - 8ddc326 - lavu 54.03.0 - mem.h Add av_strndup(). ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '1eec9bfc383f6dca29d83a2bfb45433dd66561c9'
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 5 23:49:56 2014 +0100| [a0d0799ea2a79c6b598541248fe24083265cf336] | committer: Michael Niedermayer Merge commit '1eec9bfc383f6dca29d83a2bfb45433dd66561c9' * commit '1eec9bfc383f6dca29d83a2bfb45433dd66561c9': APIchanges: mark the release 11 branch point Conflicts: doc/APIchanges Not merged as the contents in our APIchanges differ and it could be confusing Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a0d0799ea2a79c6b598541248fe24083265cf336 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] rm: Use the correct codec_data_size signedness
ffmpeg | branch: master | Luca Barbato | Thu Dec 4 12:00:01 2014 +0100| [1c77ead1fb14d64e6798fc5e32af04abcb3cebb4] | committer: Vittorio Giovara rm: Use the correct codec_data_size signedness The function takes a size and not an offset. CC: libav-sta...@libav.org Sample-Id: rm_deadlock.rm Signed-off-by: Luca Barbato > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c77ead1fb14d64e6798fc5e32af04abcb3cebb4 --- libavformat/rdt.c |2 +- libavformat/rm.h|2 +- libavformat/rmdec.c |6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/rdt.c b/libavformat/rdt.c index 304f4cf..cc30694 100644 --- a/libavformat/rdt.c +++ b/libavformat/rdt.c @@ -132,7 +132,7 @@ static int rdt_load_mdpr (PayloadContext *rdt, AVStream *st, int rule_nr) { AVIOContext pb; -int size; +unsigned int size; uint32_t tag; /** diff --git a/libavformat/rm.h b/libavformat/rm.h index a06ea01..3aa1773 100644 --- a/libavformat/rm.h +++ b/libavformat/rm.h @@ -50,7 +50,7 @@ extern AVInputFormat ff_rdt_demuxer; */ int ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, AVStream *st, RMStream *rst, - int codec_data_size); + unsigned int codec_data_size); /** * Parse one rm-stream packet from the input bytestream. diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 38fb1ec..9173dde 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -282,9 +282,9 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, return 0; } -int -ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, - AVStream *st, RMStream *rst, int codec_data_size) +int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb, + AVStream *st, RMStream *rst, + unsigned int codec_data_size) { unsigned int v; int size; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '1c77ead1fb14d64e6798fc5e32af04abcb3cebb4'
ffmpeg | branch: master | Michael Niedermayer | Sat Dec 6 00:41:00 2014 +0100| [ef2f9073dda3a1ce73f44d444bc27fae5707f396] | committer: Michael Niedermayer Merge commit '1c77ead1fb14d64e6798fc5e32af04abcb3cebb4' * commit '1c77ead1fb14d64e6798fc5e32af04abcb3cebb4': rm: Use the correct codec_data_size signedness Conflicts: libavformat/rm.h libavformat/rmdec.c See: a6f730730b82645a9d31aad0968487cb77d6946c Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef2f9073dda3a1ce73f44d444bc27fae5707f396 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/rmdec: Check for overflow in ff_rm_read_mdpr_codecdata()
ffmpeg | branch: master | Michael Niedermayer | Sat Dec 6 00:18:29 2014 +0100| [03abf55f252945c70f4a79eaf4d609cee4d98710] | committer: Michael Niedermayer avformat/rmdec: Check for overflow in ff_rm_read_mdpr_codecdata() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=03abf55f252945c70f4a79eaf4d609cee4d98710 --- libavformat/rmdec.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index e267b01..299c742 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -414,7 +414,11 @@ int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb, skip: /* skip codec info */ size = avio_tell(pb) - codec_pos; -avio_skip(pb, codec_data_size - size); +if (codec_data_size >= size) { +avio_skip(pb, codec_data_size - size); +} else { +av_log(s, AV_LOG_WARNING, "codec_data_size %u < size %d\n", codec_data_size, size); +} return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/rmdec: rm_read_extradata: add error message for oversized extradata
ffmpeg | branch: master | Michael Niedermayer | Sat Dec 6 00:17:30 2014 +0100| [50f9de59a08f4bbacda298377339318e3eb87b8e] | committer: Michael Niedermayer avformat/rmdec: rm_read_extradata: add error message for oversized extradata Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=50f9de59a08f4bbacda298377339318e3eb87b8e --- libavformat/rmdec.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index d6fc59f..e267b01 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -86,8 +86,10 @@ static void get_str8(AVIOContext *pb, char *buf, int buf_size) static int rm_read_extradata(AVIOContext *pb, AVCodecContext *avctx, unsigned size) { -if (size >= 1<<24) +if (size >= 1<<24) { +av_log(avctx, AV_LOG_ERROR, "extradata size %u too large\n", size); return -1; +} if (ff_get_extradata(avctx, pb, size) < 0) return AVERROR(ENOMEM); return 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc: mention that the parser callback never returns an error
ffmpeg | branch: master | Vittorio Giovara | Thu Dec 4 20:46:16 2014 +| [b72727a5248f1ef02db99b378dce1eb48a46357a] | committer: Vittorio Giovara lavc: mention that the parser callback never returns an error > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b72727a5248f1ef02db99b378dce1eb48a46357a --- libavcodec/avcodec.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index b3c6419..7df64ae 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3858,6 +3858,8 @@ typedef struct AVCodecParser { int codec_ids[5]; /* several codec IDs are permitted */ int priv_data_size; int (*parser_init)(AVCodecParserContext *s); +/* This callback never returns an error, a negative value means that + * the frame start was in a previous packet. */ int (*parser_parse)(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'b72727a5248f1ef02db99b378dce1eb48a46357a'
ffmpeg | branch: master | Michael Niedermayer | Sat Dec 6 00:51:10 2014 +0100| [66f379da15cedab61ece10e2220f2492450fe057] | committer: Michael Niedermayer Merge commit 'b72727a5248f1ef02db99b378dce1eb48a46357a' * commit 'b72727a5248f1ef02db99b378dce1eb48a46357a': lavc: mention that the parser callback never returns an error Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=66f379da15cedab61ece10e2220f2492450fe057 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/options: fix leaks in avcodec_copy_context
ffmpeg | branch: master | Lukasz Marek | Thu Nov 27 00:41:16 2014 +0100| [8616c5b75acf91871e281e730f53e3de617484f1] | committer: Lukasz Marek lavc/options: fix leaks in avcodec_copy_context Signed-off-by: Lukasz Marek > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8616c5b75acf91871e281e730f53e3de617484f1 --- libavcodec/options.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libavcodec/options.c b/libavcodec/options.c index 49c8b40..d184846 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -190,6 +190,11 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) } av_opt_free(dest); +av_freep(&dest->rc_override); +av_freep(&dest->intra_matrix); +av_freep(&dest->inter_matrix); +av_freep(&dest->extradata); +av_freep(&dest->subtitle_header); memcpy(dest, src, sizeof(*dest)); av_opt_copy(dest, src); @@ -206,6 +211,7 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) dest->slice_offset= NULL; dest->hwaccel = NULL; dest->internal= NULL; +dest->coded_frame = NULL; /* reallocate values that should be allocated separately */ dest->extradata = NULL; @@ -225,6 +231,7 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) } alloc_and_copy_or_fail(extradata,src->extradata_size, FF_INPUT_BUFFER_PADDING_SIZE); +dest->extradata_size = src->extradata_size; alloc_and_copy_or_fail(intra_matrix, 64 * sizeof(int16_t), 0); alloc_and_copy_or_fail(inter_matrix, 64 * sizeof(int16_t), 0); alloc_and_copy_or_fail(rc_override, src->rc_override_count * sizeof(*src->rc_override), 0); @@ -239,11 +246,10 @@ fail: av_freep(&dest->intra_matrix); av_freep(&dest->inter_matrix); av_freep(&dest->extradata); -#if FF_API_MPV_OPT -FF_DISABLE_DEPRECATION_WARNINGS -av_freep(&dest->rc_eq); -FF_ENABLE_DEPRECATION_WARNINGS -#endif +av_freep(&dest->subtitle_header); +dest->subtitle_header_size = 0; +dest->extradata_size = 0; +av_opt_free(dest); return AVERROR(ENOMEM); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mov: skip version and flags attributes in mov_read_chan()
ffmpeg | branch: master | Matthieu Bouron | Thu Dec 4 19:13:39 2014 +| [8c0a865ad96b9e8542051f75b0edc424cb73994e] | committer: Vittorio Giovara mov: skip version and flags attributes in mov_read_chan() Fixes decting channel layout for files with uncommon audio, such as FL and FR in two separate streams. Introduced in 3bab7cd. CC: libav-de...@libav.org Sample-Id: ticket1474.mov Signed-off-by: Vittorio Giovara > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8c0a865ad96b9e8542051f75b0edc424cb73994e --- libavformat/mov.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 13dc94b..95c7106 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -634,6 +634,9 @@ static int mov_read_chan(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (atom.size < 16) return 0; +/* skip version and flags */ +avio_skip(pb, 4); + ff_mov_read_chan(c->fc, pb, st, atom.size - 4); return 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '8c0a865ad96b9e8542051f75b0edc424cb73994e'
ffmpeg | branch: master | Michael Niedermayer | Sat Dec 6 01:01:06 2014 +0100| [95482092b1e57987e079cd94b06e875f4d19d762] | committer: Michael Niedermayer Merge commit '8c0a865ad96b9e8542051f75b0edc424cb73994e' * commit '8c0a865ad96b9e8542051f75b0edc424cb73994e': mov: skip version and flags attributes in mov_read_chan() See: 59d40fc7e66e6ebb2d89e25115492bfe13b07d95 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95482092b1e57987e079cd94b06e875f4d19d762 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '33c827f632f95ffe3399b695a5a0d47b366b6e20'
ffmpeg | branch: master | Michael Niedermayer | Sat Dec 6 01:29:53 2014 +0100| [e827f65618f601ae2016e6f8ac8851534ed346c8] | committer: Michael Niedermayer Merge commit '33c827f632f95ffe3399b695a5a0d47b366b6e20' * commit '33c827f632f95ffe3399b695a5a0d47b366b6e20': swscale: Properly scale YUV Conflicts: libswscale/swscale_unscaled.c tests/ref/fate/filter-pixdesc-yuv420p10be tests/ref/fate/filter-pixdesc-yuv420p10le tests/ref/fate/filter-pixdesc-yuv420p9be tests/ref/fate/filter-pixdesc-yuv420p9le tests/ref/fate/filter-pixdesc-yuva420p10be tests/ref/fate/filter-pixdesc-yuva420p10le tests/ref/fate/filter-pixdesc-yuva420p9be tests/ref/fate/filter-pixdesc-yuva420p9le tests/ref/fate/filter-pixfmts-copy tests/ref/fate/filter-pixfmts-null tests/ref/fate/filter-pixfmts-scale tests/ref/fate/filter-pixfmts-vflip See: abe0b8e9f378a0f8781c1a3da6714d20cfd19594 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e827f65618f601ae2016e6f8ac8851534ed346c8 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swscale: Properly scale YUV
ffmpeg | branch: master | Derek Buitenhuis | Tue Dec 2 17:08:24 2014 +| [33c827f632f95ffe3399b695a5a0d47b366b6e20] | committer: Vittorio Giovara swscale: Properly scale YUV Only shift limited range luma, and always only shift chroma for upconversion. Based off a patch by Michael Niedermayer. Signed-off-by: Derek Buitenhuis Signed-off-by: Luca Barbato > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=33c827f632f95ffe3399b695a5a0d47b366b6e20 --- libswscale/swscale_unscaled.c | 47 +--- tests/ref/fate/filter-pixdesc-yuv420p10be |2 +- tests/ref/fate/filter-pixdesc-yuv420p10le |2 +- tests/ref/fate/filter-pixdesc-yuv420p9be |2 +- tests/ref/fate/filter-pixdesc-yuv420p9le |2 +- tests/ref/fate/filter-pixdesc-yuva420p10be |2 +- tests/ref/fate/filter-pixdesc-yuva420p10le |2 +- tests/ref/fate/filter-pixdesc-yuva420p9be |2 +- tests/ref/fate/filter-pixdesc-yuva420p9le |2 +- tests/ref/fate/filter-pixfmts-copy | 16 +- tests/ref/fate/filter-pixfmts-null | 16 +- tests/ref/fate/filter-pixfmts-scale| 16 +- tests/ref/fate/filter-pixfmts-vflip| 16 +- tests/ref/fate/v210|2 +- 14 files changed, 76 insertions(+), 53 deletions(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index ffc813e..ddf177a 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -786,6 +786,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], int height = (plane == 0 || plane == 3) ? srcSliceH: -((-srcSliceH) >> c->chrDstVSubSample); const uint8_t *srcPtr = src[plane]; uint8_t *dstPtr = dst[plane] + dstStride[plane] * y; +int shiftonly = plane == 1 || plane == 2 || (!c->srcRange && plane == 0); if (!dst[plane]) continue; @@ -812,13 +813,24 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], if (is16BPS(c->dstFormat)) { uint16_t *dstPtr2 = (uint16_t *) dstPtr; #define COPY9_OR_10TO16(rfunc, wfunc) \ -for (i = 0; i < height; i++) { \ -for (j = 0; j < length; j++) { \ -int srcpx = rfunc(&srcPtr2[j]); \ -wfunc(&dstPtr2[j], (srcpx << (16 - src_depth)) | (srcpx >> (2 * src_depth - 16))); \ +if (shiftonly) { \ +for (i = 0; i < height; i++) { \ +for (j = 0; j < length; j++) { \ +int srcpx = rfunc(&srcPtr2[j]); \ +wfunc(&dstPtr2[j], srcpx << (16 - src_depth)); \ +} \ +dstPtr2 += dstStride[plane] / 2; \ +srcPtr2 += srcStride[plane] / 2; \ +} \ +} else { \ +for (i = 0; i < height; i++) { \ +for (j = 0; j < length; j++) { \ +int srcpx = rfunc(&srcPtr2[j]); \ +wfunc(&dstPtr2[j], (srcpx << (16 - src_depth)) | (srcpx >> (2 * src_depth - 16))); \ +} \ +dstPtr2 += dstStride[plane] / 2; \ +srcPtr2 += srcStride[plane] / 2; \ } \ -dstPtr2 += dstStride[plane] / 2; \ -srcPtr2 += srcStride[plane] / 2; \ } if (isBE(c->dstFormat)) { if (isBE(c->srcFormat)) { @@ -916,13 +928,24 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], } } else /* 8bit */ { #define COPY8TO9_OR_10(wfunc) \ -for (i = 0; i < height; i++) { \ -for (j = 0; j < length; j++) { \ -const int srcpx = srcPtr[j]; \ -wfunc(&dstPtr2[j], (srcpx << (dst_depth - 8)) | (srcpx >> (16 - dst_depth))); \ +if (shiftonly) { \ +for (i = 0; i < height; i++) { \ +for (j = 0; j < length; j++) { \ +const int srcpx = srcPtr[j]; \ +wfunc(&dstPtr2[j], srcpx << (dst_depth - 8)); \ +} \ +dstPtr2 += dstStride[plane] / 2; \ +srcPtr += srcStride[plane]; \ +} \ +} else { \ +for (i = 0; i < height; i++) { \ +for (j = 0; j < length; j++) { \ +const int srcpx = srcPtr[j]; \ +wfunc(&dstPtr2[j], (srcpx << (dst_depth - 8))
[FFmpeg-cvslog] v210enc: Add SIMD optimised 8-bit and 10-bit encoders
ffmpeg | branch: master | Kieran Kunhya | Tue Dec 2 17:08:25 2014 +| [9a738c27dceb4b975784b23213a46f5cb560d1c2] | committer: Vittorio Giovara v210enc: Add SIMD optimised 8-bit and 10-bit encoders Signed-off-by: Michael Niedermayer Signed-off-by: Vittorio Giovara > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9a738c27dceb4b975784b23213a46f5cb560d1c2 --- libavcodec/v210enc.c | 203 +++-- libavcodec/v210enc.h | 35 +++ libavcodec/x86/Makefile |2 + libavcodec/x86/v210enc.asm| 145 + libavcodec/x86/v210enc_init.c | 42 + libavutil/x86/x86util.asm |5 + tests/ref/vsynth/vsynth1-v210 |6 +- tests/ref/vsynth/vsynth2-v210 |6 +- 8 files changed, 389 insertions(+), 55 deletions(-) diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index ef0d6ab..cb88788 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -24,84 +24,188 @@ #include "avcodec.h" #include "bytestream.h" #include "internal.h" +#include "v210enc.h" + +#define CLIP(v) av_clip(v, 4, 1019) +#define CLIP8(v) av_clip(v, 1, 254) + +#define WRITE_PIXELS(a, b, c) \ +do {\ +val = CLIP(*a++); \ +val |= (CLIP(*b++) << 10) | \ + (CLIP(*c++) << 20); \ +AV_WL32(dst, val); \ +dst += 4; \ +} while (0) + +#define WRITE_PIXELS8(a, b, c) \ +do {\ +val = (CLIP8(*a++) << 2); \ +val |= (CLIP8(*b++) << 12) |\ + (CLIP8(*c++) << 22); \ +AV_WL32(dst, val); \ +dst += 4; \ +} while (0) + +static void v210_planar_pack_8_c(const uint8_t *y, const uint8_t *u, + const uint8_t *v, uint8_t *dst, + ptrdiff_t width) +{ +uint32_t val; +int i; + +/* unroll this to match the assembly */ +for (i = 0; i < width - 11; i += 12) { +WRITE_PIXELS8(u, y, v); +WRITE_PIXELS8(y, u, y); +WRITE_PIXELS8(v, y, u); +WRITE_PIXELS8(y, v, y); +WRITE_PIXELS8(u, y, v); +WRITE_PIXELS8(y, u, y); +WRITE_PIXELS8(v, y, u); +WRITE_PIXELS8(y, v, y); +} +} + +static void v210_planar_pack_10_c(const uint16_t *y, const uint16_t *u, + const uint16_t *v, uint8_t *dst, + ptrdiff_t width) +{ +uint32_t val; +int i; + +for (i = 0; i < width - 5; i += 6) { +WRITE_PIXELS(u, y, v); +WRITE_PIXELS(y, u, y); +WRITE_PIXELS(v, y, u); +WRITE_PIXELS(y, v, y); +} +} static av_cold int encode_init(AVCodecContext *avctx) { +V210EncContext *s = avctx->priv_data; + if (avctx->width & 1) { av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n"); return AVERROR(EINVAL); } -if (avctx->bits_per_raw_sample != 10) -av_log(avctx, AV_LOG_WARNING, "bits per raw sample: %d != 10-bit\n", - avctx->bits_per_raw_sample); - avctx->coded_frame = av_frame_alloc(); if (!avctx->coded_frame) return AVERROR(ENOMEM); avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; +s->pack_line_8 = v210_planar_pack_8_c; +s->pack_line_10 = v210_planar_pack_10_c; + +if (ARCH_X86) +ff_v210enc_init_x86(s); + return 0; } static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic, int *got_packet) { +V210EncContext *s = avctx->priv_data; int aligned_width = ((avctx->width + 47) / 48) * 48; int stride = aligned_width * 8 / 3; int line_padding = stride - ((avctx->width * 8 + 11) / 12) * 4; int h, w, ret; -const uint16_t *y = (const uint16_t*)pic->data[0]; -const uint16_t *u = (const uint16_t*)pic->data[1]; -const uint16_t *v = (const uint16_t*)pic->data[2]; -PutByteContext p; +uint8_t *dst; -if ((ret = ff_alloc_packet(pkt, avctx->height * stride)) < 0) { +ret = ff_alloc_packet(pkt, avctx->height * stride); +if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n"); return ret; } - -bytestream2_init_writer(&p, pkt->data, pkt->size); - -#define CLIP(v) av_clip(v, 4, 1019) - -#define WRITE_PIXELS(a, b, c) \ -do {\ -val = CLIP(*a++); \ -val |= (CLIP(*b++) << 10) | \ - (CLIP(*c++) << 20); \ -bytestream2_put_le32u(&p, val); \ -} while (0) - -for (h = 0; h < avctx->height; h++) { -uint32_t val; -for (w = 0; w < avctx->width - 5; w += 6) { -WRITE_PIXELS(u, y, v); -WRITE_PIXELS(y, u, y); -WRITE_PIXELS(v, y, u); -WRITE_PIXELS(y
[FFmpeg-cvslog] Merge commit '9a738c27dceb4b975784b23213a46f5cb560d1c2'
ffmpeg | branch: master | Michael Niedermayer | Sat Dec 6 01:46:39 2014 +0100| [1d048f762d2fc4ede5316818f467e2f1d1065ac1] | committer: Michael Niedermayer Merge commit '9a738c27dceb4b975784b23213a46f5cb560d1c2' * commit '9a738c27dceb4b975784b23213a46f5cb560d1c2': v210enc: Add SIMD optimised 8-bit and 10-bit encoders Conflicts: libavcodec/v210enc.c libavcodec/v210enc.h libavcodec/x86/Makefile libavcodec/x86/v210enc.asm libavcodec/x86/v210enc_init.c tests/ref/vsynth/vsynth1-v210 tests/ref/vsynth/vsynth2-v210 See: 36091742d182b3ad4411aae22682354b3834a974 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1d048f762d2fc4ede5316818f467e2f1d1065ac1 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/dvbsubdec: Remove redundant "DVBSub error" prefix
ffmpeg | branch: master | Michael Niedermayer | Sat Dec 6 02:03:08 2014 +0100| [ce800d4695b71f707db93bf97db02dd2b6ff0243] | committer: Michael Niedermayer avcodec/dvbsubdec: Remove redundant "DVBSub error" prefix Found-by: ubitux Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce800d4695b71f707db93bf97db02dd2b6ff0243 --- libavcodec/dvbsubdec.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index a58b9b4..e634c9f 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -569,7 +569,7 @@ static int dvbsub_read_2bit_string(AVCodecContext *avctx, } if (get_bits(&gb, 6)) -av_log(avctx, AV_LOG_ERROR, "DVBSub error: line overflow\n"); +av_log(avctx, AV_LOG_ERROR, "line overflow\n"); (*srcbuf) += (get_bits_count(&gb) + 7) >> 3; @@ -692,7 +692,7 @@ static int dvbsub_read_4bit_string(AVCodecContext *avctx, uint8_t *destbuf, int } if (get_bits(&gb, 8)) -av_log(avctx, AV_LOG_ERROR, "DVBSub error: line overflow\n"); +av_log(avctx, AV_LOG_ERROR, "line overflow\n"); (*srcbuf) += (get_bits_count(&gb) + 7) >> 3; @@ -748,7 +748,7 @@ static int dvbsub_read_8bit_string(AVCodecContext *avctx, } if (*(*srcbuf)++) -av_log(avctx, AV_LOG_ERROR, "DVBSub error: line overflow\n"); +av_log(avctx, AV_LOG_ERROR, "line overflow\n"); return pixels_read; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/hlsenc: added segment filename option
ffmpeg | branch: master | Christian Suloway | Fri Dec 5 21:20:15 2014 +| [1c639fa6e02ed122dc41c318acb875f8d76537c5] | committer: Michael Niedermayer avformat/hlsenc: added segment filename option This option allows segment filenames to be specified. Unless -hls_flags single_file is set the filename is used as a string format with the segment number. Example: ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -hls_segment_filename bar%03d.ts foo.m3u8 Signed-off-by: Christian Suloway Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c639fa6e02ed122dc41c318acb875f8d76537c5 --- doc/muxers.texi |9 + libavformat/hlsenc.c | 40 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index c6ba604..34e827c 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -254,6 +254,15 @@ and it is not to be confused with the segment filename sequence number which can be cyclic, for example if the @option{wrap} option is specified. +@item hls_segment_filename @var{filename} +Set the segment filename. Unless hls_flags single_file is set @var{filename} +is used as a string format with the segment number: +@example +ffmpeg in.nut -hls_segment_filename 'file%03d.ts' out.m3u8 +@end example +This example will produce the playlist, @file{out.m3u8}, and segment files: +@file{file000.ts}, @file{file001.ts}, @file{file002.ts}, etc. + @item hls_flags single_file If this flag is set, the muxer will store all segments in a single MPEG-TS file, and will use byte ranges in the playlist. HLS playlists generated with diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index e13f438..d5ea990 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -59,6 +59,7 @@ typedef struct HLSContext { int max_nb_segments; // Set by a private option. int wrap; // Set by a private option. uint32_t flags;// enum HLSFlags +char *segment_filename; int allowcache; int64_t recording_time; @@ -237,15 +238,12 @@ static int hls_write_header(AVFormatContext *s) char *p; const char *pattern = "%d.ts"; AVDictionary *options = NULL; -int basename_size = strlen(s->filename) + strlen(pattern) + 1; +int basename_size; hls->sequence = hls->start_sequence; hls->recording_time = hls->time * AV_TIME_BASE; hls->start_pts = AV_NOPTS_VALUE; -if (hls->flags & HLS_SINGLE_FILE) -pattern = ".ts"; - if (hls->format_options_str) { ret = av_dict_parse_string(&hls->format_options, hls->format_options_str, "=", ":", 0); if (ret < 0) { @@ -270,21 +268,30 @@ static int hls_write_header(AVFormatContext *s) goto fail; } -hls->basename = av_malloc(basename_size); - -if (!hls->basename) { -ret = AVERROR(ENOMEM); -goto fail; -} - -strcpy(hls->basename, s->filename); +if (hls->segment_filename) { +hls->basename = av_strdup(hls->segment_filename); +if (!hls->basename) { +ret = AVERROR(ENOMEM); +goto fail; +} +} else { +if (hls->flags & HLS_SINGLE_FILE) +pattern = ".ts"; -p = strrchr(hls->basename, '.'); +basename_size = strlen(s->filename) + strlen(pattern) + 1; +hls->basename = av_malloc(basename_size); +if (!hls->basename) { +ret = AVERROR(ENOMEM); +goto fail; +} -if (p) -*p = '\0'; +av_strlcpy(hls->basename, s->filename, basename_size); -av_strlcat(hls->basename, pattern, basename_size); +p = strrchr(hls->basename, '.'); +if (p) +*p = '\0'; +av_strlcat(hls->basename, pattern, basename_size); +} if ((ret = hls_mux_init(s)) < 0) goto fail; @@ -410,6 +417,7 @@ static const AVOption options[] = { {"hls_wrap", "set number after which the index wraps", OFFSET(wrap), AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, E}, {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, E}, {"hls_base_url", "url to prepend to each playlist entry", OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, +{"hls_segment_filename", "filename template for segment files", OFFSET(segment_filename), AV_OPT_TYPE_STRING, {.str = NULL},0, 0, E}, {"hls_flags", "set flags affecting HLS playlist and media file generation", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, 0, UINT_MAX, E, "flags"}, {"single_file", "generate a single media file indexed with byte ranges", 0, AV_OPT_TYPE_CONST, {.i64 = HLS_SINGLE_FILE }, 0, UINT_MAX, E, "flags"}, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.
[FFmpeg-cvslog] doc: html: Use native viewport
ffmpeg | branch: master | Timothy Gu | Wed Dec 3 21:31:35 2014 -0800| [4a27f05d1450e2de5b537e8889b737a5a4b4e432] | committer: Michael Niedermayer doc: html: Use native viewport Fixes displaying docs on small-screen devices. Signed-off-by: Timothy Gu Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a27f05d1450e2de5b537e8889b737a5a4b4e432 --- doc/t2h.pm |1 + 1 file changed, 1 insertion(+) diff --git a/doc/t2h.pm b/doc/t2h.pm index 7f771f9..ca77842 100644 --- a/doc/t2h.pm +++ b/doc/t2h.pm @@ -169,6 +169,7 @@ EOT my $head2 = $ENV{"FFMPEG_HEADER2"} || < + ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc: Do not use the headings as links to TOC anchors
ffmpeg | branch: master | Timothy Gu | Wed Dec 3 21:31:34 2014 -0800| [cd6f0f28bc06e19334bc8f929572ad4588679ea1] | committer: Michael Niedermayer doc: Do not use the headings as links to TOC anchors Instead, use FontAwesome icons (if configured to be this way) or separate text. Signed-off-by: Timothy Gu Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd6f0f28bc06e19334bc8f929572ad4588679ea1 --- doc/t2h.pm | 104 ++-- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/doc/t2h.pm b/doc/t2h.pm index a927071..7f771f9 100644 --- a/doc/t2h.pm +++ b/doc/t2h.pm @@ -23,8 +23,108 @@ # no navigation elements set_from_init_file('HEADERS', 0); -# TOC and Chapter headings link -set_from_init_file('TOC_LINKS', 1); +sub ffmpeg_heading_command($) +{ +my $self = shift; +my $cmdname = shift; +my $command = shift; +my $args = shift; +my $content = shift; + +my $result = ''; + +# not clear that it may really happen +if ($self->in_string) { +$result .= $self->command_string($command) ."\n" if ($cmdname ne 'node'); +$result .= $content if (defined($content)); +return $result; +} + +my $element_id = $self->command_id($command); +$result .= "\n" +if (defined($element_id) and $element_id ne ''); + +print STDERR "Process $command " +.Texinfo::Structuring::_print_root_command_texi($command)."\n" +if ($self->get_conf('DEBUG')); +my $element; +if ($Texinfo::Common::root_commands{$command->{'cmdname'}} +and $command->{'parent'} +and $command->{'parent'}->{'type'} +and $command->{'parent'}->{'type'} eq 'element') { +$element = $command->{'parent'}; +} +if ($element) { +$result .= &{$self->{'format_element_header'}}($self, $cmdname, + $command, $element); +} + +my $heading_level; +# node is used as heading if there is nothing else. +if ($cmdname eq 'node') { +if (!$element or (!$element->{'extra'}->{'section'} +and $element->{'extra'}->{'node'} +and $element->{'extra'}->{'node'} eq $command + # bogus node may not have been normalized +and defined($command->{'extra'}->{'normalized'}))) { +if ($command->{'extra'}->{'normalized'} eq 'Top') { +$heading_level = 0; +} else { +$heading_level = 3; +} +} +} else { +$heading_level = $command->{'level'}; +} + +my $heading = $self->command_text($command); +# $heading not defined may happen if the command is a @node, for example +# if there is an error in the node. +if (defined($heading) and $heading ne '' and defined($heading_level)) { + +if ($Texinfo::Common::root_commands{$cmdname} +and $Texinfo::Common::sectioning_commands{$cmdname}) { +my $content_href = $self->command_contents_href($command, 'contents', + $self->{'current_filename'}); +if ($content_href) { +my $this_href = $content_href =~ s/^\#toc-/\#/r; +$heading .= ''. + '". +($ENV{"FA_ICONS"} ? '' + : '#'). + ' '. + '". +($ENV{"FA_ICONS"} ? '' + : 'TOC'). + ''. +''; +} +} + +if ($self->in_preformatted()) { +$result .= $heading."\n"; +} else { +# if the level was changed, set the command name right +if ($cmdname ne 'node' +and $heading_level ne $Texinfo::Common::command_structuring_level{$cmdname}) { +$cmdname += $Texinfo::Common::level_to_structuring_command{$cmdname}->[$heading_level]; +} +$result .= &{$self->{'format_heading_text'}}( +$self, $cmdname, $heading, +$heading_level + +$self->get_conf('CHAPTER_HEADER_LEVEL') - 1, $command); +} +} +$result .= $content if (defined($content)); +return $result; +} + +foreach my $command (keys(%Texinfo::Common::sectioning_commands), 'node') { +texinfo_register_command_formatting($command, \&ffmpeg_heading_command); +} # print the TOC where @contents is used set_from_init_file('INLINE_CONTENTS', 1); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 5e6ad7e web/style.less: Styles for heading anchors
The branch, master has been updated via 5e6ad7e618b59b6500ae171ee5f8297f2aa227f9 (commit) from 5c2998d99411d3494d30f89a085b0645687e4169 (commit) - Log - commit 5e6ad7e618b59b6500ae171ee5f8297f2aa227f9 Author: Timothy Gu AuthorDate: Wed Dec 3 21:31:33 2014 -0800 Commit: Michael Niedermayer CommitDate: Sat Dec 6 03:39:57 2014 +0100 web/style.less: Styles for heading anchors Signed-off-by: Timothy Gu diff --git a/generate-doc.sh b/generate-doc.sh index f953a9a..d8d01d3 100755 --- a/generate-doc.sh +++ b/generate-doc.sh @@ -30,6 +30,7 @@ export FFMPEG_HEADER1="$(cat src/template_head1)" export FFMPEG_HEADER2="$(cat src/template_head_prod src/template_head2)" export FFMPEG_HEADER3="$(cat src/template_head3)" export FFMPEG_FOOTER="$(cat src/template_footer1 src/template_footer_prod src/template_footer2)" +export FA_ICONS=true rm -rf build-doc mkdir build-doc && cd build-doc diff --git a/src/less/style.less b/src/less/style.less index 378a972..adb6e17 100644 --- a/src/less/style.less +++ b/src/less/style.less @@ -84,6 +84,12 @@ main { margin: auto; } +h1, h2, h3, h4, h5, h6 { +a.anchor { +font-size: 18px; +} +} + h1, h2, h3, h4 { font-weight: bold; text-align: left; @@ -94,6 +100,9 @@ h1, h2, h3 { strong { color: @Cinvert; } +a.anchor { +color: @Cmainlightlightl; +} } h4, h5, h6 { @@ -115,6 +124,9 @@ h4 { padding: 10px 0; margin: 20px 0; color: @Cinvert; +a.anchor { +color: @Cinvert; +} } .list-group { --- Summary of changes: generate-doc.sh |1 + src/less/style.less | 12 2 files changed, 13 insertions(+), 0 deletions(-) hooks/post-receive -- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffserver_config: reflow _get_arg()
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet | Sat Dec 6 02:14:20 2014 -0300| [ac896f0cd1b1e71f1f62da451dc96abef80f3c71] | committer: Reynaldo H. Verdejo Pinochet ffserver_config: reflow _get_arg() Signed-off-by: Reynaldo H. Verdejo Pinochet > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac896f0cd1b1e71f1f62da451dc96abef80f3c71 --- ffserver_config.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/ffserver_config.c b/ffserver_config.c index 1e79a5d..9f9655e 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -84,28 +84,24 @@ void ffserver_get_arg(char *buf, int buf_size, const char **pp) { const char *p; char *q; -int quote; +int quote = 0; p = *pp; -while (av_isspace(*p)) p++; q = buf; -quote = 0; + +while (av_isspace(*p)) p++; + if (*p == '\"' || *p == '\'') quote = *p++; -for(;;) { -if (quote) { -if (*p == quote) -break; -} else { -if (av_isspace(*p)) -break; -} -if (*p == '\0') + +while (*p != '\0') { +if (quote && *p == quote || !quote && av_isspace(*p)) break; if ((q - buf) < buf_size - 1) *q++ = *p; p++; } + *q = '\0'; if (quote && *p == quote) p++; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffserver_config: fix line width on fwd declarations
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet | Sat Dec 6 02:21:56 2014 -0300| [7cdc99707bf7b38ee67d848e528ff7fdac6219d3] | committer: Reynaldo H. Verdejo Pinochet ffserver_config: fix line width on fwd declarations Signed-off-by: Reynaldo H. Verdejo Pinochet > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7cdc99707bf7b38ee67d848e528ff7fdac6219d3 --- ffserver_config.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ffserver_config.c b/ffserver_config.c index 9f9655e..ccc35d7 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -35,10 +35,12 @@ static int ffserver_save_avoption(const char *opt, const char *arg, int type, FFServerConfig *config); -static void vreport_config_error(const char *filename, int line_num, int log_level, - int *errors, const char *fmt, va_list vl); -static void report_config_error(const char *filename, int line_num, int log_level, -int *errors, const char *fmt, ...); +static void vreport_config_error(const char *filename, int line_num, + int log_level, int *errors, const char *fmt, + va_list vl); +static void report_config_error(const char *filename, int line_num, +int log_level, int *errors, const char *fmt, +...); #define ERROR(...) report_config_error(config->filename, config->line_num,\ AV_LOG_ERROR, &config->errors, __VA_ARGS__) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffserver_config: reflow _parse_ffconfig()
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet | Fri Dec 5 20:38:30 2014 -0300| [da95fe4ef81c120de0bf566c1881bec89f8f086f] | committer: Reynaldo H. Verdejo Pinochet ffserver_config: reflow _parse_ffconfig() Signed-off-by: Reynaldo H. Verdejo Pinochet > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=da95fe4ef81c120de0bf566c1881bec89f8f086f --- ffserver_config.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/ffserver_config.c b/ffserver_config.c index 8ea86aa..1e79a5d 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -1157,7 +1157,6 @@ int ffserver_parse_ffconfig(const char *filename, FFServerConfig *config) av_assert0(config); -config->line_num = 0; f = fopen(filename, "r"); if (!f) { ret = AVERROR(errno); @@ -1167,14 +1166,14 @@ int ffserver_parse_ffconfig(const char *filename, FFServerConfig *config) } config->first_stream = NULL; -last_stream = &config->first_stream; config->first_feed = NULL; -last_feed = &config->first_feed; config->errors = config->warnings = 0; -for(;;) { -if (fgets(line, sizeof(line), f) == NULL) -break; +last_stream = &config->first_stream; +last_feed = &config->first_feed; + +config->line_num = 0; +while (fgets(line, sizeof(line), f) != NULL) { config->line_num++; p = line; while (av_isspace(*p)) @@ -1189,14 +1188,14 @@ int ffserver_parse_ffconfig(const char *filename, FFServerConfig *config) if (opening && (stream || feed || redirect)) { ERROR("Already in a tag\n"); } else { -if ((ret = ffserver_parse_config_feed(config, cmd, &p, &feed)) < 0) +ret = ffserver_parse_config_feed(config, cmd, &p, &feed); +if (ret < 0) break; if (opening) { -/* add in stream list */ +/* add in stream & feed list */ *last_stream = feed; -last_stream = &feed->next; -/* add in feed list */ *last_feed = feed; +last_stream = &feed->next; last_feed = &feed->next_feed; } } @@ -1205,7 +1204,8 @@ int ffserver_parse_ffconfig(const char *filename, FFServerConfig *config) if (opening && (stream || feed || redirect)) { ERROR("Already in a tag\n"); } else { -if ((ret = ffserver_parse_config_stream(config, cmd, &p, &stream)) < 0) +ret = ffserver_parse_config_stream(config, cmd, &p, &stream); +if (ret < 0) break; if (opening) { /* add in stream list */ @@ -1218,7 +1218,9 @@ int ffserver_parse_ffconfig(const char *filename, FFServerConfig *config) if (opening && (stream || feed || redirect)) ERROR("Already in a tag\n"); else { -if ((ret = ffserver_parse_config_redirect(config, cmd, &p, &redirect)) < 0) +ret = ffserver_parse_config_redirect(config, cmd, &p, + &redirect); +if (ret < 0) break; if (opening) { /* add in stream list */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog