Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Add support for H.265 encoding

2015-03-24 Thread Philip Langdale
On Tue, 24 Mar 2015 09:54:13 +0100
Timo Rothenpieler  wrote:

> Yes, I did exactly that in my implementation:
> 
> https://github.com/BtbN/FFmpeg/commits/nvenc
> 
> The code i wrote there is completely untested(Except that h264 still 
> works), because i don't have any compatible hardware, so the one you 
> tested is clearly the one that should be prefered.
> 
> Dropping SDK <5 support is fine with me, as long as it's not
> backported to 2.6. The primary gain from supporting the old SDK is
> that it works with much older nvidia driver versions.
> 
> I'll submit the patch that drops the old API support, so you can
> rebase your patch on top of it.
> 
> Looks good to merge otherwise.
> 

I've taken your logic to check the SM version - I had been
wondering how old hardware should be detected and excluded.

I've also noticed that the profile handling code is completely broken -
you can't set a profile using -profile:v - it appears we're handling
this in an incorrect way - but I'm not sure what correct is. libx264
has its own profile option which appears to be necessary but then I
don't understand what sets avctx->profile.

Anyway, that's a separate problem we can solve independently of h.265.

Thanks!

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


Re: [FFmpeg-devel] [PATCH 2/5] Use @verbatim instead of @example for ASCII arts

2015-03-24 Thread Timothy Gu
On Mon, Mar 23, 2015 at 8:38 AM Michael Niedermayer 
wrote:

> On Sun, Mar 22, 2015 at 08:47:17PM -0700, Timothy Gu wrote:
> > Partially fixes #3869.
> > ---
> >  doc/ffmpeg.texi   | 20 ++--
> >  doc/ffserver.texi |  6 --
> >  doc/filters.texi  |  4 ++--
> >  3 files changed, 16 insertions(+), 14 deletions(-)
>
> this seems to cause:
> make
> POD doc/ffmpeg-all.pod
> @end verbatim without @verbatim at line 102
> make: *** [doc/ffmpeg-all.pod] Error 25
>

Hm I'll have to look into this.

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


Re: [FFmpeg-devel] [PATCH] HDMV PGS subtitles-Ticket #2622

2015-03-24 Thread Philip Langdale
On Wed, 25 Mar 2015 00:11:26 +0530
Niklesh Lalwani  wrote:

> Hi Everyone,
> 
> This is the fix for issue #2622 .
> These changes enables to remux m2ts file so that the new file has
> playable subtitles.
> 
> Thanks,
> Niklesh Lalwani


Hi Niklesh,

Please use git send-email to send the patch to the list. This is the
standard way that people do this. It will include your commit message
and correctly set the subject line, etc.

You can look at the git history to see how to format your commit
message. eg: Look at commit 0637b59c2c6aeadead256bdc60fbce32d3d43615

When generating your patch file with git format-patch, remember to use
'-s' to append a signed-off line.

I'm sure this seems pedantic, but you will be sending many patches to
the list if you're successful, so getting familiar with the workflow is
an important first step.

Thanks,

--phil
 
> ---
>  libavformat/mpegts.h| 2 ++
>  libavformat/mpegtsenc.c | 3 +++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h
> index 84f3098..f6a6551 100644
> --- a/libavformat/mpegts.h
> +++ b/libavformat/mpegts.h
> @@ -60,6 +60,8 @@
>  #define STREAM_TYPE_AUDIO_AC3   0x81
>  #define STREAM_TYPE_AUDIO_DTS   0x82
>  #define STREAM_TYPE_AUDIO_TRUEHD0x83
> +
> +#define STREAM_TYPE_SUBTITLE_HDMV_PGS_SUBTITLE 0X90
> 
>  typedef struct MpegTSContext MpegTSContext;
> 
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index cc650bb..213766e 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -309,6 +309,9 @@ static int mpegts_write_pmt(AVFormatContext *s,
> MpegTSService *service)
>  case AV_CODEC_ID_TRUEHD:
>  stream_type = STREAM_TYPE_AUDIO_TRUEHD;
>  break;
> +case AV_CODEC_ID_HDMV_PGS_SUBTITLE:
> +stream_type = STREAM_TYPE_SUBTITLE_HDMV_PGS_SUBTITLE;
> +break;
>  default:
>  stream_type = STREAM_TYPE_PRIVATE_DATA;
>  break;
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] lavf/avisynth: fix compilation, remove bundled headers

2015-03-24 Thread Martin Herkt
Merge commit 1530732 broke compilation with AviSynth enabled.

There's really no reason to keep outdated, incompatible copies of
these headers in the FFmpeg source tree. No one should be using
AviSynth 2.5 either.
---
 compat/avisynth/avisynth_c.h   | 880 -
 compat/avisynth/avisynth_c_25.h|  68 --
 compat/avisynth/avxsynth_c.h   | 728 -
 .../windowsPorts/basicDataTypeConversions.h|  85 --
 compat/avisynth/windowsPorts/windows2linux.h   |  77 --
 doc/general.texi   |  23 +-
 libavformat/avisynth.c |  27 +-
 7 files changed, 35 insertions(+), 1853 deletions(-)
 delete mode 100644 compat/avisynth/avisynth_c.h
 delete mode 100644 compat/avisynth/avisynth_c_25.h
 delete mode 100644 compat/avisynth/avxsynth_c.h
 delete mode 100644 compat/avisynth/windowsPorts/basicDataTypeConversions.h
 delete mode 100644 compat/avisynth/windowsPorts/windows2linux.h

diff --git a/compat/avisynth/avisynth_c.h b/compat/avisynth/avisynth_c.h
deleted file mode 100644
index 2d3002a..000
--- a/compat/avisynth/avisynth_c.h
+++ /dev/null
@@ -1,880 +0,0 @@
-// Avisynth C Interface Version 0.20
-// Copyright 2003 Kevin Atkinson
-
-// This program 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.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-// MA 02110-1301 USA, or visit
-// http://www.gnu.org/copyleft/gpl.html .
-//
-// As a special exception, I give you permission to link to the
-// Avisynth C interface with independent modules that communicate with
-// the Avisynth C interface solely through the interfaces defined in
-// avisynth_c.h, regardless of the license terms of these independent
-// modules, and to copy and distribute the resulting combined work
-// under terms of your choice, provided that every copy of the
-// combined work is accompanied by a complete copy of the source code
-// of the Avisynth C interface and Avisynth itself (with the version
-// used to produce the combined work), being distributed under the
-// terms of the GNU General Public License plus this exception.  An
-// independent module is a module which is not derived from or based
-// on Avisynth C Interface, such as 3rd-party filters, import and
-// export plugins, or graphical user interfaces.
-
-// NOTE: this is a partial update of the Avisynth C interface to recognize
-// new color spaces added in Avisynth 2.60. By no means is this document
-// completely Avisynth 2.60 compliant.
-
-#ifndef __AVISYNTH_C__
-#define __AVISYNTH_C__
-
-#ifdef __cplusplus
-#  define EXTERN_C extern "C"
-#else
-#  define EXTERN_C
-#endif
-
-#define AVSC_USE_STDCALL 1
-
-#ifndef AVSC_USE_STDCALL
-#  define AVSC_CC __cdecl
-#else
-#  define AVSC_CC __stdcall
-#endif
-
-#define AVSC_INLINE static __inline
-
-#ifdef AVISYNTH_C_EXPORTS
-#  define AVSC_EXPORT EXTERN_C
-#  define AVSC_API(ret, name) EXTERN_C __declspec(dllexport) ret AVSC_CC name
-#else
-#  define AVSC_EXPORT EXTERN_C __declspec(dllexport)
-#  ifndef AVSC_NO_DECLSPEC
-#define AVSC_API(ret, name) EXTERN_C __declspec(dllimport) ret AVSC_CC name
-#  else
-#define AVSC_API(ret, name) typedef ret (AVSC_CC *name##_func)
-#  endif
-#endif
-
-typedef unsigned char BYTE;
-#ifdef __GNUC__
-typedef long long int INT64;
-#else
-typedef __int64 INT64;
-#endif
-
-
-/
-//
-// Constants
-//
-
-#ifndef __AVISYNTH_H__
-enum { AVISYNTH_INTERFACE_VERSION = 4 };
-#endif
-
-enum {AVS_SAMPLE_INT8  = 1<<0,
-  AVS_SAMPLE_INT16 = 1<<1,
-  AVS_SAMPLE_INT24 = 1<<2,
-  AVS_SAMPLE_INT32 = 1<<3,
-  AVS_SAMPLE_FLOAT = 1<<4};
-
-enum {AVS_PLANAR_Y=1<<0,
-  AVS_PLANAR_U=1<<1,
-  AVS_PLANAR_V=1<<2,
-  AVS_PLANAR_ALIGNED=1<<3,
-  AVS_PLANAR_Y_ALIGNED=AVS_PLANAR_Y|AVS_PLANAR_ALIGNED,
-  AVS_PLANAR_U_ALIGNED=AVS_PLANAR_U|AVS_PLANAR_ALIGNED,
-  AVS_PLANAR_V_ALIGNED=AVS_PLANAR_V|AVS_PLANAR_ALIGNED,
-  AVS_PLANAR_A=1<<4,
-  AVS_PLANAR_R=1<<5,
-  AVS_PLANAR_G=1<<6,
-  AVS_PLANAR_B=1<<7,
-  AVS_PLANAR_A_ALIGNED=AVS_PLANAR_A|AVS_PLANAR_ALIGNED,
-  AVS_PLANAR_R_ALIGNED=AVS_PLANAR_R|AVS_PLANAR_ALIGNED,
-  AVS_PLANAR_G_ALIGNED=AVS_PLANAR_G|AVS_PLANAR_ALIGNED,
-  AVS_PLANAR_B_ALIGNED=AVS_PLANAR_B|AVS_PLANAR_ALIGNED};
-
-  // Colorspace properties.
-enum {AVS_CS_BG

Re: [FFmpeg-devel] [PATCH 1/4] avisynth: update headers against AviSynth+

2015-03-24 Thread Michael Niedermayer
On Tue, Mar 24, 2015 at 03:23:29PM -0400, Stephen Hutchinson wrote:
> ---
>  compat/avisynth/avisynth_c.h | 296 
> +--
>  compat/avisynth/avs/capi.h   |  62 +
>  compat/avisynth/avs/config.h |  55 
>  compat/avisynth/avs/types.h  |  51 
>  4 files changed, 313 insertions(+), 151 deletions(-)
>  create mode 100644 compat/avisynth/avs/capi.h
>  create mode 100644 compat/avisynth/avs/config.h
>  create mode 100644 compat/avisynth/avs/types.h

applied

thanks

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


Re: [FFmpeg-devel] Fwd: GSoC: APNG

2015-03-24 Thread Michael Niedermayer
On Tue, Mar 24, 2015 at 09:54:07PM +, Donny Yang wrote:
> On 25 March 2015 at 04:18, Michael Niedermayer  wrote:
> 
> > the generated png files seem to differ
> >
> > ./ffmpeg -i lena.pnm ref.png
> >
> > -rw-r- 1 michael michael 180438 Mar 24 18:11 after-patches.png
> > -rw-r- 1 michael michael 180987 Mar 24 18:14 before-patches.png
> >
> 
> It's because the non-APNG version breaks the data into lots of small IDAT
> chunks whereas mine puts it in one big chunk - but are functionally the
> same.

is there any advantage for multiple small IDATs ?
if not i suggest to make the IDAT change to png as well in a seperate
patch so that a single frame APNG and PNG produce identical data
and especially so that the introduction of APNG does not change PNG
files


> Also, my version doesn't output any ancillary chunks (yet - it's planned)
> either, since this is just a "basic" version.
> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

-- 
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] ffmpeg: fix option name in documentation

2015-03-24 Thread Michael Niedermayer
On Tue, Mar 24, 2015 at 08:24:03PM +0100, Giorgio Vazzana wrote:
> Hi,
> 
> $ ffmpeg -h full 2>/dev/null | grep thread_queue_size
> -thread_queue_size  set the maximum number of queued packets from the demuxer
> 
> Giorgio Vazzana

>  ffmpeg.texi |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> c526215d33bfdbd322bf8b9e5527c1d4f660e97d  
> 0001-ffmpeg-fix-option-name-in-documentation.patch
> From 15e9d7d8d3e23ec7a0649b36f104c755c5a33783 Mon Sep 17 00:00:00 2001
> From: Giorgio Vazzana 
> Date: Tue, 24 Mar 2015 20:20:45 +0100
> Subject: [PATCH] ffmpeg: fix option name in documentation

applied

thanks

[...]

-- 
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 2/4] avisynth: drop support of AviSynth 2.5

2015-03-24 Thread Stephen Hutchinson
On Tue, Mar 24, 2015 at 4:35 PM, John Warburton  wrote:
>>
> Just had avisynth.c fail to compile from a clean tree, whereas
> yesterday's compile was fine.
>
> Complete error report is below. I'm certainly not a code expert but is
> avisynth.c not finding what it would like to refer to in avisynth_c.h?
>

The errors are being caused by a commit this morning merging a fix from Libav
that allowed libavformat to use the updated headers (which changed
several functions
from AVSC_INLINE to AVSC_API).  FFmpeg currently uses an older version
of the header that still declares them as AVSC_INLINE, and thus compilation
fails.  The first commit in this patchset addresses that particular problem.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/4] avisynth: drop support of AviSynth 2.5

2015-03-24 Thread Stephen Hutchinson
On Tue, Mar 24, 2015 at 3:33 PM, Hendrik Leppkes  wrote:
> On Tue, Mar 24, 2015 at 8:23 PM, Stephen Hutchinson  wrote:
>> If the user attempts to use AviSynth 2.5, an error message will
>> now tell them they need to upgrade.
>
> Whats the advantage in dropping support?
> Earlier versions seemed to work just fine against both 2.5 and 2.6.
>

If we want to make sure that we supply official and up-to-date
headers, then 2.5 support becomes harder to maintain.  The only
reason it currently supports 2.5* is the avisynth_c_25.h compat header,
which would have to be expanded with additional *_25 versions
of functions and cause more branching in the demuxer to
continue supporting it.

*more precisely, supports video under 2.5, because the
changes requiring the compat header were to video-related functions.

Also, the compat header was sourced from FFMS2's C plugin.
Now, since said header was originally committed to FFMS2 by the
same author that contributed C header work to earlier alphas of
AviSynth 2.6, I trust that the compat header is ISC licensed
rather than GPLv2 with linking exception was done without violating
the GPL.  But adding more functions to that header would be a lot trickier,
and ditching the compat header would resolve any what-ifs about
that situation (I'd rather even remove the 2.5 compat mode from FFMS2's
C plugin too, for that matter).


And while it doesn't pertain directly to the libavformat demuxer, users should
be strongly encouraged to upgrade to either 2.6 or better, AviSynth+,
since those versions are more stable than 2.5.  One of the main problems
was that users were scared off by classic AviSynth's 'alpha' tag on the 2.6
releases, even though the actual dev(s) stated the 'alpha' only referred to
2.6-specific features.  But with 2.6 RC1 having been out now for a
little over three months, the alpha argument can't hold sway anymore
(and AviSynth+ deliberately uses a different versioning scheme to
avoid this, and has since its inception in late 2013).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Fwd: GSoC: APNG

2015-03-24 Thread Donny Yang
On 25 March 2015 at 04:18, Michael Niedermayer  wrote:

> the generated png files seem to differ
>
> ./ffmpeg -i lena.pnm ref.png
>
> -rw-r- 1 michael michael 180438 Mar 24 18:11 after-patches.png
> -rw-r- 1 michael michael 180987 Mar 24 18:14 before-patches.png
>

It's because the non-APNG version breaks the data into lots of small IDAT
chunks whereas mine puts it in one big chunk - but are functionally the
same.
Also, my version doesn't output any ancillary chunks (yet - it's planned)
either, since this is just a "basic" version.

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


Re: [FFmpeg-devel] [PATCH] Build scripts for WinRT

2015-03-24 Thread Simon Ferquel
Axtually I don't know the meaning of enable thumb (it was in the ffmpef winrt 
compilation guide I followed).
I also found some strange linking issues when building with 
disable-optimizations and / or as static libs. So, I'll resubmit the patch when 
these issues are fixed.

De : Reimar Döffinger
Envoyé : ‎24/‎03/‎2015 21:56
À : FFmpeg development discussions and patches
Objet : Re: [FFmpeg-devel] [PATCH] Build scripts for WinRT

On Tue, Mar 24, 2015 at 08:07:28AM +, Simon Ferquel wrote:
> I have needed libavformat/libavcodec for a drone piloting app project 
> targetting (among others) the Windows modern platform (Win81 modern, Windows 
> Phone, and Xbox one in a near future).
>
> To make it easier to generate static libs for all the combinations of os 
> (win81/wp81), architecture (armv7, x86, x64) and C runtime configurations 
> (debug CRT DLL or release CRT DLL), I wrote some bash scripts automating the 
> setup of the environment variables needed for msvc, as well as the different 
> flags to pass to the compiler to generate valid libraries for the modern 
> windows app platform.
>
> This patch adds a bldwinrt folder with only bash scripts in it. They must be 
> run in the msys2 environment and have been tested on Windows 8.1 64bit.

One question: You are aware that --enable-thumb is not the default on
purpose/for good reasons?
I wonder why you are using it.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Build scripts for WinRT

2015-03-24 Thread Reimar Döffinger
On Tue, Mar 24, 2015 at 08:07:28AM +, Simon Ferquel wrote:
> I have needed libavformat/libavcodec for a drone piloting app project 
> targetting (among others) the Windows modern platform (Win81 modern, Windows 
> Phone, and Xbox one in a near future).
> 
> To make it easier to generate static libs for all the combinations of os 
> (win81/wp81), architecture (armv7, x86, x64) and C runtime configurations 
> (debug CRT DLL or release CRT DLL), I wrote some bash scripts automating the 
> setup of the environment variables needed for msvc, as well as the different 
> flags to pass to the compiler to generate valid libraries for the modern 
> windows app platform.
> 
> This patch adds a bldwinrt folder with only bash scripts in it. They must be 
> run in the msys2 environment and have been tested on Windows 8.1 64bit.

One question: You are aware that --enable-thumb is not the default on
purpose/for good reasons?
I wonder why you are using it.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Loongson Optimization Patchs Submitting Question - new branch of mipsel64

2015-03-24 Thread Reimar Döffinger
On Fri, Mar 20, 2015 at 04:06:56PM +0800, 周晓勇 wrote:
> The optimization mainly include libavcodec, libavutil, and mplayer's 
> fast_memcpy.

Note that fast_memcpy for 720p and above really is only a bad workaround
against horrible libc implementations.
I can only strongly recommend to fix the libc implementation of memcpy,
for resolutions of 720p and above there is no excuse for the libc memcpy
being slower than a well optimized fast_memcpy.
You really don't want to end up in the same ridiculous situation as
PowerPC where everyone who wants good performance has to re-implement
the standard C library because nobody could be bothered to do things
properly there.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/4] avisynth: drop support of AviSynth 2.5

2015-03-24 Thread John Warburton
On Tue, Mar 24, 2015 at 7:33 PM, Hendrik Leppkes  wrote:
>
> On Tue, Mar 24, 2015 at 8:23 PM, Stephen Hutchinson  wrote:
> > If the user attempts to use AviSynth 2.5, an error message will
> > now tell them they need to upgrade.
>
Just had avisynth.c fail to compile from a clean tree, whereas
yesterday's compile was fine.

Complete error report is below. I'm certainly not a code expert but is
avisynth.c not finding what it would like to refer to in avisynth_c.h?

CC  libavformat/avisynth.o
In file included from libavformat/avisynth.c:33:0:
./compat/avisynth/avisynth_c.h:806:27: warning: function declaration
isn't a prototype [-Wstrict-prototypes]
 AVSC_INLINE AVS_Library * avs_load_library() {
   ^
libavformat/avisynth.c:69:23: error: unknown type name 'avs_bits_per_pixel_func'
 AVSC_DECLARE_FUNC(avs_bits_per_pixel);
   ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
 ^
libavformat/avisynth.c:70:23: error: unknown type name 'avs_get_height_p_func'
 AVSC_DECLARE_FUNC(avs_get_height_p);
   ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
 ^
libavformat/avisynth.c:71:23: error: unknown type name 'avs_get_pitch_p_func'
 AVSC_DECLARE_FUNC(avs_get_pitch_p);
   ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
 ^
libavformat/avisynth.c:72:23: error: unknown type name 'avs_get_read_ptr_p_func'
 AVSC_DECLARE_FUNC(avs_get_read_ptr_p);
   ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
 ^
libavformat/avisynth.c:73:23: error: unknown type name 'avs_get_row_size_p_func'
 AVSC_DECLARE_FUNC(avs_get_row_size_p);
   ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
 ^
libavformat/avisynth.c:74:23: error: unknown type name 'avs_is_yv24_func'
 AVSC_DECLARE_FUNC(avs_is_yv24);
   ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
 ^
libavformat/avisynth.c:75:23: error: unknown type name 'avs_is_yv16_func'
 AVSC_DECLARE_FUNC(avs_is_yv16);
   ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
 ^
libavformat/avisynth.c:76:23: error: unknown type name 'avs_is_yv411_func'
 AVSC_DECLARE_FUNC(avs_is_yv411);
   ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'

libavformat/avisynth.c:77:23: error: unknown type name 'avs_is_y8_func'
 AVSC_DECLARE_FUNC(avs_is_y8);
   ^
libavformat/avisynth.c:53:33: note: in definition of macro 'AVSC_DECLARE_FUNC'
 #define AVSC_DECLARE_FUNC(name) name ## _func name
 ^
libavformat/avisynth.c: In function 'avisynth_load_library':
libavformat/avisynth.c:123:26: warning: assignment makes integer from
pointer without a cast
 avs_library.name = \
  ^
libavformat/avisynth.c:143:5: note: in expansion of macro 'LOAD_AVS_FUNC'
 LOAD_AVS_FUNC(avs_bits_per_pixel, 0);
 ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from
pointer without a cast
 avs_library.name = \
  ^
libavformat/avisynth.c:144:5: note: in expansion of macro 'LOAD_AVS_FUNC'
 LOAD_AVS_FUNC(avs_get_height_p, 0);
 ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from
pointer without a cast
 avs_library.name = \
  ^
libavformat/avisynth.c:145:5: note: in expansion of macro 'LOAD_AVS_FUNC'
 LOAD_AVS_FUNC(avs_get_pitch_p, 0);
 ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from
pointer without a cast
 avs_library.name = \
  ^
libavformat/avisynth.c:146:5: note: in expansion of macro 'LOAD_AVS_FUNC'
 LOAD_AVS_FUNC(avs_get_read_ptr_p, 0);
 ^
libavformat/avisynth.c:123:26: warning: assignment makes integer from
pointer without a cast
 avs_library.name = \
  ^
libavformat/avisynth.c:147:5: note: in expansi

Re: [FFmpeg-devel] [PATCH] avutil/utils: remove unnecessary things

2015-03-24 Thread Michael Niedermayer
On Tue, Mar 24, 2015 at 11:26:36AM +0100, wm4 wrote:
> On Fri, 20 Mar 2015 18:33:37 +0100
> Michael Niedermayer  wrote:
> 
> > On Fri, Mar 20, 2015 at 05:41:43PM +0100, wm4 wrote:
> > > The checks for the enums all were added in 2011 and 2012. They were
> > > likely for checking that Libav changes do not change the FFmpeg ABI.
> > > Given the amount of changes in the last 3 years, and the fact that
> > > barely any other ABI specifics are tested, keeping these tests makes
> > > not much sense anymore.
> > 
> > The tests check that ABI is not broken, for example if someone added
> > a entry in the middle of a enum it would break ABI to our own
> > previous release with same so-name.
> > its better if the assert punches the person who puts that in the
> > middle of a enum straight in the face instead of it being posted
> > to the mailing list and someone needing to ask for it to be fixed
> > and reposted with it moved to the end
> 
> Such invalid changes are easily caught in the patch reviews.

yes but its better if they are caught before the patch for the
review is even created


> 
> > Testing for this in a cleaner way is very welcome of course
> 
> Sure, but these barely test anything anyway and are not worth for the
> required uglification. You can just move them into some test program if
> you really want them.

yes i can but i have along todo list, and i will work on things
which appear more important to me first. That are for example bugs
some of which could be security relevant
So if its important to you that this gets moved soon then its
probably better if you move the code


[...]
> >
> > 
> > [...]
> > 
> > > -av_assert0(LIBAVUTIL_VERSION_MICRO >= 100);
> > > -av_assert0(HAVE_MMX2 == HAVE_MMXEXT);
> > 
> > These 2 lack any explanation of why they would be removed in the
> > commit message
> > 
> > [...]
> 
> Nobody would do anything that these assertions trigger, plus it's
> easily caught in patch review.

ive seen people break the MICRO >= 100 case
actually, theres no much ive not seen someone somewhere mess up

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

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


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


Re: [FFmpeg-devel] [PATCH 2/4] avisynth: drop support of AviSynth 2.5

2015-03-24 Thread Hendrik Leppkes
On Tue, Mar 24, 2015 at 8:23 PM, Stephen Hutchinson  wrote:
> If the user attempts to use AviSynth 2.5, an error message will
> now tell them they need to upgrade.

Whats the advantage in dropping support?
Earlier versions seemed to work just fine against both 2.5 and 2.6.

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


[FFmpeg-devel] [PATCH 4/4] avisynth: ifdef to avoid implicit function declaration errors

2015-03-24 Thread Stephen Hutchinson
The demuxer doesn't use these functions, so it shouldn't affect
anything.  Investigate whether this can be fixed by how headers
are checked in configure.
---
 compat/avisynth/avisynth_c.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/compat/avisynth/avisynth_c.h b/compat/avisynth/avisynth_c.h
index cfe3f64..62c970c 100644
--- a/compat/avisynth/avisynth_c.h
+++ b/compat/avisynth/avisynth_c.h
@@ -357,11 +357,13 @@ AVSC_INLINE void avs_set_fps(AVS_VideoInfo * p, unsigned 
numerator, unsigned den
 p->fps_denominator = denominator/x;
 }
 
+#ifdef AVS_IMPLICIT_FUNCTION_DECLARATION_ERROR
 AVSC_INLINE int avs_is_same_colorspace(AVS_VideoInfo * x, AVS_VideoInfo * y)
 {
 return (x->pixel_type == y->pixel_type)
 || (avs_is_yv12(x) && avs_is_yv12(y));
 }
+#endif
 
 /
 //
@@ -400,8 +402,10 @@ typedef struct AVS_VideoFrame {
 // Access functions for AVS_VideoFrame
 AVSC_API(int, avs_get_pitch_p)(const AVS_VideoFrame * p, int plane);
 
+#ifdef AVS_IMPLICIT_FUNCTION_DECLARATION_ERROR
 AVSC_INLINE int avs_get_pitch(const AVS_VideoFrame * p) {
 return avs_get_pitch_p(p, 0);}
+#endif
 
 AVSC_API(int, avs_get_row_size_p)(const AVS_VideoFrame * p, int plane);
 
@@ -415,15 +419,19 @@ AVSC_INLINE int avs_get_height(const AVS_VideoFrame * p) {
 
 AVSC_API(const BYTE *, avs_get_read_ptr_p)(const AVS_VideoFrame * p, int 
plane);
 
+#ifdef AVS_IMPLICIT_FUNCTION_DECLARATION_ERROR
 AVSC_INLINE const BYTE* avs_get_read_ptr(const AVS_VideoFrame * p) {
 return avs_get_read_ptr_p(p, 0);}
+#endif
 
 AVSC_API(int, avs_is_writable)(const AVS_VideoFrame * p);
 
 AVSC_API(BYTE *, avs_get_write_ptr_p)(const AVS_VideoFrame * p, int plane);
 
+#ifdef AVS_IMPLICIT_FUNCTION_DECLARATION_ERROR
 AVSC_INLINE BYTE* avs_get_write_ptr(const AVS_VideoFrame * p) {
 return avs_get_write_ptr_p(p, 0);}
+#endif
 
 AVSC_API(void, avs_release_video_frame)(AVS_VideoFrame *);
 // makes a shallow copy of a video frame
-- 
2.1.0

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


[FFmpeg-devel] [PATCH 3/4] doc: remove the reference to supporting AviSynth 2.5

2015-03-24 Thread Stephen Hutchinson
---
 doc/general.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/general.texi b/doc/general.texi
index a8e4f37..85ee219 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -179,7 +179,7 @@ included in compat/avisynth/, which allows the user to 
enable support
 without needing to search for these headers themselves.
 
 For Windows, supported AviSynth variants are
-@url{http://avisynth.nl, AviSynth 2.5 or 2.6} for 32-bit builds and
+@url{http://avisynth.nl, AviSynth 2.6} for 32-bit builds and
 @url{http://avs-plus.net, AviSynth+ 0.1} for 32-bit and 64-bit builds.
 
 For Linux and OS X, the supported AviSynth variant is
-- 
2.1.0

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


[FFmpeg-devel] [PATCH] ffmpeg: fix option name in documentation

2015-03-24 Thread Giorgio Vazzana
Hi,

$ ffmpeg -h full 2>/dev/null | grep thread_queue_size
-thread_queue_size  set the maximum number of queued packets from the demuxer

Giorgio Vazzana
From 15e9d7d8d3e23ec7a0649b36f104c755c5a33783 Mon Sep 17 00:00:00 2001
From: Giorgio Vazzana 
Date: Tue, 24 Mar 2015 20:20:45 +0100
Subject: [PATCH] ffmpeg: fix option name in documentation

---
 doc/ffmpeg.texi |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 1dde682..02952ac 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -1158,7 +1158,7 @@ This option enables or disables accurate seeking in input files with the
 transcoding. Use @option{-noaccurate_seek} to disable it, which may be useful
 e.g. when copying some streams and transcoding the others.
 
-@item -thread_message_queue @var{size} (@emph{input})
+@item -thread_queue_size @var{size} (@emph{input})
 This option sets the maximum number of queued packets when reading from the
 file or device. With low latency / high rate live streams, packets may be
 discarded if they are not read in a timely manner; raising this value can
-- 
1.7.9.5

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


[FFmpeg-devel] [PATCH 2/4] avisynth: drop support of AviSynth 2.5

2015-03-24 Thread Stephen Hutchinson
If the user attempts to use AviSynth 2.5, an error message will
now tell them they need to upgrade.
---
 compat/avisynth/avisynth_c_25.h | 68 -
 libavformat/avisynth.c  | 23 +-
 2 files changed, 15 insertions(+), 76 deletions(-)
 delete mode 100644 compat/avisynth/avisynth_c_25.h

diff --git a/compat/avisynth/avisynth_c_25.h b/compat/avisynth/avisynth_c_25.h
deleted file mode 100644
index 9288761..000
--- a/compat/avisynth/avisynth_c_25.h
+++ /dev/null
@@ -1,68 +0,0 @@
-//  Copyright (c) 2011 FFmpegSource Project
-//
-//  Permission is hereby granted, free of charge, to any person obtaining a 
copy
-//  of this software and associated documentation files (the "Software"), to 
deal
-//  in the Software without restriction, including without limitation the 
rights
-//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-//  copies of the Software, and to permit persons to whom the Software is
-//  furnished to do so, subject to the following conditions:
-//
-//  The above copyright notice and this permission notice shall be included in
-//  all copies or substantial portions of the Software.
-//
-//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
-//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-//  THE SOFTWARE.
-
-/* these are defines/functions that are used and were changed in the switch to 
2.6
- * and are needed to maintain full compatility with 2.5 */
-
-enum {
-  AVS_CS_YV12_25 = 1<<3 | AVS_CS_YUV | AVS_CS_PLANAR,  // y-v-u, planar
-  AVS_CS_I420_25 = 1<<4 | AVS_CS_YUV | AVS_CS_PLANAR,  // y-u-v, planar
-};
-
-AVSC_INLINE int avs_get_height_p_25(const AVS_VideoFrame * p, int plane) {
-switch (plane)
-{
-case AVS_PLANAR_U: case AVS_PLANAR_V:
-if (p->pitchUV)
-return p->height>>1;
-return 0;
-}
-return p->height;}
-
-AVSC_INLINE int avs_get_row_size_p_25(const AVS_VideoFrame * p, int plane) {
-int r;
-switch (plane)
-{
-case AVS_PLANAR_U: case AVS_PLANAR_V:
-if (p->pitchUV)
-return p->row_size>>1;
-else
-return 0;
-case AVS_PLANAR_U_ALIGNED: case AVS_PLANAR_V_ALIGNED:
-if (p->pitchUV)
-{
-r = ((p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)) )>>1; 
// Aligned rowsize
-if (r < p->pitchUV)
-return r;
-return p->row_size>>1;
-}
-else
-return 0;
-case AVS_PLANAR_Y_ALIGNED:
-r = (p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned 
rowsize
-if (r <= p->pitch)
-return r;
-return p->row_size;
-}
-return p->row_size;
-}
-
-AVSC_INLINE int avs_is_yv12_25(const AVS_VideoInfo * p)
-{ return ((p->pixel_type & AVS_CS_YV12_25) == 
AVS_CS_YV12_25)||((p->pixel_type & AVS_CS_I420_25) == AVS_CS_I420_25); }
diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
index ac3247a..7b3f2c6 100644
--- a/libavformat/avisynth.c
+++ b/libavformat/avisynth.c
@@ -31,7 +31,6 @@
   #include 
   #undef EXTERN_C
   #include "compat/avisynth/avisynth_c.h"
-  #include "compat/avisynth/avisynth_c_25.h"
   #define AVISYNTH_LIB "avisynth"
   #define USING_AVISYNTH
 #else
@@ -406,6 +405,19 @@ static int avisynth_open_file(AVFormatContext *s)
 avs->clip = avs_library.avs_take_clip(val, avs->env);
 avs->vi   = avs_library.avs_get_video_info(avs->clip);
 
+#ifdef USING_AVISYNTH
+/* FFmpeg only supports AviSynth 2.6 on Windows. Since AvxSynth
+ * identifies itself as interface version 3 like 2.5.8, this
+ * needs to be special-cased. */
+
+if (avs_library.avs_get_version(avs->clip) == 3) {
+av_log(s, AV_LOG_ERROR,
+   "AviSynth 2.5.8 not supported. Please upgrade to 2.6.\n");
+ret = AVERROR_UNKNOWN;
+goto fail;
+}
+#endif
+
 /* Release the AVS_Value as it will go out of scope. */
 avs_library.avs_release_value(val);
 
@@ -505,13 +517,8 @@ static int avisynth_read_packet_video(AVFormatContext *s, 
AVPacket *pkt,
 src_p = avs_library.avs_get_read_ptr_p(frame, plane);
 pitch = avs_library.avs_get_pitch_p(frame, plane);
 
-if (avs_library.avs_get_version(avs->clip) == 3) {
-rowsize = avs_get_row_size_p_25(frame, plane);
-planeheight = avs_get_height_p_25(frame, plane);
-} else {
-rowsize = avs_library.avs_get_row_size_p(frame, plane);
-planeheight = avs_library.avs_get_height_p(frame, plane);
-}
+rowsize = avs_library.avs_get_r

[FFmpeg-devel] [PATCH 1/4] avisynth: update headers against AviSynth+

2015-03-24 Thread Stephen Hutchinson
---
 compat/avisynth/avisynth_c.h | 296 +--
 compat/avisynth/avs/capi.h   |  62 +
 compat/avisynth/avs/config.h |  55 
 compat/avisynth/avs/types.h  |  51 
 4 files changed, 313 insertions(+), 151 deletions(-)
 create mode 100644 compat/avisynth/avs/capi.h
 create mode 100644 compat/avisynth/avs/config.h
 create mode 100644 compat/avisynth/avs/types.h

diff --git a/compat/avisynth/avisynth_c.h b/compat/avisynth/avisynth_c.h
index 2d3002a..cfe3f64 100644
--- a/compat/avisynth/avisynth_c.h
+++ b/compat/avisynth/avisynth_c.h
@@ -38,40 +38,9 @@
 #ifndef __AVISYNTH_C__
 #define __AVISYNTH_C__
 
-#ifdef __cplusplus
-#  define EXTERN_C extern "C"
-#else
-#  define EXTERN_C
-#endif
-
-#define AVSC_USE_STDCALL 1
-
-#ifndef AVSC_USE_STDCALL
-#  define AVSC_CC __cdecl
-#else
-#  define AVSC_CC __stdcall
-#endif
-
-#define AVSC_INLINE static __inline
-
-#ifdef AVISYNTH_C_EXPORTS
-#  define AVSC_EXPORT EXTERN_C
-#  define AVSC_API(ret, name) EXTERN_C __declspec(dllexport) ret AVSC_CC name
-#else
-#  define AVSC_EXPORT EXTERN_C __declspec(dllexport)
-#  ifndef AVSC_NO_DECLSPEC
-#define AVSC_API(ret, name) EXTERN_C __declspec(dllimport) ret AVSC_CC name
-#  else
-#define AVSC_API(ret, name) typedef ret (AVSC_CC *name##_func)
-#  endif
-#endif
-
-typedef unsigned char BYTE;
-#ifdef __GNUC__
-typedef long long int INT64;
-#else
-typedef __int64 INT64;
-#endif
+#include "avs/config.h"
+#include "avs/capi.h"
+#include "avs/types.h"
 
 
 /
@@ -79,8 +48,8 @@ typedef __int64 INT64;
 // Constants
 //
 
-#ifndef __AVISYNTH_H__
-enum { AVISYNTH_INTERFACE_VERSION = 4 };
+#ifndef __AVISYNTH_6_H__
+enum { AVISYNTH_INTERFACE_VERSION = 6 };
 #endif
 
 enum {AVS_SAMPLE_INT8  = 1<<0,
@@ -112,8 +81,8 @@ enum {AVS_CS_BGR = 1<<28,
   AVS_CS_PLANAR = 1<<31,
 
   AVS_CS_SHIFT_SUB_WIDTH   = 0,
-  AVS_CS_SHIFT_SUB_HEIGHT  = 1 << 3,
-  AVS_CS_SHIFT_SAMPLE_BITS = 1 << 4,
+  AVS_CS_SHIFT_SUB_HEIGHT  = 8,
+  AVS_CS_SHIFT_SAMPLE_BITS = 16,
 
   AVS_CS_SUB_WIDTH_MASK= 7 << AVS_CS_SHIFT_SUB_WIDTH,
   AVS_CS_SUB_WIDTH_1   = 3 << AVS_CS_SHIFT_SUB_WIDTH, // YV24
@@ -180,15 +149,66 @@ enum {  //SUBTYPES
   AVS_FILTER_OUTPUT_TYPE_DIFFERENT=4};
 
 enum {
-  AVS_CACHE_NOTHING=0,
-  AVS_CACHE_RANGE=1,
-  AVS_CACHE_ALL=2,
-  AVS_CACHE_AUDIO=3,
-  AVS_CACHE_AUDIO_NONE=4,
-  AVS_CACHE_AUDIO_AUTO=5
+  // New 2.6 explicitly defined cache hints.
+  AVS_CACHE_NOTHING=10, // Do not cache video.
+  AVS_CACHE_WINDOW=11, // Hard protect upto X frames within a range of X from 
the current frame N.
+  AVS_CACHE_GENERIC=12, // LRU cache upto X frames.
+  AVS_CACHE_FORCE_GENERIC=13, // LRU cache upto X frames, override any 
previous CACHE_WINDOW.
+
+  AVS_CACHE_GET_POLICY=30, // Get the current policy.
+  AVS_CACHE_GET_WINDOW=31, // Get the current window h_span.
+  AVS_CACHE_GET_RANGE=32, // Get the current generic frame range.
+
+  AVS_CACHE_AUDIO=50, // Explicitly do cache audio, X byte cache.
+  AVS_CACHE_AUDIO_NOTHING=51, // Explicitly do not cache audio.
+  AVS_CACHE_AUDIO_NONE=52, // Audio cache off (auto mode), X byte intial cache.
+  AVS_CACHE_AUDIO_AUTO=53, // Audio cache on (auto mode), X byte intial cache.
+
+  AVS_CACHE_GET_AUDIO_POLICY=70, // Get the current audio policy.
+  AVS_CACHE_GET_AUDIO_SIZE=71, // Get the current audio cache size.
+
+  AVS_CACHE_PREFETCH_FRAME=100, // Queue request to prefetch frame N.
+  AVS_CACHE_PREFETCH_GO=101, // Action video prefetches.
+
+  AVS_CACHE_PREFETCH_AUDIO_BEGIN=120, // Begin queue request transaction to 
prefetch audio (take critical section).
+  AVS_CACHE_PREFETCH_AUDIO_STARTLO=121, // Set low 32 bits of start.
+  AVS_CACHE_PREFETCH_AUDIO_STARTHI=122, // Set high 32 bits of start.
+  AVS_CACHE_PREFETCH_AUDIO_COUNT=123, // Set low 32 bits of length.
+  AVS_CACHE_PREFETCH_AUDIO_COMMIT=124, // Enqueue request transaction to 
prefetch audio (release critical section).
+  AVS_CACHE_PREFETCH_AUDIO_GO=125, // Action audio prefetches.
+
+  AVS_CACHE_GETCHILD_CACHE_MODE=200, // Cache ask Child for desired video 
cache mode.
+  AVS_CACHE_GETCHILD_CACHE_SIZE=201, // Cache ask Child for desired video 
cache size.
+  AVS_CACHE_GETCHILD_AUDIO_MODE=202, // Cache ask Child for desired audio 
cache mode.
+  AVS_CACHE_GETCHILD_AUDIO_SIZE=203, // Cache ask Child for desired audio 
cache size.
+
+  AVS_CACHE_GETCHILD_COST=220, // Cache ask Child for estimated processing 
cost.
+AVS_CACHE_COST_ZERO=221, // Child response of zero cost (ptr arithmetic 
only).
+AVS_CACHE_COST_UNIT=222, // Child response of unit cost (less than or 
equal 1 full frame blit).
+AVS_CACHE_COST_LOW=223, // Child response of light cost. (Fast)
+AVS_CACHE_COST_MED=224, // Child response of medium cost. (Real time)
+AVS_CACHE_COST_HI=225, // Child response of heavy cost. (Slow)
+
+  AVS_CACHE_GETCHILD_THREAD_MODE=240, // Cache ask Child for thread safetyness.
+AVS_C

[FFmpeg-devel] [PATCH] HDMV PGS subtitles-Ticket #2622

2015-03-24 Thread Niklesh Lalwani
Hi Everyone,

This is the fix for issue #2622 .
These changes enables to remux m2ts file so that the new file has playable
subtitles.

Thanks,
Niklesh Lalwani

---
 libavformat/mpegts.h| 2 ++
 libavformat/mpegtsenc.c | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h
index 84f3098..f6a6551 100644
--- a/libavformat/mpegts.h
+++ b/libavformat/mpegts.h
@@ -60,6 +60,8 @@
 #define STREAM_TYPE_AUDIO_AC3   0x81
 #define STREAM_TYPE_AUDIO_DTS   0x82
 #define STREAM_TYPE_AUDIO_TRUEHD0x83
+
+#define STREAM_TYPE_SUBTITLE_HDMV_PGS_SUBTITLE 0X90

 typedef struct MpegTSContext MpegTSContext;

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index cc650bb..213766e 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -309,6 +309,9 @@ static int mpegts_write_pmt(AVFormatContext *s,
MpegTSService *service)
 case AV_CODEC_ID_TRUEHD:
 stream_type = STREAM_TYPE_AUDIO_TRUEHD;
 break;
+case AV_CODEC_ID_HDMV_PGS_SUBTITLE:
+stream_type = STREAM_TYPE_SUBTITLE_HDMV_PGS_SUBTITLE;
+break;
 default:
 stream_type = STREAM_TYPE_PRIVATE_DATA;
 break;
-- 
1.9.1
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/utils: Terminate SPS in avci100_1080i_extradata to avoid warnings during parsing

2015-03-24 Thread Michael Niedermayer
On Tue, Mar 24, 2015 at 07:53:22AM +, Carl Eugen Hoyos wrote:
> Reimar Döffinger  gmx.de> writes:
> 
> > > -0x00, 0x08, 0x00, 0x00, 0x03, 0x01, 0x94, 0x00,
> > > +0x00, 0x08, 0x00, 0x00, 0x03, 0x01, 0x94, 0x20,
> > 
> > Well, going by your description it makes a lot of sense, 
> > but I thought someone copy-pasted this from some 
> > reference files/specification/conversion program?

it could be that the reference was from a lower layer, but at the
layer at which extradata is the RBSP terminantion is needed, also
its either way needed between SPS and PPS so the reference would
have had to contain 2 seperate arrays not one as we have and
whoever combined the 2 then made a mistake

also whats worse is that i think that with streamcopy you can write
this invalid SPS/PPS into a file


> 
> The copy-pasted extradata contained another error 
> (the aspect ratio was wrong).

applied

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

DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please


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


Re: [FFmpeg-devel] [PATCH] libavcodec/exr.c : A new exr lossy compression technique B44 is added

2015-03-24 Thread greeshma
On Tue, Mar 24, 2015 at 4:07 PM, greeshma 
wrote:

> The patch is made and FATE tests are done.It accepted, will submit with
> the copyrights  and signature.The code is written based on openEXR
> algorithm of B44 lossy compression and modified according to the FFmpeg
> code.
>
>
> From 9670e283f38b71c06457c976f3f2040c8d38bbd9 Mon Sep 17 00:00:00 2001
> From: greeshmab 
> Date: Tue, 24 Mar 2015 12:36:21 +0530
> Subject: [PATCH] A new exr lossy compression technique B44 is added
>
> ---
>  libavcodec/exr.c | 121
> +++
>  1 file changed, 121 insertions(+)
>
> diff --git a/libavcodec/exr.c b/libavcodec/exr.c
> index 6251fb7..b7114be 100644
> --- a/libavcodec/exr.c
> +++ b/libavcodec/exr.c
> @@ -770,6 +770,124 @@ static int piz_uncompress(EXRContext *s, const
> uint8_t *src, int ssize,
>  return 0;
>  }
>
> +
> +static void B44_unpack14 ( GetByteContext *gb, uint16_t out[16]){
> +uint16_t shift;
> +const uint8_t *r = gb->buffer;
> +av_assert0(r[2] != 0xfc);
> +out[0] = (r[0] << 8) | r[1];
> +shift = (r[2] >> 2);
> +out[ 1] = out[ 0] + ((r[ 5] >> 2) << shift);
> +out[ 2] = out[ 1] + ((r[ 8] >> 2) << shift);
> +out[ 3] = out[ 2] + ((r[11] >> 2) << shift);
> +out[ 4] = out[ 0] + (((r[ 2] << 4) | (r[ 3] >> 4)) << shift);
> +out[ 5] = out[ 4] + (((r[ 5] << 4) | (r[ 6] >> 4)) << shift);
> +out[ 6] = out[ 5] + (((r[ 8] << 4) | (r[ 9] >> 4)) << shift);
> +out[ 7] = out[ 6] + (((r[11] << 4) | (r[12] >> 4)) << shift);
> +out[ 8] = out[ 4] + (((r[ 3] << 2) | (r[ 4] >> 6)) << shift);
> +out[ 9] = out[ 8] + (((r[ 6] << 2) | (r[ 7] >> 6)) << shift);
> +out[10] = out[ 9] + (((r[ 9] << 2) | (r[10] >> 6)) << shift);
> +out[11] = out[10] + (((r[12] << 2) | (r[13] >> 6)) << shift);
> +out[12] = out[ 8] + (r[ 4]  << shift);
> +out[13] = out[12] + (r[ 7]  << shift);
> +out[14] = out[13] + (r[10]  << shift);
> +out[15] = out[14] + (r[13]  << shift);
> +for (int i = 0; i < 16; ++i) {  //if any out value
> exceeds 16bits
> +if (out[i] & 0x8000)
> +out[i] &= 0x7fff;
> +else
> +out[i] = ~out[i];
> +}
> +}
> +
> +
> +static void B44_unpack3 ( GetByteContext *gb, uint16_t out[16]){
> +const uint8_t *r = gb->buffer;
> //pixels have the same value
> +av_assert0(r[2] == 0xfc);
> +out[0] = (r[0] << 8) | r[1];
> +if (out[0] & 0x8000)
> +out[0] &= 0x7fff;
> +else
> +out[0] = ~out[0];
> +for (int i = 1; i < 16; ++i)
> +out[i] = out[0];
> +}
> +
> +
> +
> +static int b44_uncompress(EXRContext *s, const uint8_t *src,int ssize,
> int dsize, EXRThreadData *td)
> +
> +{
> +GetByteContext gb;
> +unsigned long  dest_len = dsize;
> +uint8_t *out;
> +int i, j;
> +uint16_t *tmp = (uint16_t *)td->tmp;
> +out = td->uncompressed_data;
> +bytestream2_init(&gb, src, ssize);
> +if (uncompress(td->tmp, &dest_len, src, ssize) != Z_OK || dest_len !=
> dsize)
> +return AVERROR_INVALIDDATA;
> +for (i = 0; i < s->nb_channels; i++) {
> +EXRChannel *channel = &s->channels[i];
> +int size = channel->pixel_type;
> +int inSize = ssize;
> +if (channel->pixel_type != EXR_HALF) {  // UINT or
> FLOAT channel.
> +int n = s->xdelta * s->ydelta * size * sizeof (*tmp);
> +memcpy (tmp, gb.buffer, n);
> +gb.buffer += n;
> +inSize -= n;
> +continue;
> +} else {//EXR_HALF
> Channel
> +for (int y=0; y < s->ydelta; y +=4 ) {
> +uint16_t *row0 = tmp + y * s->xdelta;
> +uint16_t *row1 = row0 + s->xdelta;
> +uint16_t *row2 = row1 + s->xdelta;
> +uint16_t *row3 = row2 + s->xdelta;
> +for (int x = 0; x < s->xdelta; x += 4) {
> +uint16_t out[16];
> +int num = (x + 3 < s->xdelta)? 4 * sizeof (*out) :
> (s->xdelta - x) * sizeof (*out);
> +if (gb.buffer[2] == 0xfc) {
> +B44_unpack3 (&gb, out);
> +gb.buffer += 3;
> +inSize -= 3;
> +} else {
> +B44_unpack14 (&gb, out);
> +gb.buffer += 14;
> +inSize -= 14;
> +}
> +if (y + 3 < s->ydelta) {
> +memcpy (row0, &out[ 0], num);
> +memcpy (row1, &out[ 4], num);
> +memcpy (row2, &out[ 8], num);
> +memcpy (row3, &out[12], num);
> +} else {
> +memcpy (row0, &out[ 0], num);
> +if (y + 1 < s->ydelta)
> +memcpy (row1, &out[ 4], num);
> +if (y + 2 < s->ydelta)
> +  

Re: [FFmpeg-devel] Fwd: GSoC: APNG

2015-03-24 Thread Michael Niedermayer
On Tue, Mar 24, 2015 at 02:17:29PM +, Donny Yang wrote:
> On 24 March 2015 at 10:45, Michael Niedermayer  wrote:
> 
> > the code already buffers the first frame and writes it in the
> > trailer function so by the time the frame is actually written its
> > known if its a single frame or multi frame file and the single frame
> > case could use syntax identical to PNG
> >
> Okay, I've updated the patches to do this

the generated png files seem to differ

./ffmpeg -i lena.pnm ref.png

-rw-r- 1 michael michael 180438 Mar 24 18:11 after-patches.png
-rw-r- 1 michael michael 180987 Mar 24 18:14 before-patches.png

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway


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


Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Drop support for old nvenc api

2015-03-24 Thread Michael Niedermayer
On Tue, Mar 24, 2015 at 09:34:43AM +, Carl Eugen Hoyos wrote:
>   rothenpieler.org> writes:
> 
> > + { check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" ||
> > +   die "ERROR: NVENC API version 4 or older is not supported"; } &&
> 
> This needs a Changelog entry (or similar).

added changelog entry and applied

thanks

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

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


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


Re: [FFmpeg-devel] ffmpeg chromium build on osx with ac3 and hevc impossible

2015-03-24 Thread smo

hello

sorry to ask again

even if chromium have his own build system, sources files looks the same 
than normal ffmpeg...


is it not only missing headers or something like that ?

maybe i can fix it myself

Le 24/03/2015 14:23, smo a écrit :

ok thanks will try to contact them

Le 24/03/2015 14:20, Derek Buitenhuis a écrit :

got a strange problem on ffmpeg only if i enable hevc and ac3 (no
>problems on linux and windows with same sources)
>
>here s the log
>
>http://paste.ubuntu.com/10668205/
>
>how can i fix it please?


___
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] Fwd: GSoC: APNG

2015-03-24 Thread Donny Yang
On 24 March 2015 at 10:45, Michael Niedermayer  wrote:

> the code already buffers the first frame and writes it in the
> trailer function so by the time the frame is actually written its
> known if its a single frame or multi frame file and the single frame
> case could use syntax identical to PNG
>
Okay, I've updated the patches to do this


> or is there some reason why a single image should be stored as APNG?
>
I don't believe so, other than testing an APNG implementation I suppose,
because the standard allows single frame APNGs

From 865efd812fb4bb081f31226d5eae722c9f1cd650 Mon Sep 17 00:00:00 2001
From: Donny Yang 
Date: Tue, 24 Mar 2015 09:47:20 +1100
Subject: [PATCH 1/2] apng: Make the PNG encoder output only a stream of bytes
 in APNG mode

This is in preparation for the APNG muxer which will take the bytes and
add the headers there
---
 configure  |   1 +
 libavcodec/Makefile|   1 +
 libavcodec/allcodecs.c |   2 +-
 libavcodec/pngenc.c| 374 -
 libavcodec/version.h   |   2 +-
 5 files changed, 247 insertions(+), 133 deletions(-)

diff --git a/configure b/configure
index 4827a4d..a7b92f3 100755
--- a/configure
+++ b/configure
@@ -2091,6 +2091,7 @@ amv_decoder_select="sp5x_decoder exif"
 amv_encoder_select="aandcttables mpegvideoenc"
 ape_decoder_select="bswapdsp llauddsp"
 apng_decoder_select="zlib"
+apng_encoder_select="huffyuvencdsp zlib"
 asv1_decoder_select="blockdsp bswapdsp idctdsp"
 asv1_encoder_select="bswapdsp fdctdsp pixblockdsp"
 asv2_decoder_select="blockdsp bswapdsp idctdsp"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 1a0c734..be7fd24 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -141,6 +141,7 @@ OBJS-$(CONFIG_ANM_DECODER) += anm.o
 OBJS-$(CONFIG_ANSI_DECODER)+= ansi.o cga_data.o
 OBJS-$(CONFIG_APE_DECODER) += apedec.o
 OBJS-$(CONFIG_APNG_DECODER)+= png.o pngdec.o pngdsp.o
+OBJS-$(CONFIG_APNG_ENCODER)+= png.o pngenc.o
 OBJS-$(CONFIG_SSA_DECODER) += assdec.o ass.o ass_split.o
 OBJS-$(CONFIG_SSA_ENCODER) += assenc.o ass.o
 OBJS-$(CONFIG_ASS_DECODER) += assdec.o ass.o ass_split.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 071446f..e3e68ab 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -107,7 +107,7 @@ void avcodec_register_all(void)
 REGISTER_ENCDEC (AMV,   amv);
 REGISTER_DECODER(ANM,   anm);
 REGISTER_DECODER(ANSI,  ansi);
-REGISTER_DECODER(APNG,  apng);
+REGISTER_ENCDEC (APNG,  apng);
 REGISTER_ENCDEC (ASV1,  asv1);
 REGISTER_ENCDEC (ASV2,  asv2);
 REGISTER_DECODER(AURA,  aura);
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 9bdefc4..a0ec970 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -24,6 +24,7 @@
 #include "bytestream.h"
 #include "huffyuvencdsp.h"
 #include "png.h"
+#include "apng.h"
 
 #include "libavutil/avassert.h"
 #include "libavutil/libm.h"
@@ -48,6 +49,11 @@ typedef struct PNGEncContext {
 uint8_t buf[IOBUF_SIZE];
 int dpi; ///< Physical pixel density, in dots per inch, if set
 int dpm; ///< Physical pixel density, in dots per meter, if set
+
+int is_progressive;
+int bit_depth;
+int color_type;
+int bits_per_pixel;
 } PNGEncContext;
 
 static void png_get_interlaced_row(uint8_t *dst, int row_size,
@@ -212,7 +218,7 @@ static void png_write_chunk(uint8_t **f, uint32_t tag,
 }
 
 /* XXX: do filtering */
-static int png_write_row(PNGEncContext *s, const uint8_t *data, int size)
+static int png_write_row(PNGEncContext *s, const uint8_t *data, int size, int write_tags)
 {
 int ret;
 
@@ -223,9 +229,15 @@ static int png_write_row(PNGEncContext *s, const uint8_t *data, int size)
 if (ret != Z_OK)
 return -1;
 if (s->zstream.avail_out == 0) {
-if (s->bytestream_end - s->bytestream > IOBUF_SIZE + 100)
-png_write_chunk(&s->bytestream,
-MKTAG('I', 'D', 'A', 'T'), s->buf, IOBUF_SIZE);
+if (s->bytestream_end - s->bytestream > IOBUF_SIZE + 100) {
+if (write_tags) {
+png_write_chunk(&s->bytestream,
+MKTAG('I', 'D', 'A', 'T'), s->buf, IOBUF_SIZE);
+} else {
+memcpy(s->bytestream, s->buf, IOBUF_SIZE);
+s->bytestream += IOBUF_SIZE;
+}
+}
 s->zstream.avail_out = IOBUF_SIZE;
 s->zstream.next_out  = s->buf;
 }
@@ -286,67 +298,114 @@ static int png_get_gama(enum AVColorTransferCharacteristic trc, uint8_t *buf)
 return 1;
 }
 
-static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
-const AVFrame *pict, int *got_pac

[FFmpeg-devel] [PATCH] Disabled mipsdspr1 under 74kc cpu and disabled all mips hardware acceleration by default.

2015-03-24 Thread shivraj.patil
From: Shivraj Patil 

---
 configure | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/configure b/configure
index 4827a4d..1a08347 100755
--- a/configure
+++ b/configure
@@ -3839,6 +3839,12 @@ elif enabled mips; then
 ;;
 74kc)
 disable mipsfpu
+disable mipsdspr1
+;;
+*)
+disable mipsfpu
+disable mipsdspr1
+disable mipsdspr2
 ;;
 esac
 
-- 
2.3.2

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


[FFmpeg-devel] [GSOC] random stuff

2015-03-24 Thread Michael Niedermayer
Hi everyone

for students, dont forget to submit an application to google before
the deadline, if you forget doing that theres nothing we can do after
the deadline.
Also make sure you have choosen and work on a qualification task.
If you are not yet working on one, make sure you choose one different
from other students, ask your mentor for what qualification task to
pick if you dont know.
Also make sure you are listed with the qualification task you work on
at:
https://trac.ffmpeg.org/wiki/SponsoringPrograms/GSoC/2015-Qualis

also if your application is for a project that many other students
want to work on (see the link above) then you might want to consider
to submit an application for some other project as well, see:
https://trac.ffmpeg.org/wiki/SponsoringPrograms/GSoC/2015


for mentors: If there are new students who have not yet picked a
qualification task, please make sure they understand that a
qualification task is needed, also make sure students dont forget
submitting an application to google

Thanks

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle


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


Re: [FFmpeg-devel] ffmpeg chromium build on osx with ac3 and hevc impossible

2015-03-24 Thread smo

ok thanks will try to contact them

Le 24/03/2015 14:20, Derek Buitenhuis a écrit :

got a strange problem on ffmpeg only if i enable hevc and ac3 (no
>problems on linux and windows with same sources)
>
>here s the log
>
>http://paste.ubuntu.com/10668205/
>
>how can i fix it please?


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


Re: [FFmpeg-devel] ffmpeg chromium build on osx with ac3 and hevc impossible

2015-03-24 Thread Derek Buitenhuis
On 3/24/2015 1:16 PM, smo wrote:
> got a strange problem on ffmpeg only if i enable hevc and ac3 (no 
> problems on linux and windows with same sources)
> 
> here s the log
> 
> http://paste.ubuntu.com/10668205/
> 
> how can i fix it please?

Chromium embeds their own copy of FFmpeg and uses their own build system.

As such, this is a question for Chromium.

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


[FFmpeg-devel] ffmpeg chromium build on osx with ac3 and hevc impossible

2015-03-24 Thread smo

hi

got a strange problem on ffmpeg only if i enable hevc and ac3 (no 
problems on linux and windows with same sources)


here s the log

http://paste.ubuntu.com/10668205/

how can i fix it please?

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


Re: [FFmpeg-devel] [PATCH] mov: check color parameter type explicitly. Fixes ticket #4387.

2015-03-24 Thread Michael Niedermayer
On Tue, Mar 24, 2015 at 11:26:30AM +0100, Jochen Strunk wrote:
> Hi,
> 
> this fixes ticket #4387. It accepts non-standard isom files like the
> panasonic sample attached to the ticket (with ’nclc’ color type instead of
> ’nclx’) which seems to me in this case is a better option than failing or
> falling back to defaults.

>  mov.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 5a569e4c0621a829efa94734acd32efe61c08d2f  
> 0001-mov-check-color-parameter-type-explicitly.-Fixes-tic.patch
> From 572146712c3182f2ef6b61127fcc1606905be673 Mon Sep 17 00:00:00 2001
> From: Jochen Strunk 
> Date: Tue, 24 Mar 2015 10:39:27 +0100
> Subject: [PATCH] mov: check color parameter type explicitly. Fixes ticket
>  #4387.

you are the 2nd who submits this fix

applied, thanks

[...]

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


[FFmpeg-devel] [PATCH] libavcodec/exr.c : A new exr lossy compression technique B44 is added

2015-03-24 Thread greeshma
The patch is made and FATE tests are done.It accepted, will submit with the
copyrights  and signature.The code is written based on openEXR algorithm of
B44 lossy compression and modified according to the FFmpeg code.


>From 9670e283f38b71c06457c976f3f2040c8d38bbd9 Mon Sep 17 00:00:00 2001
From: greeshmab 
Date: Tue, 24 Mar 2015 12:36:21 +0530
Subject: [PATCH] A new exr lossy compression technique B44 is added

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

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 6251fb7..b7114be 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -770,6 +770,124 @@ static int piz_uncompress(EXRContext *s, const
uint8_t *src, int ssize,
 return 0;
 }

+
+static void B44_unpack14 ( GetByteContext *gb, uint16_t out[16]){
+uint16_t shift;
+const uint8_t *r = gb->buffer;
+av_assert0(r[2] != 0xfc);
+out[0] = (r[0] << 8) | r[1];
+shift = (r[2] >> 2);
+out[ 1] = out[ 0] + ((r[ 5] >> 2) << shift);
+out[ 2] = out[ 1] + ((r[ 8] >> 2) << shift);
+out[ 3] = out[ 2] + ((r[11] >> 2) << shift);
+out[ 4] = out[ 0] + (((r[ 2] << 4) | (r[ 3] >> 4)) << shift);
+out[ 5] = out[ 4] + (((r[ 5] << 4) | (r[ 6] >> 4)) << shift);
+out[ 6] = out[ 5] + (((r[ 8] << 4) | (r[ 9] >> 4)) << shift);
+out[ 7] = out[ 6] + (((r[11] << 4) | (r[12] >> 4)) << shift);
+out[ 8] = out[ 4] + (((r[ 3] << 2) | (r[ 4] >> 6)) << shift);
+out[ 9] = out[ 8] + (((r[ 6] << 2) | (r[ 7] >> 6)) << shift);
+out[10] = out[ 9] + (((r[ 9] << 2) | (r[10] >> 6)) << shift);
+out[11] = out[10] + (((r[12] << 2) | (r[13] >> 6)) << shift);
+out[12] = out[ 8] + (r[ 4]  << shift);
+out[13] = out[12] + (r[ 7]  << shift);
+out[14] = out[13] + (r[10]  << shift);
+out[15] = out[14] + (r[13]  << shift);
+for (int i = 0; i < 16; ++i) {  //if any out value exceeds
16bits
+if (out[i] & 0x8000)
+out[i] &= 0x7fff;
+else
+out[i] = ~out[i];
+}
+}
+
+
+static void B44_unpack3 ( GetByteContext *gb, uint16_t out[16]){
+const uint8_t *r = gb->buffer;
//pixels have the same value
+av_assert0(r[2] == 0xfc);
+out[0] = (r[0] << 8) | r[1];
+if (out[0] & 0x8000)
+out[0] &= 0x7fff;
+else
+out[0] = ~out[0];
+for (int i = 1; i < 16; ++i)
+out[i] = out[0];
+}
+
+
+
+static int b44_uncompress(EXRContext *s, const uint8_t *src,int ssize, int
dsize, EXRThreadData *td)
+
+{
+GetByteContext gb;
+unsigned long  dest_len = dsize;
+uint8_t *out;
+int i, j;
+uint16_t *tmp = (uint16_t *)td->tmp;
+out = td->uncompressed_data;
+bytestream2_init(&gb, src, ssize);
+if (uncompress(td->tmp, &dest_len, src, ssize) != Z_OK || dest_len !=
dsize)
+return AVERROR_INVALIDDATA;
+for (i = 0; i < s->nb_channels; i++) {
+EXRChannel *channel = &s->channels[i];
+int size = channel->pixel_type;
+int inSize = ssize;
+if (channel->pixel_type != EXR_HALF) {  // UINT or
FLOAT channel.
+int n = s->xdelta * s->ydelta * size * sizeof (*tmp);
+memcpy (tmp, gb.buffer, n);
+gb.buffer += n;
+inSize -= n;
+continue;
+} else {//EXR_HALF
Channel
+for (int y=0; y < s->ydelta; y +=4 ) {
+uint16_t *row0 = tmp + y * s->xdelta;
+uint16_t *row1 = row0 + s->xdelta;
+uint16_t *row2 = row1 + s->xdelta;
+uint16_t *row3 = row2 + s->xdelta;
+for (int x = 0; x < s->xdelta; x += 4) {
+uint16_t out[16];
+int num = (x + 3 < s->xdelta)? 4 * sizeof (*out) :
(s->xdelta - x) * sizeof (*out);
+if (gb.buffer[2] == 0xfc) {
+B44_unpack3 (&gb, out);
+gb.buffer += 3;
+inSize -= 3;
+} else {
+B44_unpack14 (&gb, out);
+gb.buffer += 14;
+inSize -= 14;
+}
+if (y + 3 < s->ydelta) {
+memcpy (row0, &out[ 0], num);
+memcpy (row1, &out[ 4], num);
+memcpy (row2, &out[ 8], num);
+memcpy (row3, &out[12], num);
+} else {
+memcpy (row0, &out[ 0], num);
+if (y + 1 < s->ydelta)
+memcpy (row1, &out[ 4], num);
+if (y + 2 < s->ydelta)
+memcpy (row2, &out[ 8], num);
+}
+row0 += 4;
+row1 += 4;
+row2 += 4;
+row3 += 4;
+}
+}
+}
+}
+for (i = 0; i < s->ysize; i++) {
+   

[FFmpeg-devel] [PATCH] mov: check color parameter type explicitly. Fixes ticket #4387.

2015-03-24 Thread Jochen Strunk
Hi,

this fixes ticket #4387. It accepts non-standard isom files like the
panasonic sample attached to the ticket (with ’nclc’ color type instead of
’nclx’) which seems to me in this case is a better option than failing or
falling back to defaults.


0001-mov-check-color-parameter-type-explicitly.-Fixes-tic.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avutil/utils: remove unnecessary things

2015-03-24 Thread wm4
On Fri, 20 Mar 2015 18:33:37 +0100
Michael Niedermayer  wrote:

> On Fri, Mar 20, 2015 at 05:41:43PM +0100, wm4 wrote:
> > The checks for the enums all were added in 2011 and 2012. They were
> > likely for checking that Libav changes do not change the FFmpeg ABI.
> > Given the amount of changes in the last 3 years, and the fact that
> > barely any other ABI specifics are tested, keeping these tests makes
> > not much sense anymore.
> 
> The tests check that ABI is not broken, for example if someone added
> a entry in the middle of a enum it would break ABI to our own
> previous release with same so-name.
> its better if the assert punches the person who puts that in the
> middle of a enum straight in the face instead of it being posted
> to the mailing list and someone needing to ask for it to be fixed
> and reposted with it moved to the end

Such invalid changes are easily caught in the patch reviews.

> Testing for this in a cleaner way is very welcome of course

Sure, but these barely test anything anyway and are not worth for the
required uglification. You can just move them into some test program if
you really want them.

> 
> > 
> > The assertion checking for "((size_t)-1) > 0" is useless. The condition
> 
> probably ok
> 
> 
> [...]
> 
> > The av_sat_dadd32() test was added in 2012 to check for broken ARM
> > binutils. Even if anyone argues that this is still relevant, it should
> > be done in configure instead. (And always should have.) The binutils
> > bug report (as cited in the original ffmpeg-devel thread discussing
> > this patch) was marked as fixed in 2009.
> 
> If this test can be done in configure and is reliable, iam in favor
> of doing it in configure as well
> 
> 
> > 
> > The llrint() was added in 2013 for NetBSD. I don't see what printing a
> > message changes. (Apparently nothing; from what I can see NetBSD didn't
> > touch its llrint implementation since 2004.) If it's critical, just make
> > configure refuse to run if NetBSD is detected, or print a compile-time
> > warning, or do not use llrint.
> 
> IMO its better to test for a problem than to test for the platform
> that has the problem.
> Other platforms do have issues with some *rint() functions too IIRC
> also most of the codecs wont be affected so hard failing in configure
> is not very nice to the user

But it's nicer to print an easily missed warning on program start after
configure, compilation, and installation are done?

If most of the codecs are affected, then it's just an argument for
removing the check entirely, too.

> 
> 
> [...]
> 
> > -av_assert0(LIBAVUTIL_VERSION_MICRO >= 100);
> > -av_assert0(HAVE_MMX2 == HAVE_MMXEXT);
> 
> These 2 lack any explanation of why they would be removed in the
> commit message
> 
> [...]

Nobody would do anything that these assertions trigger, plus it's
easily caught in patch review.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Drop support for old nvenc api

2015-03-24 Thread Carl Eugen Hoyos
  rothenpieler.org> writes:

> + { check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" ||
> +   die "ERROR: NVENC API version 4 or older is not supported"; } &&

This needs a Changelog entry (or similar).

Sorry, Carl Eugen

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


[FFmpeg-devel] [PATCH] avcodec/nvenc: Drop support for old nvenc api

2015-03-24 Thread timo
From: Timo Rothenpieler 

---
 configure  |  2 ++
 libavcodec/nvenc.c | 16 
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/configure b/configure
index 4827a4d..ede517e 100755
--- a/configure
+++ b/configure
@@ -4998,6 +4998,8 @@ enabled libxvid   && require libxvid xvid.h 
xvid_global -lxvidcore
 enabled libzmq&& require_pkg_config libzmq zmq.h zmq_ctx_new
 enabled libzvbi   && require libzvbi libzvbi.h vbi_decoder_new -lzvbi
 enabled nvenc && { 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"; } &&
  { [ $target_os != cygwin ] || die "ERROR: NVENC 
is not supported on Cygwin currently."; }
 enabled openal&& { { for al_libs in "${OPENAL_LIBS}" "-lopenal" 
"-lOpenAL32"; do
check_lib 'AL/al.h' alGetError "${al_libs}" && 
break; done } ||
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 22956b9..0dec720 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -67,10 +67,6 @@ typedef CUresult(CUDAAPI *PCUCTXDESTROY)(CUcontext ctx);
 
 typedef NVENCSTATUS (NVENCAPI* 
PNVENCODEAPICREATEINSTANCE)(NV_ENCODE_API_FUNCTION_LIST *functionList);
 
-#if NVENCAPI_MAJOR_VERSION < 5
-static const GUID dummy_license = { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x0, 0x0 } };
-#endif
-
 typedef struct NvencInputSurface
 {
 NV_ENC_INPUT_PTR input_surface;
@@ -474,10 +470,6 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
 int res = 0;
 int dw, dh;
 
-#if NVENCAPI_MAJOR_VERSION < 5
-GUID license = dummy_license;
-#endif
-
 NvencContext *ctx = avctx->priv_data;
 NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
 NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs;
@@ -500,10 +492,6 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
 encode_session_params.version = NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER;
 encode_session_params.apiVersion = NVENCAPI_VERSION;
 
-#if NVENCAPI_MAJOR_VERSION < 5
-encode_session_params.clientKeyPtr = &license;
-#endif
-
 if (ctx->gpu >= dl_fn->nvenc_device_count) {
 av_log(avctx, AV_LOG_FATAL, "Requested GPU %d, but only %d GPUs are 
available!\n", ctx->gpu, dl_fn->nvenc_device_count);
 res = AVERROR(EINVAL);
@@ -1108,10 +1096,6 @@ static int nvenc_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 pic_params.codecPicParams.h264PicParams.sliceMode = 
ctx->encode_config.encodeCodecConfig.h264Config.sliceMode;
 pic_params.codecPicParams.h264PicParams.sliceModeData = 
ctx->encode_config.encodeCodecConfig.h264Config.sliceModeData;
 
-#if NVENCAPI_MAJOR_VERSION < 5
-memcpy(&pic_params.rcParams, &ctx->encode_config.rcParams, 
sizeof(NV_ENC_RC_PARAMS));
-#endif
-
 res = timestamp_queue_enqueue(&ctx->timestamp_list, frame->pts);
 
 if (res)
-- 
2.3.3

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


Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Drop support for old nvenc api

2015-03-24 Thread Timo Rothenpieler

Am 24.03.2015 um 10:03 schrieb Carl Eugen Hoyos:

   rothenpieler.org> writes:


+#if NVENCAPI_MAJOR_VERSION < 5
+#error "NVENC API 4 or older is not supported"
+#endif


This should be checked in configure imo.


Yes, would indeed be better.


Could you confirm that the new api is available
and that it works for all hardware that the old
api supported?


Yes, it only raises the minimum required nvidia driver version to 347.09 
on windows and 346.22 on linux.



Carl Eugen





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


Re: [FFmpeg-devel] [PATCH] Added changes in configuration file as per MIPS MSA.

2015-03-24 Thread Carl Eugen Hoyos
Carl Eugen Hoyos  ag.or.at> writes:

> > +*)
> > +disable mipsfpu
> > +disable mips32r2
> > +disable mipsdspr1
> > +disable mipsdspr2
> > +disable mips32r5
> > +disable mips64r6
> 
> This whole part looks unrelated to the commit message:
> Please make it a separate commit.

Consider to also split between "added p5600 and 
i6400" and "Disable all mips hardware 
acceleration by default".

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Drop support for old nvenc api

2015-03-24 Thread Carl Eugen Hoyos
  rothenpieler.org> writes:

> +#if NVENCAPI_MAJOR_VERSION < 5
> +#error "NVENC API 4 or older is not supported"
> +#endif

This should be checked in configure imo.

Could you confirm that the new api is available 
and that it works for all hardware that the old 
api supported?

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] Added changes in configuration file as per MIPS MSA.

2015-03-24 Thread Carl Eugen Hoyos
  imgtec.com> writes:

> +p5600)
> +disable mips32r2
> +disable mipsdspr1
> +disable mipsdspr2
> +enable mips32r5
> +
> +add_cflags "-mtune=p5600" && add_asflags 
> "-mtune=p5600" && add_ldflags "-march=p5600"
> +;;
> +i6400)
> +disable mips32r2
> +disable mipsdspr1
> +disable mipsdspr2
> +disable mipsfpu
> +enable mips64r6
> +
> +add_cflags "-mtune=i6400" && add_asflags "
> -mtune=i6400" && add_ldflags "-march=i6400"
> +;;
> +*)
> +disable mipsfpu
> +disable mips32r2
> +disable mipsdspr1
> +disable mipsdspr2
> +disable mips32r5
> +disable mips64r6

This whole part looks unrelated to the commit message:
Please make it a separate commit.

Judging from many bug reports, especially the "*" 
case makes a lot of sense but it needs a (short) 
entry to the Changelog.

Carl Eugen

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


[FFmpeg-devel] [PATCH] Added changes in configuration file as per MIPS MSA.

2015-03-24 Thread shivraj.patil
From: Shivraj Patil 

---
 configure | 46 ++
 1 file changed, 46 insertions(+)

diff --git a/configure b/configure
index 4827a4d..8ddc604 100755
--- a/configure
+++ b/configure
@@ -361,6 +361,7 @@ Optimization options (experts only):
   --disable-yasm   disable use of nasm/yasm assembly
   --disable-mipsdspr1  disable MIPS DSP ASE R1 optimizations
   --disable-mipsdspr2  disable MIPS DSP ASE R2 optimizations
+  --disable-msadisable MSA optimizations
   --disable-mipsfpudisable floating point MIPS optimizations
   --disable-fast-unaligned consider unaligned accesses slow
 
@@ -1564,6 +1565,7 @@ ARCH_EXT_LIST_MIPS="
 mips32r2
 mipsdspr1
 mipsdspr2
+msa
 "
 
 ARCH_EXT_LIST_X86_SIMD="
@@ -2003,6 +2005,7 @@ map 'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM
 mipsfpu_deps="mips"
 mipsdspr1_deps="mips"
 mipsdspr2_deps="mips"
+msa_deps="mips"
 
 altivec_deps="ppc"
 ppc4xx_deps="ppc"
@@ -3825,20 +3828,52 @@ elif enabled mips; then
 disable mipsfpu
 disable mipsdspr1
 disable mipsdspr2
+disable msa
 ;;
 24kf*)
 disable mipsdspr1
 disable mipsdspr2
+disable msa
 ;;
 24kec|34kc|1004kc)
 disable mipsfpu
 disable mipsdspr2
+disable msa
 ;;
 24kef*|34kf*|1004kf*)
 disable mipsdspr2
+disable msa
 ;;
 74kc)
 disable mipsfpu
+disable mipsdspr1
+disable msa
+;;
+p5600)
+disable mips32r2
+disable mipsdspr1
+disable mipsdspr2
+enable mips32r5
+
+add_cflags "-mtune=p5600" && add_asflags "-mtune=p5600" && 
add_ldflags "-march=p5600"
+;;
+i6400)
+disable mips32r2
+disable mipsdspr1
+disable mipsdspr2
+disable mipsfpu
+enable mips64r6
+
+add_cflags "-mtune=i6400" && add_asflags "-mtune=i6400" && 
add_ldflags "-march=i6400"
+;;
+*)
+disable mipsfpu
+disable mips32r2
+disable mipsdspr1
+disable mipsdspr2
+disable mips32r5
+disable mips64r6
+disable msa
 ;;
 esac
 
@@ -4594,16 +4629,26 @@ elif enabled mips; then
 add_cflags "-mips64"
 add_asflags "-mips64"
 elif enabled mipsfpu || enabled mipsdspr1 || enabled mipsdspr2; then
+if [ "$cpu" != p5600 ] && ["$cpu" != i6400 ]; then
 add_cflags "-mips32r2"
 add_asflags "-mips32r2"
+fi
 fi
 
+enabled mips32r5 && add_cflags "-mips32r5 -msched-weight 
-mload-store-pairs -funroll-loops -mfp64" &&
+ add_asflags "-mips32r5 -mfp64" && add_ldflags "-mips32r5 -mfp64" &&
+ check_inline_asm mips32r5  '"rotr $t0, $t1, 1"'
+enabled mips64r6  && add_cflags "-mips64r6 -msched-weight 
-mload-store-pairs -funroll-loops -mabi=64" &&
+ add_ldflags "-mips64r6 -mabi=64" && add_asflags "-mips64r6 -mabi=64" &&
+ check_inline_asm mips64r6 '"aui $t0, $t1, 1"'
 enabled mipsdspr1 && add_cflags "-mdsp" && add_asflags "-mdsp" &&
  check_inline_asm mipsdspr1 '"addu.qb $t0, $t1, $t2"'
 enabled mipsdspr2 && add_cflags "-mdspr2" && add_asflags "-mdspr2" &&
  check_inline_asm mipsdspr2 '"absq_s.qb $t0, $t1"'
 enabled mipsfpu   && add_cflags "-mhard-float" && add_asflags 
"-mhard-float" &&
  check_inline_asm mipsfpu   '"madd.d $f0, $f2, $f4, $f6"'
+enabled msa && add_cflags "-mmsa -mfp64 -flax-vector-conversions" && 
add_ldflags "-mmsa -mfp64" &&
+ check_inline_asm msa '"addvi.b $w0, $w1, 1"'
 
 elif enabled parisc; then
 
@@ -5556,6 +5601,7 @@ if enabled mips; then
 echo "MIPS FPU enabled  ${mipsfpu-no}"
 echo "MIPS DSP R1 enabled   ${mipsdspr1-no}"
 echo "MIPS DSP R2 enabled   ${mipsdspr2-no}"
+echo "MIPS MSA enabled  ${msa-no}"
 fi
 if enabled ppc; then
 echo "AltiVec enabled   ${altivec-no}"
-- 
2.3.2

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


[FFmpeg-devel] [PATCH] avcodec/nvenc: Drop support for old nvenc api

2015-03-24 Thread timo
From: Timo Rothenpieler 

---
 libavcodec/nvenc.c | 20 
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 22956b9..7d04afc 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -36,6 +36,10 @@
 #include "internal.h"
 #include "thread.h"
 
+#if NVENCAPI_MAJOR_VERSION < 5
+#error "NVENC API 4 or older is not supported"
+#endif
+
 #if defined(_WIN32)
 #define CUDAAPI __stdcall
 #else
@@ -67,10 +71,6 @@ typedef CUresult(CUDAAPI *PCUCTXDESTROY)(CUcontext ctx);
 
 typedef NVENCSTATUS (NVENCAPI* 
PNVENCODEAPICREATEINSTANCE)(NV_ENCODE_API_FUNCTION_LIST *functionList);
 
-#if NVENCAPI_MAJOR_VERSION < 5
-static const GUID dummy_license = { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x0, 0x0 } };
-#endif
-
 typedef struct NvencInputSurface
 {
 NV_ENC_INPUT_PTR input_surface;
@@ -474,10 +474,6 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
 int res = 0;
 int dw, dh;
 
-#if NVENCAPI_MAJOR_VERSION < 5
-GUID license = dummy_license;
-#endif
-
 NvencContext *ctx = avctx->priv_data;
 NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs;
 NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs;
@@ -500,10 +496,6 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
 encode_session_params.version = NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER;
 encode_session_params.apiVersion = NVENCAPI_VERSION;
 
-#if NVENCAPI_MAJOR_VERSION < 5
-encode_session_params.clientKeyPtr = &license;
-#endif
-
 if (ctx->gpu >= dl_fn->nvenc_device_count) {
 av_log(avctx, AV_LOG_FATAL, "Requested GPU %d, but only %d GPUs are 
available!\n", ctx->gpu, dl_fn->nvenc_device_count);
 res = AVERROR(EINVAL);
@@ -1108,10 +1100,6 @@ static int nvenc_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 pic_params.codecPicParams.h264PicParams.sliceMode = 
ctx->encode_config.encodeCodecConfig.h264Config.sliceMode;
 pic_params.codecPicParams.h264PicParams.sliceModeData = 
ctx->encode_config.encodeCodecConfig.h264Config.sliceModeData;
 
-#if NVENCAPI_MAJOR_VERSION < 5
-memcpy(&pic_params.rcParams, &ctx->encode_config.rcParams, 
sizeof(NV_ENC_RC_PARAMS));
-#endif
-
 res = timestamp_queue_enqueue(&ctx->timestamp_list, frame->pts);
 
 if (res)
-- 
2.3.3

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


Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Add support for H.265 encoding

2015-03-24 Thread Timo Rothenpieler

Am 24.03.2015 um 05:41 schrieb Philip Langdale:

Sufficiently new nvenc hardware (GM20x or later) has support for H.265
encoding. This works the same as the H.264 encoder except the
codec parameters are different.

Due to the fact that common codec parameters are not shareable, there's
quite a bit of conditional logic you'd wish we could do without, but
such is life.

Note that this feature requires the 5.0 SDK or newer to compile. I'm not
sure what we gain from supporting the older SDKs, so I'm inclined to
make this unconditional and remove the < 5 support that currently exists.


Yes, I did exactly that in my implementation:

https://github.com/BtbN/FFmpeg/commits/nvenc

The code i wrote there is completely untested(Except that h264 still 
works), because i don't have any compatible hardware, so the one you 
tested is clearly the one that should be prefered.


Dropping SDK <5 support is fine with me, as long as it's not backported 
to 2.6. The primary gain from supporting the old SDK is that it works 
with much older nvidia driver versions.


I'll submit the patch that drops the old API support, so you can rebase 
your patch on top of it.


Looks good to merge otherwise.



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


[FFmpeg-devel] [PATCH] Build scripts for WinRT

2015-03-24 Thread Simon Ferquel
Hi all,


I have needed libavformat/libavcodec for a drone piloting app project 
targetting (among others) the Windows modern platform (Win81 modern, Windows 
Phone, and Xbox one in a near future).

To make it easier to generate static libs for all the combinations of os 
(win81/wp81), architecture (armv7, x86, x64) and C runtime configurations 
(debug CRT DLL or release CRT DLL), I wrote some bash scripts automating the 
setup of the environment variables needed for msvc, as well as the different 
flags to pass to the compiler to generate valid libraries for the modern 
windows app platform.

This patch adds a bldwinrt folder with only bash scripts in it. They must be 
run in the msys2 environment and have been tested on Windows 8.1 64bit.


A following patch will come with build scripts targetting the newly released 
Windows 10 common sdk (no more separate libs for Windows, Windows Phone and 
Xbox one with this one).


Simon

bin8GkKc6ZC9Z.bin
Description: 0001-Build-for-WinRT-bash-scripts-for-easing-the-build-fo.patch
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/utils: Terminate SPS in avci100_1080i_extradata to avoid warnings during parsing

2015-03-24 Thread Carl Eugen Hoyos
Reimar Döffinger  gmx.de> writes:

> > -0x00, 0x08, 0x00, 0x00, 0x03, 0x01, 0x94, 0x00,
> > +0x00, 0x08, 0x00, 0x00, 0x03, 0x01, 0x94, 0x20,
> 
> Well, going by your description it makes a lot of sense, 
> but I thought someone copy-pasted this from some 
> reference files/specification/conversion program?

The copy-pasted extradata contained another error 
(the aspect ratio was wrong).

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


Re: [FFmpeg-devel] [PATCH] avformat/utils: Terminate SPS in avci100_1080i_extradata to avoid warnings during parsing

2015-03-24 Thread Reimar Döffinger
On 23.03.2015, at 22:05, Michael Niedermayer  wrote:
> Signed-off-by: Michael Niedermayer 
> ---
> libavformat/utils.c |2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 6a0f666..6eec7a1 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -4345,7 +4345,7 @@ int ff_generate_avci_extradata(AVStream *st)
> 0x11, 0x12, 0x08, 0xc6, 0x8c, 0x04, 0x41, 0x28,
> 0x4c, 0x34, 0xf0, 0x1e, 0x01, 0x13, 0xf2, 0xe0,
> 0x3c, 0x60, 0x20, 0x20, 0x28, 0x00, 0x00, 0x03,
> -0x00, 0x08, 0x00, 0x00, 0x03, 0x01, 0x94, 0x00,
> +0x00, 0x08, 0x00, 0x00, 0x03, 0x01, 0x94, 0x20,

Well, going by your description it makes a lot of sense, but I thought someone
copy-pasted this from some reference files/specification/conversion program?
It might be that the source for these was a bit buggy though, I think we saw 
that in some other case for AVCI.
If nobody has a good answer I'd say apply it. My biggest concern is that some 
programs may no longer recognize the stream as AVCI compatible after conversion 
with this change, but probably it's not an issue in reality.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] OpenExr Compression technique added -GSoc 15

2015-03-24 Thread greeshma
Got it corrected,New patch
The code is based on Openexr.

Author: greeshmab   2015-03-24 12:36:21
Committer: greeshmab   2015-03-24 12:36:21
Parent: 4c54709b600ff6a92377ab3e2d5fa33b31970288 (A new EXR lossy
compression technique B44 is added)
Branch: temp
Follows: n2.6-dev
Precedes:

A new exr lossy compression technique B44 is added

--- libavcodec/exr.c
---
index 6251fb7..b7114be 100644
@@ -770,6 +770,124 @@ static int piz_uncompress(EXRContext *s, const
uint8_t *src, int ssize,
 return 0;
 }

+
+static void B44_unpack14 ( GetByteContext *gb, uint16_t out[16]){
+uint16_t shift;
+const uint8_t *r = gb->buffer;
+av_assert0(r[2] != 0xfc);
+out[0] = (r[0] << 8) | r[1];
+shift = (r[2] >> 2);
+out[ 1] = out[ 0] + ((r[ 5] >> 2) << shift);
+out[ 2] = out[ 1] + ((r[ 8] >> 2) << shift);
+out[ 3] = out[ 2] + ((r[11] >> 2) << shift);
+out[ 4] = out[ 0] + (((r[ 2] << 4) | (r[ 3] >> 4)) << shift);
+out[ 5] = out[ 4] + (((r[ 5] << 4) | (r[ 6] >> 4)) << shift);
+out[ 6] = out[ 5] + (((r[ 8] << 4) | (r[ 9] >> 4)) << shift);
+out[ 7] = out[ 6] + (((r[11] << 4) | (r[12] >> 4)) << shift);
+out[ 8] = out[ 4] + (((r[ 3] << 2) | (r[ 4] >> 6)) << shift);
+out[ 9] = out[ 8] + (((r[ 6] << 2) | (r[ 7] >> 6)) << shift);
+out[10] = out[ 9] + (((r[ 9] << 2) | (r[10] >> 6)) << shift);
+out[11] = out[10] + (((r[12] << 2) | (r[13] >> 6)) << shift);
+out[12] = out[ 8] + (r[ 4]  << shift);
+out[13] = out[12] + (r[ 7]  << shift);
+out[14] = out[13] + (r[10]  << shift);
+out[15] = out[14] + (r[13]  << shift);
+for (int i = 0; i < 16; ++i) {  //if any out value exceeds
16bits
+if (out[i] & 0x8000)
+out[i] &= 0x7fff;
+else
+out[i] = ~out[i];
+}
+}
+
+
+static void B44_unpack3 ( GetByteContext *gb, uint16_t out[16]){
+const uint8_t *r = gb->buffer;
//pixels have the same value
+av_assert0(r[2] == 0xfc);
+out[0] = (r[0] << 8) | r[1];
+if (out[0] & 0x8000)
+out[0] &= 0x7fff;
+else
+out[0] = ~out[0];
+for (int i = 1; i < 16; ++i)
+out[i] = out[0];
+}
+
+
+
+static int b44_uncompress(EXRContext *s, const uint8_t *src,int ssize, int
dsize, EXRThreadData *td)
+
+{
+GetByteContext gb;
+unsigned long  dest_len = dsize;
+uint8_t *out;
+int i, j;
+uint16_t *tmp = (uint16_t *)td->tmp;
+out = td->uncompressed_data;
+bytestream2_init(&gb, src, ssize);
+if (uncompress(td->tmp, &dest_len, src, ssize) != Z_OK || dest_len !=
dsize)
+return AVERROR_INVALIDDATA;
+for (i = 0; i < s->nb_channels; i++) {
+EXRChannel *channel = &s->channels[i];
+int size = channel->pixel_type;
+int inSize = ssize;
+if (channel->pixel_type != EXR_HALF) {  // UINT or
FLOAT channel.
+int n = s->xdelta * s->ydelta * size * sizeof (*tmp);
+memcpy (tmp, gb.buffer, n);
+gb.buffer += n;
+inSize -= n;
+continue;
+} else {//EXR_HALF
Channel
+for (int y=0; y < s->ydelta; y +=4 ) {
+uint16_t *row0 = tmp + y * s->xdelta;
+uint16_t *row1 = row0 + s->xdelta;
+uint16_t *row2 = row1 + s->xdelta;
+uint16_t *row3 = row2 + s->xdelta;
+for (int x = 0; x < s->xdelta; x += 4) {
+uint16_t out[16];
+int num = (x + 3 < s->xdelta)? 4 * sizeof (*out) :
(s->xdelta - x) * sizeof (*out);
+if (gb.buffer[2] == 0xfc) {
+B44_unpack3 (&gb, out);
+gb.buffer += 3;
+inSize -= 3;
+} else {
+B44_unpack14 (&gb, out);
+gb.buffer += 14;
+inSize -= 14;
+}
+
+if (y + 3 < s->ydelta) {
+memcpy (row0, &out[ 0], num);
+memcpy (row1, &out[ 4], num);
+memcpy (row2, &out[ 8], num);
+memcpy (row3, &out[12], num);
+} else {
+memcpy (row0, &out[ 0], num);
+if (y + 1 < s->ydelta)
+memcpy (row1, &out[ 4], num);
+if (y + 2 < s->ydelta)
+memcpy (row2, &out[ 8], num);
+}
+row0 += 4;
+row1 += 4;
+row2 += 4;
+row3 += 4;
+}
+}
+}
+}
+for (i = 0; i < s->ysize; i++) {
+for (j = 0; j < s->nb_channels; j++) {
+uint16_t *in = tmp + j * s->xdelta * s->ysize + i * s->xdelta;
+memcpy(out, in, s->xdelta * 2);
+out += s->xdelta * 2;
+