Re: [FFmpeg-devel] [PATCH 01/12] libavcodec: Implementation of AAC_fixed_decoder (LC-module) [1/4]

2015-06-29 Thread Nedeljko Babic
On Sat, Jun 27, 2015 at 02:43:31AM +0200, Michael Niedermayer wrote:
 On Fri, Jun 12, 2015 at 08:15:51AM +, Nedeljko Babic wrote:
  On Thu, Jun 11, 2015 at 4:08 PM, Nedeljko Babic
  nedeljko.babic at imgtec.com wrote:
   From: Jovan Zelincevic jovan.zelincevic at imgtec.com
  
   Move existing code to the new template files
  
  
  Please setup your Git to track renames (add -M parameter), this is
  really hard to review in this form.
  
  This patch is just moving parts of the code that can be used in both float 
  and
  in fixed aac in appropriate template files.
  
  It does not do renames (or anything else for that matter).
  
  For example, the parts of code are moved from aacdec.c to new 
  aacdec_template.c,
  but original file is still present with what was left of the code.
  
  Adding -M will not change anything in the patch.
  
  I tried from -M20% to -M75% just to be sure.
 
 this needs -C
 like in
 
 git format-patch  -1 -C -C -C #P

it seems a single -C is enough, i thought yesterday it required
multiple -C

Ok, I'll recreate the patches with this option and resend them.
Thanks.

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


Re: [FFmpeg-devel] [PATCH 04/12] libavcodec: Implementation of AAC_fixed_decoder (LC-module) [4/4]

2015-06-29 Thread Nedeljko Babic
 From: Jovan Zelincevic jovan.zelincevic at imgtec.com
 
 Build system modified
 
 Signed-off-by: Nedeljko Babic nedeljko.babic at imgtec.com
 ---
  configure |  1 +
  libavcodec/Makefile   | 13 ++---
  libavcodec/aacdec.c   |  1 -
  libavcodec/aacdec_fixed.c |  1 -
  libavcodec/allcodecs.c|  1 +
  5 files changed, 12 insertions(+), 5 deletions(-)

this adds some build warnings:
In file included from libavcodec/aacdec_fixed.c:426:0:
libavcodec/aacdec_template.c: In function ‘apply_tns’:
libavcodec/aacdec_template.c:2360:13: warning: passing argument 1 of 
‘compute_lpc_coefs’ from incompatible pointer type [enabled by default]
libavcodec/lpc.h:155:19: note: expected ‘const float *’ but argument is of 
type ‘int *’
libavcodec/aacdec_template.c:2360:13: warning: passing argument 3 of 
‘compute_lpc_coefs’ from incompatible pointer type [enabled by default]
libavcodec/lpc.h:155:19: note: expected ‘float *’ but argument is of type ‘int 
*’

These warnings are added because this part of code logically belongs 
to sbr module and definitions of macros for types used here are added 
in later patches (for sbr module).
When code is built with all the patches there are no warnings here.
Is this a problem?

libavcodec/aacdec_template.c: In function ‘imdct_and_windowing_ld’:
libavcodec/aacdec_template.c:2570:5: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]

This warning is due to me trying to simplify the code a little bit...
I tried to avoid adding additional #if just for declaration of one 
variable so this declaration is in the code.

libavcodec/aacdec_template.c: In function ‘imdct_and_windowing_eld’:
libavcodec/aacdec_template.c:2599:64: warning: pointer type mismatch in 
conditional expression [enabled by default]

As I mentioned earlier post, ER AAC ELD 480 added to float aac decoder a 
while ago is not integrated in to the fixed point implementation.
This warning is here because there is no ff_aac_eld_window_480 table 
defined for fixed point implementation.
I think that it should stay here as a remainder for additional work 
that needs to be done on fixed point aac.

In file included from libavcodec/aacdec_fixed.c:426:0:
libavcodec/aacdec_template.c: In function ‘spectral_to_sample’:
libavcodec/aacdec_template.c:2739:25: warning: passing argument 4 of 
‘ff_sbr_apply’ from incompatible pointer type [enabled by default]
libavcodec/aacsbr.h:46:6: note: expected ‘float *’ but argument is of type 
‘int *’
libavcodec/aacdec_template.c:2739:25: warning: passing argument 5 of 
‘ff_sbr_apply’ from incompatible pointer type [enabled by default]
libavcodec/aacsbr.h:46:6: note: expected ‘float *’ but argument is of type 
‘int *’

Cause for these warnings is similar as for the first ones: needed 
definitions are added in later patches (that make changes in sbr module).
When all the patches are applied there are no warnings here.

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


Re: [FFmpeg-devel] [PATCH]asfdec: Reduce minimum header size (was: New asf demuxer)

2015-06-29 Thread Derek Buitenhuis
On 6/29/2015 11:01 AM, Hendrik Leppkes wrote:
 Just on code quality alone, I think it would be much more productive
 if you look for the opposite and fix those.
 
 Trying to juke the stats after-the-fact by fixing the old one now is
 not going to change anything. :p

But then how can he hate on Libav?

Anyway, I thought it was worth noting that the idea of lowering
the minimum header size was thrown around before (back when MSS1/2
was added IIRC), and it was deemed problematic. I can't quite recall
the specific reason, though; I'd have to look it up in the archives.

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


[FFmpeg-devel] [PATCH] lavfi: add (a)drawgraph filter

2015-06-29 Thread Paul B Mahol
Signed-off-by: Paul B Mahol one...@gmail.com
---
 Changelog |   1 +
 doc/filters.texi  | 101 ++
 libavfilter/Makefile  |   2 +
 libavfilter/allfilters.c  |   2 +
 libavfilter/f_drawgraph.c | 346 ++
 5 files changed, 452 insertions(+)
 create mode 100644 libavfilter/f_drawgraph.c

diff --git a/Changelog b/Changelog
index e3c94c7..f89c915 100644
--- a/Changelog
+++ b/Changelog
@@ -10,6 +10,7 @@ version next:
 - ssim filter
 - rewritten ASF demuxer
 - showvolume filter
+- adrawgraph audio and drawgraph video filter
 
 
 version 2.7:
diff --git a/doc/filters.texi b/doc/filters.texi
index 8b2c5ea..8a2f44b 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -3965,6 +3965,105 @@ 
drawbox=x=-t:y=0.5*(ih-iw/2.4)-t:w=iw+t*2:h=iw/2.4+t*2:t=2:c=red
 @end example
 @end itemize
 
+@section drawgraph, adrawgraph
+
+Draw a graph using input video or audio metadata.
+
+It accepts the following parameters:
+
+@table @option
+@item m1
+Set 1st frame metadata key from which metadata values will be used to draw a 
graph.
+
+@item fg1
+Set 1st foreground color expression.
+
+@item m2
+Set 2nd frame metadata key from which metadata values will be used to draw a 
graph.
+
+@item fg2
+Set 2nd foreground color expression.
+
+@item m3
+Set 3rd frame metadata key from which metadata values will be used to draw a 
graph.
+
+@item fg3
+Set 3rd foreground color expression.
+
+@item m4
+Set 4th frame metadata key from which metadata values will be used to draw a 
graph.
+
+@item fg4
+Set 4th foreground color expression.
+
+@item min
+Set minimal value of metadata value.
+
+@item max
+Set maximal value of metadata value.
+
+@item bg
+Set graph background color. Default is white.
+
+@item mode
+Set graph mode.
+
+Available values for mode is:
+@table @samp
+@item bar
+@item dot
+@item line
+@end table
+
+Default is @code{line}.
+
+@item slide
+Set slide mode.
+
+Available values for slide is:
+@table @samp
+@item frame
+Draw new frame when right border is reached.
+
+@item replace
+Replace old columns with new ones.
+
+@item scroll
+Scroll from right to left.
+@end table
+
+Default is @code{frame}.
+
+@item size
+Set size of graph video. For the syntax of this option, check the
+@ref{video size syntax,,Video size section in the ffmpeg-utils 
manual,ffmpeg-utils}.
+The default value is @code{900x256}.
+
+The foreground color expressions can use the following variables:
+@table @option
+@item MIN
+Minimal value of metadata value.
+
+@item MAX
+Maximal value of metadata value.
+
+@item VAL
+Current metadata key value.
+@end table
+
+The color is defined as 0xAABBGGRR.
+@end table
+
+Example using metadata from @ref{signalstats} filter:
+@example
+signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
+@end example
+
+Example using metadata from @ref{ebur128} filter:
+@example
+ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
+@end example
+
 @section drawgrid
 
 Draw a grid on the input image.
@@ -8604,6 +8703,7 @@ Swap the second and third planes of the input:
 ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT
 @end example
 
+@anchor{signalstats}
 @section signalstats
 Evaluate various visual metrics that assist in determining issues associated
 with the digitization of analog video media.
@@ -11034,6 +11134,7 @@ do not have exactly the same duration in the first file.
 
 @end itemize
 
+@anchor{ebur128}
 @section ebur128
 
 EBU R128 scanner filter. This filter takes an audio stream as input and outputs
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index a5d7fc1..3e899f2 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -117,6 +117,7 @@ OBJS-$(CONFIG_DELOGO_FILTER) += vf_delogo.o
 OBJS-$(CONFIG_DESHAKE_FILTER)+= vf_deshake.o
 OBJS-$(CONFIG_DETELECINE_FILTER) += vf_detelecine.o
 OBJS-$(CONFIG_DRAWBOX_FILTER)+= vf_drawbox.o
+OBJS-$(CONFIG_DRAWGRAPH_FILTER)  += f_drawgraph.o
 OBJS-$(CONFIG_DRAWGRID_FILTER)   += vf_drawbox.o
 OBJS-$(CONFIG_DRAWTEXT_FILTER)   += vf_drawtext.o
 OBJS-$(CONFIG_ELBG_FILTER)   += vf_elbg.o
@@ -237,6 +238,7 @@ OBJS-$(CONFIG_TESTSRC_FILTER)+= 
vsrc_testsrc.o
 OBJS-$(CONFIG_NULLSINK_FILTER)   += vsink_nullsink.o
 
 # multimedia filters
+OBJS-$(CONFIG_ADRAWGRAPH_FILTER) += f_drawgraph.o
 OBJS-$(CONFIG_AVECTORSCOPE_FILTER)   += avf_avectorscope.o
 OBJS-$(CONFIG_CONCAT_FILTER) += avf_concat.o
 OBJS-$(CONFIG_SHOWCQT_FILTER)+= avf_showcqt.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 33b4580..6493389 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -133,6 +133,7 @@ void avfilter_register_all(void)
 REGISTER_FILTER(DESHAKE,deshake,vf);
 REGISTER_FILTER(DETELECINE, detelecine, vf);
 REGISTER_FILTER(DRAWBOX,drawbox,

Re: [FFmpeg-devel] [PATCH] avformat/avio: Move avio_delete() avio_move() to avpriv_ namespace

2015-06-29 Thread Michael Niedermayer
On Tue, Jun 23, 2015 at 06:24:57PM +0200, Michael Niedermayer wrote:
 This was suggested in the discussion about these functions
 
 With this change the functions are available internally but are not
 part of the public API
 
 Signed-off-by: Michael Niedermayer michae...@gmx.at
 ---
  doc/APIchanges |4 
  libavformat/avio.c |4 ++--
  libavformat/avio.h |4 ++--
  3 files changed, 4 insertions(+), 8 deletions(-)

applied

[...]
-- 
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 to parse H264 SEI Green Metadata

2015-06-29 Thread Nicolas Derouineau
Two patches are now here enclosed:

The first one enable metadata parsing. The second one add a new options in the 
file avcodec/options_table.h

Tested with:

./ffplay -debug green_metadata ~/GreenMetaDataSEI.264

Best Regards,

Nicolas DEROUINEAU
Research Engineer
VITEC

T.  +33 1 46 73 06 06
E.  nicolas.derouin...@vitec.com
W. www.vitec.com


De : ffmpeg-devel-boun...@ffmpeg.org ffmpeg-devel-boun...@ffmpeg.org de la 
part de Nicolas Derouineau nicolas.derouin...@vitec.com
Envoyé : lundi 29 juin 2015 14:20
À : FFmpeg development discussions and patches
Objet : Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata

Hello,
Thank you for your comments.

Please find enclosed the updated patch.

I have tested it with the following cmdline:

./ffplay -debug 1048576 ~/GreenMetaDataSEI.264

I know that this debug flag should be define somewhere as a string in order to 
display it with:

./ffplay --help

Could someone point me to the correct location to do this ?

Ps: Reference Bitstreams are still available here: 
ftp-public-greenvideo.insa-rennes.fr

Ps 2: This message may look like a duplicate, but I have been experiencing 
issues to subscribe to the mailing list.



Best regards,
Nicolas DEROUINEAU
Research Engineer
VITEC

T.  +33 1 46 73 06 06
E.  nicolas.derouin...@vitec.com
W. www.vitec.com


De : Vittorio Giovara vittorio.giov...@gmail.com
Envoyé : vendredi 26 juin 2015 02:56
À : FFmpeg development discussions and patches
Cc : Nicolas Derouineau; Yahia Benmoussa; Erwan Raffin; michae...@gmx.at; 
Didier Nicholson; Nicolas Tizon
Objet : Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata

On Thu, Jun 25, 2015 at 5:30 PM, Michael Niedermayer
mich...@niedermayer.cc wrote:
 On Thu, Jun 25, 2015 at 11:13:53AM +, Nicolas Derouineau wrote:
 Hello,
 Please find here enclosed a patch enabling h264 Green Metada SEI parsing for 
 FFMPEG. You'll be able to find reference bitstreams containing the metadata 
 at the following adress:

 ftp-public-greenvideo.insa-rennes.fr


 The Nal SEI syntax is the same as the one used in the last JM release (19.0).


 Best Regards,



 Nicolas DEROUINEAU
 Research Engineer
 VITEC

 T.  +33 1 46 73 06 06
 E.  nicolas.derouin...@vitec.commailto:nicolas.derouin...@vitec.com
 W. www.vitec.comhttp://www.vitec.com/;

  h264.h |   20 ++
  h264_sei.c |   67 
+
  2 files changed, 87 insertions(+)
 feb39a55dd6afbaf341df765eafc02266c00a588  
 0002-Enabling-GreenMetadata-SEI-parsing-for-H264-decoder.patch
 From 60903bff6429182c84dc5daef0d26695d3f71861 Mon Sep 17 00:00:00 2001
 From: Nicolas DEROUINEAU nicolas.derouin...@vitec.com
 Date: Thu, 25 Jun 2015 13:02:39 +0200
 Subject: [PATCH 2/2] Enabling GreenMetadata SEI parsing for H264 decoder

 ---
  libavcodec/h264.h | 20 +++
  libavcodec/h264_sei.c | 67 
+++
  2 files changed, 87 insertions(+)

 diff --git a/libavcodec/h264.h b/libavcodec/h264.h
 index 548510d..0324dc1 100644
 --- a/libavcodec/h264.h
 +++ b/libavcodec/h264.h
 @@ -137,6 +137,7 @@ typedef enum {
  SEI_TYPE_RECOVERY_POINT = 6,   /// recovery point (frame # to 
decoder sync)
  SEI_TYPE_FRAME_PACKING  = 45,  /// frame packing arrangement
  SEI_TYPE_DISPLAY_ORIENTATION= 47,  /// display orientation
 +SEI_TYPE_GREEN_METADATA  = 56  /// GreenMPEG information
  } SEI_Type;

  /**
 @@ -268,6 +269,22 @@ typedef struct FPA {
  } FPA;

  /**
 + * Green MetaData Information Type
 + */
 +typedef struct GreenMetaData {
 +unsigned char  green_metadata_type;
 +unsigned char  period_type;
 +unsigned short num_seconds;
 +unsigned short num_pictures;

uint16_t and uint8_t would probably be more appropriate here

 +unsigned char percent_non_zero_macroblocks;
 +unsigned char percent_intra_coded_macroblocks;
 +unsigned char percent_six_tap_filtering;
 +unsigned char percent_alpha_point_deblocking_instance;
 +unsigned char xsd_metric_type;
 +unsigned short xsd_metric_value;
 +} GreenMetaData;
 +
 +/**
   * Memory management control operation opcode.
   */
  typedef enum MMCOOpcode {
 @@ -804,6 +821,9 @@ typedef struct H264Context {
  /* Motion Estimation */
  qpel_mc_func (*qpel_put)[16];
  qpel_mc_func (*qpel_avg)[16];
 +
 +/*Green Metadata */
 +GreenMetaData sei_GreenMetaData;

This is mostly a nit, but could you maybe avoid using CamelCase naming
in function and variable names?
eg GreenMetaData sei_green_metadata would reflect more the rest of the code.

thanks
--
Vittorio
From d742bb556f794a16e03305195b5826ba8d2931a2 Mon Sep 17 00:00:00 2001
From: NDE nde@nde-OptiPlex-980.(none)
Date: Mon, 29 Jun 2015 12:13:16 +0200
Subject: [PATCH 2/4] Enabling GreenMetadata SEI parsing for H264 decoder

---
 libavcodec/avcodec.h  |2 ++
 libavcodec/h264.h |   20 

Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata

2015-06-29 Thread Michael Niedermayer
Hi

On Mon, Jun 29, 2015 at 01:01:48PM +, Nicolas Derouineau wrote:
 Two patches are now here enclosed:
 
 The first one enable metadata parsing. The second one add a new options in 
 the file avcodec/options_table.h
 
 Tested with:
 
 ./ffplay -debug green_metadata ~/GreenMetaDataSEI.264

Where can we find the sample file ?


 
 Best Regards,
 
 Nicolas DEROUINEAU
 Research Engineer
 VITEC
 
 T.  +33 1 46 73 06 06
 E.  nicolas.derouin...@vitec.com
 W. www.vitec.com
 
 
 De : ffmpeg-devel-boun...@ffmpeg.org ffmpeg-devel-boun...@ffmpeg.org de la 
 part de Nicolas Derouineau nicolas.derouin...@vitec.com
 Envoyé : lundi 29 juin 2015 14:20
 À : FFmpeg development discussions and patches
 Objet : Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata
 
 Hello,
 Thank you for your comments.
 
 Please find enclosed the updated patch.
 
 I have tested it with the following cmdline:
 
 ./ffplay -debug 1048576 ~/GreenMetaDataSEI.264
 
 I know that this debug flag should be define somewhere as a string in order 
 to display it with:
 
 ./ffplay --help
 
 Could someone point me to the correct location to do this ?
 
 Ps: Reference Bitstreams are still available here: 
 ftp-public-greenvideo.insa-rennes.fr
 
 Ps 2: This message may look like a duplicate, but I have been experiencing 
 issues to subscribe to the mailing list.
 
 
 
 Best regards,
 Nicolas DEROUINEAU
 Research Engineer
 VITEC
 
 T.  +33 1 46 73 06 06
 E.  nicolas.derouin...@vitec.com
 W. www.vitec.com
 
 
 De : Vittorio Giovara vittorio.giov...@gmail.com
 Envoyé : vendredi 26 juin 2015 02:56
 À : FFmpeg development discussions and patches
 Cc : Nicolas Derouineau; Yahia Benmoussa; Erwan Raffin; michae...@gmx.at; 
 Didier Nicholson; Nicolas Tizon
 Objet : Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata
 
 On Thu, Jun 25, 2015 at 5:30 PM, Michael Niedermayer
 mich...@niedermayer.cc wrote:
  On Thu, Jun 25, 2015 at 11:13:53AM +, Nicolas Derouineau wrote:
  Hello,
  Please find here enclosed a patch enabling h264 Green Metada SEI parsing 
  for FFMPEG. You'll be able to find reference bitstreams containing the 
  metadata at the following adress:
 
  ftp-public-greenvideo.insa-rennes.fr
 
 
  The Nal SEI syntax is the same as the one used in the last JM release 
  (19.0).
 
 
  Best Regards,
 
 
 
  Nicolas DEROUINEAU
  Research Engineer
  VITEC
 
  T.  +33 1 46 73 06 06
  E.  nicolas.derouin...@vitec.commailto:nicolas.derouin...@vitec.com
  W. www.vitec.comhttp://www.vitec.com/;
 
   h264.h |   20 ++
   h264_sei.c |   67 
 +
   2 files changed, 87 insertions(+)
  feb39a55dd6afbaf341df765eafc02266c00a588  
  0002-Enabling-GreenMetadata-SEI-parsing-for-H264-decoder.patch
  From 60903bff6429182c84dc5daef0d26695d3f71861 Mon Sep 17 00:00:00 2001
  From: Nicolas DEROUINEAU nicolas.derouin...@vitec.com
  Date: Thu, 25 Jun 2015 13:02:39 +0200
  Subject: [PATCH 2/2] Enabling GreenMetadata SEI parsing for H264 decoder
 
  ---
   libavcodec/h264.h | 20 +++
   libavcodec/h264_sei.c | 67 
 +++
   2 files changed, 87 insertions(+)
 
  diff --git a/libavcodec/h264.h b/libavcodec/h264.h
  index 548510d..0324dc1 100644
  --- a/libavcodec/h264.h
  +++ b/libavcodec/h264.h
  @@ -137,6 +137,7 @@ typedef enum {
   SEI_TYPE_RECOVERY_POINT = 6,   /// recovery point (frame # 
 to decoder sync)
   SEI_TYPE_FRAME_PACKING  = 45,  /// frame packing arrangement
   SEI_TYPE_DISPLAY_ORIENTATION= 47,  /// display orientation
  +SEI_TYPE_GREEN_METADATA  = 56  /// GreenMPEG information
   } SEI_Type;
 
   /**
  @@ -268,6 +269,22 @@ typedef struct FPA {
   } FPA;
 
   /**
  + * Green MetaData Information Type
  + */
  +typedef struct GreenMetaData {
  +unsigned char  green_metadata_type;
  +unsigned char  period_type;
  +unsigned short num_seconds;
  +unsigned short num_pictures;
 
 uint16_t and uint8_t would probably be more appropriate here
 
  +unsigned char percent_non_zero_macroblocks;
  +unsigned char percent_intra_coded_macroblocks;
  +unsigned char percent_six_tap_filtering;
  +unsigned char percent_alpha_point_deblocking_instance;
  +unsigned char xsd_metric_type;
  +unsigned short xsd_metric_value;
  +} GreenMetaData;
  +
  +/**
    * Memory management control operation opcode.
    */
   typedef enum MMCOOpcode {
  @@ -804,6 +821,9 @@ typedef struct H264Context {
   /* Motion Estimation */
   qpel_mc_func (*qpel_put)[16];
   qpel_mc_func (*qpel_avg)[16];
  +
  +/*Green Metadata */
  +GreenMetaData sei_GreenMetaData;
 
 This is mostly a nit, but could you maybe avoid using CamelCase naming
 in function and variable names?
 eg GreenMetaData sei_green_metadata would reflect more the rest of the code.
 
 thanks
 --
 Vittorio

  avcodec.h  |2 ++
  

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for pixblock functions

2015-06-29 Thread Michael Niedermayer
On Sun, Jun 14, 2015 at 11:26:26PM +0530, shivraj.pa...@imgtec.com wrote:
 From: Shivraj Patil shivraj.pa...@imgtec.com
 
 This patch adds MSA (MIPS-SIMD-Arch) optimizations for pixblock functions in 
 new file pixblockdsp_msa.c
 Adds new generic macros (needed for this patch) in 
 libavutil/mips/generic_macros_msa.h
 
 Signed-off-by: Shivraj Patil shivraj.pa...@imgtec.com
 ---
  libavcodec/mips/Makefile|   2 +
  libavcodec/mips/pixblockdsp_init_mips.c |  53 
  libavcodec/mips/pixblockdsp_mips.h  |  33 
  libavcodec/mips/pixblockdsp_msa.c   | 143 
 
  libavcodec/pixblockdsp.c|   2 +
  libavcodec/pixblockdsp.h|   2 +
  libavutil/mips/generic_macros_msa.h |   8 ++
  7 files changed, 243 insertions(+)
  create mode 100644 libavcodec/mips/pixblockdsp_init_mips.c
  create mode 100644 libavcodec/mips/pixblockdsp_mips.h
  create mode 100644 libavcodec/mips/pixblockdsp_msa.c

applied

thanks

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

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell


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


Re: [FFmpeg-devel] [PATCH 04/12] libavcodec: Implementation of AAC_fixed_decoder (LC-module) [4/4]

2015-06-29 Thread Nedeljko Babic
These are all the patches for implementing fixed point AAC decoder in ffmpeg 
for now.

-Nedeljko

Od: ffmpeg-devel-boun...@ffmpeg.org [ffmpeg-devel-boun...@ffmpeg.org] u ime 
korisnika Cary Tetrick [ctetri...@gmail.com]
Poslato: 27. jun 2015 1:31
Za: FFmpeg development discussions and patches
Tema: Re: [FFmpeg-devel] [PATCH 04/12] libavcodec: Implementation of 
AAC_fixed_decoder (LC-module) [4/4]

Are there any patches supporting Intel QSV encoding that will work with
recent versions of ffmpeg on Windows?
Thanks.
___
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 to parse H264 SEI Green Metadata

2015-06-29 Thread Nicolas Derouineau
Hello,
Thank you for your comments.

Please find enclosed the updated patch.

I have tested it with the following cmdline:

./ffplay -debug 1048576 ~/GreenMetaDataSEI.264

I know that this debug flag should be define somewhere as a string in order to 
display it with:

./ffplay --help

Could someone point me to the correct location to do this ?

Ps: Reference Bitstreams are still available here: 
ftp-public-greenvideo.insa-rennes.fr

Ps 2: This message may look like a duplicate, but I have been experiencing 
issues to subscribe to the mailing list.

 

Best regards,
Nicolas DEROUINEAU
Research Engineer
VITEC

T.  +33 1 46 73 06 06
E.  nicolas.derouin...@vitec.com
W. www.vitec.com


De : Vittorio Giovara vittorio.giov...@gmail.com
Envoyé : vendredi 26 juin 2015 02:56
À : FFmpeg development discussions and patches
Cc : Nicolas Derouineau; Yahia Benmoussa; Erwan Raffin; michae...@gmx.at; 
Didier Nicholson; Nicolas Tizon
Objet : Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata

On Thu, Jun 25, 2015 at 5:30 PM, Michael Niedermayer
mich...@niedermayer.cc wrote:
 On Thu, Jun 25, 2015 at 11:13:53AM +, Nicolas Derouineau wrote:
 Hello,
 Please find here enclosed a patch enabling h264 Green Metada SEI parsing for 
 FFMPEG. You'll be able to find reference bitstreams containing the metadata 
 at the following adress:

 ftp-public-greenvideo.insa-rennes.fr


 The Nal SEI syntax is the same as the one used in the last JM release (19.0).


 Best Regards,



 Nicolas DEROUINEAU
 Research Engineer
 VITEC

 T.  +33 1 46 73 06 06
 E.  nicolas.derouin...@vitec.commailto:nicolas.derouin...@vitec.com
 W. www.vitec.comhttp://www.vitec.com/;

  h264.h |   20 ++
  h264_sei.c |   67 
+
  2 files changed, 87 insertions(+)
 feb39a55dd6afbaf341df765eafc02266c00a588  
 0002-Enabling-GreenMetadata-SEI-parsing-for-H264-decoder.patch
 From 60903bff6429182c84dc5daef0d26695d3f71861 Mon Sep 17 00:00:00 2001
 From: Nicolas DEROUINEAU nicolas.derouin...@vitec.com
 Date: Thu, 25 Jun 2015 13:02:39 +0200
 Subject: [PATCH 2/2] Enabling GreenMetadata SEI parsing for H264 decoder

 ---
  libavcodec/h264.h | 20 +++
  libavcodec/h264_sei.c | 67 
+++
  2 files changed, 87 insertions(+)

 diff --git a/libavcodec/h264.h b/libavcodec/h264.h
 index 548510d..0324dc1 100644
 --- a/libavcodec/h264.h
 +++ b/libavcodec/h264.h
 @@ -137,6 +137,7 @@ typedef enum {
  SEI_TYPE_RECOVERY_POINT = 6,   /// recovery point (frame # to 
decoder sync)
  SEI_TYPE_FRAME_PACKING  = 45,  /// frame packing arrangement
  SEI_TYPE_DISPLAY_ORIENTATION    = 47,  /// display orientation
 +    SEI_TYPE_GREEN_METADATA  = 56  /// GreenMPEG information
  } SEI_Type;

  /**
 @@ -268,6 +269,22 @@ typedef struct FPA {
  } FPA;

  /**
 + * Green MetaData Information Type
 + */
 +typedef struct GreenMetaData {
 +    unsigned char  green_metadata_type;
 +    unsigned char  period_type;
 +    unsigned short num_seconds;
 +    unsigned short num_pictures;

uint16_t and uint8_t would probably be more appropriate here

 +    unsigned char percent_non_zero_macroblocks;
 +    unsigned char percent_intra_coded_macroblocks;
 +    unsigned char percent_six_tap_filtering;
 +    unsigned char percent_alpha_point_deblocking_instance;
 +    unsigned char xsd_metric_type;
 +    unsigned short xsd_metric_value;
 +} GreenMetaData;
 +
 +/**
   * Memory management control operation opcode.
   */
  typedef enum MMCOOpcode {
 @@ -804,6 +821,9 @@ typedef struct H264Context {
  /* Motion Estimation */
  qpel_mc_func (*qpel_put)[16];
  qpel_mc_func (*qpel_avg)[16];
 +
 +    /*Green Metadata */
 +    GreenMetaData sei_GreenMetaData;

This is mostly a nit, but could you maybe avoid using CamelCase naming
in function and variable names?
eg GreenMetaData sei_green_metadata would reflect more the rest of the code.

thanks
--
Vittorio
From d742bb556f794a16e03305195b5826ba8d2931a2 Mon Sep 17 00:00:00 2001
From: Nicolas DEROUINEAU nicolas.derouin...@vitec.com
Date: Mon, 29 Jun 2015 12:13:16 +0200
Subject: [PATCH] Enabling GreenMetadata SEI parsing for H264 decoder

---
 libavcodec/avcodec.h  |2 ++
 libavcodec/h264.h |   20 +
 libavcodec/h264_sei.c |   59 +
 3 files changed, 81 insertions(+)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index ddbf0a3..7000145 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2616,8 +2616,10 @@ typedef struct AVCodecContext {
 #endif
 #define FF_DEBUG_BUFFERS 0x8000
 #define FF_DEBUG_THREADS 0x0001
+#define FF_DEBUG_GREEN_MD0x0010
 #define FF_DEBUG_NOMC0x0100
 
+
 #if FF_API_DEBUG_MV
 /**
  * debug
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 15b9a5d..2cc3e50 100644
--- a/libavcodec/h264.h
+++ 

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for pixblock functions

2015-06-29 Thread Shivraj Patil
Hi,
May I request somebody from maintainers to review this patch please?

-Original Message-
From: Shivraj Patil 
Sent: 14 June 2015 23:26
To: ffmpeg-devel@ffmpeg.org
Cc: Rob Isherwood; Shivraj Patil
Subject: [PATCH 5/5] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for 
pixblock functions

From: Shivraj Patil shivraj.pa...@imgtec.com

This patch adds MSA (MIPS-SIMD-Arch) optimizations for pixblock functions in 
new file pixblockdsp_msa.c Adds new generic macros (needed for this patch) in 
libavutil/mips/generic_macros_msa.h

Signed-off-by: Shivraj Patil shivraj.pa...@imgtec.com
---
 libavcodec/mips/Makefile|   2 +
 libavcodec/mips/pixblockdsp_init_mips.c |  53 
 libavcodec/mips/pixblockdsp_mips.h  |  33 
 libavcodec/mips/pixblockdsp_msa.c   | 143 
 libavcodec/pixblockdsp.c|   2 +
 libavcodec/pixblockdsp.h|   2 +
 libavutil/mips/generic_macros_msa.h |   8 ++
 7 files changed, 243 insertions(+)
 create mode 100644 libavcodec/mips/pixblockdsp_init_mips.c
 create mode 100644 libavcodec/mips/pixblockdsp_mips.h
 create mode 100644 libavcodec/mips/pixblockdsp_msa.c

diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile index 
823a2c5..c0ecb15 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -28,6 +28,7 @@ OBJS-$(CONFIG_H263DSP)+= 
mips/h263dsp_init_mips.o
 OBJS-$(CONFIG_QPELDSP)+= mips/qpeldsp_init_mips.o
 OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_init_mips.o
 OBJS-$(CONFIG_BLOCKDSP)   += mips/blockdsp_init_mips.o
+OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_init_mips.o
 MSA-OBJS-$(CONFIG_HEVC_DECODER)   += mips/hevcdsp_msa.o\
  mips/hevc_mc_uni_msa.o\
  mips/hevc_mc_uniw_msa.o   \
@@ -45,5 +46,6 @@ MSA-OBJS-$(CONFIG_H263DSP)+= 
mips/h263dsp_msa.o
 MSA-OBJS-$(CONFIG_QPELDSP)+= mips/qpeldsp_msa.o
 MSA-OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_msa.o
 MSA-OBJS-$(CONFIG_BLOCKDSP)   += mips/blockdsp_msa.o
+MSA-OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_msa.o
 LOONGSON3-OBJS-$(CONFIG_H264DSP)  += mips/h264dsp_mmi.o
 LOONGSON3-OBJS-$(CONFIG_H264CHROMA)   += mips/h264chroma_mmi.o
diff --git a/libavcodec/mips/pixblockdsp_init_mips.c 
b/libavcodec/mips/pixblockdsp_init_mips.c
new file mode 100644
index 000..0f2fb15
--- /dev/null
+++ b/libavcodec/mips/pixblockdsp_init_mips.c
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2015 Shivraj Patil (shivraj.pa...@imgtec.com)
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
+02110-1301 USA  */
+
+#include pixblockdsp_mips.h
+
+#if HAVE_MSA
+static av_cold void pixblockdsp_init_msa(PixblockDSPContext *c,
+ AVCodecContext *avctx,
+ unsigned high_bit_depth) {
+c-diff_pixels = ff_diff_pixels_msa;
+
+switch (avctx-bits_per_raw_sample) {
+case 9:
+case 10:
+case 12:
+case 14:
+c-get_pixels = ff_get_pixels_16_msa;
+break;
+default:
+if (avctx-bits_per_raw_sample = 8 || avctx-codec_type !=
+AVMEDIA_TYPE_VIDEO) {
+c-get_pixels = ff_get_pixels_8_msa;
+}
+break;
+}
+}
+#endif  // #if HAVE_MSA
+
+void ff_pixblockdsp_init_mips(PixblockDSPContext *c, AVCodecContext *avctx,
+  unsigned high_bit_depth) { #if HAVE_MSA
+pixblockdsp_init_msa(c, avctx, high_bit_depth); #endif  // #if 
+HAVE_MSA }
diff --git a/libavcodec/mips/pixblockdsp_mips.h 
b/libavcodec/mips/pixblockdsp_mips.h
new file mode 100644
index 000..3eee6e0
--- /dev/null
+++ b/libavcodec/mips/pixblockdsp_mips.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2015 Shivraj Patil (shivraj.pa...@imgtec.com)
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ 

Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata

2015-06-29 Thread Michael Niedermayer
On Mon, Jun 29, 2015 at 02:47:02PM +, Nicolas Derouineau wrote:
 Hi,
 The samples files are located at:
 
 ftp-public-greenvideo.insa-rennes.fr

thanks

 
 You can select any of the files located there. Please make sure to change the 
 extansion from .bin to .h264, as I'm not sure how ffplay deals with 
 extansions. Expected values are given are side txt files.

the extension doesnt matter for ffplay it will detect h264 based
on content

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


[FFmpeg-devel] [PATCH 1/4] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for mpegvideo functions

2015-06-29 Thread shivraj.patil
From: Shivraj Patil shivraj.pa...@imgtec.com

This patch adds MSA (MIPS-SIMD-Arch) optimizations for mpegvideo functions in 
new file mpegvideo_msa.c

Signed-off-by: Shivraj Patil shivraj.pa...@imgtec.com
---
 libavcodec/mips/Makefile  |   2 +
 libavcodec/mips/mpegvideo_init_mips.c |  37 +
 libavcodec/mips/mpegvideo_msa.c   | 250 ++
 libavcodec/mpegvideo.c|   2 +
 libavcodec/mpegvideo.h|   1 +
 libavutil/mips/generic_macros_msa.h   |  94 +
 6 files changed, 386 insertions(+)
 create mode 100644 libavcodec/mips/mpegvideo_init_mips.c
 create mode 100644 libavcodec/mips/mpegvideo_msa.c

diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index c0ecb15..277ac2a 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -29,6 +29,7 @@ OBJS-$(CONFIG_QPELDSP)+= 
mips/qpeldsp_init_mips.o
 OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_init_mips.o
 OBJS-$(CONFIG_BLOCKDSP)   += mips/blockdsp_init_mips.o
 OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_init_mips.o
+OBJS-$(CONFIG_MPEGVIDEO)  += mips/mpegvideo_init_mips.o
 MSA-OBJS-$(CONFIG_HEVC_DECODER)   += mips/hevcdsp_msa.o\
  mips/hevc_mc_uni_msa.o\
  mips/hevc_mc_uniw_msa.o   \
@@ -47,5 +48,6 @@ MSA-OBJS-$(CONFIG_QPELDSP)+= 
mips/qpeldsp_msa.o
 MSA-OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_msa.o
 MSA-OBJS-$(CONFIG_BLOCKDSP)   += mips/blockdsp_msa.o
 MSA-OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_msa.o
+MSA-OBJS-$(CONFIG_MPEGVIDEO)  += mips/mpegvideo_msa.o
 LOONGSON3-OBJS-$(CONFIG_H264DSP)  += mips/h264dsp_mmi.o
 LOONGSON3-OBJS-$(CONFIG_H264CHROMA)   += mips/h264chroma_mmi.o
diff --git a/libavcodec/mips/mpegvideo_init_mips.c 
b/libavcodec/mips/mpegvideo_init_mips.c
new file mode 100644
index 000..ee14b31
--- /dev/null
+++ b/libavcodec/mips/mpegvideo_init_mips.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2015 Manojkumar Bhosale (manojkumar.bhos...@imgtec.com)
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include h263dsp_mips.h
+
+#if HAVE_MSA
+static av_cold void dct_unquantize_init_msa(MpegEncContext *s)
+{
+s-dct_unquantize_h263_intra = ff_dct_unquantize_h263_intra_msa;
+s-dct_unquantize_h263_inter = ff_dct_unquantize_h263_inter_msa;
+s-dct_unquantize_mpeg2_inter = ff_dct_unquantize_mpeg2_inter_msa;
+}
+#endif  // #if HAVE_MSA
+
+av_cold void ff_mpv_common_init_mips(MpegEncContext *s)
+{
+#if HAVE_MSA
+dct_unquantize_init_msa(s);
+#endif  // #if HAVE_MSA
+}
diff --git a/libavcodec/mips/mpegvideo_msa.c b/libavcodec/mips/mpegvideo_msa.c
new file mode 100644
index 000..aa9ef77
--- /dev/null
+++ b/libavcodec/mips/mpegvideo_msa.c
@@ -0,0 +1,250 @@
+/*
+ * Copyright (c) 2015 Manojkumar Bhosale (manojkumar.bhos...@imgtec.com)
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include libavutil/mips/generic_macros_msa.h
+#include h263dsp_mips.h
+
+static void h263_dct_unquantize_msa(int16_t *block, int16_t qmul,
+int16_t qadd, int8_t n_coeffs,
+uint8_t loop_start)
+{
+int16_t *block_dup = block;
+int32_t level, cnt;
+v8i16 block_vec, qmul_vec, qadd_vec, sub;
+v8i16 add, mask, mul, zero_mask;
+
+qmul_vec = __msa_fill_h(qmul);
+  

Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata

2015-06-29 Thread Nicolas Derouineau
Hi,
The samples files are located at:

ftp-public-greenvideo.insa-rennes.fr

You can select any of the files located there. Please make sure to change the 
extansion from .bin to .h264, as I'm not sure how ffplay deals with extansions. 
Expected values are given are side txt files.

Best Regards,

Nicolas DEROUINEAU
Research Engineer
VITEC

T.  +33 1 46 73 06 06
E.  nicolas.derouin...@vitec.com
W. www.vitec.com


De : Michael Niedermayer michae...@gmx.at
Envoyé : lundi 29 juin 2015 15:49
À : FFmpeg development discussions and patches; Nicolas Derouineau
Cc : Nicolas Tizon; Erwan Raffin; Didier Nicholson; Yahia Benmoussa
Objet : Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata

Hi

On Mon, Jun 29, 2015 at 01:01:48PM +, Nicolas Derouineau wrote:
 Two patches are now here enclosed:

 The first one enable metadata parsing. The second one add a new options in 
 the file avcodec/options_table.h

 Tested with:

 ./ffplay -debug green_metadata ~/GreenMetaDataSEI.264

Where can we find the sample file ?



 Best Regards,

 Nicolas DEROUINEAU
 Research Engineer
 VITEC

 T.  +33 1 46 73 06 06
 E.  nicolas.derouin...@vitec.com
 W. www.vitec.com

 
 De : ffmpeg-devel-boun...@ffmpeg.org ffmpeg-devel-boun...@ffmpeg.org de la 
 part de Nicolas Derouineau nicolas.derouin...@vitec.com
 Envoyé : lundi 29 juin 2015 14:20
 À : FFmpeg development discussions and patches
 Objet : Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata

 Hello,
 Thank you for your comments.

 Please find enclosed the updated patch.

 I have tested it with the following cmdline:

 ./ffplay -debug 1048576 ~/GreenMetaDataSEI.264

 I know that this debug flag should be define somewhere as a string in order 
 to display it with:

 ./ffplay --help

 Could someone point me to the correct location to do this ?

 Ps: Reference Bitstreams are still available here: 
 ftp-public-greenvideo.insa-rennes.fr

 Ps 2: This message may look like a duplicate, but I have been experiencing 
 issues to subscribe to the mailing list.



 Best regards,
 Nicolas DEROUINEAU
 Research Engineer
 VITEC

 T.  +33 1 46 73 06 06
 E.  nicolas.derouin...@vitec.com
 W. www.vitec.com

 
 De : Vittorio Giovara vittorio.giov...@gmail.com
 Envoyé : vendredi 26 juin 2015 02:56
 À : FFmpeg development discussions and patches
 Cc : Nicolas Derouineau; Yahia Benmoussa; Erwan Raffin; michae...@gmx.at; 
 Didier Nicholson; Nicolas Tizon
 Objet : Re: [FFmpeg-devel] Patch to parse H264 SEI Green Metadata

 On Thu, Jun 25, 2015 at 5:30 PM, Michael Niedermayer
 mich...@niedermayer.cc wrote:
  On Thu, Jun 25, 2015 at 11:13:53AM +, Nicolas Derouineau wrote:
  Hello,
  Please find here enclosed a patch enabling h264 Green Metada SEI parsing 
  for FFMPEG. You'll be able to find reference bitstreams containing the 
  metadata at the following adress:
 
  ftp-public-greenvideo.insa-rennes.fr
 
 
  The Nal SEI syntax is the same as the one used in the last JM release 
  (19.0).
 
 
  Best Regards,
 
 
 
  Nicolas DEROUINEAU
  Research Engineer
  VITEC
 
  T.  +33 1 46 73 06 06
  E.  nicolas.derouin...@vitec.commailto:nicolas.derouin...@vitec.com
  W. www.vitec.comhttp://www.vitec.com/;
 
   h264.h |   20 ++
   h264_sei.c |   67 
 +
   2 files changed, 87 insertions(+)
  feb39a55dd6afbaf341df765eafc02266c00a588  
  0002-Enabling-GreenMetadata-SEI-parsing-for-H264-decoder.patch
  From 60903bff6429182c84dc5daef0d26695d3f71861 Mon Sep 17 00:00:00 2001
  From: Nicolas DEROUINEAU nicolas.derouin...@vitec.com
  Date: Thu, 25 Jun 2015 13:02:39 +0200
  Subject: [PATCH 2/2] Enabling GreenMetadata SEI parsing for H264 decoder
 
  ---
   libavcodec/h264.h | 20 +++
   libavcodec/h264_sei.c | 67 
 +++
   2 files changed, 87 insertions(+)
 
  diff --git a/libavcodec/h264.h b/libavcodec/h264.h
  index 548510d..0324dc1 100644
  --- a/libavcodec/h264.h
  +++ b/libavcodec/h264.h
  @@ -137,6 +137,7 @@ typedef enum {
   SEI_TYPE_RECOVERY_POINT = 6,   /// recovery point (frame # 
 to decoder sync)
   SEI_TYPE_FRAME_PACKING  = 45,  /// frame packing arrangement
   SEI_TYPE_DISPLAY_ORIENTATION= 47,  /// display orientation
  +SEI_TYPE_GREEN_METADATA  = 56  /// GreenMPEG information
   } SEI_Type;
 
   /**
  @@ -268,6 +269,22 @@ typedef struct FPA {
   } FPA;
 
   /**
  + * Green MetaData Information Type
  + */
  +typedef struct GreenMetaData {
  +unsigned char  green_metadata_type;
  +unsigned char  period_type;
  +unsigned short num_seconds;
  +unsigned short num_pictures;

 uint16_t and uint8_t would probably be more appropriate here

  +unsigned char percent_non_zero_macroblocks;
  +unsigned char percent_intra_coded_macroblocks;
  +unsigned char percent_six_tap_filtering;
  +

[FFmpeg-devel] [PATCH 3/4] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for me_cmp functions

2015-06-29 Thread shivraj.patil
From: Shivraj Patil shivraj.pa...@imgtec.com

This patch adds MSA (MIPS-SIMD-Arch) optimizations for me_cmp functions in new 
file me_cmp_msa.c

Signed-off-by: Shivraj Patil shivraj.pa...@imgtec.com
---
 libavcodec/me_cmp.c |   2 +
 libavcodec/me_cmp.h |   1 +
 libavcodec/mips/Makefile|   2 +
 libavcodec/mips/me_cmp_init_mips.c  |  56 +++
 libavcodec/mips/me_cmp_mips.h   |  60 
 libavcodec/mips/me_cmp_msa.c| 686 
 libavutil/mips/generic_macros_msa.h |  59 
 7 files changed, 866 insertions(+)
 create mode 100644 libavcodec/mips/me_cmp_init_mips.c
 create mode 100644 libavcodec/mips/me_cmp_mips.h
 create mode 100644 libavcodec/mips/me_cmp_msa.c

diff --git a/libavcodec/me_cmp.c b/libavcodec/me_cmp.c
index d4213d2..dc76b07 100644
--- a/libavcodec/me_cmp.c
+++ b/libavcodec/me_cmp.c
@@ -991,4 +991,6 @@ av_cold void ff_me_cmp_init(MECmpContext *c, AVCodecContext 
*avctx)
 ff_me_cmp_init_ppc(c, avctx);
 if (ARCH_X86)
 ff_me_cmp_init_x86(c, avctx);
+if (ARCH_MIPS)
+ff_me_cmp_init_mips(c, avctx);
 }
diff --git a/libavcodec/me_cmp.h b/libavcodec/me_cmp.h
index 98ee53c..a3603ec 100644
--- a/libavcodec/me_cmp.h
+++ b/libavcodec/me_cmp.h
@@ -87,6 +87,7 @@ void ff_me_cmp_init_alpha(MECmpContext *c, AVCodecContext 
*avctx);
 void ff_me_cmp_init_arm(MECmpContext *c, AVCodecContext *avctx);
 void ff_me_cmp_init_ppc(MECmpContext *c, AVCodecContext *avctx);
 void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx);
+void ff_me_cmp_init_mips(MECmpContext *c, AVCodecContext *avctx);
 
 void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type);
 
diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index 59c1f79..2993891 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -31,6 +31,7 @@ OBJS-$(CONFIG_BLOCKDSP)   += 
mips/blockdsp_init_mips.o
 OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_init_mips.o
 OBJS-$(CONFIG_MPEGVIDEO)  += mips/mpegvideo_init_mips.o
 OBJS-$(CONFIG_MPEGVIDEOENC)   += mips/mpegvideoencdsp_init_mips.o
+OBJS-$(CONFIG_ME_CMP) += mips/me_cmp_init_mips.o
 MSA-OBJS-$(CONFIG_HEVC_DECODER)   += mips/hevcdsp_msa.o\
  mips/hevc_mc_uni_msa.o\
  mips/hevc_mc_uniw_msa.o   \
@@ -51,5 +52,6 @@ MSA-OBJS-$(CONFIG_BLOCKDSP)   += 
mips/blockdsp_msa.o
 MSA-OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_msa.o
 MSA-OBJS-$(CONFIG_MPEGVIDEO)  += mips/mpegvideo_msa.o
 MSA-OBJS-$(CONFIG_MPEGVIDEOENC)   += mips/mpegvideoencdsp_msa.o
+MSA-OBJS-$(CONFIG_ME_CMP) += mips/me_cmp_msa.o
 LOONGSON3-OBJS-$(CONFIG_H264DSP)  += mips/h264dsp_mmi.o
 LOONGSON3-OBJS-$(CONFIG_H264CHROMA)   += mips/h264chroma_mmi.o
diff --git a/libavcodec/mips/me_cmp_init_mips.c 
b/libavcodec/mips/me_cmp_init_mips.c
new file mode 100644
index 000..219a0dc
--- /dev/null
+++ b/libavcodec/mips/me_cmp_init_mips.c
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2015 Parag Salasakar (parag.salasa...@imgtec.com)
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include me_cmp_mips.h
+
+#if HAVE_MSA
+static av_cold void me_cmp_msa(MECmpContext *c, AVCodecContext *avctx)
+{
+#if BIT_DEPTH == 8
+c-pix_abs[0][0] = ff_pix_abs16_msa;
+c-pix_abs[0][1] = ff_pix_abs16_x2_msa;
+c-pix_abs[0][2] = ff_pix_abs16_y2_msa;
+c-pix_abs[0][3] = ff_pix_abs16_xy2_msa;
+c-pix_abs[1][0] = ff_pix_abs8_msa;
+c-pix_abs[1][1] = ff_pix_abs8_x2_msa;
+c-pix_abs[1][2] = ff_pix_abs8_y2_msa;
+c-pix_abs[1][3] = ff_pix_abs8_xy2_msa;
+
+c-hadamard8_diff[0] = ff_hadamard8_diff16_msa;
+c-hadamard8_diff[1] = ff_hadamard8_diff8x8_msa;
+
+c-hadamard8_diff[4] = ff_hadamard8_intra16_msa;
+c-hadamard8_diff[5] = ff_hadamard8_intra8x8_msa;
+
+c-sad[0] = ff_pix_abs16_msa;
+c-sad[1] = ff_pix_abs8_msa;
+c-sse[0] = ff_sse16_msa;
+c-sse[1] = ff_sse8_msa;
+c-sse[2] = ff_sse4_msa;
+#endif
+}
+#endif  // #if HAVE_MSA
+
+av_cold void ff_me_cmp_init_mips(MECmpContext *c, AVCodecContext *avctx)
+{
+#if HAVE_MSA

[FFmpeg-devel] [PATCH 4/4] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for idctdsp functions

2015-06-29 Thread shivraj.patil
From: Shivraj Patil shivraj.pa...@imgtec.com

This patch adds MSA (MIPS-SIMD-Arch) optimizations for idctdsp functions in new 
file idctdsp_msa.c and simple_idct_msa.c

Signed-off-by: Shivraj Patil shivraj.pa...@imgtec.com
---
 libavcodec/idctdsp.c|   2 +
 libavcodec/idctdsp.h|   2 +
 libavcodec/mips/Makefile|   3 +
 libavcodec/mips/idctdsp_init_mips.c |  49 +++
 libavcodec/mips/idctdsp_mips.h  |  43 +++
 libavcodec/mips/idctdsp_msa.c   | 149 ++
 libavcodec/mips/simple_idct_msa.c   | 573 
 libavutil/mips/generic_macros_msa.h |  37 +++
 8 files changed, 858 insertions(+)
 create mode 100644 libavcodec/mips/idctdsp_init_mips.c
 create mode 100644 libavcodec/mips/idctdsp_mips.h
 create mode 100644 libavcodec/mips/idctdsp_msa.c
 create mode 100644 libavcodec/mips/simple_idct_msa.c

diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c
index ae804d9..63e9b52 100644
--- a/libavcodec/idctdsp.c
+++ b/libavcodec/idctdsp.c
@@ -305,6 +305,8 @@ av_cold void ff_idctdsp_init(IDCTDSPContext *c, 
AVCodecContext *avctx)
 ff_idctdsp_init_ppc(c, avctx, high_bit_depth);
 if (ARCH_X86)
 ff_idctdsp_init_x86(c, avctx, high_bit_depth);
+if (ARCH_MIPS)
+ff_idctdsp_init_mips(c, avctx, high_bit_depth);
 
 ff_put_pixels_clamped = c-put_pixels_clamped;
 ff_add_pixels_clamped = c-add_pixels_clamped;
diff --git a/libavcodec/idctdsp.h b/libavcodec/idctdsp.h
index 538b716..b180a67 100644
--- a/libavcodec/idctdsp.h
+++ b/libavcodec/idctdsp.h
@@ -108,5 +108,7 @@ void ff_idctdsp_init_ppc(IDCTDSPContext *c, AVCodecContext 
*avctx,
  unsigned high_bit_depth);
 void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx,
  unsigned high_bit_depth);
+void ff_idctdsp_init_mips(IDCTDSPContext *c, AVCodecContext *avctx,
+  unsigned high_bit_depth);
 
 #endif /* AVCODEC_IDCTDSP_H */
diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index 2993891..9fefc07 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -29,6 +29,7 @@ OBJS-$(CONFIG_QPELDSP)+= 
mips/qpeldsp_init_mips.o
 OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_init_mips.o
 OBJS-$(CONFIG_BLOCKDSP)   += mips/blockdsp_init_mips.o
 OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_init_mips.o
+OBJS-$(CONFIG_IDCTDSP)+= mips/idctdsp_init_mips.o
 OBJS-$(CONFIG_MPEGVIDEO)  += mips/mpegvideo_init_mips.o
 OBJS-$(CONFIG_MPEGVIDEOENC)   += mips/mpegvideoencdsp_init_mips.o
 OBJS-$(CONFIG_ME_CMP) += mips/me_cmp_init_mips.o
@@ -50,6 +51,8 @@ MSA-OBJS-$(CONFIG_QPELDSP)+= 
mips/qpeldsp_msa.o
 MSA-OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_msa.o
 MSA-OBJS-$(CONFIG_BLOCKDSP)   += mips/blockdsp_msa.o
 MSA-OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_msa.o
+MSA-OBJS-$(CONFIG_IDCTDSP)+= mips/idctdsp_msa.o   \
+ mips/simple_idct_msa.o
 MSA-OBJS-$(CONFIG_MPEGVIDEO)  += mips/mpegvideo_msa.o
 MSA-OBJS-$(CONFIG_MPEGVIDEOENC)   += mips/mpegvideoencdsp_msa.o
 MSA-OBJS-$(CONFIG_ME_CMP) += mips/me_cmp_msa.o
diff --git a/libavcodec/mips/idctdsp_init_mips.c 
b/libavcodec/mips/idctdsp_init_mips.c
new file mode 100644
index 000..c964340
--- /dev/null
+++ b/libavcodec/mips/idctdsp_init_mips.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015 Manojkumar Bhosale (manojkumar.bhos...@imgtec.com)
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include idctdsp_mips.h
+
+#if HAVE_MSA
+static av_cold void idctdsp_init_msa(IDCTDSPContext *c, AVCodecContext *avctx,
+ unsigned high_bit_depth)
+{
+if ((avctx-lowres != 1)  (avctx-lowres != 2)  (avctx-lowres != 3) 
+(avctx-bits_per_raw_sample != 10) 
+(avctx-bits_per_raw_sample != 12) 
+(avctx-idct_algo == FF_IDCT_AUTO)) {
+c-idct_put = ff_simple_idct_put_msa;
+c-idct_add = ff_simple_idct_add_msa;
+c-idct = ff_simple_idct_msa;
+ 

[FFmpeg-devel] [PATCH 2/4] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for mpegvideoencdsp functions

2015-06-29 Thread shivraj.patil
From: Shivraj Patil shivraj.pa...@imgtec.com

This patch adds MSA (MIPS-SIMD-Arch) optimizations for mpegvideoencdsp 
functions in new file mpegvideoencdsp_msa.c

Signed-off-by: Shivraj Patil shivraj.pa...@imgtec.com
---
 libavcodec/mips/Makefile|  2 +
 libavcodec/mips/mpegvideoencdsp_init_mips.c | 40 +++
 libavcodec/mips/mpegvideoencdsp_msa.c   | 62 +
 libavcodec/mpegvideoencdsp.c|  2 +
 libavcodec/mpegvideoencdsp.h|  2 +
 libavutil/mips/generic_macros_msa.h | 34 
 6 files changed, 142 insertions(+)
 create mode 100644 libavcodec/mips/mpegvideoencdsp_init_mips.c
 create mode 100644 libavcodec/mips/mpegvideoencdsp_msa.c

diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index 277ac2a..59c1f79 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -30,6 +30,7 @@ OBJS-$(CONFIG_HPELDSP)+= 
mips/hpeldsp_init_mips.o
 OBJS-$(CONFIG_BLOCKDSP)   += mips/blockdsp_init_mips.o
 OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_init_mips.o
 OBJS-$(CONFIG_MPEGVIDEO)  += mips/mpegvideo_init_mips.o
+OBJS-$(CONFIG_MPEGVIDEOENC)   += mips/mpegvideoencdsp_init_mips.o
 MSA-OBJS-$(CONFIG_HEVC_DECODER)   += mips/hevcdsp_msa.o\
  mips/hevc_mc_uni_msa.o\
  mips/hevc_mc_uniw_msa.o   \
@@ -49,5 +50,6 @@ MSA-OBJS-$(CONFIG_HPELDSP)+= 
mips/hpeldsp_msa.o
 MSA-OBJS-$(CONFIG_BLOCKDSP)   += mips/blockdsp_msa.o
 MSA-OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_msa.o
 MSA-OBJS-$(CONFIG_MPEGVIDEO)  += mips/mpegvideo_msa.o
+MSA-OBJS-$(CONFIG_MPEGVIDEOENC)   += mips/mpegvideoencdsp_msa.o
 LOONGSON3-OBJS-$(CONFIG_H264DSP)  += mips/h264dsp_mmi.o
 LOONGSON3-OBJS-$(CONFIG_H264CHROMA)   += mips/h264chroma_mmi.o
diff --git a/libavcodec/mips/mpegvideoencdsp_init_mips.c 
b/libavcodec/mips/mpegvideoencdsp_init_mips.c
new file mode 100644
index 000..9bfe94e
--- /dev/null
+++ b/libavcodec/mips/mpegvideoencdsp_init_mips.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2015 Manojkumar Bhosale (manojkumar.bhos...@imgtec.com)
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include libavcodec/bit_depth_template.c
+#include h263dsp_mips.h
+
+#if HAVE_MSA
+static av_cold void mpegvideoencdsp_init_msa(MpegvideoEncDSPContext *c,
+ AVCodecContext *avctx)
+{
+#if BIT_DEPTH == 8
+c-pix_sum = ff_pix_sum_msa;
+#endif
+}
+#endif  // #if HAVE_MSA
+
+av_cold void ff_mpegvideoencdsp_init_mips(MpegvideoEncDSPContext *c,
+  AVCodecContext *avctx)
+{
+#if HAVE_MSA
+mpegvideoencdsp_init_msa(c, avctx);
+#endif  // #if HAVE_MSA
+}
diff --git a/libavcodec/mips/mpegvideoencdsp_msa.c 
b/libavcodec/mips/mpegvideoencdsp_msa.c
new file mode 100644
index 000..46473da
--- /dev/null
+++ b/libavcodec/mips/mpegvideoencdsp_msa.c
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2015 Manojkumar Bhosale (manojkumar.bhos...@imgtec.com)
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include h263dsp_mips.h
+#include libavutil/mips/generic_macros_msa.h
+
+static int32_t sum_u8src_16width_msa(uint8_t *src, int32_t stride)
+{
+uint32_t sum = 0;
+v16u8 in0, in1, in2, in3, in4, in5, in6, in7;
+v16u8 in8, in9, in10, in11, in12, in13, in14, in15;

Re: [FFmpeg-devel] [PATCH 04/12] libavcodec: Implementation of AAC_fixed_decoder (LC-module) [4/4]

2015-06-29 Thread Michael Niedermayer
On Mon, Jun 29, 2015 at 11:21:13AM +, Nedeljko Babic wrote:
  From: Jovan Zelincevic jovan.zelincevic at imgtec.com
  
  Build system modified
  
  Signed-off-by: Nedeljko Babic nedeljko.babic at imgtec.com
  ---
   configure |  1 +
   libavcodec/Makefile   | 13 ++---
   libavcodec/aacdec.c   |  1 -
   libavcodec/aacdec_fixed.c |  1 -
   libavcodec/allcodecs.c|  1 +
   5 files changed, 12 insertions(+), 5 deletions(-)
 
 this adds some build warnings:
 In file included from libavcodec/aacdec_fixed.c:426:0:
 libavcodec/aacdec_template.c: In function ‘apply_tns’:
 libavcodec/aacdec_template.c:2360:13: warning: passing argument 1 of 
 ‘compute_lpc_coefs’ from incompatible pointer type [enabled by default]
 libavcodec/lpc.h:155:19: note: expected ‘const float *’ but argument is of 
 type ‘int *’
 libavcodec/aacdec_template.c:2360:13: warning: passing argument 3 of 
 ‘compute_lpc_coefs’ from incompatible pointer type [enabled by default]
 libavcodec/lpc.h:155:19: note: expected ‘float *’ but argument is of type 
 ‘int *’
 
 These warnings are added because this part of code logically belongs 
 to sbr module and definitions of macros for types used here are added 
 in later patches (for sbr module).
 When code is built with all the patches there are no warnings here.
 Is this a problem?
 
 libavcodec/aacdec_template.c: In function ‘imdct_and_windowing_ld’:
 libavcodec/aacdec_template.c:2570:5: warning: ISO C90 forbids mixed 
 declarations and code [-Wdeclaration-after-statement]
 
 This warning is due to me trying to simplify the code a little bit...
 I tried to avoid adding additional #if just for declaration of one 
 variable so this declaration is in the code.
 
 libavcodec/aacdec_template.c: In function ‘imdct_and_windowing_eld’:
 libavcodec/aacdec_template.c:2599:64: warning: pointer type mismatch in 
 conditional expression [enabled by default]
 
 As I mentioned earlier post, ER AAC ELD 480 added to float aac decoder a 
 while ago is not integrated in to the fixed point implementation.
 This warning is here because there is no ff_aac_eld_window_480 table 
 defined for fixed point implementation.
 I think that it should stay here as a remainder for additional work 
 that needs to be done on fixed point aac.
 
 In file included from libavcodec/aacdec_fixed.c:426:0:
 libavcodec/aacdec_template.c: In function ‘spectral_to_sample’:
 libavcodec/aacdec_template.c:2739:25: warning: passing argument 4 of 
 ‘ff_sbr_apply’ from incompatible pointer type [enabled by default]
 libavcodec/aacsbr.h:46:6: note: expected ‘float *’ but argument is of type 
 ‘int *’
 libavcodec/aacdec_template.c:2739:25: warning: passing argument 5 of 
 ‘ff_sbr_apply’ from incompatible pointer type [enabled by default]
 libavcodec/aacsbr.h:46:6: note: expected ‘float *’ but argument is of type 
 ‘int *’
 
 Cause for these warnings is similar as for the first ones: needed 
 definitions are added in later patches (that make changes in sbr module).
 When all the patches are applied there are no warnings here.

if it breaks nothing then temporary warnings are probably ok.
Some people might argue about that though ...

its probably a good idea to amend the commit message to explain the
cause and future disappearance of the warnings

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

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


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


Re: [FFmpeg-devel] [PATCH 05/11] aacenc: add support for coding of intensity stereo scalefactor indices

2015-06-29 Thread Michael Niedermayer
On Mon, Jun 29, 2015 at 02:23:33AM -0300, Claudio Freire wrote:
 Seems straightforward enough. LGTM.

applied

thanks

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

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


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


Re: [FFmpeg-devel] New asf demuxer

2015-06-29 Thread Michael Niedermayer
On Sun, Jun 28, 2015 at 01:42:00PM -0300, James Almer wrote:
 On 28/06/15 1:21 PM, Michael Niedermayer wrote:
  On Sun, Jun 28, 2015 at 04:54:02PM +0200, Nicolas George wrote:
  Le decadi 10 messidor, an CCXXIII, Carl Eugen Hoyos a écrit :
  From a very quick look, the new code seems mostly 
  unreviewed
 
  What makes you say that? Where did you give your very quick look exactly?
 
  Do you disagree?
 
  
  I do disagree, on several counts. First, the old muxer was based on
  reverse-engineering, the new one is based on the spec;
  
  this may be true for the original demuxer 15 years ago, (iam not
  its author so iam not the right one to ask about it)
  
  but work was done on it since then
  not sure when the specs where first released, there are btw multiple
  versions of the specs
 
 I assume this one 
 https://www.microsoft.com/en-us/download/details.aspx?id=14995
 published three years ago.
 

 Does the new demuxer introduce serious regressions? Does it make any file 
 play worse?

when trying it on 2 random files i had locally yesterday it segfaulted
on the first and i couldnt seek in the 2nd with it
also as already mentioned it requires odd (that is likely wrong)
reference checksums for fate to pass and andreas reported
segfaults too.

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

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch


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


Re: [FFmpeg-devel] [PATCH] lavfi: add (a)drawgraph filter

2015-06-29 Thread Dave Rice
Hi,

 On Jun 29, 2015, at 12:31 AM, Paul B Mahol one...@gmail.com wrote:
 
 Signed-off-by: Paul B Mahol one...@gmail.com
 ---
 Changelog |   1 +
 doc/filters.texi  | 101 ++
 libavfilter/Makefile  |   2 +
 libavfilter/allfilters.c  |   2 +
 libavfilter/f_drawgraph.c | 346 ++
 5 files changed, 452 insertions(+)
 create mode 100644 libavfilter/f_drawgraph.c
 
 diff --git a/Changelog b/Changelog
 index e3c94c7..f89c915 100644
 --- a/Changelog
 +++ b/Changelog
 @@ -10,6 +10,7 @@ version next:
 - ssim filter
 - rewritten ASF demuxer
 - showvolume filter
 +- adrawgraph audio and drawgraph video filter
 
 
 version 2.7:
 diff --git a/doc/filters.texi b/doc/filters.texi
 index 8b2c5ea..8a2f44b 100644
 --- a/doc/filters.texi
 +++ b/doc/filters.texi
 @@ -3965,6 +3965,105 @@ 
 drawbox=x=-t:y=0.5*(ih-iw/2.4)-t:w=iw+t*2:h=iw/2.4+t*2:t=2:c=red
 @end example
 @end itemize
 
 +@section drawgraph, adrawgraph
 +
 +Draw a graph using input video or audio metadata.
 +
 +It accepts the following parameters:
 +
 +@table @option
 +@item m1
 +Set 1st frame metadata key from which metadata values will be used to draw a 
 graph.
 +
 +@item fg1
 +Set 1st foreground color expression.
 +
 +@item m2
 +Set 2nd frame metadata key from which metadata values will be used to draw a 
 graph.
 +
 +@item fg2
 +Set 2nd foreground color expression.
 +
 +@item m3
 +Set 3rd frame metadata key from which metadata values will be used to draw a 
 graph.
 +
 +@item fg3
 +Set 3rd foreground color expression.
 +
 +@item m4
 +Set 4th frame metadata key from which metadata values will be used to draw a 
 graph.
 +
 +@item fg4
 +Set 4th foreground color expression.
 +
 +@item min
 +Set minimal value of metadata value.
 +
 +@item max
 +Set maximal value of metadata value.
 +
 +@item bg
 +Set graph background color. Default is white.
 +
 +@item mode
 +Set graph mode.
 +
 +Available values for mode is:
 +@table @samp
 +@item bar
 +@item dot
 +@item line
 +@end table
 +
 +Default is @code{line}.
 +
 +@item slide
 +Set slide mode.
 +
 +Available values for slide is:
 +@table @samp
 +@item frame
 +Draw new frame when right border is reached.
 +
 +@item replace
 +Replace old columns with new ones.
 +
 +@item scroll
 +Scroll from right to left.
 +@end table
 +
 +Default is @code{frame}.
 +
 +@item size
 +Set size of graph video. For the syntax of this option, check the
 +@ref{video size syntax,,Video size section in the ffmpeg-utils 
 manual,ffmpeg-utils}.
 +The default value is @code{900x256}.
 +
 +The foreground color expressions can use the following variables:
 +@table @option
 +@item MIN
 +Minimal value of metadata value.
 +
 +@item MAX
 +Maximal value of metadata value.
 +
 +@item VAL
 +Current metadata key value.
 +@end table
 +
 +The color is defined as 0xAABBGGRR.
 +@end table
 +
 +Example using metadata from @ref{signalstats} filter:
 +@example
 +signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
 +@end example
 +
 +Example using metadata from @ref{ebur128} filter:
 +@example
 +ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
 +@end example
 +
 @section drawgrid
 
 Draw a grid on the input image.
 @@ -8604,6 +8703,7 @@ Swap the second and third planes of the input:
 ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT
 @end example
 
 +@anchor{signalstats}
 @section signalstats
 Evaluate various visual metrics that assist in determining issues associated
 with the digitization of analog video media.
 @@ -11034,6 +11134,7 @@ do not have exactly the same duration in the first 
 file.
 
 @end itemize
 
 +@anchor{ebur128}
 @section ebur128
 
 EBU R128 scanner filter. This filter takes an audio stream as input and 
 outputs
 diff --git a/libavfilter/Makefile b/libavfilter/Makefile
 index a5d7fc1..3e899f2 100644
 --- a/libavfilter/Makefile
 +++ b/libavfilter/Makefile
 @@ -117,6 +117,7 @@ OBJS-$(CONFIG_DELOGO_FILTER) += 
 vf_delogo.o
 OBJS-$(CONFIG_DESHAKE_FILTER)+= vf_deshake.o
 OBJS-$(CONFIG_DETELECINE_FILTER) += vf_detelecine.o
 OBJS-$(CONFIG_DRAWBOX_FILTER)+= vf_drawbox.o
 +OBJS-$(CONFIG_DRAWGRAPH_FILTER)  += f_drawgraph.o
 OBJS-$(CONFIG_DRAWGRID_FILTER)   += vf_drawbox.o
 OBJS-$(CONFIG_DRAWTEXT_FILTER)   += vf_drawtext.o
 OBJS-$(CONFIG_ELBG_FILTER)   += vf_elbg.o
 @@ -237,6 +238,7 @@ OBJS-$(CONFIG_TESTSRC_FILTER)+= 
 vsrc_testsrc.o
 OBJS-$(CONFIG_NULLSINK_FILTER)   += vsink_nullsink.o
 
 # multimedia filters
 +OBJS-$(CONFIG_ADRAWGRAPH_FILTER) += f_drawgraph.o
 OBJS-$(CONFIG_AVECTORSCOPE_FILTER)   += avf_avectorscope.o
 OBJS-$(CONFIG_CONCAT_FILTER) += avf_concat.o
 OBJS-$(CONFIG_SHOWCQT_FILTER)+= avf_showcqt.o
 diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
 index 33b4580..6493389 100644
 --- a/libavfilter/allfilters.c
 +++ b/libavfilter/allfilters.c
 @@ 

Re: [FFmpeg-devel] [PATCH]asfdec: Reduce minimum header size (was: New asf demuxer)

2015-06-29 Thread Michael Niedermayer
On Mon, Jun 29, 2015 at 10:11:11AM +0200, Carl Eugen Hoyos wrote:
 Hi!
 
 I finally found an issue that is fixed with the new asf demuxer:
 Video in ​http://samples.ffmpeg.org/V-codecs/MSS1/GipsyGuitar.wmv 
 freezes for ten seconds after 110 seconds, this does not happen 
 with -f asf_o.
 Attached patch fixes this issue, fate passes, no other sample 
 tested with the patch applied.
 
 Please comment, Carl Eugen

  asfdec.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 3fa95afebd3a0589d7bdb9c6695ac3610824d19c  patchasfheadersize.diff

LGTM
thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data


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


Re: [FFmpeg-devel] [PATCH]asfdec: Reduce minimum header size (was: New asf demuxer)

2015-06-29 Thread Hendrik Leppkes
On Mon, Jun 29, 2015 at 10:11 AM, Carl Eugen Hoyos ceho...@ag.or.at wrote:
 Hi!

 I finally found an issue that is fixed with the new asf demuxer:
 Video in http://samples.ffmpeg.org/V-codecs/MSS1/GipsyGuitar.wmv
 freezes for ten seconds after 110 seconds, this does not happen
 with -f asf_o.
 Attached patch fixes this issue, fate passes, no other sample
 tested with the patch applied.


Just on code quality alone, I think it would be much more productive
if you look for the opposite and fix those.

Trying to juke the stats after-the-fact by fixing the old one now is
not going to change anything. :p

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


Re: [FFmpeg-devel] [PATCH] lavfi: add (a)drawgraph filter

2015-06-29 Thread Dave Rice

 On Jun 29, 2015, at 2:09 PM, Paul B Mahol one...@gmail.com wrote:
 
 On 6/29/15, Dave Rice d...@dericed.com wrote:
 Hi,
 
 
 [...]
 
 
 I re-tested and all looks great. The new default size, 900x256, makes sense
 and I'm glad to see it now works with audio metadata (would love to be able
 to use astats with this someday). I'm having a little trouble getting an
 example working with the MIN/MAX variables, do you have a sample command?
 
 The one from documentation does not work? What is wrong?

The documentation examples use min and max but not the MIN and MAX variables.
Dave
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavfi: add (a)drawgraph filter

2015-06-29 Thread Paul B Mahol
On 6/29/15, Dave Rice d...@dericed.com wrote:
 Hi,


[...]


 I re-tested and all looks great. The new default size, 900x256, makes sense
 and I'm glad to see it now works with audio metadata (would love to be able
 to use astats with this someday). I'm having a little trouble getting an
 example working with the MIN/MAX variables, do you have a sample command?

The one from documentation does not work? What is wrong?

 Thanks,
 Dave Rice
 ___
 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] lavfi: add (a)drawgraph filter

2015-06-29 Thread Paul B Mahol
On 6/29/15, Dave Rice d...@dericed.com wrote:

 On Jun 29, 2015, at 2:09 PM, Paul B Mahol one...@gmail.com wrote:

 On 6/29/15, Dave Rice d...@dericed.com wrote:
 Hi,


 [...]


 I re-tested and all looks great. The new default size, 900x256, makes
 sense
 and I'm glad to see it now works with audio metadata (would love to be
 able
 to use astats with this someday). I'm having a little trouble getting an
 example working with the MIN/MAX variables, do you have a sample
 command?

 The one from documentation does not work? What is wrong?

 The documentation examples use min and max but not the MIN and MAX
 variables.

signalstats,drawgraph=lavfi.signalstats.SATAVG:'if(between(VAL, MIN,
MIN + 20),0xff,0xff00)':min=0:max=255
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Intel QSV MPEG2 video decoder

2015-06-29 Thread Jean-Baptiste Kempf
On 29 Jun, Ivan Uskov wrote :
 I'm software developer of Nablet GmbH. We were requested by Intel to
 integrate all possible QSV-accelerated codecs and VPP modules into ffmpeg.
 This is my first commit which adding the QSV MPEG2 video decoder codec, I 
 hope I did all or at least all most right.
 The 0001-Patch-for-QSV-components-by-Intel-applied.patch was received
 from Intel, so unfortunately it is not possible to split it to
 separate small patches.

I hope this is not serious. The patches are ugly, intrusive, do not
respect the Coding Rules and add a lot more code than is
necessary:
See
https://lists.libav.org/pipermail/libav-devel/2013-September/050567.html

With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] New asf demuxer

2015-06-29 Thread compn
On Sun, 28 Jun 2015 14:10:48 +
Paul B Mahol one...@gmail.com wrote:

 Here I ask for samples which show that one is better than another,
 whichever that one is.

http://samples.ffmpeg.org/V-codecs/G2M4/XmissPlan052913.wmv
ffmpeg -f asf_o -i XmissPlan052913.wmv out.avi
[asf_o @ 031c0160] Suspicious data found! ASF stream #2 will be ignored.
video:0kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 308.914154%

3kb? -f asf works.

http://samples.ffmpeg.org/mplayer-bugs/bug821/bug821-2.asf
ffmpeg -f asf_o -i bug821-2.asf outtt.avi
[asf_o @ 031c0140] Could not find codec parameters for stream 0 (Video:
mpeg4 (MP4S / 0x5334504D), n one, 640x480): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize'
options bug821-2.asf: could not find codec parameters

works in -f asf. 

http://samples.ffmpeg.org/dvr_ms/fps_sample1.dvr-ms
http://samples.ffmpeg.org/dvr_ms/SS2.dvr-ms
some kind of error in -f asf_o  , works in -f asf

more later.

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


[FFmpeg-devel] [PATCH]Silence a warning when decoding hap

2015-06-29 Thread Carl Eugen Hoyos
Hi!

Attached patch silences many lines of Multiple ff_thread_finish_setup() 
calls when decoding hap.

Please comment, Carl Eugen
diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c
index 6e3c138..e6b7d61 100644
--- a/libavcodec/hapdec.c
+++ b/libavcodec/hapdec.c
@@ -177,7 +177,8 @@ static int hap_decode(AVCodecContext *avctx, void *data,
 ret = ff_thread_get_buffer(avctx, tframe, 0);
 if (ret  0)
 return ret;
-ff_thread_finish_setup(avctx);
+if (avctx-codec-update_thread_context)
+ff_thread_finish_setup(avctx);
 
 /* Use the decompress function on the texture, one block per thread */
 avctx-execute2(avctx, decompress_texture_thread, tframe.f, NULL, blocks);
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Intel QSV MPEG2 video decoder

2015-06-29 Thread Ivan Uskov
Hello Hendrik,

Thank you very much for the review, we will try to split one big invalid
patch to sequence of small valid changes.

Tuesday, June 30, 2015, 12:03:10 AM, you wrote:

HL On Mon, Jun 29, 2015 at 10:57 PM, Ivan Uskov ivan.us...@nablet.com wrote:
 Hello All,

 I'm software developer of Nablet GmbH. We were requested by Intel to
 integrate all possible QSV-accelerated codecs and VPP modules into ffmpeg.
 This is my first commit which adding the QSV MPEG2 video decoder codec, I 
 hope I did all or at least all most right.
 The 0001-Patch-for-QSV-components-by-Intel-applied.patch was received
 from Intel, so unfortunately it is not possible to split it to
 separate small patches.


HL The first patch is full of errors. It reverts changes from ffmpeg
HL mainline, it contains a dupe file (configure.orig), it contains
HL non-GPL compatible license headers.
HL Its not possible to apply it in any form unless it is severly cleaned
HL up and split - no matter if its from Intel or anyone, clean patches
HL are mandatory.

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



-- 
Best regards,
 Ivanmailto:ivan.us...@nablet.com

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


Re: [FFmpeg-devel] New asf demuxer

2015-06-29 Thread compn
On Sun, 28 Jun 2015 14:10:48 +
Paul B Mahol one...@gmail.com wrote:

 Here I ask for samples which show that one is better than another,
 whichever that one is.

ffmpeg -f asf_o -i
http://samples.ffmpeg.org/A-codecs/VoxWare/vamps_sample.asf [http @
031c0a80] HTTP error 416 Requested Range Not Satisfiable Last message
repeated 29 times

heh.
http://samples.ffmpeg.org/A-codecs/WMSP/wma9audio-notworkmplayer.wma
[http @ 031c0aa0] HTTP error 416 Requested Range Not Satisfiable
Last message repeated 405 times
ctrl+c here.
and going and going and going, not sure if it will ever stop. works
with default demuxer.

all samples from http source cause this issue. this does not occur with
default asf demuxer. probe takes longer?

will test more in a second.

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


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-29 Thread Reimar Döffinger
On Tue, Jun 16, 2015 at 09:18:13PM +0200, Hendrik Leppkes wrote:
 On Tue, Jun 16, 2015 at 8:33 PM, wm4 nfx...@googlemail.com wrote:
  On Tue, 16 Jun 2015 13:29:55 +
  Paul B Mahol one...@gmail.com wrote:
 
  Also fixes clash with smv audio codec.
 
  Signed-off-by: Paul B Mahol one...@gmail.com
  ---
   libavcodec/codec_desc.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
 
  diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
  index c1694f3..f32843a 100644
  --- a/libavcodec/codec_desc.c
  +++ b/libavcodec/codec_desc.c
  @@ -1178,7 +1178,7 @@ static const AVCodecDescriptor codec_descriptors[] = 
  {
   {
   .id= AV_CODEC_ID_SMVJPEG,
   .type  = AVMEDIA_TYPE_VIDEO,
  -.name  = smv,
  +.name  = smvjpeg,
   .long_name = NULL_IF_CONFIG_SMALL(Sigmatel Motion Video),
   },
 
 
  An incompatible API change should come with a major bump.
 
 
 Strings in the codec descriptor are API now?

I have to admit there is precedence that it is not, as we changed names
before.
On the other hand I would like to point out that we have functions
to select by this name, and as such - and the fact that these renames
usually break _something_ - I would strongly prefer to consider this
API changes.
If nothing else because we shouldn't cause people trouble for a change
that is of no particular significance.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]asfdec: Reduce minimum header size (was: New asf demuxer)

2015-06-29 Thread Carl Eugen Hoyos
Hi!

I finally found an issue that is fixed with the new asf demuxer:
Video in ​http://samples.ffmpeg.org/V-codecs/MSS1/GipsyGuitar.wmv 
freezes for ten seconds after 110 seconds, this does not happen 
with -f asf_o.
Attached patch fixes this issue, fate passes, no other sample 
tested with the patch applied.

Please comment, Carl Eugen
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index a8cae56..ed33828 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -132,7 +132,7 @@ static const AVClass asf_class = {
 #include assert.h
 
 #define ASF_MAX_STREAMS 127
-#define FRAME_HEADER_SIZE 11
+#define FRAME_HEADER_SIZE 6
 // Fix Me! FRAME_HEADER_SIZE may be different. (17 is known to be too large)
 
 #ifdef DEBUG
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] api-h264-test: build with another api test

2015-06-29 Thread Clément Bœsch
On Sun, Jun 28, 2015 at 06:55:45PM +0200, wm4 wrote:
[...]
  Ludmila is working on new tests that involve seeking to more than one
  place based on wm4's request - from what I understand (not doing any
  seeking myself) is that ffmpeg.c only seeks once ever. As an API user
  it's useful to do multiple seeks, testing something not possible in
  ffmpeg.c. Same goes with draw_horiz_band and I would also like to test
  other features only available from the API.
 
 From what I know, ffmpeg.c indeed seeks only once. At least I couldn't
 find out how to make it seek several times in the same file last I
 checked.
 
 Note that here is a seek test in libavformat/seek-test.c. But what I'd
 like to be tested is whether decoding from start, and seeking back to a
 certain position returns the same result. This tests for example
 whether decoder flushing really resets the the entire decoder state.
 (It often seems to happen that it does, either by design or by
 accident.)

There is also a small code I wrote a while ago that might be helpful. It's
attached to this mail (I didn't take the time to rebase it, but it should
be straightforward).

-- 
Clément B.
From cda6011f4b98515ab27983dc7f5351c037795f88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= clem...@stupeflix.com
Date: Thu, 12 Dec 2013 14:54:25 +0100
Subject: [PATCH] WIP: seek/playback fuzz

---
 configure   |   2 +
 doc/Makefile|   1 +
 doc/examples/Makefile   |   1 +
 doc/examples/playbackfuzz.c | 333 
 4 files changed, 337 insertions(+)
 create mode 100644 doc/examples/playbackfuzz.c

diff --git a/configure b/configure
index 12b2da5..bf8c328 100755
--- a/configure
+++ b/configure
@@ -1315,6 +1315,7 @@ EXAMPLE_LIST=
 metadata_example
 muxing_example
 remuxing_example
+playbackfuzz_example
 resampling_audio_example
 scaling_video_example
 transcode_aac_example
@@ -2610,6 +2611,7 @@ filtering_video_example_deps=avfilter avcodec avformat avutil
 metadata_example_deps=avformat avutil
 muxing_example_deps=avcodec avformat avutil swscale
 remuxing_example_deps=avcodec avformat avutil
+playbackfuzz_example_deps=avcodec avformat avutil swresample swscale
 resampling_audio_example_deps=avutil swresample
 scaling_video_example_deps=avutil swscale
 transcode_aac_example_deps=avcodec avformat swresample
diff --git a/doc/Makefile b/doc/Makefile
index 2502922..e92a826 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -47,6 +47,7 @@ DOC_EXAMPLES-$(CONFIG_FILTERING_VIDEO_EXAMPLE)   += filtering_video
 DOC_EXAMPLES-$(CONFIG_METADATA_EXAMPLE)  += metadata
 DOC_EXAMPLES-$(CONFIG_MUXING_EXAMPLE)+= muxing
 DOC_EXAMPLES-$(CONFIG_REMUXING_EXAMPLE)  += remuxing
+DOC_EXAMPLES-$(CONFIG_PLAYBACKFUZZ_EXAMPLE)  += playbackfuzz
 DOC_EXAMPLES-$(CONFIG_RESAMPLING_AUDIO_EXAMPLE)  += resampling_audio
 DOC_EXAMPLES-$(CONFIG_SCALING_VIDEO_EXAMPLE) += scaling_video
 DOC_EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE) += transcode_aac
diff --git a/doc/examples/Makefile b/doc/examples/Makefile
index 07251fe..f3a3415 100644
--- a/doc/examples/Makefile
+++ b/doc/examples/Makefile
@@ -20,6 +20,7 @@ EXAMPLES=   avio_reading   \
 metadata   \
 muxing \
 remuxing   \
+playbackfuzz   \
 resampling_audio   \
 scaling_video  \
 transcode_aac  \
diff --git a/doc/examples/playbackfuzz.c b/doc/examples/playbackfuzz.c
new file mode 100644
index 000..c2d20fc
--- /dev/null
+++ b/doc/examples/playbackfuzz.c
@@ -0,0 +1,333 @@
+/*
+ * Copyright (c) 2012 Stefano Sabatini
+ * Copyright (c) 2013 Clément Bœsch
+ *
+ * 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 

Re: [FFmpeg-devel] [PATCH] lavfi: add drawgraph filter

2015-06-29 Thread Paul B Mahol
On 6/28/15, Paul B Mahol one...@gmail.com wrote:
 On 6/28/15, Dave Rice d...@dericed.com wrote:

 On Jun 28, 2015, at 1:54 PM, Paul B Mahol one...@gmail.com wrote:

 On 6/28/15, Dave Rice d...@dericed.com wrote:

 On Jun 28, 2015, at 11:07 AM, Paul B Mahol one...@gmail.com wrote:

 On 6/28/15, Dave Rice d...@dericed.com wrote:
 Hi,

 On Jun 27, 2015, at 4:52 PM, Paul B Mahol one...@gmail.com wrote:

 Signed-off-by: Paul B Mahol one...@gmail.com
 ---
 doc/filters.texi   |  76 
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/vf_drawgraph.c | 297
 +
 4 files changed, 375 insertions(+)
 create mode 100644 libavfilter/vf_drawgraph.c


 [...]


 With this version using a color name for foreground no longer works:

 This works:
 ffplay -f lavfi -i mandelbrot -vf
 signalstats,drawgraph=metadata=lavfi.signalstats.YAVG:min=0:max=255:slide=scroll:bg=green:fg=0xFF

 This doesn't:
 ffplay -f lavfi -i mandelbrot -vf
 signalstats,drawgraph=metadata=lavfi.signalstats.YAVG:min=0:max=255:slide=scroll:bg=green:fg=red

 AFAIK The expressions can not work with strings.


 Also here's an example with blend:
 ffplay -f lavfi -i mandelbrot -vf signalstats,split=3[a][b][c];\
 [a]drawgraph=metadata=lavfi.signalstats.YAVG:min=0:max=255:slide=scroll:fg=0x:mode=dot[a1];\
 [b]drawgraph=metadata=lavfi.signalstats.UAVG:min=0:max=255:slide=scroll:fg=0xFF00FF00:mode=dot[b1];\
 [c]drawgraph=metadata=lavfi.signalstats.VAVG:min=0:max=255:slide=scroll:fg=0xFF00:mode=dot[c1];\
 [a1][b1]blend=and[ab];[ab][c1]blend=and[out]


 The blending kills difference in colors so I may add multiple graphs
 support for filter.

 Setting the background to black and blending seems a little better,
 though
 I'm losing one of my graphs in this example.

 ./ffplay -f lavfi -i mandelbrot -vf signalstats,split=3[a][b][c];\
 [a]drawgraph=lavfi.signalstats.YAVG:min=0:max=255:slide=scroll:bg=black:fg=0xFF:mode=dot[a1];\
 [b]drawgraph=lavfi.signalstats.YLOW:min=0:max=255:slide=scroll:bg=black:fg=0x00FF00:mode=dot[b1];\
 [c]drawgraph=lavfi.signalstats.YHIGH:min=0:max=255:slide=scroll:bg=black:fg=0xFF:mode=dot[c1];\
 [a1][b1]blend=lighten,[c1]blend=lighten[out]

 Also the foreground expression is in ABGR or BGR.  This is the opposite
 arrangement of what is specified here
 http://ffmpeg.org/ffmpeg-utils.html#Color.

 Using blend for this is SLOW.

 If the background could set to full alpha, then multiple graphs could be
 added together with the overlay filter. I tested some alpha expressions
 with
 bg (black@00, 0x) and didn't seem to get transparent results.

 Because filter use gbrp without alpha as output format. Will change it.
 Plan is use RGBA or even YUVA as final output.

Now it uses more friendly RGBA mode.



 Have you tried new 'line' mode?

 Oooo, this is great. Probably more readable than dot in many situations.

 Also expressions allow changing color of dot/line/bar so try it and
 tell me if its fine.

 I tested this with several modes and it works as expected (excepting that
 ABGR/BGR vs RGBA/RGB note). Thanks for adding this.

 Some other comments:
 I tried to use an equation within metadata but got no plotted result. For
 instance, metadata=pow(lavfi.signalstats.YMIN\,2). There are some
 values
 that may occur in a wide range, so a logarithmic or mathematically
 adjusted
 display may be preferable.

 Will see what can be done.

This complicates filter a lot, and I think this is more suited for
another filter
which will just operate on metadata values.



 Can input width and input height be used in variables within a size
 expression. In many cases I would like to draw the graph over the input
 video, but to do this I must know the input video size in advance.

 I do not understand what you want. You want to be able to set size of
 filter to input video?

This again complicates filter and disallows using WxH notation and
named notations.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]asfdec: Reduce minimum header size (was: New asf demuxer)

2015-06-29 Thread Carl Eugen Hoyos
Hendrik Leppkes h.leppkes at gmail.com writes:

 On Mon, Jun 29, 2015 at 10:11 AM, Carl Eugen Hoyos wrote:
  Hi!
 
  I finally found an issue that is fixed with the new asf demuxer:
  Video in http://samples.ffmpeg.org/V-codecs/MSS1/GipsyGuitar.wmv
  freezes for ten seconds after 110 seconds, this does not happen
  with -f asf_o.
  Attached patch fixes this issue, fate passes, no other sample
  tested with the patch applied.

The patch was merged by Michael-

 Just on code quality alone, I think it would be much more 
 productive if you look for the opposite and fix those.
 
 Trying to juke the stats after-the-fact by fixing the old 
 one now is not going to change anything. :p

I don't understand:
Do you mean that in your tests, the new demuxer is usable 
and has advantages over the existing one?
If yes, please share (some of) your samples, they must 
be much better than the ones I found;-(

Thank you, Carl Eugen

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


Re: [FFmpeg-devel] [PATCH 09/11] aaccoder: add a new perceptual noise substitution implementation

2015-06-29 Thread Claudio Freire
On Mon, Jun 29, 2015 at 10:58 PM, Claudio Freire klaussfre...@gmail.com wrote:
 On Fri, Jun 26, 2015 at 5:16 PM, Rostislav Pehlivanov
 atomnu...@gmail.com wrote:
 +if (spread  NOISE_SPREAD_THRESHOLD 
 +((sce-zeroes[w*16+g]  energy = threshold) ||
 +energy  threshold*(NOISE_LAMBDA_NUMERATOR/lambda))) {
 +sce-band_type[w*16+g] = NOISE_BT;
 +sce-pns_ener[w*16+g] = energy;
 +sce-zeroes[w*16+g] = 0;
 +}


 This should be:
 sce-pns_ener[w*16+g] = energy / sce-ics.group_len[w];

 Also, spread  NOISE_SPREAD_THRESHOLD works beetter as:

 spread  (NOISE_SPREAD_THRESHOLD * 120.f / lambda)

 And  energy  threshold*(NOISE_LAMBDA_NUMERATOR/lambda) as:

 energy  threshold*(NOISE_LAMBDA_NUMERATOR*sce-ics.group_len[w]/lambda))

 (to account for the transient situation in which the encoder is
 switching to and form short windows)


With the new spread measure in patch #06, if committed, in this one
NOISE_SPREAD_THRESHOLD should be redefined to 0.5 (the active_lines
measure is normalized).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Silence a warning when decoding hap

2015-06-29 Thread Michael Niedermayer
On Mon, Jun 29, 2015 at 11:28:04PM +0200, Carl Eugen Hoyos wrote:
 Hi!
 
 Attached patch silences many lines of Multiple ff_thread_finish_setup() 
 calls when decoding hap.
 
 Please comment, Carl Eugen

  hapdec.c |3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 126826ea8c86d05606122d00f4f8d633829f94f9  patchhap.diff

probably the call can be removed entirely but this is strictly
taken safer
LGTM

thx

-- 
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 10/11] aaccoder: implement intensity stereo

2015-06-29 Thread Claudio Freire
On Fri, Jun 26, 2015 at 5:16 PM, Rostislav Pehlivanov
atomnu...@gmail.com wrote:
 +if (dist2 = dist1) {
 +cpe-is_mask[w*16+g] = 1;
 +cpe-ch[0].is_ener[w*16+g] = ener1/ener01;
 +cpe-ch[1].is_ener[w*16+g] = ener0/ener1;
 +if (s_coef0*s_coef1 = 0.0f)
 +cpe-ch[1].band_type[w*16+g] = INTENSITY_BT;
 +else
 +cpe-ch[1].band_type[w*16+g] = INTENSITY_BT2;
 +count++;
 +}


If you don't add an:

cpe-ms_mask[w*16+g] = 0;

In there, you get horrible artifacts. Tested it quite a bit already.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 06/11] aacpsy: Add energy spread for each band

2015-06-29 Thread Claudio Freire
On Fri, Jun 26, 2015 at 5:16 PM, Rostislav Pehlivanov
atomnu...@gmail.com wrote:
 +++ b/libavcodec/aacpsy.c
 @@ -781,6 +781,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, 
 int channel,

  psy_band-threshold = band-thr;
  psy_band-energy= band-energy;
 +psy_band-spread= spread_en[w+g];
  }
  }



Sorry, but I just noticed while reviewing the other patches.

spread_en isn't as good a proxy for band tonality as we'd hoped, but
band-active_lines works (adjusting the rest of the patch set).

So it should read like:

 +++ b/libavcodec/aacpsy.c
 @@ -781,6 +781,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, 
 int channel,

  psy_band-threshold = band-thr;
  psy_band-energy= band-energy;
 +psy_band-spread= band-active_lines;
  }
  }


The following patch over head (well, git diff) does that:

diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 78232d4..ca21664 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -787,7 +787,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext
*ctx, int channel,

 psy_band-threshold = band-thr;
 psy_band-energy= band-energy;
-psy_band-spread= spread_en[w+g];
+psy_band-spread= band-active_lines * 2.0f / band_sizes[g];
 }
 }

The rest of the patch set will need to adapt to this other spread
measure, I'll comment on the relevant patches.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [FFmpeg-cvslog] lavf: Replace the ASF demuxer

2015-06-29 Thread compn
On Sun, 28 Jun 2015 13:41:48 +0200 (CEST)
g...@videolan.org (Alexandra Hájková) wrote:

 ffmpeg | branch: master | Alexandra Hájková
 alexandra.khirn...@gmail.com | Mon Jun 15 14:54:45 2015 +0200|
 [b08569a23948db107e5e6175cd4c695427d5339d] | committer: Anton Khirnov
 
 lavf: Replace the ASF demuxer
 
 The old one is the result of the reverse engineering and guesswork.
 The new one has been written following the now-available
 specification.

the new one is still based on the old one.
this commit message is deceptive.

 diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
 index 34e9036..8f46098 100644
 --- a/libavformat/asfdec.c
 +++ b/libavformat/asfdec.c
 @@ -1,6 +1,6 @@
  /*
 - * ASF compatible demuxer
 - * Copyright (c) 2000, 2001 Fabrice Bellard
 + * Microsoft Advanced Streaming Format demuxer
 + * Copyright (c) 2014 Alexandra Hájková

another developer who does not respect copyright.

  /* MSDN claims that this should be compatible with the ID3 frame,
 APIC,
   * but in reality this is only loosely similar */

this function appears in both demuxers.

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


Re: [FFmpeg-devel] [PATCH 09/11] aaccoder: add a new perceptual noise substitution implementation

2015-06-29 Thread Claudio Freire
On Fri, Jun 26, 2015 at 5:16 PM, Rostislav Pehlivanov
atomnu...@gmail.com wrote:
 +if (spread  NOISE_SPREAD_THRESHOLD 
 +((sce-zeroes[w*16+g]  energy = threshold) ||
 +energy  threshold*(NOISE_LAMBDA_NUMERATOR/lambda))) {
 +sce-band_type[w*16+g] = NOISE_BT;
 +sce-pns_ener[w*16+g] = energy;
 +sce-zeroes[w*16+g] = 0;
 +}


This should be:
sce-pns_ener[w*16+g] = energy / sce-ics.group_len[w];

Also, spread  NOISE_SPREAD_THRESHOLD works beetter as:

spread  (NOISE_SPREAD_THRESHOLD * 120.f / lambda)

And  energy  threshold*(NOISE_LAMBDA_NUMERATOR/lambda) as:

energy  threshold*(NOISE_LAMBDA_NUMERATOR*sce-ics.group_len[w]/lambda))

(to account for the transient situation in which the encoder is
switching to and form short windows)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 09/11] aaccoder: add a new perceptual noise substitution implementation

2015-06-29 Thread Rostislav Pehlivanov
As lambda increases (more quality) the chance to get PNS decreases with
your suggestion to use spread  (NOISE_SPREAD_THRESHOLD * 120.f /
lambda). It's more correct to have
spread  (NOISE_SPREAD_THRESHOLD * (lambda / 120.0f))
here. The spectrums showed a hole right in between the PNS and normal band
types rather than having the PNS values augment smoothly in the upper
frequencies. The suggestion to use NOISE_SPREAD_THRESHOLD of 0.5f is fine
however as the expression is still normalized.

Why the need to have sce-pns_ener[w*16+g] = energy /
sce-ics.group_len[w];, normalization? The energy value is log2'd during
scalefactor indices calculation so it's hardly going to change much. Will
do some tests to see if it smooths out the transition of normal bands -
PNS.

On 30 June 2015 at 03:27, Claudio Freire klaussfre...@gmail.com wrote:

 On Mon, Jun 29, 2015 at 10:58 PM, Claudio Freire klaussfre...@gmail.com
 wrote:
  On Fri, Jun 26, 2015 at 5:16 PM, Rostislav Pehlivanov
  atomnu...@gmail.com wrote:
  +if (spread  NOISE_SPREAD_THRESHOLD 
  +((sce-zeroes[w*16+g]  energy = threshold) ||
  +energy 
 threshold*(NOISE_LAMBDA_NUMERATOR/lambda))) {
  +sce-band_type[w*16+g] = NOISE_BT;
  +sce-pns_ener[w*16+g] = energy;
  +sce-zeroes[w*16+g] = 0;
  +}
 
 
  This should be:
  sce-pns_ener[w*16+g] = energy / sce-ics.group_len[w];
 
  Also, spread  NOISE_SPREAD_THRESHOLD works beetter as:
 
  spread  (NOISE_SPREAD_THRESHOLD * 120.f / lambda)
 
  And  energy  threshold*(NOISE_LAMBDA_NUMERATOR/lambda) as:
 
  energy  threshold*(NOISE_LAMBDA_NUMERATOR*sce-ics.group_len[w]/lambda))
 
  (to account for the transient situation in which the encoder is
  switching to and form short windows)


 With the new spread measure in patch #06, if committed, in this one
 NOISE_SPREAD_THRESHOLD should be redefined to 0.5 (the active_lines
 measure is normalized).

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


Re: [FFmpeg-devel] [PATCH 10/11] aaccoder: implement intensity stereo

2015-06-29 Thread Rostislav Pehlivanov
cpe-ms_mask[w*16+g] = 0;
This defeats the purpose of changing the phase of the spectral coefficients
if ms_mask has been set by search_for_ms. If is_mask[idx] is 1 then ms_mask
is only used to alter the phase of the spectral coefficients, so probably
the phase gets altered incorrectly. The reason why ms_mask is even
considered is only because the decoder uses it in that way and because the
specifications mention that IS and M/S are exclusive yet related. Maybe
there might be something wrong with how the search_for_ms flags bands so it
inverts the phase of IS incorrectly. Or maybe the code to determine the
phase of the spectral coefficients might be wrong in search_for_is. I'll
play around with how the phase is set and maybe in case nothing works out
I'll unflag ms_mask[].

On 30 June 2015 at 02:35, Claudio Freire klaussfre...@gmail.com wrote:

 On Fri, Jun 26, 2015 at 5:16 PM, Rostislav Pehlivanov
 atomnu...@gmail.com wrote:
  +if (dist2 = dist1) {
  +cpe-is_mask[w*16+g] = 1;
  +cpe-ch[0].is_ener[w*16+g] = ener1/ener01;
  +cpe-ch[1].is_ener[w*16+g] = ener0/ener1;
  +if (s_coef0*s_coef1 = 0.0f)
  +cpe-ch[1].band_type[w*16+g] = INTENSITY_BT;
  +else
  +cpe-ch[1].band_type[w*16+g] = INTENSITY_BT2;
  +count++;
  +}


 If you don't add an:

 cpe-ms_mask[w*16+g] = 0;

 In there, you get horrible artifacts. Tested it quite a bit already.

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