[FFmpeg-devel] [PATCH] Restore compatibility with powerpc-apple-darwin9-gcc-4.2.1
From: Pavel Koshevoy... and attempt to preserve compatibility with clang that was introduced in 311a953c76081fca99b872629d248f9d69ebc0c3 (untested) --- libavcodec/ppc/asm.S | 8 +++- libavcodec/ppc/fft_altivec.S | 26 +++--- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/libavcodec/ppc/asm.S b/libavcodec/ppc/asm.S index 700aa0d..6222b8b 100644 --- a/libavcodec/ppc/asm.S +++ b/libavcodec/ppc/asm.S @@ -24,6 +24,12 @@ #define JOIN(a, b) GLUE(a, b) #define X(s) JOIN(EXTERN_ASM, s) +#if __APPLE__ +#define R(n) r ## n +#else +#define R(n) n +#endif + #if ARCH_PPC64 #define PTR .quad @@ -53,7 +59,7 @@ L(\name): .endm .macro movrel rd, sym, gp -ld \rd, \sym@got(2) +ld \rd, \sym@got(R(2)) .endm .macro get_got rd diff --git a/libavcodec/ppc/fft_altivec.S b/libavcodec/ppc/fft_altivec.S index e0149a4..8cd68d6 100644 --- a/libavcodec/ppc/fft_altivec.S +++ b/libavcodec/ppc/fft_altivec.S @@ -354,14 +354,18 @@ fft_data: .macro fft_calc interleave extfunc ff_fft_calc\interleave\()_altivec mflrr0 -stp r0, 2*PS(1) -stpur1, -(160+16*PS)(1) +stp r0, 2*PS(R(1)) +stpur1, -(160+16*PS)(R(1)) get_got r11 addir6, r1, 16*PS stvmr6, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29 mfvrsave r0 -stw r0, 15*PS(1) -li r6, -4 #0xfffc +stw r0, 15*PS(R(1)) +#if __APPLE__ +li r6, 0xfffc +#else +li r6, -4 +#endif mtvrsave r6 movrel r6, fft_data, r11 @@ -372,7 +376,7 @@ extfunc ff_fft_calc\interleave\()_altivec movrel r12, X(ff_cos_tabs), r11 movrel r6, fft_dispatch_tab\interleave\()_altivec, r11 -lwz r3, 0(3) +lwz r3, 0(R(3)) subir3, r3, 2 slwir3, r3, 2+ARCH_PPC64 lpx r3, r3, r6 @@ -382,10 +386,10 @@ extfunc ff_fft_calc\interleave\()_altivec addir6, r1, 16*PS lvm r6, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29 -lwz r6, 15*PS(1) +lwz r6, 15*PS(R(1)) mtvrsave r6 -lp r1, 0(1) -lp r0, 2*PS(1) +lp r1, 0(R(1)) +lp r0, 2*PS(R(1)) mtlrr0 blr .endm @@ -393,15 +397,15 @@ extfunc ff_fft_calc\interleave\()_altivec .macro DECL_FFT suffix, bits, n, n2, n4 fft\n\suffix\()_altivec: mflr r0 -stp r0,PS*(\bits-3)(1) +stp r0,PS*(\bits-3)(R(1)) blfft\n2\()_altivec addi2 r3,\n*4 blfft\n4\()_altivec addi2 r3,\n*2 blfft\n4\()_altivec addi2 r3,\n*-6 -lpr0,PS*(\bits-3)(1) -lpr4,\bits*PS(12) +lpr0,PS*(\bits-3)(R(1)) +lpr4,\bits*PS(R(12)) mtlr r0 lir5,\n/16 b fft_pass\suffix\()_altivec -- 2.6.6 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Restore compatibility with powerpc-apple-darwin9-gcc-4.2.1
I've re-sent this patch via git send-email to make it easier to view. It has been tested with gcc 4.2.1 on osx 10.5 by me, and with clang and gcc 4.9 by Jing Yu on ubuntu -- http://ffmpeg.org/pipermail/ffmpeg-devel/2016-July/196547.html Is there any reason it shouldn't be applied? Pavel. On Thu, Jul 14, 2016 at 10:06 PM,wrote: > From: Pavel Koshevoy > > ... and attempt to preserve compatibility with clang that was > introduced in 311a953c76081fca99b872629d248f9d69ebc0c3 (untested) > --- > libavcodec/ppc/asm.S | 8 +++- > libavcodec/ppc/fft_altivec.S | 26 +++--- > 2 files changed, 22 insertions(+), 12 deletions(-) > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/libvpx: Add VPx alpha decode support
On 7/15/2016 12:31 AM, James Zern wrote: > On Tue, Jul 12, 2016 at 1:47 PM, James Almerwrote: >> What's the first libvpx version that supports vp8a and vp9a? >> Configure currently checks for 0.9.1 as the oldest supported >> version for vp8 decoding, 0.9.7 for vp8 encoding, and 1.3.0 for >> both vp9 components. We then use a bunch of ifdeffery to make >> sure things compile with every version supported, so depending >> on the answer to the above question this patch (and the one >> adding vp9a enconding) may need to do the same, or it could be >> a good reason to clean up things a bit and bump the minimum >> required version for every component to for example 1.3.0. > > This has come up before. I'm OK with bumping the minimum and will send > something for that, though I'd say 1.4.0 (4/2015) is a better base for > vp9; 1.3.0 could produce invalid bitstreams. Any objections? I'm ok with bumping vp9 encoder requirement to 1.4.0. That alone will clean a lot of ifdeffery, i bet. But don't change the other three components unless there's a similar reason for it as with vp9 enc (broken encoding or decoding prior to a certain version). ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/libvpx: Add VPx alpha decode support
On Tue, Jul 12, 2016 at 1:47 PM, James Almerwrote: > What's the first libvpx version that supports vp8a and vp9a? > Configure currently checks for 0.9.1 as the oldest supported > version for vp8 decoding, 0.9.7 for vp8 encoding, and 1.3.0 for > both vp9 components. We then use a bunch of ifdeffery to make > sure things compile with every version supported, so depending > on the answer to the above question this patch (and the one > adding vp9a enconding) may need to do the same, or it could be > a good reason to clean up things a bit and bump the minimum > required version for every component to for example 1.3.0. This has come up before. I'm OK with bumping the minimum and will send something for that, though I'd say 1.4.0 (4/2015) is a better base for vp9; 1.3.0 could produce invalid bitstreams. Any objections? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/libvpx: Add VPx alpha decode support
On Thu, Jul 14, 2016 at 12:15 PM, Vignesh Venkatasubramanianwrote: > +ret = vpx_init( > +avctx, > +(avctx->codec_id == AV_CODEC_ID_VP8) ? > +_codec_vp8_dx_algo : _codec_vp9_dx_algo, > +1); > +if (ret) I can adjust this formatting to be more k like when I submit it. Before that I'll leave this open for other comments for a bit. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/libvpx: Add VPx alpha decode support
On Tue, Jul 12, 2016 at 11:48 AM, Vignesh Venkatasubramanianwrote: > On Mon, Jul 11, 2016 at 5:55 PM, James Zern > wrote: >> On Thu, Jul 7, 2016 at 11:43 AM, Vignesh Venkatasubramanian >> wrote: >> >>> [...] >>> -av_image_copy(picture->data, picture->linesize, (const uint8_t >>> **)img->planes, >>> - img->stride, avctx->pix_fmt, img->d_w, img->d_h); >>> + >>> +planes[0] = img->planes[VPX_PLANE_Y]; >>> +planes[1] = img->planes[VPX_PLANE_U]; >>> +planes[2] = img->planes[VPX_PLANE_V]; >>> +planes[3] = >>> +ctx->has_alpha_channel ? img_alpha->planes[VPX_PLANE_Y] : NULL; >>> +linesizes[0] = img->stride[VPX_PLANE_Y]; >>> +linesizes[1] = img->stride[VPX_PLANE_U]; >>> +linesizes[2] = img->stride[VPX_PLANE_V]; >>> +linesizes[3] = >>> +ctx->has_alpha_channel ? img_alpha->stride[VPX_PLANE_Y] : 0; >>> +av_image_copy(picture->data, picture->linesize, (const >>> uint8_t**)planes, >>> + linesizes, avctx->pix_fmt, img->d_w, img->d_h); >>> >> >> couldn't this just be 1 additional av_image_copy_plane()? > > av_image_copy does some width computation [1] before calling > av_image_copy_plane. i didn't want to duplicate that computation here. > it just seemed cleaner this way. please let me know if you strongly > feel otherwise and i can change this. > I think this would become something like: if (!ctx->has_alpha_channel) { av_image_copy(picture->data, picture->linesize, (const uint8_t **)img->planes, img->stride, avctx->pix_fmt, img->d_w, img->d_h); } else { av_image_copy(picture->data, picture->linesize, (const uint8_t **)img->planes, img->stride, AV_PIX_FMT_YUV420P, img->d_w, img->d_h); av_image_copy_plane(picture->data[3], picture->linesize[3], img_alpha->planes[VPX_PLANE_Y], img_alpha->d_w, img->d_w, img->d_h); } The problem there being that you'd probably need to force the non-alpha version of the first copy to avoid copying uninitialized data. For now it works because only yuva420p is supported, but should someone want a higher profile it would complicate things. I'm all right with this, unless someone has a better suggestion. > [1] > https://github.com/FFmpeg/FFmpeg/blob/eae2d89bf715bc3edff478174b43e1f388e768bf/libavutil/imgutils.c#L326 > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 5/5] af_hdcd: detect and report encoding errors and oddities
On Tue, Jul 12, 2016 at 12:54:10PM -0500, Burt P wrote: > Count and report when a code is signaled but fails to match a known pattern. > For example try Līve - Secret Samadhi. > > Signed-off-by: Burt P> --- > libavfilter/af_hdcd.c | 73 > --- > 1 file changed, 58 insertions(+), 15 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/5] af_hdcd: only hdcd_update_info() when something changes
On Tue, Jul 12, 2016 at 12:54:08PM -0500, Burt P wrote: > Only call hdcd_update_info() when the control code changes > instead of every frame, so the counters are more meaningful. > > Signed-off-by: Burt P> --- > libavfilter/af_hdcd.c | 34 +- > 1 file changed, 13 insertions(+), 21 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/5] af_hdcd: fewer false positives by ignoring code_counterC in HDCD detection
On Tue, Jul 12, 2016 at 12:54:07PM -0500, Burt P wrote: > Signed-off-by: Burt P> --- > libavfilter/af_hdcd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct answer. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]lavf/img2: Remove ffv1-img
On Wed, Jul 13, 2016 at 11:09:48AM +0200, Carl Eugen Hoyos wrote: > Hi! > > Attached patch removes a line from img2.c, afaict the ffv1 format > cannot be used without a container, at least it doesn't work with > current (and very old) FFmpeg. > > Carl Eugen > img2.c |1 - > 1 file changed, 1 deletion(-) > 93360a2020cd1858227589101b4e4b8997d3d5dd > 0001-lavf-img2-Remove-ffv1-img-the-format-requires-a-cont.patch > From 1ca907a8009ae87f728b10be83602f355230cfd6 Mon Sep 17 00:00:00 2001 > From: Carl Eugen Hoyos> Date: Wed, 13 Jul 2016 11:06:59 +0200 > Subject: [PATCH] lavf/img2: Remove ffv1-img, the format requires a container. ok thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything should be made as simple as possible, but not simpler. -- Albert Einstein signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [FFmpeg-cvslog] mov: Support prores with multiple stsd
On Thu, 14 Jul 2016 16:26:09 -0400 compnwrote: > shouldnt these other 4 tags also be added? also i think adding a comment in isom.c about adding any new prores tags to this hack in mov.c would be useful. i am assuming prores will have more tags in the future. -compn ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [FFmpeg-cvslog] mov: Support prores with multiple stsd
On Wed, 13 Jul 2016 17:06:43 +0200 (CEST) g...@videolan.org (Vittorio Giovara) wrote: > ffmpeg | branch: master | Vittorio Giovara >| Thu Jun 9 18:55:19 2016 -0400| > [846a3e78a535f05ee61bb23a160f3378f041f751] | committer: Vittorio > Giovara > > mov: Support prores with multiple stsd > > This function needs to return false, or data in the additional tables > will be skipped, and the decoder will not be able to decode frames > associated with them. > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=846a3e78a535f05ee61bb23a160f3378f041f751 > --- > > libavformat/mov.c |2 ++ > + // prores is allowed to have differing data format and > codec tag > + codec_tag != AV_RL32("apcn") && codec_tag != > AV_RL32("apch") && (c->fc->video_codec_id ? video_codec_id != arent there more than just apch / apcn isom tags? libavformat/isom.c lists a few: { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'h') }, /* Apple ProRes 422 High Quality */ { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'n') }, /* Apple ProRes 422 Standard Definition */ { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 's') }, /* Apple ProRes 422 LT */ { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'o') }, /* Apple ProRes 422 Proxy */ { AV_CODEC_ID_PRORES, MKTAG('a', 'p', '4', 'h') }, /* Apple ProRes */ { AV_CODEC_ID_PRORES, MKTAG('a', 'p', '4', 'x') }, /* Apple ProRes XQ */ shouldnt these other 4 tags also be added? -compn ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/libvpx: Add VPx alpha decode support
On Tue, Jul 12, 2016 at 1:47 PM, James Almerwrote: > On 7/12/2016 3:48 PM, Vignesh Venkatasubramanian wrote: >> VPx (VP8/VP9) alpha encoding has been part of FFmpeg. Now, add the >> ability to decode such files with alpha channel. >> >> Signed-off-by: Vignesh Venkatasubramanian >> --- >> libavcodec/libvpxdec.c | 102 +--- >> tests/fate/vpx.mak | 3 + >> tests/ref/fate/vp8-alpha-decode | 125 >> >> 3 files changed, 210 insertions(+), 20 deletions(-) >> create mode 100644 tests/ref/fate/vp8-alpha-decode >> > > What's the first libvpx version that supports vp8a and vp9a? vp8a and vp9a aren't in the bitstream. it's worked around in the container. so there is no separate minimum version requirement for that. the existing minimums for vp8 and vp9 decoding should hold. > Configure currently checks for 0.9.1 as the oldest supported > version for vp8 decoding, 0.9.7 for vp8 encoding, and 1.3.0 for > both vp9 components. We then use a bunch of ifdeffery to make > sure things compile with every version supported, so depending > on the answer to the above question this patch (and the one > adding vp9a enconding) may need to do the same, or it could be > a good reason to clean up things a bit and bump the minimum > required version for every component to for example 1.3.0. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- Vignesh ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: Add HDCD filter tests for false positive and error detection
Signed-off-by: Burt P--- tests/fate-run.sh | 3 ++- tests/fate/filter-audio.mak | 12 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index c898695..5841b0c 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -328,13 +328,14 @@ if [ $err -gt 128 ]; then test "${sig}" = "${sig%[!A-Za-z]*}" || unset sig fi -if test -e "$ref" || test $cmp = "oneline" ; then +if test -e "$ref" || test $cmp = "oneline" || test $cmp = "grep" ; then case $cmp in diff) diff -u -b "$ref" "$outfile">$cmpfile ;; rawdiff)diff -u"$ref" "$outfile">$cmpfile ;; oneoff) oneoff "$ref" "$outfile">$cmpfile ;; stddev) stddev "$ref" "$outfile">$cmpfile ;; oneline)oneline"$ref" "$outfile">$cmpfile ;; +grep) grep "$ref" "$errfile">$cmpfile ;; null) cat "$outfile">$cmpfile ;; esac cmperr=$? diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 1a52320..cba2bca 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -199,6 +199,18 @@ fate-filter-hdcd: CMD = md5 -i $(SRC) -af hdcd -f s24le fate-filter-hdcd: CMP = oneline fate-filter-hdcd: REF = 5db465a58d2fd0d06ca944b883b33476 +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-false-positive +fate-filter-hdcd-false-positive: SRC = $(TARGET_SAMPLES)/filter/hdcd-false-positive.flac +fate-filter-hdcd-false-positive: CMD = md5 -i $(SRC) -af hdcd -f s24le +fate-filter-hdcd-false-positive: CMP = grep +fate-filter-hdcd-false-positive: REF = HDCD detected: no + +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, HDCD, FLAC, FLAC, PCM_S24LE, PCM_S24LE) += fate-filter-hdcd-detect-errors +fate-filter-hdcd-detect-errors: SRC = $(TARGET_SAMPLES)/filter/hdcd-encoding-errors.flac +fate-filter-hdcd-detect-errors: CMD = md5 -i $(SRC) -af hdcd -f s24le +fate-filter-hdcd-detect-errors: CMP = grep +fate-filter-hdcd-detect-errors: REF = detectable errors: [1-9] + FATE_AFILTER-yes += fate-filter-formats fate-filter-formats: libavfilter/tests/formats$(EXESUF) fate-filter-formats: CMD = run libavfilter/tests/formats -- 2.7.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]lavf/vplayerdec: Stricter probing
On Tue, Jul 12, 2016 at 12:01:25PM +, Carl Eugen Hoyos wrote: > > potentially simpler alternative: if you replace the original formats with > > "%*3d:%*2d:%*2d.%*2d%c" and "%*3d:%*2d:%*2d%c", does it work? > > Please commit this, it looks simpler to me. > You're in a better position to test. If it works, just apply (just make sure fate-sub-vplayer passes). You can take full authorship if that's what bugs you. -- Clément B. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCHv6] lavf: add libopenmpt demuxer
Fixes ticket #5623 TODO: bump lavf minor --- Changelog| 1 + configure| 4 ++ libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/libopenmpt.c | 176 +++ 5 files changed, 183 insertions(+) create mode 100644 libavformat/libopenmpt.c diff --git a/Changelog b/Changelog index 5b34d34..f2a1dcd 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version : +- libopenmpt demuxer version 3.1: diff --git a/configure b/configure index e015c75..0c7b5e9 100755 --- a/configure +++ b/configure @@ -245,6 +245,7 @@ External library support: --enable-libopencv enable video filtering via libopencv [no] --enable-libopenh264 enable H.264 encoding via OpenH264 [no] --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no] + --enable-libopenmpt enable decoding tracked files via libopenmpt [no] --enable-libopus enable Opus de/encoding via libopus [no] --enable-libpulseenable Pulseaudio input via libpulse [no] --enable-librubberband enable rubberband needed for rubberband filter [no] @@ -1505,6 +1506,7 @@ EXTERNAL_LIBRARY_LIST=" libopencv libopenh264 libopenjpeg +libopenmpt libopus libpulse librtmp @@ -2770,6 +2772,7 @@ libopencore_amrwb_decoder_deps="libopencore_amrwb" libopenh264_encoder_deps="libopenh264" libopenjpeg_decoder_deps="libopenjpeg" libopenjpeg_encoder_deps="libopenjpeg" +libopenmpt_demuxer_deps="libopenmpt" libopus_decoder_deps="libopus" libopus_encoder_deps="libopus" libopus_encoder_select="audio_frame_queue" @@ -5679,6 +5682,7 @@ enabled libopenjpeg && { check_lib openjpeg-2.1/openjpeg.h opj_version -lo check_lib openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC || check_lib openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC || die "ERROR: libopenjpeg not found"; } +enabled libopenmpt&& require_pkg_config "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create enabled libpulse && require_pkg_config libpulse pulse/pulseaudio.h pa_context_new enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket diff --git a/libavformat/Makefile b/libavformat/Makefile index c49f9de..6451c1c 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -527,6 +527,7 @@ OBJS-$(CONFIG_LIBGME_DEMUXER)+= libgme.o OBJS-$(CONFIG_LIBMODPLUG_DEMUXER)+= libmodplug.o OBJS-$(CONFIG_LIBNUT_DEMUXER)+= libnut.o OBJS-$(CONFIG_LIBNUT_MUXER) += libnut.o +OBJS-$(CONFIG_LIBOPENMPT_DEMUXER)+= libopenmpt.o OBJS-$(CONFIG_LIBRTMP) += librtmp.o OBJS-$(CONFIG_LIBSSH_PROTOCOL) += libssh.o OBJS-$(CONFIG_LIBSMBCLIENT_PROTOCOL) += libsmbclient.o diff --git a/libavformat/allformats.c b/libavformat/allformats.c index d490cc4..58c33a6 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -375,6 +375,7 @@ void av_register_all(void) REGISTER_DEMUXER (LIBGME, libgme); REGISTER_DEMUXER (LIBMODPLUG, libmodplug); REGISTER_MUXDEMUX(LIBNUT, libnut); +REGISTER_DEMUXER (LIBOPENMPT, libopenmpt); initialized = 1; } diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c new file mode 100644 index 000..fd38828 --- /dev/null +++ b/libavformat/libopenmpt.c @@ -0,0 +1,176 @@ +/* + * Tracked MOD demuxer (libopenmpt) + * Copyright (c) 2016 Josh de Kock + * + * 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 "libavutil/avstring.h" +#include "libavutil/opt.h" +#include "avformat.h" +#include "internal.h" + +typedef struct OpenMPTContext { +const AVClass *class; +openmpt_module *module; + +int channels; +double duration; +/* options */ +int sample_rate; +int64_t layout; +} OpenMPTContext; + +#define
Re: [FFmpeg-devel] [PATCH] lavf: add textdata virtual demuxer and demuxer
On date Tuesday 2016-06-28 11:42:42 +0200, Nicolas George encoded: > Le decadi 10 messidor, an CCXXIV, Stefano Sabatini a écrit : > > +The fftextdata bytestream consists of a sequence of packets. Each > > +packet starts with a timestamps expressed in a format recognized by > > +FFmpeg (see > > +@ref{time duration syntax,,the Time duration section in the > > ffmpeg-utils(1) manual,ffmpeg-utils}) > > +followed by a sequence of spaces and the base64 encoded data for the > > +packet, terminated by ";". The data representation may contain > > +interleaved space characters (a space, a tab, or a newline) which are > > +ignored. > > + > > +At the moment a single stream can be represented by an fftextdata > > +bytestream. > > I like the idea very much, but I feel the format is not very sympathetic to > future extensions. > > I had implemented a similar feature in the past, but I did not go to the > end. My idea was to use the default output format of ffprobe (thus, > hexadecimal rather than base64). The parser works, but I was stuck with the > problem that ffprobe outputs -show_format after -show_packets. I can post > the old patch on the list if you want. Sorry, I missed the reply. Sure, post the patch here if you can find it. Another possibility I'm exploring is using option serialization to specify the input format options - but this also will add a dependency on the FFmpeg version. In my use case, I don't care about compatibility issues, since the format is only used to inject data into other containers, so it's not used for archiviation (given the base64 encoding it would not be very efficient for that purpose). -- FFmpeg = Faithful and Foolish MultiPurpose Ecumenical Gangster ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avformat/mux: Apply auto bsfs in av_write_frame() too
On Thu, Jul 14, 2016 at 06:22:40AM +0800, Steven Liu wrote: > 2016-07-14 1:08 GMT+08:00 Michael Niedermayer: > > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/mux.c |4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/libavformat/mux.c b/libavformat/mux.c > > index 5cb0ca7..d674bd4 100644 > > --- a/libavformat/mux.c > > +++ b/libavformat/mux.c > > @@ -893,6 +893,10 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt) > > return 1; > > } > > > > +ret = do_packet_auto_bsf(s, pkt); > > +if (ret <= 0) > > +return ret; > > + > > #if FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX > > ret = compute_muxer_pkt_fields(s, s->streams[pkt->stream_index], pkt); > > > > > LGTM,Thanks applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you think the mosad wants you dead since a long time then you are either wrong or dead since a long time. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add bitrate and framerate option for openH264
Steven Liu gmail.com> writes: > This patch can modified the bitrate and frame at > the encoder runtime, for example: Simply compare iBitrate and s->bitrate for every frame and reconfigure if necessary: No new option needed. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add bitrate and framerate option for openH264
2016-07-14 18:22 GMT+08:00 Carl Eugen Hoyos: > Steven Liu gmail.com> writes: > > > +{ "bitrate", "Set bitrate", OFFSET(bitrate), > > AV_OPT_TYPE_INT, { 0 }, 0, 70, VE }, > > +{ "framerate", "Set framerate", OFFSET(framerate), > > AV_OPT_TYPE_INT, { 0 }, 0, 30, VE }, > > Both options already exist in FFmpeg, it may be a good idea > to map them to openh264 (do I understand correctly that the > current encoder doesn't allow to set a target bitrate?) but > there should be no need to add these strings to options[]. > > Carl Eugen > Hi Carl Euge, This patch can modified the bitrate and frame at the encoder runtime, for example: i set the init codec param bitrate 2000k , framerate 30fps, and push the encoded stream to rtmp server with flv mux, and then the network is very terrible,so dynamic set the encoder, set the new bitrate and framerate. The openh264 codec support this options. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add bitrate and framerate option for openH264
Steven Liu gmail.com> writes: > +{ "bitrate", "Set bitrate", OFFSET(bitrate), > AV_OPT_TYPE_INT, { 0 }, 0, 70, VE }, > +{ "framerate", "Set framerate", OFFSET(framerate), > AV_OPT_TYPE_INT, { 0 }, 0, 30, VE }, Both options already exist in FFmpeg, it may be a good idea to map them to openh264 (do I understand correctly that the current encoder doesn't allow to set a target bitrate?) but there should be no need to add these strings to options[]. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Add bitrate and framerate option for openH264
Signed-off-by: ErLiu <88486...@qq.com> --- libavcodec/libopenh264enc.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 24bc228..f7f11f9 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -42,6 +42,8 @@ typedef struct SVCContext { int skip_frames; int skipped; int cabac; +int bitrate; +int framerate; } SVCContext; #define OPENH264_VER_AT_LEAST(maj, min) \ @@ -61,6 +63,8 @@ static const AVOption options[] = { { "max_nal_size", "set maximum NAL size in bytes", OFFSET(max_nal_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, { "allow_skip_frames", "allow skipping frames to hit the target bitrate", OFFSET(skip_frames), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "cabac", "Enable cabac", OFFSET(cabac), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE }, +{ "bitrate", "Set bitrate", OFFSET(bitrate), AV_OPT_TYPE_INT, { 0 }, 0, 70, VE }, +{ "framerate", "Set framerate", OFFSET(framerate), AV_OPT_TYPE_INT, { 0 }, 0, 30, VE }, { NULL } }; @@ -244,6 +248,37 @@ fail: return err; } +static void check_is_reconfig_framerate(AVCodecContext *avctx) +{ +SVCContext *s = avctx->priv_data; + +float m_framerate = 0.0; +float n_framerate = (float)s->framerate; + +(*s->encoder)->GetOption(s->encoder, ENCODER_OPTION_FRAME_RATE, _framerate); + +if (n_framerate > 0.0 && m_framerate != n_framerate ) { +(*s->encoder)->SetOption(s->encoder, ENCODER_OPTION_FRAME_RATE, _framerate); +av_log(avctx, AV_LOG_ERROR, "framerate:%f>%f\n", m_framerate, n_framerate); +} + +} +static void check_is_reconfig_bitrate(AVCodecContext *avctx) +{ +SVCContext *s = avctx->priv_data; + +SBitrateInfo SB; + +SB.iLayer = 0; +(*s->encoder)->GetOption(s->encoder, ENCODER_OPTION_BITRATE, ); + +if (s->bitrate > 0 && SB.iBitrate != s->bitrate ) { +av_log(avctx, AV_LOG_ERROR, "bitrate:%d>%d\n", SB.iBitrate, s->bitrate); +SB.iBitrate = s->bitrate; + (*s->encoder)->SetOption(s->encoder, ENCODER_OPTION_BITRATE, ); + (*s->encoder)->SetOption(s->encoder, ENCODER_OPTION_MAX_BITRATE, ); +} +} static int svc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet) { @@ -263,6 +298,9 @@ static int svc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, sp.iPicWidth = avctx->width; sp.iPicHeight = avctx->height; +check_is_reconfig_framerate( avctx ); +check_is_reconfig_bitrate( avctx ); + encoded = (*s->encoder)->EncodeFrame(s->encoder, , ); if (encoded != cmResultSuccess) { av_log(avctx, AV_LOG_ERROR, "EncodeFrame failed\n"); -- 2.7.4 (Apple Git-66) 0001-Add-bitrate-and-framerate-option-for-openH264.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel