Re: [FFmpeg-devel] [PATCH] build: mov_muxer requires ac3_parser
Hi, On 15 October 2014 07:33:39 CEST, Yu Xiaolei dreifachst...@gmail.com wrote: --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index cda463d..3e7143c 100755 --- a/configure +++ b/configure @@ -2413,7 +2413,7 @@ matroska_muxer_select=riffenc mmf_muxer_select=riffenc mov_demuxer_select=riffdec mov_demuxer_suggest=zlib -mov_muxer_select=riffenc rtpenc_chain +mov_muxer_select=riffenc rtpenc_chain ac3_parser mp3_demuxer_select=mpegaudio_parser mp4_muxer_select=mov_muxer mpegts_muxer_select=adts_muxer latm_muxer LGTM, thanks for the fix. -- Ben ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] mpegts: add the judgement if a new program is ctreated successfully
From: Di Wu di1028...@samsung.com Add the judement after create a new program to avoid segment fault. Signed-off-by: Di Wu di1028...@samsung.com --- libavformat/mpegts.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 8808269..cc0ce79 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1925,8 +1925,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len } else { MpegTSFilter *fil = ts-pids[pmt_pid]; program = av_new_program(ts-stream, sid); -program-program_num = sid; -program-pmt_pid = pmt_pid; +if (program) { +program-program_num = sid; +program-pmt_pid = pmt_pid; +} if (fil) if ( fil-type != MPEGTS_SECTION || fil-pid != pmt_pid -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Facebook page
On 10/05/2014 09:09 PM, compn wrote: On Sun, 05 Oct 2014 20:19:49 +0200 Thomas Volkert si...@gmx.net wrote: http://www.facebook.com/ffmpeg.devel, http://www.facebook.com/ffmpeg.framework, http://www.facebook.com/multimedia.framework, ... @all: What is your opinion about these alternative solutions? maybe http://www.facebook.com/ffmpeg.org ? or http://www.facebook.com/ffmpeg.official ? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Please, vote for a Facebook url here: http://goo.gl/forms/AHVFvPxp8X This will show us the community opinion about this. Best regards, Thomas. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] PATCH: Make -copyts a tri-state
Discussed this briefly on IRC; decided this was a good idea. I'm not sure if the commit message explains it well enough; please poke me here or on IRC if it doesn't. 0001-Make-copyts-a-tri-state-with-no-normalizing-input-ti.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] PATCH: Make -copyts a tri-state
Le quartidi 24 vendémiaire, an CCXXIII, Rodger Combs a écrit : Discussed this briefly on IRC; decided this was a good idea. I'm not sure if the commit message explains it well enough; please poke me here or on IRC if it doesn't. From 617b532c8a403c1cf06e60c99e9f36c787553b43 Mon Sep 17 00:00:00 2001 From: Rodger Combs rodger.co...@gmail.com Date: Wed, 15 Oct 2014 05:00:02 -0500 Subject: [PATCH] Make copyts a tri-state, with `no` normalizing input timestamps. This doesn't change the default or `-copyts` behavior, but allows `-nocopyts` to make e.g. `-ss 50` have timestamps starting at 50 seconds, even if the input file's timestamps start at a value other than zero. --- ffmpeg.c | 6 +++--- ffmpeg_opt.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) It looks like you forgot to update the documentation too. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] PATCH: Make -copyts a tri-state
On Oct 15, 2014, at 05:34, Rodger Combs rodger.co...@gmail.com wrote: Discussed this briefly on IRC; decided this was a good idea. I'm not sure if the commit message explains it well enough; please poke me here or on IRC if it doesn't. 0001-Make-copyts-a-tri-state-with-no-normalizing-input-ti.patch AND clearly I was too tired when writing this. I read the wrong value altogether. Here we go: 0001-Make-copyts-a-tri-state-with-no-normalizing-input-ti.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] PATCH: Make -copyts a tri-state
On Oct 15, 2014, at 05:37, Nicolas George geo...@nsup.org wrote: Le quartidi 24 vendémiaire, an CCXXIII, Rodger Combs a écrit : Discussed this briefly on IRC; decided this was a good idea. I'm not sure if the commit message explains it well enough; please poke me here or on IRC if it doesn't. From 617b532c8a403c1cf06e60c99e9f36c787553b43 Mon Sep 17 00:00:00 2001 From: Rodger Combs rodger.co...@gmail.com Date: Wed, 15 Oct 2014 05:00:02 -0500 Subject: [PATCH] Make copyts a tri-state, with `no` normalizing input timestamps. This doesn't change the default or `-copyts` behavior, but allows `-nocopyts` to make e.g. `-ss 50` have timestamps starting at 50 seconds, even if the input file's timestamps start at a value other than zero. --- ffmpeg.c | 6 +++--- ffmpeg_opt.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) It looks like you forgot to update the documentation too. Regards, -- Nicolas George ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Indeed I did. Here you go: 0001-Make-copyts-a-tri-state-with-no-normalizing-input-ti.patch Description: Binary data It occurs to me that it might be more useful in some cases to have one master input file (the first one?) be shifted so its timestamps start at zero, and the rest be shifted by the same amount as the master. That might be a good argument for making this its own option, instead of making copyts a tri-state. I'm not particularly attached to the naming or implementation here, so suggestions are plenty welcome :) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] PATH :wmv2 Limit the mvx and mvy to be integer in some condition
Hi : I have created a patch, but I'm not sure if the patch is correct because I don't have the spec of wmv2. The following code which is in ff_mspel_motion function seems to limit the mvx and mvy to be integer to make sure the prediction right and to void reading overflow. But I'm not sure, maybe this is just specified by the spec of wmv2. if (src_x = -16 || src_x = s-width) dxy = ~3; if (src_y = -16 || src_y = s-height) dxy = ~4; If the goal of the up code is the former one, the following code can play the same role, So I'm confused. if (src_x 1 || src_y 1 || src_x + 17 = s-h_edge_pos || src_y + h + 1 = v_edge_pos) { s-vdsp.emulated_edge_mc(s-edge_emu_buffer, ptr - 1 - s-linesize, s-linesize, s-linesize, 19, 19, src_x - 1, src_y - 1, s-h_edge_pos, s-v_edge_pos); ptr = s-edge_emu_buffer + 1 + s-linesize; emu = 1; } If this code is used to make sure the prediction right and to void reading overflow, I think my patch should applied or just remove this code. My patch is attached, please check it. Best Regards Di Wu 0001-wmv2-Limit-the-mvx-and-mvy-to-be-integer-in-some-con.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] PATH :wmv2 Limit the mvx and mvy to be integer in some condition
On Wed, 15 Oct 2014 11:44:18 + (GMT) Di Wu di1028...@samsung.com wrote: Hi : I have created a patch, but I'm not sure if the patch is correct because I don't have the spec of wmv2. the only msmpeg4 specs i can remember are http://ffmpeg.org/~michael/msmpeg4.txt and http://wiki.multimedia.cx/index.php?title=XINTRA8 which references http://www.google.com/patents/US7263232 it looks like there is some ms source code for wmv2 here http://sourceforge.net/p/ffdshow/patches/4/ maybe someone else knows of a better spec to reference. -compn ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/mov.c: Allocate buffer in case of long metadata entries.
Am 13.10.14 13:08, schrieb Nicolas George: Le duodi 22 vendémiaire, an CCXXIII, Reimar Döffinger a écrit : Uh, wouldn't that be undefined behaviour? You're not allowed to compare pointers from different allocations as far as I know, even if it usually works. The spec says: # Two pointers compare equal if and only if both are null pointers, both are # pointers to the same object (including a pointer to an object and a # subobject at its beginning) or function, both are pointers to one past the # last element of the same array object, or one is a pointer to one past the # end of one array object and the other is a pointer to the start of a # different array object that happens to immediately follow the first array # object in the address space.) If I read this correctly, the and only if means that comparing pointers from different allocations is valid and returns false. I suspect you are generalising the issue with and : for these operators, comparing pointers to different objects is invalid. Ping. The pointer issue does not apply to the current patch. -Thilo ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] doc/filters.texi: fix several typos in the vidstab* sections
Hi, there are two minor typos and a stray bracket in the vidstab* sections of the filters documentation. Patch is attached. I also took the liberty to add references to the other filter (unsharp) which is mentioned, and had to add an anchor to the unsharp section for this. Some other sections do use @ref{} to point to other filters, some don't. *shrug* Is there any interest in someone adding @ref{}'s everywhere possible? I could give it a stab. ;-) Cheers, Moritz From 230daa1b3ce183adb14e47b7bcfe338dc140b745 Mon Sep 17 00:00:00 2001 From: Moritz Barsnick barsn...@gmx.net Date: Wed, 15 Oct 2014 15:44:33 +0200 Subject: [PATCH] doc/filters.texi: fix several typos in the vidstab* sections Also create an anchor for the unsharp filter, and references to it in its mentions. --- doc/filters.texi | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index b9575f4..e98ce2d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8651,6 +8651,7 @@ ffmpeg -i INPUT -vf trim=duration=1 @end itemize +@anchor{unsharp} @section unsharp Sharpen or blur the input video. @@ -8812,7 +8813,7 @@ Read a file with transform information for each frame and apply/compensate them. Together with the @ref{vidstabdetect} filter this can be used to deshake videos. See also @url{http://public.hronopik.de/vid.stab}. It is important to also use -the unsharp filter, see below. +the @ref{unsharp} filter, see below. To enable compilation of this filter you need to configure FFmpeg with @code{--enable-libvidstab}. @@ -8822,7 +8823,7 @@ To enable compilation of this filter you need to configure FFmpeg with @table @option @item input Set path to the file used to read the transforms. Default value is -@file{transforms.trf}). +@file{transforms.trf}. @item smoothing Set the number of frames (value*2 + 1) used for lowpass filtering the @@ -8830,9 +8831,9 @@ camera movements. Default value is 10. For example a number of 10 means that 21 frames are used (10 in the past and 10 in the future) to smoothen the motion in the video. A -larger values leads to a smoother video, but limits the acceleration -of the camera (pan/tilt movements). 0 is a special case where a -static camera is simulated. +larger value leads to a smoother video, but limits the acceleration of +the camera (pan/tilt movements). 0 is a special case where a static +camera is simulated. @item optalgo Set the camera path optimization algorithm. @@ -8869,7 +8870,7 @@ fill the border black Invert transforms if set to 1. Default value is 0. @item relative -Consider transforms as relative to previsou frame if set to 1, +Consider transforms as relative to previous frame if set to 1, absolute if set to 0. Default value is 0. @item zoom @@ -8935,7 +8936,7 @@ Use @command{ffmpeg} for a typical stabilization with default values: ffmpeg -i inp.mpeg -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 inp_stabilized.mpeg @end example -Note the use of the unsharp filter which is always recommended. +Note the use of the @ref{unsharp} filter which is always recommended. @item Zoom in a bit more and load transform data from a given file: -- 1.9.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Fix to crash in ff_rtsp_read_reply
This patch fixes a crash in ff_rtsp_read_reply that can occur when the Content Length field of the RTSP reply message is very high (e.g. near INT_MAX) and causes av_malloc to return NULL. Thanks, Michael commit 1e085fa751168813912f13f89b754e5711b13daa Author: Michael Lynch mtly...@google.com Date: Tue Oct 14 14:19:40 2014 -0400 Fixing crash in ff_rtsp_read_reply caused by failure to check the result of memory allocation. diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 523a7c0..77f03ba 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1150,6 +1150,8 @@ start: if (content_length 0) { /* leave some room for a trailing '\0' (useful for simple parsing) */ content = av_malloc(content_length + 1); +if (!content) +return AVERROR(ENOMEM); ffurl_read_complete(rt-rtsp_hd, content, content_length); content[content_length] = '\0'; } ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] (no subject)
On Sat, Oct 11, 2014 at 07:59:05PM +0200, Clément Bœsch wrote: To be applied on top of the previous patch. Patchset applied, thank you all for the reviews. -- Clément B. pgprFpCvlbyXw.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Fix to crash in ff_rtsp_read_reply
On Wed, Oct 15, 2014 at 07:59:24PM +0200, Benoit Fouet wrote: Hi, Le 15/10/2014 19:42, Reimar Döffinger a écrit : On Tue, Oct 14, 2014 at 04:30:39PM -0400, Michael Lynch wrote: This patch fixes a crash in ff_rtsp_read_reply that can occur when the Content Length field of the RTSP reply message is very high (e.g. near INT_MAX) and causes av_malloc to return NULL. Thanks, Michael commit 1e085fa751168813912f13f89b754e5711b13daa Author: Michael Lynch mtly...@google.com Date: Tue Oct 14 14:19:40 2014 -0400 Fixing crash in ff_rtsp_read_reply caused by failure to check the result of memory allocation. diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 523a7c0..77f03ba 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1150,6 +1150,8 @@ start: if (content_length 0) { /* leave some room for a trailing '\0' (useful for simple parsing) */ content = av_malloc(content_length + 1); +if (!content) +return AVERROR(ENOMEM); ffurl_read_complete(rt-rtsp_hd, content, content_length); content[content_length] = '\0'; } LGTM. It currently is the only allocation so a direct return should not leak anything. I'd change the commit message to something less confusing, though. avformat/rtsp: check memory allocation or something like this. applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If a bugfix only changes things apparently unrelated to the bug with no further explanation, that is a good sign that the bugfix is wrong. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Misc Libavfilter extension
Hello Stefano Sabatini sir,I am Prabhjeet Kaur,I want to the Qualification task of Misc Libavfilter extension project. Sir I want to know that is their anyone else who is working on this task,kindly do reply me so that i can work on this project as I am very much interested and want to do this task in this project. Hoping for the reply soon ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] build: mov_muxer requires ac3_parser
On Wed, Oct 15, 2014 at 08:09:43AM +0200, Benoit Fouet wrote: Hi, On 15 October 2014 07:33:39 CEST, Yu Xiaolei dreifachst...@gmail.com wrote: --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index cda463d..3e7143c 100755 --- a/configure +++ b/configure @@ -2413,7 +2413,7 @@ matroska_muxer_select=riffenc mmf_muxer_select=riffenc mov_demuxer_select=riffdec mov_demuxer_suggest=zlib -mov_muxer_select=riffenc rtpenc_chain +mov_muxer_select=riffenc rtpenc_chain ac3_parser mp3_demuxer_select=mpegaudio_parser mp4_muxer_select=mov_muxer mpegts_muxer_select=adts_muxer latm_muxer LGTM, thanks for the fix. applied thx [...] -- 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 1/2] avformat/mov: auodetect use_mfra_for
On Wed, Oct 15, 2014 at 12:12:59PM +0300, Mika Raento wrote: On 14 October 2014 23:48, Michael Niedermayer michae...@gmx.at wrote: On Mon, Oct 13, 2014 at 01:45:18PM +0200, Michael Niedermayer wrote: Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavformat/isom.h |1 + libavformat/mov.c | 29 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) mika, any comments ? does this look ok to you? i assume you know more about the software and problem than i do ... This does correctly select the right behaviour for my input files, and looks reasonably conservative. LGTM. applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avformat/mov: auodetect use_mfra_for
Hello ,I am Prabhjeet Kaur,I want to the Qualification task of Misc Libavfilter extension project. Sir I want to know that is their anyone else who is working on this task,kindly do reply me so that i can work on this project as I am very much interested and want to do this task in this project. Hoping for the reply soon On Wed, Oct 15, 2014 at 11:48 PM, Michael Niedermayer michae...@gmx.at wrote: On Wed, Oct 15, 2014 at 12:12:59PM +0300, Mika Raento wrote: On 14 October 2014 23:48, Michael Niedermayer michae...@gmx.at wrote: On Mon, Oct 13, 2014 at 01:45:18PM +0200, Michael Niedermayer wrote: Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavformat/isom.h |1 + libavformat/mov.c | 29 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) mika, any comments ? does this look ok to you? i assume you know more about the software and problem than i do ... This does correctly select the right behaviour for my input files, and looks reasonably conservative. LGTM. applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Added STL demuxer and decoder
From: Eejya singh.ee...@gmail.com --- Changelog| 1 + doc/general.texi | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/avcodec.h | 1 + libavcodec/codec_desc.c | 7 +++ libavcodec/textdec.c | 18 ++- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/stldec.c | 136 +++ 10 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 libavformat/stldec.c diff --git a/Changelog b/Changelog index b59058b..9626d4a 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ version next: - HEVC/H.265 RTP payload format (draft v6) packetizer - SUP/PGS subtitle demuxer - ffprobe -show_pixel_formats option +- STL subtitle demuxer and decoder version 2.4: - Icecast protocol diff --git a/doc/general.texi b/doc/general.texi index 2252f7b..681c5c9 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -1032,6 +1032,7 @@ performance on systems without hardware floating point support). @item RealText @tab @tab X @tab @tab X @item SAMI @tab @tab X @tab @tab X @item SSA/ASS @tab X @tab X @tab X @tab X +@item STL @tab @tab X @tab @tab X @item SubRip (SRT) @tab X @tab X @tab X @tab X @item SubViewer v1 @tab @tab X @tab @tab X @item SubViewer@tab @tab X @tab @tab X diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 3d70313..1a0072a 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -429,6 +429,7 @@ OBJS-$(CONFIG_SONIC_LS_ENCODER)+= sonic.o OBJS-$(CONFIG_SP5X_DECODER)+= sp5xdec.o OBJS-$(CONFIG_SRT_DECODER) += srtdec.o ass.o OBJS-$(CONFIG_SRT_ENCODER) += srtenc.o ass_split.o +OBJS-$(CONFIG_STL_DECODER) += textdec.o ass.o OBJS-$(CONFIG_SUBRIP_DECODER) += srtdec.o ass.o OBJS-$(CONFIG_SUBRIP_ENCODER) += srtenc.o ass_split.o OBJS-$(CONFIG_SUBVIEWER1_DECODER) += textdec.o ass.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 7650543..d08abd8 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -490,6 +490,7 @@ void avcodec_register_all(void) REGISTER_DECODER(REALTEXT, realtext); REGISTER_DECODER(SAMI, sami); REGISTER_ENCDEC (SRT, srt); +REGISTER_DECODER(STL, stl); REGISTER_ENCDEC (SUBRIP,subrip); REGISTER_DECODER(SUBVIEWER, subviewer); REGISTER_DECODER(SUBVIEWER1,subviewer1); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index a5a651a..acd9b03 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -509,6 +509,7 @@ enum AVCodecID { AV_CODEC_ID_JACOSUB= MKBETAG('J','S','U','B'), AV_CODEC_ID_SAMI = MKBETAG('S','A','M','I'), AV_CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'), +AV_CODEC_ID_STL= MKBETAG('S','p','T','L'), AV_CODEC_ID_SUBVIEWER1 = MKBETAG('S','b','V','1'), AV_CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'), AV_CODEC_ID_SUBRIP = MKBETAG('S','R','i','p'), diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 9e9728b..eeb4505 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -2635,6 +2635,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .props = AV_CODEC_PROP_TEXT_SUB, }, { +.id= AV_CODEC_ID_STL, +.type = AVMEDIA_TYPE_SUBTITLE, +.name = stl, +.long_name = NULL_IF_CONFIG_SMALL(Spruce subtitle format), +.props = AV_CODEC_PROP_TEXT_SUB, +}, +{ .id= AV_CODEC_ID_SUBVIEWER1, .type = AVMEDIA_TYPE_SUBTITLE, .name = subviewer1, diff --git a/libavcodec/textdec.c b/libavcodec/textdec.c index ba189e8..aa84257 100644 --- a/libavcodec/textdec.c +++ b/libavcodec/textdec.c @@ -88,7 +88,7 @@ AVCodec ff_text_decoder = { }; #endif -#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER +#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER || CONFIG_STL_DECODER static int linebreak_init(AVCodecContext *avctx) { @@ -113,6 +113,22 @@ AVCodec ff_vplayer_decoder = { }; #endif +#if CONFIG_STL_DECODER +#define stl_options options +DECLARE_CLASS(stl); + +AVCodec ff_stl_decoder = { +.name = stl, +.long_name = NULL_IF_CONFIG_SMALL(Spruce subtitle format), +.priv_data_size = sizeof(TextContext), +.type = AVMEDIA_TYPE_SUBTITLE, +.id = AV_CODEC_ID_STL, +.decode = text_decode_frame, +.init = linebreak_init, +.priv_class = stl_decoder_class, +}; +#endif + #if CONFIG_PJS_DECODER #define pjs_options options DECLARE_CLASS(pjs); diff --git a/libavformat/Makefile b/libavformat/Makefile index 86064ea..a64e7ad 100644 --- a/libavformat/Makefile +++
Re: [FFmpeg-devel] Patch for Cast128 algorithm implementation
I have updated the changes as requested . Please look into the attached patch and let me know if there is anything else you wish me to change. Thanks , Supraja On Sun, Oct 12, 2014 at 8:38 PM, Giorgio Vazzana mywin...@gmail.com wrote: 2014-10-12 13:59 GMT+02:00 supraja reddy supraja0...@gmail.com: Hello , I , Supraja , am interested to work with ffmpeg as a part of OPW internship . As a part of the qualification task , I have taken up the implementation of Cast 128 algorithm implementation . I have written the code for the same and have attached the patch of the same with this mail . It is currently written for ecb mode . It takes keysizes of 40 , 80 and 128 bits for now . Please let me know if there are any further changes or suggestions . Hello, thanks for your patch! Please make sure to run tools/patcheck as Michael suggested and fix the reported problems. Some preliminary comments below, hopefully I'll have more time to test/review the patch in the following days. From b7aab16b09db2a3ca16144221f1516f7fec8a7a2 Mon Sep 17 00:00:00 2001 From: Myra supraja0...@gmail.com Make sure your name and email address are configured correctly in git. Date: Sun, 12 Oct 2014 11:39:24 +0530 Subject: [PATCH] Added cast128 algorithm for ecb mode Signed-off-by: Myra supraja0...@gmail.com --- libavutil/Makefile | 3 + libavutil/cast5.c | 521 + libavutil/cast5.h | 37 3 files changed, 561 insertions(+) create mode 100644 libavutil/cast5.c create mode 100644 libavutil/cast5.h diff --git a/libavutil/Makefile b/libavutil/Makefile index 65c6b53..22d345e 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -15,6 +15,7 @@ HEADERS = adler32.h \ bprint.h \ bswap.h \ buffer.h \ + cast5.c \ channel_layout.h \ common.h \ cpu.h \ @@ -82,6 +83,7 @@ OBJS = adler32.o \ blowfish.o \ bprint.o \ buffer.o \ + cast5.o \ You need to add one more space after cast5.o to align the '\'. channel_layout.o \ cpu.o \ crc.o \ @@ -151,6 +153,7 @@ TESTPROGS = adler32 \ base64 \ blowfish \ bprint \ +cast5 \ Same here, one more space is needed. cpu \ crc \ des \ diff --git a/libavutil/cast5.c b/libavutil/cast5.c new file mode 100644 index 000..ca7200c --- /dev/null +++ b/libavutil/cast5.c @@ -0,0 +1,521 @@ +#include cast5.h +#include common.h +#include intreadwrite.h +#include timer.h I don't think we need timer.h +/* + * An implementation of the CAST128 algorithm Maybe add a note mentioning the RFC2144. + * Copyright (c) 2014 Supraja Meedinti + * + * 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 + */ + +#define IA(x) ((x24) 0xff) +#define IB(x) ((x16) 0xff) +#define IC(x) ((x8) 0xff) +#define ID(x) (x 0xff) I'd also suggest to add a macro for circular left shift (left rotation) and use it throughout the code: #define LR(x, c) ((x) (c) | (x) (32 - (c))) + +typedef struct AVCAST5 { +uint32_t Km[17]; +uint32_t Kr[17]; +int rounds; +} AVCAST5; + + + +static uint32_t func(uint32_t D, uint32_t Km, uint32_t Kr, int rnum) +{ +uint32_t I,t,val; +switch(rnum%3){ +case 0: +t=(Km-D); +I=(tKr)|(t(32-Kr)); +val=((S1[IA(I)]+S2[IB(I)])^S3[IC(I)])-S4[ID(I)]; +break; You can probably eliminate t, something like: I = LR(Km - D, Kr); +case 1: +t=Km+D; +I=(tKr)|(t(32-Kr)); +val=((S1[IA(I)]^S2[IB(I)])-S3[IC(I)])+S4[ID(I)]; +break; +case 2: +t=(Km^D); +I=(tKr)|(t(32-Kr)); +val=((S1[IA(I)]-S2[IB(I)])+S3[IC(I)])^S4[ID(I)]; +
Re: [FFmpeg-devel] [PATCH] Added STL demuxer and decoder
On Thu, 16 Oct 2014 00:37:28 +0530 Eejya Singh singh.ee...@gmail.com wrote: --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -433,6 +433,7 @@ OBJS-$(CONFIG_VOBSUB_DEMUXER)+= subtitles.o # mpeg demuxer is in the OBJS-$(CONFIG_VOC_DEMUXER) += vocdec.o voc.o OBJS-$(CONFIG_VOC_MUXER) += vocenc.o voc.o OBJS-$(CONFIG_VPLAYER_DEMUXER) += vplayerdec.o subtitles.o +OBJS-$(CONFIG_STL_DEMUXER) += stldec.o subtitles.o OBJS-$(CONFIG_VQF_DEMUXER) += vqf.o OBJS-$(CONFIG_W64_DEMUXER) += wavdec.o w64.o pcm.o OBJS-$(CONFIG_W64_MUXER) += wavenc.o w64.o diff --git i think this should be in alphabetical order ^ :) -compn ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Added STL demuxer and decoder
I'll fix that. Thanks for pointing that out :) On Thu, Oct 16, 2014 at 1:43 AM, compn te...@mi.rr.com wrote: On Thu, 16 Oct 2014 00:37:28 +0530 Eejya Singh singh.ee...@gmail.com wrote: --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -433,6 +433,7 @@ OBJS-$(CONFIG_VOBSUB_DEMUXER)+= subtitles.o # mpeg demuxer is in the OBJS-$(CONFIG_VOC_DEMUXER) += vocdec.o voc.o OBJS-$(CONFIG_VOC_MUXER) += vocenc.o voc.o OBJS-$(CONFIG_VPLAYER_DEMUXER) += vplayerdec.o subtitles.o +OBJS-$(CONFIG_STL_DEMUXER) += stldec.o subtitles.o OBJS-$(CONFIG_VQF_DEMUXER) += vqf.o OBJS-$(CONFIG_W64_DEMUXER) += wavdec.o w64.o pcm.o OBJS-$(CONFIG_W64_MUXER) += wavenc.o w64.o diff --git i think this should be in alphabetical order ^ :) -compn ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- Eejya Singh, 2nd year undergraduate, Computer Science, BITS Pilani Goa Campus ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Added STL demuxer and decoder
From: Eejya singh.ee...@gmail.com --- Changelog| 1 + doc/general.texi | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/avcodec.h | 1 + libavcodec/codec_desc.c | 7 +++ libavcodec/textdec.c | 18 ++- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/stldec.c | 136 +++ 10 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 libavformat/stldec.c diff --git a/Changelog b/Changelog index b59058b..9626d4a 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ version next: - HEVC/H.265 RTP payload format (draft v6) packetizer - SUP/PGS subtitle demuxer - ffprobe -show_pixel_formats option +- STL subtitle demuxer and decoder version 2.4: - Icecast protocol diff --git a/doc/general.texi b/doc/general.texi index 2252f7b..681c5c9 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -1032,6 +1032,7 @@ performance on systems without hardware floating point support). @item RealText @tab @tab X @tab @tab X @item SAMI @tab @tab X @tab @tab X @item SSA/ASS @tab X @tab X @tab X @tab X +@item STL @tab @tab X @tab @tab X @item SubRip (SRT) @tab X @tab X @tab X @tab X @item SubViewer v1 @tab @tab X @tab @tab X @item SubViewer@tab @tab X @tab @tab X diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 3d70313..1a0072a 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -429,6 +429,7 @@ OBJS-$(CONFIG_SONIC_LS_ENCODER)+= sonic.o OBJS-$(CONFIG_SP5X_DECODER)+= sp5xdec.o OBJS-$(CONFIG_SRT_DECODER) += srtdec.o ass.o OBJS-$(CONFIG_SRT_ENCODER) += srtenc.o ass_split.o +OBJS-$(CONFIG_STL_DECODER) += textdec.o ass.o OBJS-$(CONFIG_SUBRIP_DECODER) += srtdec.o ass.o OBJS-$(CONFIG_SUBRIP_ENCODER) += srtenc.o ass_split.o OBJS-$(CONFIG_SUBVIEWER1_DECODER) += textdec.o ass.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 7650543..d08abd8 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -490,6 +490,7 @@ void avcodec_register_all(void) REGISTER_DECODER(REALTEXT, realtext); REGISTER_DECODER(SAMI, sami); REGISTER_ENCDEC (SRT, srt); +REGISTER_DECODER(STL, stl); REGISTER_ENCDEC (SUBRIP,subrip); REGISTER_DECODER(SUBVIEWER, subviewer); REGISTER_DECODER(SUBVIEWER1,subviewer1); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index a5a651a..acd9b03 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -509,6 +509,7 @@ enum AVCodecID { AV_CODEC_ID_JACOSUB= MKBETAG('J','S','U','B'), AV_CODEC_ID_SAMI = MKBETAG('S','A','M','I'), AV_CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'), +AV_CODEC_ID_STL= MKBETAG('S','p','T','L'), AV_CODEC_ID_SUBVIEWER1 = MKBETAG('S','b','V','1'), AV_CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'), AV_CODEC_ID_SUBRIP = MKBETAG('S','R','i','p'), diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 9e9728b..eeb4505 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -2635,6 +2635,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .props = AV_CODEC_PROP_TEXT_SUB, }, { +.id= AV_CODEC_ID_STL, +.type = AVMEDIA_TYPE_SUBTITLE, +.name = stl, +.long_name = NULL_IF_CONFIG_SMALL(Spruce subtitle format), +.props = AV_CODEC_PROP_TEXT_SUB, +}, +{ .id= AV_CODEC_ID_SUBVIEWER1, .type = AVMEDIA_TYPE_SUBTITLE, .name = subviewer1, diff --git a/libavcodec/textdec.c b/libavcodec/textdec.c index ba189e8..aa84257 100644 --- a/libavcodec/textdec.c +++ b/libavcodec/textdec.c @@ -88,7 +88,7 @@ AVCodec ff_text_decoder = { }; #endif -#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER +#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER || CONFIG_STL_DECODER static int linebreak_init(AVCodecContext *avctx) { @@ -113,6 +113,22 @@ AVCodec ff_vplayer_decoder = { }; #endif +#if CONFIG_STL_DECODER +#define stl_options options +DECLARE_CLASS(stl); + +AVCodec ff_stl_decoder = { +.name = stl, +.long_name = NULL_IF_CONFIG_SMALL(Spruce subtitle format), +.priv_data_size = sizeof(TextContext), +.type = AVMEDIA_TYPE_SUBTITLE, +.id = AV_CODEC_ID_STL, +.decode = text_decode_frame, +.init = linebreak_init, +.priv_class = stl_decoder_class, +}; +#endif + #if CONFIG_PJS_DECODER #define pjs_options options DECLARE_CLASS(pjs); diff --git a/libavformat/Makefile b/libavformat/Makefile index 86064ea..62dc41c 100644 --- a/libavformat/Makefile +++
Re: [FFmpeg-devel] Patch for Cast128 algorithm implementation
Hello , I hadn't rebased my branch . This is after the sync . Apologies for the error . Thanks , Supraja On Thu, Oct 16, 2014 at 12:50 AM, supraja reddy supraja0...@gmail.com wrote: I have updated the changes as requested . Please look into the attached patch and let me know if there is anything else you wish me to change. Thanks , Supraja On Sun, Oct 12, 2014 at 8:38 PM, Giorgio Vazzana mywin...@gmail.com wrote: 2014-10-12 13:59 GMT+02:00 supraja reddy supraja0...@gmail.com: Hello , I , Supraja , am interested to work with ffmpeg as a part of OPW internship . As a part of the qualification task , I have taken up the implementation of Cast 128 algorithm implementation . I have written the code for the same and have attached the patch of the same with this mail . It is currently written for ecb mode . It takes keysizes of 40 , 80 and 128 bits for now . Please let me know if there are any further changes or suggestions . Hello, thanks for your patch! Please make sure to run tools/patcheck as Michael suggested and fix the reported problems. Some preliminary comments below, hopefully I'll have more time to test/review the patch in the following days. From b7aab16b09db2a3ca16144221f1516f7fec8a7a2 Mon Sep 17 00:00:00 2001 From: Myra supraja0...@gmail.com Make sure your name and email address are configured correctly in git. Date: Sun, 12 Oct 2014 11:39:24 +0530 Subject: [PATCH] Added cast128 algorithm for ecb mode Signed-off-by: Myra supraja0...@gmail.com --- libavutil/Makefile | 3 + libavutil/cast5.c | 521 + libavutil/cast5.h | 37 3 files changed, 561 insertions(+) create mode 100644 libavutil/cast5.c create mode 100644 libavutil/cast5.h diff --git a/libavutil/Makefile b/libavutil/Makefile index 65c6b53..22d345e 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -15,6 +15,7 @@ HEADERS = adler32.h \ bprint.h \ bswap.h \ buffer.h \ + cast5.c \ channel_layout.h \ common.h \ cpu.h \ @@ -82,6 +83,7 @@ OBJS = adler32.o \ blowfish.o \ bprint.o \ buffer.o \ + cast5.o \ You need to add one more space after cast5.o to align the '\'. channel_layout.o \ cpu.o \ crc.o \ @@ -151,6 +153,7 @@ TESTPROGS = adler32 \ base64 \ blowfish \ bprint \ +cast5 \ Same here, one more space is needed. cpu \ crc \ des \ diff --git a/libavutil/cast5.c b/libavutil/cast5.c new file mode 100644 index 000..ca7200c --- /dev/null +++ b/libavutil/cast5.c @@ -0,0 +1,521 @@ +#include cast5.h +#include common.h +#include intreadwrite.h +#include timer.h I don't think we need timer.h +/* + * An implementation of the CAST128 algorithm Maybe add a note mentioning the RFC2144. + * Copyright (c) 2014 Supraja Meedinti + * + * 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 + */ + +#define IA(x) ((x24) 0xff) +#define IB(x) ((x16) 0xff) +#define IC(x) ((x8) 0xff) +#define ID(x) (x 0xff) I'd also suggest to add a macro for circular left shift (left rotation) and use it throughout the code: #define LR(x, c) ((x) (c) | (x) (32 - (c))) + +typedef struct AVCAST5 { +uint32_t Km[17]; +uint32_t Kr[17]; +int rounds; +} AVCAST5; + + + +static uint32_t func(uint32_t D, uint32_t Km, uint32_t Kr, int rnum) +{ +uint32_t I,t,val; +switch(rnum%3){ +case 0: +t=(Km-D); +I=(tKr)|(t(32-Kr)); +val=((S1[IA(I)]+S2[IB(I)])^S3[IC(I)])-S4[ID(I)]; +break; You can probably eliminate t, something like: I = LR(Km - D, Kr); +case 1: +t=Km+D; +I=(tKr)|(t(32-Kr)); +val=((S1[IA(I)]^S2[IB(I)])-S3[IC(I)])+S4[ID(I)]; +break; +case 2: +t=(Km^D); +
Re: [FFmpeg-devel] [PATCH] mpegts: add the judgement if a new program is ctreated successfully
On Wed, 15 Oct 2014, di1028...@samsung.com wrote: From: Di Wu di1028...@samsung.com Add the judement after create a new program to avoid segment fault. Signed-off-by: Di Wu di1028...@samsung.com --- libavformat/mpegts.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 8808269..cc0ce79 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1925,8 +1925,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len } else { MpegTSFilter *fil = ts-pids[pmt_pid]; program = av_new_program(ts-stream, sid); -program-program_num = sid; -program-pmt_pid = pmt_pid; +if (program) { +program-program_num = sid; +program-pmt_pid = pmt_pid; +} if (fil) if ( fil-type != MPEGTS_SECTION || fil-pid != pmt_pid LGTM, thanks. Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCHv2] ffplay: update documentation
Thank you for all your feedback, apparently there was some confusion because I have used set both as a synonym to enabled and as an imperative. I have changed all occurences of it to enabled or use, so hopefully it will be more clear now. I have also done minor modifications in the text mostly based on your comments. Here is v2 of the patch. --- Signed-off-by: Marton Balint c...@passwd.hu --- doc/ffplay.texi | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/doc/ffplay.texi b/doc/ffplay.texi index 9bb040e..3c85417 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -37,10 +37,14 @@ Force displayed height. Set frame size (WxH or abbreviation), needed for videos which do not contain a header with the frame size like raw YUV. This option has been deprecated in favor of private options, try -video_size. +@item -fs +Start in fullscreen mode. @item -an Disable audio. @item -vn Disable video. +@item -sn +Disable subtitles. @item -ss @var{pos} Seek to a given position in seconds. @item -t @var{duration} @@ -113,9 +117,6 @@ explicitly disable it you need to specify @code{-nostats}. Non-spec-compliant optimizations. @item -genpts Generate pts. -@item -rtp_tcp -Force RTP/TCP protocol usage instead of RTP/UDP. It is only meaningful -if you are streaming with the RTSP protocol. @item -sync @var{type} Set the master clock to audio (@code{type=audio}), video (@code{type=video}) or external (@code{type=ext}). Default is audio. The @@ -124,7 +125,8 @@ players use audio as master clock, but in some cases (streaming or high quality broadcast) it is necessary to change that. This option is mainly used for debugging purposes. @item -threads @var{count} -Set the thread count. +Set the thread count. By default, @command{ffplay} automatically detects a +suitable number of threads to use. @item -ast @var{audio_stream_number} Select the desired audio stream number, counting from 0. The number refers to the list of all the input audio streams. If it is greater @@ -162,8 +164,20 @@ Force a specific video decoder. Force a specific subtitle decoder. @item -autorotate -Automatically rotate the video according to presentation metadata. Set by -default, use -noautorotate to disable. +Automatically rotate the video according to presentation metadata. Enabled by +default, use @option{-noautorotate} to disable it. + +@item -framedrop +Drop video frames if video is out of sync. Enabled by default if the master +clock is not set to video. Use this option to enable frame dropping for all +master clock sources, use @option{-noframedrop} to disable it. + +@item -infbuf +Do not limit the input buffer size, read as much data as possible from the +input as soon as possible. Enabled by default for realtime streams, where data +may be dropped if not read in time. Use this option to enable infinite buffers +for all inputs, use @option{-noinfbuf} to disable it. + @end table @section While playing -- 1.8.4.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Patch for Cast128 algorithm implementation
Extremely sorry for resending the patch . There was a trailing whitespace which I hadn't corrected . All the changes are done . Please let me if any changes needed further . Thanks , Supraja On Thu, Oct 16, 2014 at 2:28 AM, supraja reddy supraja0...@gmail.com wrote: Hello , I hadn't rebased my branch . This is after the sync . Apologies for the error . Thanks , Supraja On Thu, Oct 16, 2014 at 12:50 AM, supraja reddy supraja0...@gmail.com wrote: I have updated the changes as requested . Please look into the attached patch and let me know if there is anything else you wish me to change. Thanks , Supraja On Sun, Oct 12, 2014 at 8:38 PM, Giorgio Vazzana mywin...@gmail.com wrote: 2014-10-12 13:59 GMT+02:00 supraja reddy supraja0...@gmail.com: Hello , I , Supraja , am interested to work with ffmpeg as a part of OPW internship . As a part of the qualification task , I have taken up the implementation of Cast 128 algorithm implementation . I have written the code for the same and have attached the patch of the same with this mail . It is currently written for ecb mode . It takes keysizes of 40 , 80 and 128 bits for now . Please let me know if there are any further changes or suggestions . Hello, thanks for your patch! Please make sure to run tools/patcheck as Michael suggested and fix the reported problems. Some preliminary comments below, hopefully I'll have more time to test/review the patch in the following days. From b7aab16b09db2a3ca16144221f1516f7fec8a7a2 Mon Sep 17 00:00:00 2001 From: Myra supraja0...@gmail.com Make sure your name and email address are configured correctly in git. Date: Sun, 12 Oct 2014 11:39:24 +0530 Subject: [PATCH] Added cast128 algorithm for ecb mode Signed-off-by: Myra supraja0...@gmail.com --- libavutil/Makefile | 3 + libavutil/cast5.c | 521 + libavutil/cast5.h | 37 3 files changed, 561 insertions(+) create mode 100644 libavutil/cast5.c create mode 100644 libavutil/cast5.h diff --git a/libavutil/Makefile b/libavutil/Makefile index 65c6b53..22d345e 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -15,6 +15,7 @@ HEADERS = adler32.h \ bprint.h \ bswap.h \ buffer.h \ + cast5.c \ channel_layout.h \ common.h \ cpu.h \ @@ -82,6 +83,7 @@ OBJS = adler32.o \ blowfish.o \ bprint.o \ buffer.o \ + cast5.o \ You need to add one more space after cast5.o to align the '\'. channel_layout.o \ cpu.o \ crc.o \ @@ -151,6 +153,7 @@ TESTPROGS = adler32 \ base64 \ blowfish \ bprint \ +cast5 \ Same here, one more space is needed. cpu \ crc \ des \ diff --git a/libavutil/cast5.c b/libavutil/cast5.c new file mode 100644 index 000..ca7200c --- /dev/null +++ b/libavutil/cast5.c @@ -0,0 +1,521 @@ +#include cast5.h +#include common.h +#include intreadwrite.h +#include timer.h I don't think we need timer.h +/* + * An implementation of the CAST128 algorithm Maybe add a note mentioning the RFC2144. + * Copyright (c) 2014 Supraja Meedinti + * + * 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 + */ + +#define IA(x) ((x24) 0xff) +#define IB(x) ((x16) 0xff) +#define IC(x) ((x8) 0xff) +#define ID(x) (x 0xff) I'd also suggest to add a macro for circular left shift (left rotation) and use it throughout the code: #define LR(x, c) ((x) (c) | (x) (32 - (c))) + +typedef struct AVCAST5 { +uint32_t Km[17]; +uint32_t Kr[17]; +int rounds; +} AVCAST5; + + + +static uint32_t func(uint32_t D, uint32_t Km, uint32_t Kr, int rnum) +{ +uint32_t I,t,val; +switch(rnum%3){ +case 0: +t=(Km-D); +I=(tKr)|(t(32-Kr)); +val=((S1[IA(I)]+S2[IB(I)])^S3[IC(I)])-S4[ID(I)]; +
Re: [FFmpeg-devel] PATH :wmv2 Limit the mvx and mvy to be integer in some condition
Hi On Wed, Oct 15, 2014 at 11:44:18AM +, Di Wu wrote: Hi : I have created a patch, but I'm not sure if the patch is correct because I don't have the spec of wmv2. The following code which is in ff_mspel_motion function seems to limit the mvx and mvy to be integer to make sure the prediction right and to void reading overflow. But I'm not sure, maybe this is just specified by the spec of wmv2. if (src_x = -16 || src_x = s-width) dxy = ~3; if (src_y = -16 || src_y = s-height) dxy = ~4; If the goal of the up code is the former one, the following code can play the same role, So I'm confused. if (src_x 1 || src_y 1 || src_x + 17 = s-h_edge_pos || src_y + h + 1 = v_edge_pos) { s-vdsp.emulated_edge_mc(s-edge_emu_buffer, ptr - 1 - s-linesize, s-linesize, s-linesize, 19, 19, src_x - 1, src_y - 1, s-h_edge_pos, s-v_edge_pos); ptr = s-edge_emu_buffer + 1 + s-linesize; emu = 1; } If this code is used to make sure the prediction right and to void reading overflow, I think my patch should applied or just remove this code. My patch is attached, please check it. i dont have wmv2 specs and i suspect noone outside MS and outside some NDA has. So to awnser if and where cliping of MVs is needed/correct a differnt method has to be used. Maybe you could hack the motion estimation code to produce many MVs that fall at the cliping boundary and encode some test material and then check how it looks when decoded by the binary decoder from MS and ours with various cliping positions [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] mpegts: add the judgement if a new program is ctreated successfully
On Wed, Oct 15, 2014 at 11:05:29PM +0200, Marton Balint wrote: On Wed, 15 Oct 2014, di1028...@samsung.com wrote: From: Di Wu di1028...@samsung.com Add the judement after create a new program to avoid segment fault. Signed-off-by: Di Wu di1028...@samsung.com --- libavformat/mpegts.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 8808269..cc0ce79 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1925,8 +1925,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len } else { MpegTSFilter *fil = ts-pids[pmt_pid]; program = av_new_program(ts-stream, sid); -program-program_num = sid; -program-pmt_pid = pmt_pid; +if (program) { +program-program_num = sid; +program-pmt_pid = pmt_pid; +} if (fil) if ( fil-type != MPEGTS_SECTION || fil-pid != pmt_pid LGTM, thanks. applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are best at talking, realize last or never when they are wrong. 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/mov.c: Allocate buffer in case of long metadata entries.
On Mon, Oct 13, 2014 at 09:40:42AM +0200, Thilo Borgmann wrote: Am 11.10.14 16:19, schrieb Nicolas George: [...] all remarks applied. -Thilo mov.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) cabb6e51de7f9329603561773f209b6a948478ce 0001-lavf-mov.c-Allocate-buffer-in-case-of-long-metadata-.patch From 5a14ef97ffc7d82dea5644c736e6dc2de2079e89 Mon Sep 17 00:00:00 2001 From: Thilo Borgmann thilo.borgm...@mail.de Date: Mon, 13 Oct 2014 09:36:17 +0200 Subject: [PATCH] lavf/mov.c: Allocate buffer in case of long metadata entries. --- libavformat/mov.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 4ff46dd..8d6d074 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -261,7 +261,9 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) #ifdef MOV_EXPORT_ALL_METADATA char tmp_key[5]; #endif -char str[1024], key2[16], language[4] = {0}; +char str_small[1024], key2[16], language[4] = {0}; +char *str = str_small; +char *pstr = NULL; const char *key = NULL; uint16_t langcode = 0; uint32_t data_type = 0, str_size; @@ -358,13 +360,17 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (atom.size 0) return AVERROR_INVALIDDATA; -str_size = FFMIN3(sizeof(str)-1, str_size, atom.size); - if (parse) parse(c, pb, str_size, key); else { +if (str_size sizeof(str_small)-1) { // allocate buffer for long data field +pstr = str = av_malloc(str_size); +if (!pstr) +return AVERROR(ENOMEM); +} + if (data_type == 3 || (data_type == 0 (langcode 0x400 || langcode == 0x7fff))) { // MAC Encoded -mov_read_mac_string(c, pb, str_size, str, sizeof(str)); +mov_read_mac_string(c, pb, str_size, str, str_size); this seems to store UTF8, which can require more space than str_size [...] -- 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
[FFmpeg-devel] Fix bug for POWER LE: libswscale/ppc/swscale_altivec.c
Hi, I created a patch to fix the bug in file libswscale/ppc/swscale_altivec.c for POWER LE. The fixed functions including 'hScale_altivec_real()', 'yuv2planeX_16_altivec()', and 'yuv2planeX_8()'. The fate test result can be found on http://fate.ffmpeg.org/ by search ibmcrl, also attached here to facilitate the review: The passed test cases increased from 1677/2176 to 1841/2187. The patch is attached. Thanks. Rong Yan -- The world has enough for everyone's need, but not enough for everyone's greed. 0001-libswscale-ppc-swscale_altivec.c-fix-hScale_altivec_.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] patch: fix buf in configure to ensure theHAVE_VSX is only enabled when HAVE_ALTIVECT is enabled
Hi, Since the code HAVE_VSX covered is part of the altivec implementation, but not a independent implementaiton for all the code covered by macro HAVE_ALTIVEC. If HAVE_ALTIVEC is disabled, but only HAVE_VSX is enabled, the code will crash. Thanks. Rong Yan -- The world has enough for everyone's need, but not enough for everyone's greed. -- Original -- From: michaelni;michae...@gmx.at; Date: Tue, Oct 14, 2014 11:10 PM To: FFmpeg development discussions and patchesffmpeg-devel@ffmpeg.org; rongyanrongyan...@foxmail.com; Subject: Re: [FFmpeg-devel] patch: fix buf in configure to ensure theHAVE_VSX is only enabled when HAVE_ALTIVECT is enabled On Mon, Oct 13, 2014 at 04:14:57PM +0800, rongyan wrote: Reimar, HAVE_VSX is used to make PPC ALTIVEC code successfully running in LE. Yes, we can add some comment to the configure. i belive the question reimar had was why VSX is not enabled when altivec is disabled ? or the same from another viewpoint if VSX implies altivec [...] Sorry if my question makes no sense (I am fairly clueless about little-endian PPC), but why is it necessary to disable vsx if altivec is disabled? It would be good to add that e.g. as a comment to configure (unless it's some obvious reason I missed). [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In a rich man's house there is no place to spit but his face. -- Diogenes of Sinope ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Patch for Cast128 algorithm implementation
On Thu, Oct 16, 2014 at 03:25:42AM +0530, supraja reddy wrote: Extremely sorry for resending the patch . There was a trailing whitespace which I hadn't corrected . All the changes are done . Please let me if any changes needed further . [...] diff --git a/libavutil/cast5.c b/libavutil/cast5.c new file mode 100644 index 000..89b065d --- /dev/null +++ b/libavutil/cast5.c @@ -0,0 +1,535 @@ +/* + * An implementation of the CAST128 algorithm as mentioned in RFC2144 + * Copyright (c) 2014 Supraja Meedinti + * + * 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 cast5.h +#include common.h +#include intreadwrite.h + +#define IA(x) (((x)24) 0xff) 0xff isnt needed here [...] +#includestdio.h +#includestdlib.h +#includelog.h these should be under the #ifdef TEST + +#ifdef TEST +int main(int argc, char** argv) +{ +AVCAST5 cs; +static uint8_t Key[3][16]={{0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78,0x23,0x45,0x67,0x89,0x34,0x56,0x78,0x9a}, +{0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78,0x23,0x45}, +{0x01,0x23,0x45,0x67,0x12}}; +uint8_t rpt[8]={0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}; +uint8_t rct[3][8]={{0x23,0x8b,0x4f,0xe5,0x84,0x7e,0x44,0xb2}, +{0xeb,0x6a,0x71,0x1a,0x2c,0x02,0x27,0x1b}, +{0x7a,0xc8,0x16,0xd1,0x6e,0x9b,0x30,0x2e}}; all 3 of these arrays can be static const +int i,err=0; +uint8_t temp[8]; +av_log_set_level(AV_LOG_DEBUG); shouldnt be needed +av_cast5_init(cs,Key[0],128); +av_cast5_crypt(cs,temp,rpt,1,0); +for (i=0;i8;i++){ +if (rct[0][i]!=temp[i]){ +av_log(NULL,AV_LOG_ERROR,%d %02x %02x\n,i,rct[0][i],temp[i]); +err=1; +} +} +av_cast5_crypt(cs,temp,rct[0],1,1); +for (i=0;i8;i++){ +if (rpt[i]!=temp[i]){ +av_log(NULL,AV_LOG_ERROR,%d %02x %02x\n,i,rpt[i],temp[i]); +err=1; +} +} +av_cast5_init(cs,Key[1],80); +av_cast5_crypt(cs,temp,rpt,1,0); +for (i=0;i8;i++){ +if (rct[1][i]!=temp[i]){ +av_log(NULL,AV_LOG_ERROR,%d %02x %02x\n,i,rct[1][i],temp[i]); +err=1; +} +} +av_cast5_crypt(cs,temp,rct[1],1,1); +for (i=0;i8;i++){ +if (rpt[i]!=temp[i]){ +av_log(NULL,AV_LOG_ERROR,%d %02x %02x\n,i,rpt[i],temp[i]); +err=1; +} +} +av_cast5_init(cs,Key[2],40); +av_cast5_crypt(cs,temp,rpt,1,0); +for (i=0;i8;i++){ +if (rct[2][i]!=temp[i]){ +av_log(NULL,AV_LOG_ERROR,%d %02x %02x\n,i,rct[2][i],temp[i]); +err=1; +} +} +av_cast5_crypt(cs,temp,rct[2],1,1); +for (i=0;i8;i++){ +if (rpt[i]!=temp[i]){ +av_log(NULL,AV_LOG_ERROR,%d %02x %02x\n,i,rpt[i],temp[i]); +err=1; +} +} this looks like it could be a loop that runs 3 iterations each for a different keysize, should be simpler also a test that enciphers and deciphers a larger amount of random data could be added +return err; +} +#endif diff --git a/libavutil/cast5.h b/libavutil/cast5.h new file mode 100644 index 000..d151031 --- /dev/null +++ b/libavutil/cast5.h @@ -0,0 +1,60 @@ +/* + * An implementation of the CAST128 algorithm as mentioned in RFC2144 + * Copyright (c) 2014 Supraja Meedinti + * + * 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 + */ + +#ifndef AVUTIL_CAST5_H +#define AVUTIL_CAST5_H + +#include stdint.h +