Re: [FFmpeg-devel] [PATCH] doc/APIchanges: attempt to split releases

2014-09-14 Thread wm4
On Sun, 14 Sep 2014 08:56:02 +0200
Clément Bœsch  wrote:

> Based on several git show origin/release/X.Y:doc/APIchanges.
> ---
>  doc/APIchanges | 42 +-
>  1 file changed, 37 insertions(+), 5 deletions(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 1a0ba78..eaac107 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -15,6 +15,9 @@ libavutil: 2014-08-09
>  
>  API changes, most recent first:
>  
> +
> + 8< - FFmpeg 2.4 was cut here  8< -
> +
>  2014-08-xx - xxx - lavc 56.1.0 - avcodec.h
>Add AV_PKT_DATA_STEREO3D to export container-level stereo3d information.
>  
> @@ -102,7 +105,6 @@ API changes, most recent first:
>Typically, this means you will do 'AVProbeData pd = { 0 };' instead of
>'AVProbeData pd;'.
>  
> -
>  2014-07-29 - 31e0b5d / 69e7336 - lavu 52.92.100 / 53.19.0 - avstring.h
>Make name matching function from lavf public as av_match_name().
>  
> @@ -119,6 +121,9 @@ API changes, most recent first:
>  2014-07-23 - 8a4c086 - lavf 55.49.100 - avio.h
>Add avio_read_to_bprint()
>  
> +
> + 8< - FFmpeg 2.3 was cut here  8< -
> +
>  2014-07-14 - 62227a7 - lavf 55.47.100 - avformat.h
>Add av_stream_get_parser()
>  
> @@ -292,6 +297,9 @@ API changes, most recent first:
>Give the name AVPacketSideData to the previously anonymous struct used for
>AVPacket.side_data.
>  
> +
> + 8< - FFmpeg 2.2 was cut here  8< -
> +
>  2014-03-18 - 37c07d4 - lsws 2.5.102
>Make gray16 full-scale.
>  
> @@ -434,6 +442,9 @@ API changes, most recent first:
>  2013-10-31 - 78265fc / 28096e0 - lavu 52.49.100 / 52.17.0 - frame.h
>Add AVFrame.flags and AV_FRAME_FLAG_CORRUPT.
>  
> +
> + 8< - FFmpeg 2.1 was cut here  8< -
> +
>  2013-10-27 - dbe6f9f - lavc 55.39.100 - avcodec.h
>Add CODEC_CAP_DELAY support to avcodec_decode_subtitle2.
>  
> @@ -506,6 +517,9 @@ API changes, most recent first:
>Add avcodec_chroma_pos_to_enum()
>Add avcodec_enum_to_chroma_pos()
>  
> +
> + 8< - FFmpeg 2.0 was cut here  8< -
> +
>  2013-07-03 - 838bd73 - lavfi 3.78.100 - avfilter.h
>Deprecate avfilter_graph_parse() in favor of the equivalent
>avfilter_graph_parse_ptr().
> @@ -578,6 +592,9 @@ API changes, most recent first:
>  2013-03-17 - 7aa9af5 - lavu 52.20.100 - opt.h
>Add AV_OPT_TYPE_VIDEO_RATE value to AVOptionType enum.
>  
> +
> + 8< - FFmpeg 1.2 was cut here  8< -
> +
>  2013-03-07 - 9767ec6 - lavu 52.18.100 - avstring.h,bprint.h
>Add av_escape() and av_bprint_escape() API.
>  
> @@ -590,6 +607,9 @@ API changes, most recent first:
>  2013-01-01 - 2eb2e17 - lavfi 3.34.100
>Add avfilter_get_audio_buffer_ref_from_arrays_channels.
>  
> +
> + 8< - FFmpeg 1.1 was cut here  8< -
> +
>  2012-12-20 - 34de47aa - lavfi 3.29.100 - avfilter.h
>Add AVFilterLink.channels, avfilter_link_get_channels()
>and avfilter_ref_get_channels().
> @@ -635,6 +655,9 @@ API changes, most recent first:
>Add LIBSWRESAMPLE_VERSION, LIBSWRESAMPLE_BUILD
>and LIBSWRESAMPLE_IDENT symbols.
>  
> +
> + 8< - FFmpeg 1.0 was cut here  8< -
> +
>  2012-09-06 - 29e972f - lavu 51.72.100 - parseutils.h
>Add av_small_strptime() time parsing function.
>  
> @@ -1053,6 +1076,9 @@ lavd 54.4.100 / 54.0.0, lavfi 3.5.0
>  2012-01-12 - b18e17e / 3167dc9 - lavfi 2.59.100 / 2.15.0
>Add a new installed header -- libavfilter/version.h -- with version macros.
>  
> +
> + 8< - FFmpeg 0.9 was cut here  8< -
> +
>  2011-12-08 - a502939 - lavfi 2.52.0
>Add av_buffersink_poll_frame() to buffersink.h.
>  
> @@ -1262,6 +1288,13 @@ lavd 54.4.100 / 54.0.0, lavfi 3.5.0
>  2011-06-28 - 5129336 - lavu 51.11.0 - avutil.h
>Define the AV_PICTURE_TYPE_NONE value in AVPictureType enum.
>  
> +
> + 8< - FFmpeg 0.7 was cut here  8< -
> +
> +
> +
> + 8< - FFmpeg 0.8 was cut here  8< -
> +
>  2011-06-19 - fd2c0a5 - lavfi 2.23.0 - avfilter.h
>Add layout negotiation fields and helper functions.
>  
> @@ -1939,6 +1972,9 @@ lavd 54.4.100 / 54.0.0, lavfi 3.5.0
>  2010-06-02 - 7e566bb - lavc 52.73.0 - av_get_codec_tag_string()
>Add av_get_codec_tag_string().
>  
> +
> + 8< - FFmpeg 0.6 was cut here  8< -
> +
>  2010-06-01 - 2b99142 - lsws 0.11.0 - convertPalette API
>Add sws_convertPalette8ToPacked32() and sws_convertPalette8ToPacked24().
>  
> @@ -1956,10 +1992,6 @@ lavd 54.4.100 / 54.0.0, lavfi 3.5.0
>  2010-05-09 - b6bc205 - lavfi 1.20.0 - AVFilterPicRef
>Add interlaced and top_field_first fields to AVFilterPicRef.
>  
> ---8<-
> -   0.6 branch was cut here
> ---

Re: [FFmpeg-devel] [PATCH] Changelog/ReleaseNotes: prepare for 2.4

2014-09-14 Thread Andreas Cadhalpun

On 14.09.2014 08:33, Clément Bœsch wrote:

From: Clément Bœsch 

---
  Changelog |  2 +-
  RELEASE_NOTES | 19 ++-
  2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/Changelog b/Changelog
index c5185f7..480a298 100644
--- a/Changelog
+++ b/Changelog
@@ -5,7 +5,7 @@ version :
  - Icecast protocol
  - ported lenscorrection filter from frei0r filter
  - large optimizations in dctdnoiz to make it usable
-- request Icecast metadata by default
+- ICY metadata are now requested by default with the HTTP protocol
  - support for using metadata in stream specifiers in fftools
  - LZMA compression support in TIFF decoder
  - support for H.261 RTP payload format (RFC 4587)
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index a8b19c5..b3b7f7b 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -2,13 +2,18 @@
   │ RELEASE NOTES for FFmpeg 2.4 "Fresnel" │
   └┘

-   The FFmpeg Project proudly presents FFmpeg 2.4 "Fresnel", ...
-   FFmpeg 2.4 is mostly API-, but not ABI-compatible with the previous major 
release.
-   This means that the code using our libraries needs to be rebuilt, but only 
minimal
-   source changes should be required, as described in the section 'API 
Information'.
+   The FFmpeg Project proudly presents FFmpeg 2.4 "Fresnel", just 2 months
+   after the release of 2.3. Since this wasn't a long time ago, the Changelog
+   is a bit small this time.


I think 'a bit short' would sound better.


+   The most important thing in this release is the major bump of the libraries.


Maybe expand that to 'major version bump'.


+   This means that this release is not ABI-compatible nor exactly API-


'neither ABI-compatible nor'

And I would replace 'exactly' with 'fully', because it is otherwise not 
exactly unambiguous. ;)



+   compatible. But on the other hand it is aligned with the Libav 11 release
+   series, and will as a result probably end up being maintained for a long
+   time.

 ┌┐
-   │ *  API Information │
+   │ 🔨  API Information │
 └┘

   FFmpeg 2.4 includes the following library versions:
@@ -28,6 +33,7 @@
   cause crashes, if it is not initialized.
 • Some deprecated functions were removed.
 • The avfilter_graph_parse function was made compatible with Libav.
+   • The matroska demuxer now outputs verbatim ASS packets

 ^
There should be a dot at the end.


   Please refer to the doc/APIChanges file for more information.

^
You didn't change this line, but there is a typo, as the file is called 
APIchanges with lower-case 'c'.



@@ -41,6 +47,8 @@

  • Icecast protocol
  • API for live metadata updates through event flags.

   ^
This dot is inconsistent with the other points in this list.


+• UTF-16 support in text subtitles formats
+• the ASS muxer now honor re-order the Dialogue events properly

 ┌┐
 │ libavfilter│
@@ -66,3 +74,4 @@
• libmodplug is now detected through pkg-config
• HTML documentation generation through texi2html is deprecated in
  favor of makeinfo/texi2any
+  • ICY metadata are now requested by default with the HTTP protocol


Otherwise looks good.

Best regards,
Andreas

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc/APIchanges: attempt to split releases

2014-09-14 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 09:08:40AM +0200, wm4 wrote:
> On Sun, 14 Sep 2014 08:56:02 +0200
> Clément Bœsch  wrote:
> 
[...]

> +++1
> 
> This is extremely useful, because the lib version numbers have no
> relation to release numbers. Libav already did this, and I was wondering
> why FFmpeg didn't.
> 
> Looks good - I didn't attempt to verify the version numbers though.

+1

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/assdec: output ASS packets

2014-09-14 Thread Clément Bœsch
After this the order from the original file is stored through readorder
when doing ffmpeg -i input.ass -c copy output.mkv.

And now that the ASS muxer honors the ReadOrder, extracting the ass back
(without transcoding) restores the original order.

TODO: micro bump?
---
 libavformat/assdec.c | 37 +
 1 file changed, 33 insertions(+), 4 deletions(-)

diff --git a/libavformat/assdec.c b/libavformat/assdec.c
index a5f792a..0d2c57b 100644
--- a/libavformat/assdec.c
+++ b/libavformat/assdec.c
@@ -29,6 +29,7 @@
 
 typedef struct ASSContext {
 FFDemuxSubtitlesQueue q;
+unsigned readorder;
 } ASSContext;
 
 static int ass_probe(AVProbeData *p)
@@ -85,10 +86,35 @@ static int64_t get_line(AVBPrint *buf, FFTextReader *tr)
 return pos;
 }
 
+static int reformat_line(ASSContext *ass, AVBPrint *dst, const AVBPrint *src)
+{
+av_bprint_clear(dst);
+if (strcmp(src->str, "Dialogue: ")) {
+char *p = src->str + 10;
+
+/* extract Layer or Marked */
+long layer = strtol(p, &p, 10);
+if (*p != ',')
+return -1;
+p++;
+
+p = strchr(p, ','); if (!p) return -1; p++; // skip Start
+p = strchr(p, ','); if (!p) return -1; p++; // skip End
+
+av_bprintf(dst, "%u,%ld,%s", ass->readorder++, layer, p);
+
+while (dst->str[dst->len - 1] == '\r' ||
+   dst->str[dst->len - 1] == '\n')
+dst->str[--dst->len] = 0;
+return 0;
+}
+return -1;
+}
+
 static int ass_read_header(AVFormatContext *s)
 {
 ASSContext *ass = s->priv_data;
-AVBPrint header, line;
+AVBPrint header, line, rline;
 int header_remaining, res = 0;
 AVStream *st;
 FFTextReader tr;
@@ -99,12 +125,13 @@ static int ass_read_header(AVFormatContext *s)
 return AVERROR(ENOMEM);
 avpriv_set_pts_info(st, 64, 1, 100);
 st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
-st->codec->codec_id   = AV_CODEC_ID_SSA;
+st->codec->codec_id   = AV_CODEC_ID_ASS;
 
 header_remaining = INT_MAX;
 
 av_bprint_init(&header, 0, AV_BPRINT_SIZE_UNLIMITED);
 av_bprint_init(&line,   0, AV_BPRINT_SIZE_UNLIMITED);
+av_bprint_init(&rline,  0, AV_BPRINT_SIZE_UNLIMITED);
 
 for (;;) {
 int64_t pos = get_line(&line, &tr);
@@ -125,9 +152,10 @@ static int ass_read_header(AVFormatContext *s)
 int duration = -1;
 AVPacket *sub;
 
-if (read_ts(line.str, &ts_start, &duration) < 0)
+if (read_ts(line.str, &ts_start, &duration) < 0 ||
+reformat_line(ass, &rline, &line) < 0)
 continue;
-sub = ff_subtitles_queue_insert(&ass->q, line.str, line.len, 0);
+sub = ff_subtitles_queue_insert(&ass->q, rline.str, rline.len, 0);
 if (!sub) {
 res = AVERROR(ENOMEM);
 goto end;
@@ -139,6 +167,7 @@ static int ass_read_header(AVFormatContext *s)
 }
 
 av_bprint_finalize(&line, NULL);
+av_bprint_finalize(&rline, NULL);
 
 res = avpriv_bprint_to_extradata(st->codec, &header);
 if (res < 0)
-- 
2.1.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc/APIchanges: attempt to split releases

2014-09-14 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 08:56:02AM +0200, Clément Bœsch wrote:
> Based on several git show origin/release/X.Y:doc/APIchanges.
> ---
>  doc/APIchanges | 42 +-
>  1 file changed, 37 insertions(+), 5 deletions(-)

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] MAINTAINERS: Add 2.4 to maintained releases, drop 2.3

2014-09-14 Thread Michael Niedermayer
2.2 is used by 4 distributions, 2.3 by none, thus continuing maintaining
2.2 makes more sense than 2.3 see:
https://trac.ffmpeg.org/wiki/Downstreams

Signed-off-by: Michael Niedermayer 
---
 MAINTAINERS |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index c863e41..062ff39 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -534,7 +534,7 @@ x86 Michael Niedermayer
 Releases
 
 
-2.3 Michael Niedermayer
+2.4 Michael Niedermayer
 2.2 Michael Niedermayer
 1.2 Michael Niedermayer
 
-- 
1.7.9.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Add input support for DeckLink devices.

2014-09-14 Thread Deti Fliegl
I really would like to bring things forward, but currently nobody wants 
to review this patch. It's primarily something that is used under Linux 
and not Windows. So please would anyone have a look at my patch.


Deti

On 30.08.14 01:22, Michael Niedermayer wrote:

On Sat, Aug 23, 2014 at 10:50:37PM +0200, Deti Fliegl wrote:

On 19.08.14 15:43, Carl Eugen Hoyos wrote:

Deti Fliegl  fliegl.de> writes:


Minor update to propagate field dominance.


At least a Changelog entry and a libavdevice version
bump are still missing, but consider waiting for a
real review.

Well in the meantime I updated my patch once again to add proper
frame sizes and frame rates to the video codec. Maybe somebody wants
to review the patch.

Deti




  configure   |4
  doc/indevs.texi |   54 
  libavdevice/Makefile|5
  libavdevice/alldevices.c|2
  libavdevice/decklink_common.cpp |  229 +
  libavdevice/decklink_common.h   |   98 +++
  libavdevice/decklink_common_c.h |   32 ++
  libavdevice/decklink_dec.cpp|  531 

  libavdevice/decklink_dec.h  |   32 ++
  libavdevice/decklink_dec_c.c|   54 
  libavdevice/decklink_enc.cpp|  196 +-


moving code from (like from decklink_enc.cpp to decklink_common.cpp)
should be in a seperate patch



  libavdevice/decklink_enc.h  |   11
  libavdevice/decklink_enc_c.c|1
  13 files changed, 1055 insertions(+), 194 deletions(-)


If you want to maintain this code, please add yourself to the
MAINTAINERs file


[...]


+#ifdef _WIN32
+char *dup_wchar_to_utf8(wchar_t *w)


non static functions should have a ff_ prefix (or av if they are
public but that isnt)

also i dont really know windows & decklink stuff, so iam not the
ideal one to review ...

[...]



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Changelog/ReleaseNotes: prepare for 2.4

2014-09-14 Thread Clément Bœsch
On Sun, Sep 14, 2014 at 09:29:26AM +0200, Andreas Cadhalpun wrote:
> On 14.09.2014 08:33, Clément Bœsch wrote:
> >From: Clément Bœsch 
> >
> >---
> >  Changelog |  2 +-
> >  RELEASE_NOTES | 19 ++-
> >  2 files changed, 15 insertions(+), 6 deletions(-)
> >
> >diff --git a/Changelog b/Changelog
> >index c5185f7..480a298 100644
> >--- a/Changelog
> >+++ b/Changelog
> >@@ -5,7 +5,7 @@ version :
> >  - Icecast protocol
> >  - ported lenscorrection filter from frei0r filter
> >  - large optimizations in dctdnoiz to make it usable
> >-- request Icecast metadata by default
> >+- ICY metadata are now requested by default with the HTTP protocol
> >  - support for using metadata in stream specifiers in fftools
> >  - LZMA compression support in TIFF decoder
> >  - support for H.261 RTP payload format (RFC 4587)
> >diff --git a/RELEASE_NOTES b/RELEASE_NOTES
> >index a8b19c5..b3b7f7b 100644
> >--- a/RELEASE_NOTES
> >+++ b/RELEASE_NOTES
> >@@ -2,13 +2,18 @@
> >   │ RELEASE NOTES for FFmpeg 2.4 "Fresnel" │
> >   └┘
> >
> >-   The FFmpeg Project proudly presents FFmpeg 2.4 "Fresnel", ...
> >-   FFmpeg 2.4 is mostly API-, but not ABI-compatible with the previous 
> >major release.
> >-   This means that the code using our libraries needs to be rebuilt, but 
> >only minimal
> >-   source changes should be required, as described in the section 'API 
> >Information'.
> >+   The FFmpeg Project proudly presents FFmpeg 2.4 "Fresnel", just 2 months
> >+   after the release of 2.3. Since this wasn't a long time ago, the 
> >Changelog
> >+   is a bit small this time.
> 
> I think 'a bit short' would sound better.
> 
> >+   The most important thing in this release is the major bump of the 
> >libraries.
> 
> Maybe expand that to 'major version bump'.
> 
> >+   This means that this release is not ABI-compatible nor exactly API-
> 
> 'neither ABI-compatible nor'
> 
> And I would replace 'exactly' with 'fully', because it is otherwise not
> exactly unambiguous. ;)
> 
> >+   compatible. But on the other hand it is aligned with the Libav 11 release
> >+   series, and will as a result probably end up being maintained for a long
> >+   time.
> >
> > ┌┐
> >-   │ *  API Information │
> >+   │ 🔨  API Information │
> > └┘
> >
> >   FFmpeg 2.4 includes the following library versions:
> >@@ -28,6 +33,7 @@
> >   cause crashes, if it is not initialized.
> > • Some deprecated functions were removed.
> > • The avfilter_graph_parse function was made compatible with Libav.
> >+   • The matroska demuxer now outputs verbatim ASS packets
>  ^
> There should be a dot at the end.
> 
> >   Please refer to the doc/APIChanges file for more information.
> ^
> You didn't change this line, but there is a typo, as the file is called
> APIchanges with lower-case 'c'.
> 
> >@@ -41,6 +47,8 @@
> >
> >  • Icecast protocol
> >  • API for live metadata updates through event flags.
>^
> This dot is inconsistent with the other points in this list.
> 
> >+• UTF-16 support in text subtitles formats
> >+• the ASS muxer now honor re-order the Dialogue events properly
> >
> > ┌┐
> > │ libavfilter│
> >@@ -66,3 +74,4 @@
> >• libmodplug is now detected through pkg-config
> >• HTML documentation generation through texi2html is deprecated in
> >  favor of makeinfo/texi2any
> >+  • ICY metadata are now requested by default with the HTTP protocol
> 
> Otherwise looks good.
> 

Thank you; applied with those changes, and a bit more.

> Best regards,
> Andreas
> 

-- 
Clément B.


pgpGHJ8xKJx1c.pgp
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges

2014-09-14 Thread Mika Raento
This adds a new option -hls_flags single_file that creates one .ts file
for HLS and adds byteranges to the .m3u8 file, instead of creating one
.ts file for each segment.

This is helpful at least for storing large number of videos, as the
number of files per video is drastically reduced and copying and storing
those files takes less requests and inodes.

This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel
in July 2014. That patch seems abandoned by the author, and contained
unrelated changes. This patch tries to add the minimum amount of code to
support the byterange playlists.
---
 doc/muxers.texi  | 23 +++
 libavformat/hlsenc.c | 64 ++--
 2 files changed, 71 insertions(+), 16 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 57e81f4..40ae857 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -194,15 +194,19 @@ can not be smaller than one centi second.
 Apple HTTP Live Streaming muxer that segments MPEG-TS according to
 the HTTP Live Streaming (HLS) specification.
 
-It creates a playlist file and numbered segment files. The output
-filename specifies the playlist filename; the segment filenames
-receive the same basename as the playlist, a sequential number and
-a .ts extension.
+It creates a playlist file, and one or more segment files. The output filename
+specifies the playlist filename.
+
+By default, the muxer creates a file for each segment produced. These files
+have the same name as the playlist, followed by a sequential number and a
+.ts extension.
 
 For example, to convert an input file with @command{ffmpeg}:
 @example
 ffmpeg -i in.nut out.m3u8
 @end example
+This example will produce the playlist, @file{out.m3u8}, and segment files:
+@file{out0.ts}, @file{out1.ts}, @file{out2.ts}, etc.
 
 See also the @ref{segment} muxer, which provides a more generic and
 flexible implementation of a segmenter, and can be used to perform HLS
@@ -241,6 +245,17 @@ Note that the playlist sequence number must be unique for 
each segment
 and it is not to be confused with the segment filename sequence number
 which can be cyclic, for example if the @option{wrap} option is
 specified.
+
+@item hls_flags single_file
+If this flag is set, the muxer will store all segments in a single MPEG-TS
+file, and will use byte ranges in the playlist. HLS playlists generated with
+this way will have the version number 4.
+For example:
+@example
+ffmpeg -i in.nut -hls_flags single_file out.m3u8
+@end example
+Will produce the playlist, @file{out.m3u8}, and a single segment file,
+@file{out.ts}.
 @end table
 
 @anchor{ico}
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 11f1e5b..b5b41ae 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -34,10 +34,17 @@
 typedef struct HLSSegment {
 char filename[1024];
 double duration; /* in seconds */
+int64_t pos;
+int64_t size;
 
 struct HLSSegment *next;
 } HLSSegment;
 
+typedef enum HLSFlags {
+// Generate a single media file and use byte ranges in the playlist.
+HLS_SINGLE_FILE = (1 << 0),
+} HLSFlags;
+
 typedef struct HLSContext {
 const AVClass *class;  // Class for private options.
 unsigned number;
@@ -50,12 +57,15 @@ typedef struct HLSContext {
 float time;// Set by a private option.
 int max_nb_segments;   // Set by a private option.
 int  wrap; // Set by a private option.
+uint32_t flags;// enum HLSFlags
 
 int64_t recording_time;
 int has_video;
 int64_t start_pts;
 int64_t end_pts;
 double duration;  // last segment duration computed so far, in seconds
+int64_t start_pos;// last segment starting position
+int64_t size; // last segment size
 int nb_entries;
 
 HLSSegment *segments;
@@ -88,12 +98,14 @@ static int hls_mux_init(AVFormatContext *s)
 avcodec_copy_context(st->codec, s->streams[i]->codec);
 st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
 }
+hls->start_pos = 0;
 
 return 0;
 }
 
 /* Create a new segment and append it to the segment list */
-static int hls_append_segment(HLSContext *hls, double duration)
+static int hls_append_segment(HLSContext *hls, double duration, int64_t pos,
+  int64_t size)
 {
 HLSSegment *en = av_malloc(sizeof(*en));
 
@@ -103,6 +115,8 @@ static int hls_append_segment(HLSContext *hls, double 
duration)
 av_strlcpy(en->filename, av_basename(hls->avf->filename), 
sizeof(en->filename));
 
 en->duration = duration;
+en->pos  = pos;
+en->size = size;
 en->next = NULL;
 
 if (!hls->segments)
@@ -142,6 +156,7 @@ static int hls_window(AVFormatContext *s, int last)
 int target_duration = 0;
 int ret = 0;
 int64_t sequence = FFMAX(hls->start_sequence, hls->sequence - 
hls->nb_entries);
+int version = hls->flags & HLS_SINGLE_FILE ? 4 : 3;
 
 if ((ret = avio_open

Re: [FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges

2014-09-14 Thread Raento Mika
On 14/09/14 15:20, "Mika Raento"  wrote:

>This adds a new option -hls_flags single_file that creates one .ts file
>for HLS and adds byteranges to the .m3u8 file, instead of creating one
>.ts file for each segment.
>
>This is helpful at least for storing large number of videos, as the
>number of files per video is drastically reduced and copying and storing
>those files takes less requests and inodes.
>
>This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel
>in July 2014. That patch seems abandoned by the author, and contained
>unrelated changes. This patch tries to add the minimum amount of code to
>support the byterange playlists.
>---
> doc/muxers.texi  | 23 +++
> libavformat/hlsenc.c | 64
>++--
> 2 files changed, 71 insertions(+), 16 deletions(-)
>
>diff --git a/doc/muxers.texi b/doc/muxers.texi
>index 57e81f4..40ae857 100644
>--- a/doc/muxers.texi
>+++ b/doc/muxers.texi
>@@ -194,15 +194,19 @@ can not be smaller than one centi second.
> Apple HTTP Live Streaming muxer that segments MPEG-TS according to
> the HTTP Live Streaming (HLS) specification.
> 
>-It creates a playlist file and numbered segment files. The output
>-filename specifies the playlist filename; the segment filenames
>-receive the same basename as the playlist, a sequential number and
>-a .ts extension.
>+It creates a playlist file, and one or more segment files. The output
>filename
>+specifies the playlist filename.
>+
>+By default, the muxer creates a file for each segment produced. These
>files
>+have the same name as the playlist, followed by a sequential number and a
>+.ts extension.
> 
> For example, to convert an input file with @command{ffmpeg}:
> @example
> ffmpeg -i in.nut out.m3u8
> @end example
>+This example will produce the playlist, @file{out.m3u8}, and segment
>files:
>+@file{out0.ts}, @file{out1.ts}, @file{out2.ts}, etc.
> 
> See also the @ref{segment} muxer, which provides a more generic and
> flexible implementation of a segmenter, and can be used to perform HLS
>@@ -241,6 +245,17 @@ Note that the playlist sequence number must be
>unique for each segment
> and it is not to be confused with the segment filename sequence number
> which can be cyclic, for example if the @option{wrap} option is
> specified.
>+
>+@item hls_flags single_file
>+If this flag is set, the muxer will store all segments in a single
>MPEG-TS
>+file, and will use byte ranges in the playlist. HLS playlists generated
>with
>+this way will have the version number 4.
>+For example:
>+@example
>+ffmpeg -i in.nut -hls_flags single_file out.m3u8
>+@end example
>+Will produce the playlist, @file{out.m3u8}, and a single segment file,
>+@file{out.ts}.
> @end table
> 
> @anchor{ico}
>diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
>index 11f1e5b..b5b41ae 100644
>--- a/libavformat/hlsenc.c
>+++ b/libavformat/hlsenc.c
>@@ -34,10 +34,17 @@
> typedef struct HLSSegment {
> char filename[1024];
> double duration; /* in seconds */
>+int64_t pos;
>+int64_t size;
> 
> struct HLSSegment *next;
> } HLSSegment;
> 
>+typedef enum HLSFlags {
>+// Generate a single media file and use byte ranges in the playlist.
>+HLS_SINGLE_FILE = (1 << 0),
>+} HLSFlags;
>+
> typedef struct HLSContext {
> const AVClass *class;  // Class for private options.
> unsigned number;
>@@ -50,12 +57,15 @@ typedef struct HLSContext {
> float time;// Set by a private option.
> int max_nb_segments;   // Set by a private option.
> int  wrap; // Set by a private option.
>+uint32_t flags;// enum HLSFlags
> 
> int64_t recording_time;
> int has_video;
> int64_t start_pts;
> int64_t end_pts;
> double duration;  // last segment duration computed so far, in
>seconds
>+int64_t start_pos;// last segment starting position
>+int64_t size; // last segment size
> int nb_entries;
> 
> HLSSegment *segments;
>@@ -88,12 +98,14 @@ static int hls_mux_init(AVFormatContext *s)
> avcodec_copy_context(st->codec, s->streams[i]->codec);
> st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
> }
>+hls->start_pos = 0;
> 
> return 0;
> }
> 
> /* Create a new segment and append it to the segment list */
>-static int hls_append_segment(HLSContext *hls, double duration)
>+static int hls_append_segment(HLSContext *hls, double duration, int64_t
>pos,
>+  int64_t size)
> {
> HLSSegment *en = av_malloc(sizeof(*en));
> 
>@@ -103,6 +115,8 @@ static int hls_append_segment(HLSContext *hls, double
>duration)
> av_strlcpy(en->filename, av_basename(hls->avf->filename),
>sizeof(en->filename));
> 
> en->duration = duration;
>+en->pos  = pos;
>+en->size = size;
> en->next = NULL;
> 
> if (!hls->segments)
>@@ -142,6 +156,7 @@ static int hls_window(AVFormatContext *s, int last)
> int target_duration = 0;
> int 

[FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges

2014-09-14 Thread Mika Raento
This adds a new option -hls_flags single_file that creates one .ts file
for HLS and adds byteranges to the .m3u8 file, instead of creating one
.ts file for each segment.

This is helpful at least for storing large number of videos, as the
number of files per video is drastically reduced and copying and storing
those files takes less requests and inodes.

This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel
in July 2014. That patch seems abandoned by the author, and contained
unrelated changes. This patch tries to add the minimum amount of code to
support the byterange playlists.
---
 doc/muxers.texi  | 23 +++
 libavformat/hlsenc.c | 65 ++--
 2 files changed, 72 insertions(+), 16 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 57e81f4..40ae857 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -194,15 +194,19 @@ can not be smaller than one centi second.
 Apple HTTP Live Streaming muxer that segments MPEG-TS according to
 the HTTP Live Streaming (HLS) specification.
 
-It creates a playlist file and numbered segment files. The output
-filename specifies the playlist filename; the segment filenames
-receive the same basename as the playlist, a sequential number and
-a .ts extension.
+It creates a playlist file, and one or more segment files. The output filename
+specifies the playlist filename.
+
+By default, the muxer creates a file for each segment produced. These files
+have the same name as the playlist, followed by a sequential number and a
+.ts extension.
 
 For example, to convert an input file with @command{ffmpeg}:
 @example
 ffmpeg -i in.nut out.m3u8
 @end example
+This example will produce the playlist, @file{out.m3u8}, and segment files:
+@file{out0.ts}, @file{out1.ts}, @file{out2.ts}, etc.
 
 See also the @ref{segment} muxer, which provides a more generic and
 flexible implementation of a segmenter, and can be used to perform HLS
@@ -241,6 +245,17 @@ Note that the playlist sequence number must be unique for 
each segment
 and it is not to be confused with the segment filename sequence number
 which can be cyclic, for example if the @option{wrap} option is
 specified.
+
+@item hls_flags single_file
+If this flag is set, the muxer will store all segments in a single MPEG-TS
+file, and will use byte ranges in the playlist. HLS playlists generated with
+this way will have the version number 4.
+For example:
+@example
+ffmpeg -i in.nut -hls_flags single_file out.m3u8
+@end example
+Will produce the playlist, @file{out.m3u8}, and a single segment file,
+@file{out.ts}.
 @end table
 
 @anchor{ico}
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 11f1e5b..9fcb999 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -34,10 +34,17 @@
 typedef struct HLSSegment {
 char filename[1024];
 double duration; /* in seconds */
+int64_t pos;
+int64_t size;
 
 struct HLSSegment *next;
 } HLSSegment;
 
+typedef enum HLSFlags {
+// Generate a single media file and use byte ranges in the playlist.
+HLS_SINGLE_FILE = (1 << 0),
+} HLSFlags;
+
 typedef struct HLSContext {
 const AVClass *class;  // Class for private options.
 unsigned number;
@@ -50,12 +57,15 @@ typedef struct HLSContext {
 float time;// Set by a private option.
 int max_nb_segments;   // Set by a private option.
 int  wrap; // Set by a private option.
+uint32_t flags;// enum HLSFlags
 
 int64_t recording_time;
 int has_video;
 int64_t start_pts;
 int64_t end_pts;
 double duration;  // last segment duration computed so far, in seconds
+int64_t start_pos;// last segment starting position
+int64_t size; // last segment size
 int nb_entries;
 
 HLSSegment *segments;
@@ -88,12 +98,14 @@ static int hls_mux_init(AVFormatContext *s)
 avcodec_copy_context(st->codec, s->streams[i]->codec);
 st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
 }
+hls->start_pos = 0;
 
 return 0;
 }
 
 /* Create a new segment and append it to the segment list */
-static int hls_append_segment(HLSContext *hls, double duration)
+static int hls_append_segment(HLSContext *hls, double duration, int64_t pos,
+  int64_t size)
 {
 HLSSegment *en = av_malloc(sizeof(*en));
 
@@ -103,6 +115,8 @@ static int hls_append_segment(HLSContext *hls, double 
duration)
 av_strlcpy(en->filename, av_basename(hls->avf->filename), 
sizeof(en->filename));
 
 en->duration = duration;
+en->pos  = pos;
+en->size = size;
 en->next = NULL;
 
 if (!hls->segments)
@@ -142,6 +156,7 @@ static int hls_window(AVFormatContext *s, int last)
 int target_duration = 0;
 int ret = 0;
 int64_t sequence = FFMAX(hls->start_sequence, hls->sequence - 
hls->nb_entries);
+int version = hls->flags & HLS_SINGLE_FILE ? 4 : 3;
 
 if ((ret = avio_open

Re: [FFmpeg-devel] [PATCH] MAINTAINERS: Add 2.4 to maintained releases, drop 2.3

2014-09-14 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 01:00:06PM +0200, Michael Niedermayer wrote:
> 2.2 is used by 4 distributions, 2.3 by none, thus continuing maintaining
> 2.2 makes more sense than 2.3 see:
> https://trac.ffmpeg.org/wiki/Downstreams
> 
> Signed-off-by: Michael Niedermayer 
> ---
>  MAINTAINERS |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied so its upto date in 2.4


[...]


-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- 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] Add input support for DeckLink devices.

2014-09-14 Thread Dave Rice

On Sep 14, 2014, at 7:07 AM, Deti Fliegl  wrote:

> I really would like to bring things forward, but currently nobody wants to 
> review this patch. It's primarily something that is used under Linux and not 
> Windows. So please would anyone have a look at my patch.

I have a few decklink devices and would be happy to review this on Mac. Does it 
work on Mac?
Dave Rice

> Deti
> 
> On 30.08.14 01:22, Michael Niedermayer wrote:
>> On Sat, Aug 23, 2014 at 10:50:37PM +0200, Deti Fliegl wrote:
>>> On 19.08.14 15:43, Carl Eugen Hoyos wrote:
 Deti Fliegl  fliegl.de> writes:
 
> Minor update to propagate field dominance.
 
 At least a Changelog entry and a libavdevice version
 bump are still missing, but consider waiting for a
 real review.
>>> Well in the meantime I updated my patch once again to add proper
>>> frame sizes and frame rates to the video codec. Maybe somebody wants
>>> to review the patch.
>>> 
>>> Deti
>>> 
>> 
>>>  configure   |4
>>>  doc/indevs.texi |   54 
>>>  libavdevice/Makefile|5
>>>  libavdevice/alldevices.c|2
>>>  libavdevice/decklink_common.cpp |  229 +
>>>  libavdevice/decklink_common.h   |   98 +++
>>>  libavdevice/decklink_common_c.h |   32 ++
>>>  libavdevice/decklink_dec.cpp|  531 
>>> 
>>>  libavdevice/decklink_dec.h  |   32 ++
>>>  libavdevice/decklink_dec_c.c|   54 
>>>  libavdevice/decklink_enc.cpp|  196 +-
>> 
>> moving code from (like from decklink_enc.cpp to decklink_common.cpp)
>> should be in a seperate patch
>> 
>> 
>>>  libavdevice/decklink_enc.h  |   11
>>>  libavdevice/decklink_enc_c.c|1
>>>  13 files changed, 1055 insertions(+), 194 deletions(-)
>> 
>> If you want to maintain this code, please add yourself to the
>> MAINTAINERs file
>> 
>> 
>> [...]
>> 
>>> +#ifdef _WIN32
>>> +char *dup_wchar_to_utf8(wchar_t *w)
>> 
>> non static functions should have a ff_ prefix (or av if they are
>> public but that isnt)
>> 
>> also i dont really know windows & decklink stuff, so iam not the
>> ideal one to review ...
>> 
>> [...]
>> 
>> 
>> 
>> ___
>> 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 mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Add input support for DeckLink devices.

2014-09-14 Thread Amnon Israely
I can help with testing under Linux.
We use many deckling devices in production.

2014-09-14 17:15 GMT+03:00 Dave Rice :

>
> On Sep 14, 2014, at 7:07 AM, Deti Fliegl  wrote:
>
> > I really would like to bring things forward, but currently nobody wants
> to review this patch. It's primarily something that is used under Linux and
> not Windows. So please would anyone have a look at my patch.
>
> I have a few decklink devices and would be happy to review this on Mac.
> Does it work on Mac?
> Dave Rice
>
> > Deti
> >
> > On 30.08.14 01:22, Michael Niedermayer wrote:
> >> On Sat, Aug 23, 2014 at 10:50:37PM +0200, Deti Fliegl wrote:
> >>> On 19.08.14 15:43, Carl Eugen Hoyos wrote:
>  Deti Fliegl  fliegl.de> writes:
> 
> > Minor update to propagate field dominance.
> 
>  At least a Changelog entry and a libavdevice version
>  bump are still missing, but consider waiting for a
>  real review.
> >>> Well in the meantime I updated my patch once again to add proper
> >>> frame sizes and frame rates to the video codec. Maybe somebody wants
> >>> to review the patch.
> >>>
> >>> Deti
> >>>
> >>
> >>>  configure   |4
> >>>  doc/indevs.texi |   54 
> >>>  libavdevice/Makefile|5
> >>>  libavdevice/alldevices.c|2
> >>>  libavdevice/decklink_common.cpp |  229 +
> >>>  libavdevice/decklink_common.h   |   98 +++
> >>>  libavdevice/decklink_common_c.h |   32 ++
> >>>  libavdevice/decklink_dec.cpp|  531
> 
> >>>  libavdevice/decklink_dec.h  |   32 ++
> >>>  libavdevice/decklink_dec_c.c|   54 
> >>>  libavdevice/decklink_enc.cpp|  196 +-
> >>
> >> moving code from (like from decklink_enc.cpp to decklink_common.cpp)
> >> should be in a seperate patch
> >>
> >>
> >>>  libavdevice/decklink_enc.h  |   11
> >>>  libavdevice/decklink_enc_c.c|1
> >>>  13 files changed, 1055 insertions(+), 194 deletions(-)
> >>
> >> If you want to maintain this code, please add yourself to the
> >> MAINTAINERs file
> >>
> >>
> >> [...]
> >>
> >>> +#ifdef _WIN32
> >>> +char *dup_wchar_to_utf8(wchar_t *w)
> >>
> >> non static functions should have a ff_ prefix (or av if they are
> >> public but that isnt)
> >>
> >> also i dont really know windows & decklink stuff, so iam not the
> >> ideal one to review ...
> >>
> >> [...]
> >>
> >>
> >>
> >> ___
> >> 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 mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/7] doc/examples: remove unneeded NULL checks

2014-09-14 Thread Michael Niedermayer
On Sat, Aug 16, 2014 at 01:48:27AM +0200, wm4 wrote:
> On Sat, 16 Aug 2014 01:44:59 +0200
> Michael Niedermayer  wrote:
> 
> > On Sat, Aug 16, 2014 at 01:30:44AM +0200, wm4 wrote:
> > > On Sat, 16 Aug 2014 01:15:42 +0200
> > > Michael Niedermayer  wrote:
> > > 
> > > > Signed-off-by: Michael Niedermayer 
> > > > ---
> > > >  doc/examples/resampling_audio.c |3 +--
> > > >  doc/examples/scaling_video.c|3 +--
> > > >  2 files changed, 2 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/doc/examples/resampling_audio.c 
> > > > b/doc/examples/resampling_audio.c
> > > > index 8a43b09..f35e7e1 100644
> > > > --- a/doc/examples/resampling_audio.c
> > > > +++ b/doc/examples/resampling_audio.c
> > > > @@ -199,8 +199,7 @@ int main(int argc, char **argv)
> > > >  fmt, dst_ch_layout, dst_nb_channels, dst_rate, 
> > > > dst_filename);
> > > >  
> > > >  end:
> > > > -if (dst_file)
> > > > -fclose(dst_file);
> > > > +fclose(dst_file);
> > > 
> > > If dst_file can be NULL, then I don't think this is safe.
> > 
> > how can dst_file be NULL ?
> > but if preferred, iam happy to leave it as it is, one could argue
> > it to be more rubust against future changes
> 
> Oh, sorry, it wasn't clear from the context. Nevermind.

patch applied


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato


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/3] avformat/mxfenc: H.264 Intra support

2014-09-14 Thread Robert Krüger
On Sat, Sep 13, 2014 at 12:36 PM, Michael Niedermayer  wrote:
> From: Baptiste Coudurier 
>
> Ported by michael from ffmbc to ffmpeg
> the code is under CONFIG_GPL as ffmbc is GPL
>
> Signed-off-by: Michael Niedermayer 
> ---
>  libavformat/mxfenc.c |  143 
> ++
>  1 file changed, 143 insertions(+)
>
> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> index 6a6b7c2..98f3479 100644
> --- a/libavformat/mxfenc.c
> +++ b/libavformat/mxfenc.c
> @@ -40,6 +40,8 @@
>  #include "libavutil/avassert.h"
>  #include "libavcodec/bytestream.h"
>  #include "libavcodec/dnxhddata.h"
> +#include "libavcodec/h264.h"
> +#include "libavcodec/internal.h"
>  #include "audiointerleave.h"
>  #include "avformat.h"
>  #include "avio_internal.h"
> @@ -95,6 +97,9 @@ static const struct {
>  { AV_CODEC_ID_PCM_S16LE,  1 },
>  { AV_CODEC_ID_DVVIDEO,   15 },
>  { AV_CODEC_ID_DNXHD, 24 },
> +#if CONFIG_GPL
> +{ AV_CODEC_ID_H264,  34 },
> +#endif
>  { AV_CODEC_ID_NONE }
>  };
>
> @@ -266,6 +271,13 @@ static const MXFContainerEssenceEntry 
> mxf_essence_container_uls[] = {
>{ 
> 0x06,0x0e,0x2b,0x34,0x01,0x02,0x01,0x01,0x0d,0x01,0x03,0x01,0x15,0x01,0x05,0x00
>  },
>{ 
> 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x71,0x13,0x00,0x00
>  },
>mxf_write_cdci_desc },
> +#if CONFIG_GPL
> +// H.264
> +{ { 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x02,0x0D,0x01,0x03,0x01,0x02,0x10,0x60,0x01
>  },
> +  { 
> 0x06,0x0E,0x2B,0x34,0x01,0x02,0x01,0x01,0x0D,0x01,0x03,0x01,0x15,0x01,0x05,0x00
>  },
> +  { 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x00,0x00,0x00
>  },
> +  mxf_write_mpegvideo_desc },
> +#endif // CONFIG_GPL
>  { { 
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
>  },
>{ 
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
>  },
>{ 
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
>  },
> @@ -1564,6 +1576,130 @@ static int mxf_parse_dv_frame(AVFormatContext *s, 
> AVStream *st, AVPacket *pkt)
>  return 1;
>  }
>
> +#if CONFIG_GPL
> +static const UID mxf_h264_codec_uls[] = {
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x30,0x00,0x00
>  }, // AVC Video
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00
>  }, // AVC Intra
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x20,0x00
>  }, // AVC High 10 Intra
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x01
>  }, // AVC High 10 Intra RP2027 Class 50 1080/59.94i
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x02
>  }, // AVC High 10 Intra RP2027 Class 50 1080/50i
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x03
>  }, // AVC High 10 Intra RP2027 Class 50 1080/29.97p
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x04
>  }, // AVC High 10 Intra RP2027 Class 50 1080/25p
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x08
>  }, // AVC High 10 Intra RP2027 Class 50 720/59.94p
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x09
>  }, // AVC High 10 Intra RP2027 Class 50 720/50p
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x30,0x00
>  }, // AVC High 422 Intra
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x01
>  }, // AVC High 422 Intra RP2027 Class 100 1080/59.94i
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x02
>  }, // AVC High 422 Intra RP2027 Class 100 1080/50i
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x03
>  }, // AVC High 422 Intra RP2027 Class 100 1080/29.97p
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x04
>  }, // AVC High 422 Intra RP2027 Class 100 1080/25p
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x08
>  }, // AVC High 422 Intra RP2027 Class 100 720/59.94p
> +{ 
> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x09
>  }, // AVC High 422 Intra RP2027 Class 100 720/50p
> +};
> +
> +static const UID *mxf_get_h264_codec_ul(AVCodecContext *avctx, SPS *sps)
> +{
> +int long_gop = avctx->gop_size > 1 || avctx->has_b_frames;
> +
> +if ((sps->constraint_set_flags >> 3) & 1) {
> +if (sps->profile_idc == 110)
> +return &mxf_h264_codec_uls[2];
> +else if (sps->profile_idc == 122)
> +return &mxf_h264_codec_uls[9];
> +}
> +if (long_gop)
> +return &mxf_h264_codec_uls[0];
> +else
> +return &mxf_h264_codec_uls[1];
> +}
> +

Re: [FFmpeg-devel] [PATCH 1/3] avformat/mxfenc: H.264 Intra support

2014-09-14 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 05:40:35PM +0200, Robert Krüger wrote:
> On Sat, Sep 13, 2014 at 12:36 PM, Michael Niedermayer  
> wrote:
> > From: Baptiste Coudurier 
> >
> > Ported by michael from ffmbc to ffmpeg
> > the code is under CONFIG_GPL as ffmbc is GPL
> >
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavformat/mxfenc.c |  143 
> > ++
> >  1 file changed, 143 insertions(+)
> >
> > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> > index 6a6b7c2..98f3479 100644
> > --- a/libavformat/mxfenc.c
> > +++ b/libavformat/mxfenc.c
> > @@ -40,6 +40,8 @@
> >  #include "libavutil/avassert.h"
> >  #include "libavcodec/bytestream.h"
> >  #include "libavcodec/dnxhddata.h"
> > +#include "libavcodec/h264.h"
> > +#include "libavcodec/internal.h"
> >  #include "audiointerleave.h"
> >  #include "avformat.h"
> >  #include "avio_internal.h"
> > @@ -95,6 +97,9 @@ static const struct {
> >  { AV_CODEC_ID_PCM_S16LE,  1 },
> >  { AV_CODEC_ID_DVVIDEO,   15 },
> >  { AV_CODEC_ID_DNXHD, 24 },
> > +#if CONFIG_GPL
> > +{ AV_CODEC_ID_H264,  34 },
> > +#endif
> >  { AV_CODEC_ID_NONE }
> >  };
> >
> > @@ -266,6 +271,13 @@ static const MXFContainerEssenceEntry 
> > mxf_essence_container_uls[] = {
> >{ 
> > 0x06,0x0e,0x2b,0x34,0x01,0x02,0x01,0x01,0x0d,0x01,0x03,0x01,0x15,0x01,0x05,0x00
> >  },
> >{ 
> > 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x71,0x13,0x00,0x00
> >  },
> >mxf_write_cdci_desc },
> > +#if CONFIG_GPL
> > +// H.264
> > +{ { 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x02,0x0D,0x01,0x03,0x01,0x02,0x10,0x60,0x01
> >  },
> > +  { 
> > 0x06,0x0E,0x2B,0x34,0x01,0x02,0x01,0x01,0x0D,0x01,0x03,0x01,0x15,0x01,0x05,0x00
> >  },
> > +  { 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x00,0x00,0x00
> >  },
> > +  mxf_write_mpegvideo_desc },
> > +#endif // CONFIG_GPL
> >  { { 
> > 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
> >  },
> >{ 
> > 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
> >  },
> >{ 
> > 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
> >  },
> > @@ -1564,6 +1576,130 @@ static int mxf_parse_dv_frame(AVFormatContext *s, 
> > AVStream *st, AVPacket *pkt)
> >  return 1;
> >  }
> >
> > +#if CONFIG_GPL
> > +static const UID mxf_h264_codec_uls[] = {
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x30,0x00,0x00
> >  }, // AVC Video
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00
> >  }, // AVC Intra
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x20,0x00
> >  }, // AVC High 10 Intra
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x01
> >  }, // AVC High 10 Intra RP2027 Class 50 1080/59.94i
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x02
> >  }, // AVC High 10 Intra RP2027 Class 50 1080/50i
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x03
> >  }, // AVC High 10 Intra RP2027 Class 50 1080/29.97p
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x04
> >  }, // AVC High 10 Intra RP2027 Class 50 1080/25p
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x08
> >  }, // AVC High 10 Intra RP2027 Class 50 720/59.94p
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x21,0x09
> >  }, // AVC High 10 Intra RP2027 Class 50 720/50p
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x30,0x00
> >  }, // AVC High 422 Intra
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x01
> >  }, // AVC High 422 Intra RP2027 Class 100 1080/59.94i
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x02
> >  }, // AVC High 422 Intra RP2027 Class 100 1080/50i
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x03
> >  }, // AVC High 422 Intra RP2027 Class 100 1080/29.97p
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x04
> >  }, // AVC High 422 Intra RP2027 Class 100 1080/25p
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x08
> >  }, // AVC High 422 Intra RP2027 Class 100 720/59.94p
> > +{ 
> > 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x32,0x31,0x09
> >  }, // AVC High 422 Intra RP2027 Class 100 720/50p
> > +};
> > +
> > +static const UID *mxf_get_h264_codec_ul(AVCodecContext *avctx, SPS *sps)
> > +{
> > +int long_gop = avctx->gop_size > 1 || avctx->has_b_frames;
> > +
> > +if ((sps->constraint_set_flags >> 

Re: [FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges

2014-09-14 Thread Nicolas Martyanoff
Hi,

I abandoned my patches because:

- I did not have the time to make the changes I was asked for;
- Becoming maintainer of the module was not something I was ok with;
- I ended up directly using the FFmpeg API to generate my HLS playlists
  instead of using the FFmpeg binary with the HLS module.

However I am happy my work ended up being useful :)

Best regards,

-- 
Nicolas Martyanoff
http://wandrian.net
khae...@gmail.com
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] FFmpeg 2.4

2014-09-14 Thread Michael Niedermayer
On Tue, Sep 02, 2014 at 12:49:35PM +0200, Michael Niedermayer wrote:
> Hi
> 
> Its almost 2 Months since 2.3 and i assume people want a new release
> from around the same time of when libav 11 will get released so expect
> FFmpeg 2.4 to be released soon!
> 
> if you want something in it, now is the time to push/post it
> if you want something fixed, now is the time to fix it

FFmpeg 2.4 release made

dont hesitate to suggest a name for 2.5 (though there are still some
previous suggestions)

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] Branchpoint tags

2014-09-14 Thread Michael Niedermayer
Hi

Should we add git tags to the revissions where releases are branched
off ?

that way a "git describe" on master would look like:
n2.5-dev-3-gb227be3
instead of:
n2.0-11670-gb227be3

(or any other tag than n2.5-dev that we choose)

it would not affect the "./version.sh" output

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Branchpoint tags

2014-09-14 Thread wm4
On Sun, 14 Sep 2014 19:12:56 +0200
Michael Niedermayer  wrote:

> Hi
> 
> Should we add git tags to the revissions where releases are branched
> off ?
> 
> that way a "git describe" on master would look like:
> n2.5-dev-3-gb227be3
> instead of:
> n2.0-11670-gb227be3
> 
> (or any other tag than n2.5-dev that we choose)
> 
> it would not affect the "./version.sh" output
> 

That sounds like an interesting idea. But just using the release tag
name and appending "-dev" might be harmful for scripts which try to
automatically pickup the latest version or such.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Adds decode support for formats other than 420

2014-09-14 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 07:43:27AM -0700, Deb Mukherjee wrote:
> Handles decoding of new VP9 profiles 1-3 with different color sampling
> and bit-depths.
> 
> For high bitdepth (profiles 2 and 3) support, we currently need to link
> with the highbitdepth branch of libvpx with --enable-experimental
> and --enable-vp9-high config options on. But eventually this branch will
> be merged into master, whereafter to enable high bitdepth
> support you will need to link with libvpx with configure option
> --enable-vp9-highbitdepth on.
> ---
>  libavcodec/libvpxdec.c | 64 
> ++
>  1 file changed, 60 insertions(+), 4 deletions(-)

applied

thanks

[...]
-- 
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


[FFmpeg-devel] (no subject)

2014-09-14 Thread Clément Bœsch
I'm killing SRT & SSA as they are now a huge hindrance in my progress
(currently working on creating sanity in the decoded form of subtitles).
They've been deprecated since a while, and after the commit in which I'm
replying is applied, they won't be needed anymore.

The commits don't include that, but the changes will of course be mentioned in
doc/APIchanges and RELEASE_NOTES, and minor version bumped.

SRT and SSA are now respectively aliased to SUBRIP and ASS (their versions
without timestamps in it).

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] Kill timed SRT

2014-09-14 Thread Clément Bœsch
---
 libavcodec/srtdec.c   | 33 +++
 libavcodec/srtenc.c   | 49 ++-
 libavformat/matroska.c|  1 -
 libavformat/matroskaenc.c | 45 +--
 libavformat/srtenc.c  | 11 ---
 5 files changed, 10 insertions(+), 129 deletions(-)

diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c
index b16645a..652dfa0 100644
--- a/libavcodec/srtdec.c
+++ b/libavcodec/srtdec.c
@@ -193,28 +193,6 @@ static const char *srt_to_ass(AVCodecContext *avctx, char 
*out, char *out_end,
 return in;
 }
 
-static const char *read_ts(const char *buf, int *ts_start, int *ts_end,
-   int *x1, int *y1, int *x2, int *y2)
-{
-int i, hs, ms, ss, he, me, se;
-
-for (i=0; i<2; i++) {
-/* try to read timestamps in either the first or second line */
-int c = sscanf(buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d"
-   "%*[ ]X1:%u X2:%u Y1:%u Y2:%u",
-   &hs, &ms, &ss, ts_start, &he, &me, &se, ts_end,
-   x1, x2, y1, y2);
-buf += strcspn(buf, "\n");
-buf += !!*buf;
-if (c >= 8) {
-*ts_start = 100*(ss + 60*(ms + 60*hs)) + *ts_start/10;
-*ts_end   = 100*(se + 60*(me + 60*he)) + *ts_end  /10;
-return buf;
-}
-}
-return NULL;
-}
-
 static int srt_decode_frame(AVCodecContext *avctx,
 void *data, int *got_sub_ptr, AVPacket *avpkt)
 {
@@ -237,11 +215,7 @@ static int srt_decode_frame(AVCodecContext *avctx,
 return avpkt->size;
 
 while (ptr < end && *ptr) {
-if (avctx->codec->id == AV_CODEC_ID_SRT) {
-ptr = read_ts(ptr, &ts_start, &ts_end, &x1, &y1, &x2, &y2);
-if (!ptr)
-break;
-} else {
+// TODO: reindent
 // Do final divide-by-10 outside rescale to force rounding down.
 ts_start = av_rescale_q(avpkt->pts,
 avctx->time_base,
@@ -249,7 +223,6 @@ static int srt_decode_frame(AVCodecContext *avctx,
 ts_end   = av_rescale_q(avpkt->pts + avpkt->duration,
 avctx->time_base,
 (AVRational){1,100});
-}
 ptr = srt_to_ass(avctx, buffer, buffer+sizeof(buffer), ptr,
  x1, y1, x2, y2);
 ff_ass_add_rect(sub, buffer, ts_start, ts_end-ts_start, 0);
@@ -263,9 +236,9 @@ static int srt_decode_frame(AVCodecContext *avctx,
 /* deprecated decoder */
 AVCodec ff_srt_decoder = {
 .name = "srt",
-.long_name= NULL_IF_CONFIG_SMALL("SubRip subtitle with embedded 
timing"),
+.long_name= NULL_IF_CONFIG_SMALL("SubRip subtitle"),
 .type = AVMEDIA_TYPE_SUBTITLE,
-.id   = AV_CODEC_ID_SRT,
+.id   = AV_CODEC_ID_SUBRIP,
 .init = ff_ass_subtitle_header_default,
 .decode   = srt_decode_frame,
 };
diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c
index 89c26dc..ad42ae3 100644
--- a/libavcodec/srtenc.c
+++ b/libavcodec/srtenc.c
@@ -33,8 +33,6 @@ typedef struct {
 AVCodecContext *avctx;
 ASSSplitContext *ass_ctx;
 AVBPrint buffer;
-unsigned timestamp_end;
-int count;
 char stack[SRT_STACK_SIZE];
 int stack_ptr;
 int alignment_applied;
@@ -198,38 +196,9 @@ static void srt_cancel_overrides_cb(void *priv, const char 
*style)
 srt_style_apply(priv, style);
 }
 
-static void srt_move_cb(void *priv, int x1, int y1, int x2, int y2,
-int t1, int t2)
-{
-SRTContext *s = priv;
-
-if (s->avctx->codec->id == AV_CODEC_ID_SRT) {
-char buffer[32];
-int len = snprintf(buffer, sizeof(buffer),
-   "  X1:%03u X2:%03u Y1:%03u Y2:%03u", x1, x2, y1, y2);
-unsigned char *dummy;
-unsigned room;
-
-av_bprint_get_buffer(&s->buffer, len, &dummy, &room);
-if (room >= len) {
-memmove(s->buffer.str + s->timestamp_end + len,
-s->buffer.str + s->timestamp_end,
-s->buffer.len - s->timestamp_end + 1);
-memcpy(s->buffer.str + s->timestamp_end, buffer, len);
-}
-/* Increment even if av_bprint_get_buffer() did not return enough room:
-   the bprint structure will be treated as truncated. */
-s->buffer.len += len;
-}
-}
-
 static void srt_end_cb(void *priv)
 {
-SRTContext *s = priv;
-
 srt_stack_push_pop(priv, 0, 1);
-if (s->avctx->codec->id == AV_CODEC_ID_SRT)
-srt_print(priv, "\r\n\r\n");
 }
 
 static const ASSCodesCallbacks srt_callbacks = {
@@ -241,7 +210,6 @@ static const ASSCodesCallbacks srt_callbacks = {
 .font_size= srt_font_size_cb,
 .alignment= srt_alignment_cb,
 .cancel_overrides = srt_cancel_overrides_cb,
-.move = srt_move_cb,
 .end  = srt_end_cb,
 };
 
@@ -263,19 +231,6 @@

[FFmpeg-devel] [PATCH 2/2] Kill timed SSA

2014-09-14 Thread Clément Bœsch
---
 libavcodec/Makefile  |  4 ++--
 libavcodec/assdec.c  | 60 +++-
 libavcodec/assenc.c  | 14 ++--
 libavformat/assenc.c | 14 
 libavformat/nut.c|  1 -
 5 files changed, 24 insertions(+), 69 deletions(-)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 43d73a7..539968a 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -133,9 +133,9 @@ OBJS-$(CONFIG_AMV_ENCODER) += mjpegenc.o 
mjpeg.o mjpegenc_common.o \
 OBJS-$(CONFIG_ANM_DECODER) += anm.o
 OBJS-$(CONFIG_ANSI_DECODER)+= ansi.o cga_data.o
 OBJS-$(CONFIG_APE_DECODER) += apedec.o
-OBJS-$(CONFIG_SSA_DECODER) += assdec.o ass.o ass_split.o
+OBJS-$(CONFIG_SSA_DECODER) += assdec.o ass.o
 OBJS-$(CONFIG_SSA_ENCODER) += assenc.o ass.o
-OBJS-$(CONFIG_ASS_DECODER) += assdec.o ass.o ass_split.o
+OBJS-$(CONFIG_ASS_DECODER) += assdec.o ass.o
 OBJS-$(CONFIG_ASS_ENCODER) += assenc.o ass.o
 OBJS-$(CONFIG_ASV1_DECODER)+= asvdec.o asv.o mpeg12data.o
 OBJS-$(CONFIG_ASV1_ENCODER)+= asvenc.o asv.o mpeg12data.o
diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c
index 11dbde0..624052e 100644
--- a/libavcodec/assdec.c
+++ b/libavcodec/assdec.c
@@ -23,7 +23,6 @@
 
 #include "avcodec.h"
 #include "ass.h"
-#include "ass_split.h"
 #include "libavutil/internal.h"
 #include "libavutil/mem.h"
 
@@ -35,55 +34,9 @@ static av_cold int ass_decode_init(AVCodecContext *avctx)
 memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);
 avctx->subtitle_header[avctx->extradata_size] = 0;
 avctx->subtitle_header_size = avctx->extradata_size;
-avctx->priv_data = ff_ass_split(avctx->extradata);
-if(!avctx->priv_data)
-return -1;
 return 0;
 }
 
-static int ass_decode_close(AVCodecContext *avctx)
-{
-ff_ass_split_free(avctx->priv_data);
-avctx->priv_data = NULL;
-return 0;
-}
-
-#if CONFIG_SSA_DECODER
-static int ssa_decode_frame(AVCodecContext *avctx, void *data, int 
*got_sub_ptr,
-AVPacket *avpkt)
-{
-const char *ptr = avpkt->data;
-int len, size = avpkt->size;
-
-while (size > 0) {
-int duration;
-ASSDialog *dialog = ff_ass_split_dialog(avctx->priv_data, ptr, 0, 
NULL);
-if (!dialog)
-return AVERROR_INVALIDDATA;
-duration = dialog->end - dialog->start;
-len = ff_ass_add_rect(data, ptr, 0, duration, 1);
-if (len < 0)
-return len;
-ptr  += len;
-size -= len;
-}
-
-*got_sub_ptr = avpkt->size > 0;
-return avpkt->size;
-}
-
-AVCodec ff_ssa_decoder = {
-.name = "ssa",
-.long_name= NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),
-.type = AVMEDIA_TYPE_SUBTITLE,
-.id   = AV_CODEC_ID_SSA,
-.init = ass_decode_init,
-.decode   = ssa_decode_frame,
-.close= ass_decode_close,
-};
-#endif
-
-#if CONFIG_ASS_DECODER
 static int ass_decode_frame(AVCodecContext *avctx, void *data, int 
*got_sub_ptr,
 AVPacket *avpkt)
 {
@@ -108,6 +61,18 @@ static int ass_decode_frame(AVCodecContext *avctx, void 
*data, int *got_sub_ptr,
 return avpkt->size;
 }
 
+#if CONFIG_SSA_DECODER
+AVCodec ff_ssa_decoder = {
+.name = "ssa",
+.long_name= NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) 
subtitle"),
+.type = AVMEDIA_TYPE_SUBTITLE,
+.id   = AV_CODEC_ID_ASS,
+.init = ass_decode_init,
+.decode   = ass_decode_frame,
+};
+#endif
+
+#if CONFIG_ASS_DECODER
 AVCodec ff_ass_decoder = {
 .name = "ass",
 .long_name= NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) 
subtitle"),
@@ -115,6 +80,5 @@ AVCodec ff_ass_decoder = {
 .id   = AV_CODEC_ID_ASS,
 .init = ass_decode_init,
 .decode   = ass_decode_frame,
-.close= ass_decode_close,
 };
 #endif
diff --git a/libavcodec/assenc.c b/libavcodec/assenc.c
index 5dc3b09..06aa916 100644
--- a/libavcodec/assenc.c
+++ b/libavcodec/assenc.c
@@ -22,7 +22,6 @@
 #include 
 
 #include "avcodec.h"
-#include "ass_split.h"
 #include "ass.h"
 #include "libavutil/avstring.h"
 #include "libavutil/internal.h"
@@ -53,6 +52,8 @@ static int ass_encode_frame(AVCodecContext *avctx,
 for (i=0; inum_rects; i++) {
 char ass_line[2048];
 const char *ass = sub->rects[i]->ass;
+long int layer;
+char *p;
 
 if (sub->rects[i]->type != SUBTITLE_ASS) {
 av_log(avctx, AV_LOG_ERROR, "Only SUBTITLE_ASS type supported.\n");
@@ -65,10 +66,7 @@ static int ass_encode_frame(AVCodecContext *avctx,
 return AVERROR_INVALIDDATA;
 }
 
-if (avctx->codec->id == AV_CODEC_ID_ASS) {
-long int layer;
-char *p;
-
+// TODO: reindent
 if (i >

[FFmpeg-devel] headers

2014-09-14 Thread Marcus Johnson
None of the other message groups will respond so I'm posting here.

I've included /usr/local/include/libavformat in my header search path, and
xcode finds avformat.h fine, but it can't find avcodec.h

also, your time.h header in libavutil is taking precedence over the system
time.h header, and it's giving me errors and idk how to fix that either,
I've tried making it search the system headers first by moving the ffmpeg
header folders to the bottom of the list and it's not working.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] headers

2014-09-14 Thread Timothy Gu
On Sep 14, 2014 1:14 PM, "Marcus Johnson" 
wrote:
>
> None of the other message groups will respond so I'm posting here.
>
> I've included /usr/local/include/libavformat in my header search path, and
> xcode finds avformat.h fine, but it can't find avcodec.h
>
> also, your time.h header in libavutil is taking precedence over the system
> time.h header, and it's giving me errors and idk how to fix that either,
> I've tried making it search the system headers first by moving the ffmpeg
> header folders to the bottom of the list and it's not working.

You should never put libav* into your search path. do

#include 

and

#include 

Timothy
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Branchpoint tags

2014-09-14 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 07:31:42PM +0200, wm4 wrote:
> On Sun, 14 Sep 2014 19:12:56 +0200
> Michael Niedermayer  wrote:
> 
> > Hi
> > 
> > Should we add git tags to the revissions where releases are branched
> > off ?
> > 
> > that way a "git describe" on master would look like:
> > n2.5-dev-3-gb227be3
> > instead of:
> > n2.0-11670-gb227be3
> > 
> > (or any other tag than n2.5-dev that we choose)
> > 
> > it would not affect the "./version.sh" output
> > 
> 
> That sounds like an interesting idea. But just using the release tag
> name and appending "-dev" might be harmful for scripts which try to
> automatically pickup the latest version or such.

what tag name would you suggest ?
(note we cannot really change it once we create and push these tags)

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable


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/me_cmp: port mmxext and sse2 sad functions to yasm

2014-09-14 Thread Michael Niedermayer
On Sat, Sep 13, 2014 at 10:12:12PM -0300, James Almer wrote:
> Also add a missing c->pix_abs[0][0] initialization, and sse2 versions of
> sad16_x2, sad16_y2 and sad16_xy2.
> Since the _xy2 versions are not bitexact, they are accordingly marked as
> approximate.
> 
> Signed-off-by: James Almer 
> ---

> Not benched.

if the author of some code doesnt benchmark his code, how can he know
which way it is faster ?
what effect each difference has ? ...


> 
>  libavcodec/x86/me_cmp.asm| 229 
> +++
>  libavcodec/x86/me_cmp_init.c | 203 +-
>  2 files changed, 278 insertions(+), 154 deletions(-)
> 
> diff --git a/libavcodec/x86/me_cmp.asm b/libavcodec/x86/me_cmp.asm
> index b0741f3..68dc701 100644
> --- a/libavcodec/x86/me_cmp.asm
> +++ b/libavcodec/x86/me_cmp.asm
> @@ -23,6 +23,10 @@
>  
>  %include "libavutil/x86/x86util.asm"
>  
> +SECTION_RODATA
> +
> +cextern pb_1
> +
>  SECTION .text
>  
>  %macro DIFF_PIXELS_1 4
> @@ -465,3 +469,228 @@ cglobal hf_noise%1, 3,3,0, pix1, lsize, h
>  INIT_MMX mmx
>  HF_NOISE 8
>  HF_NOISE 16
> +
> +;---
> +;int ff_sad_(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int 
> stride, int h);
> +;---
> +%macro SAD 1
> +cglobal sad%1, 5, 5, 3, v, pix1, pix2, stride, h
> +%if %1 == mmsize
> +shr hd, 1
> +%define STRIDE strideq
> +%else
> +%define STRIDE 8
> +%endif
> +pxor  m2, m2
> +
> +align 16
> +.loop
> +movu  m0, [pix2q]
> +movu  m1, [pix2q+STRIDE]
> +psadbwm0, [pix1q]
> +psadbwm1, [pix1q+STRIDE]
> +paddw m2, m0
> +paddw m2, m1
> +%if %1 == mmsize
> +leapix1q, [pix1q+strideq*2]
> +leapix2q, [pix2q+strideq*2]
> +%else
> +addpix1q, strideq
> +addpix2q, strideq
> +%endif

> +dec   hd
> +jg .loop

the other loops use jnz, why the difference ?



> +%if mmsize == 16
> +movhlps   m0, m2
> +paddw m2, m0
> +%endif
> +movd eax, m2
> +RET
> +%endmacro
> +
> +INIT_MMX mmxext
> +SAD 8
> +SAD 16
> +INIT_XMM sse2
> +SAD 16
> +
> +;--
> +;int ff_sad_x2_(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int 
> stride, int h);
> +;--
> +%macro SAD_X2 1
> +cglobal sad%1_x2, 5, 5, 5, v, pix1, pix2, stride, h
> +%if %1 == mmsize
> +shr   hd, 1
> +%define STRIDE strideq
> +%else
> +%define STRIDE 8
> +%endif
> +pxor  m0, m0
> +

> +align 16

do these improve or reduce the speed ?



> +.loop:
> +movu  m1, [pix2q]
> +movu  m2, [pix2q+STRIDE]
> +%if cpuflag(sse2)
> +movu  m3, [pix2q+1]
> +movu  m4, [pix2q+STRIDE+1]
> +pavgb m1, m3
> +pavgb m2, m4
> +%else
> +pavgb m1, [pix2q+1]
> +pavgb m2, [pix2q+STRIDE+1]
> +%endif
> +psadbwm1, [pix1q]
> +psadbwm2, [pix1q+STRIDE]
> +paddw m0, m1
> +paddw m0, m2
> +%if %1 == mmsize
> +leapix1q, [pix1q+2*strideq]
> +leapix2q, [pix2q+2*strideq]
> +%else
> +addpix1q, strideq
> +addpix2q, strideq
> +%endif

> +dec   hd

dec/inc has some speed penalties on some cpus
see 16.2 in http://www.agner.org/optimize/optimizing_assembly.pdf


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] x86/me_cmp: port mmxext and sse2 sad functions to yasm

2014-09-14 Thread James Almer
On 14/09/14 7:12 PM, Michael Niedermayer wrote:
> On Sat, Sep 13, 2014 at 10:12:12PM -0300, James Almer wrote:
>> Also add a missing c->pix_abs[0][0] initialization, and sse2 versions of
>> sad16_x2, sad16_y2 and sad16_xy2.
>> Since the _xy2 versions are not bitexact, they are accordingly marked as
>> approximate.
>>
>> Signed-off-by: James Almer 
>> ---
> 
>> Not benched.
> 
> if the author of some code doesnt benchmark his code, how can he know
> which way it is faster ?
> what effect each difference has ? ...

I didn't bench because i didn't have the time and assumed it wasn't necessary 
considering this is a port from inline to yasm with little to no changes to 
the asm.
I'll try to do some quick benchmarks later.

> 
> 
>>
>>  libavcodec/x86/me_cmp.asm| 229 
>> +++
>>  libavcodec/x86/me_cmp_init.c | 203 +-
>>  2 files changed, 278 insertions(+), 154 deletions(-)
>>
>> diff --git a/libavcodec/x86/me_cmp.asm b/libavcodec/x86/me_cmp.asm
>> index b0741f3..68dc701 100644
>> --- a/libavcodec/x86/me_cmp.asm
>> +++ b/libavcodec/x86/me_cmp.asm
>> @@ -23,6 +23,10 @@
>>  
>>  %include "libavutil/x86/x86util.asm"
>>  
>> +SECTION_RODATA
>> +
>> +cextern pb_1
>> +
>>  SECTION .text
>>  
>>  %macro DIFF_PIXELS_1 4
>> @@ -465,3 +469,228 @@ cglobal hf_noise%1, 3,3,0, pix1, lsize, h
>>  INIT_MMX mmx
>>  HF_NOISE 8
>>  HF_NOISE 16
>> +
>> +;---
>> +;int ff_sad_(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int 
>> stride, int h);
>> +;---
>> +%macro SAD 1
>> +cglobal sad%1, 5, 5, 3, v, pix1, pix2, stride, h
>> +%if %1 == mmsize
>> +shr hd, 1
>> +%define STRIDE strideq
>> +%else
>> +%define STRIDE 8
>> +%endif
>> +pxor  m2, m2
>> +
>> +align 16
>> +.loop
>> +movu  m0, [pix2q]
>> +movu  m1, [pix2q+STRIDE]
>> +psadbwm0, [pix1q]
>> +psadbwm1, [pix1q+STRIDE]
>> +paddw m2, m0
>> +paddw m2, m1
>> +%if %1 == mmsize
>> +leapix1q, [pix1q+strideq*2]
>> +leapix2q, [pix2q+strideq*2]
>> +%else
>> +addpix1q, strideq
>> +addpix2q, strideq
>> +%endif
> 
>> +dec   hd
>> +jg .loop
> 
> the other loops use jnz, why the difference ?
> 

Probably a copy-paste remnant. I'll make them consistent.

> 
> 
>> +%if mmsize == 16
>> +movhlps   m0, m2
>> +paddw m2, m0
>> +%endif
>> +movd eax, m2
>> +RET
>> +%endmacro
>> +
>> +INIT_MMX mmxext
>> +SAD 8
>> +SAD 16
>> +INIT_XMM sse2
>> +SAD 16
>> +
>> +;--
>> +;int ff_sad_x2_(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int 
>> stride, int h);
>> +;--
>> +%macro SAD_X2 1
>> +cglobal sad%1_x2, 5, 5, 5, v, pix1, pix2, stride, h
>> +%if %1 == mmsize
>> +shr   hd, 1
>> +%define STRIDE strideq
>> +%else
>> +%define STRIDE 8
>> +%endif
>> +pxor  m0, m0
>> +
> 
>> +align 16
> 
> do these improve or reduce the speed ?

No idea. I copied them from the inline version (where they were ".p2align 4") 
to keep the resulting asm as similar as possible.
I'll check nonetheless.

> 
> 
> 
>> +.loop:
>> +movu  m1, [pix2q]
>> +movu  m2, [pix2q+STRIDE]
>> +%if cpuflag(sse2)
>> +movu  m3, [pix2q+1]
>> +movu  m4, [pix2q+STRIDE+1]
>> +pavgb m1, m3
>> +pavgb m2, m4
>> +%else
>> +pavgb m1, [pix2q+1]
>> +pavgb m2, [pix2q+STRIDE+1]
>> +%endif
>> +psadbwm1, [pix1q]
>> +psadbwm2, [pix1q+STRIDE]
>> +paddw m0, m1
>> +paddw m0, m2
>> +%if %1 == mmsize
>> +leapix1q, [pix1q+2*strideq]
>> +leapix2q, [pix2q+2*strideq]
>> +%else
>> +addpix1q, strideq
>> +addpix2q, strideq
>> +%endif
> 
>> +dec   hd
> 
> dec/inc has some speed penalties on some cpus
> see 16.2 in http://www.agner.org/optimize/optimizing_assembly.pdf

Ok, i'll use sub then.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [WIP] lavfi: port mp/eq to a regular filter

2014-09-14 Thread James Darnley
---

Still a couple of things on the todo list (see the top of the new file) but I
thought I would send the basics along for people to nit pick.

 configure|   1 +
 libavfilter/Makefile |   1 +
 libavfilter/allfilters.c |   1 +
 libavfilter/vf_eq.c  | 157 +++
 4 files changed, 160 insertions(+)
 create mode 100644 libavfilter/vf_eq.c

diff --git a/configure b/configure
index b39b6d3..e49894d 100755
--- a/configure
+++ b/configure
@@ -2549,6 +2549,7 @@ delogo_filter_deps="gpl"
 deshake_filter_select="pixelutils"
 drawtext_filter_deps="libfreetype"
 ebur128_filter_deps="gpl"
+eq_filter_deps="gpl"
 flite_filter_deps="libflite"
 frei0r_filter_deps="frei0r dlopen"
 frei0r_filter_extralibs='$ldl'
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 3241b76..d643b4b 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -116,6 +116,7 @@ OBJS-$(CONFIG_DRAWGRID_FILTER)   += vf_drawbox.o
 OBJS-$(CONFIG_DRAWTEXT_FILTER)   += vf_drawtext.o
 OBJS-$(CONFIG_ELBG_FILTER)   += vf_elbg.o
 OBJS-$(CONFIG_EDGEDETECT_FILTER) += vf_edgedetect.o
+OBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
 OBJS-$(CONFIG_EXTRACTPLANES_FILTER)  += vf_extractplanes.o
 OBJS-$(CONFIG_FADE_FILTER)   += vf_fade.o
 OBJS-$(CONFIG_FIELD_FILTER)  += vf_field.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 670f2d1..fa4e73b 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -134,6 +134,7 @@ void avfilter_register_all(void)
 REGISTER_FILTER(DRAWTEXT,   drawtext,   vf);
 REGISTER_FILTER(EDGEDETECT, edgedetect, vf);
 REGISTER_FILTER(ELBG,   elbg,   vf);
+REGISTER_FILTER(EQ, eq, vf);
 REGISTER_FILTER(EXTRACTPLANES,  extractplanes,  vf);
 REGISTER_FILTER(FADE,   fade,   vf);
 REGISTER_FILTER(FIELD,  field,  vf);
diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c
new file mode 100644
index 000..2dc21dc
--- /dev/null
+++ b/libavfilter/vf_eq.c
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2014 James Darnley 
+ *
+ * Original MPlayer filter by Richard Felker.
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/**
+ * @file
+ * very simple video equalizer
+ */
+
+/* TODO:
+ * - change the options to be floats and change scale to -1..1
+ * - copy chroma plane pointers rather than data
+ * - use SIMD
+ * - support alpha channels
+ */
+
+#include "libavfilter/internal.h"
+#include "libavutil/common.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
+
+typedef struct {
+const AVClass *class;
+int brightness;
+int contrast;
+} EQContext;
+
+static int query_formats(AVFilterContext *ctx)
+{
+static const enum AVPixelFormat pixel_fmts[] = {
+/* Only IMGFMT_CLPL is missing. */
+AV_PIX_FMT_GRAY8,
+AV_PIX_FMT_NV12,
+AV_PIX_FMT_NV21,
+AV_PIX_FMT_YUV410P,
+AV_PIX_FMT_YUV411P,
+AV_PIX_FMT_YUV420P,
+AV_PIX_FMT_YUV422P,
+AV_PIX_FMT_YUV444P,
+AV_PIX_FMT_NONE
+};
+
+ff_set_common_formats(ctx, ff_make_format_list(pixel_fmts));
+
+return 0;
+}
+
+static void process_c(uint8_t *dst, int dst_stride, uint8_t *src, int 
src_stride,
+int w, int h, int brightness, int contrast)
+{
+int x, y, pel;
+
+contrast = ((contrast + 100) * 256 * 256) / 100;
+brightness = ((brightness + 100) * 511) / 200 - 128 - contrast / 512;
+
+for (y = 0; y < h; y++) {
+for (x = 0; x < w; x++) {
+pel = ((src[y * src_stride + x] * contrast) >> 16) + brightness;
+
+if (pel & 768)
+pel = (-pel) >> 31;
+
+dst[y * dst_stride + x] = pel;
+}
+}
+}
+
+static int filter_frame(AVFilterLink *inlink, AVFrame *in)
+{
+AVFilterContext *ctx = inlink->dst;
+AVFilterLink *outlink = inlink->dst->outputs[0];
+EQContext *eq = ctx->priv;
+AVFrame *out;
+const AVPixFmtDescriptor *csp;
+int i;
+
+if (eq->brightness == 0 && eq->contrast == 0)
+return ff_filter_frame(outlink, in);
+
+out = ff_get_video_buffer(out

Re: [FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges

2014-09-14 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 03:37:00PM +0300, Mika Raento wrote:
> This adds a new option -hls_flags single_file that creates one .ts file
> for HLS and adds byteranges to the .m3u8 file, instead of creating one
> .ts file for each segment.
> 
> This is helpful at least for storing large number of videos, as the
> number of files per video is drastically reduced and copying and storing
> those files takes less requests and inodes.
> 
> This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel
> in July 2014. That patch seems abandoned by the author, and contained
> unrelated changes. This patch tries to add the minimum amount of code to
> support the byterange playlists.
> ---
>  doc/muxers.texi  | 23 +++
>  libavformat/hlsenc.c | 65 
> ++--
>  2 files changed, 72 insertions(+), 16 deletions(-)
> 
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index 57e81f4..40ae857 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -194,15 +194,19 @@ can not be smaller than one centi second.
>  Apple HTTP Live Streaming muxer that segments MPEG-TS according to
>  the HTTP Live Streaming (HLS) specification.
>  
> -It creates a playlist file and numbered segment files. The output
> -filename specifies the playlist filename; the segment filenames
> -receive the same basename as the playlist, a sequential number and
> -a .ts extension.
> +It creates a playlist file, and one or more segment files. The output 
> filename
> +specifies the playlist filename.
> +
> +By default, the muxer creates a file for each segment produced. These files
> +have the same name as the playlist, followed by a sequential number and a
> +.ts extension.
>  
>  For example, to convert an input file with @command{ffmpeg}:
>  @example
>  ffmpeg -i in.nut out.m3u8
>  @end example
> +This example will produce the playlist, @file{out.m3u8}, and segment files:
> +@file{out0.ts}, @file{out1.ts}, @file{out2.ts}, etc.
>  
>  See also the @ref{segment} muxer, which provides a more generic and
>  flexible implementation of a segmenter, and can be used to perform HLS
> @@ -241,6 +245,17 @@ Note that the playlist sequence number must be unique 
> for each segment
>  and it is not to be confused with the segment filename sequence number
>  which can be cyclic, for example if the @option{wrap} option is
>  specified.
> +
> +@item hls_flags single_file
> +If this flag is set, the muxer will store all segments in a single MPEG-TS
> +file, and will use byte ranges in the playlist. HLS playlists generated with
> +this way will have the version number 4.
> +For example:
> +@example
> +ffmpeg -i in.nut -hls_flags single_file out.m3u8
> +@end example
> +Will produce the playlist, @file{out.m3u8}, and a single segment file,
> +@file{out.ts}.
>  @end table
>  
>  @anchor{ico}
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 11f1e5b..9fcb999 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -34,10 +34,17 @@
>  typedef struct HLSSegment {
>  char filename[1024];
>  double duration; /* in seconds */
> +int64_t pos;
> +int64_t size;
>  
>  struct HLSSegment *next;
>  } HLSSegment;
>  
> +typedef enum HLSFlags {
> +// Generate a single media file and use byte ranges in the playlist.
> +HLS_SINGLE_FILE = (1 << 0),
> +} HLSFlags;
> +
>  typedef struct HLSContext {
>  const AVClass *class;  // Class for private options.
>  unsigned number;
> @@ -50,12 +57,15 @@ typedef struct HLSContext {
>  float time;// Set by a private option.
>  int max_nb_segments;   // Set by a private option.
>  int  wrap; // Set by a private option.
> +uint32_t flags;// enum HLSFlags
>  
>  int64_t recording_time;
>  int has_video;
>  int64_t start_pts;
>  int64_t end_pts;
>  double duration;  // last segment duration computed so far, in 
> seconds
> +int64_t start_pos;// last segment starting position
> +int64_t size; // last segment size
>  int nb_entries;
>  
>  HLSSegment *segments;
> @@ -88,12 +98,14 @@ static int hls_mux_init(AVFormatContext *s)
>  avcodec_copy_context(st->codec, s->streams[i]->codec);
>  st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
>  }
> +hls->start_pos = 0;
>  
>  return 0;
>  }
>  
>  /* Create a new segment and append it to the segment list */
> -static int hls_append_segment(HLSContext *hls, double duration)
> +static int hls_append_segment(HLSContext *hls, double duration, int64_t pos,
> +  int64_t size)
>  {
>  HLSSegment *en = av_malloc(sizeof(*en));
>  
> @@ -103,6 +115,8 @@ static int hls_append_segment(HLSContext *hls, double 
> duration)
>  av_strlcpy(en->filename, av_basename(hls->avf->filename), 
> sizeof(en->filename));
>  
>  en->duration = duration;
> +en->pos  = pos;
> +en->size = size;
>  en->next =

Re: [FFmpeg-devel] [PATCH] x86/me_cmp: port mmxext and sse2 sad functions to yasm

2014-09-14 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 07:35:26PM -0300, James Almer wrote:
> On 14/09/14 7:12 PM, Michael Niedermayer wrote:
> > On Sat, Sep 13, 2014 at 10:12:12PM -0300, James Almer wrote:
> >> Also add a missing c->pix_abs[0][0] initialization, and sse2 versions of
> >> sad16_x2, sad16_y2 and sad16_xy2.
> >> Since the _xy2 versions are not bitexact, they are accordingly marked as
> >> approximate.
> >>
> >> Signed-off-by: James Almer 
> >> ---
> > 
> >> Not benched.
> > 
> > if the author of some code doesnt benchmark his code, how can he know
> > which way it is faster ?
> > what effect each difference has ? ...
> 
> I didn't bench because i didn't have the time and assumed it wasn't necessary 
> considering this is a port from inline to yasm with little to no changes to 
> the asm.
> I'll try to do some quick benchmarks later.

[...]

> > 
> > 
> >> +%if mmsize == 16
> >> +movhlps   m0, m2
> >> +paddw m2, m0
> >> +%endif
> >> +movd eax, m2
> >> +RET
> >> +%endmacro
> >> +
> >> +INIT_MMX mmxext
> >> +SAD 8
> >> +SAD 16
> >> +INIT_XMM sse2
> >> +SAD 16
> >> +
> >> +;--
> >> +;int ff_sad_x2_(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int 
> >> stride, int h);
> >> +;--
> >> +%macro SAD_X2 1
> >> +cglobal sad%1_x2, 5, 5, 5, v, pix1, pix2, stride, h
> >> +%if %1 == mmsize
> >> +shr   hd, 1
> >> +%define STRIDE strideq
> >> +%else
> >> +%define STRIDE 8
> >> +%endif
> >> +pxor  m0, m0
> >> +
> > 
> >> +align 16
> > 
> > do these improve or reduce the speed ?
> 
> No idea. I copied them from the inline version (where they were ".p2align 4") 
> to keep the resulting asm as similar as possible.

ahh ok, ive not realized that
if its just the same as before then its ok

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avcodec: remove dead dsputil compat code

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
This should have been done before 2.4 was cut since the two files are pretty 
much
bloat in the tar file now.
We can still cherry pick this for 2.4.1, though.

 libavcodec/Makefile |  2 +-
 libavcodec/dsputil.h| 87 -
 libavcodec/dsputil_compat.c | 56 -
 libavcodec/version.h|  3 --
 4 files changed, 1 insertion(+), 147 deletions(-)
 delete mode 100644 libavcodec/dsputil.h
 delete mode 100644 libavcodec/dsputil_compat.c

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 43d73a7..10bd5e6 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -70,7 +70,7 @@ OBJS-$(CONFIG_LLVIDDSP)+= lossless_videodsp.o
 OBJS-$(CONFIG_LPC) += lpc.o
 OBJS-$(CONFIG_LSP) += lsp.o
 OBJS-$(CONFIG_MDCT)+= mdct_fixed.o mdct_float.o 
mdct_fixed_32.o
-OBJS-$(CONFIG_ME_CMP)  += me_cmp.o dsputil_compat.o
+OBJS-$(CONFIG_ME_CMP)  += me_cmp.o
 OBJS-$(CONFIG_MPEG_ER) += mpeg_er.o
 OBJS-$(CONFIG_MPEGAUDIO)   += mpegaudio.o mpegaudiodata.o   \
   mpegaudiodecheader.o
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
deleted file mode 100644
index 2f4be85..000
--- a/libavcodec/dsputil.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * DSP utils
- * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
- * Copyright (c) 2002-2004 Michael Niedermayer 
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file
- * DSP utils.
- * This is deprecated
- */
-
-#ifndef AVCODEC_DSPUTIL_H
-#define AVCODEC_DSPUTIL_H
-
-#include "avcodec.h"
-#include "version.h"
-#include "me_cmp.h"
-
-#if FF_API_DSPUTIL
-
-/* minimum alignment rules ;)
- * If you notice errors in the align stuff, need more alignment for some ASM 
code
- * for some CPU or need to use a function with less aligned data then send a 
mail
- * to the ffmpeg-devel mailing list, ...
- *
- * !warning These alignments might not match reality, (missing 
attribute((align))
- * stuff somewhere possible).
- * I (Michael) did not check them, these are just the alignments which I think
- * could be reached easily ...
- *
- * !future video codecs might need functions with less strict alignment
- */
-
-struct MpegEncContext;
-
-/**
- * DSPContext.
- */
-typedef struct DSPContext {
-int (*sum_abs_dctelem)(int16_t *block /* align 16 */);
-
-me_cmp_func sad[6]; /* identical to pix_absAxA except additional void * */
-me_cmp_func sse[6];
-me_cmp_func hadamard8_diff[6];
-me_cmp_func dct_sad[6];
-me_cmp_func quant_psnr[6];
-me_cmp_func bit[6];
-me_cmp_func rd[6];
-me_cmp_func vsad[6];
-me_cmp_func vsse[6];
-me_cmp_func nsse[6];
-me_cmp_func w53[6];
-me_cmp_func w97[6];
-me_cmp_func dct_max[6];
-me_cmp_func dct264_sad[6];
-
-me_cmp_func me_pre_cmp[6];
-me_cmp_func me_cmp[6];
-me_cmp_func me_sub_cmp[6];
-me_cmp_func mb_cmp[6];
-me_cmp_func ildct_cmp[6]; // only width 16 used
-me_cmp_func frame_skip_cmp[6]; // only width 8 used
-
-me_cmp_func pix_abs[2][4];
-} DSPContext;
-
-attribute_deprecated void avpriv_dsputil_init(DSPContext* p, AVCodecContext 
*avctx);
-
-#endif
-#endif /* AVCODEC_DSPUTIL_H */
diff --git a/libavcodec/dsputil_compat.c b/libavcodec/dsputil_compat.c
deleted file mode 100644
index 7ac1099..000
--- a/libavcodec/dsputil_compat.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * DSP utils
- *
- * 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

Re: [FFmpeg-devel] [WIP] lavfi: port mp/eq to a regular filter

2014-09-14 Thread Timothy Gu
On Sep 14, 2014 3:46 PM, "James Darnley"  wrote:
>
> ---
>
> Still a couple of things on the todo list (see the top of the new file)
but I
> thought I would send the basics along for people to nit pick.
>
>  configure|   1 +
>  libavfilter/Makefile |   1 +
>  libavfilter/allfilters.c |   1 +
>  libavfilter/vf_eq.c  | 157
+++
>  4 files changed, 160 insertions(+)
>  create mode 100644 libavfilter/vf_eq.c

[...]

> +#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
> +static const AVOption eq_options[] = {
> +{ "brightness", "", OFFSET(brightness), AV_OPT_TYPE_INT, {.i64 = 0},
-100, 100, FLAGS },
> +{ "contrast",   "", OFFSET(contrast),   AV_OPT_TYPE_INT, {.i64 = 0},
-100, 100, FLAGS },
> +{ NULL }
> +};

Can vf_hue be improved to support changing contrast instead of writing a
new filter just for that?

Timothy
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec: remove dead dsputil compat code

2014-09-14 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 08:47:11PM -0300, James Almer wrote:
> Signed-off-by: James Almer 
> ---

should be ok


> This should have been done before 2.4 was cut since the two files are pretty 
> much
> bloat in the tar file now.

> We can still cherry pick this for 2.4.1, though.

removing a header is not ok in a point release, even if its a empty
header, it could break build of an application

[...]
-- 
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] avcodec: remove dead dsputil compat code

2014-09-14 Thread James Almer
On 14/09/14 9:38 PM, Michael Niedermayer wrote:
> On Sun, Sep 14, 2014 at 08:47:11PM -0300, James Almer wrote:
>> Signed-off-by: James Almer 
>> ---
> 
> should be ok

Pushed. Thanks.

> 
> 
>> This should have been done before 2.4 was cut since the two files are pretty 
>> much
>> bloat in the tar file now.
> 
>> We can still cherry pick this for 2.4.1, though.
> 
> removing a header is not ok in a point release, even if its a empty
> header, it could break build of an application

It's not an installed header, but i guess applications that compile ffmpeg 
straight 
from the tree could be potentially affected.

> 
> [...]
> 
> 
> 
> ___
> 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 2/18] avutil: remove obsolete FF_API_GET_BITS_PER_SAMPLE_FMT cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavutil/samplefmt.c | 8 
 libavutil/samplefmt.h | 8 
 libavutil/version.h   | 3 ---
 3 files changed, 19 deletions(-)

diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c
index a198698..3d415a1 100644
--- a/libavutil/samplefmt.c
+++ b/libavutil/samplefmt.c
@@ -107,14 +107,6 @@ int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
 0 : sample_fmt_info[sample_fmt].bits >> 3;
 }
 
-#if FF_API_GET_BITS_PER_SAMPLE_FMT
-int av_get_bits_per_sample_fmt(enum AVSampleFormat sample_fmt)
-{
-return sample_fmt < 0 || sample_fmt >= AV_SAMPLE_FMT_NB ?
-0 : sample_fmt_info[sample_fmt].bits;
-}
-#endif
-
 int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
 {
  if (sample_fmt < 0 || sample_fmt >= AV_SAMPLE_FMT_NB)
diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h
index 2c346a3..6a8a031 100644
--- a/libavutil/samplefmt.h
+++ b/libavutil/samplefmt.h
@@ -129,14 +129,6 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum 
AVSampleFormat sample_fmt);
  */
 char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat 
sample_fmt);
 
-#if FF_API_GET_BITS_PER_SAMPLE_FMT
-/**
- * @deprecated Use av_get_bytes_per_sample() instead.
- */
-attribute_deprecated
-int av_get_bits_per_sample_fmt(enum AVSampleFormat sample_fmt);
-#endif
-
 /**
  * Return number of bytes per sample.
  *
diff --git a/libavutil/version.h b/libavutil/version.h
index 8311cdd..de62b1d 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -80,9 +80,6 @@
  * @{
  */
 
-#ifndef FF_API_GET_BITS_PER_SAMPLE_FMT
-#define FF_API_GET_BITS_PER_SAMPLE_FMT (LIBAVUTIL_VERSION_MAJOR < 54)
-#endif
 #ifndef FF_API_FIND_OPT
 #define FF_API_FIND_OPT (LIBAVUTIL_VERSION_MAJOR < 54)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 4/18] avutil: remove obsolete FF_API_SAMPLES_UTILS_RETURN_ZERO cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavutil/samplefmt.c | 8 
 libavutil/version.h   | 3 ---
 2 files changed, 11 deletions(-)

diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c
index 3d415a1..c605b5e 100644
--- a/libavutil/samplefmt.c
+++ b/libavutil/samplefmt.c
@@ -165,11 +165,7 @@ int av_samples_fill_arrays(uint8_t **audio_data, int 
*linesize,
 if (linesize)
 *linesize = line_size;
 
-#if FF_API_SAMPLES_UTILS_RETURN_ZERO
-return 0;
-#else
 return buf_size;
-#endif
 }
 
 int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
@@ -194,11 +190,7 @@ int av_samples_alloc(uint8_t **audio_data, int *linesize, 
int nb_channels,
 
 av_samples_set_silence(audio_data, 0, nb_samples, nb_channels, sample_fmt);
 
-#if FF_API_SAMPLES_UTILS_RETURN_ZERO
-return 0;
-#else
 return size;
-#endif
 }
 
 int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, 
int nb_channels,
diff --git a/libavutil/version.h b/libavutil/version.h
index 3930763..d6f8fe1 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -101,9 +101,6 @@
 #ifndef FF_API_CPU_FLAG_MMX2
 #define FF_API_CPU_FLAG_MMX2(LIBAVUTIL_VERSION_MAJOR < 55)
 #endif
-#ifndef FF_API_SAMPLES_UTILS_RETURN_ZERO
-#define FF_API_SAMPLES_UTILS_RETURN_ZERO (LIBAVUTIL_VERSION_MAJOR < 54)
-#endif
 #ifndef FF_API_LLS_PRIVATE
 #define FF_API_LLS_PRIVATE  (LIBAVUTIL_VERSION_MAJOR < 55)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/18] avcodec: remove obsolete FF_API_FAST_MALLOC cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavcodec/avcodec.h | 5 -
 libavcodec/version.h | 3 ---
 2 files changed, 8 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index fb1c9ca..e59e351 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -42,11 +42,6 @@
 
 #include "version.h"
 
-#if FF_API_FAST_MALLOC
-// to provide fast_*alloc
-#include "libavutil/mem.h"
-#endif
-
 /**
  * @defgroup libavc Encoding/Decoding Library
  * @{
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 7b30334..5a3d342 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -132,9 +132,6 @@
 #ifndef FF_API_MAX_BFRAMES
 #define FF_API_MAX_BFRAMES   (LIBAVCODEC_VERSION_MAJOR < 57)
 #endif
-#ifndef FF_API_FAST_MALLOC
-#define FF_API_FAST_MALLOC   (LIBAVCODEC_VERSION_MAJOR < 56)
-#endif
 #ifndef FF_API_NEG_LINESIZES
 #define FF_API_NEG_LINESIZES (LIBAVCODEC_VERSION_MAJOR < 57)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 5/18] avutil: remove obsolete FF_API_LLS1 cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavutil/version.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavutil/version.h b/libavutil/version.h
index d6f8fe1..0e8bdc3 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -104,9 +104,6 @@
 #ifndef FF_API_LLS_PRIVATE
 #define FF_API_LLS_PRIVATE  (LIBAVUTIL_VERSION_MAJOR < 55)
 #endif
-#ifndef FF_API_LLS1
-#define FF_API_LLS1 (LIBAVUTIL_VERSION_MAJOR < 54)
-#endif
 #ifndef FF_API_AVFRAME_LAVC
 #define FF_API_AVFRAME_LAVC (LIBAVUTIL_VERSION_MAJOR < 55)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 3/18] avutil: remove obsolete FF_API_FIND_OPT cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavutil/opt.c | 14 --
 libavutil/opt.h | 19 ---
 libavutil/version.h |  3 ---
 3 files changed, 36 deletions(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index ca4edb8..16828e2 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -40,20 +40,6 @@
 
 #include 
 
-#if FF_API_FIND_OPT
-//FIXME order them and do a bin search
-const AVOption *av_find_opt(void *v, const char *name, const char *unit, int 
mask, int flags)
-{
-const AVOption *o = NULL;
-
-while ((o = av_next_option(v, o))) {
-if (!strcmp(o->name, name) && (!unit || (o->unit && !strcmp(o->unit, 
unit))) && (o->flags & mask) == flags)
-return o;
-}
-return NULL;
-}
-#endif
-
 #if FF_API_OLD_AVOPTIONS
 const AVOption *av_next_option(void *obj, const AVOption *last)
 {
diff --git a/libavutil/opt.h b/libavutil/opt.h
index 4905ee3..1b72a10 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -378,25 +378,6 @@ typedef struct AVOptionRanges {
 } AVOptionRanges;
 
 
-#if FF_API_FIND_OPT
-/**
- * Look for an option in obj. Look only for the options which
- * have the flags set as specified in mask and flags (that is,
- * for which it is the case that (opt->flags & mask) == flags).
- *
- * @param[in] obj a pointer to a struct whose first element is a
- * pointer to an AVClass
- * @param[in] name the name of the option to look for
- * @param[in] unit the unit of the option to look for, or any if NULL
- * @return a pointer to the option found, or NULL if no option
- * has been found
- *
- * @deprecated use av_opt_find.
- */
-attribute_deprecated
-const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int 
mask, int flags);
-#endif
-
 #if FF_API_OLD_AVOPTIONS
 /**
  * Set the field of obj with the given name to value.
diff --git a/libavutil/version.h b/libavutil/version.h
index de62b1d..3930763 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -80,9 +80,6 @@
  * @{
  */
 
-#ifndef FF_API_FIND_OPT
-#define FF_API_FIND_OPT (LIBAVUTIL_VERSION_MAJOR < 54)
-#endif
 #ifndef FF_API_OLD_AVOPTIONS
 #define FF_API_OLD_AVOPTIONS(LIBAVUTIL_VERSION_MAJOR < 55)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 7/18] avutil: remove obsolete FF_API_INTFLOAT cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavutil/Makefile |   1 -
 libavutil/intfloat_readwrite.c | 101 -
 libavutil/intfloat_readwrite.h |  44 --
 libavutil/version.h|   3 --
 4 files changed, 149 deletions(-)
 delete mode 100644 libavutil/intfloat_readwrite.c
 delete mode 100644 libavutil/intfloat_readwrite.h

diff --git a/libavutil/Makefile b/libavutil/Makefile
index 48ae0ef..0666e2c 100644
--- a/libavutil/Makefile
+++ b/libavutil/Makefile
@@ -30,7 +30,6 @@ HEADERS = adler32.h   
  \
   hmac.h\
   imgutils.h\
   intfloat.h\
-  intfloat_readwrite.h  \
   intreadwrite.h\
   lfg.h \
   log.h \
diff --git a/libavutil/intfloat_readwrite.c b/libavutil/intfloat_readwrite.c
deleted file mode 100644
index af5da62..000
--- a/libavutil/intfloat_readwrite.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * portable IEEE float/double read/write functions
- *
- * Copyright (c) 2005 Michael Niedermayer 
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file
- * portable IEEE float/double read/write functions
- */
-
-#include 
-#include "common.h"
-#include "mathematics.h"
-#include "intfloat_readwrite.h"
-#include "version.h"
-
-#if FF_API_INTFLOAT
-double av_int2dbl(int64_t v){
-if((uint64_t)v+v > 0xFFEULL<<52)
-return NAN;
-return ldexp(((v&((1LL<<52)-1)) + (1LL<<52)) * (v>>63|1), 
(v>>52&0x7FF)-1075);
-}
-
-float av_int2flt(int32_t v){
-if((uint32_t)v+v > 0xFF00U)
-return NAN;
-return ldexp(((v&0x7F) + (1<<23)) * (v>>31|1), (v>>23&0xFF)-150);
-}
-
-double av_ext2dbl(const AVExtFloat ext){
-uint64_t m = 0;
-int e, i;
-
-for (i = 0; i < 8; i++)
-m = (m<<8) + ext.mantissa[i];
-e = (((int)ext.exponent[0]&0x7f)<<8) | ext.exponent[1];
-if (e == 0x7fff && m)
-return NAN;
-e -= 16383 + 63;/* In IEEE 80 bits, the whole (i.e. 1.)
- * mantissa bit is written as opposed to the
- * single and double precision formats. */
-if (ext.exponent[0]&0x80)
-m= -m;
-return ldexp(m, e);
-}
-
-int64_t av_dbl2int(double d){
-int e;
-if ( !d) return 0;
-else if(d-d) return 0x7FF0LL + ((int64_t)(d<0)<<63) + (d!=d);
-d= frexp(d, &e);
-return (int64_t)(d<0)<<63 | (e+1022LL)<<52 | 
(int64_t)((fabs(d)-0.5)*(1LL<<53));
-}
-
-int32_t av_flt2int(float d){
-int e;
-if ( !d) return 0;
-else if(d-d) return 0x7F80 + ((d<0)<<31) + (d!=d);
-d= frexp(d, &e);
-return (d<0)<<31 | (e+126)<<23 | (int64_t)((fabs(d)-0.5)*(1<<24));
-}
-
-AVExtFloat av_dbl2ext(double d){
-struct AVExtFloat ext= {{0}};
-int e, i; double f; uint64_t m;
-
-f = fabs(frexp(d, &e));
-if (f >= 0.5 && f < 1) {
-e += 16382;
-ext.exponent[0] = e>>8;
-ext.exponent[1] = e;
-m = (uint64_t)ldexp(f, 64);
-for (i=0; i < 8; i++)
-ext.mantissa[i] = m>>(56-(i<<3));
-} else if (f != 0.0) {
-ext.exponent[0] = 0x7f; ext.exponent[1] = 0xff;
-if (!isinf(f))
-ext.mantissa[0] = ~0;
-}
-if (d < 0)
-ext.exponent[0] |= 0x80;
-return ext;
-}
-#endif /* FF_API_INTFLOAT */
diff --git a/libavutil/intfloat_readwrite.h b/libavutil/intfloat_readwrite.h
deleted file mode 100644
index 1d79e3e..000
--- a/libavutil/intfloat_readwrite.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * copyright (c) 2005 Michael Niedermayer 
- *
- * 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 

[FFmpeg-devel] [PATCH 6/18] avutil: remove obsolete FF_API_OLD_OPENCL cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavutil/opencl.c  | 22 --
 libavutil/opencl.h  | 32 
 libavutil/version.h |  3 ---
 3 files changed, 57 deletions(-)

diff --git a/libavutil/opencl.c b/libavutil/opencl.c
index 0b4f83b..36cb6fe 100644
--- a/libavutil/opencl.c
+++ b/libavutil/opencl.c
@@ -70,12 +70,6 @@ typedef struct {
 cl_context context;
 cl_device_id device_id;
 cl_command_queue command_queue;
-#if FF_API_OLD_OPENCL
-char *build_options;
-int program_count;
-cl_program programs[MAX_KERNEL_CODE_NUM];
-int kernel_count;
-#endif
 int kernel_code_count;
 KernelCode kernel_code[MAX_KERNEL_CODE_NUM];
 AVOpenCLDeviceList device_list;
@@ -86,9 +80,6 @@ typedef struct {
 static const AVOption opencl_options[] = {
  { "platform_idx","set platform index value",  
OFFSET(platform_idx),  AV_OPT_TYPE_INT,{.i64=-1}, -1, INT_MAX},
  { "device_idx",  "set device index value",OFFSET(device_idx), 
   AV_OPT_TYPE_INT,{.i64=-1}, -1, INT_MAX},
-#if FF_API_OLD_OPENCL
- { "build_options",   "build options of opencl",   
OFFSET(build_options), AV_OPT_TYPE_STRING, {.str="-I."},  CHAR_MIN, CHAR_MAX},
-#endif
  { NULL }
 };
 
@@ -475,19 +466,6 @@ cl_command_queue av_opencl_get_command_queue(void)
 return opencl_ctx.command_queue;
 }
 
-#if FF_API_OLD_OPENCL
-int av_opencl_create_kernel(AVOpenCLKernelEnv *env, const char *kernel_name)
-{
-av_log(&opencl_ctx, AV_LOG_ERROR, "Could not create OpenCL kernel %s, 
please update libavfilter.\n", kernel_name);
-return AVERROR(EINVAL);
-}
-
-void av_opencl_release_kernel(AVOpenCLKernelEnv *env)
-{
-av_log(&opencl_ctx, AV_LOG_ERROR, "Could not release OpenCL kernel, please 
update libavfilter.\n");
-}
-#endif
-
 static int init_opencl_env(OpenclContext *opencl_ctx, AVOpenCLExternalEnv 
*ext_opencl_env)
 {
 cl_int status;
diff --git a/libavutil/opencl.h b/libavutil/opencl.h
index 9e6dc55..4655cba 100644
--- a/libavutil/opencl.h
+++ b/libavutil/opencl.h
@@ -69,14 +69,6 @@ typedef struct {
 AVOpenCLPlatformNode **platform_node;
 } AVOpenCLDeviceList;
 
-#if FF_API_OLD_OPENCL
-typedef struct {
-cl_command_queue command_queue;
-cl_kernel kernel;
-char kernel_name[AV_OPENCL_MAX_KERNEL_NAME_SIZE];
-} AVOpenCLKernelEnv;
-#endif
-
 typedef struct {
 cl_platform_id platform_id;
 cl_device_type device_type;
@@ -187,19 +179,6 @@ int av_opencl_register_kernel_code(const char 
*kernel_code);
  */
 int av_opencl_init(AVOpenCLExternalEnv *ext_opencl_env);
 
-#if FF_API_OLD_OPENCL
-/**
- * Create kernel object in the specified kernel environment.
- *
- * @param env  pointer to kernel environment which is filled with
- * the environment used to run the kernel
- * @param kernel_name  kernel function name
- * @return >=0 on success, a negative error code in case of failure
- * @deprecated, use clCreateKernel
- */
-int av_opencl_create_kernel(AVOpenCLKernelEnv *env, const char *kernel_name);
-#endif
-
 /**
  * compile specific OpenCL kernel source
  *
@@ -292,17 +271,6 @@ int av_opencl_buffer_read_image(uint8_t **dst_data, int 
*plane_size, int plane_n
  */
 void av_opencl_buffer_release(cl_mem *cl_buf);
 
-#if FF_API_OLD_OPENCL
-/**
- * Release kernel object.
- *
- * @param env kernel environment where the kernel object was created
- *with av_opencl_create_kernel()
- * @deprecated, use clReleaseKernel
- */
-void av_opencl_release_kernel(AVOpenCLKernelEnv *env);
-#endif
-
 /**
  * Release OpenCL environment.
  *
diff --git a/libavutil/version.h b/libavutil/version.h
index 0e8bdc3..e93c24f 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -113,9 +113,6 @@
 #ifndef FF_API_GET_CHANNEL_LAYOUT_COMPAT
 #define FF_API_GET_CHANNEL_LAYOUT_COMPAT (LIBAVUTIL_VERSION_MAJOR < 55)
 #endif
-#ifndef FF_API_OLD_OPENCL
-#define FF_API_OLD_OPENCL   (LIBAVUTIL_VERSION_MAJOR < 54)
-#endif
 #ifndef FF_API_XVMC
 #define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 55)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 10/18] avformat: remove obsolete FF_API_NEW_STREAM cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavformat/avformat.h | 15 ---
 libavformat/utils.c| 10 --
 libavformat/version.h  |  3 ---
 3 files changed, 28 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 43d036d..0a33bc1 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2160,21 +2160,6 @@ void avformat_close_input(AVFormatContext **s);
  * @}
  */
 
-#if FF_API_NEW_STREAM
-/**
- * Add a new stream to a media file.
- *
- * Can only be called in the read_header() function. If the flag
- * AVFMTCTX_NOHEADER is in the format context, then new streams
- * can be added in read_packet too.
- *
- * @param s media file handle
- * @param id file-format-dependent stream ID
- */
-attribute_deprecated
-AVStream *av_new_stream(AVFormatContext *s, int id);
-#endif
-
 #if FF_API_SET_PTS_INFO
 /**
  * @deprecated this function is not supposed to be called outside of lavf
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f882318..9eb7846 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3558,16 +3558,6 @@ void avformat_close_input(AVFormatContext **ps)
 avio_close(pb);
 }
 
-#if FF_API_NEW_STREAM
-AVStream *av_new_stream(AVFormatContext *s, int id)
-{
-AVStream *st = avformat_new_stream(s, NULL);
-if (st)
-st->id = id;
-return st;
-}
-#endif
-
 AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
 {
 AVStream *st;
diff --git a/libavformat/version.h b/libavformat/version.h
index 1a63946..14a490b 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -61,9 +61,6 @@
 #define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57)
 #endif
 
-#ifndef FF_API_NEW_STREAM
-#define FF_API_NEW_STREAM  (LIBAVFORMAT_VERSION_MAJOR < 56)
-#endif
 #ifndef FF_API_SET_PTS_INFO
 #define FF_API_SET_PTS_INFO(LIBAVFORMAT_VERSION_MAJOR < 56)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 08/18] avformat: remove obsolete FF_API_ALLOC_OUTPUT_CONTEXT cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavformat/avformat.h | 10 --
 libavformat/mux.c  | 10 --
 libavformat/version.h  |  3 ---
 3 files changed, 23 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index b915148..1c553a1 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1859,16 +1859,6 @@ AVProgram *av_new_program(AVFormatContext *s, int id);
  */
 
 
-#if FF_API_ALLOC_OUTPUT_CONTEXT
-/**
- * @deprecated deprecated in favor of avformat_alloc_output_context2()
- */
-attribute_deprecated
-AVFormatContext *avformat_alloc_output_context(const char *format,
-   AVOutputFormat *oformat,
-   const char *filename);
-#endif
-
 /**
  * Allocate an AVFormatContext for an output format.
  * avformat_free_context() can be used to free the context and
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 55add43..21e6a07 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -171,16 +171,6 @@ error:
 return ret;
 }
 
-#if FF_API_ALLOC_OUTPUT_CONTEXT
-AVFormatContext *avformat_alloc_output_context(const char *format,
-   AVOutputFormat *oformat, const 
char *filename)
-{
-AVFormatContext *avctx;
-int ret = avformat_alloc_output_context2(&avctx, oformat, format, 
filename);
-return ret < 0 ? NULL : avctx;
-}
-#endif
-
 static int validate_codec_tag(AVFormatContext *s, AVStream *st)
 {
 const AVCodecTag *avctag;
diff --git a/libavformat/version.h b/libavformat/version.h
index f5808eb..8cce52a 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -61,9 +61,6 @@
 #define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57)
 #endif
 
-#ifndef FF_API_ALLOC_OUTPUT_CONTEXT
-#define FF_API_ALLOC_OUTPUT_CONTEXT(LIBAVFORMAT_VERSION_MAJOR < 56)
-#endif
 #ifndef FF_API_FORMAT_PARAMETERS
 #define FF_API_FORMAT_PARAMETERS   (LIBAVFORMAT_VERSION_MAJOR < 56)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 09/18] avformat: remove obsolete FF_API_FORMAT_PARAMETERS cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavformat/avformat.h | 20 
 libavformat/utils.c|  7 ---
 libavformat/version.h  |  3 ---
 3 files changed, 30 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 1c553a1..43d036d 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1971,26 +1971,6 @@ int avformat_open_input(AVFormatContext **ps, const char 
*filename, AVInputForma
 attribute_deprecated
 int av_demuxer_open(AVFormatContext *ic);
 
-#if FF_API_FORMAT_PARAMETERS
-/**
- * Read packets of a media file to get stream information. This
- * is useful for file formats with no headers such as MPEG. This
- * function also computes the real framerate in case of MPEG-2 repeat
- * frame mode.
- * The logical file position is not changed by this function;
- * examined packets may be buffered for later processing.
- *
- * @param ic media file handle
- * @return >=0 if OK, AVERROR_xxx on error
- * @todo Let the user decide somehow what information is needed so that
- *   we do not waste time getting stuff the user does not need.
- *
- * @deprecated use avformat_find_stream_info.
- */
-attribute_deprecated
-int av_find_stream_info(AVFormatContext *ic);
-#endif
-
 /**
  * Read packets of a media file to get stream information. This
  * is useful for file formats with no headers such as MPEG. This
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e899e4d..f882318 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2769,13 +2769,6 @@ static int tb_unreliable(AVCodecContext *c)
 return 0;
 }
 
-#if FF_API_FORMAT_PARAMETERS
-int av_find_stream_info(AVFormatContext *ic)
-{
-return avformat_find_stream_info(ic, NULL);
-}
-#endif
-
 int ff_alloc_extradata(AVCodecContext *avctx, int size)
 {
 int ret;
diff --git a/libavformat/version.h b/libavformat/version.h
index 8cce52a..1a63946 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -61,9 +61,6 @@
 #define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57)
 #endif
 
-#ifndef FF_API_FORMAT_PARAMETERS
-#define FF_API_FORMAT_PARAMETERS   (LIBAVFORMAT_VERSION_MAJOR < 56)
-#endif
 #ifndef FF_API_NEW_STREAM
 #define FF_API_NEW_STREAM  (LIBAVFORMAT_VERSION_MAJOR < 56)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 12/18] avformat: remove obsolete FF_API_CLOSE_INPUT_FILE cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavformat/avformat.h | 11 ---
 libavformat/utils.c|  7 ---
 libavformat/version.h  |  3 ---
 3 files changed, 21 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index d1959e9..7663c0d 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2140,17 +2140,6 @@ int av_read_play(AVFormatContext *s);
  */
 int av_read_pause(AVFormatContext *s);
 
-#if FF_API_CLOSE_INPUT_FILE
-/**
- * @deprecated use avformat_close_input()
- * Close a media file (but not its codecs).
- *
- * @param s media file handle
- */
-attribute_deprecated
-void av_close_input_file(AVFormatContext *s);
-#endif
-
 /**
  * Close an opened input AVFormatContext. Free it and all its contents
  * and set *s to NULL.
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 541b1f7..a3bc349 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3523,13 +3523,6 @@ void avformat_free_context(AVFormatContext *s)
 av_free(s);
 }
 
-#if FF_API_CLOSE_INPUT_FILE
-void av_close_input_file(AVFormatContext *s)
-{
-avformat_close_input(&s);
-}
-#endif
-
 void avformat_close_input(AVFormatContext **ps)
 {
 AVFormatContext *s;
diff --git a/libavformat/version.h b/libavformat/version.h
index d12b6ec..a59d002 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -61,9 +61,6 @@
 #define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57)
 #endif
 
-#ifndef FF_API_CLOSE_INPUT_FILE
-#define FF_API_CLOSE_INPUT_FILE(LIBAVFORMAT_VERSION_MAJOR < 56)
-#endif
 #ifndef FF_API_READ_PACKET
 #define FF_API_READ_PACKET (LIBAVFORMAT_VERSION_MAJOR < 56)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 13/18] avformat: remove obsolete FF_API_READ_PACKET cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavformat/avformat.h | 18 --
 libavformat/utils.c|  7 ---
 libavformat/version.h  |  3 ---
 3 files changed, 28 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 7663c0d..777c47e 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2037,24 +2037,6 @@ int av_find_best_stream(AVFormatContext *ic,
 AVCodec **decoder_ret,
 int flags);
 
-#if FF_API_READ_PACKET
-/**
- * @deprecated use AVFMT_FLAG_NOFILLIN | AVFMT_FLAG_NOPARSE to read raw
- * unprocessed packets
- *
- * Read a transport packet from a media file.
- *
- * This function is obsolete and should never be used.
- * Use av_read_frame() instead.
- *
- * @param s media file handle
- * @param pkt is filled
- * @return 0 if OK, AVERROR_xxx on error
- */
-attribute_deprecated
-int av_read_packet(AVFormatContext *s, AVPacket *pkt);
-#endif
-
 /**
  * Return the next frame of a stream.
  * This function returns what is stored in the file, and does not validate
diff --git a/libavformat/utils.c b/libavformat/utils.c
index a3bc349..60b2beb 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -691,13 +691,6 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
 }
 }
 
-#if FF_API_READ_PACKET
-int av_read_packet(AVFormatContext *s, AVPacket *pkt)
-{
-return ff_read_packet(s, pkt);
-}
-#endif
-
 
 /**/
 
diff --git a/libavformat/version.h b/libavformat/version.h
index a59d002..0b1e65f 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -61,9 +61,6 @@
 #define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57)
 #endif
 
-#ifndef FF_API_READ_PACKET
-#define FF_API_READ_PACKET (LIBAVFORMAT_VERSION_MAJOR < 56)
-#endif
 #ifndef FF_API_R_FRAME_RATE
 #define FF_API_R_FRAME_RATE1
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 11/18] avformat: remove obsolete FF_API_SET_PTS_INFO cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavformat/avformat.h | 9 -
 libavformat/utils.c| 8 
 libavformat/version.h  | 3 ---
 3 files changed, 20 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 0a33bc1..d1959e9 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2160,15 +2160,6 @@ void avformat_close_input(AVFormatContext **s);
  * @}
  */
 
-#if FF_API_SET_PTS_INFO
-/**
- * @deprecated this function is not supposed to be called outside of lavf
- */
-attribute_deprecated
-void av_set_pts_info(AVStream *s, int pts_wrap_bits,
- unsigned int pts_num, unsigned int pts_den);
-#endif
-
 #define AVSEEK_FLAG_BACKWARD 1 ///< seek backward
 #define AVSEEK_FLAG_BYTE 2 ///< seeking based on position in bytes
 #define AVSEEK_FLAG_ANY  4 ///< seek to any frame, even non-keyframes
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 9eb7846..541b1f7 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3885,14 +3885,6 @@ int ff_hex_to_data(uint8_t *data, const char *p)
 return len;
 }
 
-#if FF_API_SET_PTS_INFO
-void av_set_pts_info(AVStream *s, int pts_wrap_bits,
- unsigned int pts_num, unsigned int pts_den)
-{
-avpriv_set_pts_info(s, pts_wrap_bits, pts_num, pts_den);
-}
-#endif
-
 void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits,
  unsigned int pts_num, unsigned int pts_den)
 {
diff --git a/libavformat/version.h b/libavformat/version.h
index 14a490b..d12b6ec 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -61,9 +61,6 @@
 #define FF_API_URL_FEOF (LIBAVFORMAT_VERSION_MAJOR < 57)
 #endif
 
-#ifndef FF_API_SET_PTS_INFO
-#define FF_API_SET_PTS_INFO(LIBAVFORMAT_VERSION_MAJOR < 56)
-#endif
 #ifndef FF_API_CLOSE_INPUT_FILE
 #define FF_API_CLOSE_INPUT_FILE(LIBAVFORMAT_VERSION_MAJOR < 56)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 15/18] avfilter: remove obsolete FF_API_BUFFERSRC_BUFFER cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavfilter/version.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavfilter/version.h b/libavfilter/version.h
index 4b1a359..f46cf88 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -55,9 +55,6 @@
 #ifndef FF_API_FOO_COUNT
 #define FF_API_FOO_COUNT(LIBAVFILTER_VERSION_MAJOR < 6)
 #endif
-#ifndef FF_API_BUFFERSRC_BUFFER
-#define FF_API_BUFFERSRC_BUFFER (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
 #ifndef FF_API_AVFILTERBUFFER
 #define FF_API_AVFILTERBUFFER   (LIBAVFILTER_VERSION_MAJOR < 6)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 14/18] avfilter: remove obsolete FF_API_FILL_FRAME cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavfilter/avcodec.c | 20 
 libavfilter/avcodec.h | 41 -
 libavfilter/version.h |  3 ---
 3 files changed, 64 deletions(-)

diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c
index ba11a25..e0d9015 100644
--- a/libavfilter/avcodec.c
+++ b/libavfilter/avcodec.c
@@ -135,23 +135,3 @@ int avfilter_copy_buf_props(AVFrame *dst, const 
AVFilterBufferRef *src)
 return 0;
 }
 #endif
-
-#if FF_API_FILL_FRAME
-int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
-  const AVFilterBufferRef 
*samplesref)
-{
-return avfilter_copy_buf_props(frame, samplesref);
-}
-
-int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
-  const AVFilterBufferRef *picref)
-{
-return avfilter_copy_buf_props(frame, picref);
-}
-
-int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
-const AVFilterBufferRef *ref)
-{
-return avfilter_copy_buf_props(frame, ref);
-}
-#endif
diff --git a/libavfilter/avcodec.h b/libavfilter/avcodec.h
index 8bbdad2..d3d0e20 100644
--- a/libavfilter/avcodec.h
+++ b/libavfilter/avcodec.h
@@ -66,45 +66,4 @@ AVFilterBufferRef *avfilter_get_buffer_ref_from_frame(enum 
AVMediaType type,
   int perms);
 #endif
 
-#if FF_API_FILL_FRAME
-/**
- * Fill an AVFrame with the information stored in samplesref.
- *
- * @param frame an already allocated AVFrame
- * @param samplesref an audio buffer reference
- * @return >= 0 in case of success, a negative AVERROR code in case of
- * failure
- * @deprecated Use avfilter_copy_buf_props() instead.
- */
-attribute_deprecated
-int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
-  const AVFilterBufferRef 
*samplesref);
-
-/**
- * Fill an AVFrame with the information stored in picref.
- *
- * @param frame an already allocated AVFrame
- * @param picref a video buffer reference
- * @return >= 0 in case of success, a negative AVERROR code in case of
- * failure
- * @deprecated Use avfilter_copy_buf_props() instead.
- */
-attribute_deprecated
-int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
-  const AVFilterBufferRef *picref);
-
-/**
- * Fill an AVFrame with information stored in ref.
- *
- * @param frame an already allocated AVFrame
- * @param ref a video or audio buffer reference
- * @return >= 0 in case of success, a negative AVERROR code in case of
- * failure
- * @deprecated Use avfilter_copy_buf_props() instead.
- */
-attribute_deprecated
-int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
-const AVFilterBufferRef *ref);
-#endif
-
 #endif /* AVFILTER_AVCODEC_H */
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 6ebb1ce..4b1a359 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -55,9 +55,6 @@
 #ifndef FF_API_FOO_COUNT
 #define FF_API_FOO_COUNT(LIBAVFILTER_VERSION_MAJOR < 6)
 #endif
-#ifndef FF_API_FILL_FRAME
-#define FF_API_FILL_FRAME   (LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
 #ifndef FF_API_BUFFERSRC_BUFFER
 #define FF_API_BUFFERSRC_BUFFER (LIBAVFILTER_VERSION_MAJOR < 5)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 16/18] avfilter: remove obsolete FF_API_ACONVERT_FILTER cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 configure |   2 -
 libavfilter/Makefile  |   1 -
 libavfilter/af_aconvert.c | 196 --
 libavfilter/allfilters.c  |   3 -
 libavfilter/version.h |   3 -
 5 files changed, 205 deletions(-)
 delete mode 100644 libavfilter/af_aconvert.c

diff --git a/configure b/configure
index b39b6d3..6e1a798 100755
--- a/configure
+++ b/configure
@@ -2532,7 +2532,6 @@ unix_protocol_deps="sys_un_h"
 unix_protocol_select="network"
 
 # filters
-aconvert_filter_deps="swresample"
 amovie_filter_deps="avcodec avformat"
 aresample_filter_deps="swresample"
 ass_filter_deps="libass"
@@ -5301,7 +5300,6 @@ done
 enabled zlib && add_cppflags -DZLIB_CONST
 
 # conditional library dependencies, in linking order
-enabled aconvert_filter && prepend avfilter_deps "swresample"
 enabled amovie_filter   && prepend avfilter_deps "avformat avcodec"
 enabled aresample_filter&& prepend avfilter_deps "swresample"
 enabled asyncts_filter  && prepend avfilter_deps "avresample"
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 3241b76..6d868e7 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -29,7 +29,6 @@ OBJS = allfilters.o   
  \
 
 OBJS-$(CONFIG_AVCODEC)   += avcodec.o
 
-OBJS-$(CONFIG_ACONVERT_FILTER)   += af_aconvert.o
 OBJS-$(CONFIG_ADELAY_FILTER) += af_adelay.o
 OBJS-$(CONFIG_AECHO_FILTER)  += af_aecho.o
 OBJS-$(CONFIG_AEVAL_FILTER)  += aeval.o
diff --git a/libavfilter/af_aconvert.c b/libavfilter/af_aconvert.c
deleted file mode 100644
index 19095cb..000
--- a/libavfilter/af_aconvert.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright (c) 2010 S.N. Hemanth Meenakshisundaram 
- * Copyright (c) 2011 Stefano Sabatini
- * Copyright (c) 2011 Mina Nagy Zaki
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file
- * sample format and channel layout conversion audio filter
- */
-
-#include "libavutil/channel_layout.h"
-#include "libavutil/opt.h"
-#include "libswresample/swresample.h"
-#include "avfilter.h"
-#include "audio.h"
-#include "internal.h"
-
-typedef struct {
-const AVClass   *class;
-enum AVSampleFormat  out_sample_fmt;
-int64_t  out_chlayout;
-struct SwrContext *swr;
-char *format_str;
-char *channel_layout_str;
-} AConvertContext;
-
-#define OFFSET(x) offsetof(AConvertContext, x)
-#define A AV_OPT_FLAG_AUDIO_PARAM
-#define F AV_OPT_FLAG_FILTERING_PARAM
-static const AVOption aconvert_options[] = {
-{ "sample_fmt", "", OFFSET(format_str), AV_OPT_TYPE_STRING, 
.flags = A|F },
-{ "channel_layout", "", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, 
.flags = A|F },
-{ NULL }
-};
-
-AVFILTER_DEFINE_CLASS(aconvert);
-
-static av_cold int init(AVFilterContext *ctx)
-{
-AConvertContext *aconvert = ctx->priv;
-int ret = 0;
-
-av_log(ctx, AV_LOG_WARNING, "This filter is deprecated, use aformat 
instead\n");
-
-aconvert->out_sample_fmt  = AV_SAMPLE_FMT_NONE;
-aconvert->out_chlayout= 0;
-
-if (aconvert->format_str && strcmp(aconvert->format_str, "auto") &&
-(ret = ff_parse_sample_format(&aconvert->out_sample_fmt, 
aconvert->format_str, ctx)) < 0)
-return ret;
-if (aconvert->channel_layout_str && strcmp(aconvert->channel_layout_str, 
"auto"))
-return ff_parse_channel_layout(&aconvert->out_chlayout, NULL, 
aconvert->channel_layout_str, ctx);
-return ret;
-}
-
-static av_cold void uninit(AVFilterContext *ctx)
-{
-AConvertContext *aconvert = ctx->priv;
-swr_free(&aconvert->swr);
-}
-
-static int query_formats(AVFilterContext *ctx)
-{
-AVFilterFormats *formats = NULL;
-AConvertContext *aconvert = ctx->priv;
-AVFilterLink *inlink  = ctx->inputs[0];
-AVFilterLink *outlink = ctx->outputs[0];
-AVFilterChannelLayouts *layouts;
-
-ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_AUDIO),
- &inlink->out_formats);
-if (aconvert->out_sample_fmt != AV_SAMPLE_FMT_NONE) {
-formats = NULL;
-ff_add_format(&formats, aconvert->out_sample_fmt);
-ff_formats_ref(formats, &outlin

[FFmpeg-devel] [PATCH 17/18] avfilter: remove obsolete FF_API_DRAWTEXT_OLD_TIMELINE cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libavfilter/version.h |  3 ---
 libavfilter/vf_drawtext.c | 43 ---
 2 files changed, 46 deletions(-)

diff --git a/libavfilter/version.h b/libavfilter/version.h
index 2509dc9..4e347c9 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -73,9 +73,6 @@
 #ifndef FF_API_OLD_GRAPH_PARSE
 #define FF_API_OLD_GRAPH_PARSE  (LIBAVFILTER_VERSION_MAJOR < 5)
 #endif
-#ifndef FF_API_DRAWTEXT_OLD_TIMELINE
-#define FF_API_DRAWTEXT_OLD_TIMELINE(LIBAVFILTER_VERSION_MAJOR < 5)
-#endif
 #ifndef FF_API_NOCONST_GET_NAME
 #define FF_API_NOCONST_GET_NAME (LIBAVFILTER_VERSION_MAJOR < 6)
 #endif
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 4fbb6c0..632a24f 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -177,11 +177,6 @@ typedef struct DrawTextContext {
 AVExpr *x_pexpr, *y_pexpr;  ///< parsed expressions for x and y
 int64_t basetime;   ///< base pts time in the real world for 
display
 double var_values[VAR_VARS_NB];
-#if FF_API_DRAWTEXT_OLD_TIMELINE
-char   *draw_expr;  ///< expression for draw
-AVExpr *draw_pexpr; ///< parsed expression for draw
-int draw;   ///< set to zero to prevent drawing
-#endif
 AVLFG  prng;///< random
 char   *tc_opt_string;  ///< specified timecode option string
 AVRational  tc_rate;///< frame rate for timecode
@@ -216,9 +211,6 @@ static const AVOption drawtext_options[]= {
 {"borderw", "set border width", OFFSET(borderw),
AV_OPT_TYPE_INT,{.i64=0}, INT_MIN,  INT_MAX , FLAGS},
 {"tabsize", "set tab size", OFFSET(tabsize),
AV_OPT_TYPE_INT,{.i64=4}, 0,INT_MAX , FLAGS},
 {"basetime","set base time",OFFSET(basetime),   
AV_OPT_TYPE_INT64,  {.i64=AV_NOPTS_VALUE}, INT64_MIN, INT64_MAX , FLAGS},
-#if FF_API_DRAWTEXT_OLD_TIMELINE
-{"draw","if false do not draw (deprecated)", OFFSET(draw_expr), 
AV_OPT_TYPE_STRING, {.str=NULL},   CHAR_MIN, CHAR_MAX, FLAGS},
-#endif
 #if CONFIG_LIBFONTCONFIG
 { "font","Font name",OFFSET(font),   
AV_OPT_TYPE_STRING, { .str = "Sans" },   .flags = FLAGS },
 #endif
@@ -596,12 +588,6 @@ static av_cold int init(AVFilterContext *ctx)
 DrawTextContext *s = ctx->priv;
 Glyph *glyph;
 
-#if FF_API_DRAWTEXT_OLD_TIMELINE
-if (s->draw_expr)
-av_log(ctx, AV_LOG_WARNING, "'draw' option is deprecated and will be 
removed soon, "
-   "you are encouraged to use the generic timeline support through 
the 'enable' option\n");
-#endif
-
 if (!s->fontfile && !CONFIG_LIBFONTCONFIG) {
 av_log(ctx, AV_LOG_ERROR, "No font filename provided\n");
 return AVERROR(EINVAL);
@@ -713,10 +699,6 @@ static av_cold void uninit(AVFilterContext *ctx)
 
 av_expr_free(s->x_pexpr);
 av_expr_free(s->y_pexpr);
-#if FF_API_DRAWTEXT_OLD_TIMELINE
-av_expr_free(s->draw_pexpr);
-s->x_pexpr = s->y_pexpr = s->draw_pexpr = NULL;
-#endif
 av_freep(&s->positions);
 s->nb_positions = 0;
 
@@ -759,12 +741,7 @@ static int config_input(AVFilterLink *inlink)
 
 av_expr_free(s->x_pexpr);
 av_expr_free(s->y_pexpr);
-#if FF_API_DRAWTEXT_OLD_TIMELINE
-av_expr_free(s->draw_pexpr);
-s->x_pexpr = s->y_pexpr = s->draw_pexpr = NULL;
-#else
 s->x_pexpr = s->y_pexpr = NULL;
-#endif
 
 if ((ret = av_expr_parse(&s->x_pexpr, s->x_expr, var_names,
  NULL, NULL, fun2_names, fun2, 0, ctx)) < 0 ||
@@ -772,12 +749,6 @@ static int config_input(AVFilterLink *inlink)
  NULL, NULL, fun2_names, fun2, 0, ctx)) < 0)
 
 return AVERROR(EINVAL);
-#if FF_API_DRAWTEXT_OLD_TIMELINE
-if (s->draw_expr &&
-(ret = av_expr_parse(&s->draw_pexpr, s->draw_expr, var_names,
- NULL, NULL, fun2_names, fun2, 0, ctx)) < 0)
-return ret;
-#endif
 
 return 0;
 }
@@ -1271,16 +1242,6 @@ static int draw_text(AVFilterContext *ctx, AVFrame 
*frame,
 s->x = s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, 
&s->prng);
 s->y = s->var_values[VAR_Y] = av_expr_eval(s->y_pexpr, s->var_values, 
&s->prng);
 s->x = s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, 
&s->prng);
-#if FF_API_DRAWTEXT_OLD_TIMELINE
-if (s->draw_pexpr){
-s->draw = av_expr_eval(s->draw_pexpr, s->var_values, &s->prng);
-
-if(!s->draw)
-return 0;
-}
-if (ctx->is_disabled)
-return 0;
-#endif
 
 box_w = FFMIN(width - 1 , max_text_line_w);
 box_h = FFMIN(height - 1, y + s->max_glyph_h);
@@ -1373,9 +1334,5 @@ AVFilter ff_vf_drawtext = {
 .inputs= avfilter_vf_drawtext_inputs,
 .outputs   = avfilter_vf_drawtext_outputs,
 .process_command = command,
-#if FF

[FFmpeg-devel] [PATCH 18/18] swscale: remove obsolete FF_API_SWS_FORMAT_NAME cruft

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 libswscale/swscale_internal.h |  8 
 libswscale/utils.c| 11 ---
 libswscale/version.h  |  3 ---
 3 files changed, 22 deletions(-)

diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 335e1f8..1e53690 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -611,14 +611,6 @@ av_cold void ff_sws_init_range_convert(SwsContext *c);
 SwsFunc ff_yuv2rgb_init_x86(SwsContext *c);
 SwsFunc ff_yuv2rgb_init_ppc(SwsContext *c);
 
-#if FF_API_SWS_FORMAT_NAME
-/**
- * @deprecated Use av_get_pix_fmt_name() instead.
- */
-attribute_deprecated
-const char *sws_format_name(enum AVPixelFormat format);
-#endif
-
 static av_always_inline int is16BPS(enum AVPixelFormat pix_fmt)
 {
 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 06fd358..4e4392e 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -240,17 +240,6 @@ int sws_isSupportedEndiannessConversion(enum AVPixelFormat 
pix_fmt)
format_entries[pix_fmt].is_supported_endianness : 0;
 }
 
-#if FF_API_SWS_FORMAT_NAME
-const char *sws_format_name(enum AVPixelFormat format)
-{
-const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
-if (desc)
-return desc->name;
-else
-return "Unknown format";
-}
-#endif
-
 static double getSplineCoeff(double a, double b, double c, double d,
  double dist)
 {
diff --git a/libswscale/version.h b/libswscale/version.h
index b764883..cf5b178 100644
--- a/libswscale/version.h
+++ b/libswscale/version.h
@@ -49,9 +49,6 @@
 #ifndef FF_API_SWS_CPU_CAPS
 #define FF_API_SWS_CPU_CAPS(LIBSWSCALE_VERSION_MAJOR < 4)
 #endif
-#ifndef FF_API_SWS_FORMAT_NAME
-#define FF_API_SWS_FORMAT_NAME  (LIBSWSCALE_VERSION_MAJOR < 3)
-#endif
 #ifndef FF_API_ARCH_BFIN
 #define FF_API_ARCH_BFIN   (LIBSWSCALE_VERSION_MAJOR < 4)
 #endif
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 7/18] avutil: remove obsolete FF_API_INTFLOAT cruft

2014-09-14 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 10:46:09PM -0300, James Almer wrote:
> Signed-off-by: James Almer 
> ---
>  libavutil/Makefile |   1 -
>  libavutil/intfloat_readwrite.c | 101 
> -
>  libavutil/intfloat_readwrite.h |  44 --
>  libavutil/version.h|   3 --
>  4 files changed, 149 deletions(-)
>  delete mode 100644 libavutil/intfloat_readwrite.c
>  delete mode 100644 libavutil/intfloat_readwrite.h

this fails to build, theres still a reference to intfloat_readwrite in
Makefile

ar: libavutil/intfloat_readwrite.o: No such file or directory
make: *** [libavutil/libavutil.a] Error 1

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 7/18] avutil: remove obsolete FF_API_INTFLOAT cruft

2014-09-14 Thread James Almer
On 14/09/14 11:15 PM, Michael Niedermayer wrote:
> On Sun, Sep 14, 2014 at 10:46:09PM -0300, James Almer wrote:
>> Signed-off-by: James Almer 
>> ---
>>  libavutil/Makefile |   1 -
>>  libavutil/intfloat_readwrite.c | 101 
>> -
>>  libavutil/intfloat_readwrite.h |  44 --
>>  libavutil/version.h|   3 --
>>  4 files changed, 149 deletions(-)
>>  delete mode 100644 libavutil/intfloat_readwrite.c
>>  delete mode 100644 libavutil/intfloat_readwrite.h
> 
> this fails to build, theres still a reference to intfloat_readwrite in
> Makefile
> 

Confirmed to build after removing that line, so fixed locally.

> ar: libavutil/intfloat_readwrite.o: No such file or directory
> make: *** [libavutil/libavutil.a] Error 1
> 
> [...]
> 
> 
> 
> ___
> 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] RELEASE: update to 2.4.git

2014-09-14 Thread James Almer
Signed-off-by: James Almer 
---
 RELEASE | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/RELEASE b/RELEASE
index c6266be..5360d2e 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1 +1 @@
-2.3.git
+2.4.git
-- 
1.8.5.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 17/18] avfilter: remove obsolete FF_API_DRAWTEXT_OLD_TIMELINE cruft

2014-09-14 Thread Clément Bœsch
On Sun, Sep 14, 2014 at 10:46:19PM -0300, James Almer wrote:
> Signed-off-by: James Almer 
> ---
>  libavfilter/version.h |  3 ---
>  libavfilter/vf_drawtext.c | 43 ---
>  2 files changed, 46 deletions(-)
> 

I don't mind but we *may* want to keep this for compatibility with Libav.

[...]

-- 
Clément B.


pgpatKfxffDIM.pgp
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 17/18] avfilter: remove obsolete FF_API_DRAWTEXT_OLD_TIMELINE cruft

2014-09-14 Thread James Almer
On 15/09/14 2:20 AM, Clément Bœsch wrote:
> On Sun, Sep 14, 2014 at 10:46:19PM -0300, James Almer wrote:
>> Signed-off-by: James Almer 
>> ---
>>  libavfilter/version.h |  3 ---
>>  libavfilter/vf_drawtext.c | 43 ---
>>  2 files changed, 46 deletions(-)
>>
> 
> I don't mind but we *may* want to keep this for compatibility with Libav.

Well, it's disabled, so we should have to "reintroduce" it rather than keeping 
it, 
especially since 2.4 was just released without it.
This probably should have been postponed during the major bump i guess...
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 17/18] avfilter: remove obsolete FF_API_DRAWTEXT_OLD_TIMELINE cruft

2014-09-14 Thread Clément Bœsch
On Mon, Sep 15, 2014 at 02:28:47AM -0300, James Almer wrote:
> On 15/09/14 2:20 AM, Clément Bœsch wrote:
> > On Sun, Sep 14, 2014 at 10:46:19PM -0300, James Almer wrote:
> >> Signed-off-by: James Almer 
> >> ---
> >>  libavfilter/version.h |  3 ---
> >>  libavfilter/vf_drawtext.c | 43 ---
> >>  2 files changed, 46 deletions(-)
> >>
> > 
> > I don't mind but we *may* want to keep this for compatibility with Libav.
> 
> Well, it's disabled, so we should have to "reintroduce" it rather than 
> keeping it, 
> especially since 2.4 was just released without it.
> This probably should have been postponed during the major bump i guess...

Right, better drop it then.

-- 
Clément B.


pgpYpwkpPhobE.pgp
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges

2014-09-14 Thread Raento Mika
On 15/09/14 01:50, "Michael Niedermayer"  wrote:

>On Sun, Sep 14, 2014 at 03:37:00PM +0300, Mika Raento wrote:
>> This adds a new option -hls_flags single_file that creates one .ts file
>> for HLS and adds byteranges to the .m3u8 file, instead of creating one
>> .ts file for each segment.
>> 
>> This is helpful at least for storing large number of videos, as the
>> number of files per video is drastically reduced and copying and storing
>> those files takes less requests and inodes.
>> 
>> This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel
>> in July 2014. That patch seems abandoned by the author, and contained
>> unrelated changes. This patch tries to add the minimum amount of code to
>> support the byterange playlists.
>> ---
>>  doc/muxers.texi  | 23 +++
>>  libavformat/hlsenc.c | 65
>>++--
>>  2 files changed, 72 insertions(+), 16 deletions(-)
>> 
>> diff --git a/doc/muxers.texi b/doc/muxers.texi
>> index 57e81f4..40ae857 100644
>> --- a/doc/muxers.texi
>> +++ b/doc/muxers.texi
>> @@ -194,15 +194,19 @@ can not be smaller than one centi second.
>>  Apple HTTP Live Streaming muxer that segments MPEG-TS according to
>>  the HTTP Live Streaming (HLS) specification.
>>  
>> -It creates a playlist file and numbered segment files. The output
>> -filename specifies the playlist filename; the segment filenames
>> -receive the same basename as the playlist, a sequential number and
>> -a .ts extension.
>> +It creates a playlist file, and one or more segment files. The output
>>filename
>> +specifies the playlist filename.
>> +
>> +By default, the muxer creates a file for each segment produced. These
>>files
>> +have the same name as the playlist, followed by a sequential number
>>and a
>> +.ts extension.
>>  
>>  For example, to convert an input file with @command{ffmpeg}:
>>  @example
>>  ffmpeg -i in.nut out.m3u8
>>  @end example
>> +This example will produce the playlist, @file{out.m3u8}, and segment
>>files:
>> +@file{out0.ts}, @file{out1.ts}, @file{out2.ts}, etc.
>>  
>>  See also the @ref{segment} muxer, which provides a more generic and
>>  flexible implementation of a segmenter, and can be used to perform HLS
>> @@ -241,6 +245,17 @@ Note that the playlist sequence number must be
>>unique for each segment
>>  and it is not to be confused with the segment filename sequence number
>>  which can be cyclic, for example if the @option{wrap} option is
>>  specified.
>> +
>> +@item hls_flags single_file
>> +If this flag is set, the muxer will store all segments in a single
>>MPEG-TS
>> +file, and will use byte ranges in the playlist. HLS playlists
>>generated with
>> +this way will have the version number 4.
>> +For example:
>> +@example
>> +ffmpeg -i in.nut -hls_flags single_file out.m3u8
>> +@end example
>> +Will produce the playlist, @file{out.m3u8}, and a single segment file,
>> +@file{out.ts}.
>>  @end table
>>  
>>  @anchor{ico}
>> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
>> index 11f1e5b..9fcb999 100644
>> --- a/libavformat/hlsenc.c
>> +++ b/libavformat/hlsenc.c
>> @@ -34,10 +34,17 @@
>>  typedef struct HLSSegment {
>>  char filename[1024];
>>  double duration; /* in seconds */
>> +int64_t pos;
>> +int64_t size;
>>  
>>  struct HLSSegment *next;
>>  } HLSSegment;
>>  
>> +typedef enum HLSFlags {
>> +// Generate a single media file and use byte ranges in the
>>playlist.
>> +HLS_SINGLE_FILE = (1 << 0),
>> +} HLSFlags;
>> +
>>  typedef struct HLSContext {
>>  const AVClass *class;  // Class for private options.
>>  unsigned number;
>> @@ -50,12 +57,15 @@ typedef struct HLSContext {
>>  float time;// Set by a private option.
>>  int max_nb_segments;   // Set by a private option.
>>  int  wrap; // Set by a private option.
>> +uint32_t flags;// enum HLSFlags
>>  
>>  int64_t recording_time;
>>  int has_video;
>>  int64_t start_pts;
>>  int64_t end_pts;
>>  double duration;  // last segment duration computed so far, in
>>seconds
>> +int64_t start_pos;// last segment starting position
>> +int64_t size; // last segment size
>>  int nb_entries;
>>  
>>  HLSSegment *segments;
>> @@ -88,12 +98,14 @@ static int hls_mux_init(AVFormatContext *s)
>>  avcodec_copy_context(st->codec, s->streams[i]->codec);
>>  st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
>>  }
>> +hls->start_pos = 0;
>>  
>>  return 0;
>>  }
>>  
>>  /* Create a new segment and append it to the segment list */
>> -static int hls_append_segment(HLSContext *hls, double duration)
>> +static int hls_append_segment(HLSContext *hls, double duration,
>>int64_t pos,
>> +  int64_t size)
>>  {
>>  HLSSegment *en = av_malloc(sizeof(*en));
>>  
>> @@ -103,6 +115,8 @@ static int hls_append_segment(HLSContext *hls,
>>double duration)
>>  av_strlcpy(en->fi

[FFmpeg-devel] [PATCH] hlsenc: single_file, support HLS ver 4 byteranges

2014-09-14 Thread Mika Raento
This adds a new option -hls_flags single_file that creates one .ts file
for HLS and adds byteranges to the .m3u8 file, instead of creating one
.ts file for each segment.

This is helpful at least for storing large number of videos, as the
number of files per video is drastically reduced and copying and storing
those files takes less requests and inodes.

This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel
in July 2014. That patch seems abandoned by the author, and contained
unrelated changes. This patch tries to add the minimum amount of code to
support the byterange playlists.
---
 doc/muxers.texi  | 23 +++
 libavformat/hlsenc.c | 63 ++--
 2 files changed, 70 insertions(+), 16 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 57e81f4..40ae857 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -194,15 +194,19 @@ can not be smaller than one centi second.
 Apple HTTP Live Streaming muxer that segments MPEG-TS according to
 the HTTP Live Streaming (HLS) specification.
 
-It creates a playlist file and numbered segment files. The output
-filename specifies the playlist filename; the segment filenames
-receive the same basename as the playlist, a sequential number and
-a .ts extension.
+It creates a playlist file, and one or more segment files. The output filename
+specifies the playlist filename.
+
+By default, the muxer creates a file for each segment produced. These files
+have the same name as the playlist, followed by a sequential number and a
+.ts extension.
 
 For example, to convert an input file with @command{ffmpeg}:
 @example
 ffmpeg -i in.nut out.m3u8
 @end example
+This example will produce the playlist, @file{out.m3u8}, and segment files:
+@file{out0.ts}, @file{out1.ts}, @file{out2.ts}, etc.
 
 See also the @ref{segment} muxer, which provides a more generic and
 flexible implementation of a segmenter, and can be used to perform HLS
@@ -241,6 +245,17 @@ Note that the playlist sequence number must be unique for 
each segment
 and it is not to be confused with the segment filename sequence number
 which can be cyclic, for example if the @option{wrap} option is
 specified.
+
+@item hls_flags single_file
+If this flag is set, the muxer will store all segments in a single MPEG-TS
+file, and will use byte ranges in the playlist. HLS playlists generated with
+this way will have the version number 4.
+For example:
+@example
+ffmpeg -i in.nut -hls_flags single_file out.m3u8
+@end example
+Will produce the playlist, @file{out.m3u8}, and a single segment file,
+@file{out.ts}.
 @end table
 
 @anchor{ico}
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 11f1e5b..c3fb341 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -34,10 +34,17 @@
 typedef struct HLSSegment {
 char filename[1024];
 double duration; /* in seconds */
+int64_t pos;
+int64_t size;
 
 struct HLSSegment *next;
 } HLSSegment;
 
+typedef enum HLSFlags {
+// Generate a single media file and use byte ranges in the playlist.
+HLS_SINGLE_FILE = (1 << 0),
+} HLSFlags;
+
 typedef struct HLSContext {
 const AVClass *class;  // Class for private options.
 unsigned number;
@@ -50,12 +57,15 @@ typedef struct HLSContext {
 float time;// Set by a private option.
 int max_nb_segments;   // Set by a private option.
 int  wrap; // Set by a private option.
+uint32_t flags;// enum HLSFlags
 
 int64_t recording_time;
 int has_video;
 int64_t start_pts;
 int64_t end_pts;
 double duration;  // last segment duration computed so far, in seconds
+int64_t start_pos;// last segment starting position
+int64_t size; // last segment size
 int nb_entries;
 
 HLSSegment *segments;
@@ -88,12 +98,14 @@ static int hls_mux_init(AVFormatContext *s)
 avcodec_copy_context(st->codec, s->streams[i]->codec);
 st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
 }
+hls->start_pos = 0;
 
 return 0;
 }
 
 /* Create a new segment and append it to the segment list */
-static int hls_append_segment(HLSContext *hls, double duration)
+static int hls_append_segment(HLSContext *hls, double duration, int64_t pos,
+  int64_t size)
 {
 HLSSegment *en = av_malloc(sizeof(*en));
 
@@ -103,6 +115,8 @@ static int hls_append_segment(HLSContext *hls, double 
duration)
 av_strlcpy(en->filename, av_basename(hls->avf->filename), 
sizeof(en->filename));
 
 en->duration = duration;
+en->pos  = pos;
+en->size = size;
 en->next = NULL;
 
 if (!hls->segments)
@@ -142,6 +156,7 @@ static int hls_window(AVFormatContext *s, int last)
 int target_duration = 0;
 int ret = 0;
 int64_t sequence = FFMAX(hls->start_sequence, hls->sequence - 
hls->nb_entries);
+int version = hls->flags & HLS_SINGLE_FILE ? 4 : 3;
 
 if ((ret = avio_open