Re: [FFmpeg-devel] [PATCH] avfilter/allfilters: Prefer s32 format over float
> Because float actually int24 in the range [-1, 1] This sentence is missing a verb and possibly an adverb or adjective. I don't understand the point. ;-) Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] problem with block level audio decoding on a that is not streaming
On Wed, Mar 08, 2017 at 15:32:18 -0500, Brett Tiplitz wrote: > I've tried to update my code from avcodec_decode_audio4 to the new > avcodec_send_packet. I've got a block of data to decode, so this is not a > streaming design. > > 1. When I pass a big block of data to the interface, the time required to > process the buffer goes from 1.5s to 30s. [...] It's probably worth opening a ticket on trac, if you think it's a bug. If you think it's a usage issue, you should ask on libav-user. You're not likely to get a lot of attention here. ;-) Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] swresample/options: enable linear_interp and exact_rational by default
On Fri, Mar 10, 2017 at 11:11:05AM +0700, Muhammad Faiz wrote: > On Fri, Mar 10, 2017 at 10:44 AM, Michael Niedermayer > wrote: > > On Fri, Mar 10, 2017 at 09:19:38AM +0700, Muhammad Faiz wrote: > >> for higher quality resampling > > > > can you hear the difference ? > > Yes, but it is sinesweep test audio, not real music audio. my question was meant to be, can you hear the difference on real world audio ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] swresample/options: enable linear_interp and exact_rational by default
On 3/10/17, Michael Niedermayer wrote: > On Fri, Mar 10, 2017 at 11:11:05AM +0700, Muhammad Faiz wrote: >> On Fri, Mar 10, 2017 at 10:44 AM, Michael Niedermayer >> wrote: >> > On Fri, Mar 10, 2017 at 09:19:38AM +0700, Muhammad Faiz wrote: >> >> for higher quality resampling >> > >> > can you hear the difference ? >> >> Yes, but it is sinesweep test audio, not real music audio. > > my question was meant to be, can you hear the difference on real > world audio ? > Yes I can hear it. I made blind test. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavfilter/vf_detelecine: Added documentation to clarify the workings of the filter.
On 3/9/17, gabriel.dalimo...@gmail.com wrote: > From: Gabriel D'Alimonte > > Hi! > > I hope this patch adding code documentation to the detelecine filter will > help with maintenance. > > --- > libavfilter/vf_detelecine.c | 115 > +--- > 1 file changed, 86 insertions(+), 29 deletions(-) > Idea is fine, but I do not like style of comments. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/libopenjpegenc.c
On 3/10/17, Michael Bradshaw wrote: > On Thu, Mar 9, 2017 at 8:09 PM, Aaron Boxer wrote: >> >> Thanks, Michael. Here are those changes. > > > Applied. Thanks for the patch! AFAIK some of those could make use of BOOL. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further
On 3/10/17, Wang Bin wrote: > > I don't think this is good idea. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] swresample/options: enable linear_interp and exact_rational by default
On Fri, Mar 10, 2017 at 01:49:41PM +0100, Paul B Mahol wrote: > On 3/10/17, Michael Niedermayer wrote: > > On Fri, Mar 10, 2017 at 11:11:05AM +0700, Muhammad Faiz wrote: > >> On Fri, Mar 10, 2017 at 10:44 AM, Michael Niedermayer > >> wrote: > >> > On Fri, Mar 10, 2017 at 09:19:38AM +0700, Muhammad Faiz wrote: > >> >> for higher quality resampling > >> > > >> > can you hear the difference ? > >> > >> Yes, but it is sinesweep test audio, not real music audio. > > > > my question was meant to be, can you hear the difference on real > > world audio ? > > > > Yes I can hear it. I made blind test. iam surprised, i didnt expect this to be audible with real world audio what audio/music is this audible with ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/libopenjpegenc.c
On Fri, Mar 10, 2017 at 7:52 AM, Paul B Mahol wrote: > On 3/10/17, Michael Bradshaw wrote: > > On Thu, Mar 9, 2017 at 8:09 PM, Aaron Boxer wrote: > >> > >> Thanks, Michael. Here are those changes. > > > > > > Applied. Thanks for the patch! > > AFAIK some of those could make use of BOOL. > Yes, good point. Although, the OpenJPEG parameters are not BOOL, and since the AVOptions are mostly mirrors of OpenJPEG parameters, it might make sense to leave them as they are. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/libopenjpegenc.c
On Fri, Mar 10, 2017 at 12:00 AM, Michael Bradshaw wrote: > On Thu, Mar 9, 2017 at 8:09 PM, Aaron Boxer wrote: > > > > Thanks, Michael. Here are those changes. > > > Applied. Thanks for the patch! > My pleasure. If there are any changes people are interested in for openjpeg encode/decode, let me know and I would be happy to work on it. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further
On Fri, 10 Mar 2017 13:47:38 +0100 Paul B Mahol wrote: > On 3/10/17, Wang Bin wrote: > > > > > > I don't think this is good idea. Why not? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavfilter/vf_detelecine: Added documentation to clarify the workings of the filter.
2017-03-09 9:20 GMT+01:00 : > I hope this patch adding code documentation to the detelecine filter > will help with maintenance. If you are interested in working on detelecine, please look at ticket #5662: It is currently not possible to choose (with an option) which of two subsequent duplicated frames are dropped / for the sample there, the progressive (complete) frame is dropped, instead a composed frame is dropped: They should be identical, but because of reencoding the composed frame looks bad, I believe we cannot rule out that this can also happen for distributed material. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further
On 3/10/17, wm4 wrote: > On Fri, 10 Mar 2017 13:47:38 +0100 > Paul B Mahol wrote: > >> On 3/10/17, Wang Bin wrote: >> > >> > >> >> I don't think this is good idea. > > Why not? Because it changes something that was working before. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further
On Fri, 10 Mar 2017 14:50:32 +0100 Paul B Mahol wrote: > On 3/10/17, wm4 wrote: > > On Fri, 10 Mar 2017 13:47:38 +0100 > > Paul B Mahol wrote: > > > >> On 3/10/17, Wang Bin wrote: > >> > > >> > > >> > >> I don't think this is good idea. > > > > Why not? > > Because it changes something that was working before. That's not a good reason at all. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further
On 3/10/2017 10:50 AM, Paul B Mahol wrote: > On 3/10/17, wm4 wrote: >> On Fri, 10 Mar 2017 13:47:38 +0100 >> Paul B Mahol wrote: >> >>> On 3/10/17, Wang Bin wrote: >>> >>> I don't think this is good idea. >> >> Why not? > > Because it changes something that was working before. The only valid reason i could see to not go with this change is if the size gains are minimal and the speed loss considerable. Otherwise, if the end result is smaller than -Os then there's no reason to not use it. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/3] ffmpeg, ffprobe: don't "merge" side data into packet data by default
Hi On Thu, Mar 09, 2017 at 03:45:19PM +0100, wm4 wrote: > Preparation for potentially disabling merged side data by default in the > libs. Do this in particular because it affects fate tests. > > The changed tests either reflect added packet side data, or the changed > packet size due to merged side data removal reducing the packet size. > > The previous patches are needed because there is apparently no other way > for ffmpeg.c to pass the flag down to sub demuxers without potentially > overriding command line settings. > --- > ffmpeg_opt.c | 2 + > ffprobe.c | 8 ++ > libavformat/tests/seek.c | 2 + > tests/ref/fate/concat-demuxer-simple2-lavf-ts | 192 > +- > tests/ref/fate/gaplessenc-itunes-to-ipod-aac | 4 +- > tests/ref/fate/gaplessenc-pcm-to-mov-aac | 4 +- > tests/ref/fate/gaplessinfo-itunes1| 4 +- > tests/ref/fate/gaplessinfo-itunes2| 4 +- > tests/ref/fate/mov-aac-2048-priming | 3 +- > tests/ref/seek/cache-pipe | 10 +- > tests/ref/seek/extra-mp3 | 18 +-- > tests/ref/seek/lavf-ts| 54 > tests/ref/seek/mkv-codec-delay| 14 +- > 13 files changed, 198 insertions(+), 121 deletions(-) just wanted to say that iam not sure i will have time to test this in the near future, thus others should review / approve saying so theres no misunderstanding if i dont reply with an approval or tested-by sorry & thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The educated differ from the uneducated as much as the living from the dead. -- Aristotle signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] avcodec/dca_xll: Fix runtime error: signed integer overflow: 2147286116 + 6298923 cannot be represented in type 'int'
Fixes: 732/clusterfuzz-testcase-4872990070145024 See: [FFmpeg-devel] [PATCH 2/6] avcodec/dca_xll: Fix runtime error: signed integer overflow: 2147286116 + 6298923 cannot be represented in type 'int' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/dca_xll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c index 6cebda35e4..0fe90c7348 100644 --- a/libavcodec/dca_xll.c +++ b/libavcodec/dca_xll.c @@ -1312,7 +1312,7 @@ static int combine_residual_frame(DCAXllDecoder *s, DCAXllChSet *c) } else { // No downmix scaling for (n = 0; n < nsamples; n++) -dst[n] += (src[n] + round) >> shift; +dst[n] += (unsigned)((src[n] + round) >> shift); } } -- 2.11.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] avcodec/h264_direct: Fix runtime error: signed integer overflow: 2147483647 - -14133 cannot be represented in type 'int'
Fixes: 755/clusterfuzz-testcase-5369072516595712 See: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_direct: Fix runtime error: signed integer overflow: 2147483647 - -14133 cannot be represented in type 'int' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/h264_direct.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index cbb84665b3..66e54479d1 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -39,7 +39,12 @@ static int get_scale_factor(H264SliceContext *sl, int poc, int poc1, int i) { int poc0 = sl->ref_list[0][i].poc; -int td = av_clip_int8(poc1 - poc0); +int64_t pocdiff = poc1 - (int64_t)poc0; +int td = av_clip_int8(pocdiff); + +if (pocdiff != (int)pocdiff) +avpriv_request_sample(sl->h264->avctx, "pocdiff overflow\n"); + if (td == 0 || sl->ref_list[0][i].parent->long_ref) { return 256; } else { -- 2.11.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/3] ffmpeg, ffprobe: don't "merge" side data into packet data by default
On Fri, 10 Mar 2017 15:29:17 +0100 Michael Niedermayer wrote: > Hi > > On Thu, Mar 09, 2017 at 03:45:19PM +0100, wm4 wrote: > > Preparation for potentially disabling merged side data by default in the > > libs. Do this in particular because it affects fate tests. > > > > The changed tests either reflect added packet side data, or the changed > > packet size due to merged side data removal reducing the packet size. > > > > The previous patches are needed because there is apparently no other way > > for ffmpeg.c to pass the flag down to sub demuxers without potentially > > overriding command line settings. > > --- > > ffmpeg_opt.c | 2 + > > ffprobe.c | 8 ++ > > libavformat/tests/seek.c | 2 + > > tests/ref/fate/concat-demuxer-simple2-lavf-ts | 192 > > +- > > tests/ref/fate/gaplessenc-itunes-to-ipod-aac | 4 +- > > tests/ref/fate/gaplessenc-pcm-to-mov-aac | 4 +- > > tests/ref/fate/gaplessinfo-itunes1| 4 +- > > tests/ref/fate/gaplessinfo-itunes2| 4 +- > > tests/ref/fate/mov-aac-2048-priming | 3 +- > > tests/ref/seek/cache-pipe | 10 +- > > tests/ref/seek/extra-mp3 | 18 +-- > > tests/ref/seek/lavf-ts| 54 > > tests/ref/seek/mkv-codec-delay| 14 +- > > 13 files changed, 198 insertions(+), 121 deletions(-) > > just wanted to say that iam not sure i will have time to test this > in the near future, thus others should review / approve > > saying so theres no misunderstanding if i dont reply with an approval > or tested-by > > sorry & thx OK, then I'll push on Monday. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/dca_xll: Fix runtime error: signed integer overflow: 2147286116 + 6298923 cannot be represented in type 'int'
On Fri, 10 Mar 2017 15:24:51 +0100 Michael Niedermayer wrote: > Fixes: 732/clusterfuzz-testcase-4872990070145024 > > See: [FFmpeg-devel] [PATCH 2/6] avcodec/dca_xll: Fix runtime error: signed > integer overflow: 2147286116 + 6298923 cannot be represented in type 'int' > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/dca_xll.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c > index 6cebda35e4..0fe90c7348 100644 > --- a/libavcodec/dca_xll.c > +++ b/libavcodec/dca_xll.c > @@ -1312,7 +1312,7 @@ static int combine_residual_frame(DCAXllDecoder *s, > DCAXllChSet *c) > } else { > // No downmix scaling > for (n = 0; n < nsamples; n++) > -dst[n] += (src[n] + round) >> shift; > +dst[n] += (unsigned)((src[n] + round) >> shift); > } > } > Seems reasonable. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] swresample/options: enable linear_interp and exact_rational by default
On Fri, Mar 10, 2017 at 5:44 PM, Michael Niedermayer wrote: > On Fri, Mar 10, 2017 at 11:11:05AM +0700, Muhammad Faiz wrote: >> On Fri, Mar 10, 2017 at 10:44 AM, Michael Niedermayer >> wrote: >> > On Fri, Mar 10, 2017 at 09:19:38AM +0700, Muhammad Faiz wrote: >> >> for higher quality resampling >> > >> > can you hear the difference ? >> >> Yes, but it is sinesweep test audio, not real music audio. > > my question was meant to be, can you hear the difference on real > world audio ? No, I can not. I'm untrained for that. Because real world audio is complex, it is difficult for me to judge the difference. Other people may hear it. is sinesweep test not enough for this? exact_rational won't hurt speed at all. Thank's ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/h264_direct: Fix runtime error: signed integer overflow: 2147483647 - -14133 cannot be represented in type 'int'
On Fri, 10 Mar 2017 15:24:52 +0100 Michael Niedermayer wrote: > Fixes: 755/clusterfuzz-testcase-5369072516595712 > > See: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_direct: Fix runtime error: > signed integer overflow: 2147483647 - -14133 cannot be represented in type > 'int' > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/h264_direct.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c > index cbb84665b3..66e54479d1 100644 > --- a/libavcodec/h264_direct.c > +++ b/libavcodec/h264_direct.c > @@ -39,7 +39,12 @@ static int get_scale_factor(H264SliceContext *sl, > int poc, int poc1, int i) > { > int poc0 = sl->ref_list[0][i].poc; > -int td = av_clip_int8(poc1 - poc0); > +int64_t pocdiff = poc1 - (int64_t)poc0; > +int td = av_clip_int8(pocdiff); > + > +if (pocdiff != (int)pocdiff) > +avpriv_request_sample(sl->h264->avctx, "pocdiff overflow\n"); > + > if (td == 0 || sl->ref_list[0][i].parent->long_ref) { > return 256; > } else { Hard to image that these poc values aren't bounded by something else, but I don't know. Also the previous patch didn't have this request_sample call, which inflates this whole thing by 5 lines of code. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/dashenc: update bitrates on dash_write_trailer
On Wed, Mar 8, 2017 at 9:27 AM, Przemysław Sobala < przemyslaw.sob...@gmail.com> wrote: > On Fri, Mar 3, 2017 at 9:38 AM, Przemysław Sobala < > przemyslaw.sob...@gmail.com> wrote: > >> From: Przemysław Sobala >> >> Provides a way to change bandwidth parameter inside DASH manifest after a >> non-CBR H.264 encoding. >> Caller now is able to compute the bitrate by itself, after all packets >> have been written, and then set that value in >> AVFormatContext->streams->codecpar->bit_rate >> before calling av_write_trailer. As a result that value will be set in DASH >> manifest. >> --- >> libavformat/dashenc.c | 42 ++ >> 1 file changed, 30 insertions(+), 12 deletions(-) >> >> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c >> index fa56505..011d2ea 100644 >> --- a/libavformat/dashenc.c >> +++ b/libavformat/dashenc.c >> @@ -561,6 +561,30 @@ static int write_manifest(AVFormatContext *s, int >> final) >> return 0; >> } >> >> +static int set_bitrate(AVFormatContext *s) >> +{ >> +DASHContext *c = s->priv_data; >> +int i; >> + >> +for (i = 0; i < s->nb_streams; i++) { >> +OutputStream *os = &c->streams[i]; >> + >> +os->bit_rate = s->streams[i]->codecpar->bit_rate; >> +if (os->bit_rate) { >> +snprintf(os->bandwidth_str, sizeof(os->bandwidth_str), >> + " bandwidth=\"%d\"", os->bit_rate); >> +} else { >> +int level = s->strict_std_compliance >= FF_COMPLIANCE_STRICT >> ? >> +AV_LOG_ERROR : AV_LOG_WARNING; >> +av_log(s, level, "No bit rate set for stream %d\n", i); >> +if (s->strict_std_compliance >= FF_COMPLIANCE_STRICT) >> +return AVERROR(EINVAL); >> +} >> +} >> + >> +return 0; >> +} >> + >> static int dash_init(AVFormatContext *s) >> { >> DASHContext *c = s->priv_data; >> @@ -597,6 +621,10 @@ static int dash_init(AVFormatContext *s) >> if (!c->streams) >> return AVERROR(ENOMEM); >> >> +ret = set_bitrate(s); >> +if (ret < 0) >> +return ret; >> + >> for (i = 0; i < s->nb_streams; i++) { >> OutputStream *os = &c->streams[i]; >> AVFormatContext *ctx; >> @@ -604,18 +632,6 @@ static int dash_init(AVFormatContext *s) >> AVDictionary *opts = NULL; >> char filename[1024]; >> >> -os->bit_rate = s->streams[i]->codecpar->bit_rate; >> -if (os->bit_rate) { >> -snprintf(os->bandwidth_str, sizeof(os->bandwidth_str), >> - " bandwidth=\"%d\"", os->bit_rate); >> -} else { >> -int level = s->strict_std_compliance >= FF_COMPLIANCE_STRICT >> ? >> -AV_LOG_ERROR : AV_LOG_WARNING; >> -av_log(s, level, "No bit rate set for stream %d\n", i); >> -if (s->strict_std_compliance >= FF_COMPLIANCE_STRICT) >> -return AVERROR(EINVAL); >> -} >> - >> ctx = avformat_alloc_context(); >> if (!ctx) >> return AVERROR(ENOMEM); >> @@ -981,6 +997,8 @@ static int dash_write_trailer(AVFormatContext *s) >> { >> DASHContext *c = s->priv_data; >> >> +set_bitrate(s); >> + >> if (s->nb_streams > 0) { >> OutputStream *os = &c->streams[0]; >> // If no segments have been written so far, try to do a crude >> -- >> 2.7.4 >> >> > ping > > ping, 7 days timeout can anyone tak a look at this? [ http://ffmpeg.org/developer.html#Always-wait-long-enough-before-pushing-changes ] -- Regards Przemysław Sobala ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further
On 3/10/17, James Almer wrote: > On 3/10/2017 10:50 AM, Paul B Mahol wrote: >> On 3/10/17, wm4 wrote: >>> On Fri, 10 Mar 2017 13:47:38 +0100 >>> Paul B Mahol wrote: >>> On 3/10/17, Wang Bin wrote: > > I don't think this is good idea. >>> >>> Why not? >> >> Because it changes something that was working before. > > The only valid reason i could see to not go with this change is > if the size gains are minimal and the speed loss considerable. > Otherwise, if the end result is smaller than -Os then there's no > reason to not use it. OP didn't posted results at all, so applying this would be blind move IMHO. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] configure: clang -Oz for small size build to reduce size further
On 3/10/2017 12:43 PM, Paul B Mahol wrote: > On 3/10/17, James Almer wrote: >> On 3/10/2017 10:50 AM, Paul B Mahol wrote: >>> On 3/10/17, wm4 wrote: On Fri, 10 Mar 2017 13:47:38 +0100 Paul B Mahol wrote: > On 3/10/17, Wang Bin wrote: >> >> > > I don't think this is good idea. Why not? >>> >>> Because it changes something that was working before. >> >> The only valid reason i could see to not go with this change is >> if the size gains are minimal and the speed loss considerable. >> Otherwise, if the end result is smaller than -Os then there's no >> reason to not use it. > > OP didn't posted results at all, so applying this would be blind move > IMHO. Agree. Some numbers would be good (resulting binary size, benchmarks of at least popular codecs, etc). ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/dca_xll: Fix runtime error: signed integer overflow: 2147286116 + 6298923 cannot be represented in type 'int'
On Fri, Mar 10, 2017 at 3:24 PM, Michael Niedermayer wrote: > Fixes: 732/clusterfuzz-testcase-4872990070145024 > > See: [FFmpeg-devel] [PATCH 2/6] avcodec/dca_xll: Fix runtime error: signed > integer overflow: 2147286116 + 6298923 cannot be represented in type 'int' > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/dca_xll.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c > index 6cebda35e4..0fe90c7348 100644 > --- a/libavcodec/dca_xll.c > +++ b/libavcodec/dca_xll.c > @@ -1312,7 +1312,7 @@ static int combine_residual_frame(DCAXllDecoder *s, > DCAXllChSet *c) > } else { > // No downmix scaling > for (n = 0; n < nsamples; n++) > -dst[n] += (src[n] + round) >> shift; > +dst[n] += (unsigned)((src[n] + round) >> shift); > } > } > audio samples are typically signed, using negative values too, is this really safe to just cast it like that, without modifying the value in the end? - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] libavfilter/af_ambisonic.c Added File for Ambisonic Filter
libavfilter/af_ambisonic.c | 139 + 1 file changed, 139 insertions(+) create mode 100644 libavfilter/af_ambisonic.c diff --git a/libavfilter/af_ambisonic.c b/libavfilter/af_ambisonic.c new file mode 100644 index 000..98b0e44 --- /dev/null +++ b/libavfilter/af_ambisonic.c @@ -0,0 +1,139 @@ +/* + * 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 "libavutil/avstring.h" +#include "libavutil/channel_layout.h" +#include "libavutil/opt.h" +#include "audio.h" +#include "avfilter.h" +#include "formats.h" + +#define root8 2.828 + +typedef struct AmbisonicContext { +const AVClass *class; +/*Not needed, if any new variables are to be used, this struct can be populated*/ + +} AmbisonicContext; + +#define OFFSET(x) offsetof(AmbisonicContext, x) //Future use(maybe) + +static const AVOption ambisonic_options[] = { //square will be an option +{NULL} +}; + +AVFILTER_DEFINE_CLASS(ambisonic); +static int query_formats(AVFilterContext *ctx) +{ +AVFilterFormats *formats = NULL; +AVFilterChannelLayouts *layout = NULL; +int ret; +if ((ret = ff_add_format (&formats, AV_SAMPLE_FMT_FLTP )) < 0 || +(ret = ff_set_common_formats (ctx , formats )) < 0 || +(ret = ff_add_channel_layout (&layout , AV_CH_LAYOUT_4POINT0)) < 0 || +(ret = ff_set_common_channel_layouts (ctx , layout )) < 0) +return ret; +formats = ff_all_samplerates(); +return ff_set_common_samplerates(ctx, formats); +} +static int filter_frame(AVFilterLink *inlink, AVFrame *in) +{ +AVFilterContext *ctx = inlink->dst; +AVFilterLink *outlink = ctx->outputs[0]; +/*If variables used, this has to be created*/ +// AmbisonicContext *s = ctx->priv; +// const float *src = (const float *)in->data[0]; +// float *dst; +float *lf,*lb,*rb,*rf; +AVFrame *out; +int itr; +float *w,*x,*y; + +if (av_frame_is_writable(in)) { +out = in; +} else { +out = ff_get_audio_buffer(inlink, in->nb_samples); +if (!out) { +av_frame_free(&in); +return AVERROR(ENOMEM); +} +av_frame_copy_props(out, in); +} + +/*If planar samples are used, output must be put in dst*/ +//dst = (float *)out->data[0]; + +lf = (float *)malloc(sizeof(float)); +lb = (float *)malloc(sizeof(float)); +rb = (float *)malloc(sizeof(float)); +rf = (float *)malloc(sizeof(float)); + +for(itr=0;itrnb_samples;itr++) +{ +*lf=0,*lb=0,*rb=0,*rf=0; +/*Float pointers to the samples*/ +w=(float *)(*(in->extended_data)+itr); +x=(float *)(*(in->extended_data+1)+itr); +y=(float *)(*(in->extended_data+2)+itr); + +*lf = root8 * (2*(*w)+*x+*y); +*lb = root8 * (2*(*w)-*x+*y); +*rb = root8 * (2*(*w)-*x-*y); +*rf = root8 * (2*(*w)+*x-*y); + +/*Mathematical coefficients taken from : https://en.wikipedia.org/wiki/Ambisonics*/ +out->extended_data[0][itr]= *lf; +out->extended_data[1][itr]= *lb; +out->extended_data[2][itr]= *rb; +out->extended_data[3][itr]= *rf; +} + +if (out != in) +av_frame_free(&in); +return ff_filter_frame(outlink, out); +} + +static const AVFilterPad inputs[] = { +{ +.name = "default", +.type = AVMEDIA_TYPE_AUDIO, +.filter_frame = filter_frame, +// .config_props = config_input, +}, +{ NULL } +}; + +static const AVFilterPad outputs[] = { +{ +.name = "default", +.type = AVMEDIA_TYPE_AUDIO, +}, +{ NULL } +}; + +AVFilter ff_af_ambisonic = { +.name = "ambisonic", +.description= NULL_IF_CONFIG_SMALL("An ambisonic filter"), +.query_formats = query_formats, +.priv_size = sizeof(AmbisonicContext), +.priv_class = &ambisonic_class, +// .uninit = uninit, +.inputs = inputs, +.outputs= outputs, +}; \ No newline at end of file -- 2.7.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/vf_interlace: add complex vertcal lowpassfilter
Hi, Just wondering, did you see what this looks like on a CRT, especially with interline twitter. The original method is similar to what an interlaced camera does, averaging alternate lines, deliberately lowpassing the data. Regards, Kieran Kunhya On Wed, 8 Mar 2017 at 16:58 Thomas Mundt wrote: > Hi, > > attached patch adds a complex (-1 2 6 2 -1) vertcal lowpassfilter to > vf_interlace. This will better retain detail and reduce blurring compared > to the existing (1 2 1) filter. > > Please comment.___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavfilter/af_ambisonic.c Added File for Ambisonic Filter
On 3/10/17, Sanchit Sinha wrote: > libavfilter/af_ambisonic.c | 139 > + > 1 file changed, 139 insertions(+) > create mode 100644 libavfilter/af_ambisonic.c > Incomplete patch. > diff --git a/libavfilter/af_ambisonic.c b/libavfilter/af_ambisonic.c > new file mode 100644 > index 000..98b0e44 > --- /dev/null > +++ b/libavfilter/af_ambisonic.c > @@ -0,0 +1,139 @@ > +/* > + * 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 "libavutil/avstring.h" > +#include "libavutil/channel_layout.h" > +#include "libavutil/opt.h" > +#include "audio.h" > +#include "avfilter.h" > +#include "formats.h" > + > +#define root8 2.828 One can use sqrt(8) just fine. > + > +typedef struct AmbisonicContext { > +const AVClass *class; > +/*Not needed, if any new variables are to be used, this struct can be > populated*/ > + > +} AmbisonicContext; > + > +#define OFFSET(x) offsetof(AmbisonicContext, x) //Future use(maybe) > + > +static const AVOption ambisonic_options[] = { //square will be an option > +{NULL} > +}; > + > +AVFILTER_DEFINE_CLASS(ambisonic); > +static int query_formats(AVFilterContext *ctx) > +{ > +AVFilterFormats *formats = NULL; > +AVFilterChannelLayouts *layout = NULL; > +int ret; > +if ((ret = ff_add_format (&formats, AV_SAMPLE_FMT_FLTP > )) < 0 || > +(ret = ff_set_common_formats (ctx , formats > )) < 0 || > +(ret = ff_add_channel_layout (&layout , > AV_CH_LAYOUT_4POINT0)) < 0 || > +(ret = ff_set_common_channel_layouts (ctx , layout > )) < 0) > +return ret; > +formats = ff_all_samplerates(); > +return ff_set_common_samplerates(ctx, formats); > +} > +static int filter_frame(AVFilterLink *inlink, AVFrame *in) > +{ > +AVFilterContext *ctx = inlink->dst; > +AVFilterLink *outlink = ctx->outputs[0]; > +/*If variables used, this has to be created*/ > +// AmbisonicContext *s = ctx->priv; > +// const float *src = (const float *)in->data[0]; > +// float *dst; > +float *lf,*lb,*rb,*rf; > +AVFrame *out; > +int itr; > +float *w,*x,*y; > + > +if (av_frame_is_writable(in)) { > +out = in; > +} else { > +out = ff_get_audio_buffer(inlink, in->nb_samples); > +if (!out) { > +av_frame_free(&in); > +return AVERROR(ENOMEM); > +} > +av_frame_copy_props(out, in); > +} > + > +/*If planar samples are used, output must be put in dst*/ > +//dst = (float *)out->data[0]; > + > +lf = (float *)malloc(sizeof(float)); > +lb = (float *)malloc(sizeof(float)); > +rb = (float *)malloc(sizeof(float)); > +rf = (float *)malloc(sizeof(float)); > + Why? This is unacceptable. Use normal float variables. > +for(itr=0;itrnb_samples;itr++) > +{ > +*lf=0,*lb=0,*rb=0,*rf=0; > +/*Float pointers to the samples*/ > +w=(float *)(*(in->extended_data)+itr); > +x=(float *)(*(in->extended_data+1)+itr); > +y=(float *)(*(in->extended_data+2)+itr); This can be simplified and moved above loop. Good understanding of pointers is mandatory. > + > +*lf = root8 * (2*(*w)+*x+*y); > +*lb = root8 * (2*(*w)-*x+*y); > +*rb = root8 * (2*(*w)-*x-*y); > +*rf = root8 * (2*(*w)+*x-*y); > + > +/*Mathematical coefficients taken from : > https://en.wikipedia.org/wiki/Ambisonics*/ Remove this comment. > +out->extended_data[0][itr]= *lf; > +out->extended_data[1][itr]= *lb; > +out->extended_data[2][itr]= *rb; > +out->extended_data[3][itr]= *rf; > +} > + > +if (out != in) > +av_frame_free(&in); > +return ff_filter_frame(outlink, out); > +} > + > +static const AVFilterPad inputs[] = { > +{ > +.name = "default", > +.type = AVMEDIA_TYPE_AUDIO, > +.filter_frame = filter_frame, > +// .config_props = config_input, > +}, > +{ NULL } > +}; > + > +static const AVFilterPad outputs[] = { > +{ > +.name = "default", > +.type = AVMEDIA_TYPE_AUDIO, > +}, > +{ NULL } > +}; > + > +AVFilter ff_af_ambisonic = { > +.name
[FFmpeg-devel] [PATCH] Add XPM decoder
From: Paras Chadha Signed-off-by: Paras --- Changelog | 1 + doc/general.texi| 2 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/avcodec.h| 1 + libavcodec/codec_desc.c | 7 + libavcodec/version.h| 4 +- libavcodec/xpmdec.c | 409 libavformat/img2.c | 1 + 9 files changed, 425 insertions(+), 2 deletions(-) create mode 100644 libavcodec/xpmdec.c diff --git a/Changelog b/Changelog index 13628ca..716b6ff 100644 --- a/Changelog +++ b/Changelog @@ -26,6 +26,7 @@ version : - native Opus encoder - ScreenPressor decoder - incomplete ClearVideo decoder +- XPM decoder version 3.2: - libopenmpt demuxer diff --git a/doc/general.texi b/doc/general.texi index 30450c0..83f54b3 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -607,6 +607,8 @@ following image formats are supported: @tab WebP image format, encoding supported through external library libwebp @item XBM @tab X @tab X @tab X BitMap image format +@item XPM @tab X @tab X +@tab X PixMap image format @item XFace @tab X @tab X @tab X-Face image format @item XWD @tab X @tab X diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 65ccbad..fc5fa1f 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -645,6 +645,7 @@ OBJS-$(CONFIG_XAN_WC4_DECODER) += xxan.o OBJS-$(CONFIG_XBIN_DECODER)+= bintext.o cga_data.o OBJS-$(CONFIG_XBM_DECODER) += xbmdec.o OBJS-$(CONFIG_XBM_ENCODER) += xbmenc.o +OBJS-$(CONFIG_XPM_DECODER) += xpmdec.o OBJS-$(CONFIG_XFACE_DECODER) += xfacedec.o xface.o OBJS-$(CONFIG_XFACE_ENCODER) += xfaceenc.o xface.o OBJS-$(CONFIG_XL_DECODER) += xl.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 074efd4..81208b2 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -376,6 +376,7 @@ static void register_all(void) REGISTER_DECODER(XAN_WC3, xan_wc3); REGISTER_DECODER(XAN_WC4, xan_wc4); REGISTER_ENCDEC (XBM, xbm); +REGISTER_DECODER (XPM, xpm); REGISTER_ENCDEC (XFACE, xface); REGISTER_DECODER(XL,xl); REGISTER_ENCDEC (XWD, xwd); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 30ac236..a862716 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -377,6 +377,7 @@ enum AVCodecID { AV_CODEC_ID_XWD, AV_CODEC_ID_CDXL, AV_CODEC_ID_XBM, +AV_CODEC_ID_XPM, AV_CODEC_ID_ZEROCODEC, AV_CODEC_ID_MSS1, AV_CODEC_ID_MSA1, diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 06bcfc3..88cfddb 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1591,6 +1591,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, }, { +.id= AV_CODEC_ID_XPM, +.type = AVMEDIA_TYPE_VIDEO, +.name = "xpm", +.long_name = NULL_IF_CONFIG_SMALL("XPM (X PixMap) image"), +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, +}, +{ .id= AV_CODEC_ID_XWD, .type = AVMEDIA_TYPE_VIDEO, .name = "xwd", diff --git a/libavcodec/version.h b/libavcodec/version.h index b00e011..3ed5a71 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,8 +28,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 57 -#define LIBAVCODEC_VERSION_MINOR 82 -#define LIBAVCODEC_VERSION_MICRO 102 +#define LIBAVCODEC_VERSION_MINOR 83 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/libavcodec/xpmdec.c b/libavcodec/xpmdec.c new file mode 100644 index 000..635f25a --- /dev/null +++ b/libavcodec/xpmdec.c @@ -0,0 +1,409 @@ +/* + * XPM image format + * + * Copyright (c) 2012 Paul B Mahol + * Copyright (c) 2016 Paras Chadha + * + * 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 "libavutil/parseutils.h" +#incl
Re: [FFmpeg-devel] [PATCH] avcodec/vp8: Fix hang with slice threads
Thank you! On Thu, Mar 9, 2017 at 5:20 PM, Michael Niedermayer wrote: > On Thu, Mar 09, 2017 at 08:17:37PM -0500, Ronald S. Bultje wrote: > > Hi, > > > > On Thu, Mar 9, 2017 at 8:12 PM, Michael Niedermayer > > > wrote: > > > > > From: Thomas Guilbert > > > > > > Fixes: 447860.webm > > > > > > Signed-off-by: Michael Niedermayer > > > --- > > > libavcodec/vp8.c | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c > > > index 6759b310f0..068223920e 100644 > > > --- a/libavcodec/vp8.c > > > +++ b/libavcodec/vp8.c > > > @@ -2508,8 +2508,10 @@ int vp78_decode_mb_row_sliced(AVCodecContext > > > *avctx, void *tdata, int jobnr, > > > for (mb_y = jobnr; mb_y < s->mb_height; mb_y += num_jobs) { > > > td->thread_mb_pos = mb_y << 16; > > > ret = s->decode_mb_row_no_filter(avctx, tdata, jobnr, > threadnr); > > > -if (ret < 0) > > > +if (ret < 0) { > > > +update_pos(td, s->mb_height, INT_MAX & 0x); > > > return ret; > > > +} > > > if (s->deblock_filter) > > > s->filter_mb_row(avctx, tdata, jobnr, threadnr); > > > update_pos(td, mb_y, INT_MAX & 0x); > > > -- > > > 2.11.0 > > > > > > OK. > > applied > > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Complexity theory is the science of finding the exact solution to an > approximation. Benchmarking OTOH is finding an approximation of the exact > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add XPM decoder
Hi, On Sat, 11 Mar 2017 00:34:18 +0530 Paras wrote: > From: Paras Chadha > > Signed-off-by: Paras > --- > Changelog | 1 + > doc/general.texi| 2 + > libavcodec/Makefile | 1 + > libavcodec/allcodecs.c | 1 + > libavcodec/avcodec.h| 1 + > libavcodec/codec_desc.c | 7 + > libavcodec/version.h| 4 +- > libavcodec/xpmdec.c | 409 > There are many instances of trailing whitespace in libavcodec/xpmdec.c. This is to be avoided and prevents the patch from being applied. If you use vim or emacs they can be configured to highlight trailing whitespace (and also forbidden tabs): http://ffmpeg.org/developer.html#Editor-configuration ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/vf_interlace: add complex vertcal lowpassfilter
On 3/8/2017 1:58 PM, Thomas Mundt wrote: > Hi, > > attached patch adds a complex (-1 2 6 2 -1) vertcal lowpassfilter to > vf_interlace. This will better retain detail and reduce blurring compared to > the existing (1 2 1) filter. > > Please comment. > > > 0001-avfilter-vf_interlace-add-complex-vertcal-lowpassfil.patch > > > From f157bc9b898d1215f8ec10b301720a9d9ff03c63 Mon Sep 17 00:00:00 2001 > From: Thomas Mundt > Date: Wed, 8 Mar 2017 17:33:18 +0100 > Subject: [PATCH] avfilter/vf_interlace: add complex vertcal lowpassfilter Add > a complex (-1 2 6 2 -1) filter to reduce blurring compared to the existing (1 > 2 1) filter. > > Signed-off-by: Thomas Mundt > --- > doc/filters.texi| 13 ++-- > libavfilter/interlace.h | 2 ++ > libavfilter/vf_interlace.c | 42 ++-- > libavfilter/x86/vf_interlace.asm| 65 > + > libavfilter/x86/vf_interlace_init.c | 17 +++--- > 5 files changed, 130 insertions(+), 9 deletions(-) > > diff --git a/doc/filters.texi b/doc/filters.texi > index b5265d9..0041d39 100644 > --- a/doc/filters.texi > +++ b/doc/filters.texi > @@ -9109,8 +9109,17 @@ This determines whether the interlaced frame is taken > from the even > (tff - default) or odd (bff) lines of the progressive frame. > > @item lowpass > -Enable (default) or disable the vertical lowpass filter to avoid twitter > -interlacing and reduce moire patterns. > +Vertical lowpass filter to avoid twitter interlacing and > +reduce moire patterns. > + > +@table @samp > +@item 0 > +Disable vertical lowpass filter > +@item 1 > +Enable linear filter (default) > +@item 2 > +Enable complex filter > +@end table > @end table > > @section kerndeint > diff --git a/libavfilter/interlace.h b/libavfilter/interlace.h > index da073ae..7ad457e 100644 > --- a/libavfilter/interlace.h > +++ b/libavfilter/interlace.h > @@ -51,6 +51,8 @@ typedef struct InterlaceContext { > AVFrame *cur, *next; // the two frames from which the new one is > obtained > void (*lowpass_line)(uint8_t *dstp, ptrdiff_t linesize, const uint8_t > *srcp, > const uint8_t *srcp_above, const uint8_t > *srcp_below); > +void (*lowpass_line_complex)(uint8_t *dstp, ptrdiff_t linesize, > + const uint8_t *srcp, int mref, int pref); Why not keep a single prototype, passing mref and pref for both linear and complex? You can calculate srcp_above and srcp_below for linear like you're doing it for complex in both the c and asm versions. In any case, mref and pref should be ptrdiff_t and not int. > } InterlaceContext; > > void ff_interlace_init_x86(InterlaceContext *interlace); > diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c > index efa3128..e8d5de4 100644 > --- a/libavfilter/vf_interlace.c > +++ b/libavfilter/vf_interlace.c > @@ -47,7 +47,7 @@ static const AVOption interlace_options[] = { > { "bff", "bottom field first", 0, > AV_OPT_TYPE_CONST, {.i64 = MODE_BFF }, INT_MIN, INT_MAX, .flags = > FLAGS, .unit = "scan" }, > { "lowpass", "set vertical low-pass filter", OFFSET(lowpass), > -AV_OPT_TYPE_BOOL, {.i64 = 1 },0, 1, .flags = FLAGS }, > +AV_OPT_TYPE_INT, {.i64 = 1 },0, 2, .flags = FLAGS }, Maybe add AV_OPT_TYPE_CONST values "off", "linear" and "complex". > { NULL } > }; > > @@ -67,6 +67,24 @@ static void lowpass_line_c(uint8_t *dstp, ptrdiff_t > linesize, > } > } > > +static void lowpass_line_complex_c(uint8_t *dstp, ptrdiff_t linesize, > + const uint8_t *srcp, int mref, int pref) > +{ > +const uint8_t *srcp_above = srcp + mref; > +const uint8_t *srcp_below = srcp + pref; > +const uint8_t *srcp_above2 = srcp + mref * 2; > +const uint8_t *srcp_below2 = srcp + pref * 2; > +int i; > +for (i = 0; i < linesize; i++) { > +// this calculation is an integer representation of > +// '0.75 * current + 0.25 * above + 0.25 * below - 0.125 * above2 - > 0.125 * below2' > +// '4 +' is for rounding. > +dstp[i] = av_clip_uint8((4 + (srcp[i] << 2) > + + ((srcp[i] + srcp_above[i] + srcp_below[i]) << 1) > + - srcp_above2[i] - srcp_below2[i]) >> 3); > +} > +} > + > static const enum AVPixelFormat formats_supported[] = { > AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, > AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVA420P, > @@ -116,7 +134,11 @@ static int config_out_props(AVFilterLink *outlink) > > > if (s->lowpass) { > -s->lowpass_line = lowpass_line_c; > +if (s->lowpass == 1) > +s->lowpass_line = lowpass_line_c; > +else if (s->lowpass == 2) > +s->lowpass_line_complex = lowpass_line_complex_c; > + > if (ARCH_X86) > ff_interlace_init_x86(s); > } > @@ -150,7 +172,7 @@ s
Re: [FFmpeg-devel] [PATCH] libavfilter/af_ambisonic.c Added File for Ambisonic Filter
Okay made some changes, From c0c1a1e7d4ad1fcbd96827725a47af20145c7621 Mon Sep 17 00:00:00 2001 From: Sanchit Sinha Date: Sat, 11 Mar 2017 01:27:38 +0530 Subject: [PATCH] Changes to af_ambisonic.c, makefile and allfilters.c --- libavfilter/af_ambisonic.c | 136 + 1 file changed, 136 insertions(+) create mode 100644 libavfilter/af_ambisonic.c diff --git a/libavfilter/af_ambisonic.c b/libavfilter/af_ambisonic.c new file mode 100644 index 000..03409a6 --- /dev/null +++ b/libavfilter/af_ambisonic.c @@ -0,0 +1,136 @@ +/* + * 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 "libavutil/avstring.h" +#include "libavutil/channel_layout.h" +#include "libavutil/opt.h" +#include "audio.h" +#include "avfilter.h" +#include "formats.h" +#include + +typedef struct AmbisonicContext { + const AVClass *class; + /*Not needed, if any new variables are to be used, this struct can be populated(f)*/ + +} AmbisonicContext; + +#define OFFSET(x) offsetof(AmbisonicContext, x) + +static const AVOption ambisonic_options[] = { //square will be an option +{NULL} +}; + +AVFILTER_DEFINE_CLASS(ambisonic); +static int query_formats(AVFilterContext *ctx) +{ + AVFilterFormats *formats = NULL; + AVFilterChannelLayouts *layout = NULL; + int ret; + if ((ret = ff_add_format (&formats, AV_SAMPLE_FMT_FLTP )) < 0 || + (ret = ff_set_common_formats (ctx, formats )) < 0 || + (ret = ff_add_channel_layout (&layout , AV_CH_LAYOUT_4POINT0)) < 0 || + (ret = ff_set_common_channel_layouts (ctx, layout )) < 0) + return ret; + formats = ff_all_samplerates(); + return ff_set_common_samplerates(ctx, formats); +} +static int filter_frame(AVFilterLink *inlink, AVFrame *in) +{ + AVFilterContext *ctx = inlink->dst; + AVFilterLink *outlink = ctx->outputs[0]; + /*If variables used, this has to be created*/ + // AmbisonicContext *s = ctx->priv; + // const float *src = (const float *)in->data[0]; + // float *dst; + AVFrame *out; + int itr; + float *w,*x,*y; + + if (av_frame_is_writable(in)) + { + out = in; + } + else + { + out = ff_get_audio_buffer(inlink, in->nb_samples); + if (!out) + { + av_frame_free(&in); + return AVERROR(ENOMEM); + } + av_frame_copy_props(out, in); + } + + /*If planar samples are used, output must be put in dst*/ + //dst = (float *)out->data[0]; + + float root8= sqrt(8); + float lf=0,lb=0,rb=0,rf=0; + for(itr=0;itrnb_samples;itr++) + { + /*Float pointers to the samples*/ + w=(float *)(*(in->extended_data)+itr); + x=(float *)(*(in->extended_data+1)+itr); + y=(float *)(*(in->extended_data+2)+itr); + + lf = root8 * (2*(*w)+*x+*y); + lb = root8 * (2*(*w)-*x+*y); + rb = root8 * (2*(*w)-*x-*y); + rf = root8 * (2*(*w)+*x-*y); + + out->extended_data[0][itr]= lf; + out->extended_data[1][itr]= lb; + out->extended_data[2][itr]= rb; + out->extended_data[3][itr]= rf; + } + + if (out != in) + av_frame_free(&in); + return ff_filter_frame(outlink, out); +} + +static const AVFilterPad inputs[] = { + { + .name= "default", + .type= AVMEDIA_TYPE_AUDIO, + .filter_frame = filter_frame, + // .config_props = config_input, + }, + { NULL } +}; + +static const AVFilterPad outputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_AUDIO, + }, + { NULL } +}; + +AVFilter ff_af_ambisonic = { + .name = "ambisonic", + .description= NULL_IF_CONFIG_SMALL("An ambisonic filter"), + .query_formats = query_formats, + .priv_size= sizeof(AmbisonicContext), + .priv_class = &ambisonic_class, + // .uninit = uninit, + .inputs = inputs, + .outputs= outputs, +}; \ No newline at end of file -- 2.7.4 On Sat, Mar 11, 2017 at 12:33 AM, Paul B Mahol wrote: > On 3/10/17, Sanchit Sinha wrote: > > libavfilter/af_ambisonic.c | 139 > > + > > 1 file changed, 139 insertions(+) > > create mode 100644 libavfilter/af_ambisonic.c > > > > Incomplete patch. > > > diff --git a/libavfilter/af_ambisonic.c b/libavfilter/af_ambisonic.c > > new file mode 100644 > > index 000..98b0e44 > > --- /dev/null > > +++ b/libavfilter/af_ambisonic.c > > @@ -0,0 +1,139 @@ > > +/* > > + * This file is part of FFmpeg. > > + * > > + * FFmpeg is free software; you can redistribute it and/or > > + * modify it under the terms of the GNU Le
Re: [FFmpeg-devel] [PATCH] libavfilter/af_ambisonic.c Added File for Ambisonic Filter
On 3/10/17, Sanchit Sinha wrote: > Okay made some changes, > Do all changes, not just some. Also this must be full patch. You are missing Makefile, Changelog and so on... ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavfilter/af_ambisonic.c Added File for Ambisonic Filter
Is the conversion okay now? I used pointers there because in one of our discussions you mentioned that out->ex should also be written on by references.(Maybe I didn't comprehend.. apologies on that). I will patch the makefile, allfilters.c and changelog in a while. Thank You On Sat, Mar 11, 2017 at 1:50 AM, Paul B Mahol wrote: > On 3/10/17, Sanchit Sinha wrote: > > Okay made some changes, > > > > Do all changes, not just some. > Also this must be full patch. > > You are missing Makefile, Changelog and so on... > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > -- Sanchit Sinha B.Tech- CSE IIIT-Delhi Roll-2015083 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavfilter/af_ambisonic.c Added File for Ambisonic Filter
On 3/10/17, Sanchit Sinha wrote: > Is the conversion okay now? I used pointers there because in one of our > discussions you mentioned that out->ex should also be written on by > references.(Maybe I didn't comprehend.. apologies on that). I will patch > the makefile, allfilters.c and changelog in a while. Its ok somehow. But pointers should be set outside of loop and acessed in side loop like this: w[iter] ... x[iter] ... and so on. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavfilter/af_ambisonic.c Added File for Ambisonic Filter
Hi, I specific changes we talked about. Also updated apart from af_ambisonic.c : allfilters.c, Makefile and Changelog. From b74755ae0ea6741f01d2c1b2c79056984674c331 Mon Sep 17 00:00:00 2001 From: Sanchit Sinha Date: Sat, 11 Mar 2017 03:31:51 +0530 Subject: [PATCH] Changes to af_ambisonic, Makefile, allfilters.c and Changelog --- Changelog | 1591 libavfilter/Makefile | 375 +++ libavfilter/af_ambisonic.c | 137 libavfilter/allfilters.c | 383 +++ 4 files changed, 2486 insertions(+) create mode 100644 Changelog create mode 100644 libavfilter/Makefile create mode 100644 libavfilter/af_ambisonic.c create mode 100644 libavfilter/allfilters.c diff --git a/Changelog b/Changelog new file mode 100644 index 000..155c309 --- /dev/null +++ b/Changelog @@ -0,0 +1,1591 @@ +Entries are sorted chronologically from oldest to youngest within each release, +releases are sorted from youngest to oldest. + +version : +- CrystalHD decoder moved to new decode API +- add internal ebur128 library, remove external libebur128 dependency +- Pro-MPEG CoP #3-R2 FEC protocol +- premultiply video filter +- Support for spherical videos +- configure now fails if autodetect-libraries are requested but not found +- PSD Decoder +- 16.8 floating point pcm decoder +- 24.0 floating point pcm decoder +- Apple Pixlet decoder +- QDMC audio decoder +- NewTek SpeedHQ decoder +- MIDI Sample Dump Standard demuxer +- readeia608 filter +- Sample Dump eXchange demuxer +- abitscope multimedia filter +- Scenarist Closed Captions demuxer and muxer +- threshold filter +- midequalizer filter +- Optimal Huffman tables for (M)JPEG encoding +- FM Screen Capture Codec decoder +- native Opus encoder +- ScreenPressor decoder +- incomplete ClearVideo decoder +- Ambisonic Decoder + +version 3.2: +- libopenmpt demuxer +- tee protocol +- Changed metadata print option to accept general urls +- Alias muxer for Ogg Video (.ogv) +- VP8 in Ogg muxing +- curves filter doesn't automatically insert points at x=0 and x=1 anymore +- 16-bit support in curves filter and selectivecolor filter +- OpenH264 decoder wrapper +- MediaCodec H.264/HEVC/MPEG-4/VP8/VP9 hwaccel +- True Audio (TTA) muxer +- crystalizer audio filter +- acrusher audio filter +- bitplanenoise video filter +- floating point support in als decoder +- fifo muxer +- maskedclamp filter +- hysteresis filter +- lut2 filter +- yuvtestsrc filter +- CUDA CUVID H.263/VP8/VP9/10 bit HEVC (Dithered) Decoding +- vaguedenoiser filter +- added threads option per filter instance +- weave filter +- gblur filter +- avgblur filter +- sobel and prewitt filter +- MediaCodec HEVC/MPEG-4/VP8/VP9 decoding +- Meridian Lossless Packing (MLP) / TrueHD encoder +- Non-Local Means (nlmeans) denoising filter +- sdl2 output device and ffplay support +- sdl1 output device and sdl1 support removed +- extended mov edit list support +- libfaac encoder removed +- Matroska muxer now writes CRC32 elements by default in all Level 1 elements +- sidedata video and asidedata audio filter +- Changed mapping of rtp MIME type G726 to codec g726le. +- spec compliant VAAPI/DXVA2 VC-1 decoding of slices in frame-coded images + + +version 3.1: +- DXVA2-accelerated HEVC Main10 decoding +- fieldhint filter +- loop video filter and aloop audio filter +- Bob Weaver deinterlacing filter +- firequalizer filter +- datascope filter +- bench and abench filters +- ciescope filter +- protocol blacklisting API +- MediaCodec H264 decoding +- VC-2 HQ RTP payload format (draft v1) depacketizer and packetizer +- VP9 RTP payload format (draft v2) packetizer +- AudioToolbox audio decoders +- AudioToolbox audio encoders +- coreimage filter (GPU based image filtering on OSX) +- libdcadec removed +- bitstream filter for extracting DTS core +- ADPCM IMA DAT4 decoder +- musx demuxer +- aix demuxer +- remap filter +- hash and framehash muxers +- colorspace filter +- hdcd filter +- readvitc filter +- VAAPI-accelerated format conversion and scaling +- libnpp/CUDA-accelerated format conversion and scaling +- Duck TrueMotion 2.0 Real Time decoder +- Wideband Single-bit Data (WSD) demuxer +- VAAPI-accelerated H.264/HEVC/MJPEG encoding +- DTS Express (LBR) decoder +- Generic OpenMAX IL encoder with support for Raspberry Pi +- IFF ANIM demuxer & decoder +- Direct Stream Transfer (DST) decoder +- loudnorm filter +- MTAF demuxer and decoder +- MagicYUV decoder +- OpenExr improvements (tile data and B44/B44A support) +- BitJazz SheerVideo decoder +- CUDA CUVID H264/HEVC decoder +- 10-bit depth support in native utvideo decoder +- libutvideo wrapper removed +- YUY2 Lossless Codec decoder +- VideoToolbox H.264 encoder +- VAAPI-accelerated MPEG-2 and VP8 encoding + + +version 3.0: +- Common Encryption (CENC) MP4 encoding and decoding support +- DXV decoding +- extrastereo filter +- ocr filter +- alimiter filter +- stereowiden filter +- stereotools filter +- rubberband filter +- tremolo filter +-
Re: [FFmpeg-devel] [PATCH] Add XPM decoder
On Sat, Mar 11, 2017 at 00:34:18 +0530, Paras wrote: > OBJS-$(CONFIG_XBM_DECODER) += xbmdec.o > OBJS-$(CONFIG_XBM_ENCODER) += xbmenc.o > +OBJS-$(CONFIG_XPM_DECODER) += xpmdec.o > OBJS-$(CONFIG_XFACE_DECODER) += xfacedec.o xface.o I do understand that this format is similar to XBM, but this code might be needed to be ordered alphabetically, IIUC. > REGISTER_DECODER(XAN_WC4, xan_wc4); > REGISTER_ENCDEC (XBM, xbm); > +REGISTER_DECODER (XPM, xpm); > REGISTER_ENCDEC (XFACE, xface); Same here (and a space too much). > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -377,6 +377,7 @@ enum AVCodecID { > AV_CODEC_ID_XWD, > AV_CODEC_ID_CDXL, > AV_CODEC_ID_XBM, > +AV_CODEC_ID_XPM, > AV_CODEC_ID_ZEROCODEC, > AV_CODEC_ID_MSS1, > AV_CODEC_ID_MSA1, Did you read the comment at the top of that section? * If you add a codec ID to this list, add it so that * 1. no value of an existing codec ID changes (that would break ABI), * 2. it is as close as possible to similar codecs > +static int color_table_compare(const void *lhs, const void *rhs) > +{ > +return av_strcasecmp(lhs, ((const ColorEntry *)rhs)->name); > +} > + > +static const ColorEntry color_table[] = { > +{ "AliceBlue",{ 0xF0, 0xF8, 0xFF } }, > +{ "AntiqueWhite", { 0xFA, 0xEB, 0xD7 } }, > +{ "Aqua", { 0x00, 0xFF, 0xFF } }, [...] Is this duplicated from libavutil/parseutils.c? > +static uint32_t hexstring_to_rgba(const char *p, int len){ > +uint32_t ret = 0xFF00; > +const ColorEntry *entry; > +char color_name[100]; > + > +if(*p == '#'){ > +p++; > +len--; > +if (len == 3) { > +ret |= (convert(p[2]) << 4) | > + (convert(p[1]) << 12) | > + (convert(p[0]) << 20); So is this a modified or redesigned av_parse_color()? Just wondering. > +else{ If this is new code, and not copied verbatim from somewhere else, you need to follow coding style. > +av_log(avctx, AV_LOG_ERROR, "invalid number of colors or chars per > pixel\n"); Feel free to quote actual offending values... > +av_log(avctx, AV_LOG_ERROR, "unsupported number of chars per > pixel\n"); > +return AVERROR_PATCHWELCOME; ...especially when asking for a patch. Sorry for nitpicking without looking at the actual code. Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/dca_xll: Fix runtime error: signed integer overflow: 2147286116 + 6298923 cannot be represented in type 'int'
On Fri, Mar 10, 2017 at 06:50:34PM +0100, Hendrik Leppkes wrote: > On Fri, Mar 10, 2017 at 3:24 PM, Michael Niedermayer > wrote: > > Fixes: 732/clusterfuzz-testcase-4872990070145024 > > > > See: [FFmpeg-devel] [PATCH 2/6] avcodec/dca_xll: Fix runtime error: signed > > integer overflow: 2147286116 + 6298923 cannot be represented in type 'int' > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/dca_xll.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c > > index 6cebda35e4..0fe90c7348 100644 > > --- a/libavcodec/dca_xll.c > > +++ b/libavcodec/dca_xll.c > > @@ -1312,7 +1312,7 @@ static int combine_residual_frame(DCAXllDecoder *s, > > DCAXllChSet *c) > > } else { > > // No downmix scaling > > for (n = 0; n < nsamples; n++) > > -dst[n] += (src[n] + round) >> shift; > > +dst[n] += (unsigned)((src[n] + round) >> shift); > > } > > } > > > > audio samples are typically signed, using negative values too, is this > really safe to just cast it like that, without modifying the value in > the end? signed and unsigned operations for +,-,*,<< are identical on twos complement with in and output data types matching and twos complement (strictly speaking in the signed case some are undefined in C ...) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavfilter/af_ambisonic.c Added File for Ambisonic Filter
On Sat, Mar 11, 2017 at 03:36:46 +0530, Sanchit Sinha wrote: > Subject: [PATCH] Changes to af_ambisonic, Makefile, allfilters.c and > Changelog This is not a proper commit message. > --- > Changelog | 1591 > > libavfilter/Makefile | 375 +++ > libavfilter/af_ambisonic.c | 137 > libavfilter/allfilters.c | 383 +++ > 4 files changed, 2486 insertions(+) > create mode 100644 Changelog > create mode 100644 libavfilter/Makefile > create mode 100644 libavfilter/af_ambisonic.c > create mode 100644 libavfilter/allfilters.c How did you manage to make these seem like new files? Your patch is supposed to contain the *changes* you made. Only libavfilter/af_ambisonic.c would be added. The others are existing files. How did you manage to create this patch? The development process is approximately (excuse imprecisions): git clone ... cd ... add your file modify the other files git add git commit ... write a proper commit message - see other commits for inspiration git format-patch ... git send-email ... (Don't forget to check that a complete compile works with your modifications. And that the resulting binary does the right stuff.) The last step will especially avoid what we are seeing here in your e-mails, that your e-mail user agent is breaking the patches by inserting newlines. > +AVFILTER_DEFINE_CLASS(ambisonic); > +static int query_formats(AVFilterContext *ctx) > +{ > + AVFilterFormats *formats = NULL; > + AVFilterChannelLayouts *layout = NULL; > + int ret; > + if ((ret = ff_add_format (&formats, AV_SAMPLE_FMT_FLTP )) < 0 || > + (ret = ff_set_common_formats (ctx, formats )) < 0 || > + (ret = ff_add_channel_layout (&layout , AV_CH_LAYOUT_4POINT0)) < 0 || > + (ret = ff_set_common_channel_layouts (ctx, layout )) < 0) > + return ret; > + formats = ff_all_samplerates(); > + return ff_set_common_samplerates(ctx, formats); > +} Your indentation is all wrong. What happened? http://ffmpeg.org/developer.html#Code-formatting-conventions > +}; > \ No newline at end of file Paul asked you to fix this (and other stuff). Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/h264_direct: Fix runtime error: signed integer overflow: 2147483647 - -14133 cannot be represented in type 'int'
On Fri, Mar 10, 2017 at 04:01:36PM +0100, wm4 wrote: > On Fri, 10 Mar 2017 15:24:52 +0100 > Michael Niedermayer wrote: > > > Fixes: 755/clusterfuzz-testcase-5369072516595712 > > > > See: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_direct: Fix runtime error: > > signed integer overflow: 2147483647 - -14133 cannot be represented in type > > 'int' > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/h264_direct.c | 7 ++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c > > index cbb84665b3..66e54479d1 100644 > > --- a/libavcodec/h264_direct.c > > +++ b/libavcodec/h264_direct.c > > @@ -39,7 +39,12 @@ static int get_scale_factor(H264SliceContext *sl, > > int poc, int poc1, int i) > > { > > int poc0 = sl->ref_list[0][i].poc; > > -int td = av_clip_int8(poc1 - poc0); > > +int64_t pocdiff = poc1 - (int64_t)poc0; > > +int td = av_clip_int8(pocdiff); > > + > > +if (pocdiff != (int)pocdiff) > > +avpriv_request_sample(sl->h264->avctx, "pocdiff overflow\n"); > > + > > if (td == 0 || sl->ref_list[0][i].parent->long_ref) { > > return 256; > > } else { > > Hard to image that these poc values aren't bounded by something else, > but I don't know. > > Also the previous patch didn't have this request_sample call, which > inflates this whole thing by 5 lines of code. yes thats why i suggested it initially. SUINT allows overflow detection simply by #define CHECKED 1 and running under ubsan otherwise an excplicit check is needed to detect such occurances [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Breaking DRM is a little like attempting to break through a door even though the window is wide open and the only thing in the house is a bunch of things you dont want and which you would get tomorrow for free anyway signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/h264_ps: Forward errors from decode_scaling_list()
On Thu, Mar 09, 2017 at 01:54:24PM +0100, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > libavcodec/h264_ps.c | 44 ++-- > 1 file changed, 26 insertions(+), 18 deletions(-) applied [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/vp56: Reset have_undamaged_frame on resolution changes
On Thu, Mar 09, 2017 at 05:55:32PM +0100, Michael Niedermayer wrote: > Fixes: timeout in 758/clusterfuzz-testcase-4720832028868608 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/vp56.c | 2 ++ > 1 file changed, 2 insertions(+) applied [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avfilter/af_firequalizer: add av_restrict on convolution func
slightly improved speed Signed-off-by: Muhammad Faiz --- libavfilter/af_firequalizer.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/af_firequalizer.c b/libavfilter/af_firequalizer.c index 5c6fd54..4243d66 100644 --- a/libavfilter/af_firequalizer.c +++ b/libavfilter/af_firequalizer.c @@ -197,8 +197,8 @@ static int query_formats(AVFilterContext *ctx) return ff_set_common_samplerates(ctx, formats); } -static void fast_convolute(FIREqualizerContext *s, const float *kernel_buf, float *conv_buf, - OverlapIndex *idx, float *data, int nsamples) +static void fast_convolute(FIREqualizerContext *av_restrict s, const float *av_restrict kernel_buf, float *av_restrict conv_buf, + OverlapIndex *av_restrict idx, float *av_restrict data, int nsamples) { if (nsamples <= s->nsamples_max) { float *buf = conv_buf + idx->buf_idx * s->rdft_len; @@ -235,8 +235,8 @@ static void fast_convolute(FIREqualizerContext *s, const float *kernel_buf, floa } } -static void fast_convolute2(FIREqualizerContext *s, const float *kernel_buf, FFTComplex *conv_buf, -OverlapIndex *idx, float *data0, float *data1, int nsamples) +static void fast_convolute2(FIREqualizerContext *av_restrict s, const float *av_restrict kernel_buf, FFTComplex *av_restrict conv_buf, +OverlapIndex *av_restrict idx, float *av_restrict data0, float *av_restrict data1, int nsamples) { if (nsamples <= s->nsamples_max) { FFTComplex *buf = conv_buf + idx->buf_idx * s->rdft_len; -- 2.9.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/3] avcodec/wavpack: Fix runtime error: signed integer overflow: -2147483648 + -83886075 cannot be represented in type 'int'
Fixes: 761/clusterfuzz-testcase-544252097536 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/wavpack.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/wavpack.h b/libavcodec/wavpack.h index 0196574aab..445d593c3b 100644 --- a/libavcodec/wavpack.h +++ b/libavcodec/wavpack.h @@ -99,8 +99,8 @@ typedef struct WvChannel { // macros for manipulating median values #define GET_MED(n) ((c->median[n] >> 4) + 1) -#define DEC_MED(n) c->median[n] -= ((c->median[n] + (128 >> (n)) - 2) / (128 >> (n))) * 2 -#define INC_MED(n) c->median[n] += ((c->median[n] + (128 >> (n))) / (128 >> (n))) * 5 +#define DEC_MED(n) c->median[n] -= ((c->median[n] + (128 >> (n)) - 2) / (128 >> (n))) * 2U +#define INC_MED(n) c->median[n] += ((c->median[n] + (128 >> (n))) / (128 >> (n))) * 5U // macros for applying weight #define UPDATE_WEIGHT_CLIP(weight, delta, samples, in) \ -- 2.11.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 3/3] avcodec/amrwbdec: Fix runtime error: left shift of negative value -1
Fixes: 763/clusterfuzz-testcase-6007567320875008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/amrwbdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index 999bfb99dc..57aed874cc 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -262,7 +262,7 @@ static void decode_pitch_lag_high(int *lag_int, int *lag_frac, int pitch_index, *lag_frac = pitch_index - (*lag_int << 2) + 136; } else if (pitch_index < 440) { *lag_int = (pitch_index + 257 - 376) >> 1; -*lag_frac = (pitch_index - (*lag_int << 1) + 256 - 376) << 1; +*lag_frac = (pitch_index - (*lag_int << 1) + 256 - 376) * 2; /* the actual resolution is 1/2 but expressed as 1/4 */ } else { *lag_int = pitch_index - 280; -- 2.11.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/3] avcodec/dca_xll: Fix runtime error: signed integer overflow: 1762028192 + 698372290 cannot be represented in type 'int'
Fixes: 762/clusterfuzz-testcase-5927683747741696 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/dca_xll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c index 6cebda35e4..b7331e04b9 100644 --- a/libavcodec/dca_xll.c +++ b/libavcodec/dca_xll.c @@ -658,7 +658,7 @@ static void chs_filter_band_data(DCAXllDecoder *s, DCAXllChSet *c, int band) // Inverse fixed coefficient prediction for (j = 0; j < b->fixed_pred_order[i]; j++) for (k = 1; k < nsamples; k++) -buf[k] += buf[k - 1]; +buf[k] += (unsigned)buf[k - 1]; } } -- 2.11.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] ffprobe: add AVCodecContext help message into ffprobe
2017-03-09 16:14 GMT+08:00 Steven Liu : > because the ffprobe can use AVCodecContext parameters > > Signed-off-by: Steven Liu > --- > ffprobe.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/ffprobe.c b/ffprobe.c > index c85c3a1..b104390 100644 > --- a/ffprobe.c > +++ b/ffprobe.c > @@ -3004,6 +3004,7 @@ void show_help_default(const char *opt, const char > *arg) > printf("\n"); > > show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM); > +show_help_children(avcodec_get_class(), AV_OPT_FLAG_DECODING_PARAM); > } > > /** > -- > 2.10.1.382.ga23ca1b.dirty > > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel pushed Thanks! ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/hlsenc: second_levels flags process function extract
the SECOND_LEVEL* flags process and name is too long extract all of them output to funtions, make code clear Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 239 +-- 1 file changed, 136 insertions(+), 103 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index b8122f1..5df2514 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -470,17 +470,9 @@ static HLSSegment *find_segment_by_filename(HLSSegment *segment, const char *fil return (HLSSegment *) NULL; } -/* Create a new segment and append it to the segment list */ -static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, double duration, - int64_t pos, int64_t size) +static int sls_flags_filename_process(struct AVFormatContext *s, HLSContext *hls, HLSSegment *en, double duration, + int64_t pos, int64_t size) { -HLSSegment *en = av_malloc(sizeof(*en)); -const char *filename; -int ret; - -if (!en) -return AVERROR(ENOMEM); - if ((hls->flags & (HLS_SECOND_LEVEL_SEGMENT_SIZE | HLS_SECOND_LEVEL_SEGMENT_DURATION)) && strlen(hls->current_segment_final_filename_fmt)) { av_strlcpy(hls->avf->filename, hls->current_segment_final_filename_fmt, sizeof(hls->avf->filename)); @@ -521,7 +513,127 @@ static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, double av_free(filename); } } +return 0; +} + +static int sls_flag_check_duration_size_index(HLSContext *hls) +{ +int ret = 0; + +if (hls->flags & HLS_SECOND_LEVEL_SEGMENT_DURATION) { + av_log(hls, AV_LOG_ERROR, +"second_level_segment_duration hls_flag requires use_localtime to be true\n"); + ret = AVERROR(EINVAL); +} +if (hls->flags & HLS_SECOND_LEVEL_SEGMENT_SIZE) { + av_log(hls, AV_LOG_ERROR, +"second_level_segment_size hls_flag requires use_localtime to be true\n"); + ret = AVERROR(EINVAL); +} +if (hls->flags & HLS_SECOND_LEVEL_SEGMENT_INDEX) { +av_log(hls, AV_LOG_ERROR, + "second_level_segment_index hls_flag requires use_localtime to be true\n"); +ret = AVERROR(EINVAL); +} + +return ret; +} + +static int sls_flag_check_duration_size(HLSContext *hls) +{ +const char *proto = avio_find_protocol_name(hls->basename); +int segment_renaming_ok = proto && !strcmp(proto, "file"); +int ret = 0; + +if ((hls->flags & HLS_SECOND_LEVEL_SEGMENT_DURATION) && !segment_renaming_ok) { + av_log(hls, AV_LOG_ERROR, +"second_level_segment_duration hls_flag works only with file protocol segment names\n"); + ret = AVERROR(EINVAL); +} +if ((hls->flags & HLS_SECOND_LEVEL_SEGMENT_SIZE) && !segment_renaming_ok) { + av_log(hls, AV_LOG_ERROR, +"second_level_segment_size hls_flag works only with file protocol segment names\n"); + ret = AVERROR(EINVAL); +} + +return ret; +} + +static void sls_flag_file_rename(HLSContext *hls, char *old_filename) { +if ((hls->flags & (HLS_SECOND_LEVEL_SEGMENT_SIZE | HLS_SECOND_LEVEL_SEGMENT_DURATION)) && +strlen(hls->current_segment_final_filename_fmt)) { +ff_rename(old_filename, hls->avf->filename, hls); +} +} + +static int sls_flag_use_localtime_filename(AVFormatContext *oc, HLSContext *c) +{ +if (c->flags & HLS_SECOND_LEVEL_SEGMENT_INDEX) { +char * filename = av_strdup(oc->filename); // %%d will be %d after strftime +if (!filename) +return AVERROR(ENOMEM); +if (replace_int_data_in_filename(oc->filename, sizeof(oc->filename), +#if FF_API_HLS_WRAP +filename, 'd', c->wrap ? c->sequence % c->wrap : c->sequence) < 1) { +#else +filename, 'd', c->sequence) < 1) { +#endif +av_log(c, AV_LOG_ERROR, "Invalid second level segment filename template '%s', " +"you can try to remove second_level_segment_index flag\n", + filename); +av_free(filename); +return AVERROR(EINVAL); +} +av_free(filename); +} +if (c->flags & (HLS_SECOND_LEVEL_SEGMENT_SIZE | HLS_SECOND_LEVEL_SEGMENT_DURATION)) { +av_strlcpy(c->current_segment_final_filename_fmt, oc->filename, + sizeof(c->current_segment_final_filename_fmt)); +if (c->flags & HLS_SECOND_LEVEL_SEGMENT_SIZE) { +char * filename = av_strdup(oc->filename); // %%s will be %s after strftime +if (!filename) +return AVERROR(ENOMEM); +if (replace_int_data_in_filename(oc->filename, sizeof(oc->filename), filename, 's', 0) < 1) { +av_log(c, AV_LOG_ERROR, "Invalid second level segment filename template '%s', " +"you can try to remove second_level_segment_size flag\n", +