Re: [libav-devel] [PATCH 2/5] lavc: schedule unused FF_QSCALE_TYPE_* for removal on next bump

2013-11-04 Thread Vittorio Giovara
On Mon, Nov 4, 2013 at 8:56 AM, Anton Khirnov an...@khirnov.net wrote:
 ---
  libavcodec/avcodec.h |2 ++
  libavcodec/version.h |3 +++
  2 files changed, 5 insertions(+)

OK
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/5] lavc: deprecate FF_MAX_B_FRAMES

2013-11-04 Thread Vittorio Giovara
On Mon, Nov 4, 2013 at 8:56 AM, Anton Khirnov an...@khirnov.net wrote:
 We should not arbitrarily decide the maximum B-frame number for all
 encoders supported by Libav, each encoder should be able to set its own
 limits.
 ---
  libavcodec/avcodec.h   |5 +
  libavcodec/mpegvideo.h |2 ++
  libavcodec/mpegvideo_enc.c |6 +-
  libavcodec/options_table.h |2 +-
  libavcodec/version.h   |3 +++
  5 files changed, 16 insertions(+), 2 deletions(-)


OK
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 3/5] lavc: move MB_TYPE_* macros from avcodec.h to mpegvideo.h

2013-11-04 Thread Vittorio Giovara
On Mon, Nov 4, 2013 at 8:56 AM, Anton Khirnov an...@khirnov.net wrote:
 They are mpegvideo-specific and not supposed to be used by callers.
 ---
  libavcodec/avcodec.h   |2 ++
  libavcodec/mpegvideo.h |   24 
  libavcodec/version.h   |3 +++
  3 files changed, 29 insertions(+)

Looks ok.
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] lavc: Add colorimetry values for BT.2020, other non-included ones

2013-11-04 Thread Vittorio Giovara
On Sun, Nov 3, 2013 at 7:32 PM, Jan Ekström jee...@gmail.com wrote:
 ---
  doc/APIchanges   |4 
  libavcodec/avcodec.h |   42 +++---
  libavcodec/version.h |2 +-
  3 files changed, 32 insertions(+), 16 deletions(-)


I think it looks OK.
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] hevc_ps: Use AV_PIX_FMT_YUVJ420P if YUV 4:2:0 8-bit full scale.

2013-11-04 Thread Vittorio Giovara
On Sun, Nov 3, 2013 at 8:47 PM, Yusuke Nakamura
muken.the.vfrman...@gmail.com wrote:
 ---
  libavcodec/hevc_ps.c | 2 ++
  1 file changed, 2 insertions(+)

 diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
 index 15f73be..a51784d 100644
 --- a/libavcodec/hevc_ps.c
 +++ b/libavcodec/hevc_ps.c
 @@ -449,6 +449,8 @@ static void decode_vui(HEVCContext *s, HEVCSPS *sps)
  vui-video_format= get_bits(gb, 3);
  vui-video_full_range_flag   = get_bits1(gb);
  vui-colour_description_present_flag = get_bits1(gb);
 +if (vui-video_full_range_flag  sps-pix_fmt == AV_PIX_FMT_YUV420P)
 +sps-pix_fmt = AV_PIX_FMT_YUVJ420P;
  if (vui-colour_description_present_flag) {
  vui-colour_primaries= get_bits(gb, 8);
  vui-transfer_characteristic = get_bits(gb, 8);

This looks fine, can you just add a FIXME comment that you're doing
this for swscale compatibility?
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] Deprecate XvMC decoding.

2013-11-04 Thread Anton Khirnov
It has long ago been superseded by newer acceleration APIs, such as
VDPAU. Most of our major downstreams do not use it. It is not
implemented within the hwaccel framework, but requires its own specific
code in the decoders, which is a maintenance burden.
---
 doc/APIchanges|3 +++
 doc/general.texi  |1 -
 libavcodec/avcodec.h  |   11 ++---
 libavcodec/codec_desc.c   |2 ++
 libavcodec/error_resilience.c |   12 ++
 libavcodec/mpeg12dec.c|   51 ++---
 libavcodec/mpegvideo.c|   18 ++-
 libavcodec/options_table.h|2 ++
 libavcodec/version.h  |3 +++
 libavcodec/x86/dsputil_init.c |   14 +--
 libavutil/pixdesc.c   |2 ++
 libavutil/pixfmt.h|2 ++
 libavutil/version.h   |3 +++
 13 files changed, 114 insertions(+), 10 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index d9618f4..1cf25bb 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil: 2012-10-22
 
 API changes, most recent first:
 
+2013-11-xx - xxx - lavc 55.25.0
+  Deprecate XvMC decoding.
+
 2013-11-xx - xxx - lavu 52.18.0 - mem.h
   Move av_fast_malloc() and av_fast_realloc() for libavcodec to libavutil.
 
diff --git a/doc/general.texi b/doc/general.texi
index 6c82ac7..811fb9a 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -577,7 +577,6 @@ following image formats are supported:
 @item Mobotix MxPEG video@tab @tab  X
 @item Motion Pixels video@tab @tab  X
 @item MPEG-1 video   @tab  X  @tab  X
-@item MPEG-1/2 video XvMC (X-Video Motion Compensation)  @tab @tab  X
 @item MPEG-2 video   @tab  X  @tab  X
 @item MPEG-4 part 2  @tab  X  @tab  X
 @tab libxvidcore can be used alternatively for encoding.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f08a6fe..80538cf 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -107,7 +107,9 @@ enum AVCodecID {
 /* video codecs */
 AV_CODEC_ID_MPEG1VIDEO,
 AV_CODEC_ID_MPEG2VIDEO, /// preferred ID for MPEG-1/2 video decoding
+#if FF_API_LAVC_XVMC
 AV_CODEC_ID_MPEG2VIDEO_XVMC,
+#endif
 AV_CODEC_ID_H261,
 AV_CODEC_ID_H263,
 AV_CODEC_ID_RV10,
@@ -688,8 +690,10 @@ typedef struct RcOverride{
  */
 #define CODEC_CAP_DR1 0x0002
 #define CODEC_CAP_TRUNCATED   0x0008
+#if FF_API_LAVC_XVMC
 /* Codec can export data for HW decoding (XvMC). */
 #define CODEC_CAP_HWACCEL 0x0010
+#endif
 /**
  * Encoder or decoder requires flushing with NULL input at the end in order to
  * give the complete and correct output.
@@ -1527,12 +1531,13 @@ typedef struct AVCodecContext {
 #define SLICE_FLAG_ALLOW_FIELD0x0002 /// allow draw_horiz_band() with 
field slices (MPEG2 field pics)
 #define SLICE_FLAG_ALLOW_PLANE0x0004 /// allow draw_horiz_band() with 1 
component at a time (SVQ1)
 
+#if FF_API_LAVC_XVMC
 /**
- * XVideo Motion Acceleration
- * - encoding: forbidden
- * - decoding: set by decoder
+ * @deprecated xvmc support is deprecated
  */
+attribute_deprecated
 int xvmc_acceleration;
+#endif
 
 /**
  * macroblock decision mode
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 73e8f6d..4a27bf3 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -39,6 +39,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
 .long_name = NULL_IF_CONFIG_SMALL(MPEG-1 video),
 .props = AV_CODEC_PROP_LOSSY,
 },
+#if FF_API_LAVC_XVMC
 {
 .id= AV_CODEC_ID_MPEG2VIDEO_XVMC,
 .type  = AVMEDIA_TYPE_VIDEO,
@@ -46,6 +47,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
 .long_name = NULL_IF_CONFIG_SMALL(MPEG-1/2 video XvMC (X-Video Motion 
Compensation)),
 .props = AV_CODEC_PROP_LOSSY,
 },
+#endif
 {
 .id= AV_CODEC_ID_H261,
 .type  = AVMEDIA_TYPE_VIDEO,
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 1769d2b..3132633 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -33,6 +33,10 @@
 #include rectangle.h
 #include thread.h
 
+#if FF_API_LAVC_XVMC
+#include libavutil/internal.h
+#endif
+
 /**
  * @param stride the number of MVs to get to the next row
  * @param mv_step the number of MVs per row or column in a macroblock
@@ -672,11 +676,15 @@ static int is_intra_more_likely(ERContext *s)
 if (undamaged_count  5)
 return 0; // almost all MBs damaged - use temporal prediction
 
+#if FF_API_LAVC_XVMC
+FF_DISABLE_DEPRECATION_WARNINGS
 // prevent dsp.sad() check, that requires access to the image
 if (CONFIG_MPEG_XVMC_DECODER
 s-avctx-xvmc_acceleration 
 s-cur_pic-f.pict_type == AV_PICTURE_TYPE_I)
 return 1;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
 
 skip_amount = 

Re: [libav-devel] [PATCH] Deprecate XvMC decoding.

2013-11-04 Thread Rémi Denis-Courmont
On Mon,  4 Nov 2013 11:58:43 +0100, Anton Khirnov an...@khirnov.net
wrote:
 It has long ago been superseded by newer acceleration APIs, such as
 VDPAU. Most of our major downstreams do not use it.

Well, XvMC is only supported by one or two rather old generations of
graphic cards, and even then it only support MPEG-2. So it makes little to
no sense for downstreams.

-- 
Rémi Denis-Courmont
Sent from my collocated server
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] Deprecate XvMC decoding.

2013-11-04 Thread Kostya Shishkov
On 4 November 2013 11:58, Anton Khirnov an...@khirnov.net wrote:
 It has long ago been superseded by newer acceleration APIs, such as
 VDPAU. Most of our major downstreams do not use it. It is not
 implemented within the hwaccel framework, but requires its own specific
 code in the decoders, which is a maintenance burden.
 ---

Looks OK but outdated by a couple of years at least.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/6] vdpau: add a constructor for AVVDPAUContext.

2013-11-04 Thread Rémi Denis-Courmont
On Sun,  3 Nov 2013 23:27:48 +0100, Anton Khirnov an...@khirnov.net
wrote:
 We will likely want to add new fields to it in the future, so this is
 needed to avoid breaking ABI.

Should this not take a pix_fmt parameter and support all hwaccels? Or
should there be one of these for each hwaccel? Or do we only care about
VDPAU (fine with me :-D)?

-- 
Rémi Denis-Courmont
Sent from my collocated server
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH v2] lavc: Add colorimetry values for BT.2020, other non-included ones

2013-11-04 Thread Jan Ekström
---
 doc/APIchanges   |4 
 libavcodec/avcodec.h |   42 +++---
 libavcodec/version.h |2 +-
 3 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 561c828..519709e 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,10 @@ libavutil: 2012-10-22
 
 API changes, most recent first:
 
+2013-11-xx - xxx - lavc 55.25.0 - avcodec.h
+  Add ITU-R BT.2020 and other not yet included values to color primaries,
+  transfer characteristics and colorspaces.
+
 2013-08-xx - xxx - lavu 52.17.0 - avframe.h
   Add AVFrame.flags and AV_FRAME_FLAG_CORRUPT.
 
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index d42febf..8b121b7 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -546,28 +546,40 @@ enum AVColorPrimaries{
 AVCOL_PRI_SMPTE170M   = 6, /// also ITU-R BT601-6 525 / ITU-R BT1358 525 
/ ITU-R BT1700 NTSC
 AVCOL_PRI_SMPTE240M   = 7, /// functionally identical to above
 AVCOL_PRI_FILM= 8,
+AVCOL_PRI_BT2020  = 9, /// ITU-R BT2020
 AVCOL_PRI_NB , /// Not part of ABI
 };
 
 enum AVColorTransferCharacteristic{
-AVCOL_TRC_BT709   = 1, /// also ITU-R BT1361
-AVCOL_TRC_UNSPECIFIED = 2,
-AVCOL_TRC_GAMMA22 = 4, /// also ITU-R BT470M / ITU-R BT1700 625 PAL  
SECAM
-AVCOL_TRC_GAMMA28 = 5, /// also ITU-R BT470BG
-AVCOL_TRC_SMPTE240M   = 7,
-AVCOL_TRC_NB , /// Not part of ABI
+AVCOL_TRC_BT709=  1, /// also ITU-R BT1361
+AVCOL_TRC_UNSPECIFIED  =  2,
+AVCOL_TRC_GAMMA22  =  4, /// also ITU-R BT470M / ITU-R BT1700 625 PAL 
 SECAM
+AVCOL_TRC_GAMMA28  =  5, /// also ITU-R BT470BG
+AVCOL_TRC_SMPTE170M=  6, /// also ITU-R BT601-6 525 or 625 / ITU-R 
BT1358 525 or 625 / ITU-R BT1700 NTSC
+AVCOL_TRC_SMPTE240M=  7,
+AVCOL_TRC_LINEAR   =  8, /// Linear transfer characteristics
+AVCOL_TRC_LOG  =  9, /// Logarithmic transfer characteristic 
(100:1 range)
+AVCOL_TRC_LOG_SQRT = 10, /// Logarithmic transfer characteristic 
(100 * Sqrt( 10 ) : 1 range)
+AVCOL_TRC_IEC61966_2_4 = 11, /// IEC 61966-2-4
+AVCOL_TRC_BT1361_ECG   = 12, /// ITU-R BT1361 Extended Colour Gamut
+AVCOL_TRC_IEC61966_2_1 = 13, /// IEC 61966-2-1 (sRGB or sYCC)
+AVCOL_TRC_BT2020_10= 14, /// ITU-R BT2020 for 10 bit system
+AVCOL_TRC_BT2020_12= 15, /// ITU-R BT2020 for 12 bit system
+AVCOL_TRC_NB   , /// Not part of ABI
 };
 
 enum AVColorSpace{
-AVCOL_SPC_RGB = 0,
-AVCOL_SPC_BT709   = 1, /// also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 
/ SMPTE RP177 Annex B
-AVCOL_SPC_UNSPECIFIED = 2,
-AVCOL_SPC_FCC = 4,
-AVCOL_SPC_BT470BG = 5, /// also ITU-R BT601-6 625 / ITU-R BT1358 625 
/ ITU-R BT1700 625 PAL  SECAM / IEC 61966-2-4 xvYCC601
-AVCOL_SPC_SMPTE170M   = 6, /// also ITU-R BT601-6 525 / ITU-R BT1358 525 
/ ITU-R BT1700 NTSC / functionally identical to above
-AVCOL_SPC_SMPTE240M   = 7,
-AVCOL_SPC_YCOCG   = 8, /// Used by Dirac / VC-2 and H.264 FRext, see 
ITU-T SG16
-AVCOL_SPC_NB , /// Not part of ABI
+AVCOL_SPC_RGB =  0,
+AVCOL_SPC_BT709   =  1, /// also ITU-R BT1361 / IEC 61966-2-4 
xvYCC709 / SMPTE RP177 Annex B
+AVCOL_SPC_UNSPECIFIED =  2,
+AVCOL_SPC_FCC =  4,
+AVCOL_SPC_BT470BG =  5, /// also ITU-R BT601-6 625 / ITU-R BT1358 625 
/ ITU-R BT1700 625 PAL  SECAM / IEC 61966-2-4 xvYCC601
+AVCOL_SPC_SMPTE170M   =  6, /// also ITU-R BT601-6 525 / ITU-R BT1358 525 
/ ITU-R BT1700 NTSC / functionally identical to above
+AVCOL_SPC_SMPTE240M   =  7,
+AVCOL_SPC_YCOCG   =  8, /// Used by Dirac / VC-2 and H.264 FRext, see 
ITU-T SG16
+AVCOL_SPC_BT2020_NCL  =  9, /// ITU-R BT2020 non-constant luminance system
+AVCOL_SPC_BT2020_CL   = 10, /// ITU-R BT2020 constant luminance system
+AVCOL_SPC_NB  , /// Not part of ABI
 };
 
 enum AVColorRange{
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 5e87841..b488558 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -27,7 +27,7 @@
  */
 
 #define LIBAVCODEC_VERSION_MAJOR 55
-#define LIBAVCODEC_VERSION_MINOR 24
+#define LIBAVCODEC_VERSION_MINOR 25
 #define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
-- 
1.7.9

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 2/2] h264_ps: Set AVCHROMA_LOC_UNSPECIFIED if chroma location info is absent.

2013-11-04 Thread Vittorio Giovara
On Sun, Nov 3, 2013 at 8:15 PM, Yusuke Nakamura
muken.the.vfrman...@gmail.com wrote:
 ---
  libavcodec/h264_ps.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)


LGTM
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH v2] lavc: Add colorimetry values for BT.2020, other non-included ones

2013-11-04 Thread Jan Ekstrom
On Mon, Nov 4, 2013 at 1:28 PM, Jan Ekström jee...@gmail.com wrote:
 ---
  doc/APIchanges   |4 
  libavcodec/avcodec.h |   42 +++---
  libavcodec/version.h |2 +-
  3 files changed, 32 insertions(+), 16 deletions(-)

The only difference to v1 is that AVCOL_TRC_BT1361 is now
AVCOL_TRC_BT1361_ECG, in order to minimize possible incorrect thoughts
that the value means the same as the BT1361 (conventional colour
gamut) that the comment on the BT709 value references to.

Jan Ekström
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 2/2] h264_ps: Set AVCHROMA_LOC_UNSPECIFIED if chroma location info is absent.

2013-11-04 Thread Vittorio Giovara
On Mon, Nov 4, 2013 at 12:47 PM, Vittorio Giovara
vittorio.giov...@gmail.com wrote:
 On Sun, Nov 3, 2013 at 8:15 PM, Yusuke Nakamura
 muken.the.vfrman...@gmail.com wrote:
 ---
  libavcodec/h264_ps.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)


 LGTM
 Vittorio

Sorry I was too hasty, specifications say When the
chroma_sample_loc_type_top_field and
chroma_sample_loc_type_bottom_field are not present, the values of
chroma_sample_loc_type_top_field and
chroma_sample_loc_type_bottom_field shall be inferred to be equal to
0.
So the  h-avctx-chroma_sample_location should be AVCHROMA_LOC_LEFT,
which is the default, and thus should not be changed.

Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 3/6] vdpau: add a convenience function for getting a decoder profile.

2013-11-04 Thread Rémi Denis-Courmont
On Sun,  3 Nov 2013 23:27:47 +0100, Anton Khirnov an...@khirnov.net
wrote:
 Based on the code by Rémi Denis-Courmont r...@remlab.net from VLC.
 ---
  doc/APIchanges   |3 +++
  libavcodec/vdpau.c   |   37 +
  libavcodec/vdpau.h   |   10 ++
  libavcodec/version.h |2 +-
  4 files changed, 51 insertions(+), 1 deletion(-)
 
 diff --git a/doc/APIchanges b/doc/APIchanges
 index 561c828..93d1608 100644
 --- a/doc/APIchanges
 +++ b/doc/APIchanges
 @@ -13,6 +13,9 @@ libavutil: 2012-10-22
  
  API changes, most recent first:
  
 +2013-11-xx - xxx - lavc 55.25.0 - vdpau.h
 +  Add av_vdpau_get_profile().
 +
  2013-08-xx - xxx - lavu 52.17.0 - avframe.h
Add AVFrame.flags and AV_FRAME_FLAG_CORRUPT.
  
 diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
 index 9bcbc2e..5cabb7e 100644
 --- a/libavcodec/vdpau.c
 +++ b/libavcodec/vdpau.c
 @@ -90,4 +90,41 @@ int ff_vdpau_add_buffer(Picture *pic, const uint8_t
 *buf, uint32_t size)
  return 0;
  }
  
 +int av_vdpau_get_profile(AVCodecContext *avctx)

Aside from AVERROR, the correct return type would be VdpDecoderProfile...

 +{
 +switch (avctx-codec_id) {
 +case AV_CODEC_ID_MPEG1VIDEO:   return
 VDP_DECODER_PROFILE_MPEG1;
 +case AV_CODEC_ID_MPEG2VIDEO:
 +switch (avctx-profile) {
 +case FF_PROFILE_MPEG2_MAIN:return
 VDP_DECODER_PROFILE_MPEG2_MAIN;
 +case FF_PROFILE_MPEG2_SIMPLE:  return
 VDP_DECODER_PROFILE_MPEG2_SIMPLE;
 +default:   return AVERROR(EINVAL);

Is it safe and clean to mix AVERROR codes with VDPAU enumerations?

 +}
 +case AV_CODEC_ID_H263: return
 VDP_DECODER_PROFILE_MPEG4_PART2_ASP;

No objections, but I did not test this case.

 +case AV_CODEC_ID_MPEG4:
 +switch (avctx-profile) {
 +case FF_PROFILE_MPEG4_SIMPLE:  return
 VDP_DECODER_PROFILE_MPEG4_PART2_SP;
 +case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: return
 VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
 +default:   return AVERROR(EINVAL);

No objections but these cases (MPEG-4 part 2) did not actually work when I
tried because lavc failed to populate the profile before calling
get_format().

 +}
 +case AV_CODEC_ID_H264:
 +switch (avctx-profile) {
 +case FF_PROFILE_H264_CONSTRAINED_BASELINE:
 +case FF_PROFILE_H264_BASELINE: return
 VDP_DECODER_PROFILE_H264_BASELINE;
 +case FF_PROFILE_H264_MAIN: return
 VDP_DECODER_PROFILE_H264_MAIN;
 +case FF_PROFILE_H264_HIGH: return
 VDP_DECODER_PROFILE_H264_HIGH;
 +default:   return AVERROR(EINVAL);
 +}
 +case AV_CODEC_ID_WMV3:
 +case AV_CODEC_ID_VC1:
 +switch (avctx-profile) {
 +case FF_PROFILE_VC1_SIMPLE:return
 VDP_DECODER_PROFILE_VC1_SIMPLE;
 +case FF_PROFILE_VC1_MAIN:  return
 VDP_DECODER_PROFILE_VC1_MAIN;
 +case FF_PROFILE_VC1_ADVANCED:  return
 VDP_DECODER_PROFILE_VC1_ADVANCED;
 +default:   return AVERROR(EINVAL);
 +}
 +}
 +return AVERROR(EINVAL);
 +}
 +
  /* @}*/
 diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
 index bf8f666..49ca6f0 100644
 --- a/libavcodec/vdpau.h
 +++ b/libavcodec/vdpau.h
 @@ -52,6 +52,7 @@
  #include vdpau/vdpau.h
  #include vdpau/vdpau_x11.h
  
 +#include avcodec.h
  #include version.h
  
  #if FF_API_BUFS_VDPAU
 @@ -123,6 +124,15 @@ typedef struct AVVDPAUContext {
  #endif
  } AVVDPAUContext;
  
 +/**
 + * Get a decoder profile that should be used for initializing a VDPAU
 decoder.
 + * Should be called from the AVCodecContext.get_format() callback.
 + *
 + * @return VdpDecoderProfile on success (non-negative), or a negative
 number on
 + * error
 + */
 +int av_vdpau_get_profile(AVCodecContext *avctx);
 +
  #if FF_API_CAP_VDPAU
  /** @brief The videoSurface is used for rendering. */
  #define FF_VDPAU_STATE_USED_FOR_RENDER 1
 diff --git a/libavcodec/version.h b/libavcodec/version.h
 index 05ac33e..562dda5 100644
 --- a/libavcodec/version.h
 +++ b/libavcodec/version.h
 @@ -27,7 +27,7 @@
   */
  
  #define LIBAVCODEC_VERSION_MAJOR 55
 -#define LIBAVCODEC_VERSION_MINOR 24
 +#define LIBAVCODEC_VERSION_MINOR 25
  #define LIBAVCODEC_VERSION_MICRO  0
  
  #define LIBAVCODEC_VERSION_INT 
AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \

-- 
Rémi Denis-Courmont
Sent from my collocated server
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 4/6] vdpau: add a constructor for AVVDPAUContext.

2013-11-04 Thread Rémi Denis-Courmont
On Mon, 4 Nov 2013 01:03:22 +0100, wm4 nfx...@googlemail.com wrote:
 Completely arbitrary API changes out of the blue? How nice.

At this point, it remains backward compatible.

In any case, the VDPAU hwaccel has not been in any libav release, hasn't
it? So I don't mind breaking the ABI as yet. In fact, I'd rather fix it now
when the pain is minimal after distributions pick up newer libav.

-- 
Rémi Denis-Courmont
Sent from my collocated server
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 6/6] avconv: add support for VDPAU decoding

2013-11-04 Thread Rémi Denis-Courmont
On Sun,  3 Nov 2013 23:27:50 +0100, Anton Khirnov an...@khirnov.net
wrote:
 ---
  Changelog   |1 +
  Makefile|5 +-
  avconv.c|3 +
  avconv.h|5 +
  avconv_opt.c|2 +
  avconv_vdpau.c  |  339
  +++
  configure   |   12 +-
  doc/avconv.texi |3 +
  8 files changed, 367 insertions(+), 3 deletions(-)
  create mode 100644 avconv_vdpau.c
 
 diff --git a/Changelog b/Changelog
 index 74ef59f..2e870ab 100644
 --- a/Changelog
 +++ b/Changelog
 @@ -47,6 +47,7 @@ version 10:
  - Live HDS muxer
  - setsar/setdar filters now support variables in ratio expressions
  - dar variable in the scale filter now returns the actual DAR (i.e. a *
  sar)
 +- support for decoding through VDPAU in avconv (the -hwaccel option)

I don't mind/care either way, but this begs the question whether
decoding-only hwaccel should be hidden within libav, or exposed. Because
for decoding only, there is really no need to expose the hwaccel
ugliness^Wcomplexity to libav users.

Admittedly, if the sole goal is to test hwaccel, then it is best to expose
it.

  
  
  version 9:
 diff --git a/Makefile b/Makefile
 index e116905..3b194c5 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -63,7 +63,10 @@ PROGS-$(CONFIG_AVSERVER) += avserver
  
  PROGS  := $(PROGS-yes:%=%$(EXESUF))
  OBJS= cmdutils.o $(EXEOBJS)
 +
  OBJS-avconv = avconv_opt.o avconv_filter.o
 +OBJS-avconv-$(HAVE_VDPAU_X11) += avconv_vdpau.o
 +
  TESTTOOLS   = audiogen videogen rotozoom tiny_psnr base64
  HOSTPROGS  := $(TESTTOOLS:%=tests/%) doc/print_options
  TOOLS   = qt-faststart trasher
 @@ -127,7 +130,7 @@ endef
  $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D
  
  define DOPROG
 -OBJS-$(1) += $(1).o cmdutils.o $(EXEOBJS)
 +OBJS-$(1) += $(1).o cmdutils.o $(EXEOBJS) $(OBJS-$(1)-yes)
  $(1)$(EXESUF): $$(OBJS-$(1))
  $$(OBJS-$(1)): CFLAGS  += $(CFLAGS-$(1))
  $(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
 diff --git a/avconv.c b/avconv.c
 index 33a9a73..2ce52bb 100644
 --- a/avconv.c
 +++ b/avconv.c
 @@ -1375,6 +1375,9 @@ typedef struct HWAccel {
  } HWAccel;
  
  static const HWAccel hwaccels[] = {
 +#if HAVE_VDPAU_X11
 +{ VDPAU, vdpau_init, HWACCEL_VDPAU, AV_PIX_FMT_VDPAU },
 +#endif
  { 0 },
  };
  
 diff --git a/avconv.h b/avconv.h
 index 232182a..6d0822d 100644
 --- a/avconv.h
 +++ b/avconv.h
 @@ -200,6 +200,7 @@ typedef struct FilterGraph {
  enum HWAccelID {
  HWACCEL_NONE = 0,
  HWACCEL_AUTO,
 +HWACCEL_VDPAU,
  };
  
  typedef struct InputStream {
 @@ -386,4 +387,8 @@ FilterGraph *init_simple_filtergraph(InputStream
*ist,
 OutputStream *ost);
  
  int avconv_parse_options(int argc, char **argv);
  
 +#if HAVE_VDPAU_X11
 +int vdpau_init(AVCodecContext *s);
 +#endif
 +
  #endif /* AVCONV_H */
 diff --git a/avconv_opt.c b/avconv_opt.c
 index d3677be..19dd9d8 100644
 --- a/avconv_opt.c
 +++ b/avconv_opt.c
 @@ -494,6 +494,8 @@ static void add_input_streams(OptionsContext *o,
 AVFormatContext *ic)
  ist-hwaccel_id = HWACCEL_NONE;
  else if (!strcmp(hwaccel, auto))
  ist-hwaccel_id = HWACCEL_AUTO;
 +else if (!strcmp(hwaccel, vdpau))
 +ist-hwaccel_id = HWACCEL_VDPAU;
  else {
  av_log(NULL, AV_LOG_ERROR, Unrecognized hwaccel:
  %s.\n,
 hwaccel);
 diff --git a/avconv_vdpau.c b/avconv_vdpau.c
 new file mode 100644
 index 000..aeb97b1
 --- /dev/null
 +++ b/avconv_vdpau.c
 @@ -0,0 +1,339 @@
 +/*
 + * This file is part of Libav.
 + *
 + * Libav 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.
 + *
 + * Libav 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 Libav; if not, write to the Free Software
 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 02110-1301 USA
 + */
 +
 +#include stdlib.h
 +
 +#include X11/Xlib.h
 +
 +#include avconv.h
 +
 +#include libavcodec/vdpau.h
 +
 +#include libavutil/avassert.h
 +#include libavutil/buffer.h
 +#include libavutil/frame.h
 +#include libavutil/pixfmt.h
 +
 +typedef struct VDPAUContext {
 +Display *dpy;
 +int screen;
 +
 +VdpDevice  device;
 +VdpDecoder decoder;
 +VdpGetProcAddress *get_proc_address;
 +
 +VdpGetErrorString   *get_error_string;
 +VdpGetInformationString
 *get_information_string;
 +VdpDeviceDestroy

Re: [libav-devel] [PATCH 1/6] lavc: use buf[0] instead of data[0] in checks whether a frame is allocated

2013-11-04 Thread Rémi Denis-Courmont
On Sun,  3 Nov 2013 23:27:45 +0100, Anton Khirnov an...@khirnov.net
wrote:
 data[0] may be NULL for valid frames with hwaccel pixel formats.

This looks OK (and VLC already supplies a dummy buf[0] for hwaccel
surfaces) but I would not expect downstreams to adapt anytime soon, for the
sake of backward compatibility.

-- 
Rémi Denis-Courmont
Sent from my collocated server
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH 1/2] h264_ps: use specifications' name for chroma location variables

2013-11-04 Thread Vittorio Giovara
---
 libavcodec/h264_ps.c |   14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 54b735d..819b7ff 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -131,6 +131,9 @@ static inline int decode_hrd_parameters(H264Context *h, SPS 
*sps)
 static inline int decode_vui_parameters(H264Context *h, SPS *sps)
 {
 int aspect_ratio_info_present_flag;
+int chroma_loc_info_present_flag;
+int chroma_sample_loc_type_top_field;
+int chroma_sample_loc_type_bottom_field;
 unsigned int aspect_ratio_idc;
 
 aspect_ratio_info_present_flag = get_bits1(h-gb);
@@ -173,11 +176,12 @@ static inline int decode_vui_parameters(H264Context *h, 
SPS *sps)
 }
 }
 
-/* chroma_location_info_present_flag */
-if (get_bits1(h-gb)) {
-/* chroma_sample_location_type_top_field */
-h-avctx-chroma_sample_location = get_ue_golomb(h-gb) + 1;
-get_ue_golomb(h-gb);  /* chroma_sample_location_type_bottom_field */
+chroma_loc_info_present_flag = get_bits1(h-gb);
+if (chroma_loc_info_present_flag) {
+chroma_sample_loc_type_top_field= get_ue_golomb(h-gb);
+chroma_sample_loc_type_bottom_field = get_ue_golomb(h-gb);
+
+h-avctx-chroma_sample_location = chroma_sample_loc_type_top_field + 
1;
 }
 
 sps-timing_info_present_flag = get_bits1(h-gb);
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH 2/2] h264_ps: check validity of parsed chroma location values

2013-11-04 Thread Vittorio Giovara
---
 libavcodec/h264_ps.c |5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 819b7ff..95e0b9a 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -181,6 +181,11 @@ static inline int decode_vui_parameters(H264Context *h, 
SPS *sps)
 chroma_sample_loc_type_top_field= get_ue_golomb(h-gb);
 chroma_sample_loc_type_bottom_field = get_ue_golomb(h-gb);
 
+if (chroma_sample_loc_type_top_field != 
chroma_sample_loc_type_bottom_field) {
+av_log(h-avctx, AV_LOG_WARNING, Different chroma location for 
top and bottom fields is not supported.);
+if (h-avctx-err_recognition  AV_EF_EXPLODE)
+return AVERROR_PATCHWELCOME;
+}
 h-avctx-chroma_sample_location = chroma_sample_loc_type_top_field + 
1;
 }
 
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/6] lavc: use buf[0] instead of data[0] in checks whether a frame is allocated

2013-11-04 Thread Hendrik Leppkes
On Mon, Nov 4, 2013 at 1:05 PM, Rémi Denis-Courmont r...@remlab.net wrote:
 On Sun,  3 Nov 2013 23:27:45 +0100, Anton Khirnov an...@khirnov.net
 wrote:
 data[0] may be NULL for valid frames with hwaccel pixel formats.

 This looks OK (and VLC already supplies a dummy buf[0] for hwaccel
 surfaces) but I would not expect downstreams to adapt anytime soon, for the
 sake of backward compatibility.

If downstream uses get_buffer2, they absolutely need to provide a
buf[0], and if downstream uses get_buffer, the compat layer should
provide a buf[0], IIRC.

Or am I missing something?

- Hendrik
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] avfilter/buffer: Suppress deprecation warning for avfilter_unref_buffer

2013-11-04 Thread Diego Biurrun
The function is used in a block of code that is deprecated anyway.
---
 libavfilter/buffer.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/buffer.c b/libavfilter/buffer.c
index 88b5f22..fd0b18f 100644
--- a/libavfilter/buffer.c
+++ b/libavfilter/buffer.c
@@ -18,6 +18,7 @@
 
 #include libavutil/channel_layout.h
 #include libavutil/common.h
+#include libavutil/internal.h
 #include libavcodec/avcodec.h
 
 #include avfilter.h
@@ -89,7 +90,9 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref)
 
 void avfilter_unref_bufferp(AVFilterBufferRef **ref)
 {
+FF_DISABLE_DEPRECATION_WARNINGS
 avfilter_unref_buffer(*ref);
+FF_ENABLE_DEPRECATION_WARNINGS
 *ref = NULL;
 }
 
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH 1/2] hevc: Set chroma_sample_location of AVCodecContext.

2013-11-04 Thread Yusuke Nakamura
---
 libavcodec/hevc.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index ed980e3..e3d306b 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -401,6 +401,13 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps)
 s-avctx-sample_aspect_ratio = sps-vui.sar;
 s-avctx-has_b_frames= sps-temporal_layer[sps-max_sub_layers - 
1].num_reorder_pics;
 
+if (sps-vui.chroma_loc_info_present_flag)
+s-avctx-chroma_sample_location = 
sps-vui.chroma_sample_loc_type_top_field + 1;
+else if (sps-chroma_format_idc == 1)
+s-avctx-chroma_sample_location = AVCHROMA_LOC_LEFT;
+else
+s-avctx-chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED;
+
 ff_hevc_pred_init(s-hpc, sps-bit_depth);
 ff_hevc_dsp_init (s-hevcdsp, sps-bit_depth);
 ff_videodsp_init (s-vdsp,sps-bit_depth);
-- 
1.8.3.msysgit.0

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH 2/2] h264_ps: Set chroma_sample_location appropriately if chroma location info is absent.

2013-11-04 Thread Yusuke Nakamura
---
 libavcodec/h264_ps.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 54b735d..422f522 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -178,7 +178,10 @@ static inline int decode_vui_parameters(H264Context *h, 
SPS *sps)
 /* chroma_sample_location_type_top_field */
 h-avctx-chroma_sample_location = get_ue_golomb(h-gb) + 1;
 get_ue_golomb(h-gb);  /* chroma_sample_location_type_bottom_field */
-}
+} else if (sps-chroma_format_idc == 1)
+h-avctx-chroma_sample_location = AVCHROMA_LOC_LEFT;
+else
+h-avctx-chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED;
 
 sps-timing_info_present_flag = get_bits1(h-gb);
 if (sps-timing_info_present_flag) {
-- 
1.8.3.msysgit.0

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/6] lavc: use buf[0] instead of data[0] in checks whether a frame is allocated

2013-11-04 Thread Rémi Denis-Courmont
On Mon, 4 Nov 2013 13:12:36 +0100, Hendrik Leppkes h.lepp...@gmail.com
wrote:
 If downstream uses get_buffer2, they absolutely need to provide a
 buf[0], and if downstream uses get_buffer, the compat layer should
 provide a buf[0], IIRC.
 
 Or am I missing something?

I don't expect downstreams to set data[0] to NULL anytime soon because
that would break current and past versions of libav.

-- 
Rémi Denis-Courmont
Sent from my collocated server
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] avfilter/buffer: Suppress deprecation warning for avfilter_unref_buffer

2013-11-04 Thread Luca Barbato
On 04/11/13 13:17, Diego Biurrun wrote:
 The function is used in a block of code that is deprecated anyway.
 ---
  libavfilter/buffer.c |3 +++
  1 file changed, 3 insertions(+)
 

Ok.

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] hevc: Set chroma_sample_location of AVCodecContext.

2013-11-04 Thread Vittorio Giovara
On Mon, Nov 4, 2013 at 1:26 PM, Yusuke Nakamura
muken.the.vfrman...@gmail.com wrote:
 ---
  libavcodec/hevc.c | 7 +++
  1 file changed, 7 insertions(+)

 diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
 index ed980e3..e3d306b 100644
 --- a/libavcodec/hevc.c
 +++ b/libavcodec/hevc.c
 @@ -401,6 +401,13 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps)
  s-avctx-sample_aspect_ratio = sps-vui.sar;
  s-avctx-has_b_frames= sps-temporal_layer[sps-max_sub_layers 
 - 1].num_reorder_pics;

 +if (sps-vui.chroma_loc_info_present_flag)
 +s-avctx-chroma_sample_location = 
 sps-vui.chroma_sample_loc_type_top_field + 1;
 +else if (sps-chroma_format_idc == 1)
 +s-avctx-chroma_sample_location = AVCHROMA_LOC_LEFT;
 +else
 +s-avctx-chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED;
 +

I think the specs say that when chroma_format_idc is not 1 the
chroma_sample_location should be 0 (eg AVCHROMA_LOC_LEF in avcodec).
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 2/2] h264_ps: Set chroma_sample_location appropriately if chroma location info is absent.

2013-11-04 Thread Vittorio Giovara
On Mon, Nov 4, 2013 at 2:27 PM, Vittorio Giovara
vittorio.giov...@gmail.com wrote:
 On Mon, Nov 4, 2013 at 1:28 PM, Yusuke Nakamura
 muken.the.vfrman...@gmail.com wrote:
 ---
  libavcodec/h264_ps.c | 5 -
  1 file changed, 4 insertions(+), 1 deletion(-)

 diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
 index 54b735d..422f522 100644
 --- a/libavcodec/h264_ps.c
 +++ b/libavcodec/h264_ps.c
 @@ -178,7 +178,10 @@ static inline int decode_vui_parameters(H264Context *h, 
 SPS *sps)
  /* chroma_sample_location_type_top_field */
  h-avctx-chroma_sample_location = get_ue_golomb(h-gb) + 1;
  get_ue_golomb(h-gb);  /* chroma_sample_location_type_bottom_field 
 */
 -}
 +} else if (sps-chroma_format_idc == 1)
 +h-avctx-chroma_sample_location = AVCHROMA_LOC_LEFT;
 +else
 +h-avctx-chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED;

  sps-timing_info_present_flag = get_bits1(h-gb);
  if (sps-timing_info_present_flag) {

 I'm not sure about this, the only case in which it's considered an
 error to rely on chroma_sample_loc information is when
 chroma_fromat_idc is 0, the other values (2 for 422 and 3 for 444)
 mention the fact that chroma is colocated with luma, so maybe
 _LOC_CENTER should be more correct?

AVCHROMA_LOC_TOPLEFT*


 Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] configure: Check whether MSVC supports C99

2013-11-04 Thread Martin Storsjö
MSVC does support most of C99 since the 2013 version. Try to
detect whether the compiler in the path needs to run the C99
converter or not. When the converter is omitted, the compilation
time is reduced quite drastically.

Prior to this, users could still use --cc=c99conv -noconv cl
to run MSVC 2013 to achieve the same.

Since this only affects the value of cc_default, long before the
compiler itself is detected and set up, we can't use the normal
check_cc/TMPC/TMPO macros.
---
 configure |   10 ++
 1 file changed, 10 insertions(+)

diff --git a/configure b/configure
index 4aa66c0..013f380 100755
--- a/configure
+++ b/configure
@@ -2279,6 +2279,16 @@ case $toolchain in
 ;;
 msvc)
 cc_default=c99wrap cl
+# Check whether cl.exe supports C99 or not. From MSVC 2013 onwards,
+# it does support C99, but we still need to use c99wrap for passing
+# command line parameters with a space (for avoiding msys path
+# mangling/conversion issues).
+cat EOF  $TMPDIR/c99test.c
+struct s { int a, b; } a = { .b = 42 };
+EOF
+check_cmd c99wrap -noconv cl -c -Fo $TMPDIR/c99test.o 
$TMPDIR/c99test.c 
+cc_default=c99wrap -noconv cl
+rm -f $TMPDIR/c99test.{c,o}
 ld_default=c99wrap link
 nm_default=dumpbin -symbols
 ar_default=lib
-- 
1.7.9.4

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Remove all Alpha architecture optimizations

2013-11-04 Thread Luca Barbato
On 04/11/13 14:53, Diego Biurrun wrote:
 Alpha has been end-of-lifed and no more test machines are available.
 ---
 
 ... as discussed at VDD in Paris ...

Ok, I guess, I doubt we'll see many alpha systems still functional nowadays.

lu
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Remove all Alpha architecture optimizations

2013-11-04 Thread Anton Khirnov

On Mon,  4 Nov 2013 14:53:10 +0100, Diego Biurrun di...@biurrun.de wrote:
 Alpha has been end-of-lifed and no more test machines are available.
 ---
 
 ... as discussed at VDD in Paris ...
 
  libavcodec/alpha/Makefile |9 -
  libavcodec/alpha/asm.h|  186 --
  libavcodec/alpha/dsputil_alpha.c  |  157 ---
  libavcodec/alpha/dsputil_alpha.h  |   49 -
  libavcodec/alpha/dsputil_alpha_asm.S  |  167 
  libavcodec/alpha/hpeldsp_alpha.c  |  213 
  libavcodec/alpha/hpeldsp_alpha.h  |   28 ---
  libavcodec/alpha/hpeldsp_alpha_asm.S  |  124 
  libavcodec/alpha/motion_est_alpha.c   |  345 
 -
  libavcodec/alpha/motion_est_mvi_asm.S |  179 -
  libavcodec/alpha/mpegvideo_alpha.c|  110 ---
  libavcodec/alpha/regdef.h |   77 
  libavcodec/alpha/simple_idct_alpha.c  |  303 -
  libavcodec/avcodec.h  |1 -
  libavcodec/dct-test.c |4 -
  libavcodec/dsputil.c  |2 -
  libavcodec/hpeldsp.c  |2 -
  libavcodec/mpegvideo.c|2 -
  libavcodec/msmpeg4.c  |5 +-
  libavcodec/options_table.h|1 -
  20 files changed, 1 insertion(+), 1963 deletions(-)
  delete mode 100644 libavcodec/alpha/Makefile
  delete mode 100644 libavcodec/alpha/asm.h
  delete mode 100644 libavcodec/alpha/dsputil_alpha.c
  delete mode 100644 libavcodec/alpha/dsputil_alpha.h
  delete mode 100644 libavcodec/alpha/dsputil_alpha_asm.S
  delete mode 100644 libavcodec/alpha/hpeldsp_alpha.c
  delete mode 100644 libavcodec/alpha/hpeldsp_alpha.h
  delete mode 100644 libavcodec/alpha/hpeldsp_alpha_asm.S
  delete mode 100644 libavcodec/alpha/motion_est_alpha.c
  delete mode 100644 libavcodec/alpha/motion_est_mvi_asm.S
  delete mode 100644 libavcodec/alpha/mpegvideo_alpha.c
  delete mode 100644 libavcodec/alpha/regdef.h
  delete mode 100644 libavcodec/alpha/simple_idct_alpha.c
 
 diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
 index 9d63e32..7abf056 100644
 --- a/libavcodec/avcodec.h
 +++ b/libavcodec/avcodec.h
 @@ -2430,7 +2430,6 @@ typedef struct AVCodecContext {
  #define FF_IDCT_SIMPLEVIS 18
  #define FF_IDCT_FAAN  20
  #define FF_IDCT_SIMPLENEON22
 -#define FF_IDCT_SIMPLEALPHA   23

You cannot just remove stuff from public headers.
Mark it for removal on the next bump. Same for the options table entry.

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] configure: Check whether MSVC supports C99

2013-11-04 Thread Luca Barbato
On 04/11/13 15:00, Martin Storsjö wrote:
 MSVC does support most of C99 since the 2013 version. Try to
 detect whether the compiler in the path needs to run the C99
 converter or not. When the converter is omitted, the compilation
 time is reduced quite drastically.
 

Ok.

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] Remove all Alpha architecture optimizations

2013-11-04 Thread Diego Biurrun
On Mon, Nov 04, 2013 at 03:01:56PM +0100, Anton Khirnov wrote:
 
 On Mon,  4 Nov 2013 14:53:10 +0100, Diego Biurrun di...@biurrun.de wrote:
  Alpha has been end-of-lifed and no more test machines are available.
  ---
  
  ... as discussed at VDD in Paris ...
  
  --- a/libavcodec/avcodec.h
  +++ b/libavcodec/avcodec.h
  @@ -2430,7 +2430,6 @@ typedef struct AVCodecContext {
   #define FF_IDCT_SIMPLEVIS 18
   #define FF_IDCT_FAAN  20
   #define FF_IDCT_SIMPLENEON22
  -#define FF_IDCT_SIMPLEALPHA   23
 
 You cannot just remove stuff from public headers.
 Mark it for removal on the next bump. Same for the options table entry.

I'm removing the IDCT, so what use is the option?  I'd have to schedule
everything for removal on the next bump then.

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Remove all Alpha architecture optimizations

2013-11-04 Thread Derek Buitenhuis
On 11/4/2013 2:20 PM, Diego Biurrun wrote:
 I'm removing the IDCT, so what use is the option?  I'd have to schedule
 everything for removal on the next bump then.

That never did anything on nonalpha anyway.

Just leave the IDCT thing in there, and remove it later with the
rest of the IDCT stuff. It's benign.

- Derek
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH v2] lavc: Add colorimetry values for BT.2020, other non-included ones

2013-11-04 Thread Vittorio Giovara
On Mon, Nov 4, 2013 at 12:28 PM, Jan Ekström jee...@gmail.com wrote:
 ---
  doc/APIchanges   |4 
  libavcodec/avcodec.h |   42 +++---
  libavcodec/version.h |2 +-
  3 files changed, 32 insertions(+), 16 deletions(-)


Queued, thank you.
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH] filtfmts-test: Fix use of deprecated API

2013-11-04 Thread Diego Biurrun
---
 libavfilter/filtfmts.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/filtfmts.c b/libavfilter/filtfmts.c
index 69288af..f68287a 100644
--- a/libavfilter/filtfmts.c
+++ b/libavfilter/filtfmts.c
@@ -71,12 +71,12 @@ int main(int argc, char **argv)
 }
 
 /* create a link for each of the input pads */
-for (i = 0; i  filter_ctx-input_count; i++) {
+for (i = 0; i  filter_ctx-nb_inputs; i++) {
 AVFilterLink *link = av_mallocz(sizeof(AVFilterLink));
 link-type = filter_ctx-filter-inputs[i].type;
 filter_ctx-inputs[i] = link;
 }
-for (i = 0; i  filter_ctx-output_count; i++) {
+for (i = 0; i  filter_ctx-nb_outputs; i++) {
 AVFilterLink *link = av_mallocz(sizeof(AVFilterLink));
 link-type = filter_ctx-filter-outputs[i].type;
 filter_ctx-outputs[i] = link;
@@ -88,7 +88,7 @@ int main(int argc, char **argv)
 ff_default_query_formats(filter_ctx);
 
 /* print the supported formats in input */
-for (i = 0; i  filter_ctx-input_count; i++) {
+for (i = 0; i  filter_ctx-nb_inputs; i++) {
 AVFilterFormats *fmts = filter_ctx-inputs[i]-out_formats;
 for (j = 0; j  fmts-nb_formats; j++)
 printf(INPUT[%d] %s: %s\n,
@@ -97,7 +97,7 @@ int main(int argc, char **argv)
 }
 
 /* print the supported formats in output */
-for (i = 0; i  filter_ctx-output_count; i++) {
+for (i = 0; i  filter_ctx-nb_outputs; i++) {
 AVFilterFormats *fmts = filter_ctx-outputs[i]-in_formats;
 for (j = 0; j  fmts-nb_formats; j++)
 printf(OUTPUT[%d] %s: %s\n,
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] filtfmts-test: Fix use of deprecated API

2013-11-04 Thread Luca Barbato
On 04/11/13 15:56, Diego Biurrun wrote:
 ---
  libavfilter/filtfmts.c |8 
  1 file changed, 4 insertions(+), 4 deletions(-)
 

Ok.

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] configure: Check whether MSVC supports C99

2013-11-04 Thread Derek Buitenhuis
On 11/4/2013 2:00 PM, Martin Storsjö wrote:
 MSVC does support most of C99 since the 2013 version. Try to
 detect whether the compiler in the path needs to run the C99
 converter or not. When the converter is omitted, the compilation
 time is reduced quite drastically.
 
 Prior to this, users could still use --cc=c99conv -noconv cl
 to run MSVC 2013 to achieve the same.
 
 Since this only affects the value of cc_default, long before the
 compiler itself is detected and set up, we can't use the normal
 check_cc/TMPC/TMPO macros.
 ---
  configure |   10 ++
  1 file changed, 10 insertions(+)

Looks Good To Me.

- Derek
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] hevc: Use parsed VUI colorimetry in avcodec

2013-11-04 Thread Vittorio Giovara
On Sun, Nov 3, 2013 at 9:45 PM, Jan Ekström jee...@gmail.com wrote:
 Also limit the parsed VUI values to known valid ones.
 ---
  libavcodec/hevc.c|   16 
  libavcodec/hevc_ps.c |8 
  2 files changed, 24 insertions(+), 0 deletions(-)

LGTM, queued.
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH] filtfmts-test: Fix use of deprecated API

2013-11-04 Thread Vittorio Giovara
On Mon, Nov 4, 2013 at 3:56 PM, Diego Biurrun di...@biurrun.de wrote:
 ---
  libavfilter/filtfmts.c |8 
  1 file changed, 4 insertions(+), 4 deletions(-)


Queued, thank you.
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] png: add a standalone parser

2013-11-04 Thread Vittorio Giovara
From: Peter Holik pe...@holik.at

---
Addressed Kostya's comments and added some minor comments.
Vittorio

 libavcodec/Makefile |1 +
 libavcodec/allcodecs.c  |1 +
 libavcodec/png_parser.c |  124 +++
 3 files changed, 126 insertions(+)
 create mode 100644 libavcodec/png_parser.c

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 205359e..0b7eba6 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -648,6 +648,7 @@ OBJS-$(CONFIG_MPEGAUDIO_PARSER)+= 
mpegaudio_parser.o \
   mpegaudiodecheader.o mpegaudiodata.o
 OBJS-$(CONFIG_MPEGVIDEO_PARSER)+= mpegvideo_parser.o\
   mpeg12.o mpeg12data.o
+OBJS-$(CONFIG_PNG_PARSER)  += png_parser.o
 OBJS-$(CONFIG_PNM_PARSER)  += pnm_parser.o pnm.o
 OBJS-$(CONFIG_RV30_PARSER) += rv34_parser.o
 OBJS-$(CONFIG_RV40_PARSER) += rv34_parser.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 6172466..bc81c49 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -460,6 +460,7 @@ void avcodec_register_all(void)
 REGISTER_PARSER(MPEG4VIDEO, mpeg4video);
 REGISTER_PARSER(MPEGAUDIO,  mpegaudio);
 REGISTER_PARSER(MPEGVIDEO,  mpegvideo);
+REGISTER_PARSER(PNG,png);
 REGISTER_PARSER(PNM,pnm);
 REGISTER_PARSER(RV30,   rv30);
 REGISTER_PARSER(RV40,   rv40);
diff --git a/libavcodec/png_parser.c b/libavcodec/png_parser.c
new file mode 100644
index 000..00cbb82
--- /dev/null
+++ b/libavcodec/png_parser.c
@@ -0,0 +1,124 @@
+/*
+ * PNG parser
+ * Copyright (c) 2009 Peter Holik
+ *
+ * This file is part of Libav.
+ *
+ * Libav 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.
+ *
+ * Libav 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 Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * PNG parser
+ */
+
+#include libavutil/intreadwrite.h
+#include libavutil/common.h
+
+#include parser.h
+
+#define PNG_SIGNATURE UINT64_C(0x89504e470d0a1a0a)
+#define MNG_SIGNATURE UINT64_C(0x8a4d4e470d0a1a0a)
+
+typedef struct PNGParseContext {
+ParseContext pc;
+
+int chunk_pos;  /// position inside current chunk
+int chunk_length;   /// length of the current chunk
+int remaining_size; /// remaining size of the current chunk
+} PNGParseContext;
+
+static int png_parse(AVCodecParserContext *s, AVCodecContext *avctx,
+ const uint8_t **poutbuf, int *poutbuf_size,
+ const uint8_t *buf, int buf_size)
+{
+PNGParseContext *ppc = s-priv_data;
+int next = END_NOT_FOUND;
+int i = 0;
+
+*poutbuf_size = 0;
+if (buf_size == 0)
+return 0;
+
+if (!ppc-pc.frame_start_found) {
+uint64_t state64 = ppc-pc.state64;
+for (; i  buf_size; i++) {
+state64 = (state64  8) | buf[i];
+if (state64 == PNG_SIGNATURE ||
+state64 == MNG_SIGNATURE) {
+i++;
+ppc-pc.frame_start_found = 1;
+break;
+}
+}
+ppc-pc.state64 = state64;
+} else if (ppc-remaining_size) {
+i = FFMIN(ppc-remaining_size, buf_size);
+ppc-remaining_size -= i;
+if (ppc-remaining_size)
+goto flush;
+if (ppc-chunk_pos == -1) {
+next = i;
+goto flush;
+}
+}
+
+for (; ppc-pc.frame_start_found  i  buf_size; i++) {
+ppc-pc.state = (ppc-pc.state  8) | buf[i];
+if (ppc-chunk_pos == 3) {
+ppc-chunk_length = AV_RL32(ppc-pc.state);
+if (ppc-chunk_length  0x7fff) {
+ppc-chunk_pos = ppc-pc.frame_start_found = 0;
+goto flush;
+}
+ppc-chunk_length += 4;
+} else if (ppc-chunk_pos == 7) {
+if (ppc-chunk_length = buf_size - i)
+ppc-remaining_size = ppc-chunk_length - buf_size + i + 1;
+if (AV_RB32(ppc-pc.state) == MKTAG('I', 'E', 'N', 'D')) {
+if (ppc-remaining_size)
+ppc-chunk_pos = -1;
+else
+next = ppc-chunk_length + i + 1;
+break;
+} else {
+ppc-chunk_pos = 0;
+if 

Re: [libav-devel] [PATCH] hevc_ps: Use AV_PIX_FMT_YUVJ420P if YUV 4:2:0 8-bit full scale.

2013-11-04 Thread Vittorio Giovara
On Mon, Nov 4, 2013 at 11:55 AM, Vittorio Giovara
vittorio.giov...@gmail.com wrote:
 On Sun, Nov 3, 2013 at 8:47 PM, Yusuke Nakamura
 muken.the.vfrman...@gmail.com wrote:
 ---
  libavcodec/hevc_ps.c | 2 ++
  1 file changed, 2 insertions(+)

 diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
 index 15f73be..a51784d 100644
 --- a/libavcodec/hevc_ps.c
 +++ b/libavcodec/hevc_ps.c
 @@ -449,6 +449,8 @@ static void decode_vui(HEVCContext *s, HEVCSPS *sps)
  vui-video_format= get_bits(gb, 3);
  vui-video_full_range_flag   = get_bits1(gb);
  vui-colour_description_present_flag = get_bits1(gb);
 +if (vui-video_full_range_flag  sps-pix_fmt == 
 AV_PIX_FMT_YUV420P)
 +sps-pix_fmt = AV_PIX_FMT_YUVJ420P;
  if (vui-colour_description_present_flag) {
  vui-colour_primaries= get_bits(gb, 8);
  vui-transfer_characteristic = get_bits(gb, 8);

 This looks fine, can you just add a FIXME comment that you're doing
 this for swscale compatibility?
 Vittorio

Queued without comment as preferred by the author.
Let's not forget about it when avscale comes...
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] lavc: Add a VP9 decoder

2013-11-04 Thread Anton Khirnov

On Mon,  4 Nov 2013 17:27:36 +0100, Luca Barbato lu_z...@gentoo.org wrote:
 From: Ronald S. Bultje rsbul...@gmail.com
 
 Originally written by Ronald S. Bultje rsbul...@gmail.com with the
 help of Clément Bœsch ubi...@gmail.com.
 
 Further contributions by:
 Anton Khirnov an...@khirnov.net
 Luca Barbato lu_z...@gentoo.org
 
 Signed-off-by: Luca Barbato lu_z...@gentoo.org
 Signed-off-by: Anton Khirnov an...@khirnov.net
 ---

Other than the missing entry in the decoder list i think it's ok.

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH] graph2dot: Fix use of deprecated API

2013-11-04 Thread Diego Biurrun
---
 tools/graph2dot.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/graph2dot.c b/tools/graph2dot.c
index 692ada2..86d3d14 100644
--- a/tools/graph2dot.c
+++ b/tools/graph2dot.c
@@ -58,7 +58,7 @@ static void print_digraph(FILE *outfile, AVFilterGraph *graph)
 fprintf(outfile, node [shape=box]\n);
 fprintf(outfile, rankdir=LR\n);
 
-for (i = 0; i  graph-filter_count; i++) {
+for (i = 0; i  graph-nb_filters; i++) {
 char filter_ctx_label[128];
 const AVFilterContext *filter_ctx = graph-filters[i];
 
@@ -66,7 +66,7 @@ static void print_digraph(FILE *outfile, AVFilterGraph *graph)
  filter_ctx-name,
  filter_ctx-filter-name);
 
-for (j = 0; j  filter_ctx-output_count; j++) {
+for (j = 0; j  filter_ctx-nb_outputs; j++) {
 AVFilterLink *link = filter_ctx-outputs[j];
 if (link) {
 char dst_filter_ctx_label[128];
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] graph2dot: Fix use of deprecated API

2013-11-04 Thread Luca Barbato
On 04/11/13 17:36, Diego Biurrun wrote:
 ---
  tools/graph2dot.c |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 

Ok.

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] lavc: Add a VP9 decoder

2013-11-04 Thread Luca Barbato
On 04/11/13 17:34, Anton Khirnov wrote:
 Other than the missing entry in the decoder list i think it's ok.

Forgot to amend for it. Pushing soon.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH 1/3] mxfdec: update current edit unit when seeking in mxf files without index tables

2013-11-04 Thread Anton Khirnov
From: Marton Balint c...@passwd.hu

Fixes audio packet pts values in some files generated by AVID TRMG 3.01.

Signed-off-by: Marton Balint c...@passwd.hu
Reviewed-by: Tomas Härdin tomas.har...@codemill.se
Signed-off-by: Anton Khirnov an...@khirnov.net
---
 libavformat/mxfdec.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index dedf636..3fcdb82 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2230,6 +2230,7 @@ static int mxf_read_seek(AVFormatContext *s, int 
stream_index, int64_t sample_ti
 if ((ret = avio_seek(s-pb, (s-bit_rate * seconds)  3, SEEK_SET))  0)
 return ret;
 ff_update_cur_dts(s, st, sample_time);
+mxf-current_edit_unit = sample_time;
 } else {
 t = mxf-index_tables[0];
 
-- 
1.7.10.4

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH 2/3] lavf: improve support for AVC-Intra files.

2013-11-04 Thread Anton Khirnov
From: Reimar Döffinger reimar.doeffin...@gmx.de

Generate extradata with SPS/PPS based on container dimensions.

Authors of this commit are: Reimar and Thomas Mundt

Signed-off-by: Anton Khirnov an...@khirnov.net
---
 libavformat/internal.h |6 +++
 libavformat/isom.c |1 +
 libavformat/mov.c  |8 
 libavformat/mxfdec.c   |   14 +--
 libavformat/utils.c|  102 
 5 files changed, 127 insertions(+), 4 deletions(-)

diff --git a/libavformat/internal.h b/libavformat/internal.h
index 1bc3e51..e92f476 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -339,4 +339,10 @@ enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, 
unsigned int tag);
  */
 enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags);
 
+/**
+ * Generate standard extradata for AVC-Intra based on width/height and field
+ * order.
+ */
+int ff_generate_avci_extradata(AVStream *st);
+
 #endif /* AVFORMAT_INTERNAL_H */
diff --git a/libavformat/isom.c b/libavformat/isom.c
index 372e877..9b32b7d 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -152,6 +152,7 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '3') }, /* AVC-Intra 100M 
1080p24/30/60 */
 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 
*/
 { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 
*/
+{ AV_CODEC_ID_H264, MKTAG('A', 'V', 'i', 'n') }, /* AVC-Intra with 
implicit SPS/PPS */
 
 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 
Camcorder */
 { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */
diff --git a/libavformat/mov.c b/libavformat/mov.c
index d9cb36b..08ee82b 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2142,6 +2142,14 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
   sc-time_scale*st-nb_frames, st-duration, INT_MAX);
 }
 
+// done for ai5q, ai52, ai55, ai1q, ai12 and ai15.
+if (!st-codec-extradata_size  st-codec-codec_id == AV_CODEC_ID_H264 

+st-codec-codec_tag != MKTAG('a', 'v', 'c', '1')) {
+ret = ff_generate_avci_extradata(st);
+if (ret  0)
+return ret;
+}
+
 switch (st-codec-codec_id) {
 #if CONFIG_H261_DECODER
 case AV_CODEC_ID_H261:
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 3fcdb82..a947c67 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1466,10 +1466,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
 /* TODO: drop PictureEssenceCoding and SoundEssenceCompression, only 
check EssenceContainer */
 codec_ul = mxf_get_codec_ul(ff_mxf_codec_uls, 
descriptor-essence_codec_ul);
 st-codec-codec_id = codec_ul-id;
-if (descriptor-extradata) {
-st-codec-extradata = descriptor-extradata;
-st-codec-extradata_size = descriptor-extradata_size;
-}
+
 if (st-codec-codec_type == AVMEDIA_TYPE_VIDEO) {
 source_track-intra_only = mxf_is_intra_only(descriptor);
 container_ul = mxf_get_codec_ul(mxf_picture_essence_container_uls, 
essence_container_ul);
@@ -1555,6 +1552,15 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
 st-need_parsing = AVSTREAM_PARSE_FULL;
 }
 }
+if (descriptor-extradata) {
+st-codec-extradata = av_mallocz(descriptor-extradata_size + 
FF_INPUT_BUFFER_PADDING_SIZE);
+if (st-codec-extradata)
+memcpy(st-codec-extradata, descriptor-extradata, 
descriptor-extradata_size);
+} else if (st-codec-codec_id == AV_CODEC_ID_H264) {
+ret = ff_generate_avci_extradata(st);
+if (ret  0)
+return ret;
+}
 if (st-codec-codec_type != AVMEDIA_TYPE_DATA  
(*essence_container_ul)[15]  0x01) {
 /* TODO: decode timestamps */
 st-need_parsing = AVSTREAM_PARSE_TIMESTAMPS;
diff --git a/libavformat/utils.c b/libavformat/utils.c
index bec70a9..6193d32 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3264,3 +3264,105 @@ int ff_add_param_change(AVPacket *pkt, int32_t channels,
 }
 return 0;
 }
+
+int ff_generate_avci_extradata(AVStream *st)
+{
+static const uint8_t avci100_1080p_extradata[] = {
+// SPS
+0x00, 0x00, 0x00, 0x01, 0x67, 0x7a, 0x10, 0x29,
+0xb6, 0xd4, 0x20, 0x22, 0x33, 0x19, 0xc6, 0x63,
+0x23, 0x21, 0x01, 0x11, 0x98, 0xce, 0x33, 0x19,
+0x18, 0x21, 0x02, 0x56, 0xb9, 0x3d, 0x7d, 0x7e,
+0x4f, 0xe3, 0x3f, 0x11, 0xf1, 0x9e, 0x08, 0xb8,
+0x8c, 0x54, 0x43, 0xc0, 0x78, 0x02, 0x27, 0xe2,
+0x70, 0x1e, 0x30, 0x10, 0x10, 0x14, 0x00, 0x00,
+0x03, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00, 0xca,
+0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+// PPS
+0x00, 0x00, 0x00, 0x01, 

[libav-devel] [PATCH 3/3] h264: free the tables and uninitialize the context on flush

2013-11-04 Thread Anton Khirnov
Prevents referencing empty frames.
---
 libavcodec/h264.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index f0ef2eb..5d8406f 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2768,6 +2768,9 @@ static void flush_dpb(AVCodecContext *avctx)
 h-parse_context.overread_index= 0;
 h-parse_context.index = 0;
 h-parse_context.last_index= 0;
+
+free_tables(h, 1);
+h-context_initialized = 0;
 }
 
 int ff_init_poc(H264Context *h, int pic_field_poc[2], int *pic_poc)
-- 
1.7.10.4

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] vdpau: Add missing #includes to fix standalone header compilation

2013-11-04 Thread Diego Biurrun
---
 libavcodec/vdpau.h  |2 ++
 libavcodec/vdpau_internal.h |5 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index 8bedea5..bf8f666 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -52,6 +52,8 @@
 #include vdpau/vdpau.h
 #include vdpau/vdpau_x11.h
 
+#include version.h
+
 #if FF_API_BUFS_VDPAU
 union AVVDPAUPictureInfo {
 VdpPictureInfoH264h264;
diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h
index 9e4ab4e..2fc42d2 100644
--- a/libavcodec/vdpau_internal.h
+++ b/libavcodec/vdpau_internal.h
@@ -26,8 +26,11 @@
 
 #include stdint.h
 #include vdpau/vdpau.h
-#include h264.h
+
+#include avcodec.h
 #include mpegvideo.h
+#include vdpau.h
+#include version.h
 
 /** Extract VdpVideoSurface from a Picture */
 static inline uintptr_t ff_vdpau_get_surface_id(Picture *pic)
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] Small OMA fixes

2013-11-04 Thread Anton Khirnov

On Thu, 24 Oct 2013 15:24:23 +0200, David Goldwich david.goldw...@gmail.com 
wrote:
 First two patches are security fixes that landed in FFmpeg a while ago 
 (4f5d146, e74fa25, 91e72e3; first one was partially addressed in libav in 
 934cd18).
 Third patch enables format detection for files with arbitrary ID3v2 version 
 and/or flags, or no ID3v2 header at all.
 
 Michael Niedermayer (2):
   omadec: Fix wrong number of array elements
   omadec: check GEOB sizes against buffer size
 
 David Goldwich (1):
   omadec: loosen format probing constraints
 
  libavformat/omadec.c | 22 ++
  1 file changed, 10 insertions(+), 12 deletions(-)
 
 -- 
 1.8.4.1
 

All three patches pushed.
Thanks.

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/6] lavc: use buf[0] instead of data[0] in checks whether a frame is allocated

2013-11-04 Thread Anton Khirnov

On Mon, 04 Nov 2013 13:37:55 +0100, Rémi Denis-Courmont r...@remlab.net wrote:
 On Mon, 4 Nov 2013 13:12:36 +0100, Hendrik Leppkes h.lepp...@gmail.com
 wrote:
  If downstream uses get_buffer2, they absolutely need to provide a
  buf[0], and if downstream uses get_buffer, the compat layer should
  provide a buf[0], IIRC.
  
  Or am I missing something?
 
 I don't expect downstreams to set data[0] to NULL anytime soon because
 that would break current and past versions of libav.
 

The downstreams can do whatever they want with data[0] as its contents is
undefined for hwaccel formats. This patch should not break anything.

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 3/6] vdpau: add a convenience function for getting a decoder profile.

2013-11-04 Thread Anton Khirnov

On Mon, 04 Nov 2013 12:54:08 +0100, Rémi Denis-Courmont r...@remlab.net wrote:
 On Sun,  3 Nov 2013 23:27:47 +0100, Anton Khirnov an...@khirnov.net
 wrote:
  Based on the code by Rémi Denis-Courmont r...@remlab.net from VLC.
  ---
   doc/APIchanges   |3 +++
   libavcodec/vdpau.c   |   37 +
   libavcodec/vdpau.h   |   10 ++
   libavcodec/version.h |2 +-
   4 files changed, 51 insertions(+), 1 deletion(-)
  
  diff --git a/doc/APIchanges b/doc/APIchanges
  index 561c828..93d1608 100644
  --- a/doc/APIchanges
  +++ b/doc/APIchanges
  @@ -13,6 +13,9 @@ libavutil: 2012-10-22
   
   API changes, most recent first:
   
  +2013-11-xx - xxx - lavc 55.25.0 - vdpau.h
  +  Add av_vdpau_get_profile().
  +
   2013-08-xx - xxx - lavu 52.17.0 - avframe.h
 Add AVFrame.flags and AV_FRAME_FLAG_CORRUPT.
   
  diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
  index 9bcbc2e..5cabb7e 100644
  --- a/libavcodec/vdpau.c
  +++ b/libavcodec/vdpau.c
  @@ -90,4 +90,41 @@ int ff_vdpau_add_buffer(Picture *pic, const uint8_t
  *buf, uint32_t size)
   return 0;
   }
   
  +int av_vdpau_get_profile(AVCodecContext *avctx)
 
 Aside from AVERROR, the correct return type would be VdpDecoderProfile...
 
  +{
  +switch (avctx-codec_id) {
  +case AV_CODEC_ID_MPEG1VIDEO:   return
  VDP_DECODER_PROFILE_MPEG1;
  +case AV_CODEC_ID_MPEG2VIDEO:
  +switch (avctx-profile) {
  +case FF_PROFILE_MPEG2_MAIN:return
  VDP_DECODER_PROFILE_MPEG2_MAIN;
  +case FF_PROFILE_MPEG2_SIMPLE:  return
  VDP_DECODER_PROFILE_MPEG2_SIMPLE;
  +default:   return AVERROR(EINVAL);
 
 Is it safe and clean to mix AVERROR codes with VDPAU enumerations?
 

VdpDecoderProfile is unsigned.

If i want to be able to return an error, i have to return signed.
And for how clean it is...depends. It assumes there won't be any profiles with
values out of range of a signed int.

To be extra safe I could change the return type to int64. Or add a second
parameter for returning the profile. Do you think that's worth the trouble?

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 4/6] vdpau: add a constructor for AVVDPAUContext.

2013-11-04 Thread Anton Khirnov

On Mon, 04 Nov 2013 12:08:06 +0100, Rémi Denis-Courmont r...@remlab.net wrote:
 On Sun,  3 Nov 2013 23:27:48 +0100, Anton Khirnov an...@khirnov.net
 wrote:
  We will likely want to add new fields to it in the future, so this is
  needed to avoid breaking ABI.
 
 Should this not take a pix_fmt parameter and support all hwaccels? Or
 should there be one of these for each hwaccel? Or do we only care about
 VDPAU (fine with me :-D)?
 

I would have a separate constructor for each hwaccel context. You call them from
different code anyway, so there's really nothing gained by using a single
function for all of them.

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH 6/6] avconv: add support for VDPAU decoding

2013-11-04 Thread Anton Khirnov

On Mon, 04 Nov 2013 13:02:37 +0100, Rémi Denis-Courmont r...@remlab.net wrote:
 On Sun,  3 Nov 2013 23:27:50 +0100, Anton Khirnov an...@khirnov.net
 wrote:
  ---
   Changelog   |1 +
   Makefile|5 +-
   avconv.c|3 +
   avconv.h|5 +
   avconv_opt.c|2 +
   avconv_vdpau.c  |  339
   +++
   configure   |   12 +-
   doc/avconv.texi |3 +
   8 files changed, 367 insertions(+), 3 deletions(-)
   create mode 100644 avconv_vdpau.c
  
  diff --git a/Changelog b/Changelog
  index 74ef59f..2e870ab 100644
  --- a/Changelog
  +++ b/Changelog
  @@ -47,6 +47,7 @@ version 10:
   - Live HDS muxer
   - setsar/setdar filters now support variables in ratio expressions
   - dar variable in the scale filter now returns the actual DAR (i.e. a *
   sar)
  +- support for decoding through VDPAU in avconv (the -hwaccel option)
 
 I don't mind/care either way, but this begs the question whether
 decoding-only hwaccel should be hidden within libav, or exposed. Because
 for decoding only, there is really no need to expose the hwaccel
 ugliness^Wcomplexity to libav users.
 
 Admittedly, if the sole goal is to test hwaccel, then it is best to expose
 it.
 

Since it's not faster than software decoding, I don't see any point in having
that in libavcodec. The only reasons I'm adding this to avconv are
testing/example code.

   
   
   version 9:
  diff --git a/Makefile b/Makefile
  index e116905..3b194c5 100644
  --- a/Makefile
  +++ b/Makefile
  @@ -63,7 +63,10 @@ PROGS-$(CONFIG_AVSERVER) += avserver
   
   PROGS  := $(PROGS-yes:%=%$(EXESUF))
   OBJS= cmdutils.o $(EXEOBJS)
  +
   OBJS-avconv = avconv_opt.o avconv_filter.o
  +OBJS-avconv-$(HAVE_VDPAU_X11) += avconv_vdpau.o
  +
   TESTTOOLS   = audiogen videogen rotozoom tiny_psnr base64
   HOSTPROGS  := $(TESTTOOLS:%=tests/%) doc/print_options
   TOOLS   = qt-faststart trasher
  @@ -127,7 +130,7 @@ endef
   $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D
   
   define DOPROG
  -OBJS-$(1) += $(1).o cmdutils.o $(EXEOBJS)
  +OBJS-$(1) += $(1).o cmdutils.o $(EXEOBJS) $(OBJS-$(1)-yes)
   $(1)$(EXESUF): $$(OBJS-$(1))
   $$(OBJS-$(1)): CFLAGS  += $(CFLAGS-$(1))
   $(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
  diff --git a/avconv.c b/avconv.c
  index 33a9a73..2ce52bb 100644
  --- a/avconv.c
  +++ b/avconv.c
  @@ -1375,6 +1375,9 @@ typedef struct HWAccel {
   } HWAccel;
   
   static const HWAccel hwaccels[] = {
  +#if HAVE_VDPAU_X11
  +{ VDPAU, vdpau_init, HWACCEL_VDPAU, AV_PIX_FMT_VDPAU },
  +#endif
   { 0 },
   };
   
  diff --git a/avconv.h b/avconv.h
  index 232182a..6d0822d 100644
  --- a/avconv.h
  +++ b/avconv.h
  @@ -200,6 +200,7 @@ typedef struct FilterGraph {
   enum HWAccelID {
   HWACCEL_NONE = 0,
   HWACCEL_AUTO,
  +HWACCEL_VDPAU,
   };
   
   typedef struct InputStream {
  @@ -386,4 +387,8 @@ FilterGraph *init_simple_filtergraph(InputStream
 *ist,
  OutputStream *ost);
   
   int avconv_parse_options(int argc, char **argv);
   
  +#if HAVE_VDPAU_X11
  +int vdpau_init(AVCodecContext *s);
  +#endif
  +
   #endif /* AVCONV_H */
  diff --git a/avconv_opt.c b/avconv_opt.c
  index d3677be..19dd9d8 100644
  --- a/avconv_opt.c
  +++ b/avconv_opt.c
  @@ -494,6 +494,8 @@ static void add_input_streams(OptionsContext *o,
  AVFormatContext *ic)
   ist-hwaccel_id = HWACCEL_NONE;
   else if (!strcmp(hwaccel, auto))
   ist-hwaccel_id = HWACCEL_AUTO;
  +else if (!strcmp(hwaccel, vdpau))
  +ist-hwaccel_id = HWACCEL_VDPAU;
   else {
   av_log(NULL, AV_LOG_ERROR, Unrecognized hwaccel:
   %s.\n,
  hwaccel);
  diff --git a/avconv_vdpau.c b/avconv_vdpau.c
  new file mode 100644
  index 000..aeb97b1
  --- /dev/null
  +++ b/avconv_vdpau.c
  @@ -0,0 +1,339 @@
  +/*
  + * This file is part of Libav.
  + *
  + * Libav 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.
  + *
  + * Libav 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 Libav; if not, write to the Free Software
  + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  02110-1301 USA
  + */
  +
  +#include stdlib.h
  +
  +#include X11/Xlib.h
  +
  +#include avconv.h
  +
  +#include libavcodec/vdpau.h
  +
  +#include libavutil/avassert.h
  +#include libavutil/buffer.h
  +#include libavutil/frame.h
  +#include 

Re: [libav-devel] [PATCH] vdpau: Add missing #includes to fix standalone header compilation

2013-11-04 Thread Anton Khirnov

On Mon,  4 Nov 2013 18:16:46 +0100, Diego Biurrun di...@biurrun.de wrote:
 ---
  libavcodec/vdpau.h  |2 ++
  libavcodec/vdpau_internal.h |5 -
  2 files changed, 6 insertions(+), 1 deletion(-)
 
 diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
 index 8bedea5..bf8f666 100644
 --- a/libavcodec/vdpau.h
 +++ b/libavcodec/vdpau.h
 @@ -52,6 +52,8 @@
  #include vdpau/vdpau.h
  #include vdpau/vdpau_x11.h
  
 +#include version.h
 +
  #if FF_API_BUFS_VDPAU
  union AVVDPAUPictureInfo {
  VdpPictureInfoH264h264;
 diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h
 index 9e4ab4e..2fc42d2 100644
 --- a/libavcodec/vdpau_internal.h
 +++ b/libavcodec/vdpau_internal.h
 @@ -26,8 +26,11 @@
  
  #include stdint.h
  #include vdpau/vdpau.h
 -#include h264.h
 +
 +#include avcodec.h
  #include mpegvideo.h
 +#include vdpau.h

What is vdpau.h for?

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] vdpau: Add missing #includes to fix standalone header compilation

2013-11-04 Thread Diego Biurrun
On Mon, Nov 04, 2013 at 07:07:34PM +0100, Anton Khirnov wrote:
 On Mon,  4 Nov 2013 18:16:46 +0100, Diego Biurrun di...@biurrun.de wrote:
  --- a/libavcodec/vdpau_internal.h
  +++ b/libavcodec/vdpau_internal.h
  @@ -26,8 +26,11 @@
   
   #include stdint.h
   #include vdpau/vdpau.h
  -#include h264.h
  +
  +#include avcodec.h
   #include mpegvideo.h
  +#include vdpau.h
 
 What is vdpau.h for?

struct AVVDPAUContext

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] aacps: Adjust some const qualifiers to suppress warnings

2013-11-04 Thread Diego Biurrun
---

While clearly not a thing of supreme beauty, this silences all warnings
on a previously very noisy file, both with hardcoded and generated tables.

 libavcodec/aacps.c  |   20 
 libavcodec/aacps_tablegen.h |2 ++
 libavcodec/aacpsdsp.h   |2 +-
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c
index 1abafe2..2b9ca4f 100644
--- a/libavcodec/aacps.c
+++ b/libavcodec/aacps.c
@@ -305,14 +305,15 @@ static void hybrid2_re(float (*in)[2], float 
(*out)[32][2], const float filter[8
 }
 
 /** Split one subband into 6 subsubbands with a complex filter */
-static void hybrid6_cx(PSDSPContext *dsp, float (*in)[2], float (*out)[32][2], 
const float (*filter)[8][2], int len)
+static void hybrid6_cx(PSDSPContext *dsp, float (*in)[2], float (*out)[32][2],
+   TABLE_CONST float (*filter)[8][2], int len)
 {
 int i;
 int N = 8;
 LOCAL_ALIGNED_16(float, temp, [8], [2]);
 
 for (i = 0; i  len; i++, in++) {
-dsp-hybrid_analysis(temp, in, filter, 1, N);
+dsp-hybrid_analysis(temp, in, (const float (*)[8][2]) filter, 1, N);
 out[0][i][0] = temp[6][0];
 out[0][i][1] = temp[6][1];
 out[1][i][0] = temp[7][0];
@@ -328,12 +329,14 @@ static void hybrid6_cx(PSDSPContext *dsp, float (*in)[2], 
float (*out)[32][2], c
 }
 }
 
-static void hybrid4_8_12_cx(PSDSPContext *dsp, float (*in)[2], float 
(*out)[32][2], const float (*filter)[8][2], int N, int len)
+static void hybrid4_8_12_cx(PSDSPContext *dsp,
+float (*in)[2], float (*out)[32][2],
+TABLE_CONST float (*filter)[8][2], int N, int len)
 {
 int i;
 
 for (i = 0; i  len; i++, in++) {
-dsp-hybrid_analysis(out[0] + i, in, filter, 32, N);
+dsp-hybrid_analysis(out[0] + i, in, (const float (*)[8][2]) filter, 
32, N);
 }
 }
 
@@ -606,7 +609,8 @@ static void map_val_20_to_34(float par[PS_MAX_NR_IIDICC])
 par[ 0] =  par[ 0];
 }
 
-static void decorrelation(PSContext *ps, float (*out)[32][2], const float 
(*s)[32][2], int is34)
+static void decorrelation(PSContext *ps, float (*out)[32][2],
+  TABLE_CONST float (*s)[32][2], int is34)
 {
 LOCAL_ALIGNED_16(float, power, [34], [PS_QMF_TIME_SLOTS]);
 LOCAL_ALIGNED_16(float, transient_gain, [34], [PS_QMF_TIME_SLOTS]);
@@ -634,7 +638,7 @@ static void decorrelation(PSContext *ps, float 
(*out)[32][2], const float (*s)[3
 
 for (k = 0; k  NR_BANDS[is34]; k++) {
 int i = k_to_i[k];
-ps-dsp.add_squares(power[i], s[k], nL - n0);
+ps-dsp.add_squares(power[i], (const float (*)[2]) s[k], nL - n0);
 }
 
 //Transient detection
@@ -747,7 +751,7 @@ static void stereo_processing(PSContext *ps, float 
(*l)[32][2], float (*r)[32][2
 int8_t (*ipd_mapped)[PS_MAX_NR_IIDICC] = ipd_mapped_buf;
 int8_t (*opd_mapped)[PS_MAX_NR_IIDICC] = opd_mapped_buf;
 const int8_t *k_to_i = is34 ? k_to_i_34 : k_to_i_20;
-const float (*H_LUT)[8][4] = (PS_BASELINE || ps-icc_mode  3) ? HA : HB;
+TABLE_CONST float (*H_LUT)[8][4] = (PS_BASELINE || ps-icc_mode  3) ? HA 
: HB;
 
 //Remapping
 if (ps-num_env_old) {
@@ -897,7 +901,7 @@ int ff_ps_apply(AVCodecContext *avctx, PSContext *ps, float 
L[2][38][64], float
 memset(ps-ap_delay + top, 0, (NR_ALLPASS_BANDS[is34] - 
top)*sizeof(ps-ap_delay[0]));
 
 hybrid_analysis(ps-dsp, Lbuf, ps-in_buf, L, is34, len);
-decorrelation(ps, Rbuf, Lbuf, is34);
+decorrelation(ps, Rbuf, (const float (*)[32][2]) Lbuf, is34);
 stereo_processing(ps, Lbuf, Rbuf, is34);
 hybrid_synthesis(ps-dsp, L, Lbuf, is34, len);
 hybrid_synthesis(ps-dsp, R, Rbuf, is34, len);
diff --git a/libavcodec/aacps_tablegen.h b/libavcodec/aacps_tablegen.h
index 701812b..87383bd 100644
--- a/libavcodec/aacps_tablegen.h
+++ b/libavcodec/aacps_tablegen.h
@@ -28,6 +28,7 @@
 
 #if CONFIG_HARDCODED_TABLES
 #define ps_tableinit()
+#define TABLE_CONST const
 #include libavcodec/aacps_tables.h
 #else
 #include libavutil/common.h
@@ -37,6 +38,7 @@
 #define NR_ALLPASS_BANDS20 30
 #define NR_ALLPASS_BANDS34 50
 #define PS_AP_LINKS 3
+#define TABLE_CONST
 static float pd_re_smooth[8*8*8];
 static float pd_im_smooth[8*8*8];
 static float HA[46][8][4];
diff --git a/libavcodec/aacpsdsp.h b/libavcodec/aacpsdsp.h
index 93737d2..dc380b1 100644
--- a/libavcodec/aacpsdsp.h
+++ b/libavcodec/aacpsdsp.h
@@ -38,7 +38,7 @@ typedef struct PSDSPContext {
int i, int len);
 void (*decorrelate)(float (*out)[2], float (*delay)[2],
 float 
(*ap_delay)[PS_QMF_TIME_SLOTS+PS_MAX_AP_DELAY][2],
-const float phi_fract[2], float (*Q_fract)[2],
+const float phi_fract[2], const float (*Q_fract)[2],
 const float *transient_gain,
 float g_decay_slope,
 int len);
-- 

Re: [libav-devel] [PATCH] aacps: Adjust some const qualifiers to suppress warnings

2013-11-04 Thread Luca Barbato
On 04/11/13 19:14, Diego Biurrun wrote:
 ---
 
 While clearly not a thing of supreme beauty, this silences all warnings
 on a previously very noisy file, both with hardcoded and generated tables.
 

It is compact enough all in all.

lu

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH 1/2] dsputil: Split off H.263 bits into their own H263DSPContext

2013-11-04 Thread Diego Biurrun
---
 configure |5 +-
 libavcodec/Makefile   |1 +
 libavcodec/dsputil.c  |   79 --
 libavcodec/dsputil.h  |3 --
 libavcodec/h263.c |   33 +++--
 libavcodec/h263data.h |5 --
 libavcodec/h263dsp.c  |  108 +
 libavcodec/h263dsp.h  |   34 +
 libavcodec/mpegvideo.c|1 +
 libavcodec/mpegvideo.h|3 +-
 libavcodec/x86/Makefile   |4 +-
 libavcodec/x86/dsputil_init.c |8 ---
 libavcodec/x86/h263dsp_init.c |   39 +++
 13 files changed, 207 insertions(+), 116 deletions(-)
 create mode 100644 libavcodec/h263dsp.c
 create mode 100644 libavcodec/h263dsp.h
 create mode 100644 libavcodec/x86/h263dsp_init.c

diff --git a/configure b/configure
index 4aa66c0..5e172eb 100755
--- a/configure
+++ b/configure
@@ -1384,6 +1384,7 @@ CONFIG_EXTRA=
 gcrypt
 golomb
 gplv3
+h263dsp
 h264chroma
 h264dsp
 h264pred
@@ -1598,8 +1599,8 @@ g2m_decoder_deps=zlib
 g2m_decoder_select=dsputil
 h261_decoder_select=error_resilience mpegvideo
 h261_encoder_select=aandcttables mpegvideoenc
-h263_decoder_select=error_resilience h263_parser mpegvideo
-h263_encoder_select=aandcttables mpegvideoenc
+h263_decoder_select=error_resilience h263_parser h263dsp mpegvideo
+h263_encoder_select=aandcttables h263dsp mpegvideoenc
 h263i_decoder_select=h263_decoder
 h263p_encoder_select=h263_encoder
 h264_decoder_select=golomb h264chroma h264dsp h264pred h264qpel videodsp
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index b3ecf79..32f06fb 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -41,6 +41,7 @@ FFT-OBJS-$(CONFIG_HARDCODED_TABLES)+= cos_tables.o 
cos_fixed_tables.o
 OBJS-$(CONFIG_FFT) += avfft.o fft_fixed.o fft_float.o \
   $(FFT-OBJS-yes)
 OBJS-$(CONFIG_GOLOMB)  += golomb.o
+OBJS-$(CONFIG_H263DSP) += h263dsp.o
 OBJS-$(CONFIG_H264CHROMA)  += h264chroma.o
 OBJS-$(CONFIG_H264DSP) += h264dsp.o h264idct.o
 OBJS-$(CONFIG_H264PRED)+= h264pred.o
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 8d33a99..fbdd5ad 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -1409,80 +1409,6 @@ static void put_mspel8_mc22_c(uint8_t *dst, uint8_t 
*src, ptrdiff_t stride)
 wmv2_mspel8_v_lowpass(dst, halfH+8, stride, 8, 8);
 }
 
-static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
-if(CONFIG_H263_DECODER || CONFIG_H263_ENCODER) {
-int x;
-const int strength= ff_h263_loop_filter_strength[qscale];
-
-for(x=0; x8; x++){
-int d1, d2, ad1;
-int p0= src[x-2*stride];
-int p1= src[x-1*stride];
-int p2= src[x+0*stride];
-int p3= src[x+1*stride];
-int d = (p0 - p3 + 4*(p2 - p1)) / 8;
-
-if (d-2*strength) d1= 0;
-else if(d-  strength) d1=-2*strength - d;
-else if(d   strength) d1= d;
-else if(d 2*strength) d1= 2*strength - d;
-else   d1= 0;
-
-p1 += d1;
-p2 -= d1;
-if(p1256) p1= ~(p131);
-if(p2256) p2= ~(p231);
-
-src[x-1*stride] = p1;
-src[x+0*stride] = p2;
-
-ad1= FFABS(d1)1;
-
-d2= av_clip((p0-p3)/4, -ad1, ad1);
-
-src[x-2*stride] = p0 - d2;
-src[x+  stride] = p3 + d2;
-}
-}
-}
-
-static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){
-if(CONFIG_H263_DECODER || CONFIG_H263_ENCODER) {
-int y;
-const int strength= ff_h263_loop_filter_strength[qscale];
-
-for(y=0; y8; y++){
-int d1, d2, ad1;
-int p0= src[y*stride-2];
-int p1= src[y*stride-1];
-int p2= src[y*stride+0];
-int p3= src[y*stride+1];
-int d = (p0 - p3 + 4*(p2 - p1)) / 8;
-
-if (d-2*strength) d1= 0;
-else if(d-  strength) d1=-2*strength - d;
-else if(d   strength) d1= d;
-else if(d 2*strength) d1= 2*strength - d;
-else   d1= 0;
-
-p1 += d1;
-p2 -= d1;
-if(p1256) p1= ~(p131);
-if(p2256) p2= ~(p231);
-
-src[y*stride-1] = p1;
-src[y*stride+0] = p2;
-
-ad1= FFABS(d1)1;
-
-d2= av_clip((p0-p3)/4, -ad1, ad1);
-
-src[y*stride-2] = p0 - d2;
-src[y*stride+1] = p3 + d2;
-}
-}
-}
-
 static inline int pix_abs16_c(void *v, uint8_t *pix1, uint8_t *pix2, int 
line_size, int h)
 {
 int s, i;
@@ -2701,11 +2627,6 @@ av_cold void ff_dsputil_init(DSPContext* c, 
AVCodecContext *avctx)
 c-bswap_buf= bswap_buf;
 c-bswap16_buf = bswap16_buf;
 
-if (CONFIG_H263_DECODER || CONFIG_H263_ENCODER) {
-c-h263_h_loop_filter= h263_h_loop_filter_c;
-c-h263_v_loop_filter= h263_v_loop_filter_c;
-}
-
 c-try_8x8basis= try_8x8basis_c;
 

[libav-devel] [PATCH 2/2] h263dsp: KR formatting cosmetics

2013-11-04 Thread Diego Biurrun
---
 libavcodec/h263dsp.c |  110 +-
 1 file changed, 63 insertions(+), 47 deletions(-)

diff --git a/libavcodec/h263dsp.c b/libavcodec/h263dsp.c
index 1166b93..63d0972 100644
--- a/libavcodec/h263dsp.c
+++ b/libavcodec/h263dsp.c
@@ -23,78 +23,94 @@
 #include config.h
 #include h263dsp.h
 
-const uint8_t ff_h263_loop_filter_strength[32]={
-//  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 
25 26 27 28 29 30 31
-0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 
9,10,10,10,11,11,11,12,12,12
+const uint8_t ff_h263_loop_filter_strength[32] = {
+0, 1, 1, 2, 2, 3, 3,  4,  4,  4,  5,  5,  6,  6,  7, 7,
+7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12
 };
 
-static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
+static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale)
+{
 int x;
-const int strength= ff_h263_loop_filter_strength[qscale];
+const int strength = ff_h263_loop_filter_strength[qscale];
 
-for(x=0; x8; x++){
+for (x = 0; x  8; x++) {
 int d1, d2, ad1;
-int p0= src[x-2*stride];
-int p1= src[x-1*stride];
-int p2= src[x+0*stride];
-int p3= src[x+1*stride];
-int d = (p0 - p3 + 4*(p2 - p1)) / 8;
-
-if (d-2*strength) d1= 0;
-else if(d-  strength) d1=-2*strength - d;
-else if(d   strength) d1= d;
-else if(d 2*strength) d1= 2*strength - d;
-else   d1= 0;
+int p0 = src[x - 2 * stride];
+int p1 = src[x - 1 * stride];
+int p2 = src[x + 0 * stride];
+int p3 = src[x + 1 * stride];
+int d  = (p0 - p3 + 4 * (p2 - p1)) / 8;
+
+if (d  -2 * strength)
+d1 = 0;
+else if (d  -strength)
+d1 = -2 * strength - d;
+else if (d  strength)
+d1 = d;
+else if (d  2 * strength)
+d1 = 2 * strength - d;
+else
+d1 = 0;
 
 p1 += d1;
 p2 -= d1;
-if(p1256) p1= ~(p131);
-if(p2256) p2= ~(p231);
+if (p1  256)
+p1 = ~(p1  31);
+if (p2  256)
+p2 = ~(p2  31);
 
-src[x-1*stride] = p1;
-src[x+0*stride] = p2;
+src[x - 1 * stride] = p1;
+src[x + 0 * stride] = p2;
 
-ad1= FFABS(d1)1;
+ad1 = FFABS(d1)  1;
 
-d2= av_clip((p0-p3)/4, -ad1, ad1);
+d2 = av_clip((p0 - p3) / 4, -ad1, ad1);
 
-src[x-2*stride] = p0 - d2;
-src[x+  stride] = p3 + d2;
+src[x - 2 * stride] = p0 - d2;
+src[x + stride] = p3 + d2;
 }
 }
 
-static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){
+static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale)
+{
 int y;
-const int strength= ff_h263_loop_filter_strength[qscale];
+const int strength = ff_h263_loop_filter_strength[qscale];
 
-for(y=0; y8; y++){
+for (y = 0; y  8; y++) {
 int d1, d2, ad1;
-int p0= src[y*stride-2];
-int p1= src[y*stride-1];
-int p2= src[y*stride+0];
-int p3= src[y*stride+1];
-int d = (p0 - p3 + 4*(p2 - p1)) / 8;
-
-if (d-2*strength) d1= 0;
-else if(d-  strength) d1=-2*strength - d;
-else if(d   strength) d1= d;
-else if(d 2*strength) d1= 2*strength - d;
-else   d1= 0;
+int p0 = src[y * stride - 2];
+int p1 = src[y * stride - 1];
+int p2 = src[y * stride + 0];
+int p3 = src[y * stride + 1];
+int d  = (p0 - p3 + 4 * (p2 - p1)) / 8;
+
+if (d  -2 * strength)
+d1 = 0;
+else if (d  -strength)
+d1 = -2 * strength - d;
+else if (d  strength)
+d1 = d;
+else if (d  2 * strength)
+d1 = 2 * strength - d;
+else
+d1 = 0;
 
 p1 += d1;
 p2 -= d1;
-if(p1256) p1= ~(p131);
-if(p2256) p2= ~(p231);
+if (p1  256)
+p1 = ~(p1  31);
+if (p2  256)
+p2 = ~(p2  31);
 
-src[y*stride-1] = p1;
-src[y*stride+0] = p2;
+src[y * stride - 1] = p1;
+src[y * stride + 0] = p2;
 
-ad1= FFABS(d1)1;
+ad1 = FFABS(d1)  1;
 
-d2= av_clip((p0-p3)/4, -ad1, ad1);
+d2 = av_clip((p0 - p3) / 4, -ad1, ad1);
 
-src[y*stride-2] = p0 - d2;
-src[y*stride+1] = p3 + d2;
+src[y * stride - 2] = p0 - d2;
+src[y * stride + 1] = p3 + d2;
 }
 }
 
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] configure: Check whether MSVC supports C99

2013-11-04 Thread Diego Biurrun
On Mon, Nov 04, 2013 at 04:00:48PM +0200, Martin Storsjö wrote:
 MSVC does support most of C99 since the 2013 version. Try to
 detect whether the compiler in the path needs to run the C99
 converter or not. When the converter is omitted, the compilation

s/the compilation/compilation/

 Prior to this, users could still use --cc=c99conv -noconv cl
 to run MSVC 2013 to achieve the same.

s/to run/when running/

 --- a/configure
 +++ b/configure
 @@ -2279,6 +2279,16 @@ case $toolchain in
  ;;
  msvc)
  cc_default=c99wrap cl
 +# Check whether cl.exe supports C99 or not. From MSVC 2013 onwards,
 +# it does support C99, but we still need to use c99wrap for passing
 +# command line parameters with a space (for avoiding msys path
 +# mangling/conversion issues).
 +cat EOF  $TMPDIR/c99test.c
 +struct s { int a, b; } a = { .b = 42 };
 +EOF
 +check_cmd c99wrap -noconv cl -c -Fo $TMPDIR/c99test.o 
 $TMPDIR/c99test.c 
 +cc_default=c99wrap -noconv cl
 +rm -f $TMPDIR/c99test.{c,o}

You absolutely must not create a temporary file with a predictable name.
This is a security risk.

Overall the patch feels hackish due to the fact that you run the test so
early and configure is not yet prepared to properly run compilation tests.

I suggest you try detecting the msvc version in probe_cc() and adding
-noconv to the compiler _flags there.  If I am not mistaken, that should
work just as well and be cleaner.

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] hevc_ps: Use AV_PIX_FMT_YUVJ420P if YUV 4:2:0 8-bit full scale.

2013-11-04 Thread wm4
On Mon, 4 Nov 2013 11:55:02 +0100
Vittorio Giovara vittorio.giov...@gmail.com wrote:

 On Sun, Nov 3, 2013 at 8:47 PM, Yusuke Nakamura
 muken.the.vfrman...@gmail.com wrote:
  ---
   libavcodec/hevc_ps.c | 2 ++
   1 file changed, 2 insertions(+)
 
  diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
  index 15f73be..a51784d 100644
  --- a/libavcodec/hevc_ps.c
  +++ b/libavcodec/hevc_ps.c
  @@ -449,6 +449,8 @@ static void decode_vui(HEVCContext *s, HEVCSPS *sps)
   vui-video_format= get_bits(gb, 3);
   vui-video_full_range_flag   = get_bits1(gb);
   vui-colour_description_present_flag = get_bits1(gb);
  +if (vui-video_full_range_flag  sps-pix_fmt == 
  AV_PIX_FMT_YUV420P)
  +sps-pix_fmt = AV_PIX_FMT_YUVJ420P;
   if (vui-colour_description_present_flag) {
   vui-colour_primaries= get_bits(gb, 8);
   vui-transfer_characteristic = get_bits(gb, 8);
 
 This looks fine, can you just add a FIXME comment that you're doing
 this for swscale compatibility?

libswscale can handle ranges just fine, and doesn't require you to use
the J formats.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/6] vdpau: add a constructor for AVVDPAUContext.

2013-11-04 Thread wm4
On Sun,  3 Nov 2013 23:27:48 +0100
Anton Khirnov an...@khirnov.net wrote:

 We will likely want to add new fields to it in the future, so this is
 needed to avoid breaking ABI.
 ---
  doc/APIchanges |2 ++
  libavcodec/vdpau.c |5 +
  libavcodec/vdpau.h |   11 +++
  3 files changed, 18 insertions(+)
 
 diff --git a/doc/APIchanges b/doc/APIchanges
 index 93d1608..db30bb9 100644
 --- a/doc/APIchanges
 +++ b/doc/APIchanges
 @@ -15,6 +15,8 @@ API changes, most recent first:
  
  2013-11-xx - xxx - lavc 55.25.0 - vdpau.h
Add av_vdpau_get_profile().
 +  Add av_vdpau_alloc_context(). This function must from now on be
 +  used for allocating AVVDPAUContext.
  
  2013-08-xx - xxx - lavu 52.17.0 - avframe.h
Add AVFrame.flags and AV_FRAME_FLAG_CORRUPT.
 diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
 index 5cabb7e..ba11195 100644
 --- a/libavcodec/vdpau.c
 +++ b/libavcodec/vdpau.c
 @@ -127,4 +127,9 @@ int av_vdpau_get_profile(AVCodecContext *avctx)
  return AVERROR(EINVAL);
  }
  
 +AVVDPAUContext *av_vdpau_alloc_context(void)
 +{
 +return av_mallocz(sizeof(AVVDPAUContext));
 +}
 +
  /* @}*/
 diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
 index 49ca6f0..16547e4 100644
 --- a/libavcodec/vdpau.h
 +++ b/libavcodec/vdpau.h
 @@ -72,6 +72,10 @@ union AVVDPAUPictureInfo {
   * during initialization or through each AVCodecContext.get_buffer()
   * function call. In any case, they must be valid prior to calling
   * decoding functions.
 + *
 + * This size of this structure is not a part of the public ABI and must not
 + * be used outside of libavcodec. Use av_vdpau_alloc_context() to allocate an
 + * AVVDPAUContext.
   */
  typedef struct AVVDPAUContext {
  /**
 @@ -125,6 +129,13 @@ typedef struct AVVDPAUContext {
  } AVVDPAUContext;
  
  /**
 + * Allocate an AVVDPAUContext.
 + *
 + * @return newly allocated AVVDPAUContext or NULL on failure.
 + */
 +AVVDPAUContext *av_vdpau_alloc_context(void);
 +
 +/**
   * Get a decoder profile that should be used for initializing a VDPAU 
 decoder.
   * Should be called from the AVCodecContext.get_format() callback.
   *

As far as I'm aware, the only fields the user has to access are decoder
and render. If you're going to change the API, maybe make this struct
non-public, let libavcodec allocate it, and add setters for the
decoder/render fields.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] configure: Check whether MSVC supports C99

2013-11-04 Thread Martin Storsjö

On Mon, 4 Nov 2013, Diego Biurrun wrote:


On Mon, Nov 04, 2013 at 04:00:48PM +0200, Martin Storsjö wrote:

MSVC does support most of C99 since the 2013 version. Try to
detect whether the compiler in the path needs to run the C99
converter or not. When the converter is omitted, the compilation


s/the compilation/compilation/


Prior to this, users could still use --cc=c99conv -noconv cl
to run MSVC 2013 to achieve the same.


s/to run/when running/


--- a/configure
+++ b/configure
@@ -2279,6 +2279,16 @@ case $toolchain in
 ;;
 msvc)
 cc_default=c99wrap cl
+# Check whether cl.exe supports C99 or not. From MSVC 2013 onwards,
+# it does support C99, but we still need to use c99wrap for passing
+# command line parameters with a space (for avoiding msys path
+# mangling/conversion issues).
+cat EOF  $TMPDIR/c99test.c
+struct s { int a, b; } a = { .b = 42 };
+EOF
+check_cmd c99wrap -noconv cl -c -Fo $TMPDIR/c99test.o $TMPDIR/c99test.c 

+cc_default=c99wrap -noconv cl
+rm -f $TMPDIR/c99test.{c,o}


You absolutely must not create a temporary file with a predictable name.
This is a security risk.


Right, that can be fixed.


Overall the patch feels hackish due to the fact that you run the test so
early and configure is not yet prepared to properly run compilation tests.

I suggest you try detecting the msvc version in probe_cc() and adding
-noconv to the compiler _flags there.  If I am not mistaken, that should
work just as well and be cleaner.


You indeed are mistaken, that won't work. -noconv must be passed before 
the actual command within $CC. So $CC is either c99wrap cl or c99wrap 
-noconv cl, but anywhere later in the command line won't work.


And we can't do this in the probe_cc() stage, because this isn't about 
probing what the chosen $CC is and what it can do, but determining what 
cc_default should be overall. Yes, it feels hackish, but making probe_cc 
able to override what the $CC command is in itself would be even worse.


The point is that this is only the default for the cases when the user 
hasn't set the cc manually. Advanced users might still want to do 
--cc=c99wrap cl or something else if they feel they want to override 
what the default is.


// Martin
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] mpegaudioenc: Move some static tables to the only place they are used

2013-11-04 Thread Diego Biurrun
---
 libavcodec/mpegaudioenc.c |   14 ++
 libavcodec/mpegaudiotab.h |   14 --
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index 739eb64..7e0fda5 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -67,6 +67,20 @@ typedef struct MpegAudioContext {
 #include mpegaudiodata.h
 #include mpegaudiotab.h
 
+static int16_t filter_bank[512];
+static int scale_factor_table[64];
+static unsigned char scale_diff_table[128];
+
+#ifdef USE_FLOATS
+static float scale_factor_inv_table[64];
+#else
+static int8_t scale_factor_shift[64];
+static unsigned short scale_factor_mult[64];
+#endif
+
+/* total number of bits per allocation group */
+static unsigned short total_quant_bits[17];
+
 static av_cold int MPA_encode_init(AVCodecContext *avctx)
 {
 MpegAudioContext *s = avctx-priv_data;
diff --git a/libavcodec/mpegaudiotab.h b/libavcodec/mpegaudiotab.h
index 45afe9b..d30ef1b 100644
--- a/libavcodec/mpegaudiotab.h
+++ b/libavcodec/mpegaudiotab.h
@@ -79,20 +79,6 @@ static const int bitinv32[32] = {
 };
 
 
-static int16_t filter_bank[512];
-
-static int scale_factor_table[64];
-#ifdef USE_FLOATS
-static float scale_factor_inv_table[64];
-#else
-static int8_t scale_factor_shift[64];
-static unsigned short scale_factor_mult[64];
-#endif
-static unsigned char scale_diff_table[128];
-
-/* total number of bits per allocation group */
-static unsigned short total_quant_bits[17];
-
 /* signal to noise ratio of each quantification step (could be
computed from quant_steps[]). The values are dB multiplied by 10
 */
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] configure: Move -Wno-maybe-uninitialized check into gcc section

2013-11-04 Thread Diego Biurrun
As another example of bizarre compiler behavior clang groks the
-Wmaybe-uninitialized option, but not -Wno-maybe-uninitialized
and spews a warning for every file that gets compiled.
---

This is very similar to what Vittorio sent, but I had created this patch
a few days ago already, just got around to sending now.

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

diff --git a/configure b/configure
index f11885f..965d1bd 100755
--- a/configure
+++ b/configure
@@ -3947,7 +3947,6 @@ check_disable_warning -Wno-parentheses
 check_disable_warning -Wno-switch
 check_disable_warning -Wno-format-zero-length
 check_disable_warning -Wno-pointer-sign
-enabled extra_warnings || check_disable_warning -Wno-maybe-uninitialized
 
 # add some linker flags
 check_ldflags -Wl,--warn-common
@@ -4039,6 +4038,7 @@ elif enabled gcc; then
 check_cflags -Werror=return-type
 check_cflags -Werror=declaration-after-statement
 check_cflags -Werror=vla
+enabled extra_warnings || check_disable_warning -Wno-maybe-uninitialized
 elif enabled llvm_gcc; then
 check_cflags -mllvm -stack-alignment=16
 elif enabled clang; then
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/6] vdpau: add a constructor for AVVDPAUContext.

2013-11-04 Thread Anton Khirnov

On Mon, 4 Nov 2013 21:02:02 +0100, wm4 nfx...@googlemail.com wrote:
 On Sun,  3 Nov 2013 23:27:48 +0100
 Anton Khirnov an...@khirnov.net wrote:
 
  We will likely want to add new fields to it in the future, so this is
  needed to avoid breaking ABI.
  ---
   doc/APIchanges |2 ++
   libavcodec/vdpau.c |5 +
   libavcodec/vdpau.h |   11 +++
   3 files changed, 18 insertions(+)
  
  diff --git a/doc/APIchanges b/doc/APIchanges
  index 93d1608..db30bb9 100644
  --- a/doc/APIchanges
  +++ b/doc/APIchanges
  @@ -15,6 +15,8 @@ API changes, most recent first:
   
   2013-11-xx - xxx - lavc 55.25.0 - vdpau.h
 Add av_vdpau_get_profile().
  +  Add av_vdpau_alloc_context(). This function must from now on be
  +  used for allocating AVVDPAUContext.
   
   2013-08-xx - xxx - lavu 52.17.0 - avframe.h
 Add AVFrame.flags and AV_FRAME_FLAG_CORRUPT.
  diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
  index 5cabb7e..ba11195 100644
  --- a/libavcodec/vdpau.c
  +++ b/libavcodec/vdpau.c
  @@ -127,4 +127,9 @@ int av_vdpau_get_profile(AVCodecContext *avctx)
   return AVERROR(EINVAL);
   }
   
  +AVVDPAUContext *av_vdpau_alloc_context(void)
  +{
  +return av_mallocz(sizeof(AVVDPAUContext));
  +}
  +
   /* @}*/
  diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
  index 49ca6f0..16547e4 100644
  --- a/libavcodec/vdpau.h
  +++ b/libavcodec/vdpau.h
  @@ -72,6 +72,10 @@ union AVVDPAUPictureInfo {
* during initialization or through each AVCodecContext.get_buffer()
* function call. In any case, they must be valid prior to calling
* decoding functions.
  + *
  + * This size of this structure is not a part of the public ABI and must not
  + * be used outside of libavcodec. Use av_vdpau_alloc_context() to allocate 
  an
  + * AVVDPAUContext.
*/
   typedef struct AVVDPAUContext {
   /**
  @@ -125,6 +129,13 @@ typedef struct AVVDPAUContext {
   } AVVDPAUContext;
   
   /**
  + * Allocate an AVVDPAUContext.
  + *
  + * @return newly allocated AVVDPAUContext or NULL on failure.
  + */
  +AVVDPAUContext *av_vdpau_alloc_context(void);
  +
  +/**
* Get a decoder profile that should be used for initializing a VDPAU 
  decoder.
* Should be called from the AVCodecContext.get_format() callback.
*
 
 As far as I'm aware, the only fields the user has to access are decoder
 and render. If you're going to change the API, maybe make this struct
 non-public, let libavcodec allocate it, and add setters for the
 decoder/render fields.

Those are also the only fields that exist in that struct. The whole point of it
is that it's all public. Non-public parts are hidden deeper in lavc.

So I really don't see any advantage to making it opaque.

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/6] vdpau: add a constructor for AVVDPAUContext.

2013-11-04 Thread wm4
On Mon, 04 Nov 2013 21:35:45 +0100
Anton Khirnov an...@khirnov.net wrote:

 
 On Mon, 4 Nov 2013 21:02:02 +0100, wm4 nfx...@googlemail.com wrote:
  On Sun,  3 Nov 2013 23:27:48 +0100
  Anton Khirnov an...@khirnov.net wrote:
  
   We will likely want to add new fields to it in the future, so this is
   needed to avoid breaking ABI.
   ---
doc/APIchanges |2 ++
libavcodec/vdpau.c |5 +
libavcodec/vdpau.h |   11 +++
3 files changed, 18 insertions(+)
   
   diff --git a/doc/APIchanges b/doc/APIchanges
   index 93d1608..db30bb9 100644
   --- a/doc/APIchanges
   +++ b/doc/APIchanges
   @@ -15,6 +15,8 @@ API changes, most recent first:

2013-11-xx - xxx - lavc 55.25.0 - vdpau.h
  Add av_vdpau_get_profile().
   +  Add av_vdpau_alloc_context(). This function must from now on be
   +  used for allocating AVVDPAUContext.

2013-08-xx - xxx - lavu 52.17.0 - avframe.h
  Add AVFrame.flags and AV_FRAME_FLAG_CORRUPT.
   diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
   index 5cabb7e..ba11195 100644
   --- a/libavcodec/vdpau.c
   +++ b/libavcodec/vdpau.c
   @@ -127,4 +127,9 @@ int av_vdpau_get_profile(AVCodecContext *avctx)
return AVERROR(EINVAL);
}

   +AVVDPAUContext *av_vdpau_alloc_context(void)
   +{
   +return av_mallocz(sizeof(AVVDPAUContext));
   +}
   +
/* @}*/
   diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
   index 49ca6f0..16547e4 100644
   --- a/libavcodec/vdpau.h
   +++ b/libavcodec/vdpau.h
   @@ -72,6 +72,10 @@ union AVVDPAUPictureInfo {
 * during initialization or through each AVCodecContext.get_buffer()
 * function call. In any case, they must be valid prior to calling
 * decoding functions.
   + *
   + * This size of this structure is not a part of the public ABI and must 
   not
   + * be used outside of libavcodec. Use av_vdpau_alloc_context() to 
   allocate an
   + * AVVDPAUContext.
 */
typedef struct AVVDPAUContext {
/**
   @@ -125,6 +129,13 @@ typedef struct AVVDPAUContext {
} AVVDPAUContext;

/**
   + * Allocate an AVVDPAUContext.
   + *
   + * @return newly allocated AVVDPAUContext or NULL on failure.
   + */
   +AVVDPAUContext *av_vdpau_alloc_context(void);
   +
   +/**
 * Get a decoder profile that should be used for initializing a VDPAU 
   decoder.
 * Should be called from the AVCodecContext.get_format() callback.
 *
  
  As far as I'm aware, the only fields the user has to access are decoder
  and render. If you're going to change the API, maybe make this struct
  non-public, let libavcodec allocate it, and add setters for the
  decoder/render fields.
 
 Those are also the only fields that exist in that struct. The whole point of 
 it

Plus a bunch of deprecated stuff.

 is that it's all public. Non-public parts are hidden deeper in lavc.
 
 So I really don't see any advantage to making it opaque.

I don't think having public fields in structs ever worked out well in
libav*. It's an endless cycle of deprecations, ABI hacks, and working
around bad ABI properties of structs (like adding a constructor
function).
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] lavc: Add a VP9 decoder

2013-11-04 Thread Ronald S. Bultje
Hi,

On Mon, Nov 4, 2013 at 11:27 AM, Luca Barbato lu_z...@gentoo.org wrote:

 From: Ronald S. Bultje rsbul...@gmail.com

 Originally written by Ronald S. Bultje rsbul...@gmail.com with the
 help of Clément Bœsch ubi...@gmail.com.


No. The decoder was written by A and B, not A with the help of B.

Further contributions by:
 Anton Khirnov an...@khirnov.net
 Luca Barbato lu_z...@gentoo.org


As one of the actual authors, I'm very interested in these further
contributions. What are they?

Ronald
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/6] vdpau: add a constructor for AVVDPAUContext.

2013-11-04 Thread Luca Barbato
On 04/11/13 21:52, wm4 wrote:
 I don't think having public fields in structs ever worked out well in
 libav*. It's an endless cycle of deprecations, ABI hacks, and working
 around bad ABI properties of structs (like adding a constructor
 function).

That's why we are trying to seal when makes sense and get you
constructors, getter and setters for the new stuff that would be prone
to changes.

lu


___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] mpegaudioenc: Move some static tables to the only place they are used

2013-11-04 Thread Luca Barbato
On 04/11/13 21:24, Diego Biurrun wrote:
 ---
  libavcodec/mpegaudioenc.c |   14 ++
  libavcodec/mpegaudiotab.h |   14 --
  2 files changed, 14 insertions(+), 14 deletions(-)
 

Probably ok.

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] vdpau: Add missing #includes to fix standalone header compilation

2013-11-04 Thread Anton Khirnov

On Mon, 4 Nov 2013 19:09:38 +0100, Diego Biurrun di...@biurrun.de wrote:
 On Mon, Nov 04, 2013 at 07:07:34PM +0100, Anton Khirnov wrote:
  On Mon,  4 Nov 2013 18:16:46 +0100, Diego Biurrun di...@biurrun.de wrote:
   --- a/libavcodec/vdpau_internal.h
   +++ b/libavcodec/vdpau_internal.h
   @@ -26,8 +26,11 @@

#include stdint.h
#include vdpau/vdpau.h
   -#include h264.h
   +
   +#include avcodec.h
#include mpegvideo.h
   +#include vdpau.h
  
  What is vdpau.h for?
 
 struct AVVDPAUContext
 

I don't see such a thing anywhere in vdpau_internal.h

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] graph2dot: Add missing #include for av_get_channel_layout_string()

2013-11-04 Thread Diego Biurrun
---
 tools/graph2dot.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/graph2dot.c b/tools/graph2dot.c
index 86d3d14..12f1066 100644
--- a/tools/graph2dot.c
+++ b/tools/graph2dot.c
@@ -25,6 +25,7 @@
 #include stdio.h
 #include string.h
 
+#include libavutil/channel_layout.h
 #include libavutil/mem.h
 #include libavutil/pixdesc.h
 #include libavutil/audioconvert.h
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] graph2dot: Add missing #include for av_get_channel_layout_string()

2013-11-04 Thread Anton Khirnov

On Mon,  4 Nov 2013 22:34:18 +0100, Diego Biurrun di...@biurrun.de wrote:
 ---
  tools/graph2dot.c |1 +
  1 file changed, 1 insertion(+)
 

ok

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] vdpau: Add missing #includes to fix standalone header compilation

2013-11-04 Thread Diego Biurrun
On Mon, Nov 04, 2013 at 10:23:00PM +0100, Anton Khirnov wrote:
 On Mon, 4 Nov 2013 19:09:38 +0100, Diego Biurrun di...@biurrun.de wrote:
  On Mon, Nov 04, 2013 at 07:07:34PM +0100, Anton Khirnov wrote:
   On Mon,  4 Nov 2013 18:16:46 +0100, Diego Biurrun di...@biurrun.de 
   wrote:
--- a/libavcodec/vdpau_internal.h
+++ b/libavcodec/vdpau_internal.h
@@ -26,8 +26,11 @@
 
 #include stdint.h
 #include vdpau/vdpau.h
-#include h264.h
+
+#include avcodec.h
 #include mpegvideo.h
+#include vdpau.h
   
   What is vdpau.h for?
  
  struct AVVDPAUContext
 
 I don't see such a thing anywhere in vdpau_internal.h

Neither do I now that I looked again.
Somebody must have put something in my tea ...

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] mpegaudioenc: Move some static tables to the only place they are used

2013-11-04 Thread Anton Khirnov

On Mon,  4 Nov 2013 21:24:11 +0100, Diego Biurrun di...@biurrun.de wrote:
 ---
  libavcodec/mpegaudioenc.c |   14 ++
  libavcodec/mpegaudiotab.h |   14 --
  2 files changed, 14 insertions(+), 14 deletions(-)
 
 diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
 index 739eb64..7e0fda5 100644
 --- a/libavcodec/mpegaudioenc.c
 +++ b/libavcodec/mpegaudioenc.c
 @@ -67,6 +67,20 @@ typedef struct MpegAudioContext {
  #include mpegaudiodata.h
  #include mpegaudiotab.h
  

I'd move those to MpegAudioContext.

Potentially saving a couple bytes is not worth all the trouble with global
state.

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/6] vdpau: add a constructor for AVVDPAUContext.

2013-11-04 Thread Anton Khirnov

On Mon, 4 Nov 2013 21:52:17 +0100, wm4 nfx...@googlemail.com wrote:
 On Mon, 04 Nov 2013 21:35:45 +0100
 Anton Khirnov an...@khirnov.net wrote:
 
  
  On Mon, 4 Nov 2013 21:02:02 +0100, wm4 nfx...@googlemail.com wrote:
   On Sun,  3 Nov 2013 23:27:48 +0100
   Anton Khirnov an...@khirnov.net wrote:
   
We will likely want to add new fields to it in the future, so this is
needed to avoid breaking ABI.
---
 doc/APIchanges |2 ++
 libavcodec/vdpau.c |5 +
 libavcodec/vdpau.h |   11 +++
 3 files changed, 18 insertions(+)

diff --git a/doc/APIchanges b/doc/APIchanges
index 93d1608..db30bb9 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,8 @@ API changes, most recent first:
 
 2013-11-xx - xxx - lavc 55.25.0 - vdpau.h
   Add av_vdpau_get_profile().
+  Add av_vdpau_alloc_context(). This function must from now on be
+  used for allocating AVVDPAUContext.
 
 2013-08-xx - xxx - lavu 52.17.0 - avframe.h
   Add AVFrame.flags and AV_FRAME_FLAG_CORRUPT.
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 5cabb7e..ba11195 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -127,4 +127,9 @@ int av_vdpau_get_profile(AVCodecContext *avctx)
 return AVERROR(EINVAL);
 }
 
+AVVDPAUContext *av_vdpau_alloc_context(void)
+{
+return av_mallocz(sizeof(AVVDPAUContext));
+}
+
 /* @}*/
diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index 49ca6f0..16547e4 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -72,6 +72,10 @@ union AVVDPAUPictureInfo {
  * during initialization or through each AVCodecContext.get_buffer()
  * function call. In any case, they must be valid prior to calling
  * decoding functions.
+ *
+ * This size of this structure is not a part of the public ABI and 
must not
+ * be used outside of libavcodec. Use av_vdpau_alloc_context() to 
allocate an
+ * AVVDPAUContext.
  */
 typedef struct AVVDPAUContext {
 /**
@@ -125,6 +129,13 @@ typedef struct AVVDPAUContext {
 } AVVDPAUContext;
 
 /**
+ * Allocate an AVVDPAUContext.
+ *
+ * @return newly allocated AVVDPAUContext or NULL on failure.
+ */
+AVVDPAUContext *av_vdpau_alloc_context(void);
+
+/**
  * Get a decoder profile that should be used for initializing a VDPAU 
decoder.
  * Should be called from the AVCodecContext.get_format() callback.
  *
   
   As far as I'm aware, the only fields the user has to access are decoder
   and render. If you're going to change the API, maybe make this struct
   non-public, let libavcodec allocate it, and add setters for the
   decoder/render fields.
  
  Those are also the only fields that exist in that struct. The whole point 
  of it
 
 Plus a bunch of deprecated stuff.
 

Disregarding those as you don't need to touch them...

  is that it's all public. Non-public parts are hidden deeper in lavc.
  
  So I really don't see any advantage to making it opaque.
 
 I don't think having public fields in structs ever worked out well in
 libav*. It's an endless cycle of deprecations, ABI hacks, and working
 around bad ABI properties of structs (like adding a constructor
 function).

It's exactly the same for getters/setters -- if it turns out the API isn't
sufficient, we still have to do the deprecation/replacement dance.

Can you name one real practical advantage that getters/setters would have in
this case?

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] configure: clang filter for maybe-unintialized

2013-11-04 Thread Vittorio Giovara
On Sun, Nov 3, 2013 at 11:16 PM, Hendrik Leppkes h.lepp...@gmail.com wrote:
 On Sun, Nov 3, 2013 at 11:09 PM, Vittorio Giovara
 vittorio.giov...@gmail.com wrote:
 This will convert the gcc warning -Wno-maybe-unintialized into
 -Wno-sometimes-uninitialized for clang
 ---

 This was originally disabled because GCC is rather bad at this and
 emits a lot of false positives. clang has a better history tracking
 uninitialized variables, is the sometimes-uninitialized also full of
 false-positives which would warrant turning it off, or does it make
 more sense to actually keep it on?
 Just blindly applying the same settings for different compilers is not
 always the best course. :)


I generally agree, but I was under the impression that other
developers didn't like introducing too many changes to silence a
compiler quirk and that the -Wsometimes-uninitialized message was
quite harmless. I'll post a few examples (actually all of them) of
what clang has found

CC libavcodec/aacsbr.o
libavcodec/aacsbr.c:389:16: warning: variable 'max_qmf_subbands' is
used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
} else if (sbr-sample_rate = 48000)
   ^
libavcodec/aacsbr.c:392:33: note: uninitialized use occurs here
if (sbr-k[2] - sbr-k[0]  max_qmf_subbands) {
^~~~
libavcodec/aacsbr.c:389:12: note: remove the 'if' if its condition is
always true
} else if (sbr-sample_rate = 48000)
   ^~
libavcodec/aacsbr.c:324:40: note: initialize the variable
'max_qmf_subbands' to silence this warning
unsigned int temp, max_qmf_subbands;
   ^
= 0
1 warning generated.

CC libavcodec/h264_refs.o
libavcodec/h264_refs.c:541:17: warning: variable 'i' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]
   (mmco_index != h-mmco_index ||
^~~
libavcodec/h264_refs.c:545:43: note: uninitialized use occurs here
   mmco_index, h-mmco_index, i);
  ^
libavcodec/h264_refs.c:541:17: note: remove the '||' if its condition
is always false
   (mmco_index != h-mmco_index ||
^~
libavcodec/h264_refs.c:520:26: note: initialize the variable 'i' to
silence this warning
int mmco_index = 0, i;
 ^
  = 0
1 warning generated.

CC libavcodec/vc1dec.o
libavcodec/vc1dec.c:1857:28: warning: variable 'px' is used
uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
} else if (c_valid) {
   ^~~
libavcodec/vc1dec.c:1870:70: note: uninitialized use occurs here
s-mv[dir][n][0] = s-current_picture.motion_val[dir][xy][0] =
((px + dmv_x + r_x)  ((r_x  1) - 1)) - r_x;
 ^~
libavcodec/vc1dec.c:1857:24: note: remove the 'if' if its condition is
always true
} else if (c_valid) {
   ^
libavcodec/vc1dec.c:1669:11: note: initialize the variable 'px' to
silence this warning
int px, py;
  ^
   = 0
libavcodec/vc1dec.c:1857:28: warning: variable 'py' is used
uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
} else if (c_valid) {
   ^~~
libavcodec/vc1dec.c:1871:70: note: uninitialized use occurs here
s-mv[dir][n][1] = s-current_picture.motion_val[dir][xy][1] =
((py + dmv_y + r_y)  ((r_y  1) - 1)) - r_y;
 ^~
libavcodec/vc1dec.c:1857:24: note: remove the 'if' if its condition is
always true
} else if (c_valid) {
   ^
libavcodec/vc1dec.c:1669:15: note: initialize the variable 'py' to
silence this warning
int px, py;
  ^
   = 0
2 warnings generated.

CC avconv_opt.o
avconv_opt.c:1258:5: warning: variable 'ost' is used uninitialized
whenever switch default is taken [-Wsometimes-uninitialized]
default:
^~~
avconv_opt.c:1264:5: note: uninitialized use occurs here
ost-source_index = -1;
^~~
avconv_opt.c:1252:22: note: initialize the variable 'ost' to silence
this warning
OutputStream *ost;
 ^
  = NULL
avconv_opt.c:1654:13: warning: variable 'm' is used uninitialized
whenever switch default is taken [-Wsometimes-uninitialized]
default:
^~~
avconv_opt.c:1658:25: note: uninitialized use occurs here
av_dict_set(m, o-metadata[i].u.str, *val ? val : NULL, 0);
^
avconv_opt.c:1620:25: note: initialize the variable 'm' to silence this warning
AVDictionary **m;
^
   

Re: [libav-devel] [PATCH] aacps: Adjust some const qualifiers to suppress warnings

2013-11-04 Thread Alex Converse
On Mon, Nov 4, 2013 at 10:14 AM, Diego Biurrun di...@biurrun.de wrote:

 ---

 While clearly not a thing of supreme beauty, this silences all warnings
 on a previously very noisy file, both with hardcoded and generated tables.


The only warning my compiler generates with this file is:
warning: unknown warning option '-Wno-maybe-uninitialized'; did you
mean '-Wno-uninitialized'?
but the gcc developers seem pretty emphatic that their warnings are
correct. So I guess I'm ok with this in general. See specific comments
below.

One alternate approach (that I'm not necessarily advocating), is to
make the actual arrays in aacps_table prefixed, do the casting in that
file and have all the pointers used from aacps.c full const, hiding
all the ugly in the tablegen header but ultimately giving both
implementations a consistent interface.

 diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c
 index 1abafe2..2b9ca4f 100644
 --- a/libavcodec/aacps.c
 +++ b/libavcodec/aacps.c
 @@ -606,7 +609,8 @@ static void map_val_20_to_34(float par[PS_MAX_NR_IIDICC])
  par[ 0] =  par[ 0];
  }

 -static void decorrelation(PSContext *ps, float (*out)[32][2], const float 
 (*s)[32][2], int is34)
 +static void decorrelation(PSContext *ps, float (*out)[32][2],
 +  TABLE_CONST float (*s)[32][2], int is34)
  {
  LOCAL_ALIGNED_16(float, power, [34], [PS_QMF_TIME_SLOTS]);
  LOCAL_ALIGNED_16(float, transient_gain, [34], [PS_QMF_TIME_SLOTS]);
 @@ -634,7 +638,7 @@ static void decorrelation(PSContext *ps, float 
 (*out)[32][2], const float (*s)[3

  for (k = 0; k  NR_BANDS[is34]; k++) {
  int i = k_to_i[k];
 -ps-dsp.add_squares(power[i], s[k], nL - n0);
 +ps-dsp.add_squares(power[i], (const float (*)[2]) s[k], nL - n0);
  }

  //Transient detection
 @@ -747,7 +751,7 @@ static void stereo_processing(PSContext *ps, float 
 (*l)[32][2], float (*r)[32][2
  int8_t (*ipd_mapped)[PS_MAX_NR_IIDICC] = ipd_mapped_buf;
  int8_t (*opd_mapped)[PS_MAX_NR_IIDICC] = opd_mapped_buf;
  const int8_t *k_to_i = is34 ? k_to_i_34 : k_to_i_20;
 -const float (*H_LUT)[8][4] = (PS_BASELINE || ps-icc_mode  3) ? HA : HB;
 +TABLE_CONST float (*H_LUT)[8][4] = (PS_BASELINE || ps-icc_mode  3) ? 
 HA : HB;

I'd rather see a cast on the RHS here.


  //Remapping
  if (ps-num_env_old) {
 @@ -897,7 +901,7 @@ int ff_ps_apply(AVCodecContext *avctx, PSContext *ps, 
 float L[2][38][64], float
  memset(ps-ap_delay + top, 0, (NR_ALLPASS_BANDS[is34] - 
 top)*sizeof(ps-ap_delay[0]));

  hybrid_analysis(ps-dsp, Lbuf, ps-in_buf, L, is34, len);
 -decorrelation(ps, Rbuf, Lbuf, is34);
 +decorrelation(ps, Rbuf, (const float (*)[32][2]) Lbuf, is34);

The changes wrt this Lbuf (s inside the function) seem inconsistent.
You are unconditionally adding the const in the call, then using
TABLE_CONST in the function declaration, then recasting it again when
you pass it to add_squares().

Meanwhile calls inside this function that take transient_gain still warn.

 diff --git a/libavcodec/aacps_tablegen.h b/libavcodec/aacps_tablegen.h
 index 701812b..87383bd 100644
 --- a/libavcodec/aacps_tablegen.h
 +++ b/libavcodec/aacps_tablegen.h
 @@ -28,6 +28,7 @@

  #if CONFIG_HARDCODED_TABLES
  #define ps_tableinit()
 +#define TABLE_CONST const
  #include libavcodec/aacps_tables.h
  #else
  #include libavutil/common.h
 @@ -37,6 +38,7 @@
  #define NR_ALLPASS_BANDS20 30
  #define NR_ALLPASS_BANDS34 50
  #define PS_AP_LINKS 3
 +#define TABLE_CONST
  static float pd_re_smooth[8*8*8];
  static float pd_im_smooth[8*8*8];
  static float HA[46][8][4];
 diff --git a/libavcodec/aacpsdsp.h b/libavcodec/aacpsdsp.h
 index 93737d2..dc380b1 100644
 --- a/libavcodec/aacpsdsp.h
 +++ b/libavcodec/aacpsdsp.h
 @@ -38,7 +38,7 @@ typedef struct PSDSPContext {
 int i, int len);
  void (*decorrelate)(float (*out)[2], float (*delay)[2],
  float 
 (*ap_delay)[PS_QMF_TIME_SLOTS+PS_MAX_AP_DELAY][2],
 -const float phi_fract[2], float (*Q_fract)[2],
 +const float phi_fract[2], const float (*Q_fract)[2],
  const float *transient_gain,
  float g_decay_slope,
  int len);

Shouldn't the implementations be updated to match?
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] [v2] dsputil: Split off H.263 bits into their own H263DSPContext

2013-11-04 Thread Diego Biurrun
---

Adjusted the bits in configure so that mpegvideo now automatically
selects h263dsp.  Given that the h263dsp init is called unconditionally
from mpegvideo.c, this is the correct solution.

 configure |3 +-
 libavcodec/Makefile   |1 +
 libavcodec/dsputil.c  |   79 --
 libavcodec/dsputil.h  |3 --
 libavcodec/h263.c |   33 +++--
 libavcodec/h263data.h |5 --
 libavcodec/h263dsp.c  |  108 +
 libavcodec/h263dsp.h  |   34 +
 libavcodec/mpegvideo.c|1 +
 libavcodec/mpegvideo.h|3 +-
 libavcodec/x86/Makefile   |4 +-
 libavcodec/x86/dsputil_init.c |8 ---
 libavcodec/x86/h263dsp_init.c |   39 +++
 13 files changed, 206 insertions(+), 115 deletions(-)
 create mode 100644 libavcodec/h263dsp.c
 create mode 100644 libavcodec/h263dsp.h
 create mode 100644 libavcodec/x86/h263dsp_init.c

diff --git a/configure b/configure
index 4aa66c0..6769973 100755
--- a/configure
+++ b/configure
@@ -1384,6 +1384,7 @@ CONFIG_EXTRA=
 gcrypt
 golomb
 gplv3
+h263dsp
 h264chroma
 h264dsp
 h264pred
@@ -1538,7 +1539,7 @@ mdct_select=fft
 rdft_select=fft
 mpegaudio_select=mpegaudiodsp
 mpegaudiodsp_select=dct
-mpegvideo_select=dsputil hpeldsp videodsp
+mpegvideo_select=dsputil h263dsp hpeldsp videodsp
 mpegvideoenc_select=mpegvideo
 
 # decoders / encoders
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 205359e..03d7459 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -41,6 +41,7 @@ FFT-OBJS-$(CONFIG_HARDCODED_TABLES)+= cos_tables.o 
cos_fixed_tables.o
 OBJS-$(CONFIG_FFT) += avfft.o fft_fixed.o fft_float.o \
   $(FFT-OBJS-yes)
 OBJS-$(CONFIG_GOLOMB)  += golomb.o
+OBJS-$(CONFIG_H263DSP) += h263dsp.o
 OBJS-$(CONFIG_H264CHROMA)  += h264chroma.o
 OBJS-$(CONFIG_H264DSP) += h264dsp.o h264idct.o
 OBJS-$(CONFIG_H264PRED)+= h264pred.o
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 8d33a99..fbdd5ad 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -1409,80 +1409,6 @@ static void put_mspel8_mc22_c(uint8_t *dst, uint8_t 
*src, ptrdiff_t stride)
 wmv2_mspel8_v_lowpass(dst, halfH+8, stride, 8, 8);
 }
 
-static void h263_v_loop_filter_c(uint8_t *src, int stride, int qscale){
-if(CONFIG_H263_DECODER || CONFIG_H263_ENCODER) {
-int x;
-const int strength= ff_h263_loop_filter_strength[qscale];
-
-for(x=0; x8; x++){
-int d1, d2, ad1;
-int p0= src[x-2*stride];
-int p1= src[x-1*stride];
-int p2= src[x+0*stride];
-int p3= src[x+1*stride];
-int d = (p0 - p3 + 4*(p2 - p1)) / 8;
-
-if (d-2*strength) d1= 0;
-else if(d-  strength) d1=-2*strength - d;
-else if(d   strength) d1= d;
-else if(d 2*strength) d1= 2*strength - d;
-else   d1= 0;
-
-p1 += d1;
-p2 -= d1;
-if(p1256) p1= ~(p131);
-if(p2256) p2= ~(p231);
-
-src[x-1*stride] = p1;
-src[x+0*stride] = p2;
-
-ad1= FFABS(d1)1;
-
-d2= av_clip((p0-p3)/4, -ad1, ad1);
-
-src[x-2*stride] = p0 - d2;
-src[x+  stride] = p3 + d2;
-}
-}
-}
-
-static void h263_h_loop_filter_c(uint8_t *src, int stride, int qscale){
-if(CONFIG_H263_DECODER || CONFIG_H263_ENCODER) {
-int y;
-const int strength= ff_h263_loop_filter_strength[qscale];
-
-for(y=0; y8; y++){
-int d1, d2, ad1;
-int p0= src[y*stride-2];
-int p1= src[y*stride-1];
-int p2= src[y*stride+0];
-int p3= src[y*stride+1];
-int d = (p0 - p3 + 4*(p2 - p1)) / 8;
-
-if (d-2*strength) d1= 0;
-else if(d-  strength) d1=-2*strength - d;
-else if(d   strength) d1= d;
-else if(d 2*strength) d1= 2*strength - d;
-else   d1= 0;
-
-p1 += d1;
-p2 -= d1;
-if(p1256) p1= ~(p131);
-if(p2256) p2= ~(p231);
-
-src[y*stride-1] = p1;
-src[y*stride+0] = p2;
-
-ad1= FFABS(d1)1;
-
-d2= av_clip((p0-p3)/4, -ad1, ad1);
-
-src[y*stride-2] = p0 - d2;
-src[y*stride+1] = p3 + d2;
-}
-}
-}
-
 static inline int pix_abs16_c(void *v, uint8_t *pix1, uint8_t *pix2, int 
line_size, int h)
 {
 int s, i;
@@ -2701,11 +2627,6 @@ av_cold void ff_dsputil_init(DSPContext* c, 
AVCodecContext *avctx)
 c-bswap_buf= bswap_buf;
 c-bswap16_buf = bswap16_buf;
 
-if (CONFIG_H263_DECODER || CONFIG_H263_ENCODER) {
-c-h263_h_loop_filter= h263_h_loop_filter_c;
-c-h263_v_loop_filter= h263_v_loop_filter_c;
-}
-
 c-try_8x8basis= try_8x8basis_c;
 c-add_8x8basis= add_8x8basis_c;
 
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h

[libav-devel] [PATCH] Deprecate obsolete XvMC hardware decoding support

2013-11-04 Thread Diego Biurrun
XvMC has long ago been superseded by newer acceleration APIs, such as
VDPAU, and few downstreams still support it. Furthermore XvMC is not
implemented within the hwaccel framework, but requires its own specific
code in the MPEG-1/2 decoder, which is a maintenance burden.
---

For some funny reason Anton sent this on the same day I started dusting
it off again.  I slightly prefer my version, but I'm sceptical of the
swap_uv handling and its relation to VCR2 in both versions.

Sending for reference, with some bits updated to match Anton's patch.

 doc/general.texi  |1 -
 libavcodec/allcodecs.c|5 ++-
 libavcodec/avcodec.h  |9 +-
 libavcodec/codec_desc.c   |6 ++--
 libavcodec/error_resilience.c |   10 ++
 libavcodec/mpeg12.c   |1 -
 libavcodec/mpeg12dec.c|   72 -
 libavcodec/mpegvideo.c|   58 +
 libavcodec/mpegvideo.h|2 ++
 libavcodec/mpegvideo_xvmc.c   |5 +++
 libavcodec/options_table.h|2 ++
 libavcodec/version.h  |3 ++
 libavcodec/x86/dsputil_init.c |8 +++--
 libavcodec/xvmc.h |8 -
 libavcodec/xvmc_internal.h|5 +++
 libavutil/old_pix_fmts.h  |2 ++
 libavutil/pixdesc.c   |3 ++
 libavutil/pixfmt.h|2 ++
 libavutil/version.h   |3 ++
 19 files changed, 159 insertions(+), 46 deletions(-)

diff --git a/doc/general.texi b/doc/general.texi
index 6c82ac7..811fb9a 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -577,7 +577,6 @@ following image formats are supported:
 @item Mobotix MxPEG video@tab @tab  X
 @item Motion Pixels video@tab @tab  X
 @item MPEG-1 video   @tab  X  @tab  X
-@item MPEG-1/2 video XvMC (X-Video Motion Compensation)  @tab @tab  X
 @item MPEG-2 video   @tab  X  @tab  X
 @item MPEG-4 part 2  @tab  X  @tab  X
 @tab libxvidcore can be used alternatively for encoding.
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 6172466..faa94b1 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -24,8 +24,9 @@
  * Provide registration of all codecs, parsers and bitstream filters for 
libavcodec.
  */
 
-#include avcodec.h
 #include config.h
+#include avcodec.h
+#include version.h
 
 #define REGISTER_HWACCEL(X, x)  \
 {   \
@@ -178,7 +179,9 @@ void avcodec_register_all(void)
 REGISTER_DECODER(MJPEGB,mjpegb);
 REGISTER_DECODER(MMVIDEO,   mmvideo);
 REGISTER_DECODER(MOTIONPIXELS,  motionpixels);
+#if FF_API_XVMC
 REGISTER_DECODER(MPEG_XVMC, mpeg_xvmc);
+#endif /* FF_API_XVMC */
 REGISTER_ENCDEC (MPEG1VIDEO,mpeg1video);
 REGISTER_ENCDEC (MPEG2VIDEO,mpeg2video);
 REGISTER_ENCDEC (MPEG4, mpeg4);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 0548f71..831d28e 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -103,7 +103,9 @@ enum AVCodecID {
 /* video codecs */
 AV_CODEC_ID_MPEG1VIDEO,
 AV_CODEC_ID_MPEG2VIDEO, /// preferred ID for MPEG-1/2 video decoding
+#if FF_API_XVMC
 AV_CODEC_ID_MPEG2VIDEO_XVMC,
+#endif /* FF_API_XVMC */
 AV_CODEC_ID_H261,
 AV_CODEC_ID_H263,
 AV_CODEC_ID_RV10,
@@ -691,8 +693,10 @@ typedef struct RcOverride{
  */
 #define CODEC_CAP_DR1 0x0002
 #define CODEC_CAP_TRUNCATED   0x0008
+#if FF_API_XVMC
 /* Codec can export data for HW decoding (XvMC). */
 #define CODEC_CAP_HWACCEL 0x0010
+#endif /* FF_API_XVMC */
 /**
  * Encoder or decoder requires flushing with NULL input at the end in order to
  * give the complete and correct output.
@@ -1526,12 +1530,15 @@ typedef struct AVCodecContext {
 #define SLICE_FLAG_ALLOW_FIELD0x0002 /// allow draw_horiz_band() with 
field slices (MPEG2 field pics)
 #define SLICE_FLAG_ALLOW_PLANE0x0004 /// allow draw_horiz_band() with 1 
component at a time (SVQ1)
 
+#if FF_API_XVMC
 /**
  * XVideo Motion Acceleration
  * - encoding: forbidden
  * - decoding: set by decoder
+ * @deprecated XvMC support is slated for removal.
  */
-int xvmc_acceleration;
+attribute_deprecated int xvmc_acceleration;
+#endif /* FF_API_XVMC */
 
 /**
  * macroblock decision mode
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 73e8f6d..68c895d 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -18,10 +18,10 @@
 
 #include string.h
 
-#include avcodec.h
-
 #include libavutil/common.h
 #include libavutil/internal.h
+#include avcodec.h
+#include version.h
 
 static const AVCodecDescriptor codec_descriptors[] = {
 /* video codecs */
@@ -39,6 +39,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
 .long_name = NULL_IF_CONFIG_SMALL(MPEG-1 video),
 .props = 

Re: [libav-devel] [PATCH] gitignore: Ignore .dirs

2013-11-04 Thread Anton Khirnov

On Sat, 02 Nov 2013 13:52:11 +0100, Luca Barbato lu_z...@gentoo.org wrote:
 On 02/11/13 10:13, Diego Biurrun wrote:
  On Sat, Nov 02, 2013 at 12:34:57AM +0100, Luca Barbato wrote:
  Quite useful to be able to git-clean while using .builddirs.
  ---
   .gitignore | 1 +
   1 file changed, 1 insertion(+)
  --- a/.gitignore
  +++ b/.gitignore
  @@ -1,3 +1,4 @@
  +.*/
   *.a
  
  I don't quite like just ignoring all directories starting with '.'.
 
 It is the whole point.
 
  If at all, more explicit patterns would be better.  What is this
  .builddirs thing anyway?
 
 I have
 
 .master
 .vp9
 .bmd
 .release9
 .release0.8
 .coverage
 .security
 .qsv-simple
 .qsv-simple-win32
 .win32
 .arm
 .fate
 .cparser
 
 All of them are build trees (.hevc and few others got away lately =)),
 using my patch I can keep them and use git on the source including git
 clean.
 
 Among the nice things of this setup is that I can switch from a topic
 branch to another, rebase it and just issue make config on the right dir.
 
 The only missing bit is not having git clean.
 

You can have your personal ignore stuff in .git/info/exclude. No reason to add
it to the main repository.

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Remove all Alpha architecture optimizations

2013-11-04 Thread Anton Khirnov

On Mon,  4 Nov 2013 15:58:43 +0100, Diego Biurrun di...@biurrun.de wrote:
 Alpha has been end-of-lifed and no more test machines are available.
 ---
 
 Now with the usual deprecation dance for the bits in avcodec.h and
 options_table.h...
 
  libavcodec/alpha/Makefile |9 -
  libavcodec/alpha/asm.h|  186 --
  libavcodec/alpha/dsputil_alpha.c  |  157 ---
  libavcodec/alpha/dsputil_alpha.h  |   49 -
  libavcodec/alpha/dsputil_alpha_asm.S  |  167 
  libavcodec/alpha/hpeldsp_alpha.c  |  213 
  libavcodec/alpha/hpeldsp_alpha.h  |   28 ---
  libavcodec/alpha/hpeldsp_alpha_asm.S  |  124 
  libavcodec/alpha/motion_est_alpha.c   |  345 
 -
  libavcodec/alpha/motion_est_mvi_asm.S |  179 -
  libavcodec/alpha/mpegvideo_alpha.c|  110 ---
  libavcodec/alpha/regdef.h |   77 
  libavcodec/alpha/simple_idct_alpha.c  |  303 -
  libavcodec/avcodec.h  |2 +
  libavcodec/dct-test.c |4 -
  libavcodec/dsputil.c  |2 -
  libavcodec/dsputil.h  |1 -
  libavcodec/hpeldsp.c  |2 -
  libavcodec/mpegvideo.c|2 -
  libavcodec/msmpeg4.c  |5 +-
  libavcodec/options_table.h|2 +
  libavcodec/version.h  |3 +
  22 files changed, 8 insertions(+), 1962 deletions(-)
  delete mode 100644 libavcodec/alpha/Makefile
  delete mode 100644 libavcodec/alpha/asm.h
  delete mode 100644 libavcodec/alpha/dsputil_alpha.c
  delete mode 100644 libavcodec/alpha/dsputil_alpha.h
  delete mode 100644 libavcodec/alpha/dsputil_alpha_asm.S
  delete mode 100644 libavcodec/alpha/hpeldsp_alpha.c
  delete mode 100644 libavcodec/alpha/hpeldsp_alpha.h
  delete mode 100644 libavcodec/alpha/hpeldsp_alpha_asm.S
  delete mode 100644 libavcodec/alpha/motion_est_alpha.c
  delete mode 100644 libavcodec/alpha/motion_est_mvi_asm.S
  delete mode 100644 libavcodec/alpha/mpegvideo_alpha.c
  delete mode 100644 libavcodec/alpha/regdef.h
  delete mode 100644 libavcodec/alpha/simple_idct_alpha.c
 

No objections from me now.

-- 
Anton Khirnov
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel