Re: [FFmpeg-devel] [PATCH v1] doc/demuxers: Fix typo in help text
On Monday, 25 November 2019 17:03:15 ACDT Steven Liu wrote: > > 在 2019年11月25日,13:57,Gyan 写道: > > > > On 25-11-2019 10:50 am, lance.lmw...@gmail.com wrote: > >> From: Limin Wang > >> > >> dose -> does > >> > >> Signed-off-by: Limin Wang > >> --- > >> > >> doc/demuxers.texi | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/doc/demuxers.texi b/doc/demuxers.texi > >> index 4e1a5cb6aa..2820934d7a 100644 > >> --- a/doc/demuxers.texi > >> +++ b/doc/demuxers.texi > >> @@ -332,7 +332,7 @@ Maximum number of times a insufficient list is > >> attempted to be reloaded.>> > >> Default value is 1000. > >> > >>@item m3u8_hold_counters > >> > >> -Maximum number of times to load m3u8 when the m3u8 dose not refresh with > >> new segments. +Maximum number of times to load m3u8 when the m3u8 does > >> not refresh with new segments. > Ah, My mistake, i will mofify it by my self, thanks > This line should > “Maximum number of times to load m3u8 when the m3u8 refresh without new > segments” Suggestion: that would be better worded as, "The maximum number of times to load m3u8 when it refreshes without new segments." -- == Rodney Baker VK5ZTV rodney.ba...@iinet.net.au CCNA #CSCO12880208 == ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v1] doc/demuxers: Fix typo in help text
Rodney Baker 于 2019年11月25日周一 下午4:32写道: > On Monday, 25 November 2019 17:03:15 ACDT Steven Liu wrote: > > > 在 2019年11月25日,13:57,Gyan 写道: > > > > > > On 25-11-2019 10:50 am, lance.lmw...@gmail.com wrote: > > >> From: Limin Wang > > >> > > >> dose -> does > > >> > > >> Signed-off-by: Limin Wang > > >> --- > > >> > > >> doc/demuxers.texi | 2 +- > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > >> > > >> diff --git a/doc/demuxers.texi b/doc/demuxers.texi > > >> index 4e1a5cb6aa..2820934d7a 100644 > > >> --- a/doc/demuxers.texi > > >> +++ b/doc/demuxers.texi > > >> @@ -332,7 +332,7 @@ Maximum number of times a insufficient list is > > >> attempted to be reloaded.>> > > >> Default value is 1000. > > >> > > >>@item m3u8_hold_counters > > >> > > >> -Maximum number of times to load m3u8 when the m3u8 dose not refresh > with > > >> new segments. +Maximum number of times to load m3u8 when the m3u8 does > > >> not refresh with new segments. > > Ah, My mistake, i will mofify it by my self, thanks > > This line should > > “Maximum number of times to load m3u8 when the m3u8 refresh without new > > segments” > > Suggestion: that would be better worded as, "The maximum number of times > to > load m3u8 when it refreshes without new segments." > Thanks :D > > > -- > == > Rodney Baker VK5ZTV > rodney.ba...@iinet.net.au > CCNA #CSCO12880208 > == > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v8] avcodec/v210dec: add support for frame and slice threading
On Mon, Nov 25, 2019 at 11:45:10AM +0800, lance.lmw...@gmail.com wrote: > From: Limin Wang > > 1, Test server configure: > [root@localhost ~]# cat /proc/cpuinfo |grep "model name" > model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz > model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz > ... > > [root@localhost ~]# free -h > totalusedfree shared buff/cache > available > Mem: 102G1.1G100G 16M > 657M100G > Swap: 4.0G 0B4.0G > > 2, Test result: > encode the v210 input data for testing: > ./ffmpeg -y -i 4k_422.ts -c:v v210 -vframes 10 test.avi > > master: > ./ffmpeg -y -threads 1 -stream_loop 1000 -i ./test.avi -benchmark -f null - > frame=10010 fps= 60 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed=13.7x > video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB > muxing overhead: unknown > bench: utime=101.869s stime=66.181s rtime=167.996s > bench: maxrss=186552kB > > patch applied: > ./ffmpeg -y -threads 2 -thread_type slice -stream_loop 1000 -i ./test.avi > -benchmark -f null - > frame=10010 fps= 72 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed=16.5x > video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB > muxing overhead: unknown > bench: utime=103.562s stime=74.858s rtime=139.599s > bench: maxrss=188616kB > > ./ffmpeg -y -threads 2 -thread_type frame -stream_loop 1000 -i ./test.avi > -benchmark -f null - > frame=10010 fps= 85 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed=19.6x > video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB > muxing overhead: unknown > bench: utime=114.310s stime=92.685s rtime=117.693s > bench: maxrss=231896kB > > Signed-off-by: Limin Wang > --- > libavcodec/v210dec.c | 126 > +++ > libavcodec/v210dec.h | 1 + > 2 files changed, 79 insertions(+), 48 deletions(-) will apply thx [...] -- 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: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2] avcodec/v410dec: add support for frame and slice threading
On Mon, Nov 25, 2019 at 11:40:04AM +0800, lance.lmw...@gmail.com wrote: > From: Limin Wang > > 1, Test server configure: > [root@localhost ~]# cat /proc/cpuinfo |grep "model name" > model name: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz > model name: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz > ... > > [root@localhost ~]# free -h > totalusedfree shared buff/cache > available > Mem: 102G1.1G100G 16M > 657M100G > Swap: 4.0G 0B4.0G > > 2, Test result: > encode the v410 input data for testing: > ./ffmpeg -y -i 4k_422.ts -c:v v410 -vframes 10 test.avi > > master: > ./ffmpeg -y -stream_loop 1000 -i ./test.avi -benchmark -f null - > frame=10010 fps= 37 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed= 8.6x > video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB > muxing overhead: unknown > bench: utime=166.016s stime=102.192s rtime=268.120s > bench: maxrss=273400kB > > patch applied: > ./ffmpeg -y -threads 2 -thread_type slice -stream_loop 1000 -i ./test.avi > -benchmark -f null - > frame=10010 fps= 53 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed=12.3x > video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB > muxing overhead: unknown > bench: utime=165.135s stime=100.456s rtime=187.994s > bench: maxrss=275476kB > > ./ffmpeg -y -threads 2 -thread_type frame -stream_loop 1000 -i ./test.avi > -benchmark -f null - > frame=10010 fps= 61 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed=14.1x > video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB > muxing overhead: unknown > bench: utime=171.386s stime=122.102s rtime=163.637s > bench: maxrss=340308kB > > Signed-off-by: Limin Wang > --- > libavcodec/v410dec.c | 72 > +--- > 1 file changed, 51 insertions(+), 21 deletions(-) will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Elect your leaders based on what they did after the last election, not based on what they say before an election. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [Contract Request] for FFmpeg libmp3lame multi-threaded feature implementation
Dear FFmpeg developers, I'm very happy to have found your details on FFmpeg website for requesting FFmpeg feature implementation. Currently I'm using FFmpeg command line tool on my linux servers to process media files into instant mp3 audio files by using FFmpeg piping feature. But, currently libmp3lame encoder support single thread only for encoding audio stream to mp3 file. This is the great drawback for my project. I have more than 100+ linux servers for processing audio streams to mp3 files. Each server has 8 physical CPU cores. But, due to libmp3lame single thread limitation my project mp3 conversion speed becomes too lazy and remaining cores on servers are becomes useless. Actually I'm a web developer. I have no idea on FFmpeg tools tech languages. So, I'm looking for FFmpeg developer who can implement libmp3lame multi-threaded feature on FFmpeg. I'm ready to pay for this feature. Looking forward to hearing from you. Thank you, Chandra N. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [Contract Request] for FFmpeg libmp3lame multi-threaded feature implementation
On 25-11-2019 06:22 pm, Chandra Nakka wrote: Dear FFmpeg developers, I'm very happy to have found your details on FFmpeg website for requesting FFmpeg feature implementation. Currently I'm using FFmpeg command line tool on my linux servers to process media files into instant mp3 audio files by using FFmpeg piping feature. But, currently libmp3lame encoder support single thread only for encoding audio stream to mp3 file. This is the great drawback for my project. I have more than 100+ linux servers for processing audio streams to mp3 files. Each server has 8 physical CPU cores. But, due to libmp3lame single thread limitation my project mp3 conversion speed becomes too lazy and remaining cores on servers are becomes useless. Actually I'm a web developer. I have no idea on FFmpeg tools tech languages. So, I'm looking for FFmpeg developer who can implement libmp3lame multi-threaded feature on FFmpeg. I'm ready to pay for this feature. Looking forward to hearing from you. Thank you, Chandra N. LAME is an external project, not developed here. That said, check if https://github.com/enzo1982/superfast works for you. Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 03/23] avformat/matroskaenc: Use random TrackUID
On Sun, Nov 24, 2019 at 11:05:03PM +0100, Andreas Rheinhardt wrote: > On Sun, Nov 24, 2019 at 8:28 PM Michael Niedermayer > wrote: > > > On Sun, Nov 24, 2019 at 09:08:00AM +, Andreas Rheinhardt wrote: > > > Michael Niedermayer: > > > > On Wed, Nov 06, 2019 at 03:49:02AM +0100, Andreas Rheinhardt wrote: > > > >> Up until now, the TrackUID of a Matroska track which is supposed to be > > > >> random was not random at all: It always coincided with the TrackNumber > > > >> which is usually the 1-based index of the corresponding stream in the > > > >> array of AVStreams. This has been changed: It is now set via an AVLFG > > > >> if AVFMT_FLAG_BITEXACT is not set. Otherwise it is set like it is set > > > >> now (the only change happens if an explicit track number has been > > > >> choosen via dash_track_number, because the system used in the normal > > > >> situation is now used, too). In particular, no FATE tests need to be > > > >> updated. > > > >> > > > >> This also fixes a bug in case the dash_track_number option was used: > > > >> In this case the TrackUID was set to the track number, but the tags > > were > > > >> written with a TagTrackUID simply based upon the index, so that the > > tags > > > >> didn't apply to the track they ought to apply to. > > > >> > > > >> Signed-off-by: Andreas Rheinhardt > > > >> --- > > > >> mkv_get_uid() might be overkill, but I simply wanted to be sure that > > > >> there are no collisions. > > > >> > > > >> libavformat/matroskaenc.c | 65 > > ++- > > > >> 1 file changed, 57 insertions(+), 8 deletions(-) > > > >> > > > >> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c > > > >> index de57e474be..b87d15b7ff 100644 > > > >> --- a/libavformat/matroskaenc.c > > > >> +++ b/libavformat/matroskaenc.c > > > >> @@ -94,6 +94,7 @@ typedef struct mkv_cues { > > > >> typedef struct mkv_track { > > > >> int write_dts; > > > >> int has_cue; > > > >> +uint32_tuid; > > > >> int sample_rate; > > > >> int64_t sample_rate_offset; > > > >> int64_t last_timestamp; > > > >> @@ -1199,8 +1200,7 @@ static int mkv_write_track(AVFormatContext *s, > > MatroskaMuxContext *mkv, > > > >> track = start_ebml_master(pb, MATROSKA_ID_TRACKENTRY, 0); > > > >> put_ebml_uint (pb, MATROSKA_ID_TRACKNUMBER, > > > >> mkv->is_dash ? mkv->dash_track_number : i + 1); > > > >> -put_ebml_uint (pb, MATROSKA_ID_TRACKUID, > > > >> - mkv->is_dash ? mkv->dash_track_number : i + 1); > > > >> +put_ebml_uint (pb, MATROSKA_ID_TRACKUID, mkv->tracks[i].uid); > > > >> put_ebml_uint (pb, MATROSKA_ID_TRACKFLAGLACING , 0);// no > > lacing (yet) > > > >> > > > >> if ((tag = av_dict_get(st->metadata, "title", NULL, 0))) > > > >> @@ -1650,7 +1650,8 @@ static int mkv_write_tags(AVFormatContext *s) > > > >> if (!mkv_check_tag(st->metadata, > > MATROSKA_ID_TAGTARGETS_TRACKUID)) > > > >> continue; > > > >> > > > >> -ret = mkv_write_tag(s, st->metadata, > > MATROSKA_ID_TAGTARGETS_TRACKUID, i + 1); > > > >> +ret = mkv_write_tag(s, st->metadata, > > MATROSKA_ID_TAGTARGETS_TRACKUID, > > > >> +mkv->tracks[i].uid); > > > >> if (ret < 0) return ret; > > > >> } > > > >> > > > >> @@ -1658,13 +1659,15 @@ static int mkv_write_tags(AVFormatContext *s) > > > >> for (i = 0; i < s->nb_streams; i++) { > > > >> AVIOContext *pb; > > > >> AVStream *st = s->streams[i]; > > > >> +mkv_track *track = &mkv->tracks[i]; > > > >> ebml_master tag_target; > > > >> ebml_master tag; > > > >> > > > >> if (st->codecpar->codec_type == AVMEDIA_TYPE_ATTACHMENT) > > > >> continue; > > > >> > > > >> -mkv_write_tag_targets(s, > > MATROSKA_ID_TAGTARGETS_TRACKUID, i + 1, &tag_target); > > > >> +mkv_write_tag_targets(s, MATROSKA_ID_TAGTARGETS_TRACKUID, > > > >> + track->uid, &tag_target); > > > >> pb = mkv->tags_bc; > > > >> > > > >> tag = start_ebml_master(pb, MATROSKA_ID_SIMPLETAG, 0); > > > >> @@ -1863,10 +1866,6 @@ static int mkv_write_header(AVFormatContext *s) > > > >> version = 4; > > > >> } > > > >> > > > >> -mkv->tracks = av_mallocz_array(s->nb_streams, > > sizeof(*mkv->tracks)); > > > >> -if (!mkv->tracks) { > > > >> -return AVERROR(ENOMEM); > > > >> -} > > > >> ebml_header = start_ebml_master(pb, EBML_ID_HEADER, > > MAX_EBML_HEADER_SIZE); > > > >> put_ebml_uint (pb, EBML_ID_EBMLVERSION , 1); > > > >> put_ebml_uint (pb, EBML_ID_EBMLREADVERSION , 1); > > > >> @@ -2667,8 +2666,42 @@ static int webm_query_codec(enum AVCodecID > > codec_id, int std_compliance) > > > >> return 0; > > > >> } > > > >> > > > >> +stati
Re: [FFmpeg-devel] [PATCH v2] avcodec/vp8: fix multiple ff_thread_finish_setup() calls
Please help to merge the patch if it’s acceptable, thanks! > On Nov 18, 2019, at 7:00 PM, Peter Ross wrote: > > On Mon, Nov 18, 2019 at 10:34:32AM +0800, zhilizhao wrote: >> Ping for review, thanks! > > approve. 还有这块补丁也跟vp7有关,可以在推送前改一下。 Since the vp7 decoder doesn’t have multi-thread capabilities, it is not affected. It’s more robust with the check, of course. vp7因不支持多线程,所以检查与否,功能上不受影响。当然,修改之后,代码看着更合理也更健壮。 > >> >>> On Nov 14, 2019, at 12:29 PM, quinkbl...@foxmail.com wrote: >>> >>> From: Zhao Zhili >>> >>> webp decoder doesn't set update_thread_context field >>> >>> $ ffmpeg -i rgb_q80.webp -f null - >>> [webp @ 0x7ffbd5823200] Multiple ff_thread_finish_setup() calls >>> --- >>> libavcodec/vp8.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c >>> index eb51d1f3c9..b4deb3ed67 100644 >>> --- a/libavcodec/vp8.c >>> +++ b/libavcodec/vp8.c >>> @@ -2715,7 +2715,8 @@ int vp78_decode_frame(AVCodecContext *avctx, void >>> *data, int *got_frame, >>> >>>s->next_framep[VP56_FRAME_CURRENT] = curframe; >>> >>> -ff_thread_finish_setup(avctx); >>> +if (avctx->codec->update_thread_context) >>> +ff_thread_finish_setup(avctx); >>> >>>if (avctx->hwaccel) { >>>ret = avctx->hwaccel->start_frame(avctx, avpkt->data, avpkt->size); >>> -- >>> 2.22.0 >>> >>> >>> >>> ___ >>> ffmpeg-devel mailing list >>> ffmpeg-devel@ffmpeg.org >>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >>> >>> To unsubscribe, visit link above, or email >>> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". >> >> >> >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> To unsubscribe, visit link above, or email >> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > -- Peter > (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [Contract Request] for FFmpeg libmp3lame multi-threaded feature implementation
On 2019-11-25 13:52, Chandra Nakka wrote: > Dear FFmpeg developers, > > I'm very happy to have found your details on FFmpeg website for requesting > FFmpeg feature implementation. > > Currently I'm using FFmpeg command line tool on my linux servers to process > media files into instant mp3 audio files by using FFmpeg piping feature. > But, currently libmp3lame encoder support single thread only for encoding > audio stream to mp3 file. This is the great drawback for my project. > > I have more than 100+ linux servers for processing audio streams to mp3 > files. Each server has 8 physical CPU cores. But, due to libmp3lame single > thread limitation my project mp3 conversion speed becomes too lazy > and remaining cores on servers are becomes useless. > > Actually I'm a web developer. I have no idea on FFmpeg tools tech > languages. So, I'm looking for FFmpeg developer who can implement > libmp3lame multi-threaded feature on FFmpeg. I'm ready to pay for this > feature. > > Looking forward to hearing from you. > > Thank you, > Chandra N. https://www.gnu.org/software/parallel/ That'll be $1, thank you. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] Allow using primary CUDA device context
On Wed, Nov 20, 2019 at 12:48 PM Timo Rothenpieler wrote: > > On 20/11/2019 11:29, Oleg Dobkin wrote: > > On Tue, 2019-11-19 at 23:58 +0100, Timo Rothenpieler wrote: > >> Only thing I'm still wondering is if it would make sense to use the > >> primary context by default. > >> I can't think of any obvious downsides, other than weakened > >> isolation, > >> which really shouldn't be a huge concern. > >> And there apparently are some potential performance gains. > > > > I think it's safer to leave the default behavior, in case of some > > unknown corner cases - there could be some legacy code that assumes the > > creation of different contexts per each decoder. > > > > Good point. I haven't found the time to give this a test run so far. > Once I did, and nothing exploded, I'll do a round of releases of > ffnvcodec and apply the patch. Is there any progress on this? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/2] avcodec: add mvdv video decoder
Signed-off-by: Paul B Mahol --- libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/avcodec.h| 1 + libavcodec/codec_desc.c | 7 ++ libavcodec/midivid.c| 272 libavformat/riff.c | 1 + 6 files changed, 283 insertions(+) create mode 100644 libavcodec/midivid.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 006a472a6d..52e5b4f345 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -493,6 +493,7 @@ OBJS-$(CONFIG_MSZH_DECODER)+= lcldec.o OBJS-$(CONFIG_MTS2_DECODER)+= mss4.o OBJS-$(CONFIG_MVC1_DECODER)+= mvcdec.o OBJS-$(CONFIG_MVC2_DECODER)+= mvcdec.o +OBJS-$(CONFIG_MVDV_DECODER)+= midivid.o OBJS-$(CONFIG_MWSC_DECODER)+= mwsc.o OBJS-$(CONFIG_MXPEG_DECODER) += mxpegdec.o OBJS-$(CONFIG_NELLYMOSER_DECODER) += nellymoserdec.o nellymoser.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 0c0741936c..4eb1afbea1 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -218,6 +218,7 @@ extern AVCodec ff_mszh_decoder; extern AVCodec ff_mts2_decoder; extern AVCodec ff_mvc1_decoder; extern AVCodec ff_mvc2_decoder; +extern AVCodec ff_mvdv_decoder; extern AVCodec ff_mwsc_decoder; extern AVCodec ff_mxpeg_decoder; extern AVCodec ff_nuv_decoder; diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 813a43b72e..1cbc9c9ef1 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -458,6 +458,7 @@ enum AVCodecID { AV_CODEC_ID_LSCR, AV_CODEC_ID_VP4, AV_CODEC_ID_IMM5, +AV_CODEC_ID_MVDV, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the start of audio codecs diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 5961af3c85..3e634bbec7 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1733,6 +1733,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("Infinity IMM5"), .props = AV_CODEC_PROP_LOSSY, }, +{ +.id= AV_CODEC_ID_MVDV, +.type = AVMEDIA_TYPE_VIDEO, +.name = "mvdv", +.long_name = NULL_IF_CONFIG_SMALL("MidiVid VQ"), +.props = AV_CODEC_PROP_LOSSY, +}, /* various PCM "codecs" */ { diff --git a/libavcodec/midivid.c b/libavcodec/midivid.c new file mode 100644 index 00..36ed4b83bd --- /dev/null +++ b/libavcodec/midivid.c @@ -0,0 +1,272 @@ +/* + * MidiVid decoder + * Copyright (c) 2019 Paul B Mahol + * + * 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 +#include + +#include "libavutil/imgutils.h" +#include "libavutil/internal.h" +#include "libavutil/intreadwrite.h" +#include "libavutil/mem.h" + +#define BITSTREAM_READER_LE +#include "avcodec.h" +#include "get_bits.h" +#include "bytestream.h" +#include "internal.h" + +typedef struct MidiVidContext { +GetByteContext gb; + +uint8_t *uncompressed; +int uncompressed_size; +uint8_t *skip; + +AVFrame *frame; +} MidiVidContext; + +static int decode_mvdv(MidiVidContext *s, AVCodecContext *avctx, AVFrame *frame) +{ +GetByteContext *gb = &s->gb; +GetBitContext mask; +GetByteContext idx9; +uint16_t nb_vectors, intra_flag; +const uint8_t *vec; +const uint8_t *mask_start; +uint8_t *skip; +int mask_size; +int idx9bits = 0; +int idx9val = 0; +int num_blocks; + +nb_vectors = bytestream2_get_le16(gb); +intra_flag = bytestream2_get_le16(gb); +if (intra_flag) { +num_blocks = (avctx->width / 2) * (avctx->height / 2); +} else { +int skip_linesize; + +num_blocks = bytestream2_get_le32(gb); +skip_linesize = avctx->width >> 1; +mask_start = gb->buffer_start + bytestream2_tell(gb); +mask_size = (avctx->width >> 5) * (avctx->height >> 2); +init_get_bits8(&mask, mask_start, mask_size); +bytestream2_skip(gb, mask_size); +skip = s->skip; + +for (int y = 0; y < avctx->height >> 2; y++) { +for (int x = 0; x < avctx->width >> 2; x++) { +int flag = !get_bits1(&mask); + +
[FFmpeg-devel] [PATCH 2/2] avcodec: add mvha video decoder
Signed-off-by: Paul B Mahol --- configure | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/avcodec.h| 1 + libavcodec/codec_desc.c | 7 + libavcodec/mvha.c | 310 libavformat/riff.c | 1 + 7 files changed, 322 insertions(+) create mode 100644 libavcodec/mvha.c diff --git a/configure b/configure index 8f4f2884cf..2b69a16bbd 100755 --- a/configure +++ b/configure @@ -2779,6 +2779,7 @@ msmpeg4v3_decoder_select="h263_decoder" msmpeg4v3_encoder_select="h263_encoder" mss2_decoder_select="mpegvideo qpeldsp vc1_decoder" mts2_decoder_select="mss34dsp" +mvha_decoder_deps="zlib" mwsc_decoder_deps="zlib" mxpeg_decoder_select="mjpeg_decoder" nellymoser_decoder_select="mdct sinewin" diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 52e5b4f345..c1f35b40d8 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -494,6 +494,7 @@ OBJS-$(CONFIG_MTS2_DECODER)+= mss4.o OBJS-$(CONFIG_MVC1_DECODER)+= mvcdec.o OBJS-$(CONFIG_MVC2_DECODER)+= mvcdec.o OBJS-$(CONFIG_MVDV_DECODER)+= midivid.o +OBJS-$(CONFIG_MVHA_DECODER)+= mvha.o OBJS-$(CONFIG_MWSC_DECODER)+= mwsc.o OBJS-$(CONFIG_MXPEG_DECODER) += mxpegdec.o OBJS-$(CONFIG_NELLYMOSER_DECODER) += nellymoserdec.o nellymoser.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 4eb1afbea1..c33edf23c9 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -219,6 +219,7 @@ extern AVCodec ff_mts2_decoder; extern AVCodec ff_mvc1_decoder; extern AVCodec ff_mvc2_decoder; extern AVCodec ff_mvdv_decoder; +extern AVCodec ff_mvha_decoder; extern AVCodec ff_mwsc_decoder; extern AVCodec ff_mxpeg_decoder; extern AVCodec ff_nuv_decoder; diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 1cbc9c9ef1..735a3c2d76 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -459,6 +459,7 @@ enum AVCodecID { AV_CODEC_ID_VP4, AV_CODEC_ID_IMM5, AV_CODEC_ID_MVDV, +AV_CODEC_ID_MVHA, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x1, ///< A dummy id pointing at the start of audio codecs diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 3e634bbec7..570bd2f382 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1740,6 +1740,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("MidiVid VQ"), .props = AV_CODEC_PROP_LOSSY, }, +{ +.id= AV_CODEC_ID_MVHA, +.type = AVMEDIA_TYPE_VIDEO, +.name = "mvha", +.long_name = NULL_IF_CONFIG_SMALL("MidiVid Archive Codec"), +.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, +}, /* various PCM "codecs" */ { diff --git a/libavcodec/mvha.c b/libavcodec/mvha.c new file mode 100644 index 00..636b5e69d5 --- /dev/null +++ b/libavcodec/mvha.c @@ -0,0 +1,310 @@ +/* + * MidiVid Archive codec + * + * Copyright (c) 2019 Paul B Mahol + * + * 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 +#include + +#define CACHED_BITSTREAM_READER !ARCH_X86_32 +#include "libavutil/intreadwrite.h" + +#include "avcodec.h" +#include "bytestream.h" +#include "get_bits.h" +#include "internal.h" +#include "lossless_videodsp.h" + +#include + +typedef struct MVHAContext { +GetBitContext gb; +int nb_symbols; + +uint8_t symb[256]; +uint32_t prob[256]; +VLC vlc; + +z_stream zstream; +LLVidDSPContext llviddsp; +} MVHAContext; + +typedef struct Node { +int16_t sym; +int16_t n0; +int16_t l, r; +uint32_t count; +} Node; + +static void get_tree_codes(uint32_t *bits, int16_t *lens, uint8_t *xlat, + Node *nodes, int node, + uint32_t pfx, int pl, int *pos) +{ +int s; + +s = nodes[node].sym; +if (s != -1) { +bits[*pos] = (~pfx) & ((1ULL << FFMAX(pl, 1)) - 1); +lens[*pos] = FFMAX(pl, 1); +xlat[*pos] = s + (pl == 0); +(*pos)++; +} else { +pfx <<= 1; +pl++; +get
Re: [FFmpeg-devel] headers for gapless playback
On Sun, 24 Nov 2019, Tomas Härdin wrote: tor 2019-11-21 klockan 23:35 +0100 skrev Marton Balint: On Thu, 21 Nov 2019, Tomas Härdin wrote: > tis 2019-11-19 klockan 19:16 + skrev John Kaplan: > > Hi Guys, > > > > We just did some research on gapless playback across multiple client > > devices, and could not find support for adding gapless metadata > > headers in ffmpeg. Our interest is specifically in AAC/MP4, and we > > ended up shifting to the fdk-aac package, which exposes options for > > adding moov/edts/elst headers (which are the ones we used) as well as > > iTunSMPB. > > > > So, I wanted to open a discussion with the team on ffmpeg support for > > gapless metadata. > > I’m not sure if you guys have discussed before, so here are a few > > opening questions to get me up to speed… > > > > > > 1. Does ffmpeg support addition of gapless metadata in any form > > currently, and we missed the doc as to how to specify it? > > 2. If not, have you discussed previously? If so, what were the > > results? (I.e. rejected as evil, put on roadmap but in future, > > currently in development, etc.) > > Something very similar to this is being discussed in > https://trac.ffmpeg.org/ticket/8366 > > > 3. If support is still in the future, would you be open to me > > contributing a patch that implements it? > > Yes please > > I think opening a generic ticket for this would be a good move. Having > the ability to trim essence would be very useful. Then we could also > remove that godawful hack in mov.c as well, hopefully. There's more > than a few formats that need some "warm-up" data or that leave a few > frames of garbage at the end of the file, like all block transform > audio codecs For audio we have AV_PKT_DATA_SKIP_SAMPLES packet side data This is not enough for sample-level cutting as needed for gapless playback Why not? The side data contains the number of samples to be skipped from the start and at the end of the packet. for video AV_PKT_FLAG_DISCARD packet flag. What else is needed? Why is this on the packets? It's not the demuxer's job to decide what should and should not be cut. The demuxer only signals this, frames are dropped after they are decoded in generic libavcodec decode.c. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] headers for gapless playback
mån 2019-11-25 klockan 22:53 +0100 skrev Marton Balint: > > On Sun, 24 Nov 2019, Tomas Härdin wrote: > > > tor 2019-11-21 klockan 23:35 +0100 skrev Marton Balint: > > > On Thu, 21 Nov 2019, Tomas Härdin wrote: > > > > > > > tis 2019-11-19 klockan 19:16 + skrev John Kaplan: > > > > > Hi Guys, > > > > > > > > > > We just did some research on gapless playback across multiple client > > > > > devices, and could not find support for adding gapless metadata > > > > > headers in ffmpeg. Our interest is specifically in AAC/MP4, and we > > > > > ended up shifting to the fdk-aac package, which exposes options for > > > > > adding moov/edts/elst headers (which are the ones we used) as well as > > > > > iTunSMPB. > > > > > > > > > > So, I wanted to open a discussion with the team on ffmpeg support for > > > > > gapless metadata. > > > > > I’m not sure if you guys have discussed before, so here are a few > > > > > opening questions to get me up to speed… > > > > > > > > > > > > > > > 1. Does ffmpeg support addition of gapless metadata in any form > > > > > currently, and we missed the doc as to how to specify it? > > > > > 2. If not, have you discussed previously? If so, what were the > > > > > results? (I.e. rejected as evil, put on roadmap but in future, > > > > > currently in development, etc.) > > > > > > > > Something very similar to this is being discussed in > > > > https://trac.ffmpeg.org/ticket/8366 > > > > > > > > > 3. If support is still in the future, would you be open to me > > > > > contributing a patch that implements it? > > > > > > > > Yes please > > > > > > > > I think opening a generic ticket for this would be a good move. Having > > > > the ability to trim essence would be very useful. Then we could also > > > > remove that godawful hack in mov.c as well, hopefully. There's more > > > > than a few formats that need some "warm-up" data or that leave a few > > > > frames of garbage at the end of the file, like all block transform > > > > audio codecs > > > > > > For audio we have AV_PKT_DATA_SKIP_SAMPLES packet side data > > > > This is not enough for sample-level cutting as needed for gapless > > playback > > Why not? The side data contains the number of samples to be skipped from > the start and at the end of the packet. Aha, I missed that. That should work I guess. I still feel we should have an explicit "the actual media is between these timestamps" > > > for video AV_PKT_FLAG_DISCARD packet flag. What else is needed? > > > > Why is this on the packets? It's not the demuxer's job to decide what > > should and should not be cut. > > The demuxer only signals this, frames are dropped after they are decoded > in generic libavcodec decode.c. That's OK at least. But see my previous comment. /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [aarch64] improve performance of ff_hscale_8_to_15_neon
Hi, This patch implements ff_hscale_8_to_15_neon with NEON fused multiply accumulate and bumps the vectorization factor from 2 to 4. I have seen speedups up to 15% on Graviton A1 instances based on A-72 cpus. $ ffmpeg -nostats -f lavfi -i testsrc2=4k:d=2 -vf bench=start,scale=1024x1024,bench=stop -f null - before: t:0.040303 avg:0.040287 max:0.040371 min:0.039214 after: t:0.037339 avg:0.037327 max:0.037550 min:0.036992 Tested with `make check` on aarch64-linux. 0001-aarch64-use-FMA-and-increase-vector-factor-to-4.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add mvdv video decoder
mån 2019-11-25 klockan 22:09 +0100 skrev Paul B Mahol: > Signed-off-by: Paul B Mahol > +static int decode_mvdv(MidiVidContext *s, AVCodecContext *avctx, AVFrame > *frame) > +{ > +GetByteContext *gb = &s->gb; > +GetBitContext mask; > +GetByteContext idx9; > +uint16_t nb_vectors, intra_flag; > +const uint8_t *vec; > +const uint8_t *mask_start; > +uint8_t *skip; > +int mask_size; > +int idx9bits = 0; > +int idx9val = 0; > +int num_blocks; > + > +nb_vectors = bytestream2_get_le16(gb); > +intra_flag = bytestream2_get_le16(gb); > +if (intra_flag) { > +num_blocks = (avctx->width / 2) * (avctx->height / 2); Will UB if width*height/4 > INT_MAX > +} else { > +int skip_linesize; > + > +num_blocks = bytestream2_get_le32(gb); Might want to use uint32_t so this doesn't lead to weirdness on 32-bit > +skip_linesize = avctx->width >> 1; > +mask_start = gb->buffer_start + bytestream2_tell(gb); > +mask_size = (avctx->width >> 5) * (avctx->height >> 2); This can also UB /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [aarch64] improve performance of ff_hscale_8_to_15_neon
Hello, On Mon, Nov 25, 2019, at 22:59, Sebastian Pop wrote: > This patch implements ff_hscale_8_to_15_neon with NEON fused multiply > accumulate > and bumps the vectorization factor from 2 to 4. I have seen speedups up to 15% > on Graviton A1 instances based on A-72 cpus. Why adding a new version, in intrinsics, instead of changing the existing implementation? Best, -- Jean-Baptiste Kempf - President +33 672 704 734 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 3/3] avformat/vividas: Free pb on all error paths in track_header()
Fixes: memleak Fixes: 19054/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5673287506198528 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/vividas.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/vividas.c b/libavformat/vividas.c index f20af3d7c2..2c6a3daca7 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -296,8 +296,10 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t * for (i=0;ihttps://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/3] avcodec/cook: Use 3 stage VLC decoding for channel_coupling
Fixes: shift exponent -1 is negative Fixes: out of array read Fixes: 19028/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5759766471376896 Fixes: 19037/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5734106625474560 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/cook.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 248e59256f..d0b41a2431 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -759,7 +759,7 @@ static int decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab) for (i = 0; i < length; i++) decouple_tab[start + i] = get_vlc2(&q->gb, p->channel_coupling.table, - p->channel_coupling.bits, 2); + p->channel_coupling.bits, 3); else for (i = 0; i < length; i++) { int v = get_bits(&q->gb, p->js_vlc_bits); -- 2.23.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/3] avcodec/ffwavesynth: Fix undefined overflow in wavesynth_synth_sample()
Fixes: signed integer overflow: 2147464192 + 21176 cannot be represented in type 'int' Fixes: 19042/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5719828090585088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/ffwavesynth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/ffwavesynth.c b/libavcodec/ffwavesynth.c index 349b45534d..b9c63abb8d 100644 --- a/libavcodec/ffwavesynth.c +++ b/libavcodec/ffwavesynth.c @@ -350,7 +350,8 @@ fail: static void wavesynth_synth_sample(struct wavesynth_context *ws, int64_t ts, int32_t *channels) { -int32_t amp, val, *cv; +int32_t amp, *cv; +unsigned val; struct ws_interval *in; int i, *last, pink; uint32_t c, all_ch = 0; -- 2.23.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] [libdav1d.c]: Add options for spatial layers.
On Wed, Nov 20, 2019 at 9:55 AM Thierry Foucu wrote: > > > On Thu, Nov 14, 2019 at 9:36 AM Thierry Foucu wrote: > >> Disable by default to output all the layers, to match libaomdec wrapper. >> Add option to select the operating point for the spatial layers. >> --- >> libavcodec/libdav1d.c | 8 >> 1 file changed, 8 insertions(+) >> >> diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c >> index cf4b178f1d..ea4ef641bf 100644 >> --- a/libavcodec/libdav1d.c >> +++ b/libavcodec/libdav1d.c >> @@ -40,6 +40,8 @@ typedef struct Libdav1dContext { >> int tile_threads; >> int frame_threads; >> int apply_grain; >> +int operating_point; >> +int all_layers; >> } Libdav1dContext; >> >> static const enum AVPixelFormat pix_fmt[][3] = { >> @@ -134,6 +136,10 @@ static av_cold int libdav1d_init(AVCodecContext *c) >> if (dav1d->apply_grain >= 0) >> s.apply_grain = dav1d->apply_grain; >> >> +s.all_layers = dav1d->all_layers; >> +if (dav1d->operating_point >= 0) >> +s.operating_point = dav1d->operating_point; >> + >> s.n_tile_threads = dav1d->tile_threads >> ? dav1d->tile_threads >> : FFMIN(floor(sqrt(threads)), >> DAV1D_MAX_TILE_THREADS); >> @@ -378,6 +384,8 @@ static const AVOption libdav1d_options[] = { >> { "tilethreads", "Tile threads", OFFSET(tile_threads), >> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD }, >> { "framethreads", "Frame threads", OFFSET(frame_threads), >> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD }, >> { "filmgrain", "Apply Film Grain", OFFSET(apply_grain), >> AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD }, >> +{ "oppoint", "Select an operating point of the scalable bitstream", >> OFFSET(operating_point), AV_OPT_TYPE_INT, { .i64 = -1 }, 0, 31, VD }, >> +{ "alllayers", "Output all spatial layers", OFFSET(all_layers), >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VD }, >> { NULL } >> }; >> >> -- >> 2.24.0.432.g9d3f5f5b63-goog >> >> > ping? > > Is this patch ok? > Any chance to be submitted? or is there any more comment on it? > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2 1/2] fftools: add global option to dump filter graph to stderr
From: Limin Wang It's useful for debugging filter graph purposes, now only lavfi can do that. Reviewed-by: Carl Eugen Hoyos Signed-off-by: Limin Wang --- doc/ffmpeg.texi | 4 fftools/ffmpeg.h| 1 + fftools/ffmpeg_filter.c | 7 +++ fftools/ffmpeg_opt.c| 3 +++ 4 files changed, 15 insertions(+) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 92337d..f822a1025e 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -735,6 +735,10 @@ Technical note -- attachments are implemented as codec extradata, so this option can actually be used to extract extradata from any stream, not just attachments. +@item -dump_filtergraph (@emph{global}) +Dump filter graph to stderr. It is off by default, the option is mostly useful +for debugging filter graph purposes + @item -noautorotate Disable automatically rotating video based on file metadata. diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 7b6f802082..5b8319da07 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -607,6 +607,7 @@ extern AVIOContext *progress_avio; extern float max_error_rate; extern char *videotoolbox_pixfmt; +extern int dump_filtergraph; extern int filter_nbthreads; extern int filter_complex_nbthreads; extern int vstats_version; diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 72838de1e2..edc15cff61 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -1109,6 +1109,13 @@ int configure_filtergraph(FilterGraph *fg) if ((ret = avfilter_graph_config(fg->graph, NULL)) < 0) goto fail; +if (dump_filtergraph) { +char *dump = avfilter_graph_dump(fg->graph, NULL); +fputs(dump, stderr); +fflush(stderr); +av_free(dump); +} + /* limit the lists of allowed formats to the ones selected, to * make sure they stay the same if the filtergraph is reconfigured later */ for (i = 0; i < fg->nb_outputs; i++) { diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 71063cc443..7616209a43 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -101,6 +101,7 @@ int copy_ts = 0; int start_at_zero = 0; int copy_tb = -1; int debug_ts = 0; +int dump_filtergraph = 0; int exit_on_error = 0; int abort_on_flags= 0; int print_stats = -1; @@ -3535,6 +3536,8 @@ const OptionDef options[] = { { "dump_attachment", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(dump_attachment) }, "extract an attachment into a file", "filename" }, +{ "dump_filtergraph", OPT_BOOL, { &dump_filtergraph }, +"dump filter graph to stderr" }, { "stream_loop", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_INPUT | OPT_OFFSET, { .off = OFFSET(loop) }, "set number of times input stream shall be looped", "loop count" }, { "debug_ts", OPT_BOOL | OPT_EXPERT, { &debug_ts }, -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v6 1/3] hevc_mp4toannexb: Insert correct parameter sets before IRAP
On Mon, 25. Nov 01:50, Michael Niedermayer wrote: > On Sun, Nov 24, 2019 at 11:29:18AM -0500, Andriy Gelman wrote: > > On Sun, 24. Nov 00:02, Michael Niedermayer wrote: > > > On Tue, Oct 15, 2019 at 10:50:39PM -0400, Andriy Gelman wrote: > > > > From: Andriy Gelman > > > > > > > > Fixes #7799 > > > > > > > > Currently, the mp4toannexb filter always inserts the same extradata at > > > > the start of the first IRAP unit. As in ticket #7799, this can lead to > > > > decoding errors if modified parameter sets are signalled in-band. > > > > > > > > Decoding errors/visual artifacts are also present in the following > > > > fate-suite/hevc-conformance datasets for hevc->mp4->hevc conversion: > > > > -RAP_B_Bossen_1.bit > > > > -RPS_C_ericsson_5.bit > > > > -SLIST_A_Sony_4.bit > > > > -SLIST_B_Sony_8.bit > > > > -SLIST_C_Sony_3.bit > > > > -SLIST_D_Sony_9.bit > > > > -TSKIP_A_MS_2.bit > > > > > > > > This commit solves these errors by keeping track of VPS/SPS/PPS > > > > parameter sets > > > > during the conversion. The correct combination is inserted at the start > > > > of the first IRAP. SEIs from extradata are inserted before each IRAP. > > > > > > > > This commit also makes an update to the hevc-bsf-mp4toannexb fate test > > > > since the result before this patch contained duplicate parameter sets > > > > in-band. > > > > --- > > > > libavcodec/hevc_mp4toannexb_bsf.c | 503 -- > > > > tests/fate/hevc.mak | 2 +- > > > > 2 files changed, 472 insertions(+), 33 deletions(-) > [...] > > > > > > [...] > > > > +/* > > > > + * Function converts mp4 access unit into annexb > > > > + * Output packet structure > > > > + * VPS, SPS, PPS, [SEI(from extradata)], [SEI_PREFIX(from access > > > > unit)], IRAP, [SEI_SUFFIX] > > > > + * or > > > > + * [SEI_PREFIX (from access unit)], [PPS (if not already signalled)], > > > > VCL(non-irap), [SEI_SUFFIX] > > > > + */ > > > > static int hevc_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *out) > > > > { > > > > HEVCBSFContext *s = ctx->priv_data; > > > > AVPacket *in; > > > > -GetByteContext gb; > > > > - > > > > -int got_irap = 0; > > > > -int i, ret = 0; > > > > +H2645Packet pkt; > > > > +int i, j, prev_size, ret; > > > > +int irap_done; > > > > > > > > ret = ff_bsf_get_packet(ctx, &in); > > > > if (ret < 0) > > > > return ret; > > > > > > > > +/* output the annexb nalu if extradata is not parsed*/ > > > > if (!s->extradata_parsed) { > > > > av_packet_move_ref(out, in); > > > > av_packet_free(&in); > > > > return 0; > > > > } > > > > > > > > > > > -bytestream2_init(&gb, in->data, in->size); > > > > > > Is this really better without using an existing bytestream* API ? > > > > If I use the API, then I'd have to call bytestraem2_init for each nal unit. > > I > > also don't use the bytestream2_get_byte function. It seemed simpler to use > > the WRITE_NAL macro. > > > > But maybe I've misunderstood your question. > > i had nothing really specific in mind, just the feeling that using none of > the existing APIs there is a bit odd. > > but more specifically, what about the write side ? If I use the bytestream* API, then I'd have to add extra boiler plate code each time I resize the output with av_grow_packet(). I'd have to add something like: prev_size = bytestream2_tell_p(...); bytestream2_init_writer(...); bytestream2_skip_p(..., prev_size); Or maybe the API needs an extra function that reinitializes the pointers but keeps the current state of the writer. -- Andriy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] [libdav1d.c]: Add options for spatial layers.
> 在 2019年11月26日,07:16,Thierry Foucu 写道: > > On Wed, Nov 20, 2019 at 9:55 AM Thierry Foucu wrote: > >> >> >> On Thu, Nov 14, 2019 at 9:36 AM Thierry Foucu wrote: >> >>> Disable by default to output all the layers, to match libaomdec wrapper. >>> Add option to select the operating point for the spatial layers. >>> --- >>> libavcodec/libdav1d.c | 8 >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c >>> index cf4b178f1d..ea4ef641bf 100644 >>> --- a/libavcodec/libdav1d.c >>> +++ b/libavcodec/libdav1d.c >>> @@ -40,6 +40,8 @@ typedef struct Libdav1dContext { >>> int tile_threads; >>> int frame_threads; >>> int apply_grain; >>> +int operating_point; >>> +int all_layers; >>> } Libdav1dContext; >>> >>> static const enum AVPixelFormat pix_fmt[][3] = { >>> @@ -134,6 +136,10 @@ static av_cold int libdav1d_init(AVCodecContext *c) >>> if (dav1d->apply_grain >= 0) >>> s.apply_grain = dav1d->apply_grain; >>> >>> +s.all_layers = dav1d->all_layers; >>> +if (dav1d->operating_point >= 0) >>> +s.operating_point = dav1d->operating_point; >>> + >>> s.n_tile_threads = dav1d->tile_threads >>> ? dav1d->tile_threads >>> : FFMIN(floor(sqrt(threads)), >>> DAV1D_MAX_TILE_THREADS); >>> @@ -378,6 +384,8 @@ static const AVOption libdav1d_options[] = { >>> { "tilethreads", "Tile threads", OFFSET(tile_threads), >>> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD }, >>> { "framethreads", "Frame threads", OFFSET(frame_threads), >>> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD }, >>> { "filmgrain", "Apply Film Grain", OFFSET(apply_grain), >>> AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD }, >>> +{ "oppoint", "Select an operating point of the scalable bitstream", >>> OFFSET(operating_point), AV_OPT_TYPE_INT, { .i64 = -1 }, 0, 31, VD }, >>> +{ "alllayers", "Output all spatial layers", OFFSET(all_layers), >>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VD }, >>> { NULL } >>> }; >>> >>> -- >>> 2.24.0.432.g9d3f5f5b63-goog >>> >>> >> ping? >> >> Is this patch ok? >> > > > Any chance to be submitted? or is there any more comment on it? LGTM, But i think there maybe need one document to describe these two options. > > >> >> > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] lavc/qsvenc: Fix some code indentations
Signed-off-by: Linjie Fu --- libavcodec/qsvenc.c | 8 libavcodec/qsvenc.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 93d49ba..e176d57 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -764,10 +764,10 @@ FF_ENABLE_DEPRECATION_WARNINGS #if QSV_HAVE_EXT_VP9_PARAM if (avctx->codec_id == AV_CODEC_ID_VP9) { - q->extvp9param.Header.BufferId = MFX_EXTBUFF_VP9_PARAM; - q->extvp9param.Header.BufferSz = sizeof(q->extvp9param); - q->extvp9param.WriteIVFHeaders = MFX_CODINGOPTION_OFF; - q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extvp9param; +q->extvp9param.Header.BufferId = MFX_EXTBUFF_VP9_PARAM; +q->extvp9param.Header.BufferSz = sizeof(q->extvp9param); +q->extvp9param.WriteIVFHeaders = MFX_CODINGOPTION_OFF; +q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extvp9param; } #endif diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h index a3e9357..ee35582 100644 --- a/libavcodec/qsvenc.h +++ b/libavcodec/qsvenc.h @@ -125,7 +125,7 @@ typedef struct QSVEncContext { mfxExtMultiFrameControl extmfc; #endif #if QSV_HAVE_EXT_VP9_PARAM - mfxExtVP9Param extvp9param; +mfxExtVP9Param extvp9param; #endif mfxExtOpaqueSurfaceAlloc opaque_alloc; -- 2.7.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] lavc/qsvenc: add Tiles encode support for HEVC
Add -tile_rows and -tile_cols option to specify the number of tile rows and columns for ICL+ (gen 11) platform. A tile must wholly contain all the slices within it. Slices cannot cross tile boundaries. So the slice number would be implicitly resized to the max(nSlice, nTile). Example: ffmpeg -v verbose -hwaccel qsv -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -s:v 1920x1080 -i ./input.nv12 -vf format=nv12,hwupload=extra_hw_frames=64 -c:v hevc_qsv -tile_rows 2 -tile_cols 2 -slices 4 -y output.h265 Also dump the actual quantity of encoded tiled rows and columns in run time. Fix the enhancement #8400. Signed-off-by: Linjie Fu --- libavcodec/qsvenc.c | 32 +++- libavcodec/qsvenc.h | 7 +++ libavcodec/qsvenc_hevc.c | 3 +++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index e176d57..64814fc 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -139,6 +139,9 @@ static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q, #if QSV_HAVE_CO3 mfxExtCodingOption3 *co3 = (mfxExtCodingOption3*)coding_opts[2]; #endif +#if QSV_HAVE_EXT_HEVC_TILES +mfxExtHEVCTiles *exthevctiles = (mfxExtHEVCTiles *)coding_opts[3 + QSV_HAVE_CO_VPS]; +#endif av_log(avctx, AV_LOG_VERBOSE, "profile: %s; level: %"PRIu16"\n", print_profile(info->CodecProfile), info->CodecLevel); @@ -204,6 +207,12 @@ static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q, av_log(avctx, AV_LOG_VERBOSE, "RateDistortionOpt: %s\n", print_threestate(co->RateDistortionOpt)); +#if QSV_HAVE_EXT_HEVC_TILES +if (avctx->codec_id == AV_CODEC_ID_HEVC) +av_log(avctx, AV_LOG_VERBOSE, "NumTileColumns: %"PRIu16"; NumTileRows: %"PRIu16"\n", + exthevctiles->NumTileColumns, exthevctiles->NumTileRows); +#endif + #if QSV_HAVE_CO2 av_log(avctx, AV_LOG_VERBOSE, "RecoveryPointSEI: %s IntRefType: %"PRIu16"; IntRefCycleSize: %"PRIu16"; IntRefQPDelta: %"PRId16"\n", @@ -771,6 +780,16 @@ FF_ENABLE_DEPRECATION_WARNINGS } #endif +#if QSV_HAVE_EXT_HEVC_TILES +if (avctx->codec_id == AV_CODEC_ID_HEVC) { +q->exthevctiles.Header.BufferId = MFX_EXTBUFF_HEVC_TILES; +q->exthevctiles.Header.BufferSz = sizeof(q->exthevctiles); +q->exthevctiles.NumTileColumns = q->tile_cols; +q->exthevctiles.NumTileRows = q->tile_rows; +q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->exthevctiles; +} +#endif + if (!check_enc_param(avctx,q)) { av_log(avctx, AV_LOG_ERROR, "some encoding parameters are not supported by the QSV " @@ -887,7 +906,14 @@ static int qsv_retrieve_enc_params(AVCodecContext *avctx, QSVEncContext *q) }; #endif -mfxExtBuffer *ext_buffers[2 + QSV_HAVE_CO2 + QSV_HAVE_CO3 + QSV_HAVE_CO_VPS]; +#if QSV_HAVE_EXT_HEVC_TILES +mfxExtHEVCTiles hevc_tile_buf = { + .Header.BufferId = MFX_EXTBUFF_HEVC_TILES, + .Header.BufferSz = sizeof(hevc_tile_buf), +}; +#endif + +mfxExtBuffer *ext_buffers[2 + QSV_HAVE_CO2 + QSV_HAVE_CO3 + QSV_HAVE_CO_VPS + QSV_HAVE_EXT_HEVC_TILES]; int need_pps = avctx->codec_id != AV_CODEC_ID_MPEG2VIDEO; int ret, ext_buf_num = 0, extradata_offset = 0; @@ -905,6 +931,10 @@ static int qsv_retrieve_enc_params(AVCodecContext *avctx, QSVEncContext *q) if (q->hevc_vps) ext_buffers[ext_buf_num++] = (mfxExtBuffer*)&extradata_vps; #endif +#if QSV_HAVE_EXT_HEVC_TILES +if (avctx->codec_id == AV_CODEC_ID_HEVC) +ext_buffers[ext_buf_num++] = (mfxExtBuffer*)&hevc_tile_buf; +#endif q->param.ExtParam= ext_buffers; q->param.NumExtParam = ext_buf_num; diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h index ee35582..6609171 100644 --- a/libavcodec/qsvenc.h +++ b/libavcodec/qsvenc.h @@ -38,6 +38,7 @@ #define QSV_HAVE_CO3 QSV_VERSION_ATLEAST(1, 11) #define QSV_HAVE_CO_VPS QSV_VERSION_ATLEAST(1, 17) +#define QSV_HAVE_EXT_HEVC_TILES QSV_VERSION_ATLEAST(1, 13) #define QSV_HAVE_EXT_VP9_PARAM QSV_VERSION_ATLEAST(1, 26) #define QSV_HAVE_TRELLIS QSV_VERSION_ATLEAST(1, 8) @@ -124,6 +125,9 @@ typedef struct QSVEncContext { mfxExtMultiFrameParam extmfp; mfxExtMultiFrameControl extmfc; #endif +#if QSV_HAVE_EXT_HEVC_TILES +mfxExtHEVCTiles exthevctiles; +#endif #if QSV_HAVE_EXT_VP9_PARAM mfxExtVP9Param extvp9param; #endif @@ -161,6 +165,9 @@ typedef struct QSVEncContext { int max_frame_size; int max_slice_size; +int tile_cols; +int tile_rows; + int aud; int single_sei_nal_unit; diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c index da64b4c..27e2232 100644 --- a/libavcodec/qsvenc_hevc.c +++ b/libavcodec/qsvenc_hevc.c @@ -243,6 +243,9 @@ static const AVOption options[] = { { "gpb", "1: GPB (generalized P/B frame); 0: regular P frame", OFFSET(qsv.gpb), AV_OPT_TYPE_BOO
Re: [FFmpeg-devel] [aarch64] improve performance of ff_hscale_8_to_15_neon
On Mon, Nov 25, 2019 at 4:18 PM Jean-Baptiste Kempf wrote: > Why adding a new version, in intrinsics, instead of changing the existing > implementation? > Personal preference: I like to read c code instead of asm. Also I find it much easier to experiment by changing c code rather than asm. Is there a coding rule in ffmpeg that restricts the use of intrinsics? If that is the case, I can adapt my code to the existing asm code. Thanks, Sebastian ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [aarch64] improve performance of ff_hscale_8_to_15_neon
On Tue, Nov 26, 2019, at 05:51, Sebastian Pop wrote: > On Mon, Nov 25, 2019 at 4:18 PM Jean-Baptiste Kempf wrote: > > Why adding a new version, in intrinsics, instead of changing the existing > > implementation? > > > > Personal preference: I like to read c code instead of asm. > Also I find it much easier to experiment by changing c code rather than asm. > > Is there a coding rule in ffmpeg that restricts the use of intrinsics? Yes. See doc/optimization.txt. Use external asm (nasm/yasm) or inline asm (__asm__()), do not use intrinsics. Also, here, you're changing some existing code, please improve the code and do not duplicate code. > If that is the case, I can adapt my code to the existing asm code. Please. -- Jean-Baptiste Kempf - President +33 672 704 734 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V3] add stackblur
V3: - Add RGB24/RGBA/YUV support - Use the LUT - ToDo: enable slice threading support Jun Zhao (1): lavfi/stackblur: add stackblur filter doc/filters.texi | 22 + libavfilter/Makefile |1 + libavfilter/allfilters.c |1 + libavfilter/vf_stackblur.c | 1040 4 files changed, 1064 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_stackblur.c ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V3] lavfi/stackblur: add stackblur filter
From: Jun Zhao add stackblur filter Signed-off-by: Jun Zhao --- doc/filters.texi | 22 + libavfilter/Makefile |1 + libavfilter/allfilters.c |1 + libavfilter/vf_stackblur.c | 1040 4 files changed, 1064 insertions(+), 0 deletions(-) create mode 100644 libavfilter/vf_stackblur.c diff --git a/doc/filters.texi b/doc/filters.texi index 16bf2df..5d0bb31 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -17269,6 +17269,28 @@ ffmpeg -i main.mpg -i ref.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main] @end example @end itemize +@section stackblur + +Blur the input image with stack blur algorithm, this is a compromise between Gaussian Blur +and Box blur, It creates much better looking blurs than Box Blur, but is faster +than the Gaussian Blur. + +Called it stack blur because this describes best how this filter works internally: it creates +a kind of moving stack of colors whilst scanning through the image. Thereby it +just has to add one new block of color to the right side of the stack and remove the +leftmost color. The remaining colors on the topmost layer of the stack are either added on +or reduced by one, depending on if they are on the right or on the left side of the stack. + +This filter accepts the following options: + +@table @option +@item radius +@item r +Set the blurring box radius. The option value must be a int number in +the range [2, 254] that specifies the blur box size of the stack blur filter +used to blur the image. Default value is @code{2}. +@end table + @section stereo3d Convert between different stereoscopic image formats. diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 46e3eec..09cd32d 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -393,6 +393,7 @@ OBJS-$(CONFIG_SPLIT_FILTER) += split.o OBJS-$(CONFIG_SPP_FILTER)+= vf_spp.o OBJS-$(CONFIG_SR_FILTER) += vf_sr.o OBJS-$(CONFIG_SSIM_FILTER) += vf_ssim.o framesync.o +OBJS-$(CONFIG_STACKBLUR_FILTER) += vf_stackblur.o OBJS-$(CONFIG_STEREO3D_FILTER) += vf_stereo3d.o OBJS-$(CONFIG_STREAMSELECT_FILTER) += f_streamselect.o framesync.o OBJS-$(CONFIG_SUBTITLES_FILTER) += vf_subtitles.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 2a69227..8e6e0d4 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -374,6 +374,7 @@ extern AVFilter ff_vf_split; extern AVFilter ff_vf_spp; extern AVFilter ff_vf_sr; extern AVFilter ff_vf_ssim; +extern AVFilter ff_vf_stackblur; extern AVFilter ff_vf_stereo3d; extern AVFilter ff_vf_streamselect; extern AVFilter ff_vf_subtitles; diff --git a/libavfilter/vf_stackblur.c b/libavfilter/vf_stackblur.c new file mode 100644 index 000..732e9f7 --- /dev/null +++ b/libavfilter/vf_stackblur.c @@ -0,0 +1,1040 @@ +/* + * Copyright (c) 2019 Jun Zhao + * + * 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 + */ + +/** + * @file + * Stack blur filter + * + * Stack Blur Algorithm by Mario Klingemann + * + * @see http://quasimondo.com/StackBlurForCanvas/StackBlur.js + * + * StackBlur - a fast almost Gaussian Blur For Canvas + * + * Version:0.5 + * Author: Mario Klingemann + * Contact:ma...@quasimondo.com + * Website:http://www.quasimondo.com/StackBlurForCanvas + * Twitter:@quasimondo + * + * This is a compromise between Gaussian Blur and Box blur + * It creates much better looking blurs than Box Blur, but is faster + * than the Gaussian Blur implementation. + * + * Called it Stack Blur because this describes best how this + * filter works internally: it creates a kind of moving stack + * of colors whilst scanning through the image. Thereby it + * just has to add one new block of color to the right side + * of the stack and remove the leftmost color. The remaining + * colors on the topmost layer of the stack are either added on + * or reduced by one, depending on if they are on the right or + * on the left side of the stack. + */ + +#include "libavutil/avassert.h" +#include "libavutil/imgutils.h" +#include "libavutil/opt.h" +#include "avfilter.h" +#include "formats.h" +#include "internal.h" +#include "v
[FFmpeg-devel] [PATCH] avformat/udp: modify the not write-only to read-only mode.
0001-avformat-udp-modify-the-not-write-only-to-read-only-.patch Description: Binary data Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] avformat/udp: modify the not write-only to read-only mode.
0001-avformat-udp-modify-the-not-write-only-to-read-only-.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".