[FFmpeg-cvslog] Merge commit 'ee80f834cbb6dbacdc1efb4c658a7d775e82ebff'
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 11:34:36 2015 +0200| [cd4c878934a632dba2fe75a78e843b0f729fc79f] | committer: Michael Niedermayer Merge commit 'ee80f834cbb6dbacdc1efb4c658a7d775e82ebff' * commit 'ee80f834cbb6dbacdc1efb4c658a7d775e82ebff': asfdec: set nb_streams to 0 in the asf_read_close Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd4c878934a632dba2fe75a78e843b0f729fc79f --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] asfdec: set nb_streams to 0 in the asf_read_close
ffmpeg | branch: master | Alexandra Hájková | Wed Jul 22 21:38:15 2015 +0200| [ee80f834cbb6dbacdc1efb4c658a7d775e82ebff] | committer: Anton Khirnov asfdec: set nb_streams to 0 in the asf_read_close Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee80f834cbb6dbacdc1efb4c658a7d775e82ebff --- libavformat/asfdec.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 6dc34d9..305c01c 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -1457,6 +1457,7 @@ static int asf_read_close(AVFormatContext *s) av_dict_free(&asf->asf_sd[i].asf_met); } +asf->nb_streams = 0; return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'aed7715b8fa295980c221f1cd095d42cd3bd74a6'
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 11:43:49 2015 +0200| [40e8ade9ebda8286a0291c575c874755670ce81f] | committer: Michael Niedermayer Merge commit 'aed7715b8fa295980c221f1cd095d42cd3bd74a6' * commit 'aed7715b8fa295980c221f1cd095d42cd3bd74a6': asfdec: increment nb_streams right after the stream allocation Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40e8ade9ebda8286a0291c575c874755670ce81f --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] asfdec: increment nb_streams right after the stream allocation
ffmpeg | branch: master | Alexandra Hájková | Thu Jul 23 08:59:53 2015 +0200| [aed7715b8fa295980c221f1cd095d42cd3bd74a6] | committer: Anton Khirnov asfdec: increment nb_streams right after the stream allocation to prevent possible memory leaks Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aed7715b8fa295980c221f1cd095d42cd3bd74a6 --- libavformat/asfdec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 305c01c..d9e9a5a 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -745,6 +745,7 @@ static int asf_read_stream_properties(AVFormatContext *s, const GUIDParseTable * if (!asf->asf_st[asf->nb_streams]) return AVERROR(ENOMEM); asf_st = asf->asf_st[asf->nb_streams]; +asf->nb_streams++; asf_st->stream_index = stream_index; asf_st->index= st->index; asf_st->indexed = 0; @@ -785,7 +786,6 @@ static int asf_read_stream_properties(AVFormatContext *s, const GUIDParseTable * avio_skip(pb, err_data_len); } -asf->nb_streams++; align_position(pb, asf->offset, size); return 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] af_channelmap: properly set the supported output channel layouts
ffmpeg | branch: master | Anton Khirnov | Wed Jul 22 11:30:37 2015 +0200| [22ecfcd4c79cdf812fdf406525ddf0fd1f7114e4] | committer: Anton Khirnov af_channelmap: properly set the supported output channel layouts The current code expects query_formats() to be called exactly once, it will leak if it's not called at all (filter initialized, but never configured or used) or try to read freed memory if it's called more than once. Found-by: James Almer CC: libav-sta...@libav.org > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=22ecfcd4c79cdf812fdf406525ddf0fd1f7114e4 --- libavfilter/af_channelmap.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index 3035405..5725498 100644 --- a/libavfilter/af_channelmap.c +++ b/libavfilter/af_channelmap.c @@ -57,7 +57,6 @@ enum MappingMode { #define MAX_CH 64 typedef struct ChannelMapContext { const AVClass *class; -AVFilterChannelLayouts *channel_layouts; char *mapping_str; char *channel_layout_str; uint64_t output_layout; @@ -276,8 +275,6 @@ static av_cold int channelmap_init(AVFilterContext *ctx) return AVERROR(EINVAL); } -ff_add_channel_layout(&s->channel_layouts, s->output_layout); - if (mode == MAP_PAIR_INT_STR || mode == MAP_PAIR_STR_STR) { for (i = 0; i < s->nch; i++) { s->map[i].out_channel_idx = av_get_channel_layout_channel_index( @@ -291,11 +288,14 @@ static av_cold int channelmap_init(AVFilterContext *ctx) static int channelmap_query_formats(AVFilterContext *ctx) { ChannelMapContext *s = ctx->priv; +AVFilterChannelLayouts *channel_layouts = NULL; + +ff_add_channel_layout(&channel_layouts, s->output_layout); ff_set_common_formats(ctx, ff_planar_sample_fmts()); ff_set_common_samplerates(ctx, ff_all_samplerates()); ff_channel_layouts_ref(ff_all_channel_layouts(), &ctx->inputs[0]->out_channel_layouts); -ff_channel_layouts_ref(s->channel_layouts, &ctx->outputs[0]->in_channel_layouts); +ff_channel_layouts_ref(channel_layouts, &ctx->outputs[0]->in_channel_layouts); return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '22ecfcd4c79cdf812fdf406525ddf0fd1f7114e4'
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 11:56:26 2015 +0200| [9c31b396413a90f55e82a01cb6b6f1fbe048a156] | committer: Michael Niedermayer Merge commit '22ecfcd4c79cdf812fdf406525ddf0fd1f7114e4' * commit '22ecfcd4c79cdf812fdf406525ddf0fd1f7114e4': af_channelmap: properly set the supported output channel layouts Conflicts: libavfilter/af_channelmap.c See: 39867f3e098ab304cd3bef0ace19d73617cdb817 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9c31b396413a90f55e82a01cb6b6f1fbe048a156 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] dds: Fix the slice size computation
ffmpeg | branch: master | Tom Butterworth | Thu Jul 23 00:03:29 2015 +0100| [ebe8b5d947c41449c684f17c6826fe6bc46c0360] | committer: Luca Barbato dds: Fix the slice size computation A bug was introduced in 6b2b26e7af3ede0abfb46eb5725c26d1083f50bc whereby when frame height wasn't divisible by the number of threads, pixels would be omitted from the bottom rows during decode. Signed-off-by: Luca Barbato > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ebe8b5d947c41449c684f17c6826fe6bc46c0360 --- libavcodec/dds.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/libavcodec/dds.c b/libavcodec/dds.c index 625cb30..2c3a2f2 100644 --- a/libavcodec/dds.c +++ b/libavcodec/dds.c @@ -105,7 +105,7 @@ typedef struct DDSContext { const uint8_t *tex_data; // Compressed texture int tex_ratio; // Compression ratio -int slice_size; // Optimal slice size +int slice_count; // Number of slices for threaded operations /* Pointer to the selected compress or decompress function. */ int (*tex_funct)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block); @@ -421,14 +421,23 @@ static int decompress_texture_thread(AVCodecContext *avctx, void *arg, AVFrame *frame = arg; const uint8_t *d = ctx->tex_data; int w_block = avctx->coded_width / TEXTURE_BLOCK_W; +int h_block = avctx->coded_height / TEXTURE_BLOCK_H; int x, y; int start_slice, end_slice; +int base_blocks_per_slice = h_block / ctx->slice_count; +int remainder_blocks = h_block % ctx->slice_count; -start_slice = slice * ctx->slice_size; -end_slice = FFMIN(start_slice + ctx->slice_size, avctx->coded_height); +/* When the frame height (in blocks) doesn't divide evenly between the + * number of slices, spread the remaining blocks evenly between the first + * operations */ +start_slice = slice * base_blocks_per_slice; +/* Add any extra blocks (one per slice) that have been added before this slice */ +start_slice += FFMIN(slice, remainder_blocks); -start_slice /= TEXTURE_BLOCK_H; -end_slice /= TEXTURE_BLOCK_H; +end_slice = start_slice + base_blocks_per_slice; +/* Add an extra block if there are still remainder blocks to be accounted for */ +if (slice < remainder_blocks) +end_slice++; for (y = start_slice; y < end_slice; y++) { uint8_t *p = frame->data[0] + y * frame->linesize[0] * TEXTURE_BLOCK_H; @@ -633,13 +642,12 @@ static int dds_decode(AVCodecContext *avctx, void *data, return ret; if (ctx->compressed) { -int slices = FFMIN(avctx->thread_count, - avctx->coded_height / TEXTURE_BLOCK_H); -ctx->slice_size = avctx->coded_height / slices; +ctx->slice_count = av_clip(avctx->thread_count, 1, + avctx->coded_height / TEXTURE_BLOCK_H); /* Use the decompress function on the texture, one block per thread. */ ctx->tex_data = gbc->buffer; -avctx->execute2(avctx, decompress_texture_thread, frame, NULL, slices); +avctx->execute2(avctx, decompress_texture_thread, frame, NULL, ctx->slice_count); } else { int linesize = av_image_get_linesize(avctx->pix_fmt, frame->width, 0); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'ebe8b5d947c41449c684f17c6826fe6bc46c0360'
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 12:20:48 2015 +0200| [157fa73992ab30b32160034e115aac21808084e2] | committer: Michael Niedermayer Merge commit 'ebe8b5d947c41449c684f17c6826fe6bc46c0360' * commit 'ebe8b5d947c41449c684f17c6826fe6bc46c0360': dds: Fix the slice size computation Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=157fa73992ab30b32160034e115aac21808084e2 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'ae5a8dca675ee544178225256893e679b750cb63'
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 12:35:10 2015 +0200| [b04b021005508e190ad02b66106c2c611b404a72] | committer: Michael Niedermayer Merge commit 'ae5a8dca675ee544178225256893e679b750cb63' * commit 'ae5a8dca675ee544178225256893e679b750cb63': hap: Fix slice size computation Conflicts: libavcodec/hapdec.c Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b04b021005508e190ad02b66106c2c611b404a72 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] hap: Fix slice size computation
ffmpeg | branch: master | Tom Butterworth | Thu Jul 23 00:01:01 2015 +0100| [ae5a8dca675ee544178225256893e679b750cb63] | committer: Luca Barbato hap: Fix slice size computation A bug was introduced in 977105407cae55876041dddbf4ce0934cdd4cd6c whereby when frame height wasn't divisible by the number of threads, pixels would be omitted from the bottom rows during decode. Signed-off-by: Luca Barbato > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae5a8dca675ee544178225256893e679b750cb63 --- libavcodec/hap.h|2 +- libavcodec/hapdec.c | 26 +- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/libavcodec/hap.h b/libavcodec/hap.h index 75299fd..e06f933 100644 --- a/libavcodec/hap.h +++ b/libavcodec/hap.h @@ -46,7 +46,7 @@ typedef struct HapContext { uint8_t *snappied; /* Buffer interacting with snappy */ size_t max_snappy; /* Maximum compressed size for snappy buffer */ -int slice_size; /* Optimal slice size */ +int slice_count; /* Number of slices for threaded operations */ /* Pointer to the selected compress or decompress function */ int (*tex_fun)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block); diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c index 5133a51..a4880cd 100644 --- a/libavcodec/hapdec.c +++ b/libavcodec/hapdec.c @@ -143,14 +143,23 @@ static int decompress_texture_thread(AVCodecContext *avctx, void *arg, AVFrame *frame = arg; const uint8_t *d = ctx->tex_data; int w_block = avctx->coded_width / TEXTURE_BLOCK_W; +int h_block = avctx->coded_height / TEXTURE_BLOCK_H; int x, y; int start_slice, end_slice; +int base_blocks_per_slice = h_block / ctx->slice_count; +int remainder_blocks = h_block % ctx->slice_count; -start_slice = slice * ctx->slice_size; -end_slice = FFMIN(start_slice + ctx->slice_size, avctx->coded_height); +/* When the frame height (in blocks) doesn't divide evenly between the + * number of slices, spread the remaining blocks evenly between the first + * operations */ +start_slice = slice * base_blocks_per_slice; +/* Add any extra blocks (one per slice) that have been added before this slice */ +start_slice += FFMIN(slice, remainder_blocks); -start_slice /= TEXTURE_BLOCK_H; -end_slice /= TEXTURE_BLOCK_H; +end_slice = start_slice + base_blocks_per_slice; +/* Add an extra block if there are still remainder blocks to be accounted for */ +if (slice < remainder_blocks) +end_slice++; for (y = start_slice; y < end_slice; y++) { uint8_t *p = frame->data[0] + y * frame->linesize[0] * TEXTURE_BLOCK_H; @@ -170,10 +179,6 @@ static int hap_decode(AVCodecContext *avctx, void *data, HapContext *ctx = avctx->priv_data; ThreadFrame tframe; int ret, length; -int slices = FFMIN(avctx->thread_count, - avctx->coded_height / TEXTURE_BLOCK_H); - -ctx->slice_size = avctx->coded_height / slices; bytestream2_init(&ctx->gbc, avpkt->data, avpkt->size); @@ -197,7 +202,7 @@ static int hap_decode(AVCodecContext *avctx, void *data, ff_thread_finish_setup(avctx); /* Use the decompress function on the texture, one block per thread */ -avctx->execute2(avctx, decompress_texture_thread, tframe.f, NULL, slices); +avctx->execute2(avctx, decompress_texture_thread, tframe.f, NULL, ctx->slice_count); /* Frame is ready to be output */ tframe.f->pict_type = AV_PICTURE_TYPE_I; @@ -227,6 +232,9 @@ static av_cold int hap_init(AVCodecContext *avctx) ff_texturedsp_init(&ctx->dxtc); +ctx->slice_count = av_clip(avctx->thread_count, 1, + avctx->coded_height / TEXTURE_BLOCK_H); + return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] asfdec: remove the wrong condition
ffmpeg | branch: master | Alexandra Hájková | Wed Jul 22 16:10:25 2015 +0200| [7f388c0fabc51eca3106e7cc443393269435ab52] | committer: Anton Khirnov asfdec: remove the wrong condition this condition breaks reading from the pipe as data_reached variable have to be set to break while in the asf_read_header just after the Data Object is found Signed-off-by: Anton Khirnov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7f388c0fabc51eca3106e7cc443393269435ab52 --- libavformat/asfdec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index d9e9a5a..752d45c 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -905,7 +905,7 @@ static int asf_read_data(AVFormatContext *s, const GUIDParseTable *g) uint64_t size = asf->data_size = avio_rl64(pb); int i; -if (!asf->data_reached && pb->seekable) { +if (!asf->data_reached) { asf->data_reached = 1; asf->data_offset= asf->offset; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '7f388c0fabc51eca3106e7cc443393269435ab52'
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 12:44:56 2015 +0200| [0a03271ef64d67a5de0dd5dc4e12fe6503f46acb] | committer: Michael Niedermayer Merge commit '7f388c0fabc51eca3106e7cc443393269435ab52' * commit '7f388c0fabc51eca3106e7cc443393269435ab52': asfdec: remove the wrong condition Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0a03271ef64d67a5de0dd5dc4e12fe6503f46acb --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hevc_parse: Print the name of the NAL units in addition to the numerical nal_unit_type in the debug output
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 15:56:07 2015 +0200| [744051a57ad561a3a59bf0e89c56b67dabbd8692] | committer: Michael Niedermayer avcodec/hevc_parse: Print the name of the NAL units in addition to the numerical nal_unit_type in the debug output Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=744051a57ad561a3a59bf0e89c56b67dabbd8692 --- libavcodec/hevc_parse.c | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc_parse.c b/libavcodec/hevc_parse.c index 5ba5150..66a6536 100644 --- a/libavcodec/hevc_parse.c +++ b/libavcodec/hevc_parse.c @@ -146,6 +146,38 @@ nsc: return si; } +static const char *nal_unit_name(int nal_type) +{ +switch(nal_type) { +case NAL_TRAIL_N: return "TRAIL_N"; +case NAL_TRAIL_R: return "TRAIL_R"; +case NAL_TSA_N : return "TSA_N"; +case NAL_TSA_R : return "TSA_R"; +case NAL_STSA_N : return "STSA_N"; +case NAL_STSA_R : return "STSA_R"; +case NAL_RADL_N : return "RADL_N"; +case NAL_RADL_R : return "RADL_R"; +case NAL_RASL_N : return "RASL_N"; +case NAL_RASL_R : return "RASL_R"; +case NAL_BLA_W_LP : return "BLA_W_LP"; +case NAL_BLA_W_RADL : return "BLA_W_RADL"; +case NAL_BLA_N_LP : return "BLA_N_LP"; +case NAL_IDR_W_RADL : return "IDR_W_RADL"; +case NAL_IDR_N_LP : return "IDR_N_LP"; +case NAL_CRA_NUT: return "CRA_NUT"; +case NAL_VPS: return "VPS"; +case NAL_SPS: return "SPS"; +case NAL_PPS: return "PPS"; +case NAL_AUD: return "AUD"; +case NAL_EOS_NUT: return "EOS_NUT"; +case NAL_EOB_NUT: return "EOB_NUT"; +case NAL_FD_NUT : return "FD_NUT"; +case NAL_SEI_PREFIX : return "SEI_PREFIX"; +case NAL_SEI_SUFFIX : return "SEI_SUFFIX"; +default : return "?"; +} +} + /** * @return AVERROR_INVALIDDATA if the packet is not a valid NAL unit, * 0 if the unit should be skipped, 1 otherwise @@ -166,8 +198,8 @@ static int hls_nal_unit(HEVCNAL *nal, AVCodecContext *avctx) return AVERROR_INVALIDDATA; av_log(avctx, AV_LOG_DEBUG, - "nal_unit_type: %d, nuh_layer_id: %d, temporal_id: %d\n", - nal->type, nuh_layer_id, nal->temporal_id); + "nal_unit_type: %d(%s), nuh_layer_id: %d, temporal_id: %d\n", + nal->type, nal_unit_name(nal->type), nuh_layer_id, nal->temporal_id); return nuh_layer_id == 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc/hevc: rudimentary support for skip_loop_filter.
ffmpeg | branch: master | Nicolas George | Thu Jul 23 12:10:14 2015 +0200| [52c75d486ed5f75cbb79e5dbd07b7aef24f3071f] | committer: Nicolas George lavc/hevc: rudimentary support for skip_loop_filter. +~9% speed on Core i5 on test sample. All frames are treated as ref frames, skipping only applies at level "all". The following mail contains information on how to improve that: http://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/176116.html > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52c75d486ed5f75cbb79e5dbd07b7aef24f3071f --- doc/decoders.texi|7 +++ libavcodec/hevc_filter.c |3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/decoders.texi b/doc/decoders.texi index 2fb533a..2a73cc6 100644 --- a/doc/decoders.texi +++ b/doc/decoders.texi @@ -25,6 +25,13 @@ enabled decoders. A description of some of the currently available video decoders follows. +@section hevc + +HEVC / H.265 decoder. + +Note: the @option{skip_loop_filter} option has effect only at level +@code{all}. + @section rawvideo Raw video decoder. diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c index 45cb823..cc3aa8e 100644 --- a/libavcodec/hevc_filter.c +++ b/libavcodec/hevc_filter.c @@ -843,7 +843,8 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0, void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size) { int x_end = x >= s->ps.sps->width - ctb_size; -deblocking_filter_CTB(s, x, y); +if (s->avctx->skip_loop_filter < AVDISCARD_ALL) +deblocking_filter_CTB(s, x, y); if (s->ps.sps->sao_enabled) { int y_end = y >= s->ps.sps->height - ctb_size; if (y && x) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavcodec/qsvdec_h264.c: refactoring: functionality of qsv_process_data() has been moved into qsvdec.c
ffmpeg | branch: master | Ivan Uskov | Thu Jul 23 05:14:41 2015 -0400| [d50ab820dacf0d070805889ff69ec1f03401d835] | committer: Michael Niedermayer libavcodec/qsvdec_h264.c: refactoring: functionality of qsv_process_data() has been moved into qsvdec.c Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d50ab820dacf0d070805889ff69ec1f03401d835 --- libavcodec/qsvdec.c | 13 - libavcodec/qsvdec.h |4 libavcodec/qsvdec_h264.c | 20 +--- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 8b06611..4e7a0ac 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -92,7 +92,10 @@ int ff_qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt) ret = MFXVideoDECODE_DecodeHeader(q->session, &bs, ¶m); if (MFX_ERR_MORE_DATA==ret) { -return AVERROR(EAGAIN); +/* this code means that header not found so we return packet size to skip + a current packet + */ +return avpkt->size; } else if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Decode header error %d\n", ret); return ff_qsv_error(ret); @@ -123,6 +126,7 @@ int ff_qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt) if (!q->async_fifo) return AVERROR(ENOMEM); +q->engine_ready = 1; return 0; } @@ -230,6 +234,11 @@ int ff_qsv_decode(AVCodecContext *avctx, QSVContext *q, mfxBitstream bs = { { { 0 } } }; int ret; +if (!q->engine_ready) { +ret = ff_qsv_decode_init(avctx, q, avpkt); +if (ret) +return ret; +} if (avpkt->size) { bs.Data = avpkt->data; bs.DataLength = avpkt->size; @@ -325,5 +334,7 @@ int ff_qsv_decode_close(QSVContext *q) ff_qsv_close_internal_session(&q->internal_qs); +q->engine_ready = 0; + return 0; } diff --git a/libavcodec/qsvdec.h b/libavcodec/qsvdec.h index 4d3c505..a4971ad 100644 --- a/libavcodec/qsvdec.h +++ b/libavcodec/qsvdec.h @@ -50,6 +50,10 @@ typedef struct QSVContext { AVFifoBuffer *async_fifo; +// this flag indicates that header parsed, +// decoder instance created and ready to general decoding +int engine_ready; + // options set by the caller int async_depth; int iopattern; diff --git a/libavcodec/qsvdec_h264.c b/libavcodec/qsvdec_h264.c index 8b3f916..314eb6c 100644 --- a/libavcodec/qsvdec_h264.c +++ b/libavcodec/qsvdec_h264.c @@ -101,24 +101,6 @@ fail: return ret; } -static int qsv_process_data(AVCodecContext *avctx, AVFrame *frame, -int *got_frame, AVPacket *pkt) -{ -QSVH264Context *s = avctx->priv_data; -int ret; - -if (!s->qsv.session || AV_PIX_FMT_NONE==avctx->pix_fmt) { -ret = ff_qsv_decode_init(avctx, &s->qsv, pkt); -/* consume packet without a header */ -if (AVERROR(EAGAIN)==ret) -return pkt->size; -if (ret < 0) -return ret; -} - -return ff_qsv_decode(avctx, &s->qsv, frame, got_frame, pkt); -} - static int qsv_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { @@ -171,7 +153,7 @@ static int qsv_decode_frame(AVCodecContext *avctx, void *data, s->pkt_filtered.size = size; } -ret = qsv_process_data(avctx, frame, got_frame, &s->pkt_filtered); +ret = ff_qsv_decode(avctx, &s->qsv, frame, got_frame, &s->pkt_filtered); if (ret < 0) return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 idct functions
ffmpeg | branch: master | Shivraj Patil | Wed Jul 22 17:30:23 2015 +0530| [c03800d5921e5359a78c2d2af781d059bc53bfda] | committer: Michael Niedermayer avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 idct functions Signed-off-by: Shivraj Patil Reviewed-by: "Ronald S. Bultje" Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c03800d5921e5359a78c2d2af781d059bc53bfda --- libavcodec/mips/Makefile |3 +- libavcodec/mips/vp9_idct_msa.c | 2138 libavcodec/mips/vp9dsp_init_mips.c | 24 + libavcodec/mips/vp9dsp_mips.h | 28 + 4 files changed, 2192 insertions(+), 1 deletion(-) diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile index a946897..7cbad54 100644 --- a/libavcodec/mips/Makefile +++ b/libavcodec/mips/Makefile @@ -44,7 +44,8 @@ MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o\ mips/hevc_lpf_sao_msa.o \ mips/hevcpred_msa.o MSA-OBJS-$(CONFIG_VP9_DECODER)+= mips/vp9_mc_msa.o \ - mips/vp9_lpf_msa.o + mips/vp9_lpf_msa.o\ + mips/vp9_idct_msa.o MSA-OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_msa.o\ mips/h264idct_msa.o MSA-OBJS-$(CONFIG_H264QPEL) += mips/h264qpel_msa.o diff --git a/libavcodec/mips/vp9_idct_msa.c b/libavcodec/mips/vp9_idct_msa.c new file mode 100644 index 000..aeb2387 --- /dev/null +++ b/libavcodec/mips/vp9_idct_msa.c @@ -0,0 +1,2138 @@ +/* + * Copyright (c) 2015 Shivraj Patil (shivraj.pa...@imgtec.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include "libavcodec/vp9dsp.h" +#include "libavutil/mips/generic_macros_msa.h" +#include "vp9dsp_mips.h" + +#define VP9_DCT_CONST_BITS 14 +#define ROUND_POWER_OF_TWO(value, n) (((value) + (1 << ((n) - 1))) >> (n)) + +static const int32_t cospi_1_64 = 16364; +static const int32_t cospi_2_64 = 16305; +static const int32_t cospi_3_64 = 16207; +static const int32_t cospi_4_64 = 16069; +static const int32_t cospi_5_64 = 15893; +static const int32_t cospi_6_64 = 15679; +static const int32_t cospi_7_64 = 15426; +static const int32_t cospi_8_64 = 15137; +static const int32_t cospi_9_64 = 14811; +static const int32_t cospi_10_64 = 14449; +static const int32_t cospi_11_64 = 14053; +static const int32_t cospi_12_64 = 13623; +static const int32_t cospi_13_64 = 13160; +static const int32_t cospi_14_64 = 12665; +static const int32_t cospi_15_64 = 12140; +static const int32_t cospi_16_64 = 11585; +static const int32_t cospi_17_64 = 11003; +static const int32_t cospi_18_64 = 10394; +static const int32_t cospi_19_64 = 9760; +static const int32_t cospi_20_64 = 9102; +static const int32_t cospi_21_64 = 8423; +static const int32_t cospi_22_64 = 7723; +static const int32_t cospi_23_64 = 7005; +static const int32_t cospi_24_64 = 6270; +static const int32_t cospi_25_64 = 5520; +static const int32_t cospi_26_64 = 4756; +static const int32_t cospi_27_64 = 3981; +static const int32_t cospi_28_64 = 3196; +static const int32_t cospi_29_64 = 2404; +static const int32_t cospi_30_64 = 1606; +static const int32_t cospi_31_64 = 804; + +// 16384 * sqrt(2) * sin(kPi/9) * 2 / 3 +static const int32_t sinpi_1_9 = 5283; +static const int32_t sinpi_2_9 = 9929; +static const int32_t sinpi_3_9 = 13377; +static const int32_t sinpi_4_9 = 15212; + +#define VP9_DOTP_CONST_PAIR(reg0, reg1, cnst0, cnst1, out0, out1) \ +{ \ +v8i16 k0_m = __msa_fill_h(cnst0); \ +v4i32 s0_m, s1_m, s2_m, s3_m; \ + \ +s0_m = (v4i32) __msa_fill_h(cnst1);\ +k0_m = __msa_ilvev_h((v8i16) s0_m, k0_m); \ + \ +ILVRL_H2_SW((-reg1), reg0, s1_m, s0_m);
[FFmpeg-cvslog] avcodec/mips/vp9_idct_msa: Replace __volatile__ by volatile
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 17:38:01 2015 +0200| [8eff61fd45f1d1872c9f370bdf7e33501a3e6d7a] | committer: Michael Niedermayer avcodec/mips/vp9_idct_msa: Replace __volatile__ by volatile Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8eff61fd45f1d1872c9f370bdf7e33501a3e6d7a --- libavcodec/mips/vp9_idct_msa.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mips/vp9_idct_msa.c b/libavcodec/mips/vp9_idct_msa.c index aeb2387..25ea16c 100644 --- a/libavcodec/mips/vp9_idct_msa.c +++ b/libavcodec/mips/vp9_idct_msa.c @@ -1177,7 +1177,7 @@ static void vp9_idct16x16_10_colcol_addblk_msa(int16_t *input, uint8_t *dst, /* short case just considers top 4 rows as valid output */ out += 4 * 16; for (i = 12; i--;) { -__asm__ __volatile__ ( +__asm__ volatile ( "sw $zero, 0(%[out]) \n\t" "sw $zero, 4(%[out]) \n\t" "sw $zero, 8(%[out]) \n\t" @@ -1938,7 +1938,7 @@ static void vp9_idct32x32_34_colcol_addblk_msa(int16_t *input, uint8_t *dst, int16_t tmp_buf[8 * 32] ALLOC_ALIGNED(ALIGNMENT); for (i = 32; i--;) { -__asm__ __volatile__ ( +__asm__ volatile ( "sw $zero, (%[out_ptr]) \n\t" "sw $zero, 4(%[out_ptr]) \n\t" "sw $zero, 8(%[out_ptr]) \n\t" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '083cbc930d077651ea7e3fbc32ec45352cfed7e7'
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 17:51:40 2015 +0200| [efa1e26122e3ae68dfd1c4ff622aa2060d4a80c3] | committer: Michael Niedermayer Merge commit '083cbc930d077651ea7e3fbc32ec45352cfed7e7' * commit '083cbc930d077651ea7e3fbc32ec45352cfed7e7': snappy: Refactor so ff_snappy_uncompress() uses an existing buffer Conflicts: libavcodec/hapdec.c libavcodec/snappy.c See: 17ee24af7e5f7112fe25c734236d521f9e35d80d Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=efa1e26122e3ae68dfd1c4ff622aa2060d4a80c3 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] snappy: Refactor so ff_snappy_uncompress() uses an existing buffer
ffmpeg | branch: master | Tom Butterworth | Tue Jul 21 01:21:38 2015 +0100| [083cbc930d077651ea7e3fbc32ec45352cfed7e7] | committer: Vittorio Giovara snappy: Refactor so ff_snappy_uncompress() uses an existing buffer Some uses of Snappy require uncompressing to positions within an existing buffer. Also adds a function to get the uncompressed length of Snappy data. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=083cbc930d077651ea7e3fbc32ec45352cfed7e7 --- libavcodec/hapdec.c |7 ++- libavcodec/snappy.c | 24 +--- libavcodec/snappy.h | 19 ++- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c index a4880cd..0398efe 100644 --- a/libavcodec/hapdec.c +++ b/libavcodec/hapdec.c @@ -108,8 +108,13 @@ static int setup_texture(AVCodecContext *avctx, size_t length) compressorstr = "none"; break; case HAP_COMP_SNAPPY: +snappy_size = ff_snappy_peek_uncompressed_length(gbc); +ret = av_reallocp(&ctx->snappied, snappy_size); +if (ret < 0) { +return ret; +} /* Uncompress the frame */ -ret = ff_snappy_uncompress(gbc, &ctx->snappied, &snappy_size); +ret = ff_snappy_uncompress(gbc, ctx->snappied, &snappy_size); if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Snappy uncompress error\n"); return ret; diff --git a/libavcodec/snappy.c b/libavcodec/snappy.c index 13ef1ec..df6c6b3 100644 --- a/libavcodec/snappy.c +++ b/libavcodec/snappy.c @@ -128,7 +128,17 @@ static int64_t decode_len(GetByteContext *gb) return len; } -int ff_snappy_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size) +int64_t ff_snappy_peek_uncompressed_length(GetByteContext *gb) +{ +int pos = bytestream2_get_bytes_left(gb); +int64_t len = decode_len(gb); + +bytestream2_seek(gb, -pos, SEEK_END); + +return len; +} + +int ff_snappy_uncompress(GetByteContext *gb, uint8_t *buf, int64_t *size) { int64_t len = decode_len(gb); int ret = 0; @@ -137,11 +147,11 @@ int ff_snappy_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size) if (len < 0) return len; -if ((ret = av_reallocp(buf, len)) < 0) -return AVERROR(ENOMEM); +if (len > *size) +return AVERROR_BUG; *size = len; -p = *buf; +p = buf; while (bytestream2_get_bytes_left(gb) > 0) { uint8_t s = bytestream2_get_byte(gb); @@ -152,13 +162,13 @@ int ff_snappy_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size) ret = snappy_literal(gb, p, len, val); break; case SNAPPY_COPY_1: -ret = snappy_copy1(gb, *buf, p, len, val); +ret = snappy_copy1(gb, buf, p, len, val); break; case SNAPPY_COPY_2: -ret = snappy_copy2(gb, *buf, p, len, val); +ret = snappy_copy2(gb, buf, p, len, val); break; case SNAPPY_COPY_4: -ret = snappy_copy4(gb, *buf, p, len, val); +ret = snappy_copy4(gb, buf, p, len, val); break; } diff --git a/libavcodec/snappy.h b/libavcodec/snappy.h index 9a8..8d365c0 100644 --- a/libavcodec/snappy.h +++ b/libavcodec/snappy.h @@ -38,14 +38,23 @@ #include "bytestream.h" /** - * Decompress an input buffer using Snappy algorithm. Caller is - * responsible of freeing the memory allocated in buf. + * Get the uncompressed length of an input buffer compressed using the Snappy + * algorithm. The GetByteContext is not advanced. * * @param gbinput GetByteContext. - * @param buf output buffer pointer. - * @param size output buffer size. + * @return A positive length on success, AVERROR otherwise. + */ + int64_t ff_snappy_peek_uncompressed_length(GetByteContext *gb); + +/** + * Decompress an input buffer using Snappy algorithm. + * + * @param gbinput GetByteContext. + * @param buf input buffer pointer. + * @param size input/output on input, the size of buffer, on output, the size + * of the uncompressed data. * @return 0 if success, AVERROR otherwise. */ -int ff_snappy_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size); +int ff_snappy_uncompress(GetByteContext *gb, uint8_t *buf, int64_t *size); #endif /* AVCODEC_SNAPPY_H */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] hap: Name enums, remove unused struct member
ffmpeg | branch: master | Tom Butterworth | Tue Jul 21 01:21:39 2015 +0100| [11f3d5c69b711a1f1631961921ecd20d31f8336d] | committer: Vittorio Giovara hap: Name enums, remove unused struct member > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11f3d5c69b711a1f1631961921ecd20d31f8336d --- libavcodec/hap.h | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/libavcodec/hap.h b/libavcodec/hap.h index e06f933..a0fc2e0 100644 --- a/libavcodec/hap.h +++ b/libavcodec/hap.h @@ -29,12 +29,23 @@ #include "bytestream.h" #include "texturedsp.h" +enum HapTextureFormat { +HAP_FMT_RGBDXT1 = 0x0B, +HAP_FMT_RGBADXT5 = 0x0E, +HAP_FMT_YCOCGDXT5 = 0x0F, +}; + +enum HapCompressor { +HAP_COMP_NONE= 0xA0, +HAP_COMP_SNAPPY = 0xB0, +HAP_COMP_COMPLEX = 0xC0, +}; + typedef struct HapContext { AVClass *class; TextureDSPContext dxtc; GetByteContext gbc; -PutByteContext pbc; int section_type;/* Header type */ @@ -52,16 +63,4 @@ typedef struct HapContext { int (*tex_fun)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block); } HapContext; -enum { -HAP_FMT_RGBDXT1 = 0x0B, -HAP_FMT_RGBADXT5 = 0x0E, -HAP_FMT_YCOCGDXT5 = 0x0F, -}; - -enum { -HAP_COMP_NONE= 0xA0, -HAP_COMP_SNAPPY = 0xB0, -HAP_COMP_COMPLEX = 0xC0, -}; - #endif /* AVCODEC_HAP_H */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '11f3d5c69b711a1f1631961921ecd20d31f8336d'
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 18:01:49 2015 +0200| [cb59d29fd6b9472cd6aa29370208e59b63fe3678] | committer: Michael Niedermayer Merge commit '11f3d5c69b711a1f1631961921ecd20d31f8336d' * commit '11f3d5c69b711a1f1631961921ecd20d31f8336d': hap: Name enums, remove unused struct member Conflicts: libavcodec/hap.h See: 440c26e9c46bb26bc1fc8306561ed6962ae7d3bf See: d8488090e5070187e9d8d0a93b8d841f26bde990 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cb59d29fd6b9472cd6aa29370208e59b63fe3678 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_reverse: check also pts_size when reallocating
ffmpeg | branch: master | Paul B Mahol | Tue Jul 21 14:40:00 2015 +| [625bf6a55c3dd25613ba328f93d0fd23b5bb7c0f] | committer: Paul B Mahol avfilter/vf_reverse: check also pts_size when reallocating Fixes crash of x32. Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=625bf6a55c3dd25613ba328f93d0fd23b5bb7c0f --- libavfilter/vf_reverse.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_reverse.c b/libavfilter/vf_reverse.c index 0d6dff2..4930238 100644 --- a/libavfilter/vf_reverse.c +++ b/libavfilter/vf_reverse.c @@ -72,15 +72,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) { AVFilterContext *ctx = inlink->dst; ReverseContext *s= ctx->priv; +void *ptr; -if (s->nb_frames + 1 > s->frames_size / sizeof(*(s->frames))) { -void *ptr; - +if (s->nb_frames + 1 > s->pts_size / sizeof(*(s->pts))) { ptr = av_fast_realloc(s->pts, &s->pts_size, s->pts_size * 2); if (!ptr) return AVERROR(ENOMEM); s->pts = ptr; +} +if (s->nb_frames + 1 > s->frames_size / sizeof(*(s->frames))) { ptr = av_fast_realloc(s->frames, &s->frames_size, s->frames_size * 2); if (!ptr) return AVERROR(ENOMEM); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters.texi: fix two typos in reverse filter description
ffmpeg | branch: master | Paul B Mahol | Thu Jul 23 07:35:54 2015 +| [e59315c4abce83c150100a92fdec27760c8878c8] | committer: Paul B Mahol doc/filters.texi: fix two typos in reverse filter description Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e59315c4abce83c150100a92fdec27760c8878c8 --- doc/filters.texi |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index 1035e92..538b579 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8493,7 +8493,8 @@ fields based on its value. Reverse a clip. -Warning: This iflter qequires memory to buffer the entire clip, so trimming is suggested. +Warning: This filter requires memory to buffer the entire clip, so trimming +is suggested. @subsection Examples ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hap: (trivial) clarify comment
ffmpeg | branch: master | Tom Butterworth | Thu Jul 23 14:44:23 2015 -0400| [26e8247c1c0b80052571562b84a91a76f92bddfa] | committer: Michael Niedermayer avcodec/hap: (trivial) clarify comment Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26e8247c1c0b80052571562b84a91a76f92bddfa --- libavcodec/hapenc.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/hapenc.c b/libavcodec/hapenc.c index 174fba1..8261fe9 100644 --- a/libavcodec/hapenc.c +++ b/libavcodec/hapenc.c @@ -133,8 +133,10 @@ static int hap_compress_frame(AVCodecContext *avctx, uint8_t *dst) static int hap_decode_instructions_length(HapContext *ctx) { -/* = Second-Stage Compressor Table + Chunk Size Table + headers for both sections - * = chunk_count + (4 * chunk_count) + 4 + 4 */ +/*Second-Stage Compressor Table (one byte per entry) + * + Chunk Size Table (four bytes per entry) + * + headers for both sections (short versions) + * = chunk_count + (4 * chunk_count) + 4 + 4 */ return (5 * ctx->chunk_count) + 8; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hap: (trivial) rename enum values and document their meaning
ffmpeg | branch: master | Tom Butterworth | Thu Jul 23 14:44:24 2015 -0400| [64539e12132cb5058042f7e276cea9bc44873026] | committer: Michael Niedermayer avcodec/hap: (trivial) rename enum values and document their meaning Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64539e12132cb5058042f7e276cea9bc44873026 --- libavcodec/hapenc.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/libavcodec/hapenc.c b/libavcodec/hapenc.c index 8261fe9..39c1c5a 100644 --- a/libavcodec/hapenc.c +++ b/libavcodec/hapenc.c @@ -46,8 +46,10 @@ #define HAP_MAX_CHUNKS 64 enum HapHeaderLength { -HAP_HDR_4_BYTE = 4, -HAP_HDR_8_BYTE = 8, +/* Short header: four bytes with a 24 bit size value */ +HAP_HDR_SHORT = 4, +/* Long header: eight bytes with a 32 bit size value */ +HAP_HDR_LONG = 8, }; static void compress_texture(AVCodecContext *avctx, const AVFrame *f) @@ -75,10 +77,10 @@ static void hap_write_section_header(PutByteContext *pbc, * header) or zero if using an eight-byte header. * For an eight-byte header, the length is in the last four bytes. * The fourth byte stores the section type. */ -bytestream2_put_le24(pbc, header_length == HAP_HDR_8_BYTE ? 0 : section_length); +bytestream2_put_le24(pbc, header_length == HAP_HDR_LONG ? 0 : section_length); bytestream2_put_byte(pbc, section_type); -if (header_length == HAP_HDR_8_BYTE) { +if (header_length == HAP_HDR_LONG) { bytestream2_put_le32(pbc, section_length); } } @@ -143,11 +145,11 @@ static int hap_decode_instructions_length(HapContext *ctx) static int hap_header_length(HapContext *ctx) { /* Top section header (long version) */ -int length = HAP_HDR_8_BYTE; +int length = HAP_HDR_LONG; if (ctx->chunk_count > 1) { /* Decode Instructions header (short) + Decode Instructions Container */ -length += HAP_HDR_4_BYTE + hap_decode_instructions_length(ctx); +length += HAP_HDR_SHORT + hap_decode_instructions_length(ctx); } return length; @@ -161,22 +163,22 @@ static void hap_write_frame_header(HapContext *ctx, uint8_t *dst, int frame_leng bytestream2_init_writer(&pbc, dst, frame_length); if (ctx->chunk_count == 1) { /* Write a simple header */ -hap_write_section_header(&pbc, HAP_HDR_8_BYTE, frame_length - 8, +hap_write_section_header(&pbc, HAP_HDR_LONG, frame_length - 8, ctx->chunks[0].compressor | ctx->opt_tex_fmt); } else { /* Write a complex header with Decode Instructions Container */ -hap_write_section_header(&pbc, HAP_HDR_8_BYTE, frame_length - 8, +hap_write_section_header(&pbc, HAP_HDR_LONG, frame_length - 8, HAP_COMP_COMPLEX | ctx->opt_tex_fmt); -hap_write_section_header(&pbc, HAP_HDR_4_BYTE, hap_decode_instructions_length(ctx), +hap_write_section_header(&pbc, HAP_HDR_SHORT, hap_decode_instructions_length(ctx), HAP_ST_DECODE_INSTRUCTIONS); -hap_write_section_header(&pbc, HAP_HDR_4_BYTE, ctx->chunk_count, +hap_write_section_header(&pbc, HAP_HDR_SHORT, ctx->chunk_count, HAP_ST_COMPRESSOR_TABLE); for (i = 0; i < ctx->chunk_count; i++) { bytestream2_put_byte(&pbc, ctx->chunks[i].compressor >> 4); } -hap_write_section_header(&pbc, HAP_HDR_4_BYTE, ctx->chunk_count * 4, +hap_write_section_header(&pbc, HAP_HDR_SHORT, ctx->chunk_count * 4, HAP_ST_SIZE_TABLE); for (i = 0; i < ctx->chunk_count; i++) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '44f7df0c987965763c609f6dc36974b04182e58d'
ffmpeg | branch: master | Michael Niedermayer | Thu Jul 23 21:30:28 2015 +0200| [c6965f62a2e34667814ab1854a9f127e2ea54efa] | committer: Michael Niedermayer Merge commit '44f7df0c987965763c609f6dc36974b04182e58d' * commit '44f7df0c987965763c609f6dc36974b04182e58d': dds: Write the palette in the native endian form Conflicts: libavcodec/dds.c See: 36a87c2dc7f302da3778bd0cff050b5c93a730c7 Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c6965f62a2e34667814ab1854a9f127e2ea54efa --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] dds: Write the palette in the native endian form
ffmpeg | branch: master | Martin Storsjö | Thu Jul 23 17:59:44 2015 +0300| [44f7df0c987965763c609f6dc36974b04182e58d] | committer: Martin Storsjö dds: Write the palette in the native endian form This fixes the palette on big endian, broken (or, differing from little endian) since 57214b2f7. Signed-off-by: Martin Storsjö > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=44f7df0c987965763c609f6dc36974b04182e58d --- libavcodec/dds.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libavcodec/dds.c b/libavcodec/dds.c index 2c3a2f2..f124d4a 100644 --- a/libavcodec/dds.c +++ b/libavcodec/dds.c @@ -653,14 +653,16 @@ static int dds_decode(AVCodecContext *avctx, void *data, if (ctx->paletted) { int i; -uint8_t *p = frame->data[1]; +uint32_t *p = (uint32_t*) frame->data[1]; /* Use the first 1024 bytes as palette, then copy the rest. */ for (i = 0; i < 256; i++) { -p[i * 4 + 2] = bytestream2_get_byte(gbc); -p[i * 4 + 1] = bytestream2_get_byte(gbc); -p[i * 4 + 0] = bytestream2_get_byte(gbc); -p[i * 4 + 3] = bytestream2_get_byte(gbc); +uint32_t rgba = 0; +rgba |= bytestream2_get_byte(gbc) << 16; +rgba |= bytestream2_get_byte(gbc) << 8; +rgba |= bytestream2_get_byte(gbc) << 0; +rgba |= bytestream2_get_byte(gbc) << 24; +p[i] = rgba; } frame->palette_has_changed = 1; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: force -nologo- when detecting MSVC
ffmpeg | branch: master | Steve Lhomme | Thu Jul 23 19:25:44 2015 +0200| [a54e720e0289433d6bc3f7ba0a37fa5cabfaeea9] | committer: Martin Storsjö configure: force -nologo- when detecting MSVC The -nologo- option is the inverse of -nologo, reenabling printing the "logo" version header. This is useful if the compiler actually is a wrapper that forces -nologo. Signed-off-by: Martin Storsjö > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a54e720e0289433d6bc3f7ba0a37fa5cabfaeea9 --- configure |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 16bf852..ac2a71d 100755 --- a/configure +++ b/configure @@ -3033,14 +3033,14 @@ probe_cc(){ # 4509: "This form of conditional instruction is deprecated" _flags="-nologo -ignore 4509" _flags_filter=armasm_flags -elif $_cc 2>&1 | grep -q Microsoft; then +elif $_cc -nologo- 2>&1 | grep -q Microsoft; then _type=msvc _ident=$($_cc 2>&1 | head -n1) _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)' _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs' _cflags_speed="-O2" _cflags_size="-O1" -if $_cc 2>&1 | grep -q Linker; then +if $_cc -nologo- 2>&1 | grep -q Linker; then _ld_o='-out:$@' else _ld_o='-Fe$@' ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'a54e720e0289433d6bc3f7ba0a37fa5cabfaeea9'
ffmpeg | branch: master | Michael Niedermayer | Fri Jul 24 00:44:58 2015 +0200| [da8b70b810bb2703f976d737af8c68d35716f5ea] | committer: Michael Niedermayer Merge commit 'a54e720e0289433d6bc3f7ba0a37fa5cabfaeea9' * commit 'a54e720e0289433d6bc3f7ba0a37fa5cabfaeea9': configure: force -nologo- when detecting MSVC Conflicts: configure Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=da8b70b810bb2703f976d737af8c68d35716f5ea --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/hapdec: Check that there is sufficient input data
ffmpeg | branch: master | Michael Niedermayer | Fri Jul 24 03:25:49 2015 +0200| [5da90d7ec3a3f5eb68bf6bd0665636d8836a39f5] | committer: Michael Niedermayer avcodec/hapdec: Check that there is sufficient input data Fixes Ticket4729 Found-by: ami_stuff Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5da90d7ec3a3f5eb68bf6bd0665636d8836a39f5 --- libavcodec/hapdec.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c index eb779e6..f4f6ef6 100644 --- a/libavcodec/hapdec.c +++ b/libavcodec/hapdec.c @@ -307,6 +307,7 @@ static int hap_decode(AVCodecContext *avctx, void *data, HapContext *ctx = avctx->priv_data; ThreadFrame tframe; int ret, i; +int tex_size; bytestream2_init(&ctx->gbc, avpkt->data, avpkt->size); @@ -327,6 +328,7 @@ static int hap_decode(AVCodecContext *avctx, void *data, if (hap_can_use_tex_in_place(ctx)) { /* Only DXTC texture compression in a contiguous block */ ctx->tex_data = ctx->gbc.buffer; +tex_size = bytestream2_get_bytes_left(&ctx->gbc); } else { /* Perform the second-stage decompression */ ret = av_reallocp(&ctx->tex_buf, ctx->tex_size); @@ -342,6 +344,14 @@ static int hap_decode(AVCodecContext *avctx, void *data, } ctx->tex_data = ctx->tex_buf; +tex_size = ctx->tex_size; +} + +if (tex_size < (avctx->coded_width / TEXTURE_BLOCK_W) + *(avctx->coded_height / TEXTURE_BLOCK_H) + *ctx->tex_rat) { +av_log(avctx, AV_LOG_ERROR, "Insufficient data\n"); +return AVERROR_INVALIDDATA; } /* Use the decompress function on the texture, one block per thread */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog