Re: [FFmpeg-devel] ffplay -fs fix (ticket #3964)

2014-09-22 Thread Jeff Dwork

Your patch works.

Thanks,
Jeff

At 01:19 PM 9/22/2014, you wrote:


On Fri, 19 Sep 2014, Jeff Dwork wrote:

On MS Windows, 'ffplay.exe -fs' does not start fullscreen. Behavior 
on linux is correct.


On Windows, the initial placement of the SDL screen triggers the 
SDL_VIDEORESIZE event. This executes the code in the event_loop 
which calls SDL_SetVideoMode with the SDL_RESIZEABLE bit set. On 
linux the resize event does not occur.


I can see an obvious flicker on my laptop as the initial fullscreen 
window is replaced by the normal window. I don't see it on my 
faster desktop system.


The fix is simple - don't execute SDL_SetVideoMode in the 
event_loop if is_full_screen is set.

Diff for ffplay version N-66289-gb76d613

diff original/ffplay.c fixed/ffplay.c
3469,3470c3469,3471
< screen = SDL_SetVideoMode(FFMIN(16383, 
event.resize.w), event.resize.h, 0,

< SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL);
---

if (!is_full_screen)
screen = SDL_SetVideoMode(FFMIN(16383, 
event.resize.w),

event.resize.h, 0,

SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL);


I'd rather fix this a bit differently, could you please try the 
attached patch?


Thanks,
Marton



___
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] ffmpeg: replace missing PTS by DTS

2014-09-22 Thread Clément Bœsch
On Tue, Sep 23, 2014 at 07:45:56AM +0200, Clément Bœsch wrote:
> On Tue, Sep 23, 2014 at 03:21:30AM +0200, Michael Niedermayer wrote:
> > This fixes the case where muxing fails hard in case of stream copying 
> > damaged input
> > 
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  ffmpeg.c |8 
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/ffmpeg.c b/ffmpeg.c
> > index 47a4144..5492cfe 100644
> > --- a/ffmpeg.c
> > +++ b/ffmpeg.c
> > @@ -670,6 +670,14 @@ static void write_frame(AVFormatContext *s, AVPacket 
> > *pkt, OutputStream *ost)
> >   - FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1)
> >   - FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1);
> >  }
> > +if (pkt->dts != AV_NOPTS_VALUE &&
> > +pkt->pts == AV_NOPTS_VALUE &&
> > +!(s->oformat->flags & AVFMT_TS_NONSTRICT)) { //FIXME use a 
> > AVFMT_TS_NEEDS_PTS
> > +av_log(s, AV_LOG_WARNING, "PTS unknown, using DTS: %"PRId64" 
> > in output stream %d:%d\n",
> > +   pkt->dts,
> > +   ost->file_index, ost->st->index);
> > +pkt->pts = pkt->dts;
> > +}
> 
> why not abort with a AVERROR_BUG or something so we get report of such
> cases?
> 

Oh I'm sorry, I misread the patch, I thought it was about buggy muxers;
ignore my comment

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH] ffmpeg: replace missing PTS by DTS

2014-09-22 Thread Clément Bœsch
On Tue, Sep 23, 2014 at 03:21:30AM +0200, Michael Niedermayer wrote:
> This fixes the case where muxing fails hard in case of stream copying damaged 
> input
> 
> Signed-off-by: Michael Niedermayer 
> ---
>  ffmpeg.c |8 
>  1 file changed, 8 insertions(+)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 47a4144..5492cfe 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -670,6 +670,14 @@ static void write_frame(AVFormatContext *s, AVPacket 
> *pkt, OutputStream *ost)
>   - FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1)
>   - FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1);
>  }
> +if (pkt->dts != AV_NOPTS_VALUE &&
> +pkt->pts == AV_NOPTS_VALUE &&
> +!(s->oformat->flags & AVFMT_TS_NONSTRICT)) { //FIXME use a 
> AVFMT_TS_NEEDS_PTS
> +av_log(s, AV_LOG_WARNING, "PTS unknown, using DTS: %"PRId64" in 
> output stream %d:%d\n",
> +   pkt->dts,
> +   ost->file_index, ost->st->index);
> +pkt->pts = pkt->dts;
> +}

why not abort with a AVERROR_BUG or something so we get report of such
cases?

[...]

-- 
Clément B.


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


Re: [FFmpeg-devel] Where to Submit SIMD Optimization on PowerPC for HEVC Decoder

2014-09-22 Thread Mickaël Raulet
The best place is ffmpeg, it has a lot of testing platform we don t have.

Mickael

Le mardi 23 septembre 2014, James Almer  a écrit :

> On 22/09/14 11:31 PM, Zhenan Lin wrote:
> > Hi, all! Our team is working on SIMD Optimization on PowerPC for HEVC
> > Decoder. However, we have no idea about where our code should be submit,
> > FFmpeg or FFmpeg-OpenHevc? Is there anybody can tell it? Thanks. Zhenan.
>
> No idea if OpenHevc has a mailing list, but you can submit it here, there,
> or to both lists even (to get more exposure and chances of a review).
> Some OpenHEVC devs also read this list and review most related patches, and
> one way or another every greenlit code ends up in both places.
> ___
> 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] livestream.com us-local news channels

2014-09-22 Thread Georg Stein
Hello,

i try now for some time to dump with a small app written in c by using the
ffmpeg libs to download the streams of a US local news channel streamed on
livestream.com - without success.

 

the stream url looks like (there is an auth key in):

 

 

http://api.new.livestream.com/broadcasts/62834750.m3u8?dw=100&hdnea=st=14114

03505~exp=1411404405~acl=/i/1864610_1649849_f007e646_1@188864/*~hmac=be25315

e9f3dd58ac529bb167a3889b336af7faddaa02b8cae99b82969900097

 

and 

 

 

http://livestream-f.akamaihd.net/i/1864610_1649849_f007e646_1@188864/master.

m3u8?dw=100&__b__=678&hdnea=st=1411403505~exp=1411404405~acl=/i/1864610_1649

849_f007e646_1@188864/*~hmac=be25315e9f3dd58ac529bb167a3889b336af7faddaa02b8

cae99b82969900097

 

when i call 

int result = avformat_open_input(&this->avFormatContext, fileNameChar, fmt,
NULL);

 

the result is 0 but the AVFormatContext does not has any codec/stream in

 

the command line tool from ffmepg can download the stream fine with the url
i use in my app

 

so perhaps somebody has here a hint for me to solve my problem

 

thx

 

Georg

 



---
Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz 
ist aktiv.
http://www.avast.com
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Where to Submit SIMD Optimization on PowerPC for HEVC Decoder

2014-09-22 Thread James Almer
On 22/09/14 11:31 PM, Zhenan Lin wrote:
> Hi, all! Our team is working on SIMD Optimization on PowerPC for HEVC
> Decoder. However, we have no idea about where our code should be submit,
> FFmpeg or FFmpeg-OpenHevc? Is there anybody can tell it? Thanks. Zhenan.

No idea if OpenHevc has a mailing list, but you can submit it here, there, 
or to both lists even (to get more exposure and chances of a review).
Some OpenHEVC devs also read this list and review most related patches, and 
one way or another every greenlit code ends up in both places.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] Where to Submit SIMD Optimization on PowerPC for HEVC Decoder

2014-09-22 Thread Zhenan Lin
Hi, all! Our team is working on SIMD Optimization on PowerPC for HEVC
Decoder. However, we have no idea about where our code should be submit,
FFmpeg or FFmpeg-OpenHevc? Is there anybody can tell it? Thanks. Zhenan.

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


[FFmpeg-devel] [PATCH] ffmpeg: replace missing PTS by DTS

2014-09-22 Thread Michael Niedermayer
This fixes the case where muxing fails hard in case of stream copying damaged 
input

Signed-off-by: Michael Niedermayer 
---
 ffmpeg.c |8 
 1 file changed, 8 insertions(+)

diff --git a/ffmpeg.c b/ffmpeg.c
index 47a4144..5492cfe 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -670,6 +670,14 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, 
OutputStream *ost)
  - FFMIN3(pkt->pts, pkt->dts, ost->last_mux_dts + 1)
  - FFMAX3(pkt->pts, pkt->dts, ost->last_mux_dts + 1);
 }
+if (pkt->dts != AV_NOPTS_VALUE &&
+pkt->pts == AV_NOPTS_VALUE &&
+!(s->oformat->flags & AVFMT_TS_NONSTRICT)) { //FIXME use a 
AVFMT_TS_NEEDS_PTS
+av_log(s, AV_LOG_WARNING, "PTS unknown, using DTS: %"PRId64" in 
output stream %d:%d\n",
+   pkt->dts,
+   ost->file_index, ost->st->index);
+pkt->pts = pkt->dts;
+}
  if(
 (avctx->codec_type == AVMEDIA_TYPE_AUDIO || avctx->codec_type == 
AVMEDIA_TYPE_VIDEO) &&
 pkt->dts != AV_NOPTS_VALUE &&
-- 
1.7.9.5

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


Re: [FFmpeg-devel] [PATCH 1/2] configure: support --disable-sdl

2014-09-22 Thread Michael Niedermayer
On Tue, Sep 23, 2014 at 01:01:26AM +0200, Reimar Döffinger wrote:
> On Tue, Sep 23, 2014 at 12:42:53AM +0200, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  configure |   33 ++---
> >  1 file changed, 18 insertions(+), 15 deletions(-)
> > 
> > diff --git a/configure b/configure
> > index 12b2da5..f674a06 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1388,6 +1388,7 @@ EXTERNAL_LIBRARY_LIST="
> >  opencl
> >  opengl
> >  openssl
> > +sdl
> >  x11grab
> >  xlib
> >  zlib
> > @@ -4909,21 +4910,23 @@ if enabled libdc1394; then
> >  enable libdc1394_1; } ||
> >  die "ERROR: No version of libdc1394 found "
> >  fi
> > -
> > -SDL_CONFIG="${cross_prefix}sdl-config"
> > -if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
> > -check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
> > -check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
> > -enable sdl
> > -else
> > -  if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
> > -sdl_cflags=$("${SDL_CONFIG}" --cflags)
> > -sdl_libs=$("${SDL_CONFIG}" --libs)
> > -check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags 
> > $sdl_libs &&
> > -check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
> > -check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
> > -enable sdl
> > -  fi
> > +if ! disabled sdl; then
> > +disable sdl
> > +SDL_CONFIG="${cross_prefix}sdl-config"
> > +if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
> > +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
> > +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
> > +enable sdl
> > +else
> > +if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
> > +sdl_cflags=$("${SDL_CONFIG}" --cflags)
> > +sdl_libs=$("${SDL_CONFIG}" --libs)
> > +check_func_headers SDL_version.h SDL_Linked_Version 
> > $sdl_cflags $sdl_libs &&
> > +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
> > +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> > SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
> > +enable sdl
> > +fi
> > +fi
> >  fi
> 
> Maybe more readable if you do reindentation separately?

yes, will do


> Because I was going to suggest to use elif until I saw that that part
> is not actually used.

> Also doesn't this patch also add --enable-sdl? Seems it will be ignored,
> shouldn't we rather fail if --enable-sdl was given but we do not find
> it? I believe that is how FFmpeg configure normally behaves.

posted a seperate patch for that

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

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


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


[FFmpeg-devel] [PATCH] configure: fail if SDL is unavailable and --enable-sdl is specified

2014-09-22 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 configure |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index f674a06..e3c238b 100755
--- a/configure
+++ b/configure
@@ -4911,7 +4911,6 @@ if enabled libdc1394; then
 die "ERROR: No version of libdc1394 found "
 fi
 if ! disabled sdl; then
-disable sdl
 SDL_CONFIG="${cross_prefix}sdl-config"
 if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
 check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
@@ -4925,6 +4924,10 @@ if ! disabled sdl; then
 check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
 check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
 enable sdl
+elif enabled sdl ; then
+die "ERROR: SDL not found"
+else
+disable sdl
 fi
 fi
 fi
-- 
1.7.9.5

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


Re: [FFmpeg-devel] [PATCH] avcodec/webp: fix default palette color and optimize for large image

2014-09-22 Thread Reimar Döffinger
On Mon, Sep 22, 2014 at 03:07:39PM -0700, Pascal Massimino wrote:
> Hi,
> 
> as discussed on the other thread...

Why not just always allocate and 0-initialize pal->frame with width 256?
I haven't yet checked which if any is the easiest way to make 
av_frame_get_buffer
do that while still having the AVFrame->with the original width value in the 
end.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] configure: support --disable-sdl

2014-09-22 Thread Reimar Döffinger
On Tue, Sep 23, 2014 at 12:42:53AM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  configure |   33 ++---
>  1 file changed, 18 insertions(+), 15 deletions(-)
> 
> diff --git a/configure b/configure
> index 12b2da5..f674a06 100755
> --- a/configure
> +++ b/configure
> @@ -1388,6 +1388,7 @@ EXTERNAL_LIBRARY_LIST="
>  opencl
>  opengl
>  openssl
> +sdl
>  x11grab
>  xlib
>  zlib
> @@ -4909,21 +4910,23 @@ if enabled libdc1394; then
>  enable libdc1394_1; } ||
>  die "ERROR: No version of libdc1394 found "
>  fi
> -
> -SDL_CONFIG="${cross_prefix}sdl-config"
> -if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
> -check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 
> | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
> -check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 
> | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
> -enable sdl
> -else
> -  if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
> -sdl_cflags=$("${SDL_CONFIG}" --cflags)
> -sdl_libs=$("${SDL_CONFIG}" --libs)
> -check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags 
> $sdl_libs &&
> -check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 
> | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
> -check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 
> | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
> -enable sdl
> -  fi
> +if ! disabled sdl; then
> +disable sdl
> +SDL_CONFIG="${cross_prefix}sdl-config"
> +if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
> +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
> +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
> +enable sdl
> +else
> +if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
> +sdl_cflags=$("${SDL_CONFIG}" --cflags)
> +sdl_libs=$("${SDL_CONFIG}" --libs)
> +check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags 
> $sdl_libs &&
> +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
> +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
> SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
> +enable sdl
> +fi
> +fi
>  fi

Maybe more readable if you do reindentation separately?
Because I was going to suggest to use elif until I saw that that part
is not actually used.
Also doesn't this patch also add --enable-sdl? Seems it will be ignored,
shouldn't we rather fail if --enable-sdl was given but we do not find
it? I believe that is how FFmpeg configure normally behaves.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/webp: fix default palette color and optimize for large image

2014-09-22 Thread Pascal Massimino
On Mon, Sep 22, 2014 at 3:07 PM, Pascal Massimino <
pascal.massim...@gmail.com> wrote:

> Hi,
>
> as discussed on the other thread...
>

and now, a version with the correct indentation, sorry.


>
> skal
>
>


0002-avcodec-webp-fix-default-palette-color-0xff00-0x.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] configure: support --disable-sdl

2014-09-22 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 configure |   33 ++---
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/configure b/configure
index 12b2da5..f674a06 100755
--- a/configure
+++ b/configure
@@ -1388,6 +1388,7 @@ EXTERNAL_LIBRARY_LIST="
 opencl
 opengl
 openssl
+sdl
 x11grab
 xlib
 zlib
@@ -4909,21 +4910,23 @@ if enabled libdc1394; then
 enable libdc1394_1; } ||
 die "ERROR: No version of libdc1394 found "
 fi
-
-SDL_CONFIG="${cross_prefix}sdl-config"
-if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
-check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | 
SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
-check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | 
SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
-enable sdl
-else
-  if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
-sdl_cflags=$("${SDL_CONFIG}" --cflags)
-sdl_libs=$("${SDL_CONFIG}" --libs)
-check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs 
&&
-check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | 
SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
-check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | 
SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
-enable sdl
-  fi
+if ! disabled sdl; then
+disable sdl
+SDL_CONFIG="${cross_prefix}sdl-config"
+if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
+check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+enable sdl
+else
+if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
+sdl_cflags=$("${SDL_CONFIG}" --cflags)
+sdl_libs=$("${SDL_CONFIG}" --libs)
+check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags 
$sdl_libs &&
+check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+enable sdl
+fi
+fi
 fi
 enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
 
-- 
1.7.9.5

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


[FFmpeg-devel] [PATCH 2/2] configure: Check that localtime_r() is in a header and if not retry with XOPEN/POSIX_SOURCE

2014-09-22 Thread Michael Niedermayer
This fixes the localtime_r() check, which was producing a false positive with 
musl
and also fixes build with musl

Signed-off-by: Michael Niedermayer 
---
 configure |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index f674a06..ad0a634 100755
--- a/configure
+++ b/configure
@@ -4677,7 +4677,8 @@ check_func  getopt
 check_func  getrusage
 check_func  gettimeofday
 check_func  isatty
-check_func  localtime_r
+check_func_headers time.h localtime_r || { check_func_headers time.h 
localtime_r -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 &&
+   add_cppflags 
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600; }
 check_func  mach_absolute_time
 check_func  mkstemp
 check_func  mmap
-- 
1.7.9.5

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


[FFmpeg-devel] [PATCH] avcodec/webp: fix default palette color and optimize for large image

2014-09-22 Thread Pascal Massimino
Hi,

as discussed on the other thread...

skal


0001-avcodec-webp-fix-default-palette-color-0xff00-0x.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc/decoders: adding documentation for lavc/dvdsubdec.c option "forced_subs_only"

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 03:31:35PM -0400, Nicholas Robbins wrote:
> Signed-off-by: Nicholas Robbins 
> ---
>  doc/decoders.texi | 5 +
>  1 file changed, 5 insertions(+)

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


Re: [FFmpeg-devel] [PATCH]Allow using libopenjpeg 2.x

2014-09-22 Thread Carl Eugen Hoyos
On Wednesday 17 September 2014 09:16:06 am Reimar Döffinger wrote:
> On 16.09.2014, at 22:35, Carl Eugen Hoyos  wrote:
> > Attached patch allows using libopenjpeg 2.x (tested with 2.1) here.
>
> Doesn't it make sense to prefer the newest version, i.e. we should check
> for this first and not last?

New patch attached.

Please comment, Carl Eugen
diff --git a/configure b/configure
index 12b2da5..6e1cee7 100755
--- a/configure
+++ b/configure
@@ -4826,7 +4826,8 @@ enabled libnut&& require libnut libnut.h 
nut_demuxer_init -lnut
 enabled libopencore_amrnb && require libopencore_amrnb 
opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
 enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h 
D_IF_init -lopencore-amrwb
 enabled libopencv && require_pkg_config opencv opencv/cxcore.h 
cvCreateImageHeader
-enabled libopenjpeg   && { check_lib openjpeg-1.5/openjpeg.h opj_version 
-lopenjpeg -DOPJ_STATIC ||
+enabled libopenjpeg   && { check_lib openjpeg.h opj_version -lopenmj2 
-DOPJ_STATIC ||
+   check_lib openjpeg-1.5/openjpeg.h opj_version 
-lopenjpeg -DOPJ_STATIC ||
check_lib openjpeg.h opj_version -lopenjpeg 
-DOPJ_STATIC ||
die "ERROR: libopenjpeg not found"; }
 enabled libopus   && require_pkg_config opus opus_multistream.h 
opus_multistream_decoder_create
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Make high bit-depth libvpx samples show the correct bit depth

2014-09-22 Thread Carl Eugen Hoyos
On Thursday 18 September 2014 12:15:58 am James Zern wrote:
> Hi,
>
> On Tue, Sep 16, 2014 at 1:30 PM, Carl Eugen Hoyos  wrote:
> > Hi!
> >
> > Attached patch fixes ffmpeg -i output for high-bitrate vp9 files here.
>
> Do you mean high bitdepth?

Yes, sorry.

> > +#if !defined(VPX_IMG_FMT_HIGHBITDEPTH)
> >  avctx->pix_fmt = AV_PIX_FMT_YUV420P;
> > +#endif
> >  return 0;
> >  }
>
> The fix is a bit odd. This can just go given set_pix_fmt is called

New patch attached.

> when decoding a frame. I think in its current state all this will
> avoid is not forcing a decode call with older libraries.

This was the intention, yes.

Thank you, Carl Eugen
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 8312460..ba20579 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -56,7 +56,6 @@ static av_cold int vpx_init(AVCodecContext *avctx,
 return AVERROR(EINVAL);
 }
 
-avctx->pix_fmt = AV_PIX_FMT_YUV420P;
 return 0;
 }
 
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] ffplay -fs fix (ticket #3964)

2014-09-22 Thread Marton Balint


On Fri, 19 Sep 2014, Jeff Dwork wrote:

On MS Windows, 'ffplay.exe -fs' does not start fullscreen. Behavior on linux 
is correct.


On Windows, the initial placement of the SDL screen triggers the 
SDL_VIDEORESIZE event. This executes the code in the event_loop which calls 
SDL_SetVideoMode with the SDL_RESIZEABLE bit set. On linux the resize event 
does not occur.


I can see an obvious flicker on my laptop as the initial fullscreen window is 
replaced by the normal window. I don't see it on my faster desktop system.


The fix is simple - don't execute SDL_SetVideoMode in the event_loop if 
is_full_screen is set.

Diff for ffplay version N-66289-gb76d613

diff original/ffplay.c fixed/ffplay.c
3469,3470c3469,3471
< screen = SDL_SetVideoMode(FFMIN(16383, event.resize.w), 
event.resize.h, 0,

< SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL);
---

if (!is_full_screen)
screen = SDL_SetVideoMode(FFMIN(16383, event.resize.w), 

event.resize.h, 0,

SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL);




I'd rather fix this a bit differently, could you please try the attached 
patch?


Thanks,
MartonFrom 61a4f0b2c0ecd883022f06c3655d0f4f936c8615 Mon Sep 17 00:00:00 2001
From: Marton Balint 
Date: Mon, 22 Sep 2014 22:17:06 +0200
Subject: [PATCH] ffplay: handle fullscreen status on resize event

---
 ffplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffplay.c b/ffplay.c
index 9982474..310dd75 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -3467,7 +3467,7 @@ static void event_loop(VideoState *cur_stream)
 break;
 case SDL_VIDEORESIZE:
 screen = SDL_SetVideoMode(FFMIN(16383, event.resize.w), event.resize.h, 0,
-  SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL);
+  SDL_HWSURFACE|(is_full_screen?SDL_FULLSCREEN:SDL_RESIZABLE)|SDL_ASYNCBLIT|SDL_HWACCEL);
 if (!screen) {
 av_log(NULL, AV_LOG_FATAL, "Failed to set video mode\n");
 do_exit(cur_stream);
-- 
1.8.4.5

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


[FFmpeg-devel] [PATCH 2/2] configure: Refactor setting of feature test macro _XOPEN_SOURCE

2014-09-22 Thread Michael Niedermayer
From: Jörg Krause 

Some C libraries, eg glibc, uclibc, and musl, uses feature test macros
to expose definitions conforming to the standards ISO C, POSIX and
extensions. According to which feature test macros are defined by the
user or the compiler, a header file, eg , used by these
libraries internally defines various other macros.

glibc and uclibc also defines release test macros, eg __GLIBC__ and
__UCLIBC__ in . musl does not have (and does not want) a
macro __MUSL__. Therefore it is not possible to check for the musl
library.

However, building FFmpeg with musl needs the feature test macro
_XOPEN_SOURCE=600 to be defined.

Signed-off-by: Jörg Krause 

the else is replaced by elif checking for features.h
this avoids breaking netbsd

Signed-off-by: Michael Niedermayer 
---
 configure |3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure b/configure
index f674a06..bc89c28 100755
--- a/configure
+++ b/configure
@@ -4232,6 +4232,9 @@ probe_libc(){
 elif check_${pfx}cpp_condition sys/brand.h "defined LABELED_BRAND_NAME"; 
then
 eval ${pfx}libc_type=solaris
 add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
+# FFmpeg needs a POSIX.1-2001/XSI compliant C library
+elif check_header features.h; then
+add_${pfx}cppflags -D_XOPEN_SOURCE=600
 fi
 }
 
-- 
1.7.9.5

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


[FFmpeg-devel] [PATCH 1/2] configure: support --disable-sdl

2014-09-22 Thread Michael Niedermayer
---
 configure |   33 ++---
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/configure b/configure
index 12b2da5..f674a06 100755
--- a/configure
+++ b/configure
@@ -1388,6 +1388,7 @@ EXTERNAL_LIBRARY_LIST="
 opencl
 opengl
 openssl
+sdl
 x11grab
 xlib
 zlib
@@ -4909,21 +4910,23 @@ if enabled libdc1394; then
 enable libdc1394_1; } ||
 die "ERROR: No version of libdc1394 found "
 fi
-
-SDL_CONFIG="${cross_prefix}sdl-config"
-if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
-check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | 
SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
-check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | 
SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
-enable sdl
-else
-  if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
-sdl_cflags=$("${SDL_CONFIG}" --cflags)
-sdl_libs=$("${SDL_CONFIG}" --libs)
-check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs 
&&
-check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | 
SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
-check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | 
SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
-enable sdl
-  fi
+if ! disabled sdl; then
+disable sdl
+SDL_CONFIG="${cross_prefix}sdl-config"
+if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
+check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+enable sdl
+else
+if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
+sdl_cflags=$("${SDL_CONFIG}" --cflags)
+sdl_libs=$("${SDL_CONFIG}" --libs)
+check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags 
$sdl_libs &&
+check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+enable sdl
+fi
+fi
 fi
 enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
 
-- 
1.7.9.5

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


Re: [FFmpeg-devel] [PATCH] doc/decoders: adding documentation for lavc/dvdsubdec.c option "forced_subs_only"

2014-09-22 Thread Nicholas Robbins
> On Monday, September 22, 2014 3:28 PM, Nicholas Robbins 
>  wrote:

> +Only decoded subtitle entries marked as forced. Some titles have forced

Should be 'decode' not 'decoded'. Resent patch

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


[FFmpeg-devel] [PATCH] doc/decoders: adding documentation for lavc/dvdsubdec.c option "forced_subs_only"

2014-09-22 Thread Nicholas Robbins
Signed-off-by: Nicholas Robbins 
---
 doc/decoders.texi | 5 +
 1 file changed, 5 insertions(+)

diff --git a/doc/decoders.texi b/doc/decoders.texi
index 6910dc1..ae20cea 100644
--- a/doc/decoders.texi
+++ b/doc/decoders.texi
@@ -190,6 +190,11 @@ The format for this option is a string containing 16 
24-bits hexadecimal
 numbers (without 0x prefix) separated by comas, for example @code{0d00ee,
 ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}.
+
+@item forced_subs_only
+Only decode subtitle entries marked as forced. Some titles have forced
+and non-forced subtitles in the same track. Setting this flag to @code{1}
+will only keep the forced subtitles. Default value is @code{0}.
 @end table
 
 @section libzvbi-teletext
-- 
1.8.5.5

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


[FFmpeg-devel] [PATCH] doc/decoders: adding documentation for lavc/dvdsubdec.c option "forced_subs_only"

2014-09-22 Thread Nicholas Robbins
Signed-off-by: Nicholas Robbins 
---
 doc/decoders.texi | 5 +
 1 file changed, 5 insertions(+)

diff --git a/doc/decoders.texi b/doc/decoders.texi
index 6910dc1..56ce928 100644
--- a/doc/decoders.texi
+++ b/doc/decoders.texi
@@ -190,6 +190,11 @@ The format for this option is a string containing 16 
24-bits hexadecimal
 numbers (without 0x prefix) separated by comas, for example @code{0d00ee,
 ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}.
+
+@item forced_subs_only
+Only decoded subtitle entries marked as forced. Some titles have forced
+and non-forced subtitles in the same track. Setting this flag to @code{1}
+will only keep the forced subtitles. Default value is @code{0}.
 @end table
 
 @section libzvbi-teletext
-- 
1.8.5.5

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


Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code

2014-09-22 Thread Clément Bœsch
On Mon, Sep 22, 2014 at 09:13:18PM +0200, wm4 wrote:
> On Mon, 22 Sep 2014 21:05:19 +0200
> Clément Bœsch  wrote:
> 
> > On Mon, Sep 22, 2014 at 06:55:54PM +, Rainer Hochecker wrote:
> > > Clément Bœsch  pkh.me> writes:
> > > 
> > > > 
> > > > On Mon, Sep 22, 2014 at 03:12:02PM +, Rainer Hochecker wrote:
> > > > [...]
> > > > > Hi,
> > > > > 
> > > > > Thank you very much for this explanation and sorry for not having read
> > > > > release notes properly. subs are not my territory but the maintainer 
> > > > > is busy
> > > > > with real life so I will try to adapt to those changes.
> > > > > 
> > > > 
> > > > Feel free to ask more direct questions.
> > > > 
> > > > Basically, the idea is that the matroska demuxer will now output
> > > > AVPacket.data that looks like this:
> > > > 
> > > > 1,,Wolf main,Cher,,,,,Et les enregistrements de ses 
> > > > ondes
> > > delta ?
> > > > 
> > > > instead of:
> > > > 
> > > > Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf
> > > main,autre,,,,,Toujours rien.
> > > > 
> > > > (to take the matroska specs example)
> > > > 
> > > > The later had several problems, like including timestamp in a string 
> > > > which
> > > > couldn't be altered without insane hacks at format level. It also 
> > > > dropped
> > > > the ReadOrder fields which is needed to get proper rendering.
> > > > 
> > > > [...]
> > > > 
> > > > Note that we still use the "Dialogue: ..." form for internal decoded 
> > > > form
> > > > of the subtitles (what you get into AVSubtitle when calling the decode
> > > > subtitles function on the AVPacket), but I'm working on fixing this. 
> > > > I'll
> > > > try to document that change even more, and compatibility will last for a
> > > > long time again.
> > > > 
> > > 
> > > I only needed to add AV_CODEC_ID_ASS to our handler which already took
> > > AV_CODEC_ID_SSA.
> > > According to the discussion here:
> > > http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2014-May/157170.html, is it
> > > correct to drop AV_CODEC_ID_SSA?
> > > 
> > 
> > Actually, today someone gave me a AVI file with "ssa" chunks in it
> > (basically with the timestamps duplicated into the payload as a normal
> > string). I'm unsure yet how we're going to deal with this. It shouldn't
> > matter for now whether you drop or keep it, but it might make sense in the
> > future.
> > 
> 
> It never worked before, so we don't really need to care about it. On
> the other hand, it was like 2 lines of code to make it work. But
> considering that SSA in AVI is so extremely rare, it would be bad if we
> would require the user to handle yet another obscure special-case
> (old-style SSA codec ID and packets), that it would be better to
> rewrite the packet format on the fly... _if_ we want to support
> demuxing this.

Supporting that properly is not that much work; there will just be a
somewhat nasty convert from this layout to the internal one (when that
last one will be sane).

Maybe that's rare indeed, but then someone will suddenly find a .nut, or
maybe try to pack these lines exactly the same way in another format.

So yeah, it's nasty, and I'm just unsure about what will be done. I'll
continue my work with that in mind. Until I'm done, I can't really say yet
if SSA will be kept or no. Also, I'll probably have to write that compat
layer anyway for the transition period.

-- 
Clément B.


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


Re: [FFmpeg-devel] [patch] Only decode forced dvd-subtitles

2014-09-22 Thread Michael Niedermayer
On Fri, Sep 19, 2014 at 07:15:09PM +0200, wm4 wrote:
> On Fri, 19 Sep 2014 07:33:26 -0700
> Nicholas Robbins  wrote:
> 
> > Ok, not to beat a dead horse, but I think I've gotten this working. I think 
> > it might work better in lavc/dvdsubdec.c. AFAICT this works and doesn't 
> > produce mangled tracks. Patch at end of email. (Sorry for the inline patch) 
> > If this is a good patch, I'll add the appropriate documentation and do a 
> > proper commit-patch 
> > 
> > 
> > 
> > diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
> > index 7355c03..874c28b 100644
> > --- a/libavcodec/dvdsubdec.c
> > +++ b/libavcodec/dvdsubdec.c
> > @@ -39,6 +39,7 @@ typedef struct DVDSubContext
> >uint8_t  alpha[256];
> >uint8_t *buf;
> >int  buf_size;
> > +  int  only_dec_forced;
> > #ifdef DEBUG
> >int sub_id;
> > #endif
> > @@ -548,6 +549,9 @@ static int dvdsub_decode(AVCodecContext *avctx,
> >  if (!is_menu && find_smallest_bounding_rectangle(sub) == 0)
> >  goto no_subtitle;
> > 
> > +if (ctx->only_dec_forced && !(sub->rects[0]->flags & 
> > AV_SUBTITLE_FLAG_FORCED))
> > +goto no_subtitle; 
> > +
> > #if defined(DEBUG)
> >  {
> >  char ppm_name[32];
> > @@ -652,6 +656,7 @@ static av_cold int dvdsub_close(AVCodecContext *avctx)
> > #define VD AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_DECODING_PARAM
> > static const AVOption options[] = {
> >  { "palette", "set the global palette", OFFSET(palette_str), 
> > AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, VD },
> > +{ "only_dec_forced", "Only decode forced subtitles", 
> > OFFSET(only_dec_forced), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, VD},
> >  { NULL }
> > };
> > static const AVClass dvdsub_class = {
> 
> Sorry, but didn't the discussion go towards that ffmpeg.c should filter
> out subtitles flagged as forced?

maybe but our video decoders also have options to skip things like
the loop filter or b frames.
And performance wise droping in the decoder if something is droped
can be more efficient
so i applied this, dont hesitate to flame me, if i missed something


> 
> And in fact, the PGS decoder should be changed to flag forced subs
> correctly.

agree


[...]
-- 
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] libavcodec/dvdsubdec: Add option forced_subs_only to only decode forced subtitle frames.

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 11:14:25AM -0700, Nicholas Robbins wrote:
> ping

applied

also, please add documentation for the option

thanks

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

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


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


Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code

2014-09-22 Thread wm4
On Mon, 22 Sep 2014 21:05:19 +0200
Clément Bœsch  wrote:

> On Mon, Sep 22, 2014 at 06:55:54PM +, Rainer Hochecker wrote:
> > Clément Bœsch  pkh.me> writes:
> > 
> > > 
> > > On Mon, Sep 22, 2014 at 03:12:02PM +, Rainer Hochecker wrote:
> > > [...]
> > > > Hi,
> > > > 
> > > > Thank you very much for this explanation and sorry for not having read
> > > > release notes properly. subs are not my territory but the maintainer is 
> > > > busy
> > > > with real life so I will try to adapt to those changes.
> > > > 
> > > 
> > > Feel free to ask more direct questions.
> > > 
> > > Basically, the idea is that the matroska demuxer will now output
> > > AVPacket.data that looks like this:
> > > 
> > > 1,,Wolf main,Cher,,,,,Et les enregistrements de ses ondes
> > delta ?
> > > 
> > > instead of:
> > > 
> > > Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf
> > main,autre,,,,,Toujours rien.
> > > 
> > > (to take the matroska specs example)
> > > 
> > > The later had several problems, like including timestamp in a string which
> > > couldn't be altered without insane hacks at format level. It also dropped
> > > the ReadOrder fields which is needed to get proper rendering.
> > > 
> > > [...]
> > > 
> > > Note that we still use the "Dialogue: ..." form for internal decoded form
> > > of the subtitles (what you get into AVSubtitle when calling the decode
> > > subtitles function on the AVPacket), but I'm working on fixing this. I'll
> > > try to document that change even more, and compatibility will last for a
> > > long time again.
> > > 
> > 
> > I only needed to add AV_CODEC_ID_ASS to our handler which already took
> > AV_CODEC_ID_SSA.
> > According to the discussion here:
> > http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2014-May/157170.html, is it
> > correct to drop AV_CODEC_ID_SSA?
> > 
> 
> Actually, today someone gave me a AVI file with "ssa" chunks in it
> (basically with the timestamps duplicated into the payload as a normal
> string). I'm unsure yet how we're going to deal with this. It shouldn't
> matter for now whether you drop or keep it, but it might make sense in the
> future.
> 

It never worked before, so we don't really need to care about it. On
the other hand, it was like 2 lines of code to make it work. But
considering that SSA in AVI is so extremely rare, it would be bad if we
would require the user to handle yet another obscure special-case
(old-style SSA codec ID and packets), that it would be better to
rewrite the packet format on the fly... _if_ we want to support
demuxing this.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code

2014-09-22 Thread Clément Bœsch
On Mon, Sep 22, 2014 at 06:55:54PM +, Rainer Hochecker wrote:
> Clément Bœsch  pkh.me> writes:
> 
> > 
> > On Mon, Sep 22, 2014 at 03:12:02PM +, Rainer Hochecker wrote:
> > [...]
> > > Hi,
> > > 
> > > Thank you very much for this explanation and sorry for not having read
> > > release notes properly. subs are not my territory but the maintainer is 
> > > busy
> > > with real life so I will try to adapt to those changes.
> > > 
> > 
> > Feel free to ask more direct questions.
> > 
> > Basically, the idea is that the matroska demuxer will now output
> > AVPacket.data that looks like this:
> > 
> > 1,,Wolf main,Cher,,,,,Et les enregistrements de ses ondes
> delta ?
> > 
> > instead of:
> > 
> > Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf
> main,autre,,,,,Toujours rien.
> > 
> > (to take the matroska specs example)
> > 
> > The later had several problems, like including timestamp in a string which
> > couldn't be altered without insane hacks at format level. It also dropped
> > the ReadOrder fields which is needed to get proper rendering.
> > 
> > [...]
> > 
> > Note that we still use the "Dialogue: ..." form for internal decoded form
> > of the subtitles (what you get into AVSubtitle when calling the decode
> > subtitles function on the AVPacket), but I'm working on fixing this. I'll
> > try to document that change even more, and compatibility will last for a
> > long time again.
> > 
> 
> I only needed to add AV_CODEC_ID_ASS to our handler which already took
> AV_CODEC_ID_SSA.
> According to the discussion here:
> http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2014-May/157170.html, is it
> correct to drop AV_CODEC_ID_SSA?
> 

Actually, today someone gave me a AVI file with "ssa" chunks in it
(basically with the timestamps duplicated into the payload as a normal
string). I'm unsure yet how we're going to deal with this. It shouldn't
matter for now whether you drop or keep it, but it might make sense in the
future.

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code

2014-09-22 Thread Rainer Hochecker
Clément Bœsch  pkh.me> writes:

> 
> On Mon, Sep 22, 2014 at 03:12:02PM +, Rainer Hochecker wrote:
> [...]
> > Hi,
> > 
> > Thank you very much for this explanation and sorry for not having read
> > release notes properly. subs are not my territory but the maintainer is busy
> > with real life so I will try to adapt to those changes.
> > 
> 
> Feel free to ask more direct questions.
> 
> Basically, the idea is that the matroska demuxer will now output
> AVPacket.data that looks like this:
> 
> 1,,Wolf main,Cher,,,,,Et les enregistrements de ses ondes
delta ?
> 
> instead of:
> 
> Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf
main,autre,,,,,Toujours rien.
> 
> (to take the matroska specs example)
> 
> The later had several problems, like including timestamp in a string which
> couldn't be altered without insane hacks at format level. It also dropped
> the ReadOrder fields which is needed to get proper rendering.
> 
> [...]
> 
> Note that we still use the "Dialogue: ..." form for internal decoded form
> of the subtitles (what you get into AVSubtitle when calling the decode
> subtitles function on the AVPacket), but I'm working on fixing this. I'll
> try to document that change even more, and compatibility will last for a
> long time again.
> 

I only needed to add AV_CODEC_ID_ASS to our handler which already took
AV_CODEC_ID_SSA.
According to the discussion here:
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2014-May/157170.html, is it
correct to drop AV_CODEC_ID_SSA?

Regards,
Rainer



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


Re: [FFmpeg-devel] [PATCH v3 1/1] configure: Refactor setting of feature test macro _XOPEN_SOURCE

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 06:39:51PM +0200, wm4 wrote:
> On Mon, 22 Sep 2014 18:31:36 +0200
> Michael Niedermayer  wrote:
> 
> > On Mon, Sep 22, 2014 at 06:19:42PM +0200, wm4 wrote:
> > > On Mon, 22 Sep 2014 17:13:24 +0200
> > > Michael Niedermayer  wrote:
> > > 
> > > > On Sun, Sep 21, 2014 at 10:48:01PM +0200, Jörg Krause wrote:
> > > > > Some C libraries, eg glibc, uclibc, and musl, uses feature test 
> > > > > macros 
> > > > > to expose definitions conforming to the standards ISO C, POSIX and 
> > > > > extensions. According to which feature test macros are defined by the 
> > > > > user or the compiler, a header file, eg , used by these 
> > > > > libraries internally defines various other macros.
> > > > > 
> > > > > glibc and uclibc also defines release test macros, eg __GLIBC__ and
> > > > > __UCLIBC__ in . musl does not have (and does not want) a 
> > > > > macro __MUSL__. Therefore it is not possible to check for the musl
> > > > > library.
> > > > > 
> > > > > However, building FFmpeg with musl needs the feature test macro
> > > > > _XOPEN_SOURCE=600 to be defined.
> > > > > 
> > > > > Signed-off-by: Jörg Krause 
> > > > > ---
> > > > > Changes v2 -> v3:
> > > > >   - set _XOPEN_SOURCE as default in case no C library can be detected
> > > > > 
> > > > > Changes v1 -> v2:
> > > > >   - do not set _XOPEN_SOURCE twice for glibc and uclibc
> > > > > ---
> > > > >  configure | 3 +++
> > > > >  1 file changed, 3 insertions(+)
> > > > 
> > > > patch reverted
> > > > it broke netbsd and macosx at least
> > > > see
> > > > http://fate.ffmpeg.org/log.cgi?time=20140922033546&log=compile&slot=i386-darwin-gcc-4.7
> > > > 
> > > > [...]
> > > > 
> > > 
> > > It looks like the code uses inet_aton even if getaddrinfo is available.
> > > 
> > > Should the code using inet_aton just not be compiled if HAVE_GETADDRINFO
> > > is not 0?
> > 
> > the code uses inet_aton() when HAVE_INET_ATON is set
> > it is set but the code fails to build (on netbsd at least but probably
> > the failure on the other bsds is similar)
> > 
> > [...]
> 
> What I meant is that it could be moved inside of
> the "#if !HAVE_GETADDRINFO" block. Only the getaddrinfo emulation uses
> ff_inet_aton.
> 
> (I'm assuming OSX and the BSDs have getaddrinfo().)
> 
> Unless I misunderstood the problem.


the HAVE_ defines are wrong, HAVE_INET_ATON is set yet
-D_XOPEN_SOURCE=600 disables inet_aton() and several other features

also why would we want to disable these features on BSDs ?!


also
if i build with gmake -k and
grep -i Err mlist
/usr/include/dev/ic/bt8xx.h:60: error: expected specifier-qualifier-list before 
'u_short'
/usr/include/dev/ic/bt8xx.h:68: error: expected specifier-qualifier-list before 
'u_int'
/usr/include/dev/ic/bt8xx.h:77: error: expected specifier-qualifier-list before 
'u_int'
/usr/include/dev/ic/bt8xx.h:287: error: expected specifier-qualifier-list 
before 'u_char'
/usr/include/dev/ic/bt8xx.h:388: error: expected specifier-qualifier-list 
before 'u_int'
libavdevice/bktr.c:149: error: 'struct meteor_geomet' has no member named 'rows'
libavdevice/bktr.c:150: error: 'struct meteor_geomet' has no member named 
'columns'
libavdevice/bktr.c:151: error: 'struct meteor_geomet' has no member named 
'frames'
libavdevice/bktr.c:152: error: 'struct meteor_geomet' has no member named 
'oformat'
libavdevice/bktr.c:165: error: 'struct meteor_geomet' has no member named 
'oformat'
gmake: *** [libavdevice/bktr.o] Error 1
CC  libavformat/sierravmd.o
CC  libavcodec/error_resilience.o
libavcodec/mpegvideo_enc.c:934: warning: 'error_rate' is deprecated (declared 
at libavcodec/avcodec.h:2949)
libavcodec/mpegvideo_enc.c:935: warning: 'error_rate' is deprecated (declared 
at libavcodec/avcodec.h:2949)
libavcodec/options_table.h:328: warning: 'error_rate' is deprecated (declared 
at libavcodec/avcodec.h:2949)
/usr/include/x86/sysarch.h:126: error: expected specifier-qualifier-list before 
'u_long'
/usr/include/x86/sysarch.h:130: error: expected specifier-qualifier-list before 
'u_long'
/usr/include/machine/pcb.h:93: error: expected specifier-qualifier-list before 
'u_int'
/usr/include/sys/signalvar.h:59: error: 'NSIG' undeclared here (not in a 
function)
/usr/include/sys/lwp.h:77: error: expected specifier-qualifier-list before 
'u_int'
/usr/include/sys/lwp.h:86: error: field 'l_rtime' has incomplete type
/usr/include/sys/lwp.h:87: error: field 'l_stime' has incomplete type
/usr/include/sys/lwp.h:88: error: expected specifier-qualifier-list before 
'u_int'
/usr/include/sys/proc.h:100: error: expected specifier-qualifier-list before 
'u_int'
/usr/include/sys/proc.h:152: error: expected declaration specifiers or '...' 
before 'u_long'
/usr/include/sys/proc.h:168: error: expected declaration specifiers or '...' 
before 'vaddr_t'
/usr/include/sys/proc.h:170: error: expected specifier-qualifier-list before 
'vaddr_t'
/usr/include/sys/proc.h:228: error: expected specifier-qualifier-list before 
'u_int'
/usr/include/uvm/uvm_page.h:145: error: expecte

Re: [FFmpeg-devel] [PATCH] libavcodec/dvdsubdec: Add option forced_subs_only to only decode forced subtitle frames.

2014-09-22 Thread Nicholas Robbins
ping



On Saturday, September 20, 2014 7:54 AM, Nicholas Robbins 
 wrote:
 

>
>
>Signed-off-by: Nicholas Robbins 
>---
>libavcodec/dvdsubdec.c | 5 +
>1 file changed, 5 insertions(+)
>
>diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
>index c7973f0..bb28d9e 100644
>--- a/libavcodec/dvdsubdec.c
>+++ b/libavcodec/dvdsubdec.c
>@@ -39,6 +39,7 @@ typedef struct DVDSubContext
>   uint8_t  alpha[256];
>   uint8_t *buf;
>   int  buf_size;
>+  int  forced_subs_only;
>#ifdef DEBUG
>   int sub_id;
>#endif
>@@ -548,6 +549,9 @@ static int dvdsub_decode(AVCodecContext *avctx,
> if (!is_menu && find_smallest_bounding_rectangle(sub) == 0)
> goto no_subtitle;
>
>+if (ctx->forced_subs_only && !(sub->rects[0]->flags & 
>AV_SUBTITLE_FLAG_FORCED))
>+goto no_subtitle;
>+
>#if defined(DEBUG)
> {
> char ppm_name[32];
>@@ -652,6 +656,7 @@ static av_cold int dvdsub_close(AVCodecContext *avctx)
>#define SD AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_DECODING_PARAM
>static const AVOption options[] = {
> { "palette", "set the global palette", OFFSET(palette_str), 
> AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, SD },
>+{ "forced_subs_only", "Only show forced subtitles", 
>OFFSET(forced_subs_only), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, SD},
> { NULL }
>};
>static const AVClass dvdsub_class = {
>-- 
>1.8.5.5
>
>
>___
>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] avformat: Support merging side data before the muxer

2014-09-22 Thread Thomas Volkert

Hello,

On 22.09.2014 19:02, Nicolas George wrote:


In general I can agree with that argument, but in this particular case I
believe it does not apply for two reasons:

First, the application will need some redesign anyway to make use of the
merged-side-data hack.


Definitely not - but this is no longer important for this case.



In the short run, I believe the work to do that may be less than a redesign to 
use the API properly, but only slightly. In the
longer run, the application will be better with a proper design anyway, by
far.

Second, a 5-lines patch is ok as long as it does not create a maintenance
burden. I believe this one very much does. Most critically, if someone
endeavours to kill that ugly and fragile hack of merged-side-data, having it
exposed to public API like that makes the task that much harder.



There were enough votes declining this fast patch.  That's okay.
Yes, you are right. This patch could cause some confusion in the future.

See https://trac.ffmpeg.org/ticket/3936 for the origin of this patch.
The idea/patch is no longer pursued.

Best regards,
Thomas.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat: Support merging side data before the muxer

2014-09-22 Thread Nicolas George
Le primidi 1er vendémiaire, an CCXXIII, Michael Niedermayer a écrit :
> i dont know details about the application/lib using this, this patch
> was just the result of some investigation into why this other patch
> was needed:
> "[FFmpeg-devel] [PATCH 1/2] mux: make sure that the AV_PKT_DATA_H263_MB_INFO 
> side data is received by the H.263/RTP packetizer (rfc2190)"

Ok. I just had a more careful look at this one, and my reaction is "WTF?!?".
It seems very very wrong and comes without any explanations.

> maybe
> 
> the idea though was that a 5 line patch would avoid some application
> redesign work. And it may very well be usefull in various other
> scenarios.

In general I can agree with that argument, but in this particular case I
believe it does not apply for two reasons:

First, the application will need some redesign anyway to make use of the
merged-side-data hack. In the short run, I believe the work to do that may
be less than a redesign to use the API properly, but only slightly. In the
longer run, the application will be better with a proper design anyway, by
far.

Second, a 5-lines patch is ok as long as it does not create a maintenance
burden. I believe this one very much does. Most critically, if someone
endeavours to kill that ugly and fragile hack of merged-side-data, having it
exposed to public API like that makes the task that much harder.

Regards,

-- 
  Nicolas George


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


Re: [FFmpeg-devel] [PATCH v3 1/1] configure: Refactor setting of feature test macro _XOPEN_SOURCE

2014-09-22 Thread wm4
On Mon, 22 Sep 2014 18:31:36 +0200
Michael Niedermayer  wrote:

> On Mon, Sep 22, 2014 at 06:19:42PM +0200, wm4 wrote:
> > On Mon, 22 Sep 2014 17:13:24 +0200
> > Michael Niedermayer  wrote:
> > 
> > > On Sun, Sep 21, 2014 at 10:48:01PM +0200, Jörg Krause wrote:
> > > > Some C libraries, eg glibc, uclibc, and musl, uses feature test macros 
> > > > to expose definitions conforming to the standards ISO C, POSIX and 
> > > > extensions. According to which feature test macros are defined by the 
> > > > user or the compiler, a header file, eg , used by these 
> > > > libraries internally defines various other macros.
> > > > 
> > > > glibc and uclibc also defines release test macros, eg __GLIBC__ and
> > > > __UCLIBC__ in . musl does not have (and does not want) a 
> > > > macro __MUSL__. Therefore it is not possible to check for the musl
> > > > library.
> > > > 
> > > > However, building FFmpeg with musl needs the feature test macro
> > > > _XOPEN_SOURCE=600 to be defined.
> > > > 
> > > > Signed-off-by: Jörg Krause 
> > > > ---
> > > > Changes v2 -> v3:
> > > >   - set _XOPEN_SOURCE as default in case no C library can be detected
> > > > 
> > > > Changes v1 -> v2:
> > > >   - do not set _XOPEN_SOURCE twice for glibc and uclibc
> > > > ---
> > > >  configure | 3 +++
> > > >  1 file changed, 3 insertions(+)
> > > 
> > > patch reverted
> > > it broke netbsd and macosx at least
> > > see
> > > http://fate.ffmpeg.org/log.cgi?time=20140922033546&log=compile&slot=i386-darwin-gcc-4.7
> > > 
> > > [...]
> > > 
> > 
> > It looks like the code uses inet_aton even if getaddrinfo is available.
> > 
> > Should the code using inet_aton just not be compiled if HAVE_GETADDRINFO
> > is not 0?
> 
> the code uses inet_aton() when HAVE_INET_ATON is set
> it is set but the code fails to build (on netbsd at least but probably
> the failure on the other bsds is similar)
> 
> [...]

What I meant is that it could be moved inside of
the "#if !HAVE_GETADDRINFO" block. Only the getaddrinfo emulation uses
ff_inet_aton.

(I'm assuming OSX and the BSDs have getaddrinfo().)

Unless I misunderstood the problem.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3 1/1] configure: Refactor setting of feature test macro _XOPEN_SOURCE

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 06:19:42PM +0200, wm4 wrote:
> On Mon, 22 Sep 2014 17:13:24 +0200
> Michael Niedermayer  wrote:
> 
> > On Sun, Sep 21, 2014 at 10:48:01PM +0200, Jörg Krause wrote:
> > > Some C libraries, eg glibc, uclibc, and musl, uses feature test macros 
> > > to expose definitions conforming to the standards ISO C, POSIX and 
> > > extensions. According to which feature test macros are defined by the 
> > > user or the compiler, a header file, eg , used by these 
> > > libraries internally defines various other macros.
> > > 
> > > glibc and uclibc also defines release test macros, eg __GLIBC__ and
> > > __UCLIBC__ in . musl does not have (and does not want) a 
> > > macro __MUSL__. Therefore it is not possible to check for the musl
> > > library.
> > > 
> > > However, building FFmpeg with musl needs the feature test macro
> > > _XOPEN_SOURCE=600 to be defined.
> > > 
> > > Signed-off-by: Jörg Krause 
> > > ---
> > > Changes v2 -> v3:
> > >   - set _XOPEN_SOURCE as default in case no C library can be detected
> > > 
> > > Changes v1 -> v2:
> > >   - do not set _XOPEN_SOURCE twice for glibc and uclibc
> > > ---
> > >  configure | 3 +++
> > >  1 file changed, 3 insertions(+)
> > 
> > patch reverted
> > it broke netbsd and macosx at least
> > see
> > http://fate.ffmpeg.org/log.cgi?time=20140922033546&log=compile&slot=i386-darwin-gcc-4.7
> > 
> > [...]
> > 
> 
> It looks like the code uses inet_aton even if getaddrinfo is available.
> 
> Should the code using inet_aton just not be compiled if HAVE_GETADDRINFO
> is not 0?

the code uses inet_aton() when HAVE_INET_ATON is set
it is set but the code fails to build (on netbsd at least but probably
the failure on the other bsds is similar)

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

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire


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


Re: [FFmpeg-devel] [PATCH v3 1/1] configure: Refactor setting of feature test macro _XOPEN_SOURCE

2014-09-22 Thread wm4
On Mon, 22 Sep 2014 17:13:24 +0200
Michael Niedermayer  wrote:

> On Sun, Sep 21, 2014 at 10:48:01PM +0200, Jörg Krause wrote:
> > Some C libraries, eg glibc, uclibc, and musl, uses feature test macros 
> > to expose definitions conforming to the standards ISO C, POSIX and 
> > extensions. According to which feature test macros are defined by the 
> > user or the compiler, a header file, eg , used by these 
> > libraries internally defines various other macros.
> > 
> > glibc and uclibc also defines release test macros, eg __GLIBC__ and
> > __UCLIBC__ in . musl does not have (and does not want) a 
> > macro __MUSL__. Therefore it is not possible to check for the musl
> > library.
> > 
> > However, building FFmpeg with musl needs the feature test macro
> > _XOPEN_SOURCE=600 to be defined.
> > 
> > Signed-off-by: Jörg Krause 
> > ---
> > Changes v2 -> v3:
> >   - set _XOPEN_SOURCE as default in case no C library can be detected
> > 
> > Changes v1 -> v2:
> >   - do not set _XOPEN_SOURCE twice for glibc and uclibc
> > ---
> >  configure | 3 +++
> >  1 file changed, 3 insertions(+)
> 
> patch reverted
> it broke netbsd and macosx at least
> see
> http://fate.ffmpeg.org/log.cgi?time=20140922033546&log=compile&slot=i386-darwin-gcc-4.7
> 
> [...]
> 

It looks like the code uses inet_aton even if getaddrinfo is available.

Should the code using inet_aton just not be compiled if HAVE_GETADDRINFO
is not 0?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3 1/1] configure: Refactor setting of feature test macro _XOPEN_SOURCE

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 05:13:24PM +0200, Michael Niedermayer wrote:
> On Sun, Sep 21, 2014 at 10:48:01PM +0200, Jörg Krause wrote:
> > Some C libraries, eg glibc, uclibc, and musl, uses feature test macros 
> > to expose definitions conforming to the standards ISO C, POSIX and 
> > extensions. According to which feature test macros are defined by the 
> > user or the compiler, a header file, eg , used by these 
> > libraries internally defines various other macros.
> > 
> > glibc and uclibc also defines release test macros, eg __GLIBC__ and
> > __UCLIBC__ in . musl does not have (and does not want) a 
> > macro __MUSL__. Therefore it is not possible to check for the musl
> > library.
> > 
> > However, building FFmpeg with musl needs the feature test macro
> > _XOPEN_SOURCE=600 to be defined.
> > 
> > Signed-off-by: Jörg Krause 
> > ---
> > Changes v2 -> v3:
> >   - set _XOPEN_SOURCE as default in case no C library can be detected
> > 
> > Changes v1 -> v2:
> >   - do not set _XOPEN_SOURCE twice for glibc and uclibc
> > ---
> >  configure | 3 +++
> >  1 file changed, 3 insertions(+)
> 
> patch reverted
> it broke netbsd and macosx at least
> see
> http://fate.ffmpeg.org/log.cgi?time=20140922033546&log=compile&slot=i386-darwin-gcc-4.7

heres the stuff causing the problem from teh netbsd headers:

/usr/include/sys/featuretest.h
...
#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
#define _POSIX_C_SOURCE 1L
#endif

#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
#define _NETBSD_SOURCE 1
#endif

...

/usr/include/arpa/inet.h
...
#if defined(_NETBSD_SOURCE)
int  inet_aton(const char *, struct in_addr *);
char *   inet_neta(u_long, char *, size_t);
char*inet_net_ntop(int, const void *, int, char *, size_t);
int  inet_net_pton(int, const char *, void *, size_t);
char*inet_cidr_ntop(int, const void *, int, char *, size_t);
int  inet_cidr_pton(int, const char *, void *, int *);
u_intinet_nsap_addr(const char *, u_char *, int);
char*inet_nsap_ntoa(int, const u_char *, char *);
#endif
...

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein


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


Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code

2014-09-22 Thread Clément Bœsch
On Mon, Sep 22, 2014 at 03:12:02PM +, Rainer Hochecker wrote:
[...]
> Hi,
> 
> Thank you very much for this explanation and sorry for not having read
> release notes properly. subs are not my territory but the maintainer is busy
> with real life so I will try to adapt to those changes.
> 

Feel free to ask more direct questions.

Basically, the idea is that the matroska demuxer will now output
AVPacket.data that looks like this:

1,,Wolf main,Cher,,,,,Et les enregistrements de ses ondes delta 
?

instead of:

Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf 
main,autre,,,,,Toujours rien.

(to take the matroska specs example)

The later had several problems, like including timestamp in a string which
couldn't be altered without insane hacks at format level. It also dropped
the ReadOrder fields which is needed to get proper rendering.

[...]

Note that we still use the "Dialogue: ..." form for internal decoded form
of the subtitles (what you get into AVSubtitle when calling the decode
subtitles function on the AVPacket), but I'm working on fixing this. I'll
try to document that change even more, and compatibility will last for a
long time again.

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH v3 1/1] configure: Refactor setting of feature test macro _XOPEN_SOURCE

2014-09-22 Thread Michael Niedermayer
On Sun, Sep 21, 2014 at 10:48:01PM +0200, Jörg Krause wrote:
> Some C libraries, eg glibc, uclibc, and musl, uses feature test macros 
> to expose definitions conforming to the standards ISO C, POSIX and 
> extensions. According to which feature test macros are defined by the 
> user or the compiler, a header file, eg , used by these 
> libraries internally defines various other macros.
> 
> glibc and uclibc also defines release test macros, eg __GLIBC__ and
> __UCLIBC__ in . musl does not have (and does not want) a 
> macro __MUSL__. Therefore it is not possible to check for the musl
> library.
> 
> However, building FFmpeg with musl needs the feature test macro
> _XOPEN_SOURCE=600 to be defined.
> 
> Signed-off-by: Jörg Krause 
> ---
> Changes v2 -> v3:
>   - set _XOPEN_SOURCE as default in case no C library can be detected
> 
> Changes v1 -> v2:
>   - do not set _XOPEN_SOURCE twice for glibc and uclibc
> ---
>  configure | 3 +++
>  1 file changed, 3 insertions(+)

patch reverted
it broke netbsd and macosx at least
see
http://fate.ffmpeg.org/log.cgi?time=20140922033546&log=compile&slot=i386-darwin-gcc-4.7

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates


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


Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code

2014-09-22 Thread Rainer Hochecker
Clément Bœsch  pkh.me> writes:
> Hi,
> 
> We just made the ASS packets from the Matroska output them verbatim, and
> not hacked with timestamps included into the timestamps.
> 
> The packets are now typically broadcastable to libass.
> 
> Note that this change has been documented since 2.0; doc/APIchanges states:
> 
> 2013-04-18 - 7c1a002 - lavf 55.3.100
>   The matroska demuxer can now output proper verbatim ASS packets. It will
>   become the default starting lavf 56.0.100.
> 
> It was also mentioned in the RELEASE_NOTES of 2.4 after the bump:
> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=RELEASE_NOTES;hb=HEAD#l40
> 
> I'm sorry about the compatibility break but we had to move on, and I
believe it
> was done in a proper way (slow and documented, while providing benefits
for the
> end user at the same time)
> 
> Best regards,
> 
> PS: this commit didn't disable the code, it was disabled since last bump,
which
> means in 2.4
> 

Hi,

Thank you very much for this explanation and sorry for not having read
release notes properly. subs are not my territory but the maintainer is busy
with real life so I will try to adapt to those changes.

Cheers,
Rainer



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


Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code

2014-09-22 Thread Clément Bœsch
On Mon, Sep 22, 2014 at 02:53:12PM +, Rainer Hochecker wrote:
> Clément Bœsch  pkh.me> writes:
> 
> 
> > > 
> > > +1
> > 
> > Applied
> > 
> 
> 
> We at XBMC got the first complaints about broken subtitles. Why was this
> removed?

Hi,

We just made the ASS packets from the Matroska output them verbatim, and
not hacked with timestamps included into the timestamps.

The packets are now typically broadcastable to libass.

Note that this change has been documented since 2.0; doc/APIchanges states:

2013-04-18 - 7c1a002 - lavf 55.3.100
  The matroska demuxer can now output proper verbatim ASS packets. It will
  become the default starting lavf 56.0.100.

It was also mentioned in the RELEASE_NOTES of 2.4 after the bump:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=RELEASE_NOTES;hb=HEAD#l40

I'm sorry about the compatibility break but we had to move on, and I believe it
was done in a proper way (slow and documented, while providing benefits for the
end user at the same time)

Best regards,

PS: this commit didn't disable the code, it was disabled since last bump, which
means in 2.4

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code

2014-09-22 Thread Clément Bœsch
On Mon, Sep 22, 2014 at 05:04:23PM +0200, Clément Bœsch wrote:
> On Mon, Sep 22, 2014 at 02:53:12PM +, Rainer Hochecker wrote:
> > Clément Bœsch  pkh.me> writes:
> > 
> > 
> > > > 
> > > > +1
> > > 
> > > Applied
> > > 
> > 
> > 
> > We at XBMC got the first complaints about broken subtitles. Why was this
> > removed?
> 
> Hi,
> 
> We just made the ASS packets from the Matroska output them verbatim, and
> not hacked with timestamps included into the timestamps.
> 

into the *payload*, derp.

[...]

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code

2014-09-22 Thread wm4
On Mon, 22 Sep 2014 14:53:12 + (UTC)
Rainer Hochecker  wrote:

> Clément Bœsch  pkh.me> writes:
> 
> 
> > > 
> > > +1
> > 
> > Applied
> > 
> 
> 
> We at XBMC got the first complaints about broken subtitles. Why was this
> removed?

It never worked right in the first place, at least not 100%.

What problems are you experiencing?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat: remove FF_API_ASS_SSA dead code

2014-09-22 Thread Rainer Hochecker
Clément Bœsch  pkh.me> writes:


> > 
> > +1
> 
> Applied
> 


We at XBMC got the first complaints about broken subtitles. Why was this
removed?

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


Re: [FFmpeg-devel] ffprobe shows errors on ts file

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 09:37:53AM +0200, airwolf wrote:
> On 09/20/2014 02:36 AM, Michael Niedermayer wrote:
> >>Hi,
> >>>
> >>>following file shows a bunch of errors in ffprobe:
> >>>https://www.dropbox.com/s/04djuv4zn0l4lkx/espn.ts?dl=0
> >>>
> >>>I'm not an expert in decoding that's why I try to ask here.
> >>>I converted the file to mp4 and used the mp4toannexb filter, then I
> >>>used h264analyze.
> >>>You can find the output below:
> >>>https://www.dropbox.com/s/88r838f5bbb7fs8/h264.log?dl=0
> >Is there some decoder/player that can play this better ?
> I'm not sure if there is some decoder/player out there, that is
> capable of playing it any better.
> It's an American TV channel, that's why I asked if anyone can tell
> me that it's encoded wrong or if American channels are just special
> and therefore need special handling.

> I'm interested if I'm right when saying the value of num_ref_frames
> has to match the number of B-Frames in GOP?

no they will generally not match

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

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 


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


Re: [FFmpeg-devel] [PATCH] avformat/avidec: ensure that palette does not contain the BottomUp info.

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 12:14:53PM +0200, Benoit Fouet wrote:
> Hi,
> 
> - Mail original -
> > On Mon, Sep 22, 2014 at 11:28:31AM +0200, Benoit Fouet wrote:
> > > Hi,
> > > 
> > > - Mail original -
> > > > On Mon, Sep 22, 2014 at 09:57:37AM +0200, Benoit Fouet wrote:
> > > > > Considering the palette is located at the end of extradata may
> > > > > be
> > > > > flawed
> > > > > when the extradata contains the palette followed by the
> > > > > BottomUp
> > > > > field.
> > > > > When the BottomUp field is present, exclude it from the
> > > > > palette.
> > > > > Fixes ticket #1304
> > > > > ---
> > > > >  libavformat/avidec.c | 4 
> > > > >  1 file changed, 4 insertions(+)
> > > > > 
> > > > > diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> > > > > index 5b260e2..f7b15b7 100644
> > > > > --- a/libavformat/avidec.c
> > > > > +++ b/libavformat/avidec.c
> > > > > @@ -756,6 +756,10 @@ static int avi_read_header(AVFormatContext
> > > > > *s)
> > > > >  pal_size = FFMIN(pal_size,
> > > > >  st->codec->extradata_size);
> > > > >  pal_src  = st->codec->extradata +
> > > > > st->codec->extradata_size -
> > > > > pal_size;
> > > > > +/* Exclude the "BottomUp" field from
> > > > > the
> > > > > palette */
> > > > > +if (pal_src - st->codec->extradata >=
> > > > > 9 &&
> > > > > +!memcmp(st->codec->extradata +
> > > > > st->codec->extradata_size - 9, "BottomUp", 9))
> > > > > +pal_src -= 9;
> > > > >  for (i = 0; i < pal_size / 4; i++)
> > > > >  ast->pal[i] = 0xFFU<<24 |
> > > > >  AV_RL32(pal_src+4*i);
> > > > >  ast->has_pal = 1;
> > > > 
> > > > applied
> > > > 
> > > > though i suspect this only fixes demuxing/decoding of remuxed
> > > > files
> > > > with ffmpeg/ffplay.
> > > > I suspect the remuxed files still wont play with the official
> > > > avi/rawvideo code from MS or whatever the "reference" code would
> > > > be
> > > > 
> > > 
> > > I also have a "fix" for the muxer, though I'm still trying to see
> > > what the consequences of such a patch could be...
> > > See attached.
> > > 
> > > --
> > > Ben
> > > 
> > 
> > >  avienc.c |7 +++
> > >  1 file changed, 7 insertions(+)
> > > 8ae96276e07eb00474ab2115f9ff9c3d0f690723  avienc.diff
> > > diff --git a/libavformat/avienc.c b/libavformat/avienc.c
> > > index c9d8b7f..2855293 100644
> > > --- a/libavformat/avienc.c
> > > +++ b/libavformat/avienc.c
> > > @@ -299,6 +299,13 @@ static int avi_write_header(AVFormatContext
> > > *s)
> > >  avio_wl32(pb, au_ssize); /* sample size */
> > >  avio_wl32(pb, 0);
> > >  avio_wl16(pb, enc->width);
> > > +if (   enc->extradata_size >= 9
> > > +&& !memcmp(enc->extradata + enc->extradata_size - 9,
> > > "BottomUp", 9)) {
> > > +enc->height = -enc->height;
> > 
> > i think its safer not to change AVCodecContext.height and just change
> > the in the bitstream stored value instead
> > 
> 
> The issue when doing this is that the BITMAPINFOHEADER is wrong. Sop the 
> image is still flipped.

Well then you need a local variable/array or value in the avi muxer
context. values in AVCodecContext shouldnt really be randomly
be overwritten by the muxer

[...]
-- 
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] [PATCH] Add missing entry for maintainer of rtpenc_hevc.*

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 01:07:10PM +0200, Thomas Volkert wrote:
> From: Thomas Volkert 
> 
> ---
>  MAINTAINERS | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied

thx

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

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA


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


[FFmpeg-devel] [PATCH] Add missing entry for maintainer of rtpenc_hevc.*

2014-09-22 Thread Thomas Volkert
From: Thomas Volkert 

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 545b71e..90a4013 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -463,7 +463,7 @@ Muxers/Demuxers:
   rtmp* Kostya Shishkov
   rtp.c, rtpenc.c   Martin Storsjo
   rtpdec_h261.*, rtpenc_h261.*  Thomas Volkert
-  rtpdec_hevc.* Thomas Volkert
+  rtpdec_hevc.*, rtpenc_hevc.*  Thomas Volkert
   rtpdec_asf.*  Ronald S. Bultje
   rtpenc_mpv.*, rtpenc_aac.*Martin Storsjo
   rtsp.cLuca Barbato
-- 
1.9.1

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


[FFmpeg-devel] [PATCH] avformat/img2dec: fix glob pattern detection.

2014-09-22 Thread Benoit Fouet
The is_glob() function was not working with unescaped glob patterns,
which is the way only glob_sequence (which is deprecated) works.
Fixes ticket #3948
---
 libavformat/img2dec.c | 14 +-
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index a21429f..64ebc31 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -75,19 +75,7 @@ static int infer_size(int *width_ptr, int *height_ptr, int 
size)
 static int is_glob(const char *path)
 {
 #if HAVE_GLOB
-size_t span = 0;
-const char *p = path;
-
-while (p = strchr(p, '%')) {
-if (*(++p) == '%') {
-++p;
-continue;
-}
-if (span = strspn(p, "*?[]{}"))
-break;
-}
-/* Did we hit a glob char or get to the end? */
-return span != 0;
+return strspn(path, "%*?[]{}") != 0;
 #else
 return 0;
 #endif
-- 
2.1.0.127.g0c72b98

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


Re: [FFmpeg-devel] [PATCH] avformat/avidec: ensure that palette does not contain the BottomUp info.

2014-09-22 Thread Benoit Fouet
Hi,

- Mail original -
> On Mon, Sep 22, 2014 at 11:28:31AM +0200, Benoit Fouet wrote:
> > Hi,
> > 
> > - Mail original -
> > > On Mon, Sep 22, 2014 at 09:57:37AM +0200, Benoit Fouet wrote:
> > > > Considering the palette is located at the end of extradata may
> > > > be
> > > > flawed
> > > > when the extradata contains the palette followed by the
> > > > BottomUp
> > > > field.
> > > > When the BottomUp field is present, exclude it from the
> > > > palette.
> > > > Fixes ticket #1304
> > > > ---
> > > >  libavformat/avidec.c | 4 
> > > >  1 file changed, 4 insertions(+)
> > > > 
> > > > diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> > > > index 5b260e2..f7b15b7 100644
> > > > --- a/libavformat/avidec.c
> > > > +++ b/libavformat/avidec.c
> > > > @@ -756,6 +756,10 @@ static int avi_read_header(AVFormatContext
> > > > *s)
> > > >  pal_size = FFMIN(pal_size,
> > > >  st->codec->extradata_size);
> > > >  pal_src  = st->codec->extradata +
> > > > st->codec->extradata_size -
> > > > pal_size;
> > > > +/* Exclude the "BottomUp" field from
> > > > the
> > > > palette */
> > > > +if (pal_src - st->codec->extradata >=
> > > > 9 &&
> > > > +!memcmp(st->codec->extradata +
> > > > st->codec->extradata_size - 9, "BottomUp", 9))
> > > > +pal_src -= 9;
> > > >  for (i = 0; i < pal_size / 4; i++)
> > > >  ast->pal[i] = 0xFFU<<24 |
> > > >  AV_RL32(pal_src+4*i);
> > > >  ast->has_pal = 1;
> > > 
> > > applied
> > > 
> > > though i suspect this only fixes demuxing/decoding of remuxed
> > > files
> > > with ffmpeg/ffplay.
> > > I suspect the remuxed files still wont play with the official
> > > avi/rawvideo code from MS or whatever the "reference" code would
> > > be
> > > 
> > 
> > I also have a "fix" for the muxer, though I'm still trying to see
> > what the consequences of such a patch could be...
> > See attached.
> > 
> > --
> > Ben
> > 
> 
> >  avienc.c |7 +++
> >  1 file changed, 7 insertions(+)
> > 8ae96276e07eb00474ab2115f9ff9c3d0f690723  avienc.diff
> > diff --git a/libavformat/avienc.c b/libavformat/avienc.c
> > index c9d8b7f..2855293 100644
> > --- a/libavformat/avienc.c
> > +++ b/libavformat/avienc.c
> > @@ -299,6 +299,13 @@ static int avi_write_header(AVFormatContext
> > *s)
> >  avio_wl32(pb, au_ssize); /* sample size */
> >  avio_wl32(pb, 0);
> >  avio_wl16(pb, enc->width);
> > +if (   enc->extradata_size >= 9
> > +&& !memcmp(enc->extradata + enc->extradata_size - 9,
> > "BottomUp", 9)) {
> > +enc->height = -enc->height;
> 
> i think its safer not to change AVCodecContext.height and just change
> the in the bitstream stored value instead
> 

The issue when doing this is that the BITMAPINFOHEADER is wrong. Sop the image 
is still flipped.

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


Re: [FFmpeg-devel] [PATCH] avformat/avidec: ensure that palette does not contain the BottomUp info.

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 11:28:31AM +0200, Benoit Fouet wrote:
> Hi,
> 
> - Mail original -
> > On Mon, Sep 22, 2014 at 09:57:37AM +0200, Benoit Fouet wrote:
> > > Considering the palette is located at the end of extradata may be
> > > flawed
> > > when the extradata contains the palette followed by the BottomUp
> > > field.
> > > When the BottomUp field is present, exclude it from the palette.
> > > Fixes ticket #1304
> > > ---
> > >  libavformat/avidec.c | 4 
> > >  1 file changed, 4 insertions(+)
> > > 
> > > diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> > > index 5b260e2..f7b15b7 100644
> > > --- a/libavformat/avidec.c
> > > +++ b/libavformat/avidec.c
> > > @@ -756,6 +756,10 @@ static int avi_read_header(AVFormatContext *s)
> > >  pal_size = FFMIN(pal_size,
> > >  st->codec->extradata_size);
> > >  pal_src  = st->codec->extradata +
> > > st->codec->extradata_size -
> > > pal_size;
> > > +/* Exclude the "BottomUp" field from the
> > > palette */
> > > +if (pal_src - st->codec->extradata >= 9 &&
> > > +!memcmp(st->codec->extradata +
> > > st->codec->extradata_size - 9, "BottomUp", 9))
> > > +pal_src -= 9;
> > >  for (i = 0; i < pal_size / 4; i++)
> > >  ast->pal[i] = 0xFFU<<24 |
> > >  AV_RL32(pal_src+4*i);
> > >  ast->has_pal = 1;
> > 
> > applied
> > 
> > though i suspect this only fixes demuxing/decoding of remuxed files
> > with ffmpeg/ffplay.
> > I suspect the remuxed files still wont play with the official
> > avi/rawvideo code from MS or whatever the "reference" code would be
> > 
> 
> I also have a "fix" for the muxer, though I'm still trying to see what the 
> consequences of such a patch could be...
> See attached.
> 
> -- 
> Ben
> 

>  avienc.c |7 +++
>  1 file changed, 7 insertions(+)
> 8ae96276e07eb00474ab2115f9ff9c3d0f690723  avienc.diff
> diff --git a/libavformat/avienc.c b/libavformat/avienc.c
> index c9d8b7f..2855293 100644
> --- a/libavformat/avienc.c
> +++ b/libavformat/avienc.c
> @@ -299,6 +299,13 @@ static int avi_write_header(AVFormatContext *s)
>  avio_wl32(pb, au_ssize); /* sample size */
>  avio_wl32(pb, 0);
>  avio_wl16(pb, enc->width);
> +if (   enc->extradata_size >= 9
> +&& !memcmp(enc->extradata + enc->extradata_size - 9, "BottomUp", 
> 9)) {
> +enc->height = -enc->height;

i think its safer not to change AVCodecContext.height and just change
the in the bitstream stored value instead

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus


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


Re: [FFmpeg-devel] [PATCH] avformat/avidec: ensure that palette does not contain the BottomUp info.

2014-09-22 Thread Benoit Fouet
Hi,

- Mail original -
> On Mon, Sep 22, 2014 at 09:57:37AM +0200, Benoit Fouet wrote:
> > Considering the palette is located at the end of extradata may be
> > flawed
> > when the extradata contains the palette followed by the BottomUp
> > field.
> > When the BottomUp field is present, exclude it from the palette.
> > Fixes ticket #1304
> > ---
> >  libavformat/avidec.c | 4 
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> > index 5b260e2..f7b15b7 100644
> > --- a/libavformat/avidec.c
> > +++ b/libavformat/avidec.c
> > @@ -756,6 +756,10 @@ static int avi_read_header(AVFormatContext *s)
> >  pal_size = FFMIN(pal_size,
> >  st->codec->extradata_size);
> >  pal_src  = st->codec->extradata +
> > st->codec->extradata_size -
> > pal_size;
> > +/* Exclude the "BottomUp" field from the
> > palette */
> > +if (pal_src - st->codec->extradata >= 9 &&
> > +!memcmp(st->codec->extradata +
> > st->codec->extradata_size - 9, "BottomUp", 9))
> > +pal_src -= 9;
> >  for (i = 0; i < pal_size / 4; i++)
> >  ast->pal[i] = 0xFFU<<24 |
> >  AV_RL32(pal_src+4*i);
> >  ast->has_pal = 1;
> 
> applied
> 
> though i suspect this only fixes demuxing/decoding of remuxed files
> with ffmpeg/ffplay.
> I suspect the remuxed files still wont play with the official
> avi/rawvideo code from MS or whatever the "reference" code would be
> 

I also have a "fix" for the muxer, though I'm still trying to see what the 
consequences of such a patch could be...
See attached.

-- 
Ben

diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index c9d8b7f..2855293 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -299,6 +299,13 @@ static int avi_write_header(AVFormatContext *s)
 avio_wl32(pb, au_ssize); /* sample size */
 avio_wl32(pb, 0);
 avio_wl16(pb, enc->width);
+if (   enc->extradata_size >= 9
+&& !memcmp(enc->extradata + enc->extradata_size - 9, "BottomUp", 9)) {
+enc->height = -enc->height;
+enc->extradata_size -= 9;
+if (!enc->extradata_size)
+av_freep(&enc->extradata);
+}
 avio_wl16(pb, enc->height);
 ff_end_tag(pb, strh);
 
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/avidec: ensure that palette does not contain the BottomUp info.

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 09:57:37AM +0200, Benoit Fouet wrote:
> Considering the palette is located at the end of extradata may be flawed
> when the extradata contains the palette followed by the BottomUp field.
> When the BottomUp field is present, exclude it from the palette.
> Fixes ticket #1304
> ---
>  libavformat/avidec.c | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> index 5b260e2..f7b15b7 100644
> --- a/libavformat/avidec.c
> +++ b/libavformat/avidec.c
> @@ -756,6 +756,10 @@ static int avi_read_header(AVFormatContext *s)
>  pal_size = FFMIN(pal_size, 
> st->codec->extradata_size);
>  pal_src  = st->codec->extradata +
> st->codec->extradata_size - pal_size;
> +/* Exclude the "BottomUp" field from the palette */
> +if (pal_src - st->codec->extradata >= 9 &&
> +!memcmp(st->codec->extradata + 
> st->codec->extradata_size - 9, "BottomUp", 9))
> +pal_src -= 9;
>  for (i = 0; i < pal_size / 4; i++)
>  ast->pal[i] = 0xFFU<<24 | AV_RL32(pal_src+4*i);
>  ast->has_pal = 1;

applied

though i suspect this only fixes demuxing/decoding of remuxed files
with ffmpeg/ffplay.
I suspect the remuxed files still wont play with the official
avi/rawvideo code from MS or whatever the "reference" code would be

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

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire


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


Re: [FFmpeg-devel] [PATCH] avformat/img2: remove useless 'pix' duplicated entry.

2014-09-22 Thread Michael Niedermayer
On Mon, Sep 22, 2014 at 10:06:21AM +0200, Benoit Fouet wrote:
> ping?
> 
> - Mail original -
> > The second entry will never be selected, so let's save some bytes in
> > the
> > library.
> > ---
> >  libavformat/img2.c | 1 -
> >  1 file changed, 1 deletion(-)

applied

thanks

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

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


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


[FFmpeg-devel] [PATCH] Added parameter -hls_allow_cache

2014-09-22 Thread Joakim Roubert
The -hls_allow_cache parameter enables explicitly setting the
EXT-X-ALLOW-CACHE tag in the manifest file. That tag indicates
whether the client MAY or MUST NOT cache downloaded media
segments for later replay.

Valid values are 1 (=YES) or 0 (=NO) and the EXT-X-ALLOW-CACHE
will not show in the manifest for other values (or if
-hls_allow_cache is not used.
---
 doc/muxers.texi  |4 
 libavformat/hlsenc.c |6 ++
 2 files changed, 10 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 5f8d75f..44931e7 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -242,6 +242,10 @@ to @var{wrap}.
 Start the playlist sequence number from @var{number}. Default value is
 0.
 
+@item hls_allow_cache @var{allowcache}
+Explicitly set whether the client MAY (1) or MUST NOT (0) cache media
+segments.
+
 @item hls_base_url @var{baseurl}
 Append @var{baseurl} to every entry in the playlist.
 Useful to generate playlists with absolute paths.
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 6fe5bd6..c89813e 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -59,6 +59,8 @@ typedef struct HLSContext {
 int  wrap; // Set by a private option.
 uint32_t flags;// enum HLSFlags
 
+int allowcache;
+
 int64_t recording_time;
 int has_video;
 int64_t start_pts;
@@ -171,6 +173,9 @@ static int hls_window(AVFormatContext *s, int last)
 
 avio_printf(hls->pb, "#EXTM3U\n");
 avio_printf(hls->pb, "#EXT-X-VERSION:%d\n", version);
+if (hls->allowcache == 0 || hls->allowcache == 1) {
+avio_printf(hls->pb, "#EXT-X-ALLOW-CACHE:%s\n", hls->allowcache == 0 ? 
"NO" : "YES");
+}
 avio_printf(hls->pb, "#EXT-X-TARGETDURATION:%d\n", target_duration);
 avio_printf(hls->pb, "#EXT-X-MEDIA-SEQUENCE:%"PRId64"\n", sequence);
 
@@ -394,6 +399,7 @@ static const AVOption options[] = {
 {"hls_list_size", "set maximum number of playlist entries",  
OFFSET(max_nb_segments),AV_OPT_TYPE_INT,{.i64 = 5}, 0, INT_MAX, E},
 {"hls_ts_options","set hls mpegts list of options for the container format 
used for hls", OFFSET(format_options_str), AV_OPT_TYPE_STRING, {.str = NULL},  
0, 0,E},
 {"hls_wrap",  "set number after which the index wraps",  OFFSET(wrap), 
   AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, E},
+{"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT 
(0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, 
INT_MIN, INT_MAX, E},
 {"hls_base_url",  "url to prepend to each playlist entry",   
OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL},  0, 0,   E},
 {"hls_flags", "set flags affecting HLS playlist and media file 
generation", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, 0, UINT_MAX, E, 
"flags"},
 {"single_file",   "generate a single media file indexed with byte ranges", 
0, AV_OPT_TYPE_CONST, {.i64 = HLS_SINGLE_FILE }, 0, UINT_MAX,   E, "flags"},
-- 
1.7.10.4

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


Re: [FFmpeg-devel] [PATCH] avformat/img2: remove useless 'pix' duplicated entry.

2014-09-22 Thread Benoit Fouet
ping?

- Mail original -
> The second entry will never be selected, so let's save some bytes in
> the
> library.
> ---
>  libavformat/img2.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libavformat/img2.c b/libavformat/img2.c
> index 8002054..d6f1244 100644
> --- a/libavformat/img2.c
> +++ b/libavformat/img2.c
> @@ -57,7 +57,6 @@ static const IdStrMap img_tags[] = {
>  { AV_CODEC_ID_TIFF,   "tif"  },
>  { AV_CODEC_ID_SGI,"sgi"  },
>  { AV_CODEC_ID_PTX,"ptx"  },
> -{ AV_CODEC_ID_BRENDER_PIX,"pix"  },
>  { AV_CODEC_ID_PCX,"pcx"  },
>  { AV_CODEC_ID_SUNRAST,"sun"  },
>  { AV_CODEC_ID_SUNRAST,"ras"  },
> --
> 2.1.0.127.g0c72b98
> 
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/avidec: ensure that palette does not contain the BottomUp info.

2014-09-22 Thread Benoit Fouet
Considering the palette is located at the end of extradata may be flawed
when the extradata contains the palette followed by the BottomUp field.
When the BottomUp field is present, exclude it from the palette.
Fixes ticket #1304
---
 libavformat/avidec.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 5b260e2..f7b15b7 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -756,6 +756,10 @@ static int avi_read_header(AVFormatContext *s)
 pal_size = FFMIN(pal_size, st->codec->extradata_size);
 pal_src  = st->codec->extradata +
st->codec->extradata_size - pal_size;
+/* Exclude the "BottomUp" field from the palette */
+if (pal_src - st->codec->extradata >= 9 &&
+!memcmp(st->codec->extradata + 
st->codec->extradata_size - 9, "BottomUp", 9))
+pal_src -= 9;
 for (i = 0; i < pal_size / 4; i++)
 ast->pal[i] = 0xFFU<<24 | AV_RL32(pal_src+4*i);
 ast->has_pal = 1;
-- 
2.1.0.127.g0c72b98

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


Re: [FFmpeg-devel] ffprobe shows errors on ts file

2014-09-22 Thread airwolf

On 09/20/2014 02:36 AM, Michael Niedermayer wrote:

Hi,
>
>following file shows a bunch of errors in ffprobe:
>https://www.dropbox.com/s/04djuv4zn0l4lkx/espn.ts?dl=0
>
>I'm not an expert in decoding that's why I try to ask here.
>I converted the file to mp4 and used the mp4toannexb filter, then I
>used h264analyze.
>You can find the output below:
>https://www.dropbox.com/s/88r838f5bbb7fs8/h264.log?dl=0

Is there some decoder/player that can play this better ?
I'm not sure if there is some decoder/player out there, that is capable 
of playing it any better.
It's an American TV channel, that's why I asked if anyone can tell me 
that it's encoded wrong or if American channels are just special and 
therefore need special handling.
I'm interested if I'm right when saying the value of num_ref_frames has 
to match the number of B-Frames in GOP?



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


Re: [FFmpeg-devel] [PATCH v2 1/4] ffprobe: add -show_pixel_formats option

2014-09-22 Thread Tobias Rapp

On 15.09.2014 17:00, Tobias Rapp wrote:

Have updated my work according to the suggestions of Stefano and split
into four patches for easier review.

Any feedback/comments are welcome.


Ping.

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