Re: [FFmpeg-devel] [PATCH] tests: drop bc dependency
On Tue, Jan 20, 2015 at 09:58:33PM +0100, Reimar Döffinger wrote: > On Mon, Jan 19, 2015 at 10:58:02PM +0100, Clément Bœsch wrote: > > -echo "scale=2; v = $1 - $2; if (v < 0) v = -v; if (v > $3) r = 1; r" | > > bc > > +awk "BEGIN { v=$1-$2; printf \"%d\\n\", ((v<0?v:-v) > $3) ? 1 : 0 }" > > I'd suggest single quotes for the outer ones, then you do not need to > escape \ and ". Done. I kind of forgot i could 'foo '$1' bar'... > Also it's broken, you inverted the absolute value condition. Oh derp... fixed, sorry. > Lastly, at least with gawk the last ?: is pointless, conditions evaluate > to 1/0 like in C. I originally tried it but probably did it wrong with the parenthesis. Seems it works fine indeed. New patch attached. Thanks. -- Clément B. From b558464bc43787a2aa50c17373905ce146682595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Mon, 19 Jan 2015 22:56:59 +0100 Subject: [PATCH] tests: drop bc dependency We already have a dependency on awk, bc is sometimes not found in the base system. --- tests/fate-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index f78e4fc..4a6d354 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -38,7 +38,7 @@ target_path(){ # $1=value1, $2=value2, $3=threshold # prints 0 if absolute difference between value1 and value2 is <= threshold compare(){ -echo "scale=2; v = $1 - $2; if (v < 0) v = -v; if (v > $3) r = 1; r" | bc +awk 'BEGIN { v='$1'-'$2'; printf "%d\n", ((v<0?-v:v) > '$3') }' } do_tiny_psnr(){ -- 2.3.0 pgpS7KH39Qvem.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] tests: drop bc dependency
On Sun, Feb 08, 2015 at 10:27:14AM +0100, Clément Bœsch wrote: > On Tue, Jan 20, 2015 at 09:58:33PM +0100, Reimar Döffinger wrote: > > On Mon, Jan 19, 2015 at 10:58:02PM +0100, Clément Bœsch wrote: > > > -echo "scale=2; v = $1 - $2; if (v < 0) v = -v; if (v > $3) r = 1; r" > > > | bc > > > +awk "BEGIN { v=$1-$2; printf \"%d\\n\", ((v<0?v:-v) > $3) ? 1 : 0 }" > > > > I'd suggest single quotes for the outer ones, then you do not need to > > escape \ and ". > > Done. I kind of forgot i could 'foo '$1' bar'... > > > Also it's broken, you inverted the absolute value condition. > > Oh derp... fixed, sorry. > > > Lastly, at least with gawk the last ?: is pointless, conditions evaluate > > to 1/0 like in C. > > I originally tried it but probably did it wrong with the parenthesis. > Seems it works fine indeed. New patch attached. Thanks. > > -- > Clément B. > From b558464bc43787a2aa50c17373905ce146682595 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= > Date: Mon, 19 Jan 2015 22:56:59 +0100 > Subject: [PATCH] tests: drop bc dependency > > We already have a dependency on awk, bc is sometimes not found in the > base system. > --- > tests/fate-run.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/fate-run.sh b/tests/fate-run.sh > index f78e4fc..4a6d354 100755 > --- a/tests/fate-run.sh > +++ b/tests/fate-run.sh > @@ -38,7 +38,7 @@ target_path(){ > # $1=value1, $2=value2, $3=threshold > # prints 0 if absolute difference between value1 and value2 is <= threshold > compare(){ > -echo "scale=2; v = $1 - $2; if (v < 0) v = -v; if (v > $3) r = 1; r" | bc > +awk 'BEGIN { v='$1'-'$2'; printf "%d\n", ((v<0?-v:v) > '$3') }' > } > > do_tiny_psnr(){ And now I realize that the \n is not actually even required, so new patch again. -- Clément B. From 9f912fbe7f8370b0f4b3c92c89f1532af7e85eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Mon, 19 Jan 2015 22:56:59 +0100 Subject: [PATCH] tests: drop bc dependency We already have a dependency on awk, bc is sometimes not found in the base system. --- tests/fate-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index f78e4fc..c7b2922 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -38,7 +38,7 @@ target_path(){ # $1=value1, $2=value2, $3=threshold # prints 0 if absolute difference between value1 and value2 is <= threshold compare(){ -echo "scale=2; v = $1 - $2; if (v < 0) v = -v; if (v > $3) r = 1; r" | bc +awk "BEGIN { v=$1-$2; printf ((v<0?-v:v) > $3) }" } do_tiny_psnr(){ -- 2.3.0 pgpGiuMJPL1Fi.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] hevc : support deinterlacing inside the decoder
Mickaël Raulet insa-rennes.fr> writes: > As we can consider, we won't have 4k interlaced > content, copying a field into a frame should be ok. > This is what has been done in this implementation. Do you have a sample? I am only interested in testing this. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]Enable pic on OSX for x86_64
Michael Niedermayer gmx.at> writes: > On Sat, Feb 07, 2015 at 08:27:49PM +, Carl Eugen Hoyos wrote: > > Ronald S. Bultje gmail.com> writes: > > > > > I'm not sure we should ever set -mdynamic-no-pic > > > on Mac x86-64? > skiping the -mdynamic-no-pic check and addition > on x86-64 looks fine A patch doing this was merged. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]Read CbYCr dpx files
Michael Niedermayer gmx.at> writes: > patch LGTM The patch was merged. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Adding Force Style option in Subtitles Filter
On Fri, Feb 06, 2015 at 10:47:09AM +0100, Stefano Sabatini wrote: > On date Thursday 2015-02-05 22:12:08 +0530, Eejya Singh encoded: > [...] > > From ed526a03c939055e2b9f931a0cb4e0e22b7b5b04 Mon Sep 17 00:00:00 2001 > > From: Eejya Singh > > Date: Wed, 28 Jan 2015 17:41:42 +0530 > > Subject: [PATCH] lavfi/subtitles: add force_style option > > > > Signed-off-by: Eejya Singh > > --- > > doc/filters.texi | 14 ++ > > libavfilter/version.h | 2 +- > > libavfilter/vf_subtitles.c | 23 +++ > > 3 files changed, 38 insertions(+), 1 deletion(-) > > > > diff --git a/doc/filters.texi b/doc/filters.texi > > index 261fd24..7f56f34 100644 > > --- a/doc/filters.texi > > +++ b/doc/filters.texi > > @@ -8470,6 +8470,10 @@ useful if not UTF-8. > > > > @item stream_index, si > > Set subtitles stream index. @code{subtitles} filter only. > > + > > +@item force_style > > > +Override default style or script info parameters of the subtitles.It > > follows ASS style format. > > Override default style or script info parameters of the subtitles. It > accepts a string containing ASS style format KEY=VALUE couples > separated by ",". > > > + > > drop this empty line > > > @end table > > > > [...] > > LGTM otherwise (but maybe ubitux wants to have a look), thanks. Applied your changes, tested, adjusted the documentation, and applied. Thanks. -- Clément B. pgpH4cGP21y31.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/hevc_sao: make sao_band_filter work on x86_32
Hi, 2015-02-07 23:06 GMT+01:00 James Almer : > Signed-off-by: James Almer > --- > libavcodec/x86/hevc_sao.asm | 40 > libavcodec/x86/hevcdsp_init.c | 24 > 2 files changed, 48 insertions(+), 16 deletions(-) Passes fate here for Win32/64, but that's probably not the platforms you interested in hearing feedback from. Looks OK to commit. A few questions though: > +%assign MMSIZE mmsize Why do that? Not a big deal: it's only for my education, if there's something I'm missing. > +pcmpeqw m4, %2, [rsp+MMSIZE*0] > +pcmpeqw m5, %2, [rsp+MMSIZE*1] > +pcmpeqw m6, %2, [rsp+MMSIZE*2] > +pcmpeqw %2, [rsp+MMSIZE*3] > +pand m4, [rsp+MMSIZE*4] > +pand m5, [rsp+MMSIZE*5] > +pand m6, [rsp+MMSIZE*6] [...] > -cglobal hevc_sao_band_filter_%1_8, 6, 6, 15, dst, src, dststride, srcstride, > offset, left > +cglobal hevc_sao_band_filter_%1_8, 6, 6, 15, 8*mmsize*ARCH_X86_32, dst, src, > dststride, srcstride, offset, left > HEVC_SAO_BAND_FILTER_INIT 8 Why do you need room for 8 regs, and not 7? Setting this to 7 and doing the required changes to remove MMSIZE pass here on Win32. > -SAO_BAND_INIT(10, sse2); > SAO_EDGE_INIT(10, sse2); > } > +SAO_BAND_INIT(10, sse2); On a side note, you haven't ported >8 bits edge filter to x86_32. I guess because it wouldn't play real time anyway? -- Christophe ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] x86/doc/Makefile: DBG=1 to preprocess external asm
Suggestions for more efficient make rules, clearer documentation and a better macro than the generic 'DBG' welcome. -- Christophe From 8e2adea82a4ec440744b701716a93e6ecaf211d6 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Sun, 8 Feb 2015 12:18:27 +0100 Subject: [PATCH] x86/doc/Makefile: DBG=1 to preprocess external asm The macro hell sometimes make it difficult to trace the source of an error, so it is easier to analyze the preprocessed output. This patch makes this automatical by specifying DBG=1 on the command line: a file ffmpeg/dir/file.asm gets preprocessed to builddir/dir/file.dbg.asm, which is then compiled. --- common.mak | 6 ++ doc/build_system.txt | 5 + doc/optimization.txt | 5 + library.mak | 6 +- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/common.mak b/common.mak index a493792..80cc8e2 100644 --- a/common.mak +++ b/common.mak @@ -5,6 +5,12 @@ # first so "all" becomes default target all: all-yes +ifndef DBG +YASMD= +else +YASMD=.dbg +endif + ifndef SUBDIR ifndef V diff --git a/doc/build_system.txt b/doc/build_system.txt index 2efde5c..dc77f93 100644 --- a/doc/build_system.txt +++ b/doc/build_system.txt @@ -7,6 +7,11 @@ V Disable the default terse mode, the full command issued by make and its output will be shown on the screen. +DBG +Preprocess external assembler files to a .dbg.asm file in the object +directory, which then gets compiled. Helps developping those assembler +files. + DESTDIR Destination directory for the install targets, useful to prepare packages or install FFmpeg in cross-environments. diff --git a/doc/optimization.txt b/doc/optimization.txt index 94a4277..743865a 100644 --- a/doc/optimization.txt +++ b/doc/optimization.txt @@ -191,6 +191,11 @@ __asm__() block. Use external asm (nasm/yasm) or inline asm (__asm__()), do not use intrinsics. The latter requires a good optimizing compiler which gcc is not. +When debugging an external asm compilation issue, if lost in the macro +expansions, add DBG=1 to your make command-line: the input file will be +preprocessed, stripped of the debug/empty lines, then compiled, showing the +actual lines causing issues. + Inline asm vs. external asm --- Both inline asm (__asm__("..") in a .c file, handled by a compiler such as gcc) diff --git a/library.mak b/library.mak index 72e5574..d94ba15 100644 --- a/library.mak +++ b/library.mak @@ -22,7 +22,11 @@ $(SUBDIR)%-test.i: $(SUBDIR)%-test.c $(SUBDIR)%-test.i: $(SUBDIR)%.c $(CC) $(CCFLAGS) $(CC_E) $< -$(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm +$(SUBDIR)x86/%.dbg.asm: $(SUBDIR)x86/%.asm + $(DEPYASM) $(YASMFLAGS) -I $( $(@:.o=.d) + $(YASM) $(YASMFLAGS) -I $( $@ + +$(SUBDIR)x86/%.o: $(SUBDIR)x86/%$(YASMD).asm $(DEPYASM) $(YASMFLAGS) -I $( $(@:.o=.d) $(YASM) $(YASMFLAGS) -I $(___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] x86inc: also warn on sse2 instruction
Hi, the attached patch is strictly identical to this x264 one: http://git.videolan.org/?p=x264/x264-sandbox.git;a=commit;h=a7a909fc7b82df85ff369adcbc048927ebec2289 except for the edited paths. The goal is to catch that last batch of issues in external asm: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=fc7e02f0ff345d5331b7c78f2400668d2c79a8b0;hp=4ccd7cb45b9aa46d94c29dbd1c065b652bda2319 It is currently in x264 'sandbox', ie not in a released version. -- Christophe From 1ade9345fbb392c0612ff0053523857abd5da563 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Tue, 3 Feb 2015 20:40:41 +0100 Subject: [PATCH] x86inc: also warn on sse2 instruction When using movq/movh/movd in e.g. SSE code, 974f2e78 may not warn about it. --- libavutil/x86/x86inc.asm | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index 33b22cd..b0ef2c6 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -1074,6 +1074,11 @@ INIT_XMM %if notcpuflag(%2) %error use of ``%1'' %2 instruction in cpuname function: current_function %endif +%ifidn %2, mmx +%if __sizeofreg > 8 && notcpuflag(sse2) +%error use of ``%1'' sse2 instruction in cpuname function: current_function +%endif +%endif %endif %endif @@ -1209,7 +1214,7 @@ AVX_INSTR minsd, sse2, 1, 0, 1 AVX_INSTR minss, sse, 1, 0, 1 AVX_INSTR movapd, sse2 AVX_INSTR movaps, sse -AVX_INSTR movd +AVX_INSTR movd, mmx AVX_INSTR movddup, sse3 AVX_INSTR movdqa, sse2 AVX_INSTR movdqu, sse2 @@ -1225,7 +1230,7 @@ AVX_INSTR movntdq, sse2 AVX_INSTR movntdqa, sse4 AVX_INSTR movntpd, sse2 AVX_INSTR movntps, sse -AVX_INSTR movq +AVX_INSTR movq, mmx AVX_INSTR movsd, sse2, 1, 0, 0 AVX_INSTR movshdup, sse3 AVX_INSTR movsldup, sse3 -- 1.9.2.msysgit.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] avcodec/ass: make default playback resolution available to decoders
--- libavcodec/ass.c | 5 +++-- libavcodec/ass.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/ass.c b/libavcodec/ass.c index ea247f8..468b8bb 100644 --- a/libavcodec/ass.c +++ b/libavcodec/ass.c @@ -36,8 +36,8 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, "[Script Info]\r\n" "; Script generated by FFmpeg/Lavc%s\r\n" "ScriptType: v4.00+\r\n" - "PlayResX: 384\r\n" - "PlayResY: 288\r\n" + "PlayResX: %d\r\n" + "PlayResY: %d\r\n" "\r\n" "[V4+ Styles]\r\n" @@ -67,6 +67,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, "[Events]\r\n" "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n", !(avctx->flags & CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "", + ASS_DEFAULT_PLAYRESX, ASS_DEFAULT_PLAYRESY, font, font_size, color, color, back_color, back_color, -bold, -italic, -underline, alignment); diff --git a/libavcodec/ass.h b/libavcodec/ass.h index 77218bf..f3046ef 100644 --- a/libavcodec/ass.h +++ b/libavcodec/ass.h @@ -25,6 +25,9 @@ #include "avcodec.h" #include "libavutil/bprint.h" +#define ASS_DEFAULT_PLAYRESX 384 +#define ASS_DEFAULT_PLAYRESY 288 + /** * @name Default values for ASS style * @{ -- 2.3.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] avcodec/srtdec: attempt to correct SubRip positioning
The positioning was completely wrong. First, the coordinates are expressed in ASS playback resolution (which is by default 384x288). Secondly, the coordinates define a drawing rectangle, not a moving area. The previous code was making subtitles move from a random position to another random position. Here we rescale assuming the video resolution is a DVD one (720x480). We can't really do anything better so far, but since these positioning are often from a DVD rip we can't consider them relatively safe. --- libavcodec/srtdec.c| 20 tests/ref/fate/sub-srt | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c index 6d0c9bb..1f3e896 100644 --- a/libavcodec/srtdec.c +++ b/libavcodec/srtdec.c @@ -66,10 +66,22 @@ static void srt_to_ass(AVCodecContext *avctx, AVBPrint *dst, strcpy(stack[0].param[PARAM_FACE], "{\\fn}"); if (x1 >= 0 && y1 >= 0) { -if (x2 >= 0 && y2 >= 0 && (x2 != x1 || y2 != y1)) -av_bprintf(dst, "{\\an1}{\\move(%d,%d,%d,%d)}", x1, y1, x2, y2); -else -av_bprintf(dst, "{\\an1}{\\pos(%d,%d)}", x1, y1); +/* XXX: here we rescale coordinate assuming they are in DVD resolution + * (720x480) since we don't have anything better */ + +if (x2 >= 0 && y2 >= 0 && (x2 != x1 || y2 != y1) && x2 >= x1 && y2 >= y1) { +/* text rectangle defined, write the text at the center of the rectangle */ +const int cx = x1 + (x2 - x1)/2; +const int cy = y1 + (y2 - y1)/2; +const int scaled_x = cx * ASS_DEFAULT_PLAYRESX / 720; +const int scaled_y = cy * ASS_DEFAULT_PLAYRESY / 480; +av_bprintf(dst, "{\\an5}{\\pos(%d,%d)}", scaled_x, scaled_y); +} else { +/* only the top left corner, assume the text starts in that corner */ +const int scaled_x = x1 * ASS_DEFAULT_PLAYRESX / 720; +const int scaled_y = y1 * ASS_DEFAULT_PLAYRESY / 480; +av_bprintf(dst, "{\\an1}{\\pos(%d,%d)}", scaled_x, scaled_y); +} } for (; !end && *in; in++) { diff --git a/tests/ref/fate/sub-srt b/tests/ref/fate/sub-srt index 4439857..40b20cd 100644 --- a/tests/ref/fate/sub-srt +++ b/tests/ref/fate/sub-srt @@ -19,7 +19,7 @@ Dialogue: 0,0:00:11.50,0:00:14.50,Default,,0,0,0,,{\b1}This line should be bold{ Dialogue: 0,0:00:14.50,0:00:17.50,Default,,0,0,0,,>\NIt would be a good thing to\Nhide invalid html tags that are closed and show the text in them\Nbut show un-closed invalid html tags\NShow not opened tags\N< Dialogue: 0,0:00:17.50,0:00:20.50,Default,,0,0,0,,and also\Nhide invalid html tags with parameters that are closed and show the text in them\Nbut show un-closed invalid html tags\N{\u1}This text should be showed underlined without problems also: 2<3,5>1,4<6{\u0}\NThis shouldn't be underlined Dialogue: 0,0:00:20.50,0:00:21.50,Default,,0,0,0,,This text should be in the normal position... -Dialogue: 0,0:00:21.50,0:00:22.50,Default,,0,0,0,,{\an1}{\move(0,50,0,100)}This text should NOT be in the normal position +Dialogue: 0,0:00:21.50,0:00:22.50,Default,,0,0,0,,{\an5}{\pos(0,45)}This text should NOT be in the normal position Dialogue: 0,0:00:22.50,0:00:24.50,Default,,0,0,0,,Implementation is the same of the ASS tag\N{\an8}This text should be at the\Ntop and horizontally centered Dialogue: 0,0:00:22.50,0:00:24.50,Default,,0,0,0,,{\an5}This text should be at the\Nmiddle and horizontally centered Dialogue: 0,0:00:22.50,0:00:24.50,Default,,0,0,0,,{\an2}This text should be at the\Nbottom and horizontally centered -- 2.3.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/srtdec: attempt to correct SubRip positioning
On Sun, Feb 08, 2015 at 12:40:19PM +0100, Clément Bœsch wrote: > The positioning was completely wrong. First, the coordinates are > expressed in ASS playback resolution (which is by default 384x288). > Secondly, the coordinates define a drawing rectangle, not a moving area. > The previous code was making subtitles move from a random position to > another random position. > > Here we rescale assuming the video resolution is a DVD one (720x480). We > can't really do anything better so far, but since these positioning are > often from a DVD rip we can't consider them relatively safe. can* [...] -- Clément B. pgpoqNLsNVKMW.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCHv4] flac: ignore duplicated ID3 tags if vorbis tags exist
On Sun, 8 Feb 2015 04:37:31 + (UTC) Ben Boeckel wrote: > On Sun, 08 Feb, 2015 at 02:05:45 GMT, Michael Niedermayer wrote: > > i tried clementine > > it happily adds and edits id3 tags on ogg files, one has to rename > > the file to .mp3 though. > > So no problem as noone would be doing that if it wherent for a > > small detail > > clementine does not play ogg files or at least not the one i just > > created that is unless one renames it to mp3, in which case it plays > > fine > > why do i somehow sense that iam not the first one finding this > > solution to play "unsupported" files > > *facepalm* > > What does ffmpeg do with such a file? Care to share it? IIRC, Clementine > is phonon stuff which could be any of a number of backends. > > That said, if that is what is required, I think just returning an error > on ogg+id3 is valid... But then again, there are a *lot* of tagging > applications for Windows I don't feel like chasing down and testing > (nevermind *trusting*). Uh, we concluded that just about everything can have id3v2 tags. Even mp4. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/doc/Makefile: DBG=1 to preprocess external asm
Christophe Gisquet gmail.com> writes: > Suggestions for more efficient make rules, clearer documentation > and a better macro than the generic 'DBG' welcome. Doesn't this also need an update for "make clean"? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86inc: also warn on sse2 instruction
Hi, On Sun, Feb 8, 2015 at 6:30 AM, Christophe Gisquet < christophe.gisq...@gmail.com> wrote: > Hi, > > the attached patch is strictly identical to this x264 one: > > http://git.videolan.org/?p=x264/x264-sandbox.git;a=commit;h=a7a909fc7b82df85ff369adcbc048927ebec2289 > except for the edited paths. > > The goal is to catch that last batch of issues in external asm: > > http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=fc7e02f0ff345d5331b7c78f2400668d2c79a8b0;hp=4ccd7cb45b9aa46d94c29dbd1c065b652bda2319 > > It is currently in x264 'sandbox', ie not in a released version. > Cool! Do you know if it catches all assembly types now (e.g. does it catch mmxext in mmx functions)? Or is it >=sse only? Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/vp9dsp: fix clobbering of xmm6 on IDCT sse2 functions
Hi, On Sat, Feb 7, 2015 at 9:10 PM, James Almer wrote: > On 07/02/15 11:08 PM, James Almer wrote: > > On 07/02/15 11:05 PM, Ronald S. Bultje wrote: > >> Hi, > >> > >> On Sat, Feb 7, 2015 at 8:33 PM, James Almer wrote: > >> > >>> Signed-off-by: James Almer > >>> --- > >>> libavcodec/x86/vp9itxfm.asm | 3 +++ > >>> 1 file changed, 3 insertions(+) > >>> > >>> diff --git a/libavcodec/x86/vp9itxfm.asm b/libavcodec/x86/vp9itxfm.asm > >>> index 64859a0..bfe427f 100644 > >>> --- a/libavcodec/x86/vp9itxfm.asm > >>> +++ b/libavcodec/x86/vp9itxfm.asm > >>> @@ -407,6 +407,9 @@ IDCT_4x4_FN ssse3 > >>> %macro IADST4_FN 5 > >>> INIT_MMX %5 > >>> cglobal vp9_%1_%3_4x4_add, 3, 3, 6 + notcpuflag(ssse3), dst, stride, > >>> block, eob > >>> +%if WIN64 && notcpuflag(ssse3) > >>> +WIN64_SPILL_XMM 7 > >>> +%endif > >>> movdqaxmm5, [pd_8192] > >>> movam0, [blockq+ 0] > >>> movam1, [blockq+ 8] > >> > >> > >> Ehw... Well... Crap... OK I guess. (Can't think of anything better.) > >> > >> Ronald > > > > We could use INIT_XMM and invert every register alias (xmm -> m; m -> > mm). > > I just didn't go with that (admittedly cleaner and less hacky) solution > because it > > was a bigger patch. > > Actually, scratch that. The VP9_*_1D functions are used all over the place. > Probably too messy to change. > Right, I did consider that for a brief moment and then immediately dropped it :). I think the patch is fine, real-world code has usually has small tidbits of unprettiness in it, so I guess the code is slowly elevating to real-world status. Hurray?... Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86inc: also warn on sse2 instruction
Hi, 2015-02-08 14:28 GMT+01:00 Ronald S. Bultje : > Cool! Do you know if it catches all assembly types now (e.g. does it catch > mmxext in mmx functions)? Or is it >=sse only? Good thing that you asked, because I attached an earlier version... So I think what you ask was checked by the first "warn" commit, because of differing insn set (haven't checked though). This one is specifically for "might be insn set a or b, but reg size makes it clearer". -- Christophe From cc1f681defcde77bf1a371633c0eba155b93f235 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Tue, 3 Feb 2015 20:40:41 +0100 Subject: [PATCH] x86inc: Correctly warn on use of SSE2 instructions in SSE functions SSE2 instructions that are XMM-implementations of pre-existing MMX/MMX2 instructions did not issue warnings when used in SSE functions. Handle it by also checking the register type when such instructions are used. --- libavutil/x86/x86inc.asm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index 33b22cd..f1b4b85 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -1073,6 +1073,8 @@ INIT_XMM %ifdef cpuname %if notcpuflag(%2) %error use of ``%1'' %2 instruction in cpuname function: current_function +%elif cpuflags_%2 < cpuflags_sse && notcpuflag(sse2) && __sizeofreg > 8 +%error use of ``%1'' sse2 instruction in cpuname function: current_function %endif %endif %endif @@ -1209,7 +1211,7 @@ AVX_INSTR minsd, sse2, 1, 0, 1 AVX_INSTR minss, sse, 1, 0, 1 AVX_INSTR movapd, sse2 AVX_INSTR movaps, sse -AVX_INSTR movd +AVX_INSTR movd, mmx AVX_INSTR movddup, sse3 AVX_INSTR movdqa, sse2 AVX_INSTR movdqu, sse2 @@ -1225,7 +1227,7 @@ AVX_INSTR movntdq, sse2 AVX_INSTR movntdqa, sse4 AVX_INSTR movntpd, sse2 AVX_INSTR movntps, sse -AVX_INSTR movq +AVX_INSTR movq, mmx AVX_INSTR movsd, sse2, 1, 0, 0 AVX_INSTR movshdup, sse3 AVX_INSTR movsldup, sse3 -- 1.9.2.msysgit.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/doc/Makefile: DBG=1 to preprocess external asm
Hi, 2015-02-08 14:07 GMT+01:00 Carl Eugen Hoyos : > Doesn't this also need an update for "make clean"? Right, here's an updated one, also improving dependency generation and allowing more genering (for now) code. -- Christophe From 6795382920c90fdf7e9cef5031627534c9df15b3 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Sun, 8 Feb 2015 12:18:27 +0100 Subject: [PATCH] x86/doc/Makefile: DBG=1 to preprocess external asm The macro hell sometimes make it difficult to trace the source of an error, so it is easier to analyze the preprocessed output. This patch makes this automatical by specifying DBG=1 on the command line: a file ffmpeg/dir/file.asm gets preprocessed to builddir/dir/file.dbg.asm, which is then compiled. --- common.mak | 10 +- doc/build_system.txt | 5 + doc/optimization.txt | 5 + library.mak | 6 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/common.mak b/common.mak index a493792..a6fabb3 100644 --- a/common.mak +++ b/common.mak @@ -5,6 +5,14 @@ # first so "all" becomes default target all: all-yes +DEFAULT_YASMD=.dbg + +ifndef DBG +YASMD= +else +YASMD=$(DEFAULT_YASMD) +endif + ifndef SUBDIR ifndef V @@ -138,7 +146,7 @@ $(TOOLOBJS): | tools OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(SLIBOBJS) $(TESTOBJS)) -CLEANSUFFIXES = *.d *.o *~ *.h.c *.map *.ver *.ho *.gcno *.gcda +CLEANSUFFIXES = *.d *.o *~ *.h.c *.map *.ver *.ho *.gcno *.gcda *$(DEFAULT_YASMD).asm DISTCLEANSUFFIXES = *.pc LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a diff --git a/doc/build_system.txt b/doc/build_system.txt index 2efde5c..20242b1 100644 --- a/doc/build_system.txt +++ b/doc/build_system.txt @@ -7,6 +7,11 @@ V Disable the default terse mode, the full command issued by make and its output will be shown on the screen. +DBG +Preprocess x86 external assembler files to a .dbg.asm file in the object +directory, which then gets compiled. Helps developping those assembler +files. + DESTDIR Destination directory for the install targets, useful to prepare packages or install FFmpeg in cross-environments. diff --git a/doc/optimization.txt b/doc/optimization.txt index 94a4277..1a0b98c 100644 --- a/doc/optimization.txt +++ b/doc/optimization.txt @@ -191,6 +191,11 @@ __asm__() block. Use external asm (nasm/yasm) or inline asm (__asm__()), do not use intrinsics. The latter requires a good optimizing compiler which gcc is not. +When debugging a x86 external asm compilation issue, if lost in the macro +expansions, add DBG=1 to your make command-line: the input file will be +preprocessed, stripped of the debug/empty lines, then compiled, showing the +actual lines causing issues. + Inline asm vs. external asm --- Both inline asm (__asm__("..") in a .c file, handled by a compiler such as gcc) diff --git a/library.mak b/library.mak index 72e5574..e23abd2 100644 --- a/library.mak +++ b/library.mak @@ -22,7 +22,11 @@ $(SUBDIR)%-test.i: $(SUBDIR)%-test.c $(SUBDIR)%-test.i: $(SUBDIR)%.c $(CC) $(CCFLAGS) $(CC_E) $< -$(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm +$(SUBDIR)x86/%$(DEFAULT_YASMD).asm: $(SUBDIR)x86/%.asm + $(DEPYASM) $(YASMFLAGS) -I $( $(@:.asm=.d) + $(YASM) $(YASMFLAGS) -I $( $@ + +$(SUBDIR)x86/%.o: $(SUBDIR)x86/%$(YASMD).asm $(DEPYASM) $(YASMFLAGS) -I $( $(@:.o=.d) $(YASM) $(YASMFLAGS) -I $(___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCHv4] flac: ignore duplicated ID3 tags if vorbis tags exist
On Sun, Feb 08, 2015 at 04:37:31AM +, Ben Boeckel wrote: > On Sun, 08 Feb, 2015 at 02:05:45 GMT, Michael Niedermayer wrote: > > i tried clementine > > it happily adds and edits id3 tags on ogg files, one has to rename > > the file to .mp3 though. > > So no problem as noone would be doing that if it wherent for a > > small detail > > clementine does not play ogg files or at least not the one i just > > created that is unless one renames it to mp3, in which case it plays > > fine > > why do i somehow sense that iam not the first one finding this > > solution to play "unsupported" files > > *facepalm* > > What does ffmpeg do with such a file? it plays it fine and seems to display all teh metadata > Care to share it? http://samples.ffmpeg.org/ogg/flac-in-ogg/yukina_lands_of_neverending_demo.ogg.mp3 > IIRC, Clementine > is phonon stuff which could be any of a number of backends. > > That said, if that is what is required, I think just returning an error > on ogg+id3 is valid... But then again, there are a *lot* of tagging > applications for Windows I don't feel like chasing down and testing > (nevermind *trusting*). > > --Ben > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: Check linking against CoreGraphics or, ApplicationServices framework for avfoundation input device.
Hi! On Wednesday 04 February 2015 01:48:53 pm Thilo Borgmann wrote: > > fixes Ticket #4238. > > Testing for CGImageGetTypeID function is questionable (see trac > discussion). If someone has a better idea, please let me know. Alternative patch attached. Also attached is a patch that I believe is necessary for iOS audio capture, but it is mostly untested. (It allows device listing though.) Please comment, Carl Eugen diff --git a/configure b/configure index f31d372..d948757 100755 --- a/configure +++ b/configure @@ -2483,7 +2483,7 @@ xwma_demuxer_select="riffdec" # indevs / outdevs alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp" alsa_outdev_deps="alsa_asoundlib_h" -avfoundation_indev_extralibs="-framework CoreVideo -framework Foundation -framework AVFoundation -framework CoreMedia -framework CoreGraphics" +avfoundation_indev_extralibs="-framework CoreVideo -framework Foundation -framework AVFoundation -framework CoreMedia" avfoundation_indev_select="avfoundation" bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h" caca_outdev_deps="libcaca" @@ -4868,7 +4868,11 @@ for func in $MATH_FUNCS; do done # these are off by default, so fail if requested and not available -enabled avfoundation_indev && { check_header_oc AVFoundation/AVFoundation.h || disable avfoundation_indev; } +enabled avfoundation_indev && { check_header_oc AVFoundation/AVFoundation.h && +{ check_lib2 CoreGraphics/CoreGraphics.h CGGetActiveDisplayList -framework ApplicationServices || + check_lib2 CoreGraphics/CoreGraphics.h CGGetActiveDisplayList -framework CoreGraphics || + true; } || +disable avfoundation_indev; } enabled avisynth && { { check_lib2 "windows.h" LoadLibrary; } || { check_lib2 "dlfcn.h" dlopen -ldl; } || die "ERROR: LoadLibrary/dlopen not found for avisynth"; } diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m index 1a7eb5b..e1d1050 100644 --- a/libavdevice/avfoundation.m +++ b/libavdevice/avfoundation.m @@ -500,8 +500,14 @@ static int get_audio_config(AVFormatContext *s) if (basic_desc->mFormatID == kAudioFormatLinearPCM && ctx->audio_float && +ctx->audio_bits_per_sample == 32 && ctx->audio_packed) { stream->codec->codec_id = ctx->audio_be ? AV_CODEC_ID_PCM_F32BE : AV_CODEC_ID_PCM_F32LE; +} else if (basic_desc->mFormatID == kAudioFormatLinearPCM && +ctx->audio_signed_integer && +ctx->audio_bits_per_sample == 16 && +ctx->audio_packed) { +stream->codec->codec_id = ctx->audio_be ? AV_CODEC_ID_PCM_S16BE : AV_CODEC_ID_PCM_S16LE; } else { av_log(s, AV_LOG_ERROR, "audio format is not supported\n"); return 1; ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: Check linking against CoreGraphics or, ApplicationServices framework for avfoundation input device.
On Sun, Feb 08, 2015 at 03:19:40PM +0100, Carl Eugen Hoyos wrote: > Hi! > > On Wednesday 04 February 2015 01:48:53 pm Thilo Borgmann wrote: > > > > fixes Ticket #4238. > > > > Testing for CGImageGetTypeID function is questionable (see trac > > discussion). If someone has a better idea, please let me know. > > Alternative patch attached. > > Also attached is a patch that I believe is necessary for > iOS audio capture, but it is mostly untested. > (It allows device listing though.) > > Please comment, Carl Eugen i can confirm that this doesnt break build anymore [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have often repented speaking, but never of holding my tongue. -- Xenocrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Enable stream copy of data
On 01/16/2015 07:21 AM, Michael Niedermayer wrote: On Wed, Jan 14, 2015 at 03:11:24PM +0530, Anshul wrote: Hi I have enabled demuxing and muxing path for datat stream Please find attachment Thanks Anshul ffmpeg.c|2 ++ ffmpeg_opt.c| 10 ++ libavcodec/avcodec.h|1 + libavcodec/codec_desc.c |6 ++ libavformat/Makefile|1 + libavformat/avformat.h | 17 + libavformat/format.c|2 ++ libavformat/mpegts.c| 43 +-- libavformat/utils.c |1 + 9 files changed, 77 insertions(+), 6 deletions(-) 40306177e8bb3e95b98060f6202b38bb8acba26a 0001-Enable-data-stream-copy.patch From 99bcdef2bcd9aa5bd18a0a005e0826e22ad2cf63 Mon Sep 17 00:00:00 2001 From: Anshul Maheshwari Date: Wed, 14 Jan 2015 15:06:50 +0530 Subject: [PATCH] Enable data stream copy Signed-off-by: Anshul Maheshwari --- ffmpeg.c| 2 ++ ffmpeg_opt.c| 10 ++ libavcodec/avcodec.h| 1 + libavcodec/codec_desc.c | 6 ++ libavformat/Makefile| 1 + libavformat/avformat.h | 17 + libavformat/format.c| 2 ++ libavformat/mpegts.c| 43 +-- libavformat/utils.c | 1 + 9 files changed, 77 insertions(+), 6 deletions(-) applied the generic data stream handling improvments to libavformat and ffmpeg please update APIChanges patch attached. also [...] @@ -1927,6 +1932,11 @@ static int open_output_file(OptionsContext *o, const char *filename) } } /* do something with data? */ +if (!o->data_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_DATA) != AV_CODEC_ID_NONE) { +for (i = 0; i < nb_input_streams; i++) +if (input_streams[i]->st->codec->codec_type == AVMEDIA_TYPE_DATA) +new_data_stream(o, oc, i); +} this probably needs something "more" to work, like we wouldnt want to matchup a data stream with GPS data to a scte_35 stream iam not sure how to best do this though for stream copy the codec_id could be used though i guess working on it. -Anshul >From d9bcc7761fe4f7d98be1b518bed95c177e7504cf Mon Sep 17 00:00:00 2001 From: Anshul Maheshwari Date: Sun, 8 Feb 2015 22:37:07 +0530 Subject: [PATCH] updated Data stream changes in APIChange Signed-off-by: Anshul Maheshwari --- doc/APIchanges | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 65fd599..e46124a 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -19,6 +19,9 @@ API changes, most recent first: Add AV_PKT_DATA_AUDIO_SERVICE_TYPE and AV_FRAME_DATA_AUDIO_SERVICE_TYPE for storing the audio service type as side data. +2015-01-16 - a47c933 - lavf 56.19.100 - avformat.h + Add data_codec and data_codec_id for storing codec of data stream + 2015-01-11 - 007c33d - lavd 56.4.100 - avdevice.h Add avdevice_list_input_sources(). Add avdevice_list_output_sinks(). -- 2.1.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Enable stream copy of data
> It has timestamp inside the data stream, and for making a simple use case > scte need -copyts and -vsync 0 param. Otherwise user can ignore the data as > they always did. > -Anshul Is FFmpeg aware of this PTS and how to place the data packet with respect to PES packets? How are you testing this patch? As far as I can tell it just works by chance. Kieran ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Enable stream copy of data
On Sun, Feb 08, 2015 at 10:42:43PM +0530, Anshul wrote: > > On 01/16/2015 07:21 AM, Michael Niedermayer wrote: > >On Wed, Jan 14, 2015 at 03:11:24PM +0530, Anshul wrote: > >>Hi > >> > >>I have enabled demuxing and muxing path for datat stream > >> > >>Please find attachment > >> > >>Thanks > >>Anshul > >> ffmpeg.c|2 ++ > >> ffmpeg_opt.c| 10 ++ > >> libavcodec/avcodec.h|1 + > >> libavcodec/codec_desc.c |6 ++ > >> libavformat/Makefile|1 + > >> libavformat/avformat.h | 17 + > >> libavformat/format.c|2 ++ > >> libavformat/mpegts.c| 43 +-- > >> libavformat/utils.c |1 + > >> 9 files changed, 77 insertions(+), 6 deletions(-) > >>40306177e8bb3e95b98060f6202b38bb8acba26a 0001-Enable-data-stream-copy.patch > >> From 99bcdef2bcd9aa5bd18a0a005e0826e22ad2cf63 Mon Sep 17 00:00:00 2001 > >>From: Anshul Maheshwari > >>Date: Wed, 14 Jan 2015 15:06:50 +0530 > >>Subject: [PATCH] Enable data stream copy > >> > >>Signed-off-by: Anshul Maheshwari > >>--- > >> ffmpeg.c| 2 ++ > >> ffmpeg_opt.c| 10 ++ > >> libavcodec/avcodec.h| 1 + > >> libavcodec/codec_desc.c | 6 ++ > >> libavformat/Makefile| 1 + > >> libavformat/avformat.h | 17 + > >> libavformat/format.c| 2 ++ > >> libavformat/mpegts.c| 43 +-- > >> libavformat/utils.c | 1 + > >> 9 files changed, 77 insertions(+), 6 deletions(-) > >applied the generic data stream handling improvments to libavformat > >and ffmpeg > > > >please update APIChanges > > > patch attached. > >also > >[...] > >>@@ -1927,6 +1932,11 @@ static int open_output_file(OptionsContext *o, const > >>char *filename) > >> } > >> } > >> /* do something with data? */ > >>+if (!o->data_disable && av_guess_codec(oc->oformat, NULL, > >>filename, NULL, AVMEDIA_TYPE_DATA) != AV_CODEC_ID_NONE) { > >>+for (i = 0; i < nb_input_streams; i++) > >>+if (input_streams[i]->st->codec->codec_type == > >>AVMEDIA_TYPE_DATA) > >>+new_data_stream(o, oc, i); > >>+} > >this probably needs something "more" to work, like we wouldnt > >want to matchup a data stream with GPS data to a scte_35 stream > >iam not sure how to best do this though > >for stream copy the codec_id could be used though i guess > > > working on it. > > -Anshul > APIchanges |3 +++ > 1 file changed, 3 insertions(+) > 27aa0306a051d9daf6ac174dbca6ea4a53db2620 > 0001-updated-Data-stream-changes-in-APIChange.patch > From d9bcc7761fe4f7d98be1b518bed95c177e7504cf Mon Sep 17 00:00:00 2001 > From: Anshul Maheshwari > Date: Sun, 8 Feb 2015 22:37:07 +0530 > Subject: [PATCH] updated Data stream changes in APIChange applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/hevc_sao: make sao_band_filter work on x86_32
On 08/02/15 8:21 AM, Christophe Gisquet wrote: > Hi, > > 2015-02-07 23:06 GMT+01:00 James Almer : >> Signed-off-by: James Almer >> --- >> libavcodec/x86/hevc_sao.asm | 40 >> libavcodec/x86/hevcdsp_init.c | 24 >> 2 files changed, 48 insertions(+), 16 deletions(-) > > Passes fate here for Win32/64, but that's probably not the platforms > you interested in hearing feedback from. > Looks OK to commit. > > A few questions though: > >> +%assign MMSIZE mmsize > > Why do that? Not a big deal: it's only for my education, if there's > something I'm missing. For width 48, the COMPUTE macro is last run after an INIT_XMM cpuname, so mmsize becomes 16 and in the avx2 version the instructions would access the wrong data in stack. Doing %assign MMSIZE mmsize at the beginning of the function and using it here makes sure it's always 32 in avx2. sse2 is unaffected by this, of course. And the reason I'm using INIT_XMM in the middle of the function for the avx2 width 48 case is because i couldn't find a nice and clean way to use the xm* reg aliases with the COMPUTE macros. > >> +pcmpeqw m4, %2, [rsp+MMSIZE*0] >> +pcmpeqw m5, %2, [rsp+MMSIZE*1] >> +pcmpeqw m6, %2, [rsp+MMSIZE*2] >> +pcmpeqw %2, [rsp+MMSIZE*3] >> +pand m4, [rsp+MMSIZE*4] >> +pand m5, [rsp+MMSIZE*5] >> +pand m6, [rsp+MMSIZE*6] > [...] >> -cglobal hevc_sao_band_filter_%1_8, 6, 6, 15, dst, src, dststride, >> srcstride, offset, left >> +cglobal hevc_sao_band_filter_%1_8, 6, 6, 15, 8*mmsize*ARCH_X86_32, dst, >> src, dststride, srcstride, offset, left >> HEVC_SAO_BAND_FILTER_INIT 8 > > Why do you need room for 8 regs, and not 7? Remnant from before i realized i could keep m7 untouched. I'll change it. > > Setting this to 7 and doing the required changes to remove MMSIZE pass > here on Win32. Again, MMSIZE is for avx2 and you're probably running the sse2 version, where it's always the same as mmsize. > >> -SAO_BAND_INIT(10, sse2); >> SAO_EDGE_INIT(10, sse2); >> } >> +SAO_BAND_INIT(10, sse2); > > On a side note, you haven't ported >8 bits edge filter to x86_32. I > guess because it wouldn't play real time anyway? I was going to give edge >8bit a try next. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] hevc : support deinterlacing inside the decoder
2015-02-08 10:48 GMT+01:00 Carl Eugen Hoyos : > Mickaël Raulet insa-rennes.fr> writes: > > > As we can consider, we won't have 4k interlaced > > content, copying a field into a frame should be ok. > > This is what has been done in this implementation. > > Do you have a sample? > I am only interested in testing this. > > Thank you, Carl Eugen > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > If I understand correctly, this should fix this ticket #4141. Sample is included. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/hevc_sao: make sao_band_filter work on x86_32
Hi, 2015-02-08 18:48 GMT+01:00 James Almer : >>> +%assign MMSIZE mmsize >> >> Why do that? Not a big deal: it's only for my education, if there's >> something I'm missing. > > For width 48, the COMPUTE macro is last run after an INIT_XMM cpuname, so > mmsize becomes > 16 and in the avx2 version the instructions would access the wrong data in > stack. > Doing %assign MMSIZE mmsize at the beginning of the function and using it > here makes sure > it's always 32 in avx2. > sse2 is unaffected by this, of course. > > And the reason I'm using INIT_XMM in the middle of the function for the avx2 > width 48 case > is because i couldn't find a nice and clean way to use the xm* reg aliases > with the COMPUTE > macros. OK. Strange that it still compiled fine on Win32 here, but I haven't looked at the code generated, and I can't run the avx2 version. >>> +cglobal hevc_sao_band_filter_%1_8, 6, 6, 15, 8*mmsize*ARCH_X86_32, dst, >>> src, dststride, srcstride, offset, left >>> HEVC_SAO_BAND_FILTER_INIT 8 >> >> Why do you need room for 8 regs, and not 7? > > Remnant from before i realized i could keep m7 untouched. I'll change it. If that's the only change, then, unless someone complains, just push that version. Thanks, -- Christophe ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] hevc : support deinterlacing inside the decoder
Kacper Michajłow gmail.com> writes: > 2015-02-08 10:48 GMT+01:00 Carl Eugen Hoyos: > > > Mickaël Raulet insa-rennes.fr> writes: > > > > > As we can consider, we won't have 4k interlaced > > > content, copying a field into a frame should be ok. > > > This is what has been done in this implementation. > > > > Do you have a sample? > > I am only interested in testing this. > If I understand correctly, this should fix this ticket > #4141. Sample is included. The patch - unfortunately! - makes no difference for this sample. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]Fix msvc compilation with --disable-indev=vfwcap
Hi! Attached patch intends to fix compilation with msvc when the vfwcap input device is disabled. Tested by Bernhard Döbler Please comment, Carl Eugen diff --git a/configure b/configure index f31d372..0c6f7ea 100755 --- a/configure +++ b/configure @@ -5371,7 +5371,7 @@ if test $target_os = "haiku"; then fi enabled_all dxva2 dxva2api_cobj CoTaskMemFree && -prepend ffmpeg_libs $($ldflags_filter "-lole32") && +prepend ffmpeg_libs $($ldflags_filter "-lole32" "-luser32") && enable dxva2_lib ! enabled_any memalign posix_memalign aligned_malloc && ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 0/7] using ffmpeg as an RTSP client
Hi, I am using ffmpeg 2.5.3 as an RTSP client and found a few missing pieces, which the following series of patches should address. I used some test files streamed with an RTSP server on the xenomai.org server, the files are available for download by replacing rtsp://xenomai.org:8554 with https://xenomai.org in the URL - support for depacketization of AC3 RTP frames is missing, patch 1 adds it, following https://tools.ietf.org/html/draft-ietf-avt-rtp-ac3-07 it can be tested with: rtsp://xenomai.org:8554/video-tests/big_buck_bunny/BigBuckBunny_DivX_HD720p_ASP.divx (using audio track 2, as audio track 1 uses mp3adu) - support for receiving sub-titles via RTP is missing. live555 uses the T140 RTP packetization for that (RFC 4103), and vlc decodes subrip subtitles sent that way. Patch 2 and 3 implement a compatible solution, meaning that the AV_CODEC_ID_SUBRIP is used for T140 tracks, of course another codec id could be used. These patches can be tested with: rtsp://xenomai.org:8554/video-tests/sintel/sintel-1280-surround.mp4 - support for receiving MP3ADU audio via RTP, following RFC 3119 is missing. Patch 4 modifies the MPEG audio parser to decode MP3ADU headers in MP3ADU frames only when the PARSER_FLAG_COMPLETE_FRAMES is set, because for some reason the parser creates incorrect frames when trying to parse MP3ADU frames fully with the test file I used. Patch 5 implements the depacketizer. These patches can be tested with: rtsp://xenomai.org:8554/video-tests/big_buck_bunny/BigBuckBunny_DivX_HD720p_ASP.divx (this time using audio track 1) - support for reassembly of fragmented AAC frames via RTP is missing. Patch 6 modifies libavformat/rtpdec_mpeg4.c to add that support. This patch can be tested with: rtsp://xenomai.org:8554/video-tests/sintel/sintel-1280-surround.mp4 Without this patch, fragmented AAC frames are silently dropped, which causes underruns in the audio driver when playing the test file. - support for parsing the lang attribute in RTSP tracks is missing. Patch 7 adds it. This patch can be tested with: rtsp://xenomai.org:8554/video-tests/sintel/sintel-1280-surround.mp4 Launching ffprobe with this URL should display the languages of the audio track and subtitle tracks. Thanks in advance for your review. Regards. -- Gilles. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/7] avformat/rtsp: allow receiving subtitles via RTP
--- libavformat/rtsp.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index ae62252..77407dd 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -68,10 +68,11 @@ { "filter_src", "only receive packets from the negotiated peer IP", 0, AV_OPT_TYPE_CONST, {.i64 = RTSP_FLAG_FILTER_SRC}, 0, 0, DEC, "rtsp_flags" } #define RTSP_MEDIATYPE_OPTS(name, longname) \ -{ name, longname, OFFSET(media_type_mask), AV_OPT_TYPE_FLAGS, { .i64 = (1 << (AVMEDIA_TYPE_DATA+1)) - 1 }, INT_MIN, INT_MAX, DEC, "allowed_media_types" }, \ +{ name, longname, OFFSET(media_type_mask), AV_OPT_TYPE_FLAGS, { .i64 = (1 << (AVMEDIA_TYPE_SUBTITLE+1)) - 1 }, INT_MIN, INT_MAX, DEC, "allowed_media_types" }, \ { "video", "Video", 0, AV_OPT_TYPE_CONST, {.i64 = 1 << AVMEDIA_TYPE_VIDEO}, 0, 0, DEC, "allowed_media_types" }, \ { "audio", "Audio", 0, AV_OPT_TYPE_CONST, {.i64 = 1 << AVMEDIA_TYPE_AUDIO}, 0, 0, DEC, "allowed_media_types" }, \ -{ "data", "Data", 0, AV_OPT_TYPE_CONST, {.i64 = 1 << AVMEDIA_TYPE_DATA}, 0, 0, DEC, "allowed_media_types" } +{ "data", "Data", 0, AV_OPT_TYPE_CONST, {.i64 = 1 << AVMEDIA_TYPE_DATA}, 0, 0, DEC, "allowed_media_types" }, \ +{ "subtitle", "Subtitle", 0, AV_OPT_TYPE_CONST, {.i64 = 1 << AVMEDIA_TYPE_SUBTITLE}, 0, 0, DEC, "allowed_media_types" } #define RTSP_REORDERING_OPTS() \ { "reorder_queue_size", "set number of packets to buffer for handling of reordered packets", OFFSET(reordering_queue_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC } @@ -399,6 +400,8 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, codec_type = AVMEDIA_TYPE_VIDEO; } else if (!strcmp(st_type, "application")) { codec_type = AVMEDIA_TYPE_DATA; +} else if (!strcmp(st_type, "text")) { +codec_type = AVMEDIA_TYPE_SUBTITLE; } if (codec_type == AVMEDIA_TYPE_UNKNOWN || !(rt->media_type_mask & (1 << codec_type))) { s1->skip_media = 1; @@ -2368,7 +2371,7 @@ static int rtp_read_header(AVFormatContext *s) /* sdp_read_header initializes this again */ ff_network_close(); -rt->media_type_mask = (1 << (AVMEDIA_TYPE_DATA+1)) - 1; +rt->media_type_mask = (1 << (AVMEDIA_TYPE_SUBTITLE+1)) - 1; ret = sdp_read_header(s); s->pb = NULL; -- 1.8.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [CLT2015] FFmpeg at Chemnitzer Linux-Tage
Hello all, we applied for a booth at `Chemnitzer Linux-Tage' in Germany. Fortunately we were accepted again! The event will take place on 21st & 22nd of March in Chemnitz. More information can be found here: https://chemnitzer.linux-tage.de/2015/en/ We invite every FFmpeg developer/contributor/supporter to participate. Currently Gerion Entrup and Alexander Strasser are registered as booth staff and therefore will attend for sure. If you want to drop by or help out, it would be nice if you let us know about it here. If you have comments, ideas, or help to offer, please tell us! Best Regards, Alexander P.S. Slightly OT for this mail but still: If you have recommendations for open source events you, can add them on https://trac.ffmpeg.org/wiki/Conferences It should help remembering the dates and with planning the yearly schedule. pgphi8uJvqda7.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/7] avformat/rtpdec_ac3: add AC3 RTP depacketization
--- libavformat/Makefile | 1 + libavformat/rtpdec.c | 1 + libavformat/rtpdec_ac3.c | 166 +++ libavformat/rtpdec_formats.h | 1 + 4 files changed, 169 insertions(+) create mode 100644 libavformat/rtpdec_ac3.c diff --git a/libavformat/Makefile b/libavformat/Makefile index 6bf0761..5acb292 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -30,6 +30,7 @@ OBJS-$(CONFIG_RIFFENC) += riffenc.o OBJS-$(CONFIG_RTPDEC)+= rdt.o \ rtp.o \ rtpdec.o\ +rtpdec_ac3.o\ rtpdec_amr.o\ rtpdec_asf.o\ rtpdec_g726.o \ diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 33205aa..f5557d8 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -66,6 +66,7 @@ void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler) void ff_register_rtp_dynamic_payload_handlers(void) { +ff_register_dynamic_payload_handler(&ff_ac3_dynamic_handler); ff_register_dynamic_payload_handler(&ff_amr_nb_dynamic_handler); ff_register_dynamic_payload_handler(&ff_amr_wb_dynamic_handler); ff_register_dynamic_payload_handler(&ff_g726_16_dynamic_handler); diff --git a/libavformat/rtpdec_ac3.c b/libavformat/rtpdec_ac3.c new file mode 100644 index 000..2a47b75 --- /dev/null +++ b/libavformat/rtpdec_ac3.c @@ -0,0 +1,166 @@ +/* + * RTP parser for AC3 payload format + * Copyright (c) 2015 Gilles Chanteperdrix + * + * 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 "avformat.h" +#include "rtpdec_formats.h" +#include "libavcodec/get_bits.h" + +/* + * From: + * https://tools.ietf.org/html/draft-ietf-avt-rtp-ac3-07 + */ + +struct PayloadContext { +unsigned nr_frames; +unsigned last_frame; +uint32_t timestamp; +AVIOContext *fragment; +}; + +static av_cold int +ac3_init(AVFormatContext *s, int st_index, PayloadContext *data) +{ +if (st_index < 0) +return 0; +s->streams[st_index]->need_parsing = AVSTREAM_PARSE_FULL; +return 0; +} + +static PayloadContext *ac3_new_context(void) +{ +return av_mallocz(sizeof(PayloadContext)); +} + +static inline void free_fragment_if_needed(PayloadContext *data) +{ +if (data->fragment) { +uint8_t *p; +avio_close_dyn_buf(data->fragment, &p); +av_free(p); +data->fragment = NULL; +} +} + +static void ac3_free_context(PayloadContext *data) +{ +free_fragment_if_needed(data); +av_free(data); +} + +static int ac3_handle_packet(AVFormatContext *ctx, PayloadContext *data, + AVStream *st, AVPacket *pkt, uint32_t *timestamp, + const uint8_t *buf, int len, uint16_t seq, + int flags) +{ +unsigned frame_type; +unsigned nr_frames; +int err; + +if (len < 2) { +av_log(ctx, AV_LOG_ERROR, "Invalid %d bytes packet\n", len); +return AVERROR_INVALIDDATA; +} + +frame_type = buf[0] & 0x3; +nr_frames = buf[1]; +buf += 2; +len -= 2; + +switch (frame_type) { +case 0: /* One or more complete frames */ +if (nr_frames > 1) { +av_log(ctx, AV_LOG_ERROR, + "Unimplemented multiple AC3 frames per packet\n"); +return AVERROR_PATCHWELCOME; +} +if (nr_frames == 0) { +av_log(ctx, AV_LOG_ERROR, "Invalid AC3 packet data\n"); +return AVERROR_INVALIDDATA; +} +if (av_new_packet(pkt, len)) { +av_log(ctx, AV_LOG_ERROR, "Out of memory.\n"); +return AVERROR(ENOMEM); +} + +pkt->stream_index = st->index; +memcpy(pkt->data, buf, len); +return 0; + +case 1: +case 2: /* First fragment */ +free_fragment_if_needed(data); + +data->last_frame = 1; +data->nr_frames = nr_frames; +e
[FFmpeg-devel] [PATCH 7/7] avformat/rtsp: parse lang attribute in SDP
--- libavformat/rtsp.c | 12 libavformat/rtsp.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 77407dd..3a68020 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -477,6 +477,8 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, handler->init(s, st->index, rtsp_st->dynamic_protocol_context); } +if (rt->default_lang[0]) +av_dict_set(&st->metadata, "language", rt->default_lang, 0); } /* put a default control url */ av_strlcpy(rtsp_st->control_url, rt->control_uri, @@ -540,6 +542,16 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, /* AV_NOPTS_VALUE means live broadcast (and can't seek) */ s->duration = (end == AV_NOPTS_VALUE) ? AV_NOPTS_VALUE : end - start; +} else if (av_strstart(p, "lang:", &p)) { +if (s->nb_streams > 0) { +get_word(buf1, sizeof(buf1), &p); +rtsp_st = rt->rtsp_streams[rt->nb_rtsp_streams - 1]; +if (rtsp_st->stream_index >= 0) { +st = s->streams[rtsp_st->stream_index]; +av_dict_set(&st->metadata, "language", buf1, 0); +} +} else +get_word(rt->default_lang, sizeof(rt->default_lang), &p); } else if (av_strstart(p, "IsRealDataType:integer;",&p)) { if (atoi(p) == 1) rt->transport = RTSP_TRANSPORT_RDT; diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index a9f2f1e..3cfcfb6 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -405,6 +405,8 @@ typedef struct RTSPState { * User-Agent string */ char *user_agent; + +char default_lang[4]; } RTSPState; #define RTSP_FLAG_FILTER_SRC 0x1/**< Filter incoming UDP packets - -- 1.8.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 4/7] avcocdec/mpegaudio_parser: add MP3 ADU headers parser
--- libavcodec/mpegaudio_parser.c | 14 -- libavcodec/mpegaudiodecheader.c | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c index 79dbf63..42f4706 100644 --- a/libavcodec/mpegaudio_parser.c +++ b/libavcodec/mpegaudio_parser.c @@ -64,7 +64,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, }else{ while(icodec_id; state= (state<<8) + buf[i++]; @@ -90,6 +90,16 @@ static int mpegaudio_parse(AVCodecParserContext *s1, avctx->bit_rate += (bit_rate - avctx->bit_rate) / (s->header_count - header_threshold); } } + +if (s1->flags & PARSER_FLAG_COMPLETE_FRAMES) { +s->frame_size = 0; +next = buf_size; +} else if (codec_id == AV_CODEC_ID_MP3ADU) { +av_log(avctx, AV_LOG_ERROR, +"MP3ADU full parser not implemented"); +return AVERROR_PATCHWELCOME; +} + break; } } @@ -110,7 +120,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, AVCodecParser ff_mpegaudio_parser = { -.codec_ids = { AV_CODEC_ID_MP1, AV_CODEC_ID_MP2, AV_CODEC_ID_MP3 }, +.codec_ids = { AV_CODEC_ID_MP1, AV_CODEC_ID_MP2, AV_CODEC_ID_MP3, AV_CODEC_ID_MP3ADU }, .priv_data_size = sizeof(MpegAudioParseContext), .parser_parse = mpegaudio_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/mpegaudiodecheader.c b/libavcodec/mpegaudiodecheader.c index 5db1957..6af6e4b 100644 --- a/libavcodec/mpegaudiodecheader.c +++ b/libavcodec/mpegaudiodecheader.c @@ -134,7 +134,8 @@ int avpriv_mpa_decode_header2(uint32_t head, int *sample_rate, int *channels, in break; default: case 3: -*codec_id = AV_CODEC_ID_MP3; +if (*codec_id != AV_CODEC_ID_MP3ADU) +*codec_id = AV_CODEC_ID_MP3; if (s->lsf) *frame_size = 576; else -- 1.8.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 3/7] avformat/rtpdec: add T.140 RTP depacketization (RFC 4103)
--- libavformat/rtpdec.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index f5557d8..4091bdc 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -56,6 +56,12 @@ static RTPDynamicProtocolHandler opus_dynamic_handler = { .codec_id = AV_CODEC_ID_OPUS, }; +static RTPDynamicProtocolHandler ff_t140_dynamic_handler = { +.enc_name = "t140", +.codec_type = AVMEDIA_TYPE_SUBTITLE, +.codec_id = AV_CODEC_ID_SUBRIP, +}; + static RTPDynamicProtocolHandler *rtp_first_dynamic_payload_handler = NULL; void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler) @@ -96,6 +102,7 @@ void ff_register_rtp_dynamic_payload_handlers(void) ff_register_dynamic_payload_handler(&ff_quicktime_rtp_aud_handler); ff_register_dynamic_payload_handler(&ff_quicktime_rtp_vid_handler); ff_register_dynamic_payload_handler(&ff_svq3_dynamic_handler); +ff_register_dynamic_payload_handler(&ff_t140_dynamic_handler); ff_register_dynamic_payload_handler(&ff_theora_dynamic_handler); ff_register_dynamic_payload_handler(&ff_vorbis_dynamic_handler); ff_register_dynamic_payload_handler(&ff_vp8_dynamic_handler); -- 1.8.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 6/7] avformat/rtpdec_mpeg4: reassemble fragmented AAC frames
--- libavformat/rtpdec_mpeg4.c | 84 +- 1 file changed, 76 insertions(+), 8 deletions(-) diff --git a/libavformat/rtpdec_mpeg4.c b/libavformat/rtpdec_mpeg4.c index 53921f2..f791a5c 100644 --- a/libavformat/rtpdec_mpeg4.c +++ b/libavformat/rtpdec_mpeg4.c @@ -33,6 +33,8 @@ #include "libavutil/avstring.h" #include "libavcodec/get_bits.h" +#define MAX_AAC_HBR_FRAME_SIZE 8191 + /** Structure listing useful vars to parse RTP packet payload */ struct PayloadContext { int sizelength; @@ -59,8 +61,9 @@ struct PayloadContext { int au_headers_length_bytes; int cur_au_index; -uint8_t buf[RTP_MAX_PACKET_LENGTH]; +uint8_t buf[FFMAX(RTP_MAX_PACKET_LENGTH, MAX_AAC_HBR_FRAME_SIZE)]; int buf_pos, buf_size; +uint32_t timestamp; }; typedef struct { @@ -168,30 +171,95 @@ static int aac_parse_packet(AVFormatContext *ctx, PayloadContext *data, { int ret; + if (!buf) { -if (data->cur_au_index > data->nb_au_headers) +if (data->cur_au_index > data->nb_au_headers) { +av_log(ctx, AV_LOG_ERROR, "Invalid parser state\n"); return AVERROR_INVALIDDATA; -if (data->buf_size - data->buf_pos < data->au_headers[data->cur_au_index].size) +} +if (data->buf_size - data->buf_pos < data->au_headers[data->cur_au_index].size) { +av_log(ctx, AV_LOG_ERROR, "Invalid AU size\n"); return AVERROR_INVALIDDATA; -if ((ret = av_new_packet(pkt, data->au_headers[data->cur_au_index].size)) < 0) +} +if ((ret = av_new_packet(pkt, data->au_headers[data->cur_au_index].size)) < 0) { +av_log(ctx, AV_LOG_ERROR, "Out of memory\n"); return ret; +} memcpy(pkt->data, &data->buf[data->buf_pos], data->au_headers[data->cur_au_index].size); data->buf_pos += data->au_headers[data->cur_au_index].size; pkt->stream_index = st->index; data->cur_au_index++; -return data->cur_au_index < data->nb_au_headers; + +if (data->cur_au_index == data->nb_au_headers) { +data->buf_pos = 0; +return 0; +} + +return 1; } -if (rtp_parse_mp4_au(data, buf, len)) +if (rtp_parse_mp4_au(data, buf, len)) { +av_log(ctx, AV_LOG_ERROR, "Error parsing AU headers\n"); return -1; +} buf += data->au_headers_length_bytes + 2; len -= data->au_headers_length_bytes + 2; +if (data->nb_au_headers == 1 && len < data->au_headers[0].size) { +/* Packet is fragmented */ + +if (data->buf_pos == 0) { +if (data->au_headers[0].size > MAX_AAC_HBR_FRAME_SIZE) { +av_log(ctx, AV_LOG_ERROR, "Invalid AU size\n"); +return AVERROR_INVALIDDATA; +} + +data->buf_size = data->au_headers[0].size; +data->timestamp = *timestamp; +} + +if (data->timestamp != *timestamp +|| data->au_headers[0].size != data->buf_size +|| data->buf_pos + len > MAX_AAC_HBR_FRAME_SIZE) { +data->buf_pos = 0; +data->buf_size = 0; +av_log(ctx, AV_LOG_ERROR, "Invalid packet received\n"); +return AVERROR_INVALIDDATA; +} -if (len < data->au_headers[0].size) +memcpy(&data->buf[data->buf_pos], buf, len); +data->buf_pos += len; + +if (!(flags & RTP_FLAG_MARKER)) +return AVERROR(EAGAIN); + +if (data->buf_pos != data->buf_size) { +data->buf_pos = 0; +av_log(ctx, AV_LOG_ERROR, "Missed some packets, discarding frame\n"); +return AVERROR_INVALIDDATA; +} + +data->buf_pos = 0; +ret = av_new_packet(pkt, data->buf_size); +if (ret < 0) { +av_log(ctx, AV_LOG_ERROR, "Out of memory\n"); +return ret; +} +pkt->stream_index = st->index; + +memcpy(pkt->data, data->buf, data->buf_size); + +return 0; +} + +if (len < data->au_headers[0].size) { +av_log(ctx, AV_LOG_ERROR, "First AU larger than packet size\n"); return AVERROR_INVALIDDATA; -if ((ret = av_new_packet(pkt, data->au_headers[0].size)) < 0) +} +if ((ret = av_new_packet(pkt, data->au_headers[0].size)) < 0) { +av_log(ctx, AV_LOG_ERROR, "Out of memory\n"); return ret; +} memcpy(pkt->data, buf, data->au_headers[0].size); len -= data->au_headers[0].size; buf += data->au_headers[0].size; -- 1.8.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 5/7] avformat/rtpdec_mpeg12: add robust MPEG audio depacketization (RFC 3119)
--- libavformat/rtpdec.c | 1 + libavformat/rtpdec_formats.h | 1 + libavformat/rtpdec_mpeg12.c | 201 +++ 3 files changed, 203 insertions(+) diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 4091bdc..711a94d 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -90,6 +90,7 @@ void ff_register_rtp_dynamic_payload_handlers(void) ff_register_dynamic_payload_handler(&ff_mp4a_latm_dynamic_handler); ff_register_dynamic_payload_handler(&ff_mp4v_es_dynamic_handler); ff_register_dynamic_payload_handler(&ff_mpeg_audio_dynamic_handler); +ff_register_dynamic_payload_handler(&ff_mpeg_audio_robust_dynamic_handler); ff_register_dynamic_payload_handler(&ff_mpeg_video_dynamic_handler); ff_register_dynamic_payload_handler(&ff_mpeg4_generic_dynamic_handler); ff_register_dynamic_payload_handler(&ff_mpegts_dynamic_handler); diff --git a/libavformat/rtpdec_formats.h b/libavformat/rtpdec_formats.h index e5aff59..3cbd0aa 100644 --- a/libavformat/rtpdec_formats.h +++ b/libavformat/rtpdec_formats.h @@ -57,6 +57,7 @@ extern RTPDynamicProtocolHandler ff_jpeg_dynamic_handler; extern RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler; extern RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler; extern RTPDynamicProtocolHandler ff_mpeg_audio_dynamic_handler; +extern RTPDynamicProtocolHandler ff_mpeg_audio_robust_dynamic_handler; extern RTPDynamicProtocolHandler ff_mpeg_video_dynamic_handler; extern RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler; extern RTPDynamicProtocolHandler ff_mpegts_dynamic_handler; diff --git a/libavformat/rtpdec_mpeg12.c b/libavformat/rtpdec_mpeg12.c index d73ff1e..7d01ef8 100644 --- a/libavformat/rtpdec_mpeg12.c +++ b/libavformat/rtpdec_mpeg12.c @@ -71,3 +71,204 @@ RTPDynamicProtocolHandler ff_mpeg_video_dynamic_handler = { .parse_packet = mpeg_parse_packet, .static_payload_id = 32, }; + +/* MPA-ROBUST, RFC 3119 */ +struct PayloadContext { +unsigned adu_size; +unsigned cur_size; +uint32_t timestamp; +uint8_t *split_buf; +int split_pos, split_buf_size, split_pkts; +AVIOContext *fragment; +}; + +static av_cold int +mpa_robust_init(AVFormatContext *ctx, int st_index, PayloadContext *data) +{ +if (st_index < 0) +return 0; +ctx->streams[st_index]->need_parsing = AVSTREAM_PARSE_HEADERS; +return 0; +} + +static PayloadContext *mpa_robust_new_context(void) +{ +return av_mallocz(sizeof(PayloadContext)); +} + +static inline void free_fragment_if_needed(PayloadContext *data) +{ +if (data->fragment) { +uint8_t *p; +avio_close_dyn_buf(data->fragment, &p); +av_free(p); +data->fragment = NULL; +} +} + +static void mpa_robust_free_context(PayloadContext *data) +{ +free_fragment_if_needed(data); +av_free(data); +} + +static int mpa_robust_parse_rtp_header(AVFormatContext *ctx, +const uint8_t *buf, int len, +unsigned *adu_size, unsigned *cont) +{ +unsigned header_size; + +if (len < 1) { +av_log(ctx, AV_LOG_ERROR, "Invalid %d bytes packet\n", len); +return AVERROR_INVALIDDATA; +} + +*cont = !!(buf[0] & 0x80); +if ((buf[0] & 0x40) == 0) { +header_size = 1; +*adu_size = buf[0] & ~0xc0; +} else { +if (len == 1) { +av_log(ctx, AV_LOG_ERROR, "Invalid %d bytes packet\n", len); +return AVERROR_INVALIDDATA; +} +header_size = 2; +*adu_size = AV_RB16(buf) & ~0xc000; +} + +return header_size; +} + +static int +mpa_robust_parse_packet(AVFormatContext *ctx, PayloadContext *data, +AVStream *st, AVPacket *pkt, uint32_t *timestamp, +const uint8_t *buf, int len, uint16_t seq, +int flags) +{ +unsigned adu_size, continuation; +int err; + +if (!buf) { +buf = &data->split_buf[data->split_pos]; +len = data->split_buf_size - data->split_pos; + +err = mpa_robust_parse_rtp_header(ctx, buf, len, &adu_size, &continuation); +if (err < 0) { +av_freep(&data->split_buf); +return err; +} +buf += err; +len -= err; + +if (continuation != 0 || adu_size > len) { +av_freep(&data->split_buf); +av_log(ctx, AV_LOG_ERROR, "Invalid frame\n"); +return AVERROR_INVALIDDATA; +} + +if (av_new_packet(pkt, adu_size)) { +av_log(ctx, AV_LOG_ERROR, "Out of memory.\n"); +return AVERROR(ENOMEM); +} + +pkt->stream_index = st->index; +memcpy(pkt->data, buf, adu_size); + +data->split_pos = (buf - data->split_buf) + adu_size; + +if (data->split_pos == data->split_buf_size) { +av_freep(&data->split_buf); +return 0; +} + +re
Re: [FFmpeg-devel] [PATCH 1/5] x86: hevc_mc: fewer gpr autoloads for _v filters
On Sat, Feb 07, 2015 at 06:49:36PM +, Christophe Gisquet wrote: > In that case, it's just to load my, but mx/r3src is not used. > --- > libavcodec/x86/hevc_mc.asm | 18 -- > 1 file changed, 12 insertions(+), 6 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I do not agree with what you have to say, but I'll defend to the death your right to say it. -- Voltaire 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] x86: hevc_mc: remove lea in EPEL_LOAD
On Sat, Feb 07, 2015 at 06:49:37PM +, Christophe Gisquet wrote: > The second parameter to the macro is always an immediate address, > so no lea is needed. > --- > libavcodec/x86/hevc_mc.asm | 19 +++ > 1 file changed, 7 insertions(+), 12 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB He who knows, does not speak. He who speaks, does not know. -- Lao Tsu signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] DSP function ARM NEON patches for hevc
On Thu, Feb 05, 2015 at 02:22:28PM +0100, Mickaël Raulet wrote: > Michael, > > Please find some commits that can be cherry picked from > https://github.com/OpenHEVC/FFmpeg/commits/ffmpeg_patch > > Optimized deblocking filter (8bits only) > 1b9ee47d2f43b0a029a9468233626102eb1473b8 > > Optimzed transform functions (4x4, 8x8, transform add 8bits only) > b153f55935969c794de4640f8d34e01c58e027ae tested applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB He who knows, does not speak. He who speaks, does not know. -- Lao Tsu signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/ass: make default playback resolution available to decoders
On Sun, Feb 08, 2015 at 12:40:18PM +0100, Clément Bœsch wrote: > --- > libavcodec/ass.c | 5 +++-- > libavcodec/ass.h | 3 +++ > 2 files changed, 6 insertions(+), 2 deletions(-) LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Docs for Blackmagic high bit depth video/audio
On Sun, Jan 18, 2015 at 08:50:15PM +, Timothy Gu wrote: > On Sun Jan 18 2015 at 11:46:03 AM Georg Lippitsch > wrote: [...] > > @@ -1023,6 +1023,16 @@ Defaults to @option{false}. > > If set to @option{true}, print a list of supported formats and exit. > > Defaults to @option{false}. > > > > +@item bm_v210 > > +If set to @option{true}, video is captured in 10 bit v210 instead > > > > If set to @samp{1} applied with that change Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] ffprobe: Force string_validation to int type, its accessed via AVOption as int
On Fri, Feb 06, 2015 at 10:10:22PM +0100, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > ffprobe.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) i intend to apply this and similar fixes to other parts of ffmpeg soon ... > > diff --git a/ffprobe.c b/ffprobe.c > index d352bb6b..8617c96 100644 > --- a/ffprobe.c > +++ b/ffprobe.c > @@ -294,7 +294,8 @@ typedef enum { > WRITER_STRING_VALIDATION_FAIL, > WRITER_STRING_VALIDATION_REPLACE, > WRITER_STRING_VALIDATION_IGNORE, > -WRITER_STRING_VALIDATION_NB > +WRITER_STRING_VALIDATION_NB, > +WRITER_STRING_VALIDATION_FORCE_ENUM_TO_INT_TYPE= 0x76543210, > } StringValidation; > > typedef struct Writer { > -- > 1.7.9.5 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] ffprobe: Force string_validation to int type, its accessed via AVOption as int
On Fri, Feb 06, 2015 at 10:10:22PM +0100, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > ffprobe.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/ffprobe.c b/ffprobe.c > index d352bb6b..8617c96 100644 > --- a/ffprobe.c > +++ b/ffprobe.c > @@ -294,7 +294,8 @@ typedef enum { > WRITER_STRING_VALIDATION_FAIL, > WRITER_STRING_VALIDATION_REPLACE, > WRITER_STRING_VALIDATION_IGNORE, > -WRITER_STRING_VALIDATION_NB > +WRITER_STRING_VALIDATION_NB, > +WRITER_STRING_VALIDATION_FORCE_ENUM_TO_INT_TYPE= 0x76543210, > } StringValidation; > I prefer the int approach you originally proposed. This hack makes me quite uncomfortable, and the idea of having it all over the code base as well. -- Clément B. pgpidAyyJsEpO.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Enable stream copy of data
On February 8, 2015 11:07:12 PM IST, Kieran Kunhya wrote: >> It has timestamp inside the data stream, and for making a simple use >case scte need -copyts and -vsync 0 param. Otherwise user can ignore >the data as they always did. >> -Anshul > >Is FFmpeg aware of this PTS and how to place the data packet with >respect to PES packets? Only scte_35.c file is aware of this patch. I dont know where placing of packets is done. I would look and tell how its done. >How are you testing this patch? > I am using bmd device to test this. No one came with more scte_35 video on trac, I thought people putting the bounty will give me some video. >As far as I can tell it just works by chance. > I have done some improvement lately now it work without copyts and vsnc 0 if splice immidiate is used. >Kieran >___ >ffmpeg-devel mailing list >ffmpeg-devel@ffmpeg.org >http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] ffprobe: Force string_validation to int type, its accessed via AVOption as int
On Mon, Feb 09, 2015 at 01:44:43AM +0100, Clément Bœsch wrote: > On Fri, Feb 06, 2015 at 10:10:22PM +0100, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer > > --- > > ffprobe.c |3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/ffprobe.c b/ffprobe.c > > index d352bb6b..8617c96 100644 > > --- a/ffprobe.c > > +++ b/ffprobe.c > > @@ -294,7 +294,8 @@ typedef enum { > > WRITER_STRING_VALIDATION_FAIL, > > WRITER_STRING_VALIDATION_REPLACE, > > WRITER_STRING_VALIDATION_IGNORE, > > -WRITER_STRING_VALIDATION_NB > > +WRITER_STRING_VALIDATION_NB, > > +WRITER_STRING_VALIDATION_FORCE_ENUM_TO_INT_TYPE= 0x76543210, > > } StringValidation; > > > > I prefer the int approach you originally proposed. This hack makes me > quite uncomfortable, and the idea of having it all over the code base as > well. perfectly fine with me as well, saste i think you preferred above? or did i misunderstand ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In a rich man's house there is no place to spit but his face. -- Diogenes of Sinope signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/f_sendcmd: consider it an error if there are no commands
On Fri, Jan 16, 2015 at 12:23:32AM +0100, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > libavfilter/f_sendcmd.c |5 + > 1 file changed, 5 insertions(+) applied [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel