Re: [FFmpeg-devel] [PATCH] configure: Check for SecItemImport for securetransport as well

2015-05-31 Thread Michael Niedermayer
On Sat, May 30, 2015 at 10:05:32PM -0500, Rodger Combs wrote:
> This fixes the default build on iOS; eventually I should come up with
> a better solution for that platform.
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied

thanks

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

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato


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


Re: [FFmpeg-devel] [PATCH] tests: add some ASS/SSA/MKS remux and transcode tests

2015-05-31 Thread Clément Bœsch
On Mon, May 25, 2015 at 05:56:11PM +0200, Michael Niedermayer wrote:
> On Mon, May 25, 2015 at 02:33:49PM +0200, Clément Bœsch wrote:
> > ---
> > 
> > http://b.pkh.me/1ededcbd7b.ass
> > http://b.pkh.me/a9-misc.ssa
> 
> samples uploaded
> 
> patch should be ok in 24h
> 

Applied, thanks

It Would be nice to have some mk[vs] remux/transcode with weird extradata
and dialogues now...

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH] avformat/concatdec: Check that the opened file contains a stream.

2015-05-31 Thread Nicolas George
Le duodi 12 prairial, an CCXXIII, Michael Niedermayer a écrit :
> Fixes segfault from ticket 4350

Not ok. concat should work with files with no streams, especially if streams
can be discovered later.

The bug you are trying to fix is in mxfdec.c:

static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
{
...
/* OPAtom - clip wrapped demuxing */
/* NOTE: mxf_read_header() makes sure nb_index_tables > 0 for OPAtom */
st = s->streams[0];
t = &mxf->index_tables[0];

I do not know the MXF format. If MXF files without streams are not possible,
then the correct fix is to add a check at the end of mxf_read_header().

You can reproduce the segfault without concat, just:

zsh: segmentation fault  ./ffprobe_g -show_packets /tmp/0001V004.MXF

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] avformat/concatdec: Check that the opened file contains a stream.

2015-05-31 Thread Michael Niedermayer
On Sun, May 31, 2015 at 12:35:37PM +0200, Nicolas George wrote:
> Le duodi 12 prairial, an CCXXIII, Michael Niedermayer a écrit :
> > Fixes segfault from ticket 4350
> 
> Not ok. concat should work with files with no streams, especially if streams
> can be discovered later.

iam not sure that this would ever happen if there are no streams after
av_find_stream_info() but granted it could in principle.
patch withdrawn

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato


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


[FFmpeg-devel] [PATCH] avformat/mxfdec: return error instead of segfaulting if there are no streams

2015-05-31 Thread Michael Niedermayer
Fixes segfault from ticket 4350

Signed-off-by: Michael Niedermayer 
---
 libavformat/mxfdec.c |4 
 1 file changed, 4 insertions(+)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index c8f1c61..78e2393 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2995,6 +2995,10 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket 
*pkt)
 if (mxf->op != OPAtom)
 return mxf_read_packet_old(s, pkt);
 
+// If we have no streams then we basically are at EOF
+if (s->nb_streams < 1)
+return AVERROR_EOF;
+
 /* OPAtom - clip wrapped demuxing */
 /* NOTE: mxf_read_header() makes sure nb_index_tables > 0 for OPAtom */
 st = s->streams[0];
-- 
1.7.9.5

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


Re: [FFmpeg-devel] Test case for Closed caption decoder.

2015-05-31 Thread Clément Bœsch
On Tue, May 05, 2015 at 08:37:03PM +0530, Anshul wrote:
> 
> 
> On 05/05/2015 08:33 PM, Anshul wrote:
> >
> >
> >On 05/04/2015 08:50 PM, Michael Niedermayer wrote:
> >>
> >>this is 31mb, that does not seem reasonable for a subtitle test,
> >>please provide a smaller file, like one without unused/untested
> >>video streams or a shorter one
> >>
> >>also fate fails with the patch applied
> >>probably line endings arent preserved somewhere, probably best to
> >>push to github and post a link
> >>
> >>
> >I have created pull request here.
> >https://github.com/FFmpeg/FFmpeg/pull/136
> >
> >and here is shorter file then previous one.
> >http://gsocdev.ccextractor.org/~anshul/test_video/Closedcaption_atsc_rollup.ts
> >
> >-Anshul
> 
> Apology: Forgot to attach new patch for short File.
> 
> -Anshul
> 

> From 052f5c9e805f20450f33ed64c5043b862c70abd0 Mon Sep 17 00:00:00 2001
> From: Anshul Maheshwari 
> Date: Tue, 5 May 2015 20:20:09 +0530
> Subject: [PATCH] Adding Fate test for ClosedCaption
> 
> Signed-off-by: Anshul Maheshwari 
> ---
>  tests/fate/subtitles.mak |  3 +++
>  tests/ref/fate/sub-cc| 16 
>  2 files changed, 19 insertions(+)
>  create mode 100644 tests/ref/fate/sub-cc
> 
> diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak
> index 07d886a..dddf33d 100644
> --- a/tests/fate/subtitles.mak
> +++ b/tests/fate/subtitles.mak
> @@ -1,6 +1,9 @@
>  FATE_SUBTITLES_ASS-$(call ALLYES, AQTITLE_DEMUXER TEXT_DECODER ICONV) += 
> fate-sub-aqtitle
>  fate-sub-aqtitle: CMD = fmtstdout ass -sub_charenc windows-1250 -i 
> $(TARGET_SAMPLES)/sub/AQTitle_capability_tester.aqt
>  
> +FATE_SUBTITLES_ASS-$(call ALLYES, CCAPTION_DECODER MOVIE_FILTER 
> MPEGTS_DEMUXER) += fate-sub-cc
> +fate-sub-cc: CMD = fmtstdout ass -f lavfi -i 
> "movie=$(TARGET_SAMPLES)/sub/Closedcaption_atsc_rollup.ts[out0+subcc]"
> +
>  FATE_SUBTITLES_ASS-$(call DEMDEC, JACOSUB, JACOSUB) += fate-sub-jacosub
>  fate-sub-jacosub: CMD = fmtstdout ass -i 
> $(TARGET_SAMPLES)/sub/JACOsub_capability_tester.jss
>  
> diff --git a/tests/ref/fate/sub-cc b/tests/ref/fate/sub-cc
> new file mode 100644
> index 000..02d207e
> --- /dev/null
> +++ b/tests/ref/fate/sub-cc
> @@ -0,0 +1,16 @@
> +[Script Info]
> +; Script generated by FFmpeg/Lavc
> +ScriptType: v4.00+
> +PlayResX: 384
> +PlayResY: 288
> +
> +[V4+ Styles]
> +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
> ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, 
> MarginR, MarginV, Encoding
> +Style: 
> Default,Arial,16,&Hff,&Hff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> +
> +[Events]
> +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, 
> Text
> +Dialogue: 0,0:00:00.83,0:00:02.34,Default,,0,0,0,,( explosion )
> +Dialogue: 0,0:00:02.34,0:00:04.47,Default,,0,0,0,,( explosion )\N( inaudible 
> radio chatter )
> +Dialogue: 0,0:00:04.47,0:00:05.84,Default,,0,0,0,,( inaudible radio chatter 
> )\N>> Safety remains our number one
> +Dialogue: 0,0:00:05.84,0:00:07.31,Default,,0,0,0,,>> Safety remains our 
> number one\Npriority.

So what's the state of this patch and the sample? Can it be applied?

-- 
Clément B.


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


Re: [FFmpeg-devel] Test case for Closed caption decoder.

2015-05-31 Thread Michael Niedermayer
On Sun, May 31, 2015 at 01:59:44PM +0200, Clément Bœsch wrote:
> On Tue, May 05, 2015 at 08:37:03PM +0530, Anshul wrote:
> > 
> > 
> > On 05/05/2015 08:33 PM, Anshul wrote:
> > >
> > >
> > >On 05/04/2015 08:50 PM, Michael Niedermayer wrote:
> > >>
> > >>this is 31mb, that does not seem reasonable for a subtitle test,
> > >>please provide a smaller file, like one without unused/untested
> > >>video streams or a shorter one
> > >>
> > >>also fate fails with the patch applied
> > >>probably line endings arent preserved somewhere, probably best to
> > >>push to github and post a link
> > >>
> > >>
> > >I have created pull request here.
> > >https://github.com/FFmpeg/FFmpeg/pull/136
> > >
> > >and here is shorter file then previous one.
> > >http://gsocdev.ccextractor.org/~anshul/test_video/Closedcaption_atsc_rollup.ts
> > >
> > >-Anshul
> > 
> > Apology: Forgot to attach new patch for short File.
> > 
> > -Anshul
> > 
> 
> > From 052f5c9e805f20450f33ed64c5043b862c70abd0 Mon Sep 17 00:00:00 2001
> > From: Anshul Maheshwari 
> > Date: Tue, 5 May 2015 20:20:09 +0530
> > Subject: [PATCH] Adding Fate test for ClosedCaption
> > 
> > Signed-off-by: Anshul Maheshwari 
> > ---
> >  tests/fate/subtitles.mak |  3 +++
> >  tests/ref/fate/sub-cc| 16 
> >  2 files changed, 19 insertions(+)
> >  create mode 100644 tests/ref/fate/sub-cc
> > 
> > diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak
> > index 07d886a..dddf33d 100644
> > --- a/tests/fate/subtitles.mak
> > +++ b/tests/fate/subtitles.mak
> > @@ -1,6 +1,9 @@
> >  FATE_SUBTITLES_ASS-$(call ALLYES, AQTITLE_DEMUXER TEXT_DECODER ICONV) += 
> > fate-sub-aqtitle
> >  fate-sub-aqtitle: CMD = fmtstdout ass -sub_charenc windows-1250 -i 
> > $(TARGET_SAMPLES)/sub/AQTitle_capability_tester.aqt
> >  
> > +FATE_SUBTITLES_ASS-$(call ALLYES, CCAPTION_DECODER MOVIE_FILTER 
> > MPEGTS_DEMUXER) += fate-sub-cc
> > +fate-sub-cc: CMD = fmtstdout ass -f lavfi -i 
> > "movie=$(TARGET_SAMPLES)/sub/Closedcaption_atsc_rollup.ts[out0+subcc]"
> > +
> >  FATE_SUBTITLES_ASS-$(call DEMDEC, JACOSUB, JACOSUB) += fate-sub-jacosub
> >  fate-sub-jacosub: CMD = fmtstdout ass -i 
> > $(TARGET_SAMPLES)/sub/JACOsub_capability_tester.jss
> >  
> > diff --git a/tests/ref/fate/sub-cc b/tests/ref/fate/sub-cc
> > new file mode 100644
> > index 000..02d207e
> > --- /dev/null
> > +++ b/tests/ref/fate/sub-cc
> > @@ -0,0 +1,16 @@
> > +[Script Info]
> > +; Script generated by FFmpeg/Lavc
> > +ScriptType: v4.00+
> > +PlayResX: 384
> > +PlayResY: 288
> > +
> > +[V4+ Styles]
> > +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, 
> > OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, 
> > ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, 
> > MarginR, MarginV, Encoding
> > +Style: 
> > Default,Arial,16,&Hff,&Hff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> > +
> > +[Events]
> > +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, 
> > Text
> > +Dialogue: 0,0:00:00.83,0:00:02.34,Default,,0,0,0,,( explosion )
> > +Dialogue: 0,0:00:02.34,0:00:04.47,Default,,0,0,0,,( explosion )\N( 
> > inaudible radio chatter )
> > +Dialogue: 0,0:00:04.47,0:00:05.84,Default,,0,0,0,,( inaudible radio 
> > chatter )\N>> Safety remains our number one
> > +Dialogue: 0,0:00:05.84,0:00:07.31,Default,,0,0,0,,>> Safety remains our 
> > number one\Npriority.
> 
> So what's the state of this patch and the sample? Can it be applied?

state is: waiting for a sample to be provided to me so i can upload it


[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire


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


Re: [FFmpeg-devel] Off topic question about format specifiers in the C stdlib

2015-05-31 Thread Marcus Johnson
No, I'm writing my own codec from the ground up; not an implementation of
one that already exists based on a standardized codec like jpeg, but my own
from scratch.

I noticed that printf and scanf support format specifiers, so I was
wondering if there was a function like getopt, but specifically for input
and output, but I guess not.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] * mpegts demuxer should recognize private streams

2015-05-31 Thread Wolfgang Lorenz
Am Sat, 30 May 2015 12:58:38 +0200
schrieb Hendrik Leppkes :

> On Sat, May 30, 2015 at 12:39 PM, Wolfgang Lorenz  wrote:
> > Am Sat, 30 May 2015 11:00:18 +0200
> > schrieb Wolfgang Lorenz :
> >
> > [...]
> >
> > Okay. Now I get the same errors Michael had, after the first version of
> > the patch, but with the second version:
> >
> > Test aac-latm_1180bc60 failed. Look at 
> > tests/data/fate/aac-latm_1180bc60.err for details.
> > make: *** [fate-aac-latm_1180bc60] Error 1
> > make: *** Waiting for unfinished jobs
> > Test aac-latm_stereo_to_51 failed. Look at 
> > tests/data/fate/aac-latm_stereo_to_51.err for details.
> > make: *** [fate-aac-latm_stereo_to_51] Error 1

Okay, that was due to some old library versions, that were still
lingering in my LD_LIBRARY_PATH.

Now, also acodec-s302m fails.

> You should check out the .err files it mentions and actually see what
> its complaining about.

That didn't help much. There doesn't seem to be much information
available, but as I understand it s302m is some kind of codec defined
by SMPTE, that writes PCM data into a private stream of an MPEG-TS.

Without the patch the stream is identified as an AVMEDIA_UNKNOWN and
AV_CODEC_NONE by mpegts.c. Later the missing codec leads to probing the
stream for a codec id. The type is set to AVMEDIA_AUDIO and the codec
id is set accordingly. All is well.

With the patch the stream is identified as AVMEDIA_DATA and
AV_CODEC_ID_BIN_DATA. In this case ffmpeg doesn't find any audio data
to transcode and the fate test fails.

This may be too bold, but I think the acodec-s302m test is broken. I
think, that trying to decode private data is a bad idea. There's no way
to see whether the chosen coder is the correct one. In my case FFMPEG
thought AAC might be a good choice to decode random data.

I'm not sure, what can be done about this, though. Just applying the
patch, since the standard says so, might break other people's code.
Maybe it is possible to implement a function, that changes the codec
of a stream after probing for one that works. This could then be used
by someone who knows what to expect in a private stream. Also, this
would break other people's code. A third idea is to add a flag to each
stream, that states whether FFPEG should still probe the stream, even if
it is defined as a data stream. If this flag is set to true by default,
this would not break other people's code. I've been trying to implement
something like this for the last couple of hours, but it just doesn't
work. :-( Well, I just don't know the internals of FFMPEG well enough.

I guess the best I can do now, is to open a bug report describing my
problem. What do you think?

Greetings,
  Wolfgang

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


Re: [FFmpeg-devel] [PATCH 1/3] avformat/libquvi: fix error handling

2015-05-31 Thread Michael Niedermayer
On Wed, Apr 08, 2015 at 07:16:36PM +0200, Gilles Chanteperdrix wrote:
> avoid calling cleanup functions on uninitialized variables
> 
> Signed-off-by: Gilles Chanteperdrix 
> ---
>  libavformat/libquvi.c | 41 +
>  1 file changed, 25 insertions(+), 16 deletions(-)

applied

sorry for the delay

thanks

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

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu


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


[FFmpeg-devel] [PATCH 2/2] x86: check for AV_CPU_FLAG_AVXSLOW where useful

2015-05-31 Thread James Almer
Signed-off-by: James Almer 
---
I will not touch the AVX2 functions until i get the confimation that AMD's
Excavator has the same issue as its predecesors.

 libavcodec/x86/dcadsp_init.c   | 4 ++--
 libavcodec/x86/dct_init.c  | 2 +-
 libavcodec/x86/fft_init.c  | 2 +-
 libavcodec/x86/vp9dsp_init.c   | 6 --
 libavfilter/x86/af_volume_init.c   | 2 +-
 libavutil/x86/float_dsp_init.c | 4 ++--
 libavutil/x86/lls_init.c   | 2 +-
 libswresample/x86/audio_convert_init.c | 4 +++-
 libswresample/x86/rematrix_init.c  | 2 +-
 libswresample/x86/resample_init.c  | 4 ++--
 10 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/libavcodec/x86/dcadsp_init.c b/libavcodec/x86/dcadsp_init.c
index bb86c26..1a19f6b 100644
--- a/libavcodec/x86/dcadsp_init.c
+++ b/libavcodec/x86/dcadsp_init.c
@@ -103,10 +103,10 @@ av_cold void ff_synth_filter_init_x86(SynthFilterContext 
*s)
 if (EXTERNAL_SSE2(cpu_flags)) {
 s->synth_filter_float = synth_filter_sse2;
 }
-if (EXTERNAL_AVX(cpu_flags)) {
+if (EXTERNAL_AVX_FAST(cpu_flags)) {
 s->synth_filter_float = synth_filter_avx;
 }
-if (EXTERNAL_FMA3(cpu_flags)) {
+if (EXTERNAL_FMA3(cpu_flags) && !(cpu_flags & AV_CPU_FLAG_AVXSLOW)) {
 s->synth_filter_float = synth_filter_fma3;
 }
 #endif /* HAVE_YASM */
diff --git a/libavcodec/x86/dct_init.c b/libavcodec/x86/dct_init.c
index 30c8f12..daf2bb4 100644
--- a/libavcodec/x86/dct_init.c
+++ b/libavcodec/x86/dct_init.c
@@ -34,6 +34,6 @@ av_cold void ff_dct_init_x86(DCTContext *s)
 s->dct32 = ff_dct32_float_sse;
 if (EXTERNAL_SSE2(cpu_flags))
 s->dct32 = ff_dct32_float_sse2;
-if (EXTERNAL_AVX(cpu_flags))
+if (EXTERNAL_AVX_FAST(cpu_flags))
 s->dct32 = ff_dct32_float_avx;
 }
diff --git a/libavcodec/x86/fft_init.c b/libavcodec/x86/fft_init.c
index 5682230..5085f11 100644
--- a/libavcodec/x86/fft_init.c
+++ b/libavcodec/x86/fft_init.c
@@ -48,7 +48,7 @@ av_cold void ff_fft_init_x86(FFTContext *s)
 s->fft_calc= ff_fft_calc_sse;
 s->fft_permutation = FF_FFT_PERM_SWAP_LSBS;
 }
-if (EXTERNAL_AVX(cpu_flags) && s->nbits >= 5) {
+if (EXTERNAL_AVX_FAST(cpu_flags) && s->nbits >= 5) {
 /* AVX for SB */
 s->imdct_half  = ff_imdct_half_avx;
 s->fft_calc= ff_fft_calc_avx;
diff --git a/libavcodec/x86/vp9dsp_init.c b/libavcodec/x86/vp9dsp_init.c
index 979bd93..00e7125 100644
--- a/libavcodec/x86/vp9dsp_init.c
+++ b/libavcodec/x86/vp9dsp_init.c
@@ -483,12 +483,14 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int 
bpp)
 dsp->itxfm_add[TX_32X32][ADST_DCT] =
 dsp->itxfm_add[TX_32X32][DCT_ADST] =
 dsp->itxfm_add[TX_32X32][DCT_DCT] = ff_vp9_idct_idct_32x32_add_avx;
-init_fpel(1, 0, 32, put, avx);
-init_fpel(0, 0, 64, put, avx);
 init_lpf(avx);
 init_dir_tm_h_ipred(8, avx);
 init_dir_tm_h_ipred(16, avx);
 init_dir_tm_h_ipred(32, avx);
+}
+if (EXTERNAL_AVX_FAST(cpu_flags)) {
+init_fpel(1, 0, 32, put, avx);
+init_fpel(0, 0, 64, put, avx);
 init_ipred(32, avx, v, VERT);
 }
 
diff --git a/libavfilter/x86/af_volume_init.c b/libavfilter/x86/af_volume_init.c
index 57c7eab..88f5a96 100644
--- a/libavfilter/x86/af_volume_init.c
+++ b/libavfilter/x86/af_volume_init.c
@@ -52,7 +52,7 @@ av_cold void ff_volume_init_x86(VolumeContext *vol)
 vol->scale_samples = ff_scale_samples_s32_ssse3_atom;
 vol->samples_align = 4;
 }
-if (EXTERNAL_AVX(cpu_flags)) {
+if (EXTERNAL_AVX_FAST(cpu_flags)) {
 vol->scale_samples = ff_scale_samples_s32_avx;
 vol->samples_align = 8;
 }
diff --git a/libavutil/x86/float_dsp_init.c b/libavutil/x86/float_dsp_init.c
index 64b3a4d..f211f23 100644
--- a/libavutil/x86/float_dsp_init.c
+++ b/libavutil/x86/float_dsp_init.c
@@ -85,14 +85,14 @@ av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
 if (EXTERNAL_SSE2(cpu_flags)) {
 fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_sse2;
 }
-if (EXTERNAL_AVX(cpu_flags)) {
+if (EXTERNAL_AVX_FAST(cpu_flags)) {
 fdsp->vector_fmul = ff_vector_fmul_avx;
 fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx;
 fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_avx;
 fdsp->vector_fmul_add= ff_vector_fmul_add_avx;
 fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_avx;
 }
-if (EXTERNAL_FMA3(cpu_flags)) {
+if (EXTERNAL_FMA3(cpu_flags) && !(cpu_flags & AV_CPU_FLAG_AVXSLOW)) {
 fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_fma3;
 fdsp->vector_fmul_add= ff_vector_fmul_add_fma3;
 }
diff --git a/libavutil/x86/lls_init.c b/libavutil/x86/lls_init.c
index f531904..81f141c 100644
--- a/libavutil/x86/lls_init.c
+++ b/libavutil/x86/lls_init.c
@@ -35,7 +35,7 @@ av_cold void ff_init_lls_x86(LLSModel *m)
  

[FFmpeg-devel] [PATCH 1/2] x86/cpu: add helper macros to check for slow cpuflags

2015-05-31 Thread James Almer
Signed-off-by: James Almer 
---
 libavutil/cpu_internal.h | 12 
 libavutil/x86/cpu.h  | 18 ++
 2 files changed, 30 insertions(+)

diff --git a/libavutil/cpu_internal.h b/libavutil/cpu_internal.h
index 3c6ce6d..8df832a 100644
--- a/libavutil/cpu_internal.h
+++ b/libavutil/cpu_internal.h
@@ -24,8 +24,20 @@
 #define CPUEXT_SUFFIX(flags, suffix, cpuext)\
 (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext))
 
+#define CPUEXT_SUFFIX_FAST(flags, suffix, cpuext)   \
+(HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext) && \
+ !((flags) & AV_CPU_FLAG_ ## cpuext ## SLOW))
+
+#define CPUEXT_SUFFIX_SLOW(flags, suffix, cpuext)   \
+(HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext) && \
+ ((flags) & AV_CPU_FLAG_ ## cpuext ## SLOW))
+
 #define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext)
 
+#define CPUEXT_FAST(flags, cpuext) CPUEXT_SUFFIX_FAST(flags, , cpuext)
+
+#define CPUEXT_SLOW(flags, cpuext) CPUEXT_SUFFIX_SLOW(flags, , cpuext)
+
 int ff_get_cpu_flags_aarch64(void);
 int ff_get_cpu_flags_arm(void);
 int ff_get_cpu_flags_ppc(void);
diff --git a/libavutil/x86/cpu.h b/libavutil/x86/cpu.h
index bc64b1b..1cea419 100644
--- a/libavutil/x86/cpu.h
+++ b/libavutil/x86/cpu.h
@@ -32,11 +32,17 @@
 #define X86_MMXEXT(flags)   CPUEXT(flags, MMXEXT)
 #define X86_SSE(flags)  CPUEXT(flags, SSE)
 #define X86_SSE2(flags) CPUEXT(flags, SSE2)
+#define X86_SSE2_FAST(flags)CPUEXT_FAST(flags, SSE2)
+#define X86_SSE2_SLOW(flags)CPUEXT_SLOW(flags, SSE2)
 #define X86_SSE3(flags) CPUEXT(flags, SSE3)
+#define X86_SSE3_FAST(flags)CPUEXT_FAST(flags, SSE3)
+#define X86_SSE3_SLOW(flags)CPUEXT_SLOW(flags, SSE3)
 #define X86_SSSE3(flags)CPUEXT(flags, SSSE3)
 #define X86_SSE4(flags) CPUEXT(flags, SSE4)
 #define X86_SSE42(flags)CPUEXT(flags, SSE42)
 #define X86_AVX(flags)  CPUEXT(flags, AVX)
+#define X86_AVX_FAST(flags) CPUEXT_FAST(flags, AVX)
+#define X86_AVX_SLOW(flags) CPUEXT_SLOW(flags, AVX)
 #define X86_XOP(flags)  CPUEXT(flags, XOP)
 #define X86_FMA3(flags) CPUEXT(flags, FMA3)
 #define X86_FMA4(flags) CPUEXT(flags, FMA4)
@@ -48,11 +54,17 @@
 #define EXTERNAL_MMXEXT(flags)  CPUEXT_SUFFIX(flags, _EXTERNAL, MMXEXT)
 #define EXTERNAL_SSE(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE)
 #define EXTERNAL_SSE2(flags)CPUEXT_SUFFIX(flags, _EXTERNAL, SSE2)
+#define EXTERNAL_SSE2_FAST(flags)   CPUEXT_SUFFIX_FAST(flags, _EXTERNAL, SSE2)
+#define EXTERNAL_SSE2_SLOW(flags)   CPUEXT_SUFFIX_SLOW(flags, _EXTERNAL, SSE2)
 #define EXTERNAL_SSE3(flags)CPUEXT_SUFFIX(flags, _EXTERNAL, SSE3)
+#define EXTERNAL_SSE3_FAST(flags)   CPUEXT_SUFFIX_FAST(flags, _EXTERNAL, SSE3)
+#define EXTERNAL_SSE3_SLOW(flags)   CPUEXT_SUFFIX_SLOW(flags, _EXTERNAL, SSE3)
 #define EXTERNAL_SSSE3(flags)   CPUEXT_SUFFIX(flags, _EXTERNAL, SSSE3)
 #define EXTERNAL_SSE4(flags)CPUEXT_SUFFIX(flags, _EXTERNAL, SSE4)
 #define EXTERNAL_SSE42(flags)   CPUEXT_SUFFIX(flags, _EXTERNAL, SSE42)
 #define EXTERNAL_AVX(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AVX)
+#define EXTERNAL_AVX_FAST(flags)CPUEXT_SUFFIX_FAST(flags, _EXTERNAL, AVX)
+#define EXTERNAL_AVX_SLOW(flags)CPUEXT_SUFFIX_SLOW(flags, _EXTERNAL, AVX)
 #define EXTERNAL_XOP(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, XOP)
 #define EXTERNAL_FMA3(flags)CPUEXT_SUFFIX(flags, _EXTERNAL, FMA3)
 #define EXTERNAL_FMA4(flags)CPUEXT_SUFFIX(flags, _EXTERNAL, FMA4)
@@ -64,11 +76,17 @@
 #define INLINE_MMXEXT(flags)CPUEXT_SUFFIX(flags, _INLINE, MMXEXT)
 #define INLINE_SSE(flags)   CPUEXT_SUFFIX(flags, _INLINE, SSE)
 #define INLINE_SSE2(flags)  CPUEXT_SUFFIX(flags, _INLINE, SSE2)
+#define INLINE_SSE2_FAST(flags) CPUEXT_SUFFIX_FAST(flags, _INLINE, SSE2)
+#define INLINE_SSE2_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _INLINE, SSE2)
 #define INLINE_SSE3(flags)  CPUEXT_SUFFIX(flags, _INLINE, SSE3)
+#define INLINE_SSE3_FAST(flags) CPUEXT_SUFFIX_FAST(flags, _INLINE, SSE3)
+#define INLINE_SSE3_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _INLINE, SSE3)
 #define INLINE_SSSE3(flags) CPUEXT_SUFFIX(flags, _INLINE, SSSE3)
 #define INLINE_SSE4(flags)  CPUEXT_SUFFIX(flags, _INLINE, SSE4)
 #define INLINE_SSE42(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE42)
 #define INLINE_AVX(flags)   CPUEXT_SUFFIX(flags, _INLINE, AVX)
+#define INLINE_AVX_FAST(flags)  CPUEXT_SUFFIX_FAST(flags, _INLINE, AVX)
+#define INLINE_AVX_SLOW(flags)  CPUEXT_SUFFIX_SLOW(flags, _INLINE, AVX)
 #define INLINE_XOP(flags)   CPUEXT_SUFFIX(flags, _INLINE, XOP)
 #define INLINE_FMA3(flags)  CPUEXT_SUFFIX(flags, _INLINE, FMA3)
 #define INLINE_FMA4(flags)  CPUEXT_SUFFIX(flags, _INLINE, FMA4)
-- 
2.4.1

_

Re: [FFmpeg-devel] [PATCH 1/2] x86/cpu: add helper macros to check for slow cpuflags

2015-05-31 Thread Michael Niedermayer
On Sun, May 31, 2015 at 02:20:28PM -0300, James Almer wrote:
> Signed-off-by: James Almer 
> ---
>  libavutil/cpu_internal.h | 12 
>  libavutil/x86/cpu.h  | 18 ++
>  2 files changed, 30 insertions(+)

merged a variant of this, didnt see the patch before

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

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin


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] x86: check for AV_CPU_FLAG_AVXSLOW where useful

2015-05-31 Thread Michael Niedermayer
On Sun, May 31, 2015 at 02:20:29PM -0300, James Almer wrote:
> Signed-off-by: James Almer 
> ---
> I will not touch the AVX2 functions until i get the confimation that AMD's
> Excavator has the same issue as its predecesors.

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


Re: [FFmpeg-devel] [libav-devel] [PATCH] libopenjpegdec: check existence of image component data

2015-05-31 Thread Andreas Cadhalpun
On 31.05.2015 11:11, Luca Barbato wrote:
> On 30/05/15 20:00, Andreas Cadhalpun wrote:
>> +memset(&ctx->event_mgr, 0, sizeof(opj_event_mgr_t));
> 
> usually the size is sizeof(*actualpoint)

Yes that's better, patch updated.
I just copied this from libopenjpegenc.c, so it should be fixed
there too. Additional patch for that attached.

>> +ctx->event_mgr.info_handler= info_callback;
>> +ctx->event_mgr.error_handler   = error_callback;
>> +ctx->event_mgr.warning_handler = warning_callback;
>> +opj_set_event_mgr((opj_common_ptr) dec, &ctx->event_mgr, avctx);
> 
> The rest seems fine, not sure info_callback should be DEBUG or VERBOSE,
> I'll go with your pick if nobody has other opinions.

I just picked what was used by the encoder.

Best regards,
Andreas

>From 79490bdcae3ac44c0383136064f3e267d98c5ec9 Mon Sep 17 00:00:00 2001
From: Andreas Cadhalpun 
Date: Sat, 30 May 2015 19:40:22 +0200
Subject: [PATCH 1/2] libopenjpegdec: register logging callback functions

Signed-off-by: Andreas Cadhalpun 
---
 libavcodec/libopenjpegdec.c | 22 +-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index ab681f1..8fe7a50 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -83,9 +83,25 @@ static const enum AVPixelFormat libopenjpeg_all_pix_fmts[]  = {
 typedef struct LibOpenJPEGContext {
 AVClass *class;
 opj_dparameters_t dec_params;
+opj_event_mgr_t event_mgr;
 int lowqual;
 } LibOpenJPEGContext;
 
+static void error_callback(const char *msg, void *data)
+{
+av_log(data, AV_LOG_ERROR, "%s", msg);
+}
+
+static void warning_callback(const char *msg, void *data)
+{
+av_log(data, AV_LOG_WARNING, "%s", msg);
+}
+
+static void info_callback(const char *msg, void *data)
+{
+av_log(data, AV_LOG_DEBUG, "%s", msg);
+}
+
 static inline int libopenjpeg_matches_pix_fmt(const opj_image_t *image, enum AVPixelFormat pix_fmt)
 {
 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
@@ -286,7 +302,11 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
 av_log(avctx, AV_LOG_ERROR, "Error initializing decoder.\n");
 return AVERROR_UNKNOWN;
 }
-opj_set_event_mgr((opj_common_ptr) dec, NULL, NULL);
+memset(&ctx->event_mgr, 0, sizeof(ctx->event_mgr));
+ctx->event_mgr.info_handler= info_callback;
+ctx->event_mgr.error_handler   = error_callback;
+ctx->event_mgr.warning_handler = warning_callback;
+opj_set_event_mgr((opj_common_ptr) dec, &ctx->event_mgr, avctx);
 ctx->dec_params.cp_limit_decoding = LIMIT_TO_MAIN_HEADER;
 ctx->dec_params.cp_layer  = ctx->lowqual;
 // Tie decoder with decoding parameters
-- 
2.1.4

>From 822f2eb3e4c47eed74f4ede5fa52a1112d5cb506 Mon Sep 17 00:00:00 2001
From: Andreas Cadhalpun 
Date: Mon, 1 Jun 2015 00:16:29 +0200
Subject: [PATCH 2/2] libopenjpegenc: use variable instead of type for sizeof

Signed-off-by: Andreas Cadhalpun 
---
 libavcodec/libopenjpegenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index 95b0987..9758f31 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -571,7 +571,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 return AVERROR(ENOMEM);
 }
 
-memset(&ctx->event_mgr, 0, sizeof(opj_event_mgr_t));
+memset(&ctx->event_mgr, 0, sizeof(ctx->event_mgr));
 ctx->event_mgr.info_handler= info_callback;
 ctx->event_mgr.error_handler   = error_callback;
 ctx->event_mgr.warning_handler = warning_callback;
-- 
2.1.4

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


[FFmpeg-devel] [PATCH] libopenjpegenc: add NULL check for img before accessing it

2015-05-31 Thread Andreas Cadhalpun
If opj_image_create fails to allocate an image it returns NULL, which
causes a segmentation fault at 'img->x0 = 0'.

Signed-off-by: Andreas Cadhalpun 
---
 libavcodec/libopenjpegenc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index 95b0987..6c77527 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -200,6 +200,9 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, 
opj_cparameters_t *p
 
 img = opj_image_create(numcomps, cmptparm, color_space);
 
+if (!img)
+return NULL;
+
 // x0, y0 is the top left corner of the image
 // x1, y1 is the width, height of the reference grid
 img->x0 = 0;
-- 
2.1.4
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avcodec: loongson3 optimized h264chroma put and avg with mmi

2015-05-31 Thread 周晓勇
>From 671813a26715d9d2c1b0ef9da9e4da458b709e50 Mon Sep 17 00:00:00 2001
From: ZhouXiaoyong 
Date: Fri, 17 Apr 2015 17:09:06 +0800
Subject: [PATCH] avcodec: loongson3 optimized h264chroma put and avg with mmi


Signed-off-by: ZhouXiaoyong 
---
 libavcodec/h264chroma.c|   2 +
 libavcodec/h264chroma.h|   1 +
 libavcodec/mips/Makefile   |   2 +
 libavcodec/mips/h264chroma_init_mips.c |  42 +++
 libavcodec/mips/h264chroma_mips.h  |  35 ++
 libavcodec/mips/h264chroma_mmi.c   | 582 +
 6 files changed, 664 insertions(+)


diff --git a/libavcodec/h264chroma.c b/libavcodec/h264chroma.c
index 5b3e13b..c2f1f30 100644
--- a/libavcodec/h264chroma.c
+++ b/libavcodec/h264chroma.c
@@ -54,4 +54,6 @@ av_cold void ff_h264chroma_init(H264ChromaContext *c, int 
bit_depth)
 ff_h264chroma_init_ppc(c, bit_depth);
 if (ARCH_X86)
 ff_h264chroma_init_x86(c, bit_depth);
+if (ARCH_MIPS)
+ff_h264chroma_init_mips(c, bit_depth);
 }
diff --git a/libavcodec/h264chroma.h b/libavcodec/h264chroma.h
index d4b8a0e..e0f45ad 100644
--- a/libavcodec/h264chroma.h
+++ b/libavcodec/h264chroma.h
@@ -34,5 +34,6 @@ void ff_h264chroma_init_aarch64(H264ChromaContext *c, int 
bit_depth);
 void ff_h264chroma_init_arm(H264ChromaContext *c, int bit_depth);
 void ff_h264chroma_init_ppc(H264ChromaContext *c, int bit_depth);
 void ff_h264chroma_init_x86(H264ChromaContext *c, int bit_depth);
+void ff_h264chroma_init_mips(H264ChromaContext *c, int bit_depth);
 
 #endif /* AVCODEC_H264CHROMA_H */
diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index 9786175..a460f10 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -20,7 +20,9 @@ MIPSDSPR1-OBJS-$(CONFIG_AAC_ENCODER)  += 
mips/aaccoder_mips.o
 MIPSFPU-OBJS-$(CONFIG_AAC_ENCODER)+= mips/iirfilter_mips.o
 OBJS-$(CONFIG_HEVC_DECODER)   += mips/hevcdsp_init_mips.o
 OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_init_mips.o
+OBJS-$(CONFIG_H264CHROMA) += mips/h264chroma_init_mips.o
 MSA-OBJS-$(CONFIG_HEVC_DECODER)   += mips/hevcdsp_msa.o\
  mips/hevc_mc_uni_msa.o
 MSA-OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_msa.o
 LOONGSON3-OBJS-$(CONFIG_H264DSP)  += mips/h264dsp_mmi.o
+LOONGSON3-OBJS-$(CONFIG_H264CHROMA)   += mips/h264chroma_mmi.o
diff --git a/libavcodec/mips/h264chroma_init_mips.c 
b/libavcodec/mips/h264chroma_init_mips.c
new file mode 100644
index 000..588cc8a
--- /dev/null
+++ b/libavcodec/mips/h264chroma_init_mips.c
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2015 Zhou Xiaoyong 
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "h264chroma_mips.h"
+
+#if HAVE_LOONGSON3
+static av_cold void h264chroma_init_mmi(H264ChromaContext *c, int bit_depth)
+{
+int high_bit_depth = bit_depth > 8;
+
+if (!high_bit_depth) {
+c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_mmi;
+c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_mmi;
+c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_mmi;
+c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_mmi;
+}
+}
+#endif /* HAVE_LOONGSON3 */
+
+av_cold void ff_h264chroma_init_mips(H264ChromaContext *c, int bit_depth
+{
+#if HAVE_LOONGSON3
+h264chroma_init_mmi(c, bit_depth);
+#endif /* HAVE_LOONGSON3 */
+}
diff --git a/libavcodec/mips/h264chroma_mips.h 
b/libavcodec/mips/h264chroma_mips.h
new file mode 100644
index 000..314e8a3
--- /dev/null
+++ b/libavcodec/mips/h264chroma_mips.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2015 Zhou Xiaoyong 
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You sho

[FFmpeg-devel] [PATCH] nvenc: remove cuda.h requirement for nvenc_a

2015-05-31 Thread James Almer
Untested.

Signed-off-by: James Almer 
---
 configure | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 748b626..f691655 100755
--- a/configure
+++ b/configure
@@ -1672,6 +1672,7 @@ HEADERS_LIST="
 asm_types_h
 cdio_paranoia_h
 cdio_paranoia_paranoia_h
+cuda_h
 dev_bktr_ioctl_bt848_h
 dev_bktr_ioctl_meteor_h
 dev_ic_bt8xx_h
@@ -2196,13 +2197,13 @@ h263p_decoder_select="h263_decoder"
 h263p_encoder_select="h263_encoder"
 h264_decoder_select="cabac golomb h264chroma h264dsp h264pred h264qpel 
startcode videodsp"
 h264_decoder_suggest="error_resilience"
-h264_nvenc_encoder_deps="nvenc"
+h264_nvenc_encoder_deps="nvenc cuda_h"
 h264_qsv_decoder_deps="libmfx"
 h264_qsv_decoder_select="h264_mp4toannexb_bsf h264_parser qsvdec 
h264_qsv_hwaccel"
 h264_qsv_encoder_deps="libmfx"
 h264_qsv_encoder_select="qsvenc"
 hevc_decoder_select="bswapdsp cabac golomb videodsp"
-hevc_nvenc_encoder_deps="nvenc"
+hevc_nvenc_encoder_deps="nvenc cuda_h"
 huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp"
 huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llviddsp"
 iac_decoder_select="imc_decoder"
@@ -4994,6 +4995,7 @@ check_func_headers glob.h glob
 enabled xlib &&
 check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute 
-lXv -lX11 -lXext
 
+check_header cuda.h
 check_header direct.h
 check_header dlfcn.h
 check_header d3d11.h
@@ -5216,7 +5218,6 @@ if enabled libdc1394; then
 fi
 
 if enabled nvenc; then
-check_header cuda.h || die "ERROR: cuda.h not found.";
 check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found.";
 check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" ||
 die "ERROR: NVENC API version 4 or older is not supported";
-- 
2.4.1

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


Re: [FFmpeg-devel] [PATCH] nvenc: remove cuda.h requirement for nvenc_a

2015-05-31 Thread Philip Langdale
On Mon,  1 Jun 2015 00:53:54 -0300
James Almer  wrote:

> Untested.
> 
> Signed-off-by: James Almer 
> ---
>  configure | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/configure b/configure
> index 748b626..f691655 100755
> --- a/configure
> +++ b/configure
> @@ -1672,6 +1672,7 @@ HEADERS_LIST="
>  asm_types_h
>  cdio_paranoia_h
>  cdio_paranoia_paranoia_h
> +cuda_h
>  dev_bktr_ioctl_bt848_h
>  dev_bktr_ioctl_meteor_h
>  dev_ic_bt8xx_h
> @@ -2196,13 +2197,13 @@ h263p_decoder_select="h263_decoder"
>  h263p_encoder_select="h263_encoder"
>  h264_decoder_select="cabac golomb h264chroma h264dsp h264pred
> h264qpel startcode videodsp" h264_decoder_suggest="error_resilience"
> -h264_nvenc_encoder_deps="nvenc"
> +h264_nvenc_encoder_deps="nvenc cuda_h"
>  h264_qsv_decoder_deps="libmfx"
>  h264_qsv_decoder_select="h264_mp4toannexb_bsf h264_parser qsvdec
> h264_qsv_hwaccel" h264_qsv_encoder_deps="libmfx"
>  h264_qsv_encoder_select="qsvenc"
>  hevc_decoder_select="bswapdsp cabac golomb videodsp"
> -hevc_nvenc_encoder_deps="nvenc"
> +hevc_nvenc_encoder_deps="nvenc cuda_h"
>  huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp"
>  huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llviddsp"
>  iac_decoder_select="imc_decoder"
> @@ -4994,6 +4995,7 @@ check_func_headers glob.h glob
>  enabled xlib &&
>  check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h"
> XvGetPortAttribute -lXv -lX11 -lXext 
> +check_header cuda.h
>  check_header direct.h
>  check_header dlfcn.h
>  check_header d3d11.h
> @@ -5216,7 +5218,6 @@ if enabled libdc1394; then
>  fi
>  
>  if enabled nvenc; then
> -check_header cuda.h || die "ERROR: cuda.h not found.";
>  check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not
> found."; check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >=
> 5" || die "ERROR: NVENC API version 4 or older is not supported";

Works for me with the commented out parts of the Makefile properly
uncommented.

Thanks,

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


Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: Correct klv_fill_key

2015-05-31 Thread tim nicholson
On 29/05/15 23:26, Michael Niedermayer wrote:
> See SMPTE 377-1-2009 6.3.3 KLV Fill Items
> 
> Signed-off-by: Michael Niedermayer 
> ---
>  libavformat/mxfenc.c|2 +-
>  tests/ref/lavf/mxf  |6 +++---
>  tests/ref/lavf/mxf_d10  |2 +-
>  tests/ref/lavf/mxf_opatom   |2 +-
>  tests/ref/lavf/mxf_opatom_audio |2 +-
>  5 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> index 63471e6..e0ae14e 100644
> --- a/libavformat/mxfenc.c
> +++ b/libavformat/mxfenc.c
> @@ -334,7 +334,7 @@ static const uint8_t index_table_segment_key[] = { 
> 0x06,0x0E,0x2B,0x34,0x02,
>  static const uint8_t random_index_pack_key[]   = { 
> 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x11,0x01,0x00
>  };
>  static const uint8_t header_open_partition_key[]   = { 
> 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x02,0x01,0x00
>  }; // OpenIncomplete
>  static const uint8_t header_closed_partition_key[] = { 
> 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x02,0x04,0x00
>  }; // ClosedComplete
> -static const uint8_t klv_fill_key[]= { 
> 0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x03,0x01,0x02,0x10,0x01,0x00,0x00,0x00
>  };
> +static const uint8_t klv_fill_key[]= { 
> 0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x03,0x01,0x02,0x10,0x01,0x00,0x00,0x00
>  };
>  static const uint8_t body_partition_key[]  = { 
> 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x02,0x01,0x01,0x03,0x04,0x00
>  }; // ClosedComplete
>  
>  

I agree the registry version was incorrect, I think there are others
too. So LGTM.


-- 
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