Re: [FFmpeg-devel] Branchpoint tags

2014-12-02 Thread Michael Niedermayer
On Sun, Sep 14, 2014 at 07:12:56PM +0200, Michael Niedermayer wrote:
> Hi
> 
> Should we add git tags to the revissions where releases are branched
> off ?
> 
> that way a "git describe" on master would look like:
> n2.5-dev-3-gb227be3
> instead of:
> n2.0-11670-gb227be3
> 
> (or any other tag than n2.5-dev that we choose)
> 
> it would not affect the "./version.sh" output
> 
> -- 
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> The real ebay dictionary, page 2
> "100% positive feedback" - "All either got their money back or didnt complain"
> "Best seller ever, very honest" - "Seller refunded buyer after failed scam"

heres a list of commands that adds these tags locally
please check and comment
if i hear no objections then i will push these in a week or 2

note the tags always use ++minor, that is for consistency because at
the time after a branch we generally do not yet know if the next
release will be a minor or major one


git tag -m 'Main development, master branch after release/0.10 branched off' -a 
n0.11-dev 01fcbdf9cedcf14418b5886205261e532167f949
git tag -m 'Main development, master branch after release/0.11 branched off' -a 
n0.12-dev c0b47d1914a19abacdf1edf081cbf07485952920
git tag -m 'Main development, master branch after release/1.0 branched off'  -a 
n1.1-dev  b4c753487cf819213740d39c49b7bdc45338305d
git tag -m 'Main development, master branch after release/1.1 branched off'  -a 
n1.2-dev  a2aeaff40f34cb54bef55240f9cb8046385087d7
git tag -m 'Main development, master branch after release/1.2 branched off'  -a 
n1.3-dev  80f91a70be5f03fc95eb89d222d760eeaf91b135
git tag -m 'Main development, master branch after release/2.0 branched off'  -a 
n2.1-dev  a37e42b3ee4226a4d2c69cd4eebf9c81e6df8ea5
git tag -m 'Main development, master branch after release/2.1 branched off'  -a 
n2.2-dev  6baf9c4406bcdf1015c9ec8bd6b8c4aef77624ac
git tag -m 'Main development, master branch after release/2.2 branched off'  -a 
n2.3-dev  3ec3f70ddb1b97fd6174ab3ca8617d8a1a6516ab
git tag -m 'Main development, master branch after release/2.3 branched off'  -a 
n2.4-dev  13a72d9b08c914c3d3c99be1053e9d5cda8baa88
git tag -m 'Main development, master branch after release/2.4 branched off'  -a 
n2.5-dev  da2186be81b5cb2d24da5671e25affbb8f09920d



[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

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


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


Re: [FFmpeg-devel] [PATCH] web/legal: move Legal Threats to bottom of page

2014-12-02 Thread Timothy Gu
On Tue, Dec 2, 2014 at 3:53 PM, Lou Logan  wrote:
> This places Legal Threats under all of the more useful stuff.
>
> Signed-off-by: Lou Logan 
> ---
>  src/legal | 23 +++
>  1 file changed, 11 insertions(+), 12 deletions(-)

OK.

[...]

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


Re: [FFmpeg-devel] [PATCH 2/2] ffmpeg: use avcodec_copy_context before avcodec_open2 and open both ctxs

2014-12-02 Thread Michael Niedermayer
On Wed, Dec 03, 2014 at 02:02:21AM +0100, Lukasz Marek wrote:
> On 03.12.2014 01:53, Michael Niedermayer wrote:
> >On Wed, Dec 03, 2014 at 01:39:12AM +0100, Lukasz Marek wrote:
> >>On 03.12.2014 00:35, Michael Niedermayer wrote:
> >>>On Tue, Dec 02, 2014 at 07:27:33PM +0100, Lukasz Marek wrote:
> avcodec_copy_context make dest context unopened.
> ffmpeg treats it as opened.
> 
> Signed-off-by: Lukasz Marek 
> ---
>   ffmpeg.c | 29 -
>   1 file changed, 20 insertions(+), 9 deletions(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index b44401f..4fa9f1e 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -2932,6 +2932,7 @@ static int transcode_init(void)
>   if (ost->encoding_needed) {
>   AVCodec  *codec = ost->enc;
>   AVCodecContext *dec = NULL;
> +AVDictionary   *opt_copy = NULL;
> 
>   if ((ist = get_input_stream(ost)))
>   dec = ist->dec_ctx;
> @@ -2949,13 +2950,24 @@ static int transcode_init(void)
>   av_dict_set(&ost->encoder_opts, "threads", "auto", 0);
>   av_dict_set(&ost->encoder_opts, "side_data_only_packets", 
>  "1", 0);
> 
> -if ((ret = avcodec_open2(ost->enc_ctx, codec, 
> &ost->encoder_opts)) < 0) {
> +ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
> +if (ret < 0) {
> +av_log(NULL, AV_LOG_FATAL,
> +   "Error initializing the output stream codec 
> context.\n");
> +exit_program(1);
> +}
> +
> +av_dict_copy(&opt_copy, ost->encoder_opts, 0);
> +if ((ret = avcodec_open2(ost->enc_ctx, codec, 
> &ost->encoder_opts)) < 0 ||
> +(ret = avcodec_open2(ost->st->codec, codec, &opt_copy)) 
> < 0) {
> >>>
> >>>if the encoder is opened twice it would print any info or warnings
> >>>twice. libxvid would open 2pass files twice potentially i think
> >>>
> >>>maybe coded_frame could just be allocated somewhere before use
> >>>in ffmpeg raw and leaving the copy as it is in ffmpeg ?
> >>
> >>I'm not familiar with ffmpeg.c code closely; is ost->st->codec
> >>context used by ffmpeg for anything? I guess not (but im not sure).
> >>If so, I think is all working because of that. You have two contexts
> >>that share some pointers (like mentioned coded_frame). Of cource it
> >>can be reallocated here, but this code is still in contradiction
> >>with doxy of avcodec_copy_context that states dest context should be
> >>treat as  not opened. FFmpeg uses it as opened.
> >
> >where does ffmpeg treat the context as open ?
> 
> I saw this coded_frame allocated in init function of codecs, so I
> assumed that.
> 
> >i know of the coded_frame case but thats only used to transfer some
> >flags into the muxer and isnt really a pretty way to do it but
> >for that simply allocating the frame so the flags can be set
> >should work
> >i mean you can probably just check if its NULL and allocate
> >before the few flags are set in it
> 
> So basically, I can just alloc it in avcodec_copy_context in case it
> is present in src object? It is working, but I thought it is wrong
> way to solve it.

I suspect that would lead to some memleak, also it doesnt feel
right.
Ive removed the troubblesome coded_frame use in ffmpeg.c, it served
no purpose anymore
does that solve the issue?

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad


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


Re: [FFmpeg-devel] [PATCH 2/2] ffmpeg: use avcodec_copy_context before avcodec_open2 and open both ctxs

2014-12-02 Thread Lukasz Marek

On 03.12.2014 01:53, Michael Niedermayer wrote:

On Wed, Dec 03, 2014 at 01:39:12AM +0100, Lukasz Marek wrote:

On 03.12.2014 00:35, Michael Niedermayer wrote:

On Tue, Dec 02, 2014 at 07:27:33PM +0100, Lukasz Marek wrote:

avcodec_copy_context make dest context unopened.
ffmpeg treats it as opened.

Signed-off-by: Lukasz Marek 
---
  ffmpeg.c | 29 -
  1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index b44401f..4fa9f1e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2932,6 +2932,7 @@ static int transcode_init(void)
  if (ost->encoding_needed) {
  AVCodec  *codec = ost->enc;
  AVCodecContext *dec = NULL;
+AVDictionary   *opt_copy = NULL;

  if ((ist = get_input_stream(ost)))
  dec = ist->dec_ctx;
@@ -2949,13 +2950,24 @@ static int transcode_init(void)
  av_dict_set(&ost->encoder_opts, "threads", "auto", 0);
  av_dict_set(&ost->encoder_opts, "side_data_only_packets", "1", 0);

-if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) 
< 0) {
+ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
+if (ret < 0) {
+av_log(NULL, AV_LOG_FATAL,
+   "Error initializing the output stream codec 
context.\n");
+exit_program(1);
+}
+
+av_dict_copy(&opt_copy, ost->encoder_opts, 0);
+if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) 
< 0 ||
+(ret = avcodec_open2(ost->st->codec, codec, &opt_copy)) < 0) {


if the encoder is opened twice it would print any info or warnings
twice. libxvid would open 2pass files twice potentially i think

maybe coded_frame could just be allocated somewhere before use
in ffmpeg raw and leaving the copy as it is in ffmpeg ?


I'm not familiar with ffmpeg.c code closely; is ost->st->codec
context used by ffmpeg for anything? I guess not (but im not sure).
If so, I think is all working because of that. You have two contexts
that share some pointers (like mentioned coded_frame). Of cource it
can be reallocated here, but this code is still in contradiction
with doxy of avcodec_copy_context that states dest context should be
treat as  not opened. FFmpeg uses it as opened.


where does ffmpeg treat the context as open ?


I saw this coded_frame allocated in init function of codecs, so I 
assumed that.



i know of the coded_frame case but thats only used to transfer some
flags into the muxer and isnt really a pretty way to do it but
for that simply allocating the frame so the flags can be set
should work
i mean you can probably just check if its NULL and allocate
before the few flags are set in it


So basically, I can just alloc it in avcodec_copy_context in case it is 
present in src object? It is working, but I thought it is wrong way to 
solve it.

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


Re: [FFmpeg-devel] [PATCH 2/2] ffmpeg: use avcodec_copy_context before avcodec_open2 and open both ctxs

2014-12-02 Thread Michael Niedermayer
On Wed, Dec 03, 2014 at 01:39:12AM +0100, Lukasz Marek wrote:
> On 03.12.2014 00:35, Michael Niedermayer wrote:
> >On Tue, Dec 02, 2014 at 07:27:33PM +0100, Lukasz Marek wrote:
> >>avcodec_copy_context make dest context unopened.
> >>ffmpeg treats it as opened.
> >>
> >>Signed-off-by: Lukasz Marek 
> >>---
> >>  ffmpeg.c | 29 -
> >>  1 file changed, 20 insertions(+), 9 deletions(-)
> >>
> >>diff --git a/ffmpeg.c b/ffmpeg.c
> >>index b44401f..4fa9f1e 100644
> >>--- a/ffmpeg.c
> >>+++ b/ffmpeg.c
> >>@@ -2932,6 +2932,7 @@ static int transcode_init(void)
> >>  if (ost->encoding_needed) {
> >>  AVCodec  *codec = ost->enc;
> >>  AVCodecContext *dec = NULL;
> >>+AVDictionary   *opt_copy = NULL;
> >>
> >>  if ((ist = get_input_stream(ost)))
> >>  dec = ist->dec_ctx;
> >>@@ -2949,13 +2950,24 @@ static int transcode_init(void)
> >>  av_dict_set(&ost->encoder_opts, "threads", "auto", 0);
> >>  av_dict_set(&ost->encoder_opts, "side_data_only_packets", 
> >> "1", 0);
> >>
> >>-if ((ret = avcodec_open2(ost->enc_ctx, codec, 
> >>&ost->encoder_opts)) < 0) {
> >>+ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
> >>+if (ret < 0) {
> >>+av_log(NULL, AV_LOG_FATAL,
> >>+   "Error initializing the output stream codec 
> >>context.\n");
> >>+exit_program(1);
> >>+}
> >>+
> >>+av_dict_copy(&opt_copy, ost->encoder_opts, 0);
> >>+if ((ret = avcodec_open2(ost->enc_ctx, codec, 
> >>&ost->encoder_opts)) < 0 ||
> >>+(ret = avcodec_open2(ost->st->codec, codec, &opt_copy)) < 
> >>0) {
> >
> >if the encoder is opened twice it would print any info or warnings
> >twice. libxvid would open 2pass files twice potentially i think
> >
> >maybe coded_frame could just be allocated somewhere before use
> >in ffmpeg raw and leaving the copy as it is in ffmpeg ?
> 
> I'm not familiar with ffmpeg.c code closely; is ost->st->codec
> context used by ffmpeg for anything? I guess not (but im not sure).
> If so, I think is all working because of that. You have two contexts
> that share some pointers (like mentioned coded_frame). Of cource it
> can be reallocated here, but this code is still in contradiction
> with doxy of avcodec_copy_context that states dest context should be
> treat as  not opened. FFmpeg uses it as opened.

where does ffmpeg treat the context as open ?
i know of the coded_frame case but thats only used to transfer some
flags into the muxer and isnt really a pretty way to do it but
for that simply allocating the frame so the flags can be set
should work
i mean you can probably just check if its NULL and allocate
before the few flags are set in it


> This avcodec_copy_context function is still very hacky, it is better
> than pure memcpy, but it doesn't separate src and dest completely..
> yet.

yes


> 
> Of course I may miss something.

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

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


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


[FFmpeg-devel] [PATCH] libavformat/mxfdec.c refactor resolving MultiDescriptor and remove essence group hack

2014-12-02 Thread Mark Reid
I think this is a better way to deal with single frame essence data then my
previous way.

---
 libavformat/mxfdec.c | 62 
 1 file changed, 38 insertions(+), 24 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 0c88a8a..6c104b9 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1508,6 +1508,32 @@ static MXFPackage* mxf_resolve_source_package(MXFContext 
*mxf, UID package_uid)
 return NULL;
 }
 
+static MXFDescriptor* mxf_resolve_multidescriptor(MXFContext *mxf, 
MXFDescriptor *descriptor, int track_id)
+{
+MXFDescriptor *sub_descriptor = NULL;
+int i;
+
+if (!descriptor)
+return NULL;
+
+if (descriptor->type == MultipleDescriptor) {
+for (i = 0; i < descriptor->sub_descriptors_count; i++) {
+sub_descriptor = mxf_resolve_strong_ref(mxf, 
&descriptor->sub_descriptors_refs[i], Descriptor);
+
+if (!sub_descriptor) {
+av_log(mxf->fc, AV_LOG_ERROR, "could not resolve sub 
descriptor strong ref\n");
+continue;
+}
+if (sub_descriptor->linked_track_id == track_id) {
+return sub_descriptor;
+}
+}
+} else if (descriptor->type == Descriptor)
+return descriptor;
+
+return NULL;
+}
+
 static MXFStructuralComponent* mxf_resolve_essence_group_choice(MXFContext 
*mxf, MXFEssenceGroup *essence_group)
 {
 MXFStructuralComponent *component = NULL;
@@ -1529,12 +1555,8 @@ static MXFStructuralComponent* 
mxf_resolve_essence_group_choice(MXFContext *mxf,
 continue;
 
 descriptor = mxf_resolve_strong_ref(mxf, &package->descriptor_ref, 
Descriptor);
-if (descriptor){
-/* HACK: force the duration of the component to match the duration 
of the descriptor */
-if (descriptor->duration != AV_NOPTS_VALUE)
-component->duration = descriptor->duration;
+if (descriptor)
 return component;
-}
 }
 return NULL;
 }
@@ -1735,7 +1757,17 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
 }
 st->id = source_track->track_id;
 st->priv_data = source_track;
-source_track->original_duration = st->duration = component->duration;
+
+source_package->descriptor = mxf_resolve_strong_ref(mxf, 
&source_package->descriptor_ref, AnyType);
+descriptor = mxf_resolve_multidescriptor(mxf, 
source_package->descriptor, source_track->track_id);
+
+/* A SourceClip from a EssenceGroup may only be a single frame of 
essence data. The clips duration is then how many
+ * frames its suppose to repeat for. Descriptor->duration, if present, 
contains the real duration of the essence data */
+if (descriptor && descriptor->duration != AV_NOPTS_VALUE)
+source_track->original_duration = st->duration = 
FFMIN(descriptor->duration, component->duration);
+else
+source_track->original_duration = st->duration = 
component->duration;
+
 if (st->duration == -1)
 st->duration = AV_NOPTS_VALUE;
 st->start_time = component->start_position;
@@ -1758,24 +1790,6 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
 codec_ul = mxf_get_codec_ul(ff_mxf_data_definition_uls, 
&source_track->sequence->data_definition_ul);
 st->codec->codec_type = codec_ul->id;
 
-source_package->descriptor = mxf_resolve_strong_ref(mxf, 
&source_package->descriptor_ref, AnyType);
-if (source_package->descriptor) {
-if (source_package->descriptor->type == MultipleDescriptor) {
-for (j = 0; j < 
source_package->descriptor->sub_descriptors_count; j++) {
-MXFDescriptor *sub_descriptor = 
mxf_resolve_strong_ref(mxf, 
&source_package->descriptor->sub_descriptors_refs[j], Descriptor);
-
-if (!sub_descriptor) {
-av_log(mxf->fc, AV_LOG_ERROR, "could not resolve sub 
descriptor strong ref\n");
-continue;
-}
-if (sub_descriptor->linked_track_id == 
source_track->track_id) {
-descriptor = sub_descriptor;
-break;
-}
-}
-} else if (source_package->descriptor->type == Descriptor)
-descriptor = source_package->descriptor;
-}
 if (!descriptor) {
 av_log(mxf->fc, AV_LOG_INFO, "source track %d: stream %d, no 
descriptor found\n", source_track->track_id, st->index);
 continue;
-- 
2.0.0

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


Re: [FFmpeg-devel] [PATCH] h264_i386: Optimize decode_significance_8x8_x86 for 64 bit.

2014-12-02 Thread Michael Niedermayer
On Sat, Nov 22, 2014 at 02:09:01PM +0100, Reimar Döffinger wrote:
> On Mon, Nov 17, 2014 at 01:41:13PM +0100, Michael Niedermayer wrote:
> > On Mon, Nov 17, 2014 at 08:19:32AM +0100, Reimar Döffinger wrote:
> > > On 17.11.2014, at 02:37, Michael Niedermayer  wrote:
> > > > On Sat, Nov 15, 2014 at 06:16:03PM +0100, Reimar Döffinger wrote:
> > > >> 11674 -> 10877 decicycles on my Phenom II.
> > > >> Overall speedup was unfortunately within measurement error.
> > > > 
> > > > here its  10153 ->10135
> > > 
> > > I suspect it also depends a bit on the compiler and how it changes the 
> > > surrounding code.
> > > Note that I also tested with PIC actually.
> > > 
> > > > but ive a slightly odd feeling about the chnages to the asm code,
> > > > iam not sure if all assemblers will be happy about the changed
> > > > code
> > > 
> > > Do you mean particularly the movzbl change?
> > 
> > yes and the k stuff
> > 
> > 
> > > I am also unsure about that, I think there was a reason for that %k6 
> > > mess...
> > > But this as well as movzx seemed to work for me...
> > 
> > it works here too i just have the feeling it might fail on some odd
> > assembler or platform. Thats not meant to keep you from pushing this
> > just that it might require to be reverted or fixed if such
> > problems actually occor
> 
> I pushed it.
> If anyone sees issues please tell me and I'll look into it!

i think these fate failures are caused by it but thats based just
on other commits in the range looking unlikely:

http://fate.ffmpeg.org/report.cgi?time=20141122231657&slot=x86_64-darwin-clang-3.5-O3
http://fate.ffmpeg.org/report.cgi?time=2014113720&slot=x86_64-darwin-clang-3.5

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.


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


Re: [FFmpeg-devel] [PATCH 2/2] ffmpeg: use avcodec_copy_context before avcodec_open2 and open both ctxs

2014-12-02 Thread Lukasz Marek

On 03.12.2014 00:35, Michael Niedermayer wrote:

On Tue, Dec 02, 2014 at 07:27:33PM +0100, Lukasz Marek wrote:

avcodec_copy_context make dest context unopened.
ffmpeg treats it as opened.

Signed-off-by: Lukasz Marek 
---
  ffmpeg.c | 29 -
  1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index b44401f..4fa9f1e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2932,6 +2932,7 @@ static int transcode_init(void)
  if (ost->encoding_needed) {
  AVCodec  *codec = ost->enc;
  AVCodecContext *dec = NULL;
+AVDictionary   *opt_copy = NULL;

  if ((ist = get_input_stream(ost)))
  dec = ist->dec_ctx;
@@ -2949,13 +2950,24 @@ static int transcode_init(void)
  av_dict_set(&ost->encoder_opts, "threads", "auto", 0);
  av_dict_set(&ost->encoder_opts, "side_data_only_packets", "1", 0);

-if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) 
< 0) {
+ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
+if (ret < 0) {
+av_log(NULL, AV_LOG_FATAL,
+   "Error initializing the output stream codec 
context.\n");
+exit_program(1);
+}
+
+av_dict_copy(&opt_copy, ost->encoder_opts, 0);
+if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) 
< 0 ||
+(ret = avcodec_open2(ost->st->codec, codec, &opt_copy)) < 0) {


if the encoder is opened twice it would print any info or warnings
twice. libxvid would open 2pass files twice potentially i think

maybe coded_frame could just be allocated somewhere before use
in ffmpeg raw and leaving the copy as it is in ffmpeg ?


I'm not familiar with ffmpeg.c code closely; is ost->st->codec context 
used by ffmpeg for anything? I guess not (but im not sure).
If so, I think is all working because of that. You have two contexts 
that share some pointers (like mentioned coded_frame). Of cource it can 
be reallocated here, but this code is still in contradiction with doxy 
of avcodec_copy_context that states dest context should be treat as  not 
opened. FFmpeg uses it as opened.
This avcodec_copy_context function is still very hacky, it is better 
than pure memcpy, but it doesn't separate src and dest completely.. yet.


Of course I may miss something.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc/options: don't copy priv context when it is not AVOption object

2014-12-02 Thread Michael Niedermayer
On Wed, Dec 03, 2014 at 01:24:55AM +0100, Lukasz Marek wrote:
> On 03.12.2014 01:15, Michael Niedermayer wrote:
> >On Wed, Dec 03, 2014 at 12:06:47AM +0100, Lukasz Marek wrote:
> >>This prevents potential crash when opt API is used without a class.
> >>
> >>Signed-off-by: Lukasz Marek 
> >>---
> >>  libavcodec/options.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >>diff --git a/libavcodec/options.c b/libavcodec/options.c
> >>index 7f9fb07..42ef754 100644
> >>--- a/libavcodec/options.c
> >>+++ b/libavcodec/options.c
> >>@@ -196,7 +196,7 @@ int avcodec_copy_context(AVCodecContext *dest, const 
> >>AVCodecContext *src)
> >>
> >>  dest->priv_data   = orig_priv_data;
> >>
> >>-if (orig_priv_data)
> >>+if (orig_priv_data && src->codec && src->codec->priv_class)
> >>  av_opt_copy(orig_priv_data, src->priv_data);
> >>
> >
> >"&& src->codec->priv_class" <--- LGTM
> >the src->codec check is probably ok too but is it NULL ever ?
> 
> after avcodec_alloc_context3(NULL)?
> IIRC there was a patch recently that set codec in
> avcodec_alloc_context3 (via avcodec_get_context_defaults3) when
> provided. Maybe after that it is not so common case. But still when
> allocated with NULL then you have NULL there. src context doesn't
> have to be open neither.

ok

[...]
-- 
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] lavc/options: don't copy priv context when it is not AVOption object

2014-12-02 Thread Lukasz Marek

On 03.12.2014 01:15, Michael Niedermayer wrote:

On Wed, Dec 03, 2014 at 12:06:47AM +0100, Lukasz Marek wrote:

This prevents potential crash when opt API is used without a class.

Signed-off-by: Lukasz Marek 
---
  libavcodec/options.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 7f9fb07..42ef754 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -196,7 +196,7 @@ int avcodec_copy_context(AVCodecContext *dest, const 
AVCodecContext *src)

  dest->priv_data   = orig_priv_data;

-if (orig_priv_data)
+if (orig_priv_data && src->codec && src->codec->priv_class)
  av_opt_copy(orig_priv_data, src->priv_data);



"&& src->codec->priv_class" <--- LGTM
the src->codec check is probably ok too but is it NULL ever ?


after avcodec_alloc_context3(NULL)?
IIRC there was a patch recently that set codec in avcodec_alloc_context3 
(via avcodec_get_context_defaults3) when provided. Maybe after that it 
is not so common case. But still when allocated with NULL then you have 
NULL there. src context doesn't have to be open neither.


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


Re: [FFmpeg-devel] [PATCH] lavc/options: don't copy priv context when it is not AVOption object

2014-12-02 Thread Michael Niedermayer
On Wed, Dec 03, 2014 at 12:06:47AM +0100, Lukasz Marek wrote:
> This prevents potential crash when opt API is used without a class.
> 
> Signed-off-by: Lukasz Marek 
> ---
>  libavcodec/options.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/options.c b/libavcodec/options.c
> index 7f9fb07..42ef754 100644
> --- a/libavcodec/options.c
> +++ b/libavcodec/options.c
> @@ -196,7 +196,7 @@ int avcodec_copy_context(AVCodecContext *dest, const 
> AVCodecContext *src)
>  
>  dest->priv_data   = orig_priv_data;
>  
> -if (orig_priv_data)
> +if (orig_priv_data && src->codec && src->codec->priv_class)
>  av_opt_copy(orig_priv_data, src->priv_data);
>  

"&& src->codec->priv_class" <--- LGTM
the src->codec check is probably ok too but is it NULL ever ?


[...]
-- 
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] lavf/oggenc: use meaningful error codes

2014-12-02 Thread Michael Niedermayer
On Wed, Dec 03, 2014 at 12:36:23AM +0100, Lukasz Marek wrote:
> Signed-off-by: Lukasz Marek 
> ---
>  libavformat/oggenc.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)

LGTM

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


[FFmpeg-devel] [PATCH] web/legal: move Legal Threats to bottom of page

2014-12-02 Thread Lou Logan
This places Legal Threats under all of the more useful stuff.

Signed-off-by: Lou Logan 
---
 src/legal | 23 +++
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/legal b/src/legal
index cb88149..c235d31 100644
--- a/src/legal
+++ b/src/legal
@@ -1,15 +1,3 @@
-Legal threats
-
-May 30, 2011
-
-Today FFmpeg has received the first legal threat in 
its existence. Its
-from a previous root admin of FFmpeg, who now is root admin of the
-Libav fork of FFmpeg. He claims copyright on the zigzag part of our
-logo. It has to be noted that he said 4 years ago http://article.gmane.org/gmane.comp.video.ffmpeg.devel/44742";>Credit
 to whoever came up with the zigzag idea
-Update May 31/June 1: we have replaced the logo with a better 
looking one drawn by
-Hervé Flores.
-
-
 FFmpeg License and Legal Considerations
 
 
@@ -169,3 +157,14 @@ you start trying to make money from patented technologies, 
the owners of
 the patents will come after their licensing fees. Notably, MPEG LA is
 vigilant and diligent about collecting for MPEG-related technologies.
 
+
+Legal threats
+
+May 30, 2011
+
+Today FFmpeg has received the first legal threat in 
its existence. Its
+from a previous root admin of FFmpeg, who now is root admin of the
+Libav fork of FFmpeg. He claims copyright on the zigzag part of our
+logo. It has to be noted that he said 4 years ago http://article.gmane.org/gmane.comp.video.ffmpeg.devel/44742";>Credit
 to whoever came up with the zigzag idea
+Update May 31/June 1: we have replaced the logo with a better 
looking one drawn by
+Hervé Flores.
-- 
2.1.3

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


Re: [FFmpeg-devel] Patch for heap corruption run time error in decklink_common.cpp

2014-12-02 Thread Michael Niedermayer
On Wed, Dec 03, 2014 at 12:35:32AM +0100, Ramiro Polla wrote:
> 
> On 02.12.2014 20:28, Jon bae wrote:
> >Ok here a second run, I try to follow the instruction from Carl Eugen.
> >This is the first patch for decklink_common.cpp. It fix this error:
> >
> >Unhandled exception at 0x76FA4102 (ntdll.dll) in ffmpeg.exe:
> >0xC374: A heap has been corrupted (parameters: 0x7701B4B0).
> 
> >From e9bc8e910f515af4030054df3e6feb308f3208aa Mon Sep 17 00:00:00 2001
> >From: Jonathan Baecker 
> >Date: Tue, 2 Dec 2014 20:10:41 +0100
> >Subject: [PATCH 1/2] heap corruption run time error in decklink_common
> >
> >Signed-off-by: Jonathan Baecker 
> >---
> > libavdevice/decklink_common.cpp | 6 --
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> >diff --git a/libavdevice/decklink_common.cpp 
> >b/libavdevice/decklink_common.cpp
> >index 9a9e44b..8eff910 100644
> >--- a/libavdevice/decklink_common.cpp
> >+++ b/libavdevice/decklink_common.cpp
> >@@ -69,9 +69,12 @@ static char *dup_wchar_to_utf8(wchar_t *w)
> > }
> > #define DECKLINK_STROLECHAR *
> > #define DECKLINK_STRDUP dup_wchar_to_utf8
> >+#define DECKLINK_FREE(s) SysFreeString(s)
> > #else
> > #define DECKLINK_STRconst char *
> > #define DECKLINK_STRDUP av_strdup
> >+/* free() is needed for a string returned by the DeckLink SDL. */
> >+#define DECKLINK_FREE(s) free((void *) s)
> > #endif
> >
> > HRESULT ff_decklink_get_display_name(IDeckLink *This, const char 
> > **displayName)
> >@@ -81,8 +84,7 @@ HRESULT ff_decklink_get_display_name(IDeckLink *This, 
> >const char **displayName)
> > if (hr != S_OK)
> > return hr;
> > *displayName = DECKLINK_STRDUP(tmpDisplayName);
> >-/* free() is needed for a string returned by the DeckLink SDL. */
> >-free((void *) tmpDisplayName);
> >+DECKLINK_FREE(tmpDisplayName);
> > return hr;
> > }
> 
> LGTM

applied

thanks

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

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


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


[FFmpeg-devel] [PATCH] lavf/oggenc: use meaningful error codes

2014-12-02 Thread Lukasz Marek
Signed-off-by: Lukasz Marek 
---
 libavformat/oggenc.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index dda229e..f3413c5 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -348,7 +348,7 @@ static int ogg_build_speex_headers(AVCodecContext *avctx,
 uint8_t *p;
 
 if (avctx->extradata_size < SPEEX_HEADER_SIZE)
-return -1;
+return AVERROR_INVALIDDATA;
 
 // first packet: Speex header
 p = av_mallocz(SPEEX_HEADER_SIZE);
@@ -377,7 +377,7 @@ static int ogg_build_opus_headers(AVCodecContext *avctx,
 uint8_t *p;
 
 if (avctx->extradata_size < OPUS_HEADER_SIZE)
-return -1;
+return AVERROR_INVALIDDATA;
 
 /* first packet: Opus header */
 p = av_mallocz(avctx->extradata_size);
@@ -446,12 +446,12 @@ static int ogg_write_header(AVFormatContext *s)
 st->codec->codec_id != AV_CODEC_ID_FLAC   &&
 st->codec->codec_id != AV_CODEC_ID_OPUS) {
 av_log(s, AV_LOG_ERROR, "Unsupported codec id in stream %d\n", i);
-return -1;
+return AVERROR(EINVAL);
 }
 
 if (!st->codec->extradata || !st->codec->extradata_size) {
 av_log(s, AV_LOG_ERROR, "No extradata present\n");
-return -1;
+return AVERROR_INVALIDDATA;
 }
 oggstream = av_mallocz(sizeof(*oggstream));
 if (!oggstream)
@@ -511,7 +511,7 @@ static int ogg_write_header(AVFormatContext *s)
   oggstream->header, 
oggstream->header_len) < 0) {
 av_log(s, AV_LOG_ERROR, "Extradata corrupted\n");
 av_freep(&st->priv_data);
-return -1;
+return AVERROR_INVALIDDATA;
 }
 
 p = ogg_write_vorbiscomment(7, s->flags & AVFMT_FLAG_BITEXACT,
-- 
1.9.1

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


Re: [FFmpeg-devel] [PATCH 2/2] ffmpeg: use avcodec_copy_context before avcodec_open2 and open both ctxs

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 07:27:33PM +0100, Lukasz Marek wrote:
> avcodec_copy_context make dest context unopened.
> ffmpeg treats it as opened.
> 
> Signed-off-by: Lukasz Marek 
> ---
>  ffmpeg.c | 29 -
>  1 file changed, 20 insertions(+), 9 deletions(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index b44401f..4fa9f1e 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -2932,6 +2932,7 @@ static int transcode_init(void)
>  if (ost->encoding_needed) {
>  AVCodec  *codec = ost->enc;
>  AVCodecContext *dec = NULL;
> +AVDictionary   *opt_copy = NULL;
>  
>  if ((ist = get_input_stream(ost)))
>  dec = ist->dec_ctx;
> @@ -2949,13 +2950,24 @@ static int transcode_init(void)
>  av_dict_set(&ost->encoder_opts, "threads", "auto", 0);
>  av_dict_set(&ost->encoder_opts, "side_data_only_packets", "1", 
> 0);
>  
> -if ((ret = avcodec_open2(ost->enc_ctx, codec, 
> &ost->encoder_opts)) < 0) {
> +ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
> +if (ret < 0) {
> +av_log(NULL, AV_LOG_FATAL,
> +   "Error initializing the output stream codec 
> context.\n");
> +exit_program(1);
> +}
> +
> +av_dict_copy(&opt_copy, ost->encoder_opts, 0);
> +if ((ret = avcodec_open2(ost->enc_ctx, codec, 
> &ost->encoder_opts)) < 0 ||
> +(ret = avcodec_open2(ost->st->codec, codec, &opt_copy)) < 0) 
> {

if the encoder is opened twice it would print any info or warnings
twice. libxvid would open 2pass files twice potentially i think

maybe coded_frame could just be allocated somewhere before use
in ffmpeg raw and leaving the copy as it is in ffmpeg ?


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

The worst form of inequality is to try to make unequal things equal.
-- Aristotle


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


Re: [FFmpeg-devel] Patch for heap corruption run time error in decklink_common.cpp

2014-12-02 Thread Ramiro Polla


On 02.12.2014 20:28, Jon bae wrote:

Ok here a second run, I try to follow the instruction from Carl Eugen.
This is the first patch for decklink_common.cpp. It fix this error:

Unhandled exception at 0x76FA4102 (ntdll.dll) in ffmpeg.exe:
0xC374: A heap has been corrupted (parameters: 0x7701B4B0).



From e9bc8e910f515af4030054df3e6feb308f3208aa Mon Sep 17 00:00:00 2001
From: Jonathan Baecker 
Date: Tue, 2 Dec 2014 20:10:41 +0100
Subject: [PATCH 1/2] heap corruption run time error in decklink_common

Signed-off-by: Jonathan Baecker 
---
 libavdevice/decklink_common.cpp | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 9a9e44b..8eff910 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -69,9 +69,12 @@ static char *dup_wchar_to_utf8(wchar_t *w)
 }
 #define DECKLINK_STROLECHAR *
 #define DECKLINK_STRDUP dup_wchar_to_utf8
+#define DECKLINK_FREE(s) SysFreeString(s)
 #else
 #define DECKLINK_STRconst char *
 #define DECKLINK_STRDUP av_strdup
+/* free() is needed for a string returned by the DeckLink SDL. */
+#define DECKLINK_FREE(s) free((void *) s)
 #endif

 HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName)
@@ -81,8 +84,7 @@ HRESULT ff_decklink_get_display_name(IDeckLink *This, const 
char **displayName)
 if (hr != S_OK)
 return hr;
 *displayName = DECKLINK_STRDUP(tmpDisplayName);
-/* free() is needed for a string returned by the DeckLink SDL. */
-free((void *) tmpDisplayName);
+DECKLINK_FREE(tmpDisplayName);
 return hr;
 }


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


[FFmpeg-devel] [PATCH] lavc/options: don't copy priv context when it is not AVOption object

2014-12-02 Thread Lukasz Marek
This prevents potential crash when opt API is used without a class.

Signed-off-by: Lukasz Marek 
---
 libavcodec/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 7f9fb07..42ef754 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -196,7 +196,7 @@ int avcodec_copy_context(AVCodecContext *dest, const 
AVCodecContext *src)
 
 dest->priv_data   = orig_priv_data;
 
-if (orig_priv_data)
+if (orig_priv_data && src->codec && src->codec->priv_class)
 av_opt_copy(orig_priv_data, src->priv_data);
 
 dest->codec   = orig_codec;
-- 
1.9.1

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


[FFmpeg-devel] [PATCH] lavu/opt: handle NULL during class comparsion

2014-12-02 Thread Lukasz Marek
av_opt_copy compares classes to avoid copying between mismatched objects.
This protection fails when dest class is NULL.

Signed-off-by: Lukasz Marek 
---
 libavutil/opt.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index d873bd2..0e42ff6 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1576,14 +1576,15 @@ static int opt_size(enum AVOptionType type)
 int av_opt_copy(void *dst, FF_CONST_AVUTIL55 void *src)
 {
 const AVOption *o = NULL;
-const AVClass *c;
+const AVClass *c, *d;
 int ret = 0;
 
 if (!src)
 return 0;
 
 c = *(AVClass**)src;
-if (*(AVClass**)dst && c != *(AVClass**)dst)
+d = *(AVClass**)dst;
+if (!d || (d && c != d))
 return AVERROR(EINVAL);
 
 while ((o = av_opt_next(src, o))) {
-- 
1.9.1

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


Re: [FFmpeg-devel] Patch for device list error in decklink_common.cpp

2014-12-02 Thread Ramiro Polla


On 02.12.2014 20:30, Jon bae wrote:

Here is the other patch for decklink_common.cpp. It fix the error:

COM initialization failed
[decklink @ 02e5b520] Could not create DeckLink iterator
dummy: Immediate exit request



From 203eba2fad14dd6d84552d6c22899792e80b53bb Mon Sep 17 00:00:00 2001
From: Jonathan Baecker 
Date: Tue, 2 Dec 2014 20:12:38 +0100
Subject: [PATCH 2/2] device list error in decklink_common

Signed-off-by: Jonathan Baecker 
---
 libavdevice/decklink_common.cpp | 24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 8eff910..8f7e32a 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -42,16 +42,20 @@ IDeckLinkIterator *CreateDeckLinkIteratorInstance(void)
 {
 IDeckLinkIterator *iter;

-if (CoInitialize(NULL) != S_OK) {
-av_log(NULL, AV_LOG_ERROR, "COM initialization failed.\n");
-return NULL;
-}
-
-if (CoCreateInstance(CLSID_CDeckLinkIterator, NULL, CLSCTX_ALL,
- IID_IDeckLinkIterator, (void**) &iter) != S_OK) {
-av_log(NULL, AV_LOG_ERROR, "DeckLink drivers not installed.\n");
-return NULL;
-}
+HRESULT result;
+/* Initialize COM on this thread */
+result = CoInitialize(NULL);
+if (FAILED(result)) {
+av_log(NULL, AV_LOG_ERROR, "COM initialization failed.\n");
+return NULL;
+}
+
+/* Create an IDeckLinkIterator object to enumerate all DeckLink cards in 
the system */
+result = CoCreateInstance(CLSID_CDeckLinkIterator, NULL, CLSCTX_ALL, 
IID_IDeckLinkIterator, (void**)&iter);
+if (FAILED(result)) {
+av_log(NULL, AV_LOG_ERROR, "DeckLink drivers not installed.\n");
+return NULL;
+}

 return iter;
 }
--
2.2.0


This code is Copyright (c) Blackmagic Design. Try just changing the 
check for CoInitialize(NULL) from "!= S_OK" to "< 0".

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


Re: [FFmpeg-devel] [PATCH 1/3] ffserver_config: remove useless defaults

2014-12-02 Thread Lukasz Marek

On 02.12.2014 16:12, Reynaldo H. Verdejo Pinochet wrote:

Looks OK. Feel free to push.


pushed whole patchset, thx

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


Re: [FFmpeg-devel] [PATCH] pngdsp x86: use scalar loop for unaligned dest buffers.

2014-12-02 Thread Christophe Gisquet
Hi,

2014-12-02 14:31 GMT+01:00 Benoit Fouet :
> Fixes ticket #4148

Please try that one instead.

As all your changes have been reverted, I've put myself as the only
author. I've left your "signed-off-by", but I'm not sure of its
purpose now.

Christophe
From 76ddca41e1f4ab4df348b64ddbf63c58153c8c50 Mon Sep 17 00:00:00 2001
From: Christophe Gisquet 
Date: Tue, 2 Dec 2014 14:31:49 +0100
Subject: [PATCH] pngdsp x86: use unaligned access

For test images manually generated to contain onlu up prediction,
timing results:
 8380x3032255x185
before:   138635   1992
after:139232   1996

Actually jumping to the proper version depending on the alignment:
8380x3032: 138767

A 0.5% speed improvement for gigantic images is not worth the code
duplication.

Fixes ticket #4148

Signed-off-by: Christophe Gisquet 
Signed-off-by: Benoit Fouet 
---
 libavcodec/pngdsp.h   |  4 ++--
 libavcodec/x86/pngdsp.asm | 12 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/libavcodec/pngdsp.h b/libavcodec/pngdsp.h
index 1475b0c..fbc1a50 100644
--- a/libavcodec/pngdsp.h
+++ b/libavcodec/pngdsp.h
@@ -25,9 +25,9 @@
 #include 
 
 typedef struct PNGDSPContext {
-void (*add_bytes_l2)(uint8_t *dst  /* align 16 */,
+void (*add_bytes_l2)(uint8_t *dst,
  uint8_t *src1 /* align 16 */,
- uint8_t *src2 /* align 16 */, int w);
+ uint8_t *src2, int w);
 
 /* this might write to dst[w] */
 void (*add_paeth_prediction)(uint8_t *dst, uint8_t *src,
diff --git a/libavcodec/x86/pngdsp.asm b/libavcodec/x86/pngdsp.asm
index 8e23ccf..678a032 100644
--- a/libavcodec/x86/pngdsp.asm
+++ b/libavcodec/x86/pngdsp.asm
@@ -42,12 +42,12 @@ cglobal add_bytes_l2, 4, 6, %1, dst, src1, src2, wa, w, i
 andwaq, ~(mmsize*2-1)
 jmp .end_v
 .loop_v:
-movam0, [src1q+iq]
-movam1, [src1q+iq+mmsize]
-paddb   m0, [src2q+iq]
-paddb   m1, [src2q+iq+mmsize]
-mova  [dstq+iq   ], m0
-mova  [dstq+iq+mmsize], m1
+movum0, [src2q+iq]
+movum1, [src2q+iq+mmsize]
+paddb   m0, [src1q+iq]
+paddb   m1, [src1q+iq+mmsize]
+movu  [dstq+iq   ], m0
+movu  [dstq+iq+mmsize], m1
 add iq, mmsize*2
 .end_v:
 cmp iq, waq
-- 
1.9.2.msysgit.0

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


[FFmpeg-devel] Patch for device list error in decklink_common.cpp

2014-12-02 Thread Jon bae

Here is the other patch for decklink_common.cpp. It fix the error:

   COM initialization failed
   [decklink @ 02e5b520] Could not create DeckLink iterator
   dummy: Immediate exit request

Regards
Jonathan


>From 203eba2fad14dd6d84552d6c22899792e80b53bb Mon Sep 17 00:00:00 2001
From: Jonathan Baecker 
Date: Tue, 2 Dec 2014 20:12:38 +0100
Subject: [PATCH 2/2] device list error in decklink_common

Signed-off-by: Jonathan Baecker 
---
 libavdevice/decklink_common.cpp | 24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 8eff910..8f7e32a 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -42,16 +42,20 @@ IDeckLinkIterator *CreateDeckLinkIteratorInstance(void)
 {
 IDeckLinkIterator *iter;
 
-if (CoInitialize(NULL) != S_OK) {
-av_log(NULL, AV_LOG_ERROR, "COM initialization failed.\n");
-return NULL;
-}
-
-if (CoCreateInstance(CLSID_CDeckLinkIterator, NULL, CLSCTX_ALL,
- IID_IDeckLinkIterator, (void**) &iter) != S_OK) {
-av_log(NULL, AV_LOG_ERROR, "DeckLink drivers not installed.\n");
-return NULL;
-}
+HRESULT result;
+/* Initialize COM on this thread */
+result = CoInitialize(NULL);
+if (FAILED(result)) {
+av_log(NULL, AV_LOG_ERROR, "COM initialization failed.\n");
+return NULL;
+}
+
+/* Create an IDeckLinkIterator object to enumerate all DeckLink cards in 
the system */
+result = CoCreateInstance(CLSID_CDeckLinkIterator, NULL, CLSCTX_ALL, 
IID_IDeckLinkIterator, (void**)&iter);
+if (FAILED(result)) {
+av_log(NULL, AV_LOG_ERROR, "DeckLink drivers not installed.\n");
+return NULL;
+}
 
 return iter;
 }
-- 
2.2.0

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


[FFmpeg-devel] Patch for heap corruption run time error in decklink_common.cpp

2014-12-02 Thread Jon bae
Ok here a second run, I try to follow the instruction from Carl Eugen. 
This is the first patch for decklink_common.cpp. It fix this error:


   Unhandled exception at 0x76FA4102 (ntdll.dll) in ffmpeg.exe:
   0xC374: A heap has been corrupted (parameters: 0x7701B4B0).

Regards

Jonathan
>From e9bc8e910f515af4030054df3e6feb308f3208aa Mon Sep 17 00:00:00 2001
From: Jonathan Baecker 
Date: Tue, 2 Dec 2014 20:10:41 +0100
Subject: [PATCH 1/2] heap corruption run time error in decklink_common

Signed-off-by: Jonathan Baecker 
---
 libavdevice/decklink_common.cpp | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 9a9e44b..8eff910 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -69,9 +69,12 @@ static char *dup_wchar_to_utf8(wchar_t *w)
 }
 #define DECKLINK_STROLECHAR *
 #define DECKLINK_STRDUP dup_wchar_to_utf8
+#define DECKLINK_FREE(s) SysFreeString(s)
 #else
 #define DECKLINK_STRconst char *
 #define DECKLINK_STRDUP av_strdup
+/* free() is needed for a string returned by the DeckLink SDL. */
+#define DECKLINK_FREE(s) free((void *) s)
 #endif
 
 HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName)
@@ -81,8 +84,7 @@ HRESULT ff_decklink_get_display_name(IDeckLink *This, const 
char **displayName)
 if (hr != S_OK)
 return hr;
 *displayName = DECKLINK_STRDUP(tmpDisplayName);
-/* free() is needed for a string returned by the DeckLink SDL. */
-free((void *) tmpDisplayName);
+DECKLINK_FREE(tmpDisplayName);
 return hr;
 }
 
-- 
2.2.0

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


Re: [FFmpeg-devel] [PATCH 2/2] configure: add a note about pkg-config --static.

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 07:15:41PM +0100, Nicolas George wrote:
> Le duodi 12 frimaire, an CCXXIII, Michael Niedermayer a écrit :
> > should i merge them or should i wait ?
> > (iam asking as your reply isnt entirely clear about that)
> 
> Sorry about that. Please merge, unless you spot something wrong in the way.

merged

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

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


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


[FFmpeg-devel] [PATCH] avfilter/tinterlace: merge code with interlace

2014-12-02 Thread Clément Bœsch
---
After this commit, interlace doesn't behave the same if the input frames
are already interlaced. Does anyone wants me to keep this behaviour?

Also, the PTS adjustments might be different, but I didn't follow the
current discussions about it so I can't tell what people want.
---
 libavfilter/Makefile|   2 +-
 libavfilter/interlace.h |  58 -
 libavfilter/tinterlace.h|   5 +-
 libavfilter/vf_interlace.c  | 250 
 libavfilter/vf_tinterlace.c |  44 +++
 libavfilter/x86/Makefile|   2 +-
 libavfilter/x86/vf_interlace_init.c |  47 ---
 7 files changed, 49 insertions(+), 359 deletions(-)
 delete mode 100644 libavfilter/interlace.h
 delete mode 100644 libavfilter/vf_interlace.c
 delete mode 100644 libavfilter/x86/vf_interlace_init.c

diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 2c56e38..36676aa 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -136,7 +136,7 @@ OBJS-$(CONFIG_HQX_FILTER)+= vf_hqx.o
 OBJS-$(CONFIG_HUE_FILTER)+= vf_hue.o
 OBJS-$(CONFIG_IDET_FILTER)   += vf_idet.o
 OBJS-$(CONFIG_IL_FILTER) += vf_il.o
-OBJS-$(CONFIG_INTERLACE_FILTER)  += vf_interlace.o
+OBJS-$(CONFIG_INTERLACE_FILTER)  += vf_tinterlace.o
 OBJS-$(CONFIG_INTERLEAVE_FILTER) += f_interleave.o
 OBJS-$(CONFIG_KERNDEINT_FILTER)  += vf_kerndeint.o
 OBJS-$(CONFIG_LENSCORRECTION_FILTER) += vf_lenscorrection.o
diff --git a/libavfilter/interlace.h b/libavfilter/interlace.h
deleted file mode 100644
index 44f1e06..000
--- a/libavfilter/interlace.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-/**
- * @file
- * progressive to interlaced content filter, inspired by heavy debugging of
- * tinterlace filter.
- */
-
-#ifndef AVFILTER_INTERLACE_H
-#define AVFILTER_INTERLACE_H
-
-#include "libavutil/common.h"
-#include "libavutil/imgutils.h"
-#include "libavutil/opt.h"
-
-#include "avfilter.h"
-#include "formats.h"
-#include "internal.h"
-#include "video.h"
-
-enum ScanMode {
-MODE_TFF = 0,
-MODE_BFF = 1,
-};
-
-enum FieldType {
-FIELD_UPPER = 0,
-FIELD_LOWER = 1,
-};
-
-typedef struct InterlaceContext {
-const AVClass *class;
-enum ScanMode scan;// top or bottom field first scanning
-int lowpass;   // enable or disable low pass filterning
-AVFrame *cur, *next;   // the two frames from which the new one is obtained
-void (*lowpass_line)(uint8_t *dstp, ptrdiff_t linesize, const uint8_t 
*srcp,
- const uint8_t *srcp_above, const uint8_t *srcp_below);
-} InterlaceContext;
-
-void ff_interlace_init_x86(InterlaceContext *interlace);
-
-#endif /* AVFILTER_INTERLACE_H */
diff --git a/libavfilter/tinterlace.h b/libavfilter/tinterlace.h
index fa0a83a..846c426 100644
--- a/libavfilter/tinterlace.h
+++ b/libavfilter/tinterlace.h
@@ -44,12 +44,13 @@ enum TInterlaceMode {
 typedef struct {
 const AVClass *class;
 enum TInterlaceMode mode;   ///< interlace mode selected
+int scan;   ///< top (0) or bottom (1) field first scanning
 AVRational preout_time_base;
 int flags;  ///< flags affecting interlacing algorithm
 int frame;  ///< number of the output frame
 int vsub;   ///< chroma vertical subsampling
-AVFrame *cur;
-AVFrame *next;
+int lowpass;///< enable or disable low pass filterning
+AVFrame *cur, *next;///< the two frames from which the new one is 
obtained
 uint8_t *black_data[4]; ///< buffer used to fill padded lines
 int black_linesize[4];
 void (*lowpass_line)(uint8_t *dstp, ptrdiff_t width, const uint8_t *srcp,
diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c
deleted file mode 100644
index 2828e36..000
--- a/libavfilter/vf_interlace.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 2003 Michael Zucchi 
- * Copyright (c) 2010 Baptiste Coudurier
- * Copyright (c) 2011 Stefano Sabatini
- * Copyright (c) 2013 Vittorio Giovara 
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you ca

Re: [FFmpeg-devel] [PATCH 2/2] lavc/options: fix leaks in avcodec_copy_context

2014-12-02 Thread Lukasz Marek
On 27 November 2014 at 17:56, Lukasz Marek  wrote:

> On 27 November 2014 at 04:17, Michael Niedermayer 
> wrote:
>
>> On Thu, Nov 27, 2014 at 12:43:57AM +0100, Lukasz Marek wrote:
>> > On 24.11.2014 05:16, Lukasz Marek wrote:
>> > >Signed-off-by: Lukasz Marek 
>> > >---
>> > >  libavcodec/options.c | 23 +++
>> > >  1 file changed, 11 insertions(+), 12 deletions(-)
>> > >
>> > >diff --git a/libavcodec/options.c b/libavcodec/options.c
>> > >index 7f9fb07..8ba997c 100644
>> > >--- a/libavcodec/options.c
>> > >+++ b/libavcodec/options.c
>> > >@@ -190,6 +190,11 @@ int avcodec_copy_context(AVCodecContext *dest,
>> const AVCodecContext *src)
>> > >  }
>> > >
>> > >  av_opt_free(dest);
>> > >+av_freep(&dest->rc_override);
>> > >+av_freep(&dest->intra_matrix);
>> > >+av_freep(&dest->inter_matrix);
>> > >+av_freep(&dest->extradata);
>> > >+av_freep(&dest->subtitle_header);
>> > >
>> > >  memcpy(dest, src, sizeof(*dest));
>> > >  av_opt_copy(dest, src);
>> > >@@ -205,13 +210,7 @@ int avcodec_copy_context(AVCodecContext *dest,
>> const AVCodecContext *src)
>> > >  dest->slice_offset= NULL;
>> > >  dest->hwaccel = NULL;
>> > >  dest->internal= NULL;
>> > >-
>> > >-/* reallocate values that should be allocated separately */
>> > >-dest->extradata   = NULL;
>> > >-dest->intra_matrix= NULL;
>> > >-dest->inter_matrix= NULL;
>> > >-dest->rc_override = NULL;
>> > >-dest->subtitle_header = NULL;
>> >
>> >
>> > This should stay. Updated version attched
>> >
>>
>> >  options.c |   16 +++-
>> >  1 file changed, 11 insertions(+), 5 deletions(-)
>> > 971d1769e50d2e853d7359003f8c924092a96e6b
>> 0001-lavc-options-fix-leaks-in-avcodec_copy_context.patch
>> > From 722d7e837093212d6e6e6b17814ed408300d25a6 Mon Sep 17 00:00:00 2001
>> > From: Lukasz Marek 
>> > Date: Thu, 27 Nov 2014 00:41:16 +0100
>> > Subject: [PATCH] lavc/options: fix leaks in avcodec_copy_context
>> >
>> > Signed-off-by: Lukasz Marek 
>> > ---
>> >  libavcodec/options.c | 16 +++-
>> >  1 file changed, 11 insertions(+), 5 deletions(-)
>>
>> breaks "make fate-lavf-yuv4mpeg"
>>
>> --- ./tests/ref/lavf/yuv4mpeg   2014-11-26 20:04:48.466295490 +0100
>> +++ tests/data/fate/lavf-yuv4mpeg   2014-11-27 04:16:07.234916526
>> +0100
>> @@ -1,2 +0,0 @@
>> -ec8178cb152f9cdbfd9cb724d977db2e *./tests/data/lavf/lavf.y4m
>> -3801808 ./tests/data/lavf/lavf.y4m
>> Test lavf-yuv4mpeg failed. Look at tests/data/fate/lavf-yuv4mpeg.err for
>> details.
>> make: *** [fate-lavf-yuv4mpeg] Error 139
>>
>
> This is because ffmpeg copy opened codec context and assumes copy is also
> opened, but this is against docs:
>
> Copy the settings of the source AVCodecContext into the destination
> AVCodecContext. The resulting destination codec context will be
> unopened, i.e. you are required to call avcodec_open2() before you
> can use this AVCodecContext to decode/encode video/audio data.
>
> I will push a patch for ffmpeg later and this patch have to be cleary
> postponed until ffmpeg is fixed.
>

I have sent patch for ffmpeg. It is not failing after that change.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/2] ffmpeg: use avcodec_copy_context before avcodec_open2 and open both ctxs

2014-12-02 Thread Lukasz Marek
avcodec_copy_context make dest context unopened.
ffmpeg treats it as opened.

Signed-off-by: Lukasz Marek 
---
 ffmpeg.c | 29 -
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index b44401f..4fa9f1e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2932,6 +2932,7 @@ static int transcode_init(void)
 if (ost->encoding_needed) {
 AVCodec  *codec = ost->enc;
 AVCodecContext *dec = NULL;
+AVDictionary   *opt_copy = NULL;
 
 if ((ist = get_input_stream(ost)))
 dec = ist->dec_ctx;
@@ -2949,13 +2950,24 @@ static int transcode_init(void)
 av_dict_set(&ost->encoder_opts, "threads", "auto", 0);
 av_dict_set(&ost->encoder_opts, "side_data_only_packets", "1", 0);
 
-if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) 
< 0) {
+ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
+if (ret < 0) {
+av_log(NULL, AV_LOG_FATAL,
+   "Error initializing the output stream codec 
context.\n");
+exit_program(1);
+}
+
+av_dict_copy(&opt_copy, ost->encoder_opts, 0);
+if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) 
< 0 ||
+(ret = avcodec_open2(ost->st->codec, codec, &opt_copy)) < 0) {
+av_dict_free(&opt_copy);
 if (ret == AVERROR_EXPERIMENTAL)
 abort_codec_experimental(codec, 1);
 snprintf(error, sizeof(error), "Error while opening encoder 
for output stream #%d:%d - maybe incorrect parameters such as bit_rate, rate, 
width or height",
 ost->file_index, ost->index);
 goto dump_format;
 }
+av_dict_free(&opt_copy);
 if (ost->enc->type == AVMEDIA_TYPE_AUDIO &&
 !(ost->enc->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE))
 av_buffersink_set_frame_size(ost->filter->filter,
@@ -2971,16 +2983,15 @@ static int transcode_init(void)
 "Error setting up codec context options.\n");
 return ret;
 }
+ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
+if (ret < 0) {
+av_log(NULL, AV_LOG_FATAL,
+   "Error initializing the output stream codec 
context.\n");
+exit_program(1);
+}
+ost->st->codec->codec= ost->enc_ctx->codec;
 }
 
-ret = avcodec_copy_context(ost->st->codec, ost->enc_ctx);
-if (ret < 0) {
-av_log(NULL, AV_LOG_FATAL,
-   "Error initializing the output stream codec context.\n");
-exit_program(1);
-}
-ost->st->codec->codec= ost->enc_ctx->codec;
-
 // copy timebase while removing common factors
 ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0, 
1});
 }
-- 
1.9.1

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


[FFmpeg-devel] [PATCH 1/2] libavcodec/options: print a warning when copying open context

2014-12-02 Thread Lukasz Marek
Context copied from open context cannot be treated as opened.
avcodec_open2 modifies context so reopening it is also questionable.
It is worth to warn when it happens.

Signed-off-by: Lukasz Marek 
---
 libavcodec/options.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 3dd5df3..dab5140 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -182,6 +182,9 @@ int avcodec_copy_context(AVCodecContext *dest, const 
AVCodecContext *src)
 const AVCodec *orig_codec = dest->codec;
 uint8_t *orig_priv_data = dest->priv_data;
 
+if (avcodec_is_open(src))
+av_log(dest, AV_LOG_WARNING, "AVCodecContext is copied from opened 
context.\n");
+
 if (avcodec_is_open(dest)) { // check that the dest context is 
uninitialized
 av_log(dest, AV_LOG_ERROR,
"Tried to copy AVCodecContext %p into already-initialized %p\n",
-- 
1.9.1

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


Re: [FFmpeg-devel] [PATCH 2/2] configure: add a note about pkg-config --static.

2014-12-02 Thread Nicolas George
Le duodi 12 frimaire, an CCXXIII, Michael Niedermayer a écrit :
> should i merge them or should i wait ?
> (iam asking as your reply isnt entirely clear about that)

Sorry about that. Please merge, unless you spot something wrong in the way.

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 2/2] configure: add a note about pkg-config --static.

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 06:50:37PM +0100, Nicolas George wrote:
> Le duodi 12 frimaire, an CCXXIII, Michael Niedermayer a écrit :
> > LGTM
> 
> Thanks, pushed both to my tree with "return 1" and hopefully improved commit
> message for the second.

should i merge them or should i wait ?
(iam asking as your reply isnt entirely clear about that)

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.


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


Re: [FFmpeg-devel] [PATCH] avfilter/vf_tinterlace: Favor using standard timebases for the output

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 05:38:21PM +, Vittorio Giovara wrote:
> On Tue, Dec 2, 2014 at 5:31 PM, Michael Niedermayer  wrote:
> > On Mon, Dec 01, 2014 at 11:01:05PM +0100, Michael Niedermayer wrote:
> >> Reported-by: Vittorio Giovara 
> >> Inspired by discussion with Kieran Kunhya 
> >> Signed-off-by: Michael Niedermayer 
> >> ---
> >>  libavfilter/tinterlace.h|1 +
> >>  libavfilter/vf_tinterlace.c |   25 +++--
> >>  2 files changed, 24 insertions(+), 2 deletions(-)
> >
> > applied
> >
> > please tell me if any issues remain
> 
> maybe you'd better revert the patch on vf_interlace too

done


>
> > About the name, iam not attached to tinterlace if people prefer a
> > name without "interlace" in it.
>
> that would be indeed nice
> --
> Vittorio
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras


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


Re: [FFmpeg-devel] [PATCH 2/2] configure: add a note about pkg-config --static.

2014-12-02 Thread Nicolas George
Le duodi 12 frimaire, an CCXXIII, Michael Niedermayer a écrit :
> LGTM

Thanks, pushed both to my tree with "return 1" and hopefully improved commit
message for the second.

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] avfilter/vf_tinterlace: Favor using standard timebases for the output

2014-12-02 Thread Vittorio Giovara
On Tue, Dec 2, 2014 at 5:31 PM, Michael Niedermayer  wrote:
> On Mon, Dec 01, 2014 at 11:01:05PM +0100, Michael Niedermayer wrote:
>> Reported-by: Vittorio Giovara 
>> Inspired by discussion with Kieran Kunhya 
>> Signed-off-by: Michael Niedermayer 
>> ---
>>  libavfilter/tinterlace.h|1 +
>>  libavfilter/vf_tinterlace.c |   25 +++--
>>  2 files changed, 24 insertions(+), 2 deletions(-)
>
> applied
>
> please tell me if any issues remain

maybe you'd better revert the patch on vf_interlace too

> About the name, iam not attached to tinterlace if people prefer a
> name without "interlace" in it.

that would be indeed nice
-- 
Vittorio
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter/vf_tinterlace: Favor using standard timebases for the output

2014-12-02 Thread Michael Niedermayer
On Mon, Dec 01, 2014 at 11:01:05PM +0100, Michael Niedermayer wrote:
> Reported-by: Vittorio Giovara 
> Inspired by discussion with Kieran Kunhya 
> Signed-off-by: Michael Niedermayer 
> ---
>  libavfilter/tinterlace.h|1 +
>  libavfilter/vf_tinterlace.c |   25 +++--
>  2 files changed, 24 insertions(+), 2 deletions(-)

applied

please tell me if any issues remain
also please tell me if this misses some interlaced framerates, ill
add them or if their number becomes large find a better solution
than a table.

About the name, iam not attached to tinterlace if people prefer a
name without "interlace" in it.

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

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


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


Re: [FFmpeg-devel] [PATCH] avfilter/vf_tinterlace: Favor using standard timebases for the output

2014-12-02 Thread Vittorio Giovara
On Tue, Dec 2, 2014 at 4:02 PM, Michael Niedermayer  wrote:
> If theres a problem in tinterlace as you keep hinting at, could you
> please explain what this problem is or provide a testcase that shows
> the problem?

The problem is that tinterlace does not really interlace, not a single
mode does.
Just because the name of the functionality kinda reminds of
interlacing it makes no sense to keep trying adding the interlace
functionality, especially since you have another interlace filter that
does the right thing.
-- 
Vittorio
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc/filters: Add ascii graphics to clarify what the currently implemented tinterlace modes do

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 05:02:49PM +, tim nicholson wrote:
> On 02/12/14 15:33, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  doc/filters.texi |  131 
> > ++
> >  1 file changed, 131 insertions(+)
> > 
> > diff --git a/doc/filters.texi b/doc/filters.texi
> > index 8c16c7a..0ea3955 100644
> > --- a/doc/filters.texi
> > +++ b/doc/filters.texi
> > @@ -8537,33 +8537,164 @@ Available values are:
> >  @item merge, 0
> >  Move odd frames into the upper field, even into the lower field,
> >  generating a double height frame at half frame rate.
> > +@example
> > + --> time
> > +Input:
> > +Frame 1 Frame 2 Frame 3 Frame 4
> > +
> > +1   2   3   4
> > +1   2   3   4
> > +1   2   3   4
> > +1   2   3   4
> > +
> > +Output:
> > +1   3
> > +2   4
> > +1   3
> > +2   4
> > +1   3
> > +2   4
> > +1   3
> > +2   4
> > [..]
> 
> I find the ascii graphic style of the interlace filter more
> understandable

how do you suggest above (and the other modes) would be documented
in that style ?


[...]

-- 
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 2/2] configure: add a note about pkg-config --static.

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 02:16:56PM +0100, Nicolas George wrote:
> Try to detect "$cc -static" without "pkg-config --static".
> Also always print when a library that was not found was
> detected using pkg-config.
> 
> Signed-off-by: Nicolas George 
> ---
>  configure | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)

LGTM

[...]
-- 
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] doc/filters: Add ascii graphics to clarify what the currently implemented tinterlace modes do

2014-12-02 Thread tim nicholson
On 02/12/14 15:33, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  doc/filters.texi |  131 
> ++
>  1 file changed, 131 insertions(+)
> 
> diff --git a/doc/filters.texi b/doc/filters.texi
> index 8c16c7a..0ea3955 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -8537,33 +8537,164 @@ Available values are:
>  @item merge, 0
>  Move odd frames into the upper field, even into the lower field,
>  generating a double height frame at half frame rate.
> +@example
> + --> time
> +Input:
> +Frame 1 Frame 2 Frame 3 Frame 4
> +
> +1   2   3   4
> +1   2   3   4
> +1   2   3   4
> +1   2   3   4
> +
> +Output:
> +1   3
> +2   4
> +1   3
> +2   4
> +1   3
> +2   4
> +1   3
> +2   4
> [..]

I find the ascii graphic style of the interlace filter more
understandable
-- 
Tim.
Key Fingerprint 38CF DB09 3ED0 F607 8B67 6CED 0C0B FC44 8B0B FC83
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Fix bug for POWER LE: avcodec/ppc/lossless_audiodsp_altivec.c

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 03:55:58PM +0800, rongyan wrote:
> Hi,
> We propose this patch to fix lossless audio bugs for POWER8 little endian.
> The passed test cases change from  2292/2328 to 2296/2328‍.
> 
> 
> 
> ‍‍
> 
> 
> Thanks for your review.
> Rong Yan


>  lossless_audiodsp_altivec.c |   31 +--
>  1 file changed, 21 insertions(+), 10 deletions(-)
> 2add1f80cdc2825cb4833d0906904b9ba8cf9585  
> 0001-avcodec-ppc-lossless_audiodsp_altivec-POWER-LE-suppo.patch
> From 2bc2113802cb55f96001b11cdcf5232eb413b303 Mon Sep 17 00:00:00 2001
> From: Rong Yan 
> Date: Tue, 2 Dec 2014 07:37:11 +
> Subject: [PATCH] avcodec/ppc/lossless_audiodsp_altivec: POWER LE support
>  scalarproduct_and_madd_int16_altivec() add marcos GET_T()

applied

thanks

[...]

-- 
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] fix for decklink_common.cpp

2014-12-02 Thread Carl Eugen Hoyos
Jon bae  gmail.com> writes:

> that means that the patch is at the moment not useful?!

I believe it is very useful!

To get it into the FFmpeg git repository, please:
Split the patch in two (one patch per issue).
Remove the tab.
Fix the indentation.
Do not change av_log() into fprintf().
Do not move opening braces.

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] avfilter/vf_tinterlace: Favor using standard timebases for the output

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 01:55:08PM +, Vittorio Giovara wrote:
> On Mon, Dec 1, 2014 at 9:55 PM, Michael Niedermayer  wrote:
> >
> > I dont think the patch will apply cleanly there, also
> > If correct timestamps are the main reason for vf_interlace, then why
> > was tinterlace not fixed instead of taking a subset of its features
> > and creating a new filter out of that ?
> 
> Because there was not a single mode of tinterlace that actually
> interlaced properly. You could have named it 'vf_funwithlines' and it
> would have been more accurate, while vf_interlace did the right thing
> since the start. Also I like smaller filters that do just one thing
> but they do it right.

ive used tinterlace (from mplayer) myself in the past and it worked
fine. Quite likely these where very different use cases than what you
and kierank use these filters for though.
If theres a problem in tinterlace as you keep hinting at, could you
please explain what this problem is or provide a testcase that shows
the problem?
I would like to fix tinterlace and for that i need to know what does
not work with more detail than just a vague hint that something doesnt
work

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 


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


Re: [FFmpeg-devel] fix for decklink_common.cpp

2014-12-02 Thread Jon bae
Hello Carl,
that means that the patch is at the moment not useful?! This code comes
from the decklink sdk and there was also the  FAILED() defined, I think. I
have the code from here:
http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=10&t=1823&start=10#p7580
and there they say it works.
When is ok for you, I copy your answer to the zeranoe forum, then they can
help me to fix it.

2014-12-02 16:45 GMT+01:00 Carl Eugen Hoyos :

> Jon bae  gmail.com> writes:
>
> > I hope is all right, I never did before a
> > git format-patch...
>
> You used git format-patch perfectly, thank you.
>
> Your patch introduces tabs, they cannot be committed
> to FFmpeg. You can find tabs with "tools/patcheck",
> a script that is part of the source.
>
> Please do not replace av_log() with fprintf().
> Please do not move opening braces, just leave them
> where they are now.
> Please keep the indentation at four spaces.
>
> Assuming that the "free" fix is unrelated to the
> remaining patch, please make it separate.
>
> (I don't know where FAILED() is defined and
> therefore cannot comment on the actual patch and
> if it can be simplified.)
>
> Thank you, Carl Eugen
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] fix for decklink_common.cpp

2014-12-02 Thread Carl Eugen Hoyos
Jon bae  gmail.com> writes:

> I hope is all right, I never did before a 
> git format-patch...

You used git format-patch perfectly, thank you.

Your patch introduces tabs, they cannot be committed 
to FFmpeg. You can find tabs with "tools/patcheck", 
a script that is part of the source.

Please do not replace av_log() with fprintf().
Please do not move opening braces, just leave them 
where they are now.
Please keep the indentation at four spaces.

Assuming that the "free" fix is unrelated to the 
remaining patch, please make it separate.

(I don't know where FAILED() is defined and 
therefore cannot comment on the actual patch and 
if it can be simplified.)

Thank you, Carl Eugen

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


Re: [FFmpeg-devel] [PATCH 3/3] ffserver_config: print warning when using default value

2014-12-02 Thread Reynaldo H. Verdejo Pinochet
OK to push too. Thanks a lot.

Bests,

-- 
Reynaldo H. Verdejo Pinochet
Open Source Group
Samsung Research America / Silicon Valley
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/3] ffserver_config: set defaults basing on absence of set value

2014-12-02 Thread Reynaldo H. Verdejo Pinochet
Looks OK too.

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


[FFmpeg-devel] [PATCH] doc/filters: Add ascii graphics to clarify what the currently implemented tinterlace modes do

2014-12-02 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 doc/filters.texi |  131 ++
 1 file changed, 131 insertions(+)

diff --git a/doc/filters.texi b/doc/filters.texi
index 8c16c7a..0ea3955 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -8537,33 +8537,164 @@ Available values are:
 @item merge, 0
 Move odd frames into the upper field, even into the lower field,
 generating a double height frame at half frame rate.
+@example
+ --> time
+Input:
+Frame 1 Frame 2 Frame 3 Frame 4
+
+1   2   3   4
+1   2   3   4
+1   2   3   4
+1   2   3   4
+
+Output:
+1   3
+2   4
+1   3
+2   4
+1   3
+2   4
+1   3
+2   4
+@end example
 
 @item drop_odd, 1
 Only output even frames, odd frames are dropped, generating a frame with
 unchanged height at half frame rate.
 
+@example
+ --> time
+Input:
+Frame 1 Frame 2 Frame 3 Frame 4
+
+1   2   3   4
+1   2   3   4
+1   2   3   4
+1   2   3   4
+
+Output:
+2   4
+2   4
+2   4
+2   4
+@end example
+
 @item drop_even, 2
 Only output odd frames, even frames are dropped, generating a frame with
 unchanged height at half frame rate.
 
+@example
+ --> time
+Input:
+Frame 1 Frame 2 Frame 3 Frame 4
+
+1   2   3   4
+1   2   3   4
+1   2   3   4
+1   2   3   4
+
+Output:
+1   3
+1   3
+1   3
+1   3
+@end example
+
 @item pad, 3
 Expand each frame to full height, but pad alternate lines with black,
 generating a frame with double height at the same input frame rate.
 
+@example
+ --> time
+Input:
+Frame 1 Frame 2 Frame 3 Frame 4
+
+1   2   3   4
+1   2   3   4
+1   2   3   4
+1   2   3   4
+
+Output:
+1   .   3   .
+.   2   .   4
+1   .   3   .
+.   2   .   4
+1   .   3   .
+.   2   .   4
+1   .   3   .
+.   2   .   4
+@end example
+
+
 @item interleave_top, 4
 Interleave the upper field from odd frames with the lower field from
 even frames, generating a frame with unchanged height at half frame rate.
 
+@example
+ --> time
+Input:
+Frame 1 Frame 2 Frame 3 Frame 4
+
+1<- 2   3<- 4
+1   2<- 3   4<-
+1<- 2   3<- 4
+1   2<- 3   4<-
+
+Output:
+1   3
+2   4
+1   3
+2   4
+@end example
+
+
 @item interleave_bottom, 5
 Interleave the lower field from odd frames with the upper field from
 even frames, generating a frame with unchanged height at half frame rate.
 
+@example
+ --> time
+Input:
+Frame 1 Frame 2 Frame 3 Frame 4
+
+1   2<- 3   4<-
+1<- 2   3<- 4
+1   2<- 3   4<-
+1<- 2   3<- 4
+
+Output:
+2   4
+1   3
+2   4
+1   3
+@end example
+
+
 @item interlacex2, 6
 Double frame rate with unchanged height. Frames are inserted each
 containing the second temporal field from the previous input frame and
 the first temporal field from the next input frame. This mode relies on
 the top_field_first flag. Useful for inter

[FFmpeg-devel] fix for decklink_common.cpp

2014-12-02 Thread Jon bae
Hello everybody,
on the Zeranoe forum we find out that there is two bugs in the
decklink_common.cpp file. I build I patch and want to send them now to you.

I hope is all right, I never did before a git format-patch...

Regards!
Jonathan


fix-device_list-and-COM-initialization-failed_in decklink_common.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/3] ffserver_config: remove useless defaults

2014-12-02 Thread Reynaldo H. Verdejo Pinochet
Looks OK. Feel free to push.

Bests,

-- 
Reynaldo H. Verdejo Pinochet
Open Source Group
Samsung Research America / Silicon Valley
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/apngdec: exit probing when skipping is not possible.

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 11:24:21AM +0100, Benoit Fouet wrote:
> ---
> Found an infinite loop on probing while zzuf'ing.
> ---
>  libavformat/apngdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied

thanks

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

There will always be a question for which you do not know the correct answer.


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


Re: [FFmpeg-devel] [PATCH] ffserver: use avcodec_copy_context to copy context

2014-12-02 Thread Reynaldo H. Verdejo Pinochet
Should be OK. Thanks.

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


Re: [FFmpeg-devel] [PATCH] apng: move shared header from avformat to avcodec.

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 09:21:47AM +0100, Benoit Fouet wrote:
> ---
>  {libavformat => libavcodec}/apng.h | 6 +++---
>  libavcodec/pngdec.c| 2 +-
>  libavformat/apngdec.c  | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
>  rename {libavformat => libavcodec}/apng.h (93%)

applied

thanks

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

The greatest way to live with honor in this world is to be what we pretend
to be. -- 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 2/2] configure: add a note about pkg-config --static.

2014-12-02 Thread tim nicholson
On 02/12/14 13:16, Nicolas George wrote:
> Try to detect "$cc -static" without "pkg-config --static".
> Also always print when a library that was not found was
> detected using pkg-config.

I was slightly confused by what you meant here, but looking at the code
I think you mean that if a library was not found by means of pkg-config,
then say that that was the detecting mechanism in use, rather than just
saying not found.

In which case a helpful improvement, as is the --static test (but I
would say that :( )

> 
> Signed-off-by: Nicolas George 
> ---
>  configure | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index af89e05..587a4e1 100755
> --- a/configure
> +++ b/configure
> @@ -1211,7 +1211,7 @@ use_pkg_config(){
>  }
>  
>  require_pkg_config(){
> -use_pkg_config "$@" || die "ERROR: $pkg not found"
> +use_pkg_config "$@" || die "ERROR: $pkg not found using 
> pkg-config$pkg_config_fail_message"
>  }
>  
>  require_libfreetype(){
> @@ -3070,9 +3070,13 @@ set_default arch cc cxx doxygen pkg_config ranlib 
> strip sysinclude \
>  enabled cross_compile || host_cc_default=$cc
>  set_default host_cc
>  
> +pkg_config_fail_message=""
>  if ! $pkg_config --version >/dev/null 2>&1; then
>  warn "$pkg_config not found, library detection may fail."
>  pkg_config=false
> +elif is_in -static $cc $LDFLAGS && ! is_in --static $pkg_config 
> $pkg_config_flags; then
> +pkg_config_fail_message="
> +Note: When building a static binary, add --pkg-config-flags=\"--static\"."
>  fi
>  
>  if test $doxygen != $doxygen_default && \
> 


-- 
Tim.
Key Fingerprint 38CF DB09 3ED0 F607 8B67 6CED 0C0B FC44 8B0B FC83
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] libavcodec/pngdec: support 'previous' dispose operation for APNG.

2014-12-02 Thread Benoit Fouet

Le 02/12/2014 15:21, Michael Niedermayer a écrit :

On Tue, Dec 02, 2014 at 08:44:02AM +0100, Benoit Fouet wrote:

Hi,

On December 1, 2014 11:34:44 PM GMT+01:00, Michael Niedermayer 
 wrote:

On Mon, Dec 01, 2014 at 11:41:41AM +0100, Benoit Fouet wrote:

---
Tested against all the materials I have at hand.
There is an artifact showing for

https://raw.githubusercontent.com/maxcom/lorsource/master/src/test/resources/images/i_want_to_be_a_hero__apng_animated__by_tamalesyatole-d5ht8eu.png

which I don't really understand, as it seems the individual frames

are correct

for our decoder, but the disposal that's done for other decoders

(tested

firefox and chrome) is not the same for the end of the cape.
---
  libavcodec/pngdec.c | 93

-

  1 file changed, 71 insertions(+), 22 deletions(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 9e52d0b..2ca3dee 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -23,6 +23,7 @@
  
  #include "libavutil/bprint.h"

  #include "libavutil/imgutils.h"
+#include "libavutil/thread.h"
  #include "avcodec.h"
  #include "bytestream.h"
  #include "internal.h"
@@ -38,9 +39,16 @@ typedef struct PNGDecContext {
  AVCodecContext *avctx;
  
  GetByteContext gb;

+ThreadFrame previous_picture;
  ThreadFrame last_picture;
  ThreadFrame picture;
  
+#if CONFIG_APNG_DECODER

+AVMutex mutex;
+int frame_id;
+int *pframe_id;
+#endif

why do you need a mutex ?


Actually, the only thing I need is the frame index. The best place for that 
would be in the demuxer, but I didn't find a place where this information is 
accessible. Did I miss something (I hope so)? Do you think I should be using 
side data for this?
To answer the question though, the access is done is all the decoder threads, 
so I did not want the reset to happen between the reading and the writing of 
the ++.
Thinking more about this, I think it's wrong anyway. I really need the demuxer 
to handle this, it would be simpler and more correct...

iam not sure i understand
considering a single threaded decoder it cannot change anything
for a past or future iteration (because these dont exist anymore or
yet) but only its own state now with a multi threaded decoder it gets
a copy of the previous
decoders state and changes its own state only, nothing else should
change its state so there should be no need for a mutex.


The (flawed) solution I used was to have in each context a pointer to 
the frame index of the first allocated one...



the thread for the next frame would not start before the current
is done with its basic setup of stuff like the frame index

the frame index for each frame is a copy of the last + 1


I'll try this simple approach. I just didn't quite look at how the 
threads were handled, but it seems that just incrementing the frame 
index unconditionnaly would be enough for my use case.



i assume theres enough information in the bitstream for the decoder
to know when to reset the index


yes


  and seeking if ts supported would
call avcodec_flush_buffers()

but quite possibly iam missing something


Doesn't seem so. That was me, just as I suspected...

--
Ben

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


Re: [FFmpeg-devel] [RFC]Print the GUID also as shown in the Windows Registry

2014-12-02 Thread Carl Eugen Hoyos
Michael Niedermayer  gmx.at> writes:

> > Attached patch produces an output for GUIDs that is more similar 
> > to the relevant documentations.

> should be ok

The patch was merged.

Thank you, Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] libavcodec/pngdec: support 'previous' dispose operation for APNG.

2014-12-02 Thread Michael Niedermayer
On Tue, Dec 02, 2014 at 08:44:02AM +0100, Benoit Fouet wrote:
> Hi,
> 
> On December 1, 2014 11:34:44 PM GMT+01:00, Michael Niedermayer 
>  wrote:
> >On Mon, Dec 01, 2014 at 11:41:41AM +0100, Benoit Fouet wrote:
> >> ---
> >> Tested against all the materials I have at hand.
> >> There is an artifact showing for
> >https://raw.githubusercontent.com/maxcom/lorsource/master/src/test/resources/images/i_want_to_be_a_hero__apng_animated__by_tamalesyatole-d5ht8eu.png
> >> which I don't really understand, as it seems the individual frames
> >are correct
> >> for our decoder, but the disposal that's done for other decoders
> >(tested
> >> firefox and chrome) is not the same for the end of the cape.
> >> ---
> >>  libavcodec/pngdec.c | 93
> >-
> >>  1 file changed, 71 insertions(+), 22 deletions(-)
> >> 
> >> diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
> >> index 9e52d0b..2ca3dee 100644
> >> --- a/libavcodec/pngdec.c
> >> +++ b/libavcodec/pngdec.c
> >> @@ -23,6 +23,7 @@
> >>  
> >>  #include "libavutil/bprint.h"
> >>  #include "libavutil/imgutils.h"
> >> +#include "libavutil/thread.h"
> >>  #include "avcodec.h"
> >>  #include "bytestream.h"
> >>  #include "internal.h"
> >> @@ -38,9 +39,16 @@ typedef struct PNGDecContext {
> >>  AVCodecContext *avctx;
> >>  
> >>  GetByteContext gb;
> >> +ThreadFrame previous_picture;
> >>  ThreadFrame last_picture;
> >>  ThreadFrame picture;
> >>  
> >> +#if CONFIG_APNG_DECODER
> >> +AVMutex mutex;
> >> +int frame_id;
> >> +int *pframe_id;
> >> +#endif
> >
> >why do you need a mutex ?
> >
> 
> Actually, the only thing I need is the frame index. The best place for that 
> would be in the demuxer, but I didn't find a place where this information is 
> accessible. Did I miss something (I hope so)? Do you think I should be using 
> side data for this?
> To answer the question though, the access is done is all the decoder threads, 
> so I did not want the reset to happen between the reading and the writing of 
> the ++.
> Thinking more about this, I think it's wrong anyway. I really need the 
> demuxer to handle this, it would be simpler and more correct...

iam not sure i understand
considering a single threaded decoder it cannot change anything
for a past or future iteration (because these dont exist anymore or
yet) but only its own state now with a multi threaded decoder it gets
a copy of the previous
decoders state and changes its own state only, nothing else should
change its state so there should be no need for a mutex.
the thread for the next frame would not start before the current
is done with its basic setup of stuff like the frame index

the frame index for each frame is a copy of the last + 1
i assume theres enough information in the bitstream for the decoder
to know when to reset the index and seeking if ts supported would
call avcodec_flush_buffers()

but quite possibly iam missing something

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

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides


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


Re: [FFmpeg-devel] [PATCH] avfilter/vf_tinterlace: Favor using standard timebases for the output

2014-12-02 Thread Vittorio Giovara
On Mon, Dec 1, 2014 at 9:55 PM, Michael Niedermayer  wrote:
>
> I dont think the patch will apply cleanly there, also
> If correct timestamps are the main reason for vf_interlace, then why
> was tinterlace not fixed instead of taking a subset of its features
> and creating a new filter out of that ?

Because there was not a single mode of tinterlace that actually
interlaced properly. You could have named it 'vf_funwithlines' and it
would have been more accurate, while vf_interlace did the right thing
since the start. Also I like smaller filters that do just one thing
but they do it right.

It'd be nice that fixes were propagated to both regardless of their
source anyway.

>> This effectively limits interlacing to two framerates. What about pure
>> 30i?
>
> added

Ok this effectively limits interlacing to three framerates. I am quite
sure there are other weird framerates that are not listed and are
valid interlaced formats unfortunately.

>> What about some future (or past) framerate we didn't think of?
>> Listing all possible framerate combinations is simply not
>> maintainable.
>
> i very much hope that the number of interlaced frame rates will be
> finite, small and not growing.
> In case that turns out not to materialize that way some other
> heuristic can be used instead of a table.

I very much hope people will stop using interlacing ^^

>> If you reeally want interlaced vfr why don't just add a filter
>> option like "keep_timebase" or something? Imho, it would be enough to
>> revert the broken patches.
>
> i can revert it for vf_interlace if you like?

As you prefer.

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


[FFmpeg-devel] [PATCH] pngdsp x86: use scalar loop for unaligned dest buffers.

2014-12-02 Thread Benoit Fouet
Fixes ticket #4148

Signed-off-by: Christophe Gisquet 
Signed-off-by: Benoit Fouet 
---
Add TODO
Update function prototype documentation
Mention ticket 4148
---
 libavcodec/pngdsp.h   | 2 ++
 libavcodec/x86/pngdsp.asm | 7 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavcodec/pngdsp.h b/libavcodec/pngdsp.h
index 1475b0c..24d5b7d 100644
--- a/libavcodec/pngdsp.h
+++ b/libavcodec/pngdsp.h
@@ -25,6 +25,8 @@
 #include 
 
 typedef struct PNGDSPContext {
+/* src1 must be 16-aligned, dst and src2 must have the same alignment.
+ * If the latter are not 16-aligned, a scalar version will be used. */
 void (*add_bytes_l2)(uint8_t *dst  /* align 16 */,
  uint8_t *src1 /* align 16 */,
  uint8_t *src2 /* align 16 */, int w);
diff --git a/libavcodec/x86/pngdsp.asm b/libavcodec/x86/pngdsp.asm
index 8e23ccf..078c73f 100644
--- a/libavcodec/x86/pngdsp.asm
+++ b/libavcodec/x86/pngdsp.asm
@@ -36,9 +36,14 @@ cglobal add_bytes_l2, 4, 6, %1, dst, src1, src2, wa, w, i
 movsxd waq, wad
 %endif
 xor iq, iq
+mov wq, waq
+
+; test unaligned dst buffer
+; TODO have an optimized unaligned version
+test dstq, (mmsize-1)
+jnz .end_s
 
 ; vector loop
-mov wq, waq
 andwaq, ~(mmsize*2-1)
 jmp .end_v
 .loop_v:
-- 
2.2.0

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


Re: [FFmpeg-devel] [PATCH 1/2] configure: add optional pkg-config helper and use it.

2014-12-02 Thread Benoit Fouet
Hi,

- Mail original -
> The require variant dies if the package is not present.
> The check variant does not import the flags to the used list.
> The new variant imports the flags if the package is present
> but does not die if it is not.
> The new call graph is: require -> use -> check.
> 
> Use use_pkg_config for libx264 and libsmbclient: more readable
> and three external call less per library.
> 
> Signed-off-by: Nicolas George 
> ---
>  configure | 16 +---
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/configure b/configure
> index d4a86c0..af89e05 100755
> --- a/configure
> +++ b/configure
> @@ -1203,13 +1203,17 @@ require_cpp(){
>  check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name
>  not found"
>  }
>  
> -require_pkg_config(){
> +use_pkg_config(){
>  pkg="$1"
> -check_pkg_config "$@" || die "ERROR: $pkg not found"
> +check_pkg_config "$@" || return
> 

IMHO, it would be clearer to have "return 1" here.

LGTM otherwise.

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


Re: [FFmpeg-devel] [PATCH] pngdsp x86: use scalar loop for unaligned dest buffers.

2014-12-02 Thread Benoit Fouet
Hi,

- Mail original -
> Benoit Fouet  free.fr> writes:
> 
> [...]
> 
> Please mention ticket #4148 (if it is related).
> 

It is, just forgot about it.
Also, I should be changing the libavcodec/pngdsp.h to no more mention the 
alignment constraints (or at least document that, for now, unaligned works, but 
slower).

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


[FFmpeg-devel] [PATCH 1/2] configure: add optional pkg-config helper and use it.

2014-12-02 Thread Nicolas George
The require variant dies if the package is not present.
The check variant does not import the flags to the used list.
The new variant imports the flags if the package is present
but does not die if it is not.
The new call graph is: require -> use -> check.

Use use_pkg_config for libx264 and libsmbclient: more readable
and three external call less per library.

Signed-off-by: Nicolas George 
---
 configure | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index d4a86c0..af89e05 100755
--- a/configure
+++ b/configure
@@ -1203,13 +1203,17 @@ require_cpp(){
 check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found"
 }
 
-require_pkg_config(){
+use_pkg_config(){
 pkg="$1"
-check_pkg_config "$@" || die "ERROR: $pkg not found"
+check_pkg_config "$@" || return
 add_cflags$(get_safe ${pkg}_cflags)
 add_extralibs $(get_safe ${pkg}_libs)
 }
 
+require_pkg_config(){
+use_pkg_config "$@" || die "ERROR: $pkg not found"
+}
+
 require_libfreetype(){
 log require_libfreetype "$@"
 pkg="freetype2"
@@ -4875,9 +4879,8 @@ enabled libquvi   && require_pkg_config libquvi 
quvi/quvi.h quvi_init
 enabled librtmp   && require_pkg_config librtmp librtmp/rtmp.h 
RTMP_Socket
 enabled libschroedinger   && require_pkg_config schroedinger-1.0 
schroedinger/schro.h schro_init
 enabled libshine  && require_pkg_config shine shine/layer3.h 
shine_encode_buffer
-enabled libsmbclient  && { { check_pkg_config smbclient libsmbclient.h 
smbc_init &&
- require_pkg_config smbclient libsmbclient.h 
smbc_init; } ||
- require smbclient libsmbclient.h smbc_init 
-lsmbclient; }
+enabled libsmbclient  && { check_pkg_config smbclient libsmbclient.h 
smbc_init ||
+   require smbclient libsmbclient.h smbc_init 
-lsmbclient; }
 enabled libsoxr   && require libsoxr soxr.h soxr_create -lsoxr
 enabled libssh&& require_pkg_config libssh libssh/sftp.h sftp_init
 enabled libspeex  && require_pkg_config speex speex/speex.h 
speex_decoder_init -lspeex
@@ -4903,8 +4906,7 @@ enabled libvpx&& {
 enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" 
"vpx_codec_vp9_cx VP9E_SET_AQ_MODE" -lvpx || disable libvpx_vp9_encoder; } }
 enabled libwavpack&& require libwavpack wavpack/wavpack.h 
WavpackOpenFileOutput  -lwavpack
 enabled libwebp   && require_pkg_config "libwebp >= 0.2.0" 
webp/encode.h WebPGetEncoderVersion
-enabled libx264   && { { check_pkg_config x264 "stdint.h x264.h" 
x264_encoder_encode &&
- require_pkg_config x264 "stdint.h x264.h" 
x264_encoder_encode; } ||
+enabled libx264   && { use_pkg_config x264 "stdint.h x264.h" 
x264_encoder_encode ||
{ require libx264 x264.h x264_encoder_encode 
-lx264 &&
  warn "using libx264 without pkg-config"; } } 
&&
  { check_cpp_condition x264.h "X264_BUILD >= 118" 
||
-- 
2.1.3

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


[FFmpeg-devel] [PATCH 2/2] configure: add a note about pkg-config --static.

2014-12-02 Thread Nicolas George
Try to detect "$cc -static" without "pkg-config --static".
Also always print when a library that was not found was
detected using pkg-config.

Signed-off-by: Nicolas George 
---
 configure | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index af89e05..587a4e1 100755
--- a/configure
+++ b/configure
@@ -1211,7 +1211,7 @@ use_pkg_config(){
 }
 
 require_pkg_config(){
-use_pkg_config "$@" || die "ERROR: $pkg not found"
+use_pkg_config "$@" || die "ERROR: $pkg not found using 
pkg-config$pkg_config_fail_message"
 }
 
 require_libfreetype(){
@@ -3070,9 +3070,13 @@ set_default arch cc cxx doxygen pkg_config ranlib strip 
sysinclude \
 enabled cross_compile || host_cc_default=$cc
 set_default host_cc
 
+pkg_config_fail_message=""
 if ! $pkg_config --version >/dev/null 2>&1; then
 warn "$pkg_config not found, library detection may fail."
 pkg_config=false
+elif is_in -static $cc $LDFLAGS && ! is_in --static $pkg_config 
$pkg_config_flags; then
+pkg_config_fail_message="
+Note: When building a static binary, add --pkg-config-flags=\"--static\"."
 fi
 
 if test $doxygen != $doxygen_default && \
-- 
2.1.3

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


Re: [FFmpeg-devel] [PATCH] pngdsp x86: use scalar loop for unaligned dest buffers.

2014-12-02 Thread Benoit Fouet
Hi,

- Mail original -
> Hi,
> 
> 2014-12-02 13:51 GMT+01:00 Benoit Fouet :
> > Signed-off-by: Christophe Gisquet 
> > Signed-off-by: Benoit Fouet 
> 
> While I suggested that the change be written like this, I didn't
> think
> long about that specific code, and overall, I really don't think this
> change is what should be applied. Though you probably tested that it
> allows correct decoding.
> 

It indeed allows decoding without crashing, which is IMHO a minimum.

> I'm for writing a SIMD unaligned loop, the question being whether it
> should be the only path. SSE4 version of add_hfyu_left_pred for
> instance has 3 paths for various alignments.
> 

I understood that, though, as stated, I'm not able to do that, this is why I 
sent this one instead, just to have something working in the tree.
I can add a TODO or something like that instead, would that be OK?

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


Re: [FFmpeg-devel] [PATCH] pngdsp x86: use scalar loop for unaligned dest buffers.

2014-12-02 Thread Christophe Gisquet
Hi,

2014-12-02 13:51 GMT+01:00 Benoit Fouet :
> Signed-off-by: Christophe Gisquet 
> Signed-off-by: Benoit Fouet 

While I suggested that the change be written like this, I didn't think
long about that specific code, and overall, I really don't think this
change is what should be applied. Though you probably tested that it
allows correct decoding.

I'm for writing a SIMD unaligned loop, the question being whether it
should be the only path. SSE4 version of add_hfyu_left_pred for
instance has 3 paths for various alignments.

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


Re: [FFmpeg-devel] [PATCH] pngdsp x86: use scalar loop for unaligned dest buffers.

2014-12-02 Thread Carl Eugen Hoyos
Benoit Fouet  free.fr> writes:

[...]

Please mention ticket #4148 (if it is related).

Thank you, Carl Eugen

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


[FFmpeg-devel] [PATCH] pngdsp x86: use scalar loop for unaligned dest buffers.

2014-12-02 Thread Benoit Fouet
Signed-off-by: Christophe Gisquet 
Signed-off-by: Benoit Fouet 
---
 libavcodec/x86/pngdsp.asm | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/x86/pngdsp.asm b/libavcodec/x86/pngdsp.asm
index 8e23ccf..76b93a9 100644
--- a/libavcodec/x86/pngdsp.asm
+++ b/libavcodec/x86/pngdsp.asm
@@ -36,9 +36,13 @@ cglobal add_bytes_l2, 4, 6, %1, dst, src1, src2, wa, w, i
 movsxd waq, wad
 %endif
 xor iq, iq
+mov wq, waq
+
+; test unaligned dst buffer
+test dstq, (mmsize-1)
+jnz .end_s
 
 ; vector loop
-mov wq, waq
 andwaq, ~(mmsize*2-1)
 jmp .end_v
 .loop_v:
-- 
2.2.0

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


Re: [FFmpeg-devel] [PATCH 1/3] ffserver_config: remove useless defaults

2014-12-02 Thread Lukasz Marek
On 27 November 2014 at 00:49, Lukasz Marek  wrote:

> Options are already set to its defaults by AVOption API.
> The only difference is for qmin, new default is 2, ffserver set to 3.
> It is dead code because if condition is not meet unless user set option to
> 0.
> Meeting condition would mean that ffserver overwrites explicity set option.
>
> Signed-off-by: Lukasz Marek 
> ---
>  ffserver_config.c | 45 -
>  1 file changed, 45 deletions(-)
>
> diff --git a/ffserver_config.c b/ffserver_config.c
> index 5538aa4..8283188 100644
> --- a/ffserver_config.c
> +++ b/ffserver_config.c
>

Ping on patchset. I would like it to be merged before new release.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] PSMF audio support, trac ticket #3233

2014-12-02 Thread Maxim Polijakowski

+#include "libavformat/oma.h"

libavformat can use things from libavcodec but
libavcodec cannot use things from libavformat as it doesnt depend on
it, libavcodec can be used alone without libavformat
so some things may need to be moved to libavcodec in a seperate patch
before this

The four oma tables could be moved to the header, or their prefix changed to 
avpriv_.
They are small enough that the former is probably a better option, though.


Moving these tables to the header will probably cause multiply 
definition. They are currently declared in oma.h but their content is 
defined in oma.c...

I'll try to move them to atrac3plus.h/atrac3plus.c...

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


Re: [FFmpeg-devel] [PATCH] PSMF audio support, trac ticket #3233

2014-12-02 Thread Maxim Polijakowski



+avctx->sample_rate= ctx->sample_rate;
+avctx->block_align= ctx->frame_size;
+avctx->bit_rate   = ctx->sample_rate * ctx->frame_size * 8 / 2048;
+avctx->channels   = ff_oma_chid_to_num_channels[ctx->channel_id - 
1];
+avctx->channel_layout = ff_oma_chid_to_native_layout[ctx->channel_id - 
1];

if you set these from the parser instead of the decoder then you
must be a bit careful as the decoder can run in a seperate thread as
the parser so the parser cannot change anything midstream it could
only set the parameters once before the decoder can start
(that is when the parameters where not set before)


Ok, I see. The problem is that ATRAC3+ streams will be added dynamically 
in the demuxer. Stream parameters like frame_size or sample_rate seem to 
be sent along with packets. I don't know whether they are available in 
headers or not.


For the case I won't find any stream configuration before dealing with 
packets, what's the right way to supply stream parameters to the decoder?
The whole parser thingy seems to be poorly documented so I don't know 
where to proceed...


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


[FFmpeg-devel] [PATCH] avformat/apngdec: exit probing when skipping is not possible.

2014-12-02 Thread Benoit Fouet
---
Found an infinite loop on probing while zzuf'ing.
---
 libavformat/apngdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index 189480e..d97b015 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -87,7 +87,7 @@ static int apng_probe(AVProbeData *p)
 /* we don't check IDAT size, as this is the last tag
  * we check, and it may be larger than the probe buffer */
 if (tag != MKTAG('I', 'D', 'A', 'T') &&
-len > bytestream2_get_bytes_left(&gb))
+len + 4 > bytestream2_get_bytes_left(&gb))
 return 0;
 
 switch (tag) {
-- 
2.2.0

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


Re: [FFmpeg-devel] [PATCH] avfilter/vf_tinterlace: Favor using standard timebases for the output

2014-12-02 Thread tim nicholson
On 01/12/14 22:32, Kieran Kunhya wrote:
> Sent from my mobile device
> [...]
> 
> I would strongly advise all users of these filters generate their own
> timestamps.

Which would require much better documentation of such usage.
(e.g. the only references to the use of genpts inn ffmpeg docs are in
passing on the trac wiki)

> [...]

-- 
Tim.
Key Fingerprint 38CF DB09 3ED0 F607 8B67 6CED 0C0B FC44 8B0B FC83
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] apng: move shared header from avformat to avcodec.

2014-12-02 Thread Benoit Fouet
---
 {libavformat => libavcodec}/apng.h | 6 +++---
 libavcodec/pngdec.c| 2 +-
 libavformat/apngdec.c  | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
 rename {libavformat => libavcodec}/apng.h (93%)

diff --git a/libavformat/apng.h b/libavcodec/apng.h
similarity index 93%
rename from libavformat/apng.h
rename to libavcodec/apng.h
index 2abf011..41249e0 100644
--- a/libavformat/apng.h
+++ b/libavcodec/apng.h
@@ -24,8 +24,8 @@
  * APNG common header
  */
 
-#ifndef AVFORMAT_APNG_H
-#define AVFORMAT_APNG_H
+#ifndef AVCODEC_APNG_H
+#define AVCODEC_APNG_H
 
 enum {
APNG_DISPOSE_OP_NONE   = 0,
@@ -38,4 +38,4 @@ enum {
 APNG_BLEND_OP_OVER   = 1,
 };
 
-#endif /* AVFORMAT_APNG_H */
+#endif /* AVCODEC_APNG_H */
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 9e52d0b..229a6d6 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -26,10 +26,10 @@
 #include "avcodec.h"
 #include "bytestream.h"
 #include "internal.h"
+#include "apng.h"
 #include "png.h"
 #include "pngdsp.h"
 #include "thread.h"
-#include "libavformat/apng.h"
 
 #include 
 
diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index 276d765..189480e 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -26,13 +26,13 @@
  * @see http://www.w3.org/TR/PNG
  */
 
-#include "apng.h"
 #include "avformat.h"
 #include "avio_internal.h"
 #include "internal.h"
 #include "libavutil/imgutils.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/opt.h"
+#include "libavcodec/apng.h"
 #include "libavcodec/png.h"
 #include "libavcodec/bytestream.h"
 
-- 
2.2.0

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