Re: [FFmpeg-devel] [PATCH v2] lavd/decklink_common: Fix error caused by -Werror=missing-prototypes

2016-06-25 Thread Michael Niedermayer
On Fri, Jun 24, 2016 at 10:03:17PM -0400, Rick Kern wrote:
> decklink_common.cpp includes a .cpp file from the DeckLink API which fails
> to build because there are non-static functions in the included .cpp file.
> This disables the missing-prototypes error so the file can be included.

why does this happen ?
the compiler (gcc at least) should not produce warnings or related
errors for system headers, why does this not apply to this cpp file ?
is it installed correctly and the compiler correctly setup so it knows
the directory its in is for such headers ?

Also you can add flags specific to building one file
grep for CFLAGS in Makefiles to see examples

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


Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Michael Niedermayer
On Fri, Jun 24, 2016 at 09:54:54PM -0700, Amancio Hasty wrote:
> 
> > On Jun 24, 2016, at 7:39 PM, Michael Niedermayer  
> > wrote:
> > 
> > On Fri, Jun 24, 2016 at 06:52:01PM -0700, Amancio Hasty wrote:
> >> 
> >>> On Jun 24, 2016, at 6:31 PM, Michael Niedermayer  
> >>> wrote:
> >>> 
> >>> On Thu, Jun 23, 2016 at 11:00:48PM +0200, Michael Niedermayer wrote:
>  Hi all
>  
>  what shall FFmpeg 3.1 be called ?
>  
>  I still have these ideas from past suggestions:
>  Von Neumann, Einstein, lorentz, poincaré, desitter, de broglie, Gauss, 
>  Galois, Viterbi, Darwin
>  
>  Are there other suggestions?
>  Is something preferred ?
>  
>  In absence of any preferrance ill pick something randomly
> >>> 
> >>> Laplace (Rostislav, Bodecs)
> >>> Carl (Paul)
> >>> Lorentz (Bodecs)
> >>> fibonacci (Compn)
> >>> [list of people from june] (Gregory)
> >>> Hypatia (Kyle)
> >>> 
> >>> Laplace got suggested twice, everything else once
> >>> Thus the winner is Laplace
> >>> 
> >>> i intend to make the release tomorrow (saturday) from what is in git
> >>> master unless people want me to wait ?
> >>> 
> >>> [...]
> >>> 
> >>> -- 
> >>> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >>> 
> >>> Those who would give up essential Liberty, to purchase a little
> >>> temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin
> >>> ___
> >>> ffmpeg-devel mailing list
> >>> ffmpeg-devel@ffmpeg.org
> >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >> 
> >> Can we till Aman finishes his omx/h264 encoding?
> >> 
> >> Again lots of people in the RPI commute are waiting for this and
> >> it looks like the finishing touch does not required much work…
> > 
> > we are 1 month behind shedule
> > we make releases once about every 3 months
> > 
> > There is always a feature that will be finished next week or next
> > 3 days. If you always wait you never release.
> > 
> > Also you didnt mention any timeframe for when this will be in git
> > master
> > 
> > do you think its really better if we delay the release and maybe in
> > 2 weeks have 5 new regressions that rewuire us to wait another
> > month to get them fixed and then theres anoter big feature that comes
> > the week after it and so on.
> > IMHO better release now, and release soon again.
> > 
> > [...]
> > -- 
> > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> > 
> > Dictatorship: All citizens are under surveillance, all their steps and
> > actions recorded, for the politicians to enforce control.
> > Democracy: All politicians are under surveillance, all their steps and
> > actions recorded, for the citizens to enforce control.
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org 
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel 
> > 
> It really depends on your intent and what do you wish to provide with
> your release. We will have to wait till Aman tells us what is his next step.

where is that patch ?
i see
" --enable-omx-rpi enable encoding via OpenMAX IL for Raspberry Pi [no]"
in ffmpeg git, what is missing?



> 
> With respect to RPI it has been over 2 years people have been waiting
> for hardware assist h264 encoding…
> 
> Cheers
> Amancio
> 
> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.


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


Re: [FFmpeg-devel] [PATCH] avfilter/vf_rotate: add >8 bit depth support

2016-06-25 Thread Paul B Mahol
On 6/25/16, Muhammad Faiz  wrote:
> On Sat, Jun 25, 2016 at 1:23 AM, Paul B Mahol  wrote:
>> Hi,
>>
>> patch attached.
>>
>
> >From 5b55c9c44ea103cdff3c34882dbcca29902728a4 Mon Sep 17 00:00:00 2001
>>From: Paul B Mahol 
>>Date: Fri, 24 Jun 2016 20:16:22 +0200
>>Subject: [PATCH] avfilter/vf_rotate: add >8 bit depth support
>>
>>Signed-off-by: Paul B Mahol 
>>---
>> libavfilter/vf_rotate.c  | 171
>> ++-
>> tests/ref/fate/filter-pixfmts-rotate |  14 +++
>> 2 files changed, 123 insertions(+), 62 deletions(-)
>>
>
>
>>+AV_PIX_FMT_YUV420P10LE, AV_PIX_FMT_YUVA420P10LE,
>>+AV_PIX_FMT_YUV444P10LE, AV_PIX_FMT_YUVA444P10LE,
>>+AV_PIX_FMT_YUV420P12LE,
>>+AV_PIX_FMT_YUV444P12LE,
>>+AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUVA444P16LE,
>>+AV_PIX_FMT_YUV420P16LE, AV_PIX_FMT_YUVA420P16LE,
>>+AV_PIX_FMT_YUV444P9LE, AV_PIX_FMT_YUVA444P9LE,
>>+AV_PIX_FMT_YUV420P9LE, AV_PIX_FMT_YUVA420P9LE,
>
> Why not use native endian format?

Because of fate test. ___
> 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] FFmpeg 3.1 name

2016-06-25 Thread Michael Niedermayer
On Sat, Jun 25, 2016 at 11:03:27AM +0200, Michael Niedermayer wrote:
> On Fri, Jun 24, 2016 at 09:54:54PM -0700, Amancio Hasty wrote:
> > 
> > > On Jun 24, 2016, at 7:39 PM, Michael Niedermayer  
> > > wrote:
> > > 
> > > On Fri, Jun 24, 2016 at 06:52:01PM -0700, Amancio Hasty wrote:
> > >> 
> > >>> On Jun 24, 2016, at 6:31 PM, Michael Niedermayer 
> > >>>  wrote:
> > >>> 
> > >>> On Thu, Jun 23, 2016 at 11:00:48PM +0200, Michael Niedermayer wrote:
> >  Hi all
> >  
> >  what shall FFmpeg 3.1 be called ?
> >  
> >  I still have these ideas from past suggestions:
> >  Von Neumann, Einstein, lorentz, poincaré, desitter, de broglie, Gauss, 
> >  Galois, Viterbi, Darwin
> >  
> >  Are there other suggestions?
> >  Is something preferred ?
> >  
> >  In absence of any preferrance ill pick something randomly
> > >>> 
> > >>> Laplace (Rostislav, Bodecs)
> > >>> Carl (Paul)
> > >>> Lorentz (Bodecs)
> > >>> fibonacci (Compn)
> > >>> [list of people from june] (Gregory)
> > >>> Hypatia (Kyle)
> > >>> 
> > >>> Laplace got suggested twice, everything else once
> > >>> Thus the winner is Laplace
> > >>> 
> > >>> i intend to make the release tomorrow (saturday) from what is in git
> > >>> master unless people want me to wait ?
> > >>> 
> > >>> [...]
> > >>> 
> > >>> -- 
> > >>> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> > >>> 
> > >>> Those who would give up essential Liberty, to purchase a little
> > >>> temporary Safety, deserve neither Liberty nor Safety -- Benjamin 
> > >>> Franklin
> > >>> ___
> > >>> ffmpeg-devel mailing list
> > >>> ffmpeg-devel@ffmpeg.org
> > >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >> 
> > >> Can we till Aman finishes his omx/h264 encoding?
> > >> 
> > >> Again lots of people in the RPI commute are waiting for this and
> > >> it looks like the finishing touch does not required much work…
> > > 
> > > we are 1 month behind shedule
> > > we make releases once about every 3 months
> > > 
> > > There is always a feature that will be finished next week or next
> > > 3 days. If you always wait you never release.
> > > 
> > > Also you didnt mention any timeframe for when this will be in git
> > > master
> > > 
> > > do you think its really better if we delay the release and maybe in
> > > 2 weeks have 5 new regressions that rewuire us to wait another
> > > month to get them fixed and then theres anoter big feature that comes
> > > the week after it and so on.
> > > IMHO better release now, and release soon again.
> > > 
> > > [...]
> > > -- 
> > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> > > 
> > > Dictatorship: All citizens are under surveillance, all their steps and
> > > actions recorded, for the politicians to enforce control.
> > > Democracy: All politicians are under surveillance, all their steps and
> > > actions recorded, for the citizens to enforce control.
> > > ___
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel@ffmpeg.org 
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel 
> > > 
> > It really depends on your intent and what do you wish to provide with
> > your release. We will have to wait till Aman tells us what is his next step.
> 
> where is that patch ?
> i see
> " --enable-omx-rpi enable encoding via OpenMAX IL for Raspberry Pi 
> [no]"
> in ffmpeg git, what is missing?

looking at tmm1/rebase-omx i only see 2 one line patches that we
dont have yet
i can certainly merge them before the release if thats all (but i have
no RPI so i cannot test)

is that all that is needed ? something else
missing that we should wait for ?
Also keep in mind we will make a 3.1.1 maybe about 1-2 weeks after 3.1
that can include bugfixes for this

added aman gupta  to CC so this isnt missed ...

[...]


-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle


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


[FFmpeg-devel] [PATCH] avformat/mov: parse rtmd track timecode

2016-06-25 Thread Paul B Mahol
Hi,

patch attached.
From fbf2d600e048a417183ab32fdb2e7e2bcf238071 Mon Sep 17 00:00:00 2001
From: Paul B Mahol 
Date: Sat, 25 Jun 2016 11:33:46 +0200
Subject: [PATCH] avformat/mov: parse rtmd track timecode

Signed-off-by: Paul B Mahol 
---
 libavformat/mov.c | 30 +-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index d75605d..34ce246 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4674,6 +4674,31 @@ static int parse_timecode_in_framenum_format(AVFormatContext *s, AVStream *st,
 return 0;
 }
 
+static int mov_read_rtmd_track(AVFormatContext *s, AVStream *st)
+{
+MOVStreamContext *sc = st->priv_data;
+char buf[AV_TIMECODE_STR_SIZE];
+int64_t cur_pos = avio_tell(sc->pb);
+int dd, hh, mm, ss;
+
+if (!st->nb_index_entries)
+return -1;
+
+avio_seek(sc->pb, st->index_entries->pos, SEEK_SET);
+avio_skip(s->pb, 13);
+dd = avio_r8(s->pb);
+hh = avio_r8(s->pb);
+mm = avio_r8(s->pb);
+avio_skip(s->pb, 1);
+ss = avio_r8(s->pb);
+snprintf(buf, AV_TIMECODE_STR_SIZE, "%02d:%02d:%02d:%02d",
+ dd, hh, mm, ss);
+av_dict_set(&st->metadata, "timecode", buf, 0);
+
+avio_seek(sc->pb, cur_pos, SEEK_SET);
+return 0;
+}
+
 static int mov_read_timecode_track(AVFormatContext *s, AVStream *st)
 {
 MOVStreamContext *sc = st->priv_data;
@@ -4952,8 +4977,11 @@ static int mov_read_header(AVFormatContext *s)
 if (mov->chapter_track > 0 && !mov->ignore_chapters)
 mov_read_chapters(s);
 for (i = 0; i < s->nb_streams; i++)
-if (s->streams[i]->codecpar->codec_tag == AV_RL32("tmcd"))
+if (s->streams[i]->codecpar->codec_tag == AV_RL32("tmcd")) {
 mov_read_timecode_track(s, s->streams[i]);
+} else if (s->streams[i]->codecpar->codec_tag == AV_RL32("rtmd")) {
+mov_read_rtmd_track(s, s->streams[i]);
+}
 }
 
 /* copy timecode metadata from tmcd tracks to the related video streams */
-- 
2.5.0

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


Re: [FFmpeg-devel] [PATCH] avformat/mov: parse rtmd track timecode

2016-06-25 Thread Clément Bœsch
On Sat, Jun 25, 2016 at 11:36:05AM +0200, Paul B Mahol wrote:
> Hi,
> 
> patch attached.

> From fbf2d600e048a417183ab32fdb2e7e2bcf238071 Mon Sep 17 00:00:00 2001
> From: Paul B Mahol 
> Date: Sat, 25 Jun 2016 11:33:46 +0200
> Subject: [PATCH] avformat/mov: parse rtmd track timecode
> 
> Signed-off-by: Paul B Mahol 
> ---
>  libavformat/mov.c | 30 +-
>  1 file changed, 29 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index d75605d..34ce246 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -4674,6 +4674,31 @@ static int 
> parse_timecode_in_framenum_format(AVFormatContext *s, AVStream *st,
>  return 0;
>  }
>  
> +static int mov_read_rtmd_track(AVFormatContext *s, AVStream *st)
> +{
> +MOVStreamContext *sc = st->priv_data;
> +char buf[AV_TIMECODE_STR_SIZE];
> +int64_t cur_pos = avio_tell(sc->pb);
> +int dd, hh, mm, ss;
> +
> +if (!st->nb_index_entries)
> +return -1;
> +
> +avio_seek(sc->pb, st->index_entries->pos, SEEK_SET);
> +avio_skip(s->pb, 13);
> +dd = avio_r8(s->pb);
> +hh = avio_r8(s->pb);
> +mm = avio_r8(s->pb);

> +avio_skip(s->pb, 1);

isn't this the drop flag? if so you should probably honor it as as ';' in
the timecode string

> +ss = avio_r8(s->pb);
> +snprintf(buf, AV_TIMECODE_STR_SIZE, "%02d:%02d:%02d:%02d",
> + dd, hh, mm, ss);
> +av_dict_set(&st->metadata, "timecode", buf, 0);
> +
> +avio_seek(sc->pb, cur_pos, SEEK_SET);
> +return 0;
> +}
> +
>  static int mov_read_timecode_track(AVFormatContext *s, AVStream *st)
>  {
>  MOVStreamContext *sc = st->priv_data;
> @@ -4952,8 +4977,11 @@ static int mov_read_header(AVFormatContext *s)
>  if (mov->chapter_track > 0 && !mov->ignore_chapters)
>  mov_read_chapters(s);
>  for (i = 0; i < s->nb_streams; i++)
> -if (s->streams[i]->codecpar->codec_tag == AV_RL32("tmcd"))
> +if (s->streams[i]->codecpar->codec_tag == AV_RL32("tmcd")) {
>  mov_read_timecode_track(s, s->streams[i]);
> +} else if (s->streams[i]->codecpar->codec_tag == 
> AV_RL32("rtmd")) {
> +mov_read_rtmd_track(s, s->streams[i]);
> +}
>  }
>  
>  /* copy timecode metadata from tmcd tracks to the related video streams 
> */


-- 
Clément B.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] libavcodec/mmaldec.c: add interlaced_frame and format struct to AVFrame for deinterlacing

2016-06-25 Thread Michael Niedermayer
On Fri, Jun 24, 2016 at 06:27:38PM +0200, Jens Ziller wrote:
> Hello,
> 
> deinterlacing need frame->interlaced_frame and format struct. This
> patch added this to AVFrame.
> 
> Regards Jens.

>  mmaldec.c |   16 
>  1 file changed, 16 insertions(+)
> 6351a54c36d98d1f6ffdaeea96af8c0db1305358  0001-for-deinterlacing-needed.patch
> From 8a8961a4fab0da2bd98ef6cbfaf55462a00d3450 Mon Sep 17 00:00:00 2001
> From: Jens Ziller 
> Date: Fri, 24 Jun 2016 18:18:12 +0200

> Subject: [PATCH] for deinterlacing needed

This commit message is not ok

The message should describe
1. what is changed
2. why it is changed
3. how it is changed

When in doubt always write a longer commit message than a short one


[...]
>  if (avctx->pix_fmt == AV_PIX_FMT_MMAL) {
>  if (!ctx->pool_out)
> +// in data[2] give the format struct for configure deinterlacer and 
> renderer
> +frame->data[2] = ctx->decoder->output[0]->format;

This is not how AV_PIX_FMT_MMAL is documented:

/**
 * HW acceleration though MMAL, data[3] contains a pointer to the
 * MMAL_BUFFER_HEADER_T structure.
 */
AV_PIX_FMT_MMAL,

also where is the code that uses data[2] ?

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.


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


Re: [FFmpeg-devel] [PATCH] libopusenc: Add channel mapping family argument

2016-06-25 Thread Michael Niedermayer
On Fri, Jun 24, 2016 at 03:14:42PM -0700, Michael Graczyk wrote:
> I fixed a comment typo and slightly modified an error message in the second
> patch. I attached updated versions. Please let me know if you have any
> thoughts on these patches.

yes, rereading this a bit
can you explain what is the difference between the mapping familiy
and he channel_layout we have ?

if the channel_layout is not set its undefined, if its set it should
be correct
why do you need this additional user parameter ?

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are best at talking, realize last or never when they are wrong.


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


Re: [FFmpeg-devel] [PATCH] Changed metadata print option to accept general urls

2016-06-25 Thread Michael Niedermayer
On Thu, Jun 23, 2016 at 12:14:47AM +, sami.h...@gmail.com wrote:
> From: Sami Hult 
> 
> I changed output=print file handling of metadata filter to accept any ffmpeg 
> url. This way multiple streams can for example be silencedetected and the 
> result directed to different outputs.
> 
> Example:
> 
> ffmpeg -i test.wav -filter_complex 
> "silencedetect=n=-40dB:d=0.1,ametadata=mode=print:file='pipe\:4'" -f null - 
> 4> test.txt
> 
> should have the same effect as
> 
> ffmpeg -i test.wav -filter_complex 
> "silencedetect=n=-40dB:d=0.1,ametadata=mode=print:test.txt" -f null -
> 
> 
> Signed-off-by: Sami Hult 
> ---
>  Changelog|  1 +
>  libavfilter/f_metadata.c | 43 +++
>  2 files changed, 24 insertions(+), 20 deletions(-)

doesnt build:
libavfilter/f_metadata.c: In function ‘print_file’:
libavfilter/f_metadata.c:187:9: error: format not a string literal and no 
format arguments [-Werror=format-security]

also change to documentation is missing

[...]
-- 
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 v3] avformat/tee: Support arbitrary number of slaves

2016-06-25 Thread Marton Balint


On Fri, 17 Jun 2016, sebechlebsky...@gmail.com wrote:


From: Jan Sebechlebsky 

Signed-off-by: Jan Sebechlebsky 
---
I've missed that - sorry, should be fixed in this patch.



[...]


static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
@@ -443,24 +442,26 @@ static int tee_write_header(AVFormatContext *avf)
TeeContext *tee = avf->priv_data;
unsigned nb_slaves = 0, i;
const char *filename = avf->filename;
-char *slaves[MAX_SLAVES];
+char **slaves = NULL;
int ret;

while (*filename) {
-if (nb_slaves == MAX_SLAVES) {
-av_log(avf, AV_LOG_ERROR, "Maximum %d slave muxers reached.\n",
-   MAX_SLAVES);
-ret = AVERROR_PATCHWELCOME;
-goto fail;
-}
-if (!(slaves[nb_slaves++] = av_get_token(&filename, slave_delim))) {
+char *slave = av_get_token(&filename, slave_delim);
+if (!slave) {
ret = AVERROR(ENOMEM);
goto fail;
}
+ret = av_dynarray_add_nofree(&slaves, &nb_slaves, slave);
+if (ret < 0)
+goto fail;


Aren't you still leaking slave here on error?

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


Re: [FFmpeg-devel] [PATCH] h264: make H264ParamSets sps const

2016-06-25 Thread Clément Bœsch
On Fri, Jun 24, 2016 at 09:20:35AM +0200, Benoit Fouet wrote:
[...]
> >>Any objection to this patch now?
> >iam ok with the patch, maybe give others a bit of time to reply
> >before applying though
> 
> Yeah, I'm in no hurry, I just saw this FIXME in the context of one of
> Mateo's patches.
> I was more waiting for some feedback from Hendrik or Clément, anyway, as
> they were the ones raising the points.

Should be fine if indeed the following computation:

int width  = 16 * sps->mb_width;
int height = 16 * sps->mb_height * (2 - sps->frame_mbs_only_flag);

...is always correct.

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH 2/2] avformat/movenc: add option to use keys/mdta atoms for metadata

2016-06-25 Thread Michael Niedermayer
On Wed, Jun 22, 2016 at 07:13:12PM +0200, David Murmann wrote:
>  movenc.c |   81 
> +++
>  movenc.h |1 
>  2 files changed, 78 insertions(+), 4 deletions(-)
> 29f4a09d448563a71af25417c0db7bd7610f42a6  
> 0002-avformat-movenc-add-option-to-use-keys-mdta-atoms-fo.patch
> From 95d1733bc5e34ac4d83adc4f5a5e73c9555cdd75 Mon Sep 17 00:00:00 2001
> From: David Murmann 
> Date: Wed, 22 Jun 2016 15:27:07 +0200
> Subject: [PATCH 2/2] avformat/movenc: add option to use keys/mdta atoms for
>  metadata
> 
> Add -movflags use_metadata_tags to the mov muxer. This will cause
> the muxer to write all metadata to the file in the keys and mtda
> atoms.
> ---
>  libavformat/movenc.c | 81 
> +---
>  libavformat/movenc.h |  1 +
>  2 files changed, 78 insertions(+), 4 deletions(-)

applied

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange


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


Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Jan Gerber
On 06/25/2016 11:17 AM, Michael Niedermayer wrote:
>> where is that patch ?
>> i see
>> " --enable-omx-rpi enable encoding via OpenMAX IL for Raspberry Pi 
>> [no]"
>> in ffmpeg git, what is missing?
> 
> looking at tmm1/rebase-omx i only see 2 one line patches that we
> dont have yet
> i can certainly merge them before the release if thats all (but i have
> no RPI so i cannot test)
> 
> is that all that is needed ? something else
> missing that we should wait for ?

I can confirm that with those 2 commits -v:c h264_omx works on my Raspberry Pi,
while it fails without them.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 02/13] lavf: update auto-bsf to new BSF API

2016-06-25 Thread Marton Balint


On Sun, 12 Jun 2016, Nicolas George wrote:


Le quintidi 25 prairial, an CCXXIV, Marton Balint a écrit :

  So you probably don't have to
support multiple filters, it is enough if you support a single one.


This is not settled. I still think a specific API is better than a container
filter.


I thought your primary concern was the overhead which was discussed.

As far as I know the only thing left is the "cleanness". A totally 
separate list API would involve a lot of code duplication (provide the N:M 
API for lists, and provide the same fields to a BSF list which are already 
available as part of a BSF context. (time_base, codec parameters)


And we only need the list API for the configuration anyway. So what if we 
destroy the list after the configuration is done, and use it as a simple 
BSF afterwards?


Is it OK if the following is implemented?

AVBSFList *list = av_bsf_list_alloc()

// Append as many filters as you want...
av_bsf_list_append(AVBSFList *, AVBSFContext *)

// Destroy the list structure and return the BSF context which is the 
// container list filter we discussed, and which can be used as any other 
// freshly allocated BSF context

av_bsf_list_finalize(AVBSFList **list, AVBSFContext **ctx)

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


Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Amancio Hasty

> On Jun 25, 2016, at 5:41 AM, Jan Gerber  wrote:
> 
> On 06/25/2016 11:17 AM, Michael Niedermayer wrote:
>>> where is that patch ?
>>> i see
>>> " --enable-omx-rpi enable encoding via OpenMAX IL for Raspberry Pi 
>>> [no]"
>>> in ffmpeg git, what is missing?
>> 
>> looking at tmm1/rebase-omx i only see 2 one line patches that we
>> dont have yet
>> i can certainly merge them before the release if thats all (but i have
>> no RPI so i cannot test)
>> 
>> is that all that is needed ? something else
>> missing that we should wait for ?
> 
> I can confirm that with those 2 commits -v:c h264_omx works on my Raspberry 
> Pi,
> while it fails without them.
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel 
> 

Most cool. Can you post the exact command line that you used to 
test h264_omx?

Thanks!


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


Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Jan Gerber
On 06/25/2016 02:45 PM, Amancio Hasty wrote:
> Most cool. Can you post the exact command line that you used to 
> test h264_omx?

git remote add tmm1 https://github.com/tmm1/FFmpeg
git fetch tmmi1
git checkout -b omx
git cherry-pick 2a1fcc3775a390570679da7f507539a397fc7130
git cherry-pick 1087f0dc172a9adf779e41bf2dc82639fb04ebd4

./configure --enable-mmal --enable-omx-rpi --enable-omx
make
./ffmpeg -i test.avi -an -c:v h264_omx test.mp4

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


Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Hendrik Leppkes
On Sat, Jun 25, 2016 at 3:02 PM, Jan Gerber  wrote:
> On 06/25/2016 02:45 PM, Amancio Hasty wrote:
>> Most cool. Can you post the exact command line that you used to
>> test h264_omx?
>
> git remote add tmm1 https://github.com/tmm1/FFmpeg
> git fetch tmmi1
> git checkout -b omx
> git cherry-pick 2a1fcc3775a390570679da7f507539a397fc7130
> git cherry-pick 1087f0dc172a9adf779e41bf2dc82639fb04ebd4
>

The first is only of a cosmetic nature and probably not required, the
second is also slated to be merged from libav eventually:
http://git.libav.org/?p=libav.git;a=commit;h=0c9c4004ed57de210b4d83c7b39bbfb00b86b9af

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


Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Amancio Hasty

> On Jun 25, 2016, at 6:53 AM, Hendrik Leppkes  wrote:
> 
> On Sat, Jun 25, 2016 at 3:02 PM, Jan Gerber  wrote:
>> On 06/25/2016 02:45 PM, Amancio Hasty wrote:
>>> Most cool. Can you post the exact command line that you used to
>>> test h264_omx?
>> 
>> git remote add tmm1 https://github.com/tmm1/FFmpeg
>> git fetch tmmi1
>> git checkout -b omx
>> git cherry-pick 2a1fcc3775a390570679da7f507539a397fc7130
>> git cherry-pick 1087f0dc172a9adf779e41bf2dc82639fb04ebd4
>> 
> 
> The first is only of a cosmetic nature and probably not required, the
> second is also slated to be merged from libav eventually:
> http://git.libav.org/?p=libav.git;a=commit;h=0c9c4004ed57de210b4d83c7b39bbfb00b86b9af
> 
> - Hendrik
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Just cloned  the latest ffmpeg and added Aman’s last patch.

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg

https://github.com/FFmpeg/FFmpeg/commit/1087f0dc172a9adf779e41bf2dc82639fb04ebd4
 


./configure --enable-mmal --enable-omx-rpi --enable-omx
make -j4


./ffmpeg  -f v4l2 -input_format yuv420p -framerate 25 -video_size 640x480 -i 
/dev/video0 -an   -c:v h264_omx test.mp4
I am getting:
DTS 140462626040094, next:1540 st:0 invalid dropping
PTS 140462626040094, next:1540 invalid dropping st:0
DTS 140462626080073, next:1544 st:0 invalid dropping
PTS 140462626080073, next:1544 invalid dropping st:0
…
The video seems to play okay on my macbook .

As far I am concerned , the warnings from ffmpeg are the last issue.


Amancio




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


[FFmpeg-devel] [PATCH v3] avformat/tee: Support arbitrary number of slaves

2016-06-25 Thread sebechlebskyjan
From: Jan Sebechlebsky 

Signed-off-by: Jan Sebechlebsky 
---
 You're right. Should be fixed here.

 libavformat/tee.c | 26 --
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/libavformat/tee.c b/libavformat/tee.c
index 806beaa..9d0a4cb 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -27,8 +27,6 @@
 #include "avformat.h"
 #include "avio_internal.h"
 
-#define MAX_SLAVES 16
-
 typedef enum {
 ON_SLAVE_FAILURE_ABORT  = 1,
 ON_SLAVE_FAILURE_IGNORE = 2
@@ -52,7 +50,7 @@ typedef struct TeeContext {
 const AVClass *class;
 unsigned nb_slaves;
 unsigned nb_alive;
-TeeSlave slaves[MAX_SLAVES];
+TeeSlave *slaves;
 } TeeContext;
 
 static const char *const slave_delim = "|";
@@ -203,6 +201,7 @@ static void close_slaves(AVFormatContext *avf)
 for (i = 0; i < tee->nb_slaves; i++) {
 close_slave(&tee->slaves[i]);
 }
+av_freep(&tee->slaves);
 }
 
 static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
@@ -443,24 +442,28 @@ static int tee_write_header(AVFormatContext *avf)
 TeeContext *tee = avf->priv_data;
 unsigned nb_slaves = 0, i;
 const char *filename = avf->filename;
-char *slaves[MAX_SLAVES];
+char **slaves = NULL;
 int ret;
 
 while (*filename) {
-if (nb_slaves == MAX_SLAVES) {
-av_log(avf, AV_LOG_ERROR, "Maximum %d slave muxers reached.\n",
-   MAX_SLAVES);
-ret = AVERROR_PATCHWELCOME;
+char *slave = av_get_token(&filename, slave_delim);
+if (!slave) {
+ret = AVERROR(ENOMEM);
 goto fail;
 }
-if (!(slaves[nb_slaves++] = av_get_token(&filename, slave_delim))) {
-ret = AVERROR(ENOMEM);
+ret = av_dynarray_add_nofree(&slaves, &nb_slaves, slave);
+if (ret < 0) {
+av_free(slave);
 goto fail;
 }
 if (strspn(filename, slave_delim))
 filename++;
 }
 
+if (!(tee->slaves = av_mallocz_array(nb_slaves, sizeof(*tee->slaves {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
 tee->nb_slaves = tee->nb_alive = nb_slaves;
 
 for (i = 0; i < nb_slaves; i++) {
@@ -483,12 +486,14 @@ static int tee_write_header(AVFormatContext *avf)
 av_log(avf, AV_LOG_WARNING, "Input stream #%d is not mapped "
"to any slave.\n", i);
 }
+av_free(slaves);
 return 0;
 
 fail:
 for (i = 0; i < nb_slaves; i++)
 av_freep(&slaves[i]);
 close_slaves(avf);
+av_free(slaves);
 return ret;
 }
 
@@ -505,6 +510,7 @@ static int tee_write_trailer(AVFormatContext *avf)
 ret_all = ret;
 }
 }
+av_freep(&tee->slaves);
 return ret_all;
 }
 
-- 
1.9.1

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


Re: [FFmpeg-devel] [PATCH] avformat/mov: parse rtmd track timecode

2016-06-25 Thread Paul B Mahol
On 6/25/16, Clement Boesch  wrote:
> On Sat, Jun 25, 2016 at 11:36:05AM +0200, Paul B Mahol wrote:
>> Hi,
>>
>> patch attached.
>
>> From fbf2d600e048a417183ab32fdb2e7e2bcf238071 Mon Sep 17 00:00:00 2001
>> From: Paul B Mahol 
>> Date: Sat, 25 Jun 2016 11:33:46 +0200
>> Subject: [PATCH] avformat/mov: parse rtmd track timecode
>>
>> Signed-off-by: Paul B Mahol 
>> ---
>>  libavformat/mov.c | 30 +-
>>  1 file changed, 29 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/mov.c b/libavformat/mov.c
>> index d75605d..34ce246 100644
>> --- a/libavformat/mov.c
>> +++ b/libavformat/mov.c
>> @@ -4674,6 +4674,31 @@ static int
>> parse_timecode_in_framenum_format(AVFormatContext *s, AVStream *st,
>>  return 0;
>>  }
>>
>> +static int mov_read_rtmd_track(AVFormatContext *s, AVStream *st)
>> +{
>> +MOVStreamContext *sc = st->priv_data;
>> +char buf[AV_TIMECODE_STR_SIZE];
>> +int64_t cur_pos = avio_tell(sc->pb);
>> +int dd, hh, mm, ss;
>> +
>> +if (!st->nb_index_entries)
>> +return -1;
>> +
>> +avio_seek(sc->pb, st->index_entries->pos, SEEK_SET);
>> +avio_skip(s->pb, 13);
>> +dd = avio_r8(s->pb);
>> +hh = avio_r8(s->pb);
>> +mm = avio_r8(s->pb);
>
>> +avio_skip(s->pb, 1);
>
> isn't this the drop flag? if so you should probably honor it as as ';' in
> the timecode string

Fixed locally.

>
>> +ss = avio_r8(s->pb);
>> +snprintf(buf, AV_TIMECODE_STR_SIZE, "%02d:%02d:%02d:%02d",
>> + dd, hh, mm, ss);
>> +av_dict_set(&st->metadata, "timecode", buf, 0);
>> +
>> +avio_seek(sc->pb, cur_pos, SEEK_SET);
>> +return 0;
>> +}
>> +
>>  static int mov_read_timecode_track(AVFormatContext *s, AVStream *st)
>>  {
>>  MOVStreamContext *sc = st->priv_data;
>> @@ -4952,8 +4977,11 @@ static int mov_read_header(AVFormatContext *s)
>>  if (mov->chapter_track > 0 && !mov->ignore_chapters)
>>  mov_read_chapters(s);
>>  for (i = 0; i < s->nb_streams; i++)
>> -if (s->streams[i]->codecpar->codec_tag == AV_RL32("tmcd"))
>> +if (s->streams[i]->codecpar->codec_tag == AV_RL32("tmcd")) {
>>  mov_read_timecode_track(s, s->streams[i]);
>> +} else if (s->streams[i]->codecpar->codec_tag ==
>> AV_RL32("rtmd")) {
>> +mov_read_rtmd_track(s, s->streams[i]);
>> +}
>>  }
>>
>>  /* copy timecode metadata from tmcd tracks to the related video
>> streams */
>
>
> --
> Clement B.
> ___
> 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] libavcodec/exr : Fix float decoding when there is Half and float channels in B44 file

2016-06-25 Thread Martin Vignali
Hello,

In attach a patch who fix, the float decoding of b44 files when there is
half and float channel.

float (and uint32) data are not compressed when B44 compression is used
(only half data are compressed).


Comments welcome

Martin
Jokyo Images
From 56b7bda0aaaba9dc2833b5e31b8843c589ffd6fc Mon Sep 17 00:00:00 2001
From: Martin Vignali 
Date: Sat, 25 Jun 2016 17:56:03 +0200
Subject: [PATCH] libavcodec/exr : fix float channel read when there is half
 and float channels in a file

---
 libavcodec/exr.c | 23 +--
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 75ada24..05e72d8 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -942,9 +942,9 @@ static int b44_uncompress(EXRContext *s, const uint8_t *src, int compressed_size
 nbB44BlockH++;
 
 for (c = 0; c < s->nb_channels; c++) {
-for (iY = 0; iY < nbB44BlockH; iY++) {
-for (iX = 0; iX < nbB44BlockW; iX++) {/* For each B44 block */
-if (s->channels[c].pixel_type == EXR_HALF) {/* B44 only compress half float data */
+if (s->channels[c].pixel_type == EXR_HALF) {/* B44 only compress half float data */
+for (iY = 0; iY < nbB44BlockH; iY++) {
+for (iX = 0; iX < nbB44BlockW; iX++) {/* For each B44 block */
 if (stayToUncompress < 3) {
 av_log(s, AV_LOG_ERROR, "Not enough data for B44A block: %d", stayToUncompress);
 return AVERROR_INVALIDDATA;
@@ -976,20 +976,15 @@ static int b44_uncompress(EXRContext *s, const uint8_t *src, int compressed_size
 td->uncompressed_data[indexOut + 1] = tmpBuffer[indexTmp] >> 8;
 }
 }
-} else{/* Float or UINT 32 channel */
-for (y = indexHgY; y < FFMIN(indexHgY + 4, td->ysize); y++) {
-for (x = indexHgX; x < FFMIN(indexHgX + 4, td->xsize); x++) {
-indexOut = target_channel_offset * td->xsize + y * td->channel_line_size + 4 * x;
-memcpy(&td->uncompressed_data[indexOut], sr, 4);
-sr += 4;
-}
-}
 }
 }
-}
-if (s->channels[c].pixel_type == EXR_HALF) {
 target_channel_offset += 2;
-} else {
+} else {/* Float or UINT 32 channel */
+for (y = 0; y < td->ysize; y++) {
+indexOut = target_channel_offset * td->xsize + y * td->channel_line_size;
+memcpy(&td->uncompressed_data[indexOut], sr, td->xsize * 4);
+sr += td->xsize * 4;
+}
 target_channel_offset += 4;
 }
 }
-- 
1.9.3 (Apple Git-50)

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


Re: [FFmpeg-devel] [PATCH] added support for hardware assist H264 video encoding for the Raspberry Pi

2016-06-25 Thread Amancio Hasty
On June 22, 2016 at 12:12:02 PM, Amancio Hasty (aha...@gmail.com) wrote:


On Jun 22, 2016, at 10:20 AM, Aman Gupta  wrote:

This patch should fix the assertion failure you see:
https://github.com/FFmpeg/FFmpeg/commit/1087f0dc172a9adf779e41bf2dc82639fb04ebd4

Aman
On Sat, Jun 18, 2016 at 8:43 AM Amancio Hasty  wrote:


On Jun 16, 2016, at 11:16 AM, Aman Gupta  wrote:

The patchset that was merged into libav is now available in ffmpeg as

well:

https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/omx.c

You can compile ffmpeg from the master branch
with --enable-omx --enable-omx-rpi

Aman

On Thu, Jun 16, 2016 at 2:16 AM, Amancio Hasty  wrote:


On May 9, 2016, at 7:55 AM, Amancio Hasty  wrote:

Hi,

So what is the next step?

If you want testers I suggest posting to ccrisan’s motionpie mailing

list.

Cheers
Amancio


On Mar 31, 2016, at 7:27 PM, Amancio Hasty  wrote:

I am not a lawyer…


I updated the patch.  vc264.c now has a the copyright notice embedded

in

a volatile global so if a binary is compiled against vc264.o , the

copyright notice

can be displayed by:
strings ffmpeg | grep -i copyright

LICENSE.md has been updated to include Broadcom’s copyright notice.

A distribution of a  binary that includes vc264.o should include

LICENSE.md and if

that is missing,  the copyright notice can be displayed via the shell
command ‘strings’ .

Amancio


On Mar 22, 2016, at 12:12 PM, Lou Logan  wrote:

On Mon, 21 Mar 2016 20:07:01 -0700, Amancio Hasty wrote:

From 874a72eec2a78f4935fea091003e534b5f8d5413 Mon Sep 17 00:00:00

2001

From: Amancio Hasty 
Date: Mon, 21 Mar 2016 18:56:05 -0700
Subject: [PATCH] added support for hardware assist H264  video

encoding for

the Raspberry Pi

---
configure  |  12 ++
libavcodec/Makefile|   1 +
libavcodec/allcodecs.c |   2 +
libavcodec/vc264.c | 387

+

4 files changed, 402 insertions(+)
create mode 100644 libavcodec/vc264.c

[...]

diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 2a25d66..3c7bd9b 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -74,6 +74,7 @@ void avcodec_register_all(void)
initialized = 1;


Nit: Whitespace on the line above should be removed.

[...]

--- /dev/null
+++ b/libavcodec/vc264.c
@@ -0,0 +1,387 @@
+/*  H.264 hardware assist video encoding code taken from
+ * raspberry's os :
+ *   /opt/vc/src/hello_pi/hello_encode/encode.c
+ */
+
+/*
+Copyright (c) 2012, Broadcom Europe Ltd
+Copyright (c) 2012, Kalle Vahlman 
+Tuomas Kulve 
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions

are met:

+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+  * Redistributions in binary form must reproduce the above

copyright

+  notice, this list of conditions and the following disclaimer

in the

+  documentation and/or other materials provided with the

distribution.

+  * Neither the name of the copyright holder nor the
+  names of its contributors may be used to endorse or promote

products

+  derived from this software without specific prior written

permission.

+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

"AS IS" AND

+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,

THE IMPLIED

+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

ARE

+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS

BE LIABLE FOR ANY

+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

DAMAGES

+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

SERVICES;

+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

CAUSED AND

+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

OR TORT

+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE

USE OF THIS

+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


I wonder if any of the above legalese is compatible. Granted, I see a
similar paragraph in "libavformat/aadec.c".

+ * ffmpeg driver for hardware assist video H.264 encoding using

Broadcom's GPU

+ * Copyright (C) 2016 Amancio Hasty aha...@gmail.com
+ *
+ *
+ * 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
+ * Licen

Re: [FFmpeg-devel] libavcodec/exr : Fix float decoding when there is Half and float channels in B44 file

2016-06-25 Thread Paul B Mahol
On 6/25/16, Martin Vignali  wrote:
> Hello,
>
> In attach a patch who fix, the float decoding of b44 files when there is
> half and float channel.
>
> float (and uint32) data are not compressed when B44 compression is used
> (only half data are compressed).
>

Applied.

>
> Comments welcome
>
> Martin
> Jokyo Images
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] libavcodec/exr : Fix float decoding when there is Half and float channels in B44 file

2016-06-25 Thread Martin Vignali
2016-06-25 18:17 GMT+02:00 Paul B Mahol :

> On 6/25/16, Martin Vignali  wrote:
> > Hello,
> >
> > In attach a patch who fix, the float decoding of b44 files when there is
> > half and float channel.
> >
> > float (and uint32) data are not compressed when B44 compression is used
> > (only half data are compressed).
> >
>
> Applied.
>
If it's not too late, please don't

Correct in attach, also fixe b44a compression

Sorry

Martin
Jokyo Images
From 75b895f1a9d09259dd79822d20cefca887f8aecf Mon Sep 17 00:00:00 2001
From: Martin Vignali 
Date: Sat, 25 Jun 2016 18:16:19 +0200
Subject: [PATCH] libavcodec/exr : fix float channel read with B44/B44A

When there is half channel and float channel inside a
b44/b44a file, only half data are compressed.
---
 libavcodec/exr.c | 30 --
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 75ada24..c87187c 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -942,9 +942,9 @@ static int b44_uncompress(EXRContext *s, const uint8_t *src, int compressed_size
 nbB44BlockH++;
 
 for (c = 0; c < s->nb_channels; c++) {
-for (iY = 0; iY < nbB44BlockH; iY++) {
-for (iX = 0; iX < nbB44BlockW; iX++) {/* For each B44 block */
-if (s->channels[c].pixel_type == EXR_HALF) {/* B44 only compress half float data */
+if (s->channels[c].pixel_type == EXR_HALF) {/* B44 only compress half float data */
+for (iY = 0; iY < nbB44BlockH; iY++) {
+for (iX = 0; iX < nbB44BlockW; iX++) {/* For each B44 block */
 if (stayToUncompress < 3) {
 av_log(s, AV_LOG_ERROR, "Not enough data for B44A block: %d", stayToUncompress);
 return AVERROR_INVALIDDATA;
@@ -976,21 +976,23 @@ static int b44_uncompress(EXRContext *s, const uint8_t *src, int compressed_size
 td->uncompressed_data[indexOut + 1] = tmpBuffer[indexTmp] >> 8;
 }
 }
-} else{/* Float or UINT 32 channel */
-for (y = indexHgY; y < FFMIN(indexHgY + 4, td->ysize); y++) {
-for (x = indexHgX; x < FFMIN(indexHgX + 4, td->xsize); x++) {
-indexOut = target_channel_offset * td->xsize + y * td->channel_line_size + 4 * x;
-memcpy(&td->uncompressed_data[indexOut], sr, 4);
-sr += 4;
-}
-}
 }
 }
-}
-if (s->channels[c].pixel_type == EXR_HALF) {
 target_channel_offset += 2;
-} else {
+} else {/* Float or UINT 32 channel */
+if (stayToUncompress < td->ysize * td->xsize * 4) {
+av_log(s, AV_LOG_ERROR, "Not enough data for uncompress channel: %d", stayToUncompress);
+return AVERROR_INVALIDDATA;
+}
+
+for (y = 0; y < td->ysize; y++) {
+indexOut = target_channel_offset * td->xsize + y * td->channel_line_size;
+memcpy(&td->uncompressed_data[indexOut], sr, td->xsize * 4);
+sr += td->xsize * 4;
+}
 target_channel_offset += 4;
+
+stayToUncompress -= td->ysize * td->xsize * 4;
 }
 }
 
-- 
1.9.3 (Apple Git-50)

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


Re: [FFmpeg-devel] libavcodec/exr : Fix float decoding when there is Half and float channels in B44 file

2016-06-25 Thread Paul B Mahol
On 6/25/16, Martin Vignali  wrote:
> 2016-06-25 18:17 GMT+02:00 Paul B Mahol :
>
>> On 6/25/16, Martin Vignali  wrote:
>> > Hello,
>> >
>> > In attach a patch who fix, the float decoding of b44 files when there
>> > is
>> > half and float channel.
>> >
>> > float (and uint32) data are not compressed when B44 compression is used
>> > (only half data are compressed).
>> >
>>
>> Applied.
>>
> If it's not too late, please don't
>
> Correct in attach, also fixe b44a compression
>
> Sorry
>
> Martin
> Jokyo Images
>

Applied on top of previous patch.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] libavcodec/exr : Fix float decoding when there is Half and float channels in B44 file

2016-06-25 Thread Martin Vignali
Hello,

In attach,
the diff between the two previous patch, in order to add fix for b44a
compression when there is float data inside the file

Before this patch, b44a block are not detected when there is float channel
before half channel (b44a only compress half channel).

Comments welcome

Martin
Jokyo Images
From 974ec6ca2c6299a0a4054616ced6daf08d8805fa Mon Sep 17 00:00:00 2001
From: Martin Vignali 
Date: Sat, 25 Jun 2016 18:25:02 +0200
Subject: [PATCH] libavcodec/exr : fix b44a compression when there is float and
 half data.

---
 libavcodec/exr.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 05e72d8..c87187c 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -980,12 +980,19 @@ static int b44_uncompress(EXRContext *s, const uint8_t *src, int compressed_size
 }
 target_channel_offset += 2;
 } else {/* Float or UINT 32 channel */
+if (stayToUncompress < td->ysize * td->xsize * 4) {
+av_log(s, AV_LOG_ERROR, "Not enough data for uncompress channel: %d", stayToUncompress);
+return AVERROR_INVALIDDATA;
+}
+
 for (y = 0; y < td->ysize; y++) {
 indexOut = target_channel_offset * td->xsize + y * td->channel_line_size;
 memcpy(&td->uncompressed_data[indexOut], sr, td->xsize * 4);
 sr += td->xsize * 4;
 }
 target_channel_offset += 4;
+
+stayToUncompress -= td->ysize * td->xsize * 4;
 }
 }
 
-- 
1.9.3 (Apple Git-50)

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


Re: [FFmpeg-devel] libavcodec/exr : Fix float decoding when there is Half and float channels in B44 file

2016-06-25 Thread Paul B Mahol
On 6/25/16, Martin Vignali  wrote:
> Hello,
>
> In attach,
> the diff between the two previous patch, in order to add fix for b44a
> compression when there is float data inside the file
>
> Before this patch, b44a block are not detected when there is float channel
> before half channel (b44a only compress half channel).
>
> Comments welcome
>
> Martin
> Jokyo Images
>

I already applied this, i think.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Michael Niedermayer
On Sat, Jun 25, 2016 at 03:02:30PM +0200, Jan Gerber wrote:
> On 06/25/2016 02:45 PM, Amancio Hasty wrote:
> > Most cool. Can you post the exact command line that you used to 
> > test h264_omx?
> 
> git remote add tmm1 https://github.com/tmm1/FFmpeg
> git fetch tmmi1
> git checkout -b omx

> git cherry-pick 2a1fcc3775a390570679da7f507539a397fc7130

applied


> git cherry-pick 1087f0dc172a9adf779e41bf2dc82639fb04ebd4

is this or 0c9c4004ed57de210b4d83c7b39bbfb00b86b9af preferred ?


> 
> ./configure --enable-mmal --enable-omx-rpi --enable-omx
> make
> ./ffmpeg -i test.avi -an -c:v h264_omx test.mp4

Thanks for testing!


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

It is what and why we do it that matters, not just one of them.


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


Re: [FFmpeg-devel] libavcodec/exr : Fix float decoding when there is Half and float channels in B44 file

2016-06-25 Thread Martin Vignali
2016-06-25 18:39 GMT+02:00 Paul B Mahol :

> On 6/25/16, Martin Vignali  wrote:
> > Hello,
> >
> > In attach,
> > the diff between the two previous patch, in order to add fix for b44a
> > compression when there is float data inside the file
> >
> > Before this patch, b44a block are not detected when there is float
> channel
> > before half channel (b44a only compress half channel).
> >
> > Comments welcome
> >
> > Martin
> > Jokyo Images
> >
>
> I already applied this, i think.
> ___
>
Yes.
I doesn't see your previous answer, when i send my last email.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Michael Niedermayer
On Thu, Jun 23, 2016 at 11:00:48PM +0200, Michael Niedermayer wrote:
> Hi all
> 
> what shall FFmpeg 3.1 be called ?
> 
> I still have these ideas from past suggestions:
> Von Neumann, Einstein, lorentz, poincaré, desitter, de broglie, Gauss, 
> Galois, Viterbi, Darwin
> 
> Are there other suggestions?
> Is something preferred ?
> 
> In absence of any preferrance ill pick something randomly

Anyone wants to write release notes ?
or shall we release without release notes ?

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.


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


Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Jan Gerber
On 06/25/2016 06:50 PM, Michael Niedermayer wrote:
>> git cherry-pick 1087f0dc172a9adf779e41bf2dc82639fb04ebd4
> 
> is this or 0c9c4004ed57de210b4d83c7b39bbfb00b86b9af preferred ?

both are ok, would use 0c9c4004ed57de210b4d83c7b39bbfb00b86b9af
to keep the delta to libav smaller.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter/vf_rotate: add >8 bit depth support

2016-06-25 Thread Carl Eugen Hoyos
Paul B Mahol  gmail.com> writes:

> >>+AV_PIX_FMT_YUV420P9LE, AV_PIX_FMT_YUVA420P9LE,
> >
> > Why not use native endian format?
> 
> Because of fate test.

Isn't the byte-swapping (that could be used for the 
fate test) bit-exact? Or do I miss something?

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH v2] lavd/decklink_common: Fix error caused by -Werror=missing-prototypes

2016-06-25 Thread Carl Eugen Hoyos
Michael Niedermayer  niedermayer.cc> writes:

> why does this happen ?

I thought it happens because FFmpeg include third-party 
files that do not copmile with error=missing-prototypes.

Carl Eugen

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


[FFmpeg-devel] avcodec/als: floating point support in ALS decoder

2016-06-25 Thread Umair Khan
Hi,

Patch attached.

Umair
From 56281948ec484c19dd9009c861ded38905e1b786 Mon Sep 17 00:00:00 2001
From: Umair Khan 
Date: Sat, 25 Jun 2016 22:48:02 +0530
Subject: [PATCH] avcodec/als: floating point support in ALS decoder

Signed-off-by: Umair Khan 
---
 libavcodec/Makefile   |   2 +-
 libavcodec/alsdec.c   | 286 +-
 libavcodec/mlz.c  | 162 
 libavcodec/mlz.h  |  67 ++
 libavutil/softfloat_ieee754.h | 115 +
 5 files changed, 629 insertions(+), 3 deletions(-)
 create mode 100644 libavcodec/mlz.c
 create mode 100644 libavcodec/mlz.h
 create mode 100644 libavutil/softfloat_ieee754.h

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 8f63261..3b6c7a8 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -161,7 +161,7 @@ OBJS-$(CONFIG_ALAC_DECODER)+= alac.o alac_data.o alacdsp.o
 OBJS-$(CONFIG_ALAC_ENCODER)+= alacenc.o alac_data.o
 OBJS-$(CONFIG_ALIAS_PIX_DECODER)   += aliaspixdec.o
 OBJS-$(CONFIG_ALIAS_PIX_ENCODER)   += aliaspixenc.o
-OBJS-$(CONFIG_ALS_DECODER) += alsdec.o bgmc.o mpeg4audio.o
+OBJS-$(CONFIG_ALS_DECODER) += alsdec.o bgmc.o mlz.o mpeg4audio.o
 OBJS-$(CONFIG_AMRNB_DECODER)   += amrnbdec.o celp_filters.o   \
   celp_math.o acelp_filters.o \
   acelp_vectors.o \
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 842fc7d..00c7eab 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -35,8 +35,11 @@
 #include "bgmc.h"
 #include "bswapdsp.h"
 #include "internal.h"
+#include "mlz.h"
 #include "libavutil/samplefmt.h"
 #include "libavutil/crc.h"
+#include "libavutil/softfloat_ieee754.h"
+#include "libavutil/intfloat.h"
 
 #include 
 
@@ -225,6 +228,14 @@ typedef struct ALSDecContext {
 int32_t **raw_samples;  ///< decoded raw samples for each channel
 int32_t *raw_buffer;///< contains all decoded raw samples including carryover samples
 uint8_t *crc_buffer;///< buffer of byte order corrected samples used for CRC check
+MLZ* mlz;   ///< masked lz decompression structure
+SoftFloat_IEEE754 *acf; ///< contains common multiplier for all channels
+int *last_acf_mantissa; ///< contains the last acf mantissa data of common multiplier for all channels
+int *shift_value;   ///< value by which the binary point is to be shifted for all channels
+int *last_shift_value;  ///< contains last shift value for all channels
+int **raw_mantissa; ///< decoded mantissa bits of the difference signal
+unsigned char *larray;  ///< buffer to store the output of masked lz decompression
+int *nbits; ///< contains the number of bits to read for masked lz decompression for all samples
 } ALSDecContext;
 
 
@@ -441,7 +452,6 @@ static int check_specific_config(ALSDecContext *ctx)
 }   \
 }
 
-MISSING_ERR(sconf->floating,  "Floating point decoding", AVERROR_PATCHWELCOME);
 MISSING_ERR(sconf->rlslms,"Adaptive RLS-LMS prediction", AVERROR_PATCHWELCOME);
 
 return error;
@@ -1351,6 +1361,241 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd,
 }
 
 
+/** multiply two softfloats and handle the rounding off
+ */
+static SoftFloat_IEEE754 multiply(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) {
+uint64_t mantissa_temp;
+uint64_t mask_64;
+int bit_count;
+int cutoff_bit_count;
+unsigned char last_2_bits;
+unsigned int mantissa;
+uint32_t return_val = 0;
+int32_t sign;
+
+sign = a.sign ^ b.sign;
+
+//Multiply mantissa bits in a 64-bit register
+mantissa_temp = (uint64_t)a.mant * (uint64_t)b.mant;
+
+// Count the valid bit count
+for(bit_count=48, mask_64=(uint64_t)0x1 << 47; !(mantissa_temp & mask_64) && mask_64; bit_count--, mask_64>>=1);
+
+// Round off
+cutoff_bit_count = bit_count - 24;
+if (cutoff_bit_count > 0) {
+last_2_bits = (unsigned char)(((unsigned int)mantissa_temp >> (cutoff_bit_count - 1)) & 0x3 );
+if ((last_2_bits == 0x3) || ((last_2_bits == 0x1) && ((unsigned int)mantissa_temp & ((0x1UL << (cutoff_bit_count - 1)) - 1 {
+// Need to round up
+mantissa_temp += (uint64_t)0x1 << cutoff_bit_count;
+}
+}
+
+mantissa = (unsigned int)(mantissa_temp >> cutoff_bit_count);
+// Need one more shift?
+if (mantissa & 0x0100ul) {
+bit_count++;
+mantissa >>= 1;
+}
+
+if (!sign) {
+return_val = 0x8000U;
+}
+return_val |= (a.exp + b.exp + bit_count - 47) << 23;
+return_val |= mantissa;
+return av_bits2sf_ieee754(return_val);
+}
+
+
+/** Read and decode the floating point sample da

Re: [FFmpeg-devel] [PATCH] lavd/avfoundation: Fix skewed video output

2016-06-25 Thread Carl Eugen Hoyos
Rick Kern  gmail.com> writes:

> Fixes #5654.

Can you reproduce and test?
I was also looking at CVPixelBufferGetBytesPerRow() but I was 
wondering if FFmpeg maybe uses an incorrect width; does 
CVPixelBufferGetWidth() return the expected value?

> +int src_linesize[4];

> +memset(src_linesize, 0, sizeof(src_linesize));

I believe this should be:
int src_linesize[4] = { 0 };

> +size_t plane_count = CVPixelBufferGetPlaneCount(image_buffer);

Maybe check if plane_count is identical with what 
av_image_copy below will use because of the pixel_format.

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] avformat/format: Fix registering a format more than once and related races

2016-06-25 Thread Michael Niedermayer
On Sun, Jun 05, 2016 at 11:40:47PM +0200, Michael Niedermayer wrote:
> On Thu, Apr 07, 2016 at 08:08:41PM +0200, wm4 wrote:
> > On Thu,  7 Apr 2016 17:51:26 +0200
> > Michael Niedermayer  wrote:
> > 
> > > Signed-off-by: Michael Niedermayer 
> > > ---
> > >  libavformat/format.c |   16 ++--
> > >  1 file changed, 10 insertions(+), 6 deletions(-)
> > > 
> > > diff --git a/libavformat/format.c b/libavformat/format.c
> > > index 15fe167..f0abb5d 100644
> > > --- a/libavformat/format.c
> > > +++ b/libavformat/format.c
> > > @@ -62,20 +62,24 @@ void av_register_input_format(AVInputFormat *format)
> > >  {
> > >  AVInputFormat **p = last_iformat;
> > >  
> > > -format->next = NULL;
> > > -while(*p || avpriv_atomic_ptr_cas((void * volatile *)p, NULL, 
> > > format))
> > > +// Note, format could be added after the first 2 checks but that 
> > > implies that *p is no longer NULL
> > > +while(p != &format->next && !format->next && 
> > > avpriv_atomic_ptr_cas((void * volatile *)p, NULL, format))
> > >  p = &(*p)->next;
> > > -last_iformat = &format->next;
> > > +
> > > +if (!format->next)
> > > +last_iformat = &format->next;
> > >  }
> > >  
> > >  void av_register_output_format(AVOutputFormat *format)
> > >  {
> > >  AVOutputFormat **p = last_oformat;
> > >  
> > > -format->next = NULL;
> > > -while(*p || avpriv_atomic_ptr_cas((void * volatile *)p, NULL, 
> > > format))
> > > +// Note, format could be added after the first 2 checks but that 
> > > implies that *p is no longer NULL
> > > +while(p != &format->next && !format->next && 
> > > avpriv_atomic_ptr_cas((void * volatile *)p, NULL, format))
> > >  p = &(*p)->next;
> > > -last_oformat = &format->next;
> > > +
> > > +if (!format->next)
> > > +last_oformat = &format->next;
> > >  }
> > >  
> > >  int av_match_ext(const char *filename, const char *extensions)
> > 
> > This is a giant heap of crap, and it's probably not easy to do much
> > better. Have you considered just using a mutex instead? We have the
> > equivalent of pthread_init_once on all platforms now.
> 
> it could be done with a mutex but it would be alot more code and
> it seems noone works on implementing that
> 
> so unles there are objections ill push this, leaving the race is worst
> of all options

applied

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus


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


[FFmpeg-devel] fate/exr : add test for file with half and float channels

2016-06-25 Thread Martin Vignali
Hello,

In attach patch in order to add several tests for tile and scanline exr file
who have half and float channels.


It also cover compression in tile (except for piz)
and now cover the layer option of exr.
(reason why each file have two tests (one for each layer))

There is more tests for pxr24 and b44 compression, because there is more
"special" case for theses compressions.

Samples can be download here : https://we.tl/yfpn8eTjpi

And need to be put inside :
./fate-suite/exr/

Martin
Jokyo Images


-- 
Martin Vignali
Jokyo Images
18 rue du Transvaal
69008 Lyon
06 99 89 33 30
m.vign...@jokyo-images.com
http://www.jokyo-images.com/
From 5d61fb691447016217f7b421afa748b3698d8dfa Mon Sep 17 00:00:00 2001
From: Martin Vignali 
Date: Sat, 25 Jun 2016 20:16:01 +0200
Subject: [PATCH] fate/exr : add tests for file with half and float channels

---
 tests/fate/image.mak   | 108 +
 .../fate/exr-rgb-scanline-b44-half-float-12x8-l1   |   6 ++
 .../fate/exr-rgb-scanline-b44-half-float-12x8-l2   |   6 ++
 .../ref/fate/exr-rgb-scanline-pxr24-float-half-l1  |   6 ++
 .../ref/fate/exr-rgb-scanline-pxr24-float-half-l2  |   6 ++
 .../ref/fate/exr-rgb-scanline-pxr24-half-float-l1  |   6 ++
 .../ref/fate/exr-rgb-scanline-pxr24-half-float-l2  |   6 ++
 tests/ref/fate/exr-rgb-scanline-raw-half-float-l1  |   6 ++
 tests/ref/fate/exr-rgb-scanline-raw-half-float-l2  |   6 ++
 tests/ref/fate/exr-rgb-scanline-rle-half-float-l1  |   6 ++
 tests/ref/fate/exr-rgb-scanline-rle-half-float-l2  |   6 ++
 tests/ref/fate/exr-rgb-scanline-zip-half-float-l1  |   6 ++
 tests/ref/fate/exr-rgb-scanline-zip-half-float-l2  |   6 ++
 tests/ref/fate/exr-rgb-scanline-zip1-half-float-l1 |   6 ++
 tests/ref/fate/exr-rgb-scanline-zip1-half-float-l2 |   6 ++
 tests/ref/fate/exr-rgb-tile-half-float-b44-12x8-l1 |   6 ++
 tests/ref/fate/exr-rgb-tile-half-float-b44-12x8-l2 |   6 ++
 tests/ref/fate/exr-rgb-tile-pxr24-float-half-l1|   6 ++
 tests/ref/fate/exr-rgb-tile-pxr24-float-half-l2|   6 ++
 tests/ref/fate/exr-rgb-tile-pxr24-half-float-l1|   6 ++
 tests/ref/fate/exr-rgb-tile-pxr24-half-float-l2|   6 ++
 tests/ref/fate/exr-rgb-tile-raw-half-float-l1  |   6 ++
 tests/ref/fate/exr-rgb-tile-raw-half-float-l2  |   6 ++
 tests/ref/fate/exr-rgb-tile-rle-half-float-l1  |   6 ++
 tests/ref/fate/exr-rgb-tile-rle-half-float-l2  |   6 ++
 tests/ref/fate/exr-rgb-tile-zip-half-float-l1  |   6 ++
 tests/ref/fate/exr-rgb-tile-zip-half-float-l2  |   6 ++
 tests/ref/fate/exr-rgb-tile-zip1-half-float-l1 |   6 ++
 tests/ref/fate/exr-rgb-tile-zip1-half-float-l2 |   6 ++
 .../fate/exr-rgba-scanline-float-half-b44-12x8-l1  |   6 ++
 .../fate/exr-rgba-scanline-float-half-b44-12x8-l2  |   6 ++
 .../fate/exr-rgba-scanline-float-half-b44-13x9-l1  |   6 ++
 .../fate/exr-rgba-scanline-float-half-b44-13x9-l2  |   6 ++
 .../fate/exr-rgba-scanline-float-half-b44a-12x8-l1 |   6 ++
 .../fate/exr-rgba-scanline-float-half-b44a-12x8-l2 |   6 ++
 .../fate/exr-rgba-scanline-float-half-b44a-13x9-l1 |   6 ++
 .../fate/exr-rgba-scanline-float-half-b44a-13x9-l2 |   6 ++
 37 files changed, 324 insertions(+)
 create mode 100644 tests/ref/fate/exr-rgb-scanline-b44-half-float-12x8-l1
 create mode 100644 tests/ref/fate/exr-rgb-scanline-b44-half-float-12x8-l2
 create mode 100644 tests/ref/fate/exr-rgb-scanline-pxr24-float-half-l1
 create mode 100644 tests/ref/fate/exr-rgb-scanline-pxr24-float-half-l2
 create mode 100644 tests/ref/fate/exr-rgb-scanline-pxr24-half-float-l1
 create mode 100644 tests/ref/fate/exr-rgb-scanline-pxr24-half-float-l2
 create mode 100644 tests/ref/fate/exr-rgb-scanline-raw-half-float-l1
 create mode 100644 tests/ref/fate/exr-rgb-scanline-raw-half-float-l2
 create mode 100644 tests/ref/fate/exr-rgb-scanline-rle-half-float-l1
 create mode 100644 tests/ref/fate/exr-rgb-scanline-rle-half-float-l2
 create mode 100644 tests/ref/fate/exr-rgb-scanline-zip-half-float-l1
 create mode 100644 tests/ref/fate/exr-rgb-scanline-zip-half-float-l2
 create mode 100644 tests/ref/fate/exr-rgb-scanline-zip1-half-float-l1
 create mode 100644 tests/ref/fate/exr-rgb-scanline-zip1-half-float-l2
 create mode 100644 tests/ref/fate/exr-rgb-tile-half-float-b44-12x8-l1
 create mode 100644 tests/ref/fate/exr-rgb-tile-half-float-b44-12x8-l2
 create mode 100644 tests/ref/fate/exr-rgb-tile-pxr24-float-half-l1
 create mode 100644 tests/ref/fate/exr-rgb-tile-pxr24-float-half-l2
 create mode 100644 tests/ref/fate/exr-rgb-tile-pxr24-half-float-l1
 create mode 100644 tests/ref/fate/exr-rgb-tile-pxr24-half-float-l2
 create mode 100644 tests/ref/fate/exr-rgb-tile-raw-half-float-l1
 create mode 100644 tests/ref/fate/exr-rgb-tile-raw-half-float-l2
 create mode 100644 tests/ref/fate/exr-rgb-tile-rle-half-float-l1
 create mode 100644 tests/ref/fate/exr-rgb-tile-rle-half-float-l2
 create mode 100644 tests/ref/fate/exr-rgb-tile-zip-half-float-l1
 create mode 100644 tests/ref/fate/exr-rgb-tile-zip-half-float-l2
 create mode 100644

Re: [FFmpeg-devel] [PATCH] avfilter/vf_rotate: add >8 bit depth support

2016-06-25 Thread Paul B Mahol
On 6/25/16, Carl Eugen Hoyos  wrote:
> Paul B Mahol  gmail.com> writes:
>
>> >>+AV_PIX_FMT_YUV420P9LE, AV_PIX_FMT_YUVA420P9LE,
>> >
>> > Why not use native endian format?
>>
>> Because of fate test.
>
> Isn't the byte-swapping (that could be used for the
> fate test) bit-exact? Or do I miss something?

What? There is bilinear option that have nothing to do with byte swapping.

>
> Carl Eugen
>
> ___
> 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] lavd/avfoundation: Fix skewed video output

2016-06-25 Thread Thilo Borgmann
Am 25.06.16 um 19:45 schrieb Carl Eugen Hoyos:
> Rick Kern  gmail.com> writes:
> 
>> Fixes #5654.
> 
> Can you reproduce and test?
> I was also looking at CVPixelBufferGetBytesPerRow() but I was 
> wondering if FFmpeg maybe uses an incorrect width; does 
> CVPixelBufferGetWidth() return the expected value?
> 
>> +int src_linesize[4];
> 
>> +memset(src_linesize, 0, sizeof(src_linesize));
> 
> I believe this should be:
> int src_linesize[4] = { 0 };
> 
>> +size_t plane_count = CVPixelBufferGetPlaneCount(image_buffer);
> 
> Maybe check if plane_count is identical with what 
> av_image_copy below will use because of the pixel_format.

Basically your patch LGTM if tested.

Carl Eugens hints are worth to verify - I'm lacking the time currently.
You might want to have a look at the overhaul patch (somewhere on the ML) if it
also uses the wrong code for copying you've just corrected with your patch or if
it already handle things differently (I just don't remember if that was one of
the things I'd changed).

Most likely I'll continue work on avfoundation after GSoC... I'm quite sorry for
all the bugs I cannot fix right now...

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


Re: [FFmpeg-devel] [PATCH v2] lavd/decklink_common: Fix error caused by -Werror=missing-prototypes

2016-06-25 Thread Michael Niedermayer
On Sat, Jun 25, 2016 at 05:29:56PM +, Carl Eugen Hoyos wrote:
> Michael Niedermayer  niedermayer.cc> writes:
> 
> > why does this happen ?
> 
> I thought it happens because FFmpeg include third-party 
> files that do not copmile with error=missing-prototypes.

but why should they build with random "warning are error" flags ?
one cannot write headers that are guranteed to never trigger a warning
on any compiler.
and if one cannot and does not, -Werror* could not work unless it
has an exception for system / 3rd party stuff

also see:

http://stackoverflow.com/questions/1867065/how-to-suppress-gcc-warnings-from-library-headers
http://stackoverflow.com/questions/3308523/how-to-eliminate-external-lib-third-party-warnings-in-gcc


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

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle


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


Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Michael Niedermayer
On Sat, Jun 25, 2016 at 07:21:15PM +0200, Jan Gerber wrote:
> On 06/25/2016 06:50 PM, Michael Niedermayer wrote:
> >> git cherry-pick 1087f0dc172a9adf779e41bf2dc82639fb04ebd4
> > 
> > is this or 0c9c4004ed57de210b4d83c7b39bbfb00b86b9af preferred ?
> 
> both are ok, would use 0c9c4004ed57de210b4d83c7b39bbfb00b86b9af
> to keep the delta to libav smaller.

ok applied

thanks

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

It is what and why we do it that matters, not just one of them.


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


[FFmpeg-devel] fate/webp : add test for webp lossless rgb decoding

2016-06-25 Thread Martin Vignali
Hello,

In attach a patch to add a fate test for WebP lossless rgb

Sample can be found here : https://we.tl/dmPsitbwXK

and need to be put inside ./fate-suite/webp (the webp folder doesn't exists)

to test :
make fate-webp SAMPLES=fate-suite/


I doesn't make fate test, for lossy rgb/rgba, because the actual default
output of ffmpeg
have a lower image quality than the official decoder (google dwebp) on my
samples

for lossless rgba, i doesn't make fate test, because the alpha value seems
to not be the right value



Martin
From 414cfa9f25e6246b8835922e9250578b9ca5a004 Mon Sep 17 00:00:00 2001
From: Martin Vignali 
Date: Sat, 25 Jun 2016 21:34:43 +0200
Subject: [PATCH] fate/webp : add test for webp rgb lossless decoding

the ffmpeg output have been compared to official webp decoding tool output (dwebp)
---
 tests/fate/image.mak | 7 +++
 tests/ref/fate/webp-rgb-lossless | 6 ++
 2 files changed, 13 insertions(+)
 create mode 100644 tests/ref/fate/webp-rgb-lossless

diff --git a/tests/fate/image.mak b/tests/fate/image.mak
index a67c07f..00a614a 100644
--- a/tests/fate/image.mak
+++ b/tests/fate/image.mak
@@ -247,6 +247,13 @@ FATE_TIFF-$(call DEMDEC, IMAGE2, TIFF) += $(FATE_TIFF)
 FATE_IMAGE += $(FATE_TIFF-yes)
 fate-tiff: $(FATE_TIFF-yes)
 
+FATE_WEBP += fate-webp-rgb-lossless
+fate-webp-rgb-lossless: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgb_lossless.webp
+
+FATE_WEBP-$(call DEMDEC, IMAGE2, WEBP) += $(FATE_WEBP)
+FATE_IMAGE += $(FATE_WEBP-yes)
+fate-webp: $(FATE_WEBP-yes)
+
 FATE_IMAGE-$(call DEMDEC, IMAGE2, XFACE) += fate-xface
 fate-xface: CMD = framecrc -i $(TARGET_SAMPLES)/xface/lena.xface
 
diff --git a/tests/ref/fate/webp-rgb-lossless b/tests/ref/fate/webp-rgb-lossless
new file mode 100644
index 000..8dbdfd6
--- /dev/null
+++ b/tests/ref/fate/webp-rgb-lossless
@@ -0,0 +1,6 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 12x8
+#sar 0: 0/1
+0,  0,  0,1,  384, 0xe30d1b01
-- 
1.9.3 (Apple Git-50)

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


Re: [FFmpeg-devel] fate/webp : add test for webp lossless rgb decoding

2016-06-25 Thread James Almer
On 6/25/2016 4:43 PM, Martin Vignali wrote:
> Hello,
> 
> In attach a patch to add a fate test for WebP lossless rgb
> 
> Sample can be found here : https://we.tl/dmPsitbwXK
> 
> and need to be put inside ./fate-suite/webp (the webp folder doesn't exists)
> 
> to test :
> make fate-webp SAMPLES=fate-suite/
> 
> 
> I doesn't make fate test, for lossy rgb/rgba, because the actual default
> output of ffmpeg
> have a lower image quality than the official decoder (google dwebp) on my
> samples
> 
> for lossless rgba, i doesn't make fate test, because the alpha value seems
> to not be the right value

This is a bug and should be addressed, then. Lossless should mean lossless.
Can you fix it, or open a ticket on trac with a testcase?

> 
> 
> 
> Martin
> 
> 
> 
> ___
> 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] fate/webp : add test for webp lossless rgb decoding

2016-06-25 Thread Martin Vignali
2016-06-25 21:47 GMT+02:00 James Almer :

> On 6/25/2016 4:43 PM, Martin Vignali wrote:
> > Hello,
> >
> > In attach a patch to add a fate test for WebP lossless rgb
> >
> > Sample can be found here : https://we.tl/dmPsitbwXK
> >
> > and need to be put inside ./fate-suite/webp (the webp folder doesn't
> exists)
> >
> > to test :
> > make fate-webp SAMPLES=fate-suite/
> >
> >
> > I doesn't make fate test, for lossy rgb/rgba, because the actual default
> > output of ffmpeg
> > have a lower image quality than the official decoder (google dwebp) on my
> > samples
> >
> > for lossless rgba, i doesn't make fate test, because the alpha value
> seems
> > to not be the right value
>
> This is a bug and should be addressed, then. Lossless should mean lossless.
> Can you fix it, or open a ticket on trac with a testcase?
>
>
Sorry, in fact rgba lossless is ok (my mistake)

i will open a ticket on trac for lossy

and i will make another patch for fate for rgb and rgba lossless webP

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


Re: [FFmpeg-devel] fate/webp : add test for webp lossless rgb decoding

2016-06-25 Thread Martin Vignali
2016-06-25 21:52 GMT+02:00 Martin Vignali :

>
>
> 2016-06-25 21:47 GMT+02:00 James Almer :
>
>> On 6/25/2016 4:43 PM, Martin Vignali wrote:
>> > Hello,
>> >
>> > In attach a patch to add a fate test for WebP lossless rgb
>> >
>> > Sample can be found here : https://we.tl/dmPsitbwXK
>> >
>> > and need to be put inside ./fate-suite/webp (the webp folder doesn't
>> exists)
>> >
>> > to test :
>> > make fate-webp SAMPLES=fate-suite/
>> >
>> >
>> > I doesn't make fate test, for lossy rgb/rgba, because the actual default
>> > output of ffmpeg
>> > have a lower image quality than the official decoder (google dwebp) on
>> my
>> > samples
>> >
>> > for lossless rgba, i doesn't make fate test, because the alpha value
>> seems
>> > to not be the right value
>>
>> This is a bug and should be addressed, then. Lossless should mean
>> lossless.
>> Can you fix it, or open a ticket on trac with a testcase?
>>
>>
> Sorry, in fact rgba lossless is ok (my mistake)
>
> i will open a ticket on trac for lossy
>
> and i will make another patch for fate for rgb and rgba lossless webP
>
> Martin
>
>

New patch in attach, with rgb, and rgba lossless tests :
samples can be found here : https://we.tl/98mxCyIkhv

and need to be put inside ./fate-suite/webp (the webp folder doesn't exists)

to test :
make fate-webp SAMPLES=fate-suite/


Martin
From 9ec694ad16a680650c8618226c516a6d4ba9889c Mon Sep 17 00:00:00 2001
From: Martin Vignali 
Date: Sat, 25 Jun 2016 21:53:23 +0200
Subject: [PATCH] fate/webp : add test for webp lossless decoding (rgb and
 rgba)

output have been compared with official decoding tool output (dwebp)
---
 tests/fate/image.mak  | 10 ++
 tests/ref/fate/webp-rgb-lossless  |  6 ++
 tests/ref/fate/webp-rgba-lossless |  6 ++
 3 files changed, 22 insertions(+)
 create mode 100644 tests/ref/fate/webp-rgb-lossless
 create mode 100644 tests/ref/fate/webp-rgba-lossless

diff --git a/tests/fate/image.mak b/tests/fate/image.mak
index a67c07f..2087c10 100644
--- a/tests/fate/image.mak
+++ b/tests/fate/image.mak
@@ -247,6 +247,16 @@ FATE_TIFF-$(call DEMDEC, IMAGE2, TIFF) += $(FATE_TIFF)
 FATE_IMAGE += $(FATE_TIFF-yes)
 fate-tiff: $(FATE_TIFF-yes)
 
+FATE_WEBP += fate-webp-rgb-lossless
+fate-webp-rgb-lossless: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgb_lossless.webp
+
+FATE_WEBP += fate-webp-rgba-lossless
+fate-webp-rgba-lossless: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgba_lossless.webp
+
+FATE_WEBP-$(call DEMDEC, IMAGE2, WEBP) += $(FATE_WEBP)
+FATE_IMAGE += $(FATE_WEBP-yes)
+fate-webp: $(FATE_WEBP-yes)
+
 FATE_IMAGE-$(call DEMDEC, IMAGE2, XFACE) += fate-xface
 fate-xface: CMD = framecrc -i $(TARGET_SAMPLES)/xface/lena.xface
 
diff --git a/tests/ref/fate/webp-rgb-lossless b/tests/ref/fate/webp-rgb-lossless
new file mode 100644
index 000..8dbdfd6
--- /dev/null
+++ b/tests/ref/fate/webp-rgb-lossless
@@ -0,0 +1,6 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 12x8
+#sar 0: 0/1
+0,  0,  0,1,  384, 0xe30d1b01
diff --git a/tests/ref/fate/webp-rgba-lossless b/tests/ref/fate/webp-rgba-lossless
new file mode 100644
index 000..bb654ae
--- /dev/null
+++ b/tests/ref/fate/webp-rgba-lossless
@@ -0,0 +1,6 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 12x8
+#sar 0: 0/1
+0,  0,  0,1,  384, 0xbd35e0e6
-- 
1.9.3 (Apple Git-50)

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


Re: [FFmpeg-devel] fate/webp : add test for webp lossless rgb decoding

2016-06-25 Thread James Almer
On 6/25/2016 4:52 PM, Martin Vignali wrote:
> 2016-06-25 21:47 GMT+02:00 James Almer :
> 
>> On 6/25/2016 4:43 PM, Martin Vignali wrote:
>>> Hello,
>>>
>>> In attach a patch to add a fate test for WebP lossless rgb
>>>
>>> Sample can be found here : https://we.tl/dmPsitbwXK
>>>
>>> and need to be put inside ./fate-suite/webp (the webp folder doesn't
>> exists)
>>>
>>> to test :
>>> make fate-webp SAMPLES=fate-suite/
>>>
>>>
>>> I doesn't make fate test, for lossy rgb/rgba, because the actual default
>>> output of ffmpeg
>>> have a lower image quality than the official decoder (google dwebp) on my
>>> samples
>>>
>>> for lossless rgba, i doesn't make fate test, because the alpha value
>> seems
>>> to not be the right value
>>
>> This is a bug and should be addressed, then. Lossless should mean lossless.
>> Can you fix it, or open a ticket on trac with a testcase?
>>
>>
> Sorry, in fact rgba lossless is ok (my mistake)
> 
> i will open a ticket on trac for lossy

Not sure how it is with VP8/Webp, but unless the output is defined like with
hevc and VP9, different decoders may give different results, so it may not
be a bug.

You should still make a test for it anyway. It will reflect changes and
improvements to the decoder if they are added in the future and help detect
regressions.
And it can be in a separate patch than the rgb lossless ones.

> 
> and i will make another patch for fate for rgb and rgba lossless webP
> 
> Martin
> ___
> 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] fate/webp : add test for webp lossless rgb decoding

2016-06-25 Thread Michael Niedermayer
On Sat, Jun 25, 2016 at 09:56:15PM +0200, Martin Vignali wrote:
> 2016-06-25 21:52 GMT+02:00 Martin Vignali :
> 
> >
> >
> > 2016-06-25 21:47 GMT+02:00 James Almer :
> >
> >> On 6/25/2016 4:43 PM, Martin Vignali wrote:
> >> > Hello,
> >> >
> >> > In attach a patch to add a fate test for WebP lossless rgb
> >> >
> >> > Sample can be found here : https://we.tl/dmPsitbwXK
> >> >
> >> > and need to be put inside ./fate-suite/webp (the webp folder doesn't
> >> exists)
> >> >
> >> > to test :
> >> > make fate-webp SAMPLES=fate-suite/
> >> >
> >> >
> >> > I doesn't make fate test, for lossy rgb/rgba, because the actual default
> >> > output of ffmpeg
> >> > have a lower image quality than the official decoder (google dwebp) on
> >> my
> >> > samples
> >> >
> >> > for lossless rgba, i doesn't make fate test, because the alpha value
> >> seems
> >> > to not be the right value
> >>
> >> This is a bug and should be addressed, then. Lossless should mean
> >> lossless.
> >> Can you fix it, or open a ticket on trac with a testcase?
> >>
> >>
> > Sorry, in fact rgba lossless is ok (my mistake)
> >
> > i will open a ticket on trac for lossy
> >
> > and i will make another patch for fate for rgb and rgba lossless webP
> >
> > Martin
> >
> >
> 
> New patch in attach, with rgb, and rgba lossless tests :
> samples can be found here : https://we.tl/98mxCyIkhv
> 

> and need to be put inside ./fate-suite/webp (the webp folder doesn't exists)
> 
> to test :
> make fate-webp SAMPLES=fate-suite/

uploaded

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope


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


Re: [FFmpeg-devel] fate/exr : add test for file with half and float channels

2016-06-25 Thread Michael Niedermayer
On Sat, Jun 25, 2016 at 08:24:21PM +0200, Martin Vignali wrote:
> Hello,
> 
> In attach patch in order to add several tests for tile and scanline exr file
> who have half and float channels.
> 
> 
> It also cover compression in tile (except for piz)
> and now cover the layer option of exr.
> (reason why each file have two tests (one for each layer))
> 
> There is more tests for pxr24 and b44 compression, because there is more
> "special" case for theses compressions.
> 

> Samples can be download here : https://we.tl/yfpn8eTjpi
> 
> And need to be put inside :
> ./fate-suite/exr/

uploaded

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates


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


Re: [FFmpeg-devel] avcodec/als: floating point support in ALS decoder

2016-06-25 Thread Michael Niedermayer
On Sat, Jun 25, 2016 at 10:52:40PM +0530, Umair Khan wrote:
> Hi,
> 
> Patch attached.
> 
> Umair

>  libavcodec/Makefile   |2 
>  libavcodec/alsdec.c   |  286 
> +-
>  libavcodec/mlz.c  |  162 +++
>  libavcodec/mlz.h  |   67 +
>  libavutil/softfloat_ieee754.h |  115 
>  5 files changed, 629 insertions(+), 3 deletions(-)
> 2f99fc6d37f05089e8f312b4af0d894e22f3a829  
> 0001-avcodec-als-floating-point-support-in-ALS-decoder.patch
> From 56281948ec484c19dd9009c861ded38905e1b786 Mon Sep 17 00:00:00 2001
> From: Umair Khan 
> Date: Sat, 25 Jun 2016 22:48:02 +0530
> Subject: [PATCH] avcodec/als: floating point support in ALS decoder
[...]
> @@ -1798,6 +2053,33 @@ static av_cold int decode_init(AVCodecContext *avctx)
>  ctx->raw_buffer   = av_mallocz_array(avctx->channels * channel_size, 
> sizeof(*ctx->raw_buffer));
>  ctx->raw_samples  = av_malloc_array(avctx->channels, 
> sizeof(*ctx->raw_samples));
>  
> +if (sconf->floating) {
> +ctx->acf =  av_malloc_array(avctx->channels, sizeof(*ctx->acf));
> +ctx->shift_value = av_malloc_array(avctx->channels, 
> sizeof(*ctx->shift_value));
> +ctx->last_shift_value = av_malloc_array(avctx->channels, 
> sizeof(*ctx->last_shift_value));
> +ctx->last_acf_mantissa = av_malloc_array(avctx->channels, 
> sizeof(*ctx->last_acf_mantissa));
> +ctx->raw_mantissa = av_malloc_array(avctx->channels, 
> sizeof(*ctx->raw_mantissa));

> +for (int c = 0; c < avctx->channels; ++c) {
> +ctx->raw_mantissa[c] = av_malloc_array(ctx->cur_frame_length, 
> sizeof(**ctx->raw_mantissa));
> +for (int i = 0; i < ctx->cur_frame_length; ++i) {

we dont use "for (int" syntax anywhere, i think some compilers had
problems with that

[...]

> +#define DIC_INDEX_MAX   32768L  // 2^15
> +#define FLUSH_CODE  256
> +#define FREEZE_CODE 257
> +#define FIRST_CODE  258
> +#define MAX_CODE32767L
> +#define TABLE_SIZE  35023L  // TABLE_SIZE must be a prime number

The L postfixes shouldnt be needed, int is 32+bit in POSIX

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

What does censorship reveal? It reveals fear. -- Julian Assange


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


[FFmpeg-devel] [PATCH 05/10] lavf/movenc: add deinit function

2016-06-25 Thread Rodger Combs
---
 libavformat/movenc.c | 70 ++--
 1 file changed, 30 insertions(+), 40 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d614933..9668b9c 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5475,21 +5475,18 @@ static int mov_write_header(AVFormatContext *s)
 if (mov->encryption_key_len != AES_CTR_KEY_SIZE) {
 av_log(s, AV_LOG_ERROR, "Invalid encryption key len %d 
expected %d\n",
 mov->encryption_key_len, AES_CTR_KEY_SIZE);
-ret = AVERROR(EINVAL);
-goto error;
+return AVERROR(EINVAL);
 }
 
 if (mov->encryption_kid_len != CENC_KID_SIZE) {
 av_log(s, AV_LOG_ERROR, "Invalid encryption kid len %d 
expected %d\n",
 mov->encryption_kid_len, CENC_KID_SIZE);
-ret = AVERROR(EINVAL);
-goto error;
+return AVERROR(EINVAL);
 }
 } else {
 av_log(s, AV_LOG_ERROR, "unsupported encryption scheme %s\n",
 mov->encryption_scheme_str);
-ret = AVERROR(EINVAL);
-goto error;
+return AVERROR(EINVAL);
 }
 }
 
@@ -5509,8 +5506,7 @@ static int mov_write_header(AVFormatContext *s)
 av_log(s, AV_LOG_ERROR, "Could not find tag for codec %s in stream 
#%d, "
"codec not currently supported in container\n",
avcodec_get_name(st->codecpar->codec_id), i);
-ret = AVERROR(EINVAL);
-goto error;
+return AVERROR(EINVAL);
 }
 /* If hinting of this track is enabled by a later hint track,
  * this is updated. */
@@ -5524,8 +5520,7 @@ static int mov_write_header(AVFormatContext *s)
 track->tag == MKTAG('m','x','5','p') || track->tag == 
MKTAG('m','x','5','n')) {
 if (st->codecpar->width != 720 || (st->codecpar->height != 608 
&& st->codecpar->height != 512)) {
 av_log(s, AV_LOG_ERROR, "D-10/IMX must use 720x608 or 
720x512 video resolution\n");
-ret = AVERROR(EINVAL);
-goto error;
+return AVERROR(EINVAL);
 }
 track->height = track->tag >> 24 == 'n' ? 486 : 576;
 }
@@ -5538,8 +5533,7 @@ static int mov_write_header(AVFormatContext *s)
 }
 if (st->codecpar->width > 65535 || st->codecpar->height > 65535) {
 av_log(s, AV_LOG_ERROR, "Resolution %dx%d too large for 
mov/mp4\n", st->codecpar->width, st->codecpar->height);
-ret = AVERROR(EINVAL);
-goto error;
+return AVERROR(EINVAL);
 }
 if (track->mode == MODE_MOV && track->timescale > 10)
 av_log(s, AV_LOG_WARNING,
@@ -5567,8 +5561,7 @@ static int mov_write_header(AVFormatContext *s)
"VP9 in MP4 support is experimental, add "
"'-strict %d' if you want to use it.\n",
FF_COMPLIANCE_EXPERIMENTAL);
-ret = AVERROR_EXPERIMENTAL;
-goto error;
+return AVERROR_EXPERIMENTAL;
 }
 }
 } else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
@@ -5581,8 +5574,7 @@ static int mov_write_header(AVFormatContext *s)
  st->codecpar->codec_id == AV_CODEC_ID_ILBC){
 if (!st->codecpar->block_align) {
 av_log(s, AV_LOG_ERROR, "track %d: codec block align is 
not set for adpcm\n", i);
-ret = AVERROR(EINVAL);
-goto error;
+return AVERROR(EINVAL);
 }
 track->sample_size = st->codecpar->block_align;
 }else if (st->codecpar->frame_size > 1){ /* assume compressed 
audio */
@@ -5599,8 +5591,7 @@ static int mov_write_header(AVFormatContext *s)
 if (s->strict_std_compliance >= FF_COMPLIANCE_NORMAL) {
 av_log(s, AV_LOG_ERROR, "track %d: muxing mp3 at %dhz is 
not standard, to mux anyway set strict to -1\n",
 i, track->par->sample_rate);
-ret = AVERROR(EINVAL);
-goto error;
+return AVERROR(EINVAL);
 } else {
 av_log(s, AV_LOG_WARNING, "track %d: muxing mp3 at %dhz is 
not standard in MP4\n",
i, track->par->sample_rate);
@@ -5630,8 +5621,7 @@ static int mov_write_header(AVFormatContext *s)
 track->vos_len  = st->codecpar->extradata_size;
 track->vos_data = av_malloc(track->vos_len);
 if (!track->vos_data) {
-ret = AVERROR(ENOMEM);
-goto error;
+

[FFmpeg-devel] [PATCH 10/10] fate/hevc: add automatic bsf test

2016-06-25 Thread Rodger Combs
---
 tests/fate/hevc.mak | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak
index 05266cd..fa63afd 100644
--- a/tests/fate/hevc.mak
+++ b/tests/fate/hevc.mak
@@ -225,6 +225,17 @@ $(foreach N,$(HEVC_SAMPLES_444_12BIT),$(eval $(call 
FATE_HEVC_TEST_444_12BIT,$(N
 fate-hevc-paramchange-yuv420p-yuv420p10: CMD = framecrc -vsync 0 -i 
$(TARGET_SAMPLES)/hevc/paramchange_yuv420p_yuv420p10.hevc -sws_flags 
area+accurate_rnd+bitexact
 FATE_HEVC += fate-hevc-paramchange-yuv420p-yuv420p10
 
+tests/data/hevc-mp4.mov: TAG = GEN
+tests/data/hevc-mp4.mov: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+   $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
+   -i $(TARGET_SAMPLES)/hevc-conformance/WPP_A_ericsson_MAIN10_2.bit -c 
copy -flags +bitexact $(TARGET_PATH)/$@ -y 2>/dev/null
+
+FATE_HEVC-$(call ALLYES, HEVC_DEMUXER MOV_DEMUXER HEVC_MP4TOANNEXB_BSF 
MOV_MUXER MPEGTS_MUXER) += fate-hevc-autobsf-mp4toannexb
+fate-hevc-autobsf-mp4toannexb: tests/data/hevc-mp4.mov
+fate-hevc-autobsf-mp4toannexb: CMD = md5 -i 
$(TARGET_PATH)/tests/data/hevc-mp4.mov -vcodec copy -fflags +bitexact -f mpegts
+fate-hevc-autobsf-mp4toannexb: CMP = oneline
+fate-hevc-autobsf-mp4toannexb: REF = 20dff2965578d779000800fce0ea80bb
+
 FATE_HEVC-$(call DEMDEC, HEVC, HEVC) += $(FATE_HEVC)
 
 FATE_SAMPLES_AVCONV += $(FATE_HEVC-yes)
-- 
2.8.3

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


[FFmpeg-devel] [PATCH 01/10] lavf: add a flag to enable/disable automatic bitstream filtering

2016-06-25 Thread Rodger Combs
This is mostly useful for muxers that wrap other muxers, such as dashenc
and segment. The actual duplicated bitstream filtering is largely harmless,
but delaying the header can cause problems when the muxer intended the header
to be written to a separate file.
---
 libavformat/avformat.h  | 1 +
 libavformat/mux.c   | 4 ++--
 libavformat/options_table.h | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index c881808..ec51cb3 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1446,6 +1446,7 @@ typedef struct AVFormatContext {
 #define AVFMT_FLAG_PRIV_OPT0x2 ///< Enable use of private options by 
delaying codec open (this could be made default once all code is converted)
 #define AVFMT_FLAG_KEEP_SIDE_DATA 0x4 ///< Don't merge side data but keep 
it separate.
 #define AVFMT_FLAG_FAST_SEEK   0x8 ///< Enable fast, but inaccurate seeks 
for some formats
+#define AVFMT_FLAG_AUTO_BSF0x10 ///< Wait for packet data before 
writing a header, and add bitstream filters as requested by the muxer
 
 /**
  * Maximum size of the data read from input for determining
diff --git a/libavformat/mux.c b/libavformat/mux.c
index a447645..486220e 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -500,7 +500,7 @@ int avformat_write_header(AVFormatContext *s, AVDictionary 
**options)
 if ((ret = init_muxer(s, options)) < 0)
 return ret;
 
-if (!s->oformat->check_bitstream) {
+if (!(s->oformat->check_bitstream && s->flags & AVFMT_FLAG_AUTO_BSF)) {
 ret = write_header_internal(s);
 if (ret < 0)
 goto fail;
@@ -1091,7 +1091,7 @@ int av_interleaved_write_frame(AVFormatContext *s, 
AVPacket *pkt)
 if (pkt) {
 AVStream *st = s->streams[pkt->stream_index];
 
-if (s->oformat->check_bitstream) {
+if (s->oformat->check_bitstream && s->flags & AVFMT_FLAG_AUTO_BSF) {
 if (!st->internal->bitstream_checked) {
 if ((ret = s->oformat->check_bitstream(s, pkt)) < 0)
 goto fail;
diff --git a/libavformat/options_table.h b/libavformat/options_table.h
index 3b74d1b..227c379 100644
--- a/libavformat/options_table.h
+++ b/libavformat/options_table.h
@@ -39,7 +39,7 @@ static const AVOption avformat_options[] = {
 {"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT64, {.i64 
= 500 }, 32, INT64_MAX, D},
 {"formatprobesize", "number of bytes to probe file format", 
OFFSET(format_probesize), AV_OPT_TYPE_INT, {.i64 = PROBE_BUF_MAX}, 0, 
INT_MAX-1, D},
 {"packetsize", "set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT, {.i64 
= DEFAULT }, 0, INT_MAX, E},
-{"fflags", NULL, OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 
AVFMT_FLAG_FLUSH_PACKETS }, INT_MIN, INT_MAX, D|E, "fflags"},
+{"fflags", NULL, OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 
AVFMT_FLAG_FLUSH_PACKETS | AVFMT_FLAG_AUTO_BSF }, INT_MIN, INT_MAX, D|E, 
"fflags"},
 {"flush_packets", "reduce the latency by flushing out packets immediately", 0, 
AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FLUSH_PACKETS }, INT_MIN, INT_MAX, E, 
"fflags"},
 {"ignidx", "ignore index", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_IGNIDX }, 
INT_MIN, INT_MAX, D, "fflags"},
 {"genpts", "generate pts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_GENPTS }, 
INT_MIN, INT_MAX, D, "fflags"},
@@ -54,6 +54,7 @@ static const AVOption avformat_options[] = {
 {"nobuffer", "reduce the latency introduced by optional buffering", 0, 
AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"},
 {"seek2any", "allow seeking to non-keyframes on demuxer level when supported", 
OFFSET(seek2any), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, D},
 {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 
= AVFMT_FLAG_BITEXACT }, 0, 0, E, "fflags" },
+{"autobsf", "add needed bsfs automatically (delays header until each stream's 
first packet is written)", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_AUTO_BSF 
}, 0, 0, E, "fflags" },
 {"analyzeduration", "specify how many microseconds are analyzed to probe the 
input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, 
INT64_MAX, D},
 {"cryptokey", "decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, {.dbl = 0}, 
0, 0, D},
 {"indexmem", "max memory used for timestamp index (per stream)", 
OFFSET(max_index_size), AV_OPT_TYPE_INT, {.i64 = 1<<20 }, 0, INT_MAX, D},
-- 
2.8.3

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


[FFmpeg-devel] [PATCH 09/10] fate/aac: add automatic bsf test

2016-06-25 Thread Rodger Combs
---
 tests/fate/aac.mak | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 3d64031..b02b768 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -241,6 +241,10 @@ FATE_AAC_LATM += fate-aac-latm_stereo_to_51
 fate-aac-latm_stereo_to_51: CMD = pcm -i 
$(TARGET_SAMPLES)/aac/latm_stereo_to_51.ts -channel_layout 5.1
 fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16
 
+fate-aac-autobsf-adtstoasc: CMD = md5 -i 
$(TARGET_SAMPLES)/audiomatch/tones_afconvert_16000_mono_aac_lc.adts -acodec 
copy -fflags +bitexact -f matroska
+fate-aac-autobsf-adtstoasc: CMP = oneline
+fate-aac-autobsf-adtstoasc: REF = b25ed78285f5c9004e2b027b347d33b7
+
 FATE_AAC-$(call  DEMDEC, AAC,AAC)  += $(FATE_AAC_CT_RAW)
 FATE_AAC-$(call  DEMDEC, MOV,AAC)  += $(FATE_AAC)
 FATE_AAC_LATM-$(call DEMDEC, MPEGTS, AAC_LATM) += $(FATE_AAC_LATM)
@@ -253,7 +257,9 @@ $(FATE_AAC_ALL): FUZZ = 2
 
 FATE_AAC_ENCODE-$(call ENCMUX, AAC, ADTS) += $(FATE_AAC_ENCODE)
 
-FATE_SAMPLES_FFMPEG += $(FATE_AAC_ALL) $(FATE_AAC_ENCODE-yes)
+FATE_AAC_BSF-$(call ALLYES, AAC_DEMUXER AAC_ADTSTOASC_BSF MATROSKA_MUXER) += 
fate-aac-autobsf-adtstoasc
+
+FATE_SAMPLES_FFMPEG += $(FATE_AAC_ALL) $(FATE_AAC_ENCODE-yes) 
$(FATE_AAC_BSF-yes)
 
-fate-aac: $(FATE_AAC_ALL) $(FATE_AAC_ENCODE)
+fate-aac: $(FATE_AAC_ALL) $(FATE_AAC_ENCODE) $(FATE_AAC_BSF-yes)
 fate-aac-latm: $(FATE_AAC_LATM-yes)
-- 
2.8.3

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


[FFmpeg-devel] [PATCH 08/10] fate/h264: add automatic bsf test

2016-06-25 Thread Rodger Combs
---
 tests/fate/h264.mak | 2 ++
 tests/ref/fate/h264-autobsf-mp4toannexb | 1 +
 2 files changed, 3 insertions(+)
 create mode 100644 tests/ref/fate/h264-autobsf-mp4toannexb

diff --git a/tests/fate/h264.mak b/tests/fate/h264.mak
index 4ae1305..e0a5446 100644
--- a/tests/fate/h264.mak
+++ b/tests/fate/h264.mak
@@ -205,6 +205,7 @@ FATE_H264-$(call DEMDEC,  MOV, H264) += 
fate-h264-invalid-ref-mod
 FATE_H264-$(call DEMDEC,  MOV, H264) += fate-h264-unescaped-extradata
 
 FATE_H264-$(call ALLYES, MOV_DEMUXER H264_MP4TOANNEXB_BSF) += 
fate-h264-bsf-mp4toannexb
+FATE_H264-$(call ALLYES, MOV_DEMUXER H264_MP4TOANNEXB_BSF MPEGTS_MUXER) += 
fate-h264-autobsf-mp4toannexb
 FATE_H264-$(call DEMDEC, MATROSKA, H264) += fate-h264-direct-bff
 FATE_H264-$(call DEMDEC, FLV, H264) += fate-h264-brokensps-2580
 FATE_H264-$(call DEMDEC, MXF, H264) += fate-h264-xavc-4389
@@ -404,6 +405,7 @@ fate-h264-conformance-sva_nl1_b:  CMD = 
framecrc -vsync drop -i
 fate-h264-conformance-sva_nl2_e:  CMD = framecrc -vsync drop 
-i $(TARGET_SAMPLES)/h264-conformance/SVA_NL2_E.264
 
 fate-h264-bsf-mp4toannexb:CMD = md5 -i 
$(TARGET_SAMPLES)/h264/interlaced_crop.mp4 -vcodec copy -bsf h264_mp4toannexb 
-f h264
+fate-h264-autobsf-mp4toannexb:CMD = md5 -i 
$(TARGET_SAMPLES)/h264/interlaced_crop.mp4 -vcodec copy -fflags +bitexact -f 
mpegts
 fate-h264-crop-to-container:  CMD = framemd5 -i 
$(TARGET_SAMPLES)/h264/crop-to-container-dims-canon.mov
 fate-h264-extreme-plane-pred: CMD = framemd5 -i 
$(TARGET_SAMPLES)/h264/extreme-plane-pred.h264
 fate-h264-interlace-crop: CMD = framecrc -i 
$(TARGET_SAMPLES)/h264/interlaced_crop.mp4 -vframes 3
diff --git a/tests/ref/fate/h264-autobsf-mp4toannexb 
b/tests/ref/fate/h264-autobsf-mp4toannexb
new file mode 100644
index 000..759340a
--- /dev/null
+++ b/tests/ref/fate/h264-autobsf-mp4toannexb
@@ -0,0 +1 @@
+5679e224461e524740d867bb8d7cab40
-- 
2.8.3

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


[FFmpeg-devel] [PATCH 04/10] lavf/segment: fix writing separate header with auto BSF

2016-06-25 Thread Rodger Combs
---
 libavformat/segment.c | 29 -
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index d22d550..d8877f0 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -89,6 +89,7 @@ typedef struct SegmentContext {
 int64_t last_val;  ///< remember last time for wrap around detection
 int64_t last_cut;  ///< remember last cut
 int cut_pending;
+int header_written;///< whether we've already called 
avformat_write_header
 
 char *entry_prefix;///< prefix to add to list entry filenames
 int list_type; ///< set the list type
@@ -260,6 +261,7 @@ static int segment_start(AVFormatContext *s, int 
write_header)
 if (write_header) {
 AVDictionary *options = NULL;
 av_dict_copy(&options, seg->format_options, 0);
+av_dict_set(&options, "fflags", "-autobsf", 0);
 err = avformat_write_header(oc, &options);
 av_dict_free(&options);
 if (err < 0)
@@ -751,7 +753,8 @@ static int seg_init(AVFormatContext *s)
 }
 
 av_dict_copy(&options, seg->format_options, 0);
-ret = avformat_write_header(oc, &options);
+av_dict_set(&options, "fflags", "-autobsf", 0);
+ret = avformat_init_output(oc, &options);
 if (av_dict_count(options)) {
 av_log(s, AV_LOG_ERROR,
"Some of the provided format options in '%s' are not 
recognized\n", seg->format_options_str);
@@ -767,6 +770,13 @@ static int seg_init(AVFormatContext *s)
 seg->segment_frame_count = 0;
 
 av_assert0(s->nb_streams == oc->nb_streams);
+if (ret == AVSTREAM_INIT_IN_WRITE_HEADER) {
+ret = avformat_write_header(oc, NULL);
+if (ret < 0)
+return ret;
+seg->header_written = 1;
+}
+
 for (i = 0; i < s->nb_streams; i++) {
 AVStream *inner_st  = oc->streams[i];
 AVStream *outer_st = s->streams[i];
@@ -776,6 +786,21 @@ static int seg_init(AVFormatContext *s)
 if (oc->avoid_negative_ts > 0 && s->avoid_negative_ts < 0)
 s->avoid_negative_ts = 1;
 
+return ret;
+}
+
+static int seg_write_header(AVFormatContext *s)
+{
+SegmentContext *seg = s->priv_data;
+AVFormatContext *oc = seg->avf;
+int ret;
+
+if (!seg->header_written) {
+ret = avformat_write_header(oc, NULL);
+if (ret < 0)
+return ret;
+}
+
 if (!seg->write_header_trailer || seg->header_filename) {
 if (seg->header_filename) {
 av_write_frame(oc, NULL);
@@ -1026,6 +1051,7 @@ AVOutputFormat ff_segment_muxer = {
 .priv_data_size = sizeof(SegmentContext),
 .flags  = AVFMT_NOFILE|AVFMT_GLOBALHEADER,
 .init   = seg_init,
+.write_header   = seg_write_header,
 .write_packet   = seg_write_packet,
 .write_trailer  = seg_write_trailer,
 .deinit = seg_free,
@@ -1046,6 +1072,7 @@ AVOutputFormat ff_stream_segment_muxer = {
 .priv_data_size = sizeof(SegmentContext),
 .flags  = AVFMT_NOFILE,
 .init   = seg_init,
+.write_header   = seg_write_header,
 .write_packet   = seg_write_packet,
 .write_trailer  = seg_write_trailer,
 .deinit = seg_free,
-- 
2.8.3

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


[FFmpeg-devel] [PATCH 03/10] lavf/segment: add deinit function

2016-06-25 Thread Rodger Combs
---
 libavformat/segment.c | 47 ---
 1 file changed, 20 insertions(+), 27 deletions(-)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index 4c6c6d4..d22d550 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -627,8 +627,9 @@ static int select_reference_stream(AVFormatContext *s)
 return 0;
 }
 
-static void seg_free_context(SegmentContext *seg)
+static void seg_free(AVFormatContext *s)
 {
+SegmentContext *seg = s->priv_data;
 ff_format_io_close(seg->avf, &seg->list_pb);
 avformat_free_context(seg->avf);
 seg->avf = NULL;
@@ -688,7 +689,7 @@ static int seg_init(AVFormatContext *s)
 if (ret < 0) {
 av_log(s, AV_LOG_ERROR, "Could not parse format options list 
'%s'\n",
seg->format_options_str);
-goto fail;
+return ret;
 }
 }
 
@@ -702,7 +703,7 @@ static int seg_init(AVFormatContext *s)
 }
 if (!seg->list_size && seg->list_type != LIST_TYPE_M3U8) {
 if ((ret = segment_list_open(s)) < 0)
-goto fail;
+return ret;
 } else {
 const char *proto = avio_find_protocol_name(s->filename);
 seg->use_rename = proto && !strcmp(proto, "file");
@@ -713,29 +714,26 @@ static int seg_init(AVFormatContext *s)
 av_log(s, AV_LOG_WARNING, "'ext' list type option is deprecated in 
favor of 'csv'\n");
 
 if ((ret = select_reference_stream(s)) < 0)
-goto fail;
+return ret;
 av_log(s, AV_LOG_VERBOSE, "Selected stream id:%d type:%s\n",
seg->reference_stream_index,

av_get_media_type_string(s->streams[seg->reference_stream_index]->codecpar->codec_type));
 
 seg->oformat = av_guess_format(seg->format, s->filename, NULL);
 
-if (!seg->oformat) {
-ret = AVERROR_MUXER_NOT_FOUND;
-goto fail;
-}
+if (!seg->oformat)
+return AVERROR_MUXER_NOT_FOUND;
 if (seg->oformat->flags & AVFMT_NOFILE) {
 av_log(s, AV_LOG_ERROR, "format %s not supported.\n",
seg->oformat->name);
-ret = AVERROR(EINVAL);
-goto fail;
+return AVERROR(EINVAL);
 }
 
 if ((ret = segment_mux_init(s)) < 0)
-goto fail;
+return ret;
 
 if ((ret = set_segment_filename(s)) < 0)
-goto fail;
+return ret;
 oc = seg->avf;
 
 if (seg->write_header_trailer) {
@@ -743,13 +741,13 @@ static int seg_init(AVFormatContext *s)
   seg->header_filename ? seg->header_filename : 
oc->filename,
   AVIO_FLAG_WRITE, NULL)) < 0) {
 av_log(s, AV_LOG_ERROR, "Failed to open segment '%s'\n", 
oc->filename);
-goto fail;
+return ret;
 }
 if (!seg->individual_header_trailer)
 oc->pb->seekable = 0;
 } else {
 if ((ret = open_null_ctx(&oc->pb)) < 0)
-goto fail;
+return ret;
 }
 
 av_dict_copy(&options, seg->format_options, 0);
@@ -757,13 +755,14 @@ static int seg_init(AVFormatContext *s)
 if (av_dict_count(options)) {
 av_log(s, AV_LOG_ERROR,
"Some of the provided format options in '%s' are not 
recognized\n", seg->format_options_str);
-ret = AVERROR(EINVAL);
-goto fail;
+av_dict_free(&options);
+return AVERROR(EINVAL);
 }
+av_dict_free(&options);
 
 if (ret < 0) {
 ff_format_io_close(oc, &oc->pb);
-goto fail;
+return ret;
 }
 seg->segment_frame_count = 0;
 
@@ -785,17 +784,12 @@ static int seg_init(AVFormatContext *s)
 close_null_ctxp(&oc->pb);
 }
 if ((ret = oc->io_open(oc, &oc->pb, oc->filename, AVIO_FLAG_WRITE, 
NULL)) < 0)
-goto fail;
+return ret;
 if (!seg->individual_header_trailer)
 oc->pb->seekable = 0;
 }
 
-fail:
-av_dict_free(&options);
-if (ret < 0)
-seg_free_context(seg);
-
-return ret;
+return 0;
 }
 
 static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
@@ -908,9 +902,6 @@ fail:
 seg->segment_frame_count++;
 }
 
-if (ret < 0)
-seg_free_context(seg);
-
 return ret;
 }
 
@@ -1037,6 +1028,7 @@ AVOutputFormat ff_segment_muxer = {
 .init   = seg_init,
 .write_packet   = seg_write_packet,
 .write_trailer  = seg_write_trailer,
+.deinit = seg_free,
 .check_bitstream = seg_check_bitstream,
 .priv_class = &seg_class,
 };
@@ -1056,6 +1048,7 @@ AVOutputFormat ff_stream_segment_muxer = {
 .init   = seg_init,
 .write_packet   = seg_write_packet,
 .write_trailer  = seg_write_trailer,
+.deinit = seg_free,
 .check_bitstream = seg_check_bitstream,
 .priv_class = &sseg_class,
 };
-- 
2.8.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.o

[FFmpeg-devel] [PATCH 06/10] lavf/dashenc: add deinit function

2016-06-25 Thread Rodger Combs
---
 libavformat/dashenc.c | 51 +--
 1 file changed, 17 insertions(+), 34 deletions(-)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 519f9c4..0848052 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -580,16 +580,12 @@ static int dash_write_header(AVFormatContext *s)
 *ptr = '\0';
 
 oformat = av_guess_format("mp4", NULL, NULL);
-if (!oformat) {
-ret = AVERROR_MUXER_NOT_FOUND;
-goto fail;
-}
+if (!oformat)
+return AVERROR_MUXER_NOT_FOUND;
 
 c->streams = av_mallocz(sizeof(*c->streams) * s->nb_streams);
-if (!c->streams) {
-ret = AVERROR(ENOMEM);
-goto fail;
-}
+if (!c->streams)
+return AVERROR(ENOMEM);
 
 for (i = 0; i < s->nb_streams; i++) {
 OutputStream *os = &c->streams[i];
@@ -606,17 +602,13 @@ static int dash_write_header(AVFormatContext *s)
 int level = s->strict_std_compliance >= FF_COMPLIANCE_STRICT ?
 AV_LOG_ERROR : AV_LOG_WARNING;
 av_log(s, level, "No bit rate set for stream %d\n", i);
-if (s->strict_std_compliance >= FF_COMPLIANCE_STRICT) {
-ret = AVERROR(EINVAL);
-goto fail;
-}
+if (s->strict_std_compliance >= FF_COMPLIANCE_STRICT)
+return AVERROR(EINVAL);
 }
 
 ctx = avformat_alloc_context();
-if (!ctx) {
-ret = AVERROR(ENOMEM);
-goto fail;
-}
+if (!ctx)
+return AVERROR(ENOMEM);
 os->ctx = ctx;
 ctx->oformat = oformat;
 ctx->interrupt_callback = s->interrupt_callback;
@@ -624,10 +616,8 @@ static int dash_write_header(AVFormatContext *s)
 ctx->io_close   = s->io_close;
 ctx->io_open= s->io_open;
 
-if (!(st = avformat_new_stream(ctx, NULL))) {
-ret = AVERROR(ENOMEM);
-goto fail;
-}
+if (!(st = avformat_new_stream(ctx, NULL)))
+return AVERROR(ENOMEM);
 avcodec_parameters_copy(st->codecpar, s->streams[i]->codecpar);
 st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
 st->time_base = s->streams[i]->time_base;
@@ -635,10 +625,8 @@ static int dash_write_header(AVFormatContext *s)
 ctx->flags = s->flags;
 
 ctx->pb = avio_alloc_context(os->iobuf, sizeof(os->iobuf), 
AVIO_FLAG_WRITE, os, NULL, dash_write, NULL);
-if (!ctx->pb) {
-ret = AVERROR(ENOMEM);
-goto fail;
-}
+if (!ctx->pb)
+return AVERROR(ENOMEM);
 
 if (c->single_file) {
 if (c->single_file_name)
@@ -651,13 +639,12 @@ static int dash_write_header(AVFormatContext *s)
 snprintf(filename, sizeof(filename), "%s%s", c->dirname, os->initfile);
 ret = s->io_open(s, &os->out, filename, AVIO_FLAG_WRITE, NULL);
 if (ret < 0)
-goto fail;
+return ret;
 os->init_start_pos = 0;
 
 av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);
-if ((ret = avformat_write_header(ctx, &opts)) < 0) {
- goto fail;
-}
+if ((ret = avformat_write_header(ctx, &opts)) < 0)
+return ret;
 os->ctx_inited = 1;
 avio_flush(ctx->pb);
 av_dict_free(&opts);
@@ -693,15 +680,11 @@ static int dash_write_header(AVFormatContext *s)
 
 if (!c->has_video && c->min_seg_duration <= 0) {
 av_log(s, AV_LOG_WARNING, "no video stream and no min seg duration 
set\n");
-ret = AVERROR(EINVAL);
+return AVERROR(EINVAL);
 }
 ret = write_manifest(s, 0);
 if (!ret)
 av_log(s, AV_LOG_VERBOSE, "Manifest written to: %s\n", s->filename);
-
-fail:
-if (ret)
-dash_free(s);
 return ret;
 }
 
@@ -992,7 +975,6 @@ static int dash_write_trailer(AVFormatContext *s)
 unlink(s->filename);
 }
 
-dash_free(s);
 return 0;
 }
 
@@ -1029,6 +1011,7 @@ AVOutputFormat ff_dash_muxer = {
 .write_header   = dash_write_header,
 .write_packet   = dash_write_packet,
 .write_trailer  = dash_write_trailer,
+.deinit = dash_free,
 .codec_tag  = (const AVCodecTag* const []){ ff_mp4_obj_type, 0 },
 .priv_class = &dash_class,
 };
-- 
2.8.3

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


[FFmpeg-devel] [PATCH 07/10] lavf/movenc+dashenc: add automatic bitstream filtering

2016-06-25 Thread Rodger Combs
This is disabled by default when the empty_moov flag is enabled
---
 libavformat/dashenc.c |  43 +++-
 libavformat/movenc.c  | 107 +++---
 2 files changed, 124 insertions(+), 26 deletions(-)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 0848052..534fa75 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -551,7 +551,7 @@ static int write_manifest(AVFormatContext *s, int final)
 return avpriv_io_move(temp_filename, s->filename);
 }
 
-static int dash_write_header(AVFormatContext *s)
+static int dash_init(AVFormatContext *s)
 {
 DASHContext *c = s->priv_data;
 int ret = 0, i;
@@ -643,7 +643,7 @@ static int dash_write_header(AVFormatContext *s)
 os->init_start_pos = 0;
 
 av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);
-if ((ret = avformat_write_header(ctx, &opts)) < 0)
+if ((ret = avformat_init_output(ctx, &opts)) < 0)
 return ret;
 os->ctx_inited = 1;
 avio_flush(ctx->pb);
@@ -682,6 +682,20 @@ static int dash_write_header(AVFormatContext *s)
 av_log(s, AV_LOG_WARNING, "no video stream and no min seg duration 
set\n");
 return AVERROR(EINVAL);
 }
+return 0;
+}
+
+static int dash_write_header(AVFormatContext *s)
+{
+DASHContext *c = s->priv_data;
+int i, ret;
+for (i = 0; i < s->nb_streams; i++) {
+OutputStream *os = &c->streams[i];
+if ((ret = avformat_write_header(os->ctx, NULL)) < 0) {
+dash_free(s);
+return ret;
+}
+}
 ret = write_manifest(s, 0);
 if (!ret)
 av_log(s, AV_LOG_VERBOSE, "Manifest written to: %s\n", s->filename);
@@ -978,6 +992,29 @@ static int dash_write_trailer(AVFormatContext *s)
 return 0;
 }
 
+static int dash_check_bitstream(struct AVFormatContext *s, const AVPacket 
*avpkt)
+{
+DASHContext *c = s->priv_data;
+OutputStream *os = &c->streams[avpkt->stream_index];
+AVFormatContext *oc = os->ctx;
+if (oc->oformat->check_bitstream) {
+int ret;
+AVPacket pkt = *avpkt;
+pkt.stream_index = 0;
+ret = oc->oformat->check_bitstream(oc, &pkt);
+if (ret == 1) {
+AVStream *st = s->streams[avpkt->stream_index];
+AVStream *ost = oc->streams[0];
+st->internal->bsfcs = ost->internal->bsfcs;
+st->internal->nb_bsfcs = ost->internal->nb_bsfcs;
+ost->internal->bsfcs = NULL;
+ost->internal->nb_bsfcs = 0;
+}
+return ret;
+}
+return 1;
+}
+
 #define OFFSET(x) offsetof(DASHContext, x)
 #define E AV_OPT_FLAG_ENCODING_PARAM
 static const AVOption options[] = {
@@ -1008,10 +1045,12 @@ AVOutputFormat ff_dash_muxer = {
 .audio_codec= AV_CODEC_ID_AAC,
 .video_codec= AV_CODEC_ID_H264,
 .flags  = AVFMT_GLOBALHEADER | AVFMT_NOFILE | AVFMT_TS_NEGATIVE,
+.init   = dash_init,
 .write_header   = dash_write_header,
 .write_packet   = dash_write_packet,
 .write_trailer  = dash_write_trailer,
 .deinit = dash_free,
 .codec_tag  = (const AVCodecTag* const []){ ff_mp4_obj_type, 0 },
+.check_bitstream = dash_check_bitstream,
 .priv_class = &dash_class,
 };
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 9668b9c..da87afe 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5323,11 +5323,10 @@ static int 
mov_create_dvd_sub_decoder_specific_info(MOVTrack *track,
 return 0;
 }
 
-static int mov_write_header(AVFormatContext *s)
+static int mov_init(AVFormatContext *s)
 {
-AVIOContext *pb = s->pb;
 MOVMuxContext *mov = s->priv_data;
-AVDictionaryEntry *t, *global_tcr = av_dict_get(s->metadata, "timecode", 
NULL, 0);
+AVDictionaryEntry *global_tcr = av_dict_get(s->metadata, "timecode", NULL, 
0);
 int i, ret, hint_track = 0, tmcd_track = 0;
 
 mov->fc = s;
@@ -5364,6 +5363,11 @@ static int mov_write_header(AVFormatContext *s)
 mov->flags |= FF_MOV_FLAG_FRAGMENT | FF_MOV_FLAG_EMPTY_MOOV |
   FF_MOV_FLAG_DEFAULT_BASE_MOOF;
 
+if (mov->flags & FF_MOV_FLAG_EMPTY_MOOV && s->flags & AVFMT_FLAG_AUTO_BSF) 
{
+av_log(s, AV_LOG_VERBOSE, "Empty MOOV enabled; disabling automatic 
bitstream filtering\n");
+s->flags &= ~AVFMT_FLAG_AUTO_BSF;
+}
+
 if (mov->flags & FF_MOV_FLAG_FASTSTART) {
 mov->reserved_moov_size = -1;
 }
@@ -5410,11 +5414,6 @@ static int mov_write_header(AVFormatContext *s)
 return AVERROR(EINVAL);
 }
 
-if (!(mov->flags & FF_MOV_FLAG_DELAY_MOOV)) {
-if ((ret = mov_write_identification(pb, s)) < 0)
-return ret;
-}
-
 mov->nb_streams = s->nb_streams;
 if (mov->mode & (MODE_MP4|MODE_MOV|MODE_IPOD) && s->nb_chapters)
 mov->chapter_track = mov->nb_streams++;
@@ -5437,7 +5436,7 @@ static int mov_write_header(AVFormatContext *s)
 /* +1 tmc

[FFmpeg-devel] [PATCH 02/10] lavf/mux: add avformat_init_output

2016-06-25 Thread Rodger Combs
This allows a consumer to run the muxer's init function without actually
writing the header, which is useful in chained muxers that support
automatic bitstream filtering.
---
 libavformat/avformat.h | 34 +--
 libavformat/internal.h | 10 
 libavformat/mux.c  | 64 +++---
 libavformat/version.h  |  4 ++--
 4 files changed, 94 insertions(+), 18 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index ec51cb3..84082e6 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -616,6 +616,8 @@ typedef struct AVOutputFormat {
  * AVStream parameters that need to be set before packets are sent.
  * This method must not write output.
  *
+ * Return 0 if streams were fully configured, 1 if not, negative AVERROR 
on failure
+ *
  * Any allocations made here must be freed in deinit().
  */
 int (*init)(struct AVFormatContext *);
@@ -2363,6 +2365,10 @@ void avformat_close_input(AVFormatContext **s);
  * @addtogroup lavf_encoding
  * @{
  */
+
+#define AVSTREAM_INIT_IN_WRITE_HEADER 0 ///< stream parameters initialized in 
avformat_write_header
+#define AVSTREAM_INIT_IN_INIT_OUTPUT  1 ///< stream parameters initialized in 
avformat_init_output
+
 /**
  * Allocate the stream private data and write the stream header to
  * an output media file.
@@ -2374,14 +2380,38 @@ void avformat_close_input(AVFormatContext **s);
  * On return this parameter will be destroyed and replaced 
with a dict containing
  * options that were not found. May be NULL.
  *
- * @return 0 on success, negative AVERROR on failure.
+ * @return AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec had not 
already been fully initialized in avformat_init,
+ * AVSTREAM_INIT_IN_INIT_OUTPUT  on success if the codec had already 
been fully initialized in avformat_init,
+ * negative AVERROR on failure.
  *
- * @see av_opt_find, av_dict_set, avio_open, av_oformat_next.
+ * @see av_opt_find, av_dict_set, avio_open, av_oformat_next, 
avformat_init_output.
  */
 av_warn_unused_result
 int avformat_write_header(AVFormatContext *s, AVDictionary **options);
 
 /**
+ * Allocate the stream private data and initialize the codec, but do not write 
the header.
+ * May optionally be used before avformat_write_header to initialize stream 
parameters
+ * before actually writing the header.
+ * If using this function, do not pass the same options to 
avformat_write_header.
+ *
+ * @param s Media file handle, must be allocated with avformat_alloc_context().
+ *  Its oformat field must be set to the desired output format;
+ *  Its pb field must be set to an already opened AVIOContext.
+ * @param options  An AVDictionary filled with AVFormatContext and 
muxer-private options.
+ * On return this parameter will be destroyed and replaced 
with a dict containing
+ * options that were not found. May be NULL.
+ *
+ * @return AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec requires 
avformat_write_header to fully initialize,
+ * AVSTREAM_INIT_IN_INIT_OUTPUT  on success if the codec has been 
fully initialized,
+ * negative AVERROR on failure.
+ *
+ * @see av_opt_find, av_dict_set, avio_open, av_oformat_next, 
avformat_write_header.
+ */
+av_warn_unused_result
+int avformat_init_output(AVFormatContext *s, AVDictionary **options);
+
+/**
  * Write a packet to an output media file.
  *
  * This function passes the packet directly to the muxer, without any buffering
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 647ad65..0f5166b 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -125,6 +125,16 @@ struct AVFormatInternal {
  */
 int header_written;
 int write_header_ret;
+
+/**
+ * Whether or not avformat_init_output has already been called
+ */
+int initialized;
+
+/**
+ * Whether or not avformat_init_output fully initialized streams
+ */
+int streams_initialized;
 };
 
 struct AVStreamInternal {
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 486220e..b0aa0e7 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -423,10 +423,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
  *options = tmp;
 }
 
-if (s->oformat->init && (ret = s->oformat->init(s)) < 0) {
-if (s->oformat->deinit)
-s->oformat->deinit(s);
-goto fail;
+if (s->oformat->init) {
+if ((ret = s->oformat->init(s)) < 0) {
+if (s->oformat->deinit)
+s->oformat->deinit(s);
+return ret;
+}
+return ret == 0;
 }
 
 return 0;
@@ -493,31 +496,64 @@ static int write_header_internal(AVFormatContext *s)
 return 0;
 }
 
-int avformat_write_header(AVFormatContext *s, AVDictionary **options)
+int avformat_init_output(AVFormatContext *s, AVDictionary **options)
 {
 int ret = 0;
 

Re: [FFmpeg-devel] FFmpeg 3.1 name

2016-06-25 Thread Amancio Hasty
On June 25, 2016 at 12:42:52 PM, Michael Niedermayer (mich...@niedermayer.cc)
wrote:

On Sat, Jun 25, 2016 at 07:21:15PM +0200, Jan Gerber wrote:
> On 06/25/2016 06:50 PM, Michael Niedermayer wrote:
> >> git cherry-pick 1087f0dc172a9adf779e41bf2dc82639fb04ebd4
> >
> > is this or 0c9c4004ed57de210b4d83c7b39bbfb00b86b9af preferred ?
>
> both are ok, would use 0c9c4004ed57de210b4d83c7b39bbfb00b86b9af
> to keep the delta to libav smaller.

ok applied

thanks

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

It is what and why we do it that matters, not just one of them.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


The latest patch appears to work on my RPI3:

./ffmpeg  -f v4l2 -input_format yuv420p -framerate 25 -video_size 640x480
-i /dev/video0  -frames 500 -an   -c:v h264_omx test.mp4

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


Re: [FFmpeg-devel] [PATCH v3] avformat/tee: Support arbitrary number of slaves

2016-06-25 Thread Marton Balint



On Sat, 25 Jun 2016, sebechlebsky...@gmail.com wrote:


From: Jan Sebechlebsky 

Signed-off-by: Jan Sebechlebsky 
---
You're right. Should be fixed here.

libavformat/tee.c | 26 --
1 file changed, 16 insertions(+), 10 deletions(-)


Thanks, applied.

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


Re: [FFmpeg-devel] [PATCH] avfilter/src_movie: Add option to remove timestamp discontinuities

2016-06-25 Thread Michael Niedermayer
On Wed, May 25, 2016 at 06:07:24PM +0200, Michael Niedermayer wrote:
> TODO: docs
> 
> This can also be extended to remove discontiuities caused by seek commands
> 
> Signed-off-by: Michael Niedermayer 
> ---
>  libavfilter/src_movie.c |   22 ++
>  1 file changed, 22 insertions(+)

added docs, applied

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

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.


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


Re: [FFmpeg-devel] [PATCH 1/2] avfilter/dualinput: Add support to skip initial unpaired frames

2016-06-25 Thread Michael Niedermayer
On Sat, Jun 25, 2016 at 12:43:35AM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  libavfilter/dualinput.c |3 +++
>  libavfilter/dualinput.h |1 +
>  2 files changed, 4 insertions(+)

applied

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

It is what and why we do it that matters, not just one of them.


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/h264_sei: Do not skip subsequent SEIs on errors potentially caused by missing parameter sets.

2016-06-25 Thread Michael Niedermayer
On Tue, Jun 21, 2016 at 12:54:09PM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/h264_sei.c |   14 ++
>  1 file changed, 10 insertions(+), 4 deletions(-)

applied

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

Democracy is the form of government in which you can choose your dictator


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


Re: [FFmpeg-devel] [PATCH] avfilter/vf_rotate: add >8 bit depth support

2016-06-25 Thread Muhammad Faiz
On Sun, Jun 26, 2016 at 1:51 AM, Paul B Mahol  wrote:
> On 6/25/16, Carl Eugen Hoyos  wrote:
>> Paul B Mahol  gmail.com> writes:
>>
>>> >>+AV_PIX_FMT_YUV420P9LE, AV_PIX_FMT_YUVA420P9LE,
>>> >
>>> > Why not use native endian format?
>>>
>>> Because of fate test.
>>
>> Isn't the byte-swapping (that could be used for the
>> fate test) bit-exact? Or do I miss something?
>
> What? There is bilinear option that have nothing to do with byte swapping.
>

I think it's not because of bit-exact problem.
But because fate probes supported formats (with libavfilter/tests/filtfmts)
On BE machine, code with native formats will generate error
because fate-ref contains yuv*le entries but fate expects yuv*be

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


Re: [FFmpeg-devel] [PATCH] avfilter/vf_rotate: add >8 bit depth support

2016-06-25 Thread Carl Eugen Hoyos
Muhammad Faiz  gmail.com> writes:

> I think it's not because of bit-exact problem.
> But because fate probes supported formats (with libavfilter/tests/filtfmts)
> On BE machine, code with native formats will generate error
> because fate-ref contains yuv*le entries but fate expects yuv*be

We control the fate test, so we can require an additional 
(bit-exact) conversion from BE to LE to make the fate 
test pass.

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH 2/2] avfilter/vf_paletteuse: enable skip_initial_unpaired

2016-06-25 Thread Michael Niedermayer
On Sat, Jun 25, 2016 at 12:43:36AM +0200, Michael Niedermayer wrote:
> Fixes crash due to unprocessed input being passed through
> 
> This fixes the last segfault caused by mixing 3.0 and 3.1 libs and
> applications
> 
> Signed-off-by: Michael Niedermayer 
> ---

applied

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

I have often repented speaking, but never of holding my tongue.
-- Xenocrates


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


[FFmpeg-devel] release/3.1

2016-06-25 Thread Michael Niedermayer
Hi all

ive branched release/3.1 off from master
i will make the 3.1 release from HEAD of this branch tomorrow
If there are any last minute changes that should go in, thats your
very last chance to put them in !


-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin


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