Re: [libav-devel] [PATCH] Fix libgsm header detection

2013-01-21 Thread Diego Biurrun
On Sun, Jan 20, 2013 at 07:53:05PM -0500, Brad Smith wrote:
 On Mon, Jan 21, 2013 at 01:32:44AM +0100, Diego Biurrun wrote:
  On Sun, Jan 20, 2013 at 07:09:31AM -0500, Brad Smith wrote:
   The following diff is to fix the detection of the libgsm header in the
   standard location. OpenBSD/FreeBSD/NetBSD only provide the header in
   the standard location and are patching Libav/FFmpeg to allow the libgsm
   to build. Some OS's based on Linux provide a symlink but when I looked
   around almost all OS's provide the header in the standard location
   (.e.g. PREFIX/include/gsm.h)
  
  First I wonder if we should not switch from gsm/gsm.h to gsm.h, which is
  what the source package (sort of) uses and is available on more platforms
  and then I'm not sure if it makes sense to keep libgsm support at all.
  
  Does anybody remember why libgsm support is still around?
  
 It looks like the libgsm support is for the encoder.

No, it is for both.

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


Re: [libav-devel] [PATCH] Fix libgsm header detection

2013-01-21 Thread Diego Biurrun
On Mon, Jan 21, 2013 at 02:17:00AM +0100, Luca Barbato wrote:
 On 21/01/13 01:32, Diego Biurrun wrote:
  First I wonder if we should not switch from gsm/gsm.h to gsm.h, which is
  what the source package (sort of) uses and is available on more platforms
  and then I'm not sure if it makes sense to keep libgsm support at all.
 
 Not sure it is a good idea, it would break some distros that I could see.

Which ones?  AFAICS gsm/gsm.h is pure cargo-cult.

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


[libav-devel] [PATCH] bfin: vp3: Separate VP3 initialization code from general dsputil code

2013-01-21 Thread Diego Biurrun
---

This is untested due to lack of a bfin cross-compilation environment.

 libavcodec/bfin/Makefile   |4 ++--
 libavcodec/bfin/dsputil_bfin.c |8 +---
 libavcodec/bfin/vp3_bfin.c |6 ++
 libavcodec/vp3dsp.c|2 ++
 libavcodec/vp3dsp.h|1 +
 5 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/libavcodec/bfin/Makefile b/libavcodec/bfin/Makefile
index be81e6c..d1b41bc 100644
--- a/libavcodec/bfin/Makefile
+++ b/libavcodec/bfin/Makefile
@@ -2,7 +2,7 @@ OBJS += bfin/dsputil_bfin.o 
\
 bfin/fdct_bfin.o\
 bfin/idct_bfin.o\
 bfin/pixels_bfin.o  \
-bfin/vp3_bfin.o \
-bfin/vp3_idct_bfin.o\
 
 OBJS-$(CONFIG_MPEGVIDEOENC) += bfin/mpegvideo_bfin.o
+OBJS-$(CONFIG_VP3DSP)   += bfin/vp3_bfin.o  \
+   bfin/vp3_idct_bfin.o
diff --git a/libavcodec/bfin/dsputil_bfin.c b/libavcodec/bfin/dsputil_bfin.c
index 6a96d08..492e8c8 100644
--- a/libavcodec/bfin/dsputil_bfin.c
+++ b/libavcodec/bfin/dsputil_bfin.c
@@ -256,13 +256,7 @@ void ff_dsputil_init_bfin( DSPContext* c, AVCodecContext 
*avctx )
 if (avctx-bits_per_raw_sample = 8) {
 if (avctx-dct_algo == FF_DCT_AUTO)
 c-fdct  = ff_bfin_fdct;
-
-if (avctx-idct_algo == FF_IDCT_VP3) {
-c-idct_permutation_type = FF_NO_IDCT_PERM;
-c-idct  = ff_bfin_vp3_idct;
-c-idct_add  = ff_bfin_vp3_idct_add;
-c-idct_put  = ff_bfin_vp3_idct_put;
-} else if (avctx-idct_algo == FF_IDCT_AUTO) {
+if (avctx-idct_algo == FF_IDCT_AUTO) {
 c-idct_permutation_type = FF_NO_IDCT_PERM;
 c-idct  = ff_bfin_idct;
 c-idct_add  = bfin_idct_add;
diff --git a/libavcodec/bfin/vp3_bfin.c b/libavcodec/bfin/vp3_bfin.c
index 962d383..b45063e 100644
--- a/libavcodec/bfin/vp3_bfin.c
+++ b/libavcodec/bfin/vp3_bfin.c
@@ -41,3 +41,9 @@ void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, 
int16_t *block)
 ff_bfin_vp3_idct (block);
 ff_bfin_add_pixels_clamped (block, dest, line_size);
 }
+
+void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags)
+{
+c-idct_add  = ff_bfin_vp3_idct_add;
+c-idct_put  = ff_bfin_vp3_idct_put;
+}
diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c
index 7354ec5..a8966e2 100644
--- a/libavcodec/vp3dsp.c
+++ b/libavcodec/vp3dsp.c
@@ -291,6 +291,8 @@ av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags)
 
 if (ARCH_ARM)
 ff_vp3dsp_init_arm(c, flags);
+if (ARCH_BFIN)
+ff_vp3dsp_init_bfin(c, flags);
 if (ARCH_PPC)
 ff_vp3dsp_init_ppc(c, flags);
 if (ARCH_X86)
diff --git a/libavcodec/vp3dsp.h b/libavcodec/vp3dsp.h
index acc70e1..6e3910e 100644
--- a/libavcodec/vp3dsp.h
+++ b/libavcodec/vp3dsp.h
@@ -33,6 +33,7 @@ typedef struct VP3DSPContext {
 
 void ff_vp3dsp_init(VP3DSPContext *c, int flags);
 void ff_vp3dsp_init_arm(VP3DSPContext *c, int flags);
+void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags);
 void ff_vp3dsp_init_ppc(VP3DSPContext *c, int flags);
 void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags);
 
-- 
1.7.2.5

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


Re: [libav-devel] [PATCH 06/10] lavc: Put FF_IDCT_{VP3, H264, CAVS, BINK, EA, WMV2} under FF_API_IDCT

2013-01-21 Thread Diego Biurrun
On Mon, Jan 21, 2013 at 06:57:43AM +0100, Luca Barbato wrote:
 From: Ronald S. Bultje rsbul...@gmail.com
 
 Slate them to be removed on the next major bump.
 
 They are functionally irrelevant, and most of them are unused,
 except the vp3 one, which is used wrongly in the bfin arch
 optimizations.

See the patch I just sent, which will make the VP3 one unused as well.
This patch ought to be rebased on top of that one.

 --- a/libavcodec/avcodec.h
 +++ b/libavcodec/avcodec.h
 @@ -2680,20 +2680,30 @@ typedef struct AVCodecContext {
  #define FF_IDCT_ALTIVEC   8
  #define FF_IDCT_SH4   9
  #define FF_IDCT_SIMPLEARM 10
 +#if FF_API_IDCT
  #define FF_IDCT_H264  11
  #define FF_IDCT_VP3   12
 +#endif
  #define FF_IDCT_IPP   13
  #define FF_IDCT_XVIDMMX   14
 +#if FF_API_IDCT
  #define FF_IDCT_CAVS  15
 +#endif
  #define FF_IDCT_SIMPLEARMV5TE 16
  #define FF_IDCT_SIMPLEARMV6   17
  #define FF_IDCT_SIMPLEVIS 18
 +#if FF_API_IDCT
  #define FF_IDCT_WMV2  19
 +#endif
  #define FF_IDCT_FAAN  20
 +#if FF_API_IDCT
  #define FF_IDCT_EA21
 +#endif
  #define FF_IDCT_SIMPLENEON22
  #define FF_IDCT_SIMPLEALPHA   23
 +#if FF_API_IDCT
  #define FF_IDCT_BINK  24
 +#endif

It would be nice if these could be grouped together under a single
ifdef instead.

 --- a/libavcodec/bfin/dsputil_bfin.c
 +++ b/libavcodec/bfin/dsputil_bfin.c
 @@ -257,7 +257,8 @@ void ff_dsputil_init_bfin( DSPContext* c, AVCodecContext 
 *avctx )
  if (avctx-dct_algo == FF_DCT_AUTO)
  c-fdct  = ff_bfin_fdct;
  
 -if (avctx-idct_algo == FF_IDCT_VP3) {
 +// FIXME convert to VP3DSPContext
 +if (0) { // avctx-idct_algo == FF_IDCT_VP3) {
  c-idct_permutation_type = FF_NO_IDCT_PERM;
  c-idct  = ff_bfin_vp3_idct;
  c-idct_add  = ff_bfin_vp3_idct_add;

see above

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


[libav-devel] [PATCH 1/2] arm: Add some missing header #includes

2013-01-21 Thread Diego Biurrun
---

This is a preliminary to make the DCTELEM patch work on ARM.

 libavcodec/arm/h264pred_init_arm.c |1 +
 libavcodec/arm/vp3dsp_init_arm.c   |1 +
 libavcodec/arm/vp8dsp_init_arm.c   |1 +
 libavcodec/arm/vp8dsp_init_armv6.c |2 ++
 libavcodec/arm/vp8dsp_init_neon.c  |2 ++
 5 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/libavcodec/arm/h264pred_init_arm.c 
b/libavcodec/arm/h264pred_init_arm.c
index 39c0121..0431fc8 100644
--- a/libavcodec/arm/h264pred_init_arm.c
+++ b/libavcodec/arm/h264pred_init_arm.c
@@ -21,6 +21,7 @@
 #include stdint.h
 
 #include libavutil/arm/cpu.h
+#include libavcodec/avcodec.h
 #include libavcodec/h264pred.h
 
 void ff_pred16x16_vert_neon(uint8_t *src, ptrdiff_t stride);
diff --git a/libavcodec/arm/vp3dsp_init_arm.c b/libavcodec/arm/vp3dsp_init_arm.c
index 8f04c7c..5a7950c 100644
--- a/libavcodec/arm/vp3dsp_init_arm.c
+++ b/libavcodec/arm/vp3dsp_init_arm.c
@@ -21,6 +21,7 @@
 #include libavutil/attributes.h
 #include libavutil/cpu.h
 #include libavutil/arm/cpu.h
+#include libavcodec/dsputil.h
 #include libavcodec/vp3dsp.h
 
 void ff_vp3_idct_put_neon(uint8_t *dest, int line_size, int16_t *data);
diff --git a/libavcodec/arm/vp8dsp_init_arm.c b/libavcodec/arm/vp8dsp_init_arm.c
index 603f68c..b7897cd 100644
--- a/libavcodec/arm/vp8dsp_init_arm.c
+++ b/libavcodec/arm/vp8dsp_init_arm.c
@@ -18,6 +18,7 @@
 
 #include stdint.h
 
+#include libavutil/attributes.h
 #include libavutil/arm/cpu.h
 #include libavcodec/vp8dsp.h
 #include vp8dsp.h
diff --git a/libavcodec/arm/vp8dsp_init_armv6.c 
b/libavcodec/arm/vp8dsp_init_armv6.c
index b51adbe..e15e191 100644
--- a/libavcodec/arm/vp8dsp_init_armv6.c
+++ b/libavcodec/arm/vp8dsp_init_armv6.c
@@ -17,6 +17,8 @@
  */
 
 #include stdint.h
+
+#include libavutil/attributes.h
 #include libavcodec/vp8dsp.h
 #include vp8dsp.h
 
diff --git a/libavcodec/arm/vp8dsp_init_neon.c 
b/libavcodec/arm/vp8dsp_init_neon.c
index cfc6269..0468181 100644
--- a/libavcodec/arm/vp8dsp_init_neon.c
+++ b/libavcodec/arm/vp8dsp_init_neon.c
@@ -17,6 +17,8 @@
  */
 
 #include stdint.h
+
+#include libavutil/attributes.h
 #include libavcodec/vp8dsp.h
 #include vp8dsp.h
 
-- 
1.7.2.5

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


[libav-devel] [PATCH 2/2] arm: Add mathops.h to ARCH_HEADERS list

2013-01-21 Thread Diego Biurrun
It is an arch-specific header not suitable for standalone compilation.
---

This fixes make checkheaders on ARM.

 libavcodec/arm/Makefile |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
index 71048f9..93823ce 100644
--- a/libavcodec/arm/Makefile
+++ b/libavcodec/arm/Makefile
@@ -1,3 +1,5 @@
+ARCH_HEADERS = mathops.h
+
 OBJS-$(CONFIG_AC3DSP)  += arm/ac3dsp_init_arm.o \
   arm/ac3dsp_arm.o
 
-- 
1.7.2.5

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


Re: [libav-devel] [PATCH] Fix libgsm header detection

2013-01-21 Thread Luca Barbato
On 21/01/13 09:33, Diego Biurrun wrote:
 On Mon, Jan 21, 2013 at 02:17:00AM +0100, Luca Barbato wrote:
 On 21/01/13 01:32, Diego Biurrun wrote:
 First I wonder if we should not switch from gsm/gsm.h to gsm.h, which is
 what the source package (sort of) uses and is available on more platforms
 and then I'm not sure if it makes sense to keep libgsm support at all.

 Not sure it is a good idea, it would break some distros that I could see.
 
 Which ones?  AFAICS gsm/gsm.h is pure cargo-cult.
 

Gentoo puts the header on libgsm and gsm but not in the base include dir.

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


[libav-devel] [PATCH] rtpenc: Start the sequence numbers from a random offset

2013-01-21 Thread Martin Storsjö
Expose the current sequence number via an AVOption - this can
be used both for setting the initial sequence number, or for
querying the current number.
---
 libavformat/rtpenc.c |   10 +-
 libavformat/rtpenc.h |2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 0f5307d..d0140ee 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -35,6 +35,7 @@ static const AVOption options[] = {
 { payload_type, Specify RTP payload type, offsetof(RTPMuxContext, 
payload_type), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, 127, 
AV_OPT_FLAG_ENCODING_PARAM },
 { ssrc, Stream identifier, offsetof(RTPMuxContext, ssrc), 
AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
 { cname, CNAME to include in RTCP SR packets, offsetof(RTPMuxContext, 
cname), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
+{ seq, Starting sequence number, offsetof(RTPMuxContext, seq), 
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 65535, AV_OPT_FLAG_ENCODING_PARAM },
 { NULL },
 };
 
@@ -124,6 +125,13 @@ static int rtp_write_header(AVFormatContext *s1)
 /* Round the NTP time to whole milliseconds. */
 s-first_rtcp_ntp_time = (s1-start_time_realtime / 1000) * 1000 +
  NTP_OFFSET_US;
+// Pick a random sequence start number, but in the lower end of the
+// available range, so that any wraparound doesn't happen immediately.
+// (Immediate wraparound would be an issue for SRTP.)
+if (s-seq  0)
+s-seq = av_get_random_seed()  0x0fff;
+else
+s-seq = 0x; // Use the given parameter, wrapped to the right 
interval
 
 if (s1-packet_size) {
 if (s1-pb-max_packet_size)
@@ -309,7 +317,7 @@ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t 
*buf1, int len, int m)
 avio_write(s1-pb, buf1, len);
 avio_flush(s1-pb);
 
-s-seq++;
+s-seq = (s-seq + 1)  0x;
 s-octet_count += len;
 s-packet_count++;
 }
diff --git a/libavformat/rtpenc.h b/libavformat/rtpenc.h
index f797348..d19b0fd 100644
--- a/libavformat/rtpenc.h
+++ b/libavformat/rtpenc.h
@@ -31,7 +31,7 @@ struct RTPMuxContext {
 int payload_type;
 uint32_t ssrc;
 const char *cname;
-uint16_t seq;
+int seq;
 uint32_t timestamp;
 uint32_t base_timestamp;
 uint32_t cur_timestamp;
-- 
1.7.9.4

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


Re: [libav-devel] [PATCH 01/14] x32 configure: add abi detection

2013-01-21 Thread camper
On 21.01.2013 02:28, Luca Barbato wrote:
 On 20/01/13 23:32, Matthias Räncker wrote:
 -check_64bit x86_32 x86_64 'sizeof(void *)  4'
 +check_64bit x86_32 'x86_64 x86_64_x64' 'sizeof(void *)  4'
 +if test $subarch = x86_32; then
 +check_64bit x86_32 'x86_64 x86_64_x32' '
 +#if defined __x86_64__  defined  __ILP32__
 +1
 +#endif
 +'
 
 Checking for __x86_64__ alone isn't enough? You know already it is
 __ILP32__ from the previous check I think.


It should be except for pathological non-*unix systems. Originally I put
this check before testing for x64, so I went by the book.

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

Re: [libav-devel] [PATCH] rtpenc: Start the sequence numbers from a random offset

2013-01-21 Thread Luca Barbato
On 21/01/13 11:23, Martin Storsjö wrote:
 Expose the current sequence number via an AVOption - this can
 be used both for setting the initial sequence number, or for
 querying the current number.
 ---
  libavformat/rtpenc.c |   10 +-
  libavformat/rtpenc.h |2 +-
  2 files changed, 10 insertions(+), 2 deletions(-)
 

Looks nice.

lu

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

Re: [libav-devel] [PATCH] sensible error codes for avidec

2013-01-21 Thread Diego Biurrun
On Fri, Jan 18, 2013 at 11:51:30PM +0100, Jindřich Makovička wrote:
 On Fri, Jan 18, 2013 at 10:38 PM, Diego Biurrun di...@biurrun.de wrote:
  On Thu, Jan 17, 2013 at 04:26:34PM +0100, Jindřich Makovička wrote:
 
  From 37eb9b56534b8ffae296510feaf37a8d42e764aa Mon Sep 17 00:00:00 2001
  From: Jindrich Makovicka makov...@gmail.com
  Date: Thu, 17 Jan 2013 16:24:28 +0100
  Subject: [PATCH] avidec: use sensible error codes instead of -1
 
  Use AVERROR_INVALIDDATA on invalid inputs, and AVERROR_EOF when no more
  frames are available in an interleaved AVI.
 
  --- a/libavformat/avidec.c
  +++ b/libavformat/avidec.c
  @@ -181,7 +181,7 @@ static int read_braindead_odml_indx(AVFormatContext 
  *s, int frame_num){
 
   if(pb-eof_reached)
  -return -1;
  +return AVERROR_INVALIDDATA;
 
  @@ -198,13 +198,13 @@ static int read_braindead_odml_indx(AVFormatContext 
  *s, int frame_num){
 
   if(pb-eof_reached)
  -return -1;
  +return AVERROR_INVALIDDATA;
 
  @@ -1016,7 +1019,7 @@ static int avi_read_packet(AVFormatContext *s, 
  AVPacket *pkt)
   }
   if(!best_st)
  -return -1;
  +return AVERROR_EOF;
 
  @@ -1183,7 +1186,7 @@ static int avi_read_idx1(AVFormatContext *s, int 
  size)
 
   if(pb-eof_reached)
  -return -1;
  +return AVERROR_INVALIDDATA;
 
  Given the log message of your patch, these return values seem transposed.
 
 Actually, they are not, the best stream to output now not found is
 an EOF condition, while an incomplete AVI index means invalid data.

Patch pushed, thanks.

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

Re: [libav-devel] [PATCH] bfin: vp3: Separate VP3 initialization code from general dsputil code

2013-01-21 Thread Ronald S. Bultje
Hi,

On Mon, Jan 21, 2013 at 1:01 AM, Diego Biurrun di...@biurrun.de wrote:
 ---

 This is untested due to lack of a bfin cross-compilation environment.

  libavcodec/bfin/Makefile   |4 ++--
  libavcodec/bfin/dsputil_bfin.c |8 +---
  libavcodec/bfin/vp3_bfin.c |6 ++
  libavcodec/vp3dsp.c|2 ++
  libavcodec/vp3dsp.h|1 +
  5 files changed, 12 insertions(+), 9 deletions(-)

OK.

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


[libav-devel] [PATCH] proresdec: support mixed interlaced/non-interlaced content

2013-01-21 Thread Luca Barbato
From: Michael Smith msm...@rdio.com

Set interlaced to false if we don't have an interlaced frame
---

I still have to figure out how to produce such file, and why the
picture fields aren't reset. 

See https://bugzilla.libav.org/show_bug.cgi?id=382

 libavcodec/proresdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
index f7e32c9..4b196f6 100644
--- a/libavcodec/proresdec.c
+++ b/libavcodec/proresdec.c
@@ -164,6 +164,8 @@ static int decode_frame_header(ProresContext *ctx, const 
uint8_t *buf,
 if (ctx-frame_type) {  /* if interlaced */
 ctx-picture.interlaced_frame = 1;
 ctx-picture.top_field_first  = ctx-frame_type  1;
+} else {
+ctx-picture.interlaced_frame = 0;
 }
 
 avctx-color_primaries = buf[14];
-- 
1.8.0.2

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


[libav-devel] [PATCH] Move put_no_rnd_pixels_l2 function to new VP35MCDSPContext.

2013-01-21 Thread Ronald S. Bultje
From: Ronald S. Bultje rsbul...@gmail.com

---
 configure |  7 ---
 libavcodec/Makefile   |  1 +
 libavcodec/dsputil.c  |  1 -
 libavcodec/dsputil.h  |  2 --
 libavcodec/dsputil_template.c |  4 
 libavcodec/vp3.c  |  5 -
 libavcodec/vp35mcdsp.c| 43 +++
 libavcodec/vp35mcdsp.h| 43 +++
 libavcodec/vp56.c |  3 ++-
 libavcodec/vp56.h |  2 ++
 10 files changed, 99 insertions(+), 12 deletions(-)
 create mode 100644 libavcodec/vp35mcdsp.c
 create mode 100644 libavcodec/vp35mcdsp.h

diff --git a/configure b/configure
index 144ec2d..fc2be8e 100755
--- a/configure
+++ b/configure
@@ -1333,6 +1333,7 @@ CONFIG_EXTRA=
 sinewin
 videodsp
 vp3dsp
+vp35mcdsp
 
 
 CMDLINE_SELECT=
@@ -1575,9 +1576,9 @@ vc1_decoder_select=h263_decoder h264chroma h264qpel
 vc1image_decoder_select=vc1_decoder
 vorbis_decoder_select=mdct
 vorbis_encoder_select=mdct
-vp3_decoder_select=vp3dsp videodsp
-vp5_decoder_select=vp3dsp videodsp
-vp6_decoder_select=huffman vp3dsp videodsp
+vp3_decoder_select=vp3dsp vp35mcdsp videodsp
+vp5_decoder_select=vp3dsp vp35mcdsp videodsp
+vp6_decoder_select=huffman vp3dsp vp35mcdsp videodsp
 vp6a_decoder_select=vp6_decoder
 vp6f_decoder_select=vp6_decoder
 vp8_decoder_select=h264pred videodsp
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 3f8f280..d49af79 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -68,6 +68,7 @@ OBJS-$(CONFIG_VAAPI)   += vaapi.o
 OBJS-$(CONFIG_VDPAU)   += vdpau.o
 OBJS-$(CONFIG_VIDEODSP)+= videodsp.o
 OBJS-$(CONFIG_VP3DSP)  += vp3dsp.o
+OBJS-$(CONFIG_VP35MCDSP)   += vp35mcdsp.o
 
 # decoders/encoders/hardware accelerators
 OBJS-$(CONFIG_A64MULTI_ENCODER)+= a64multienc.o elbg.o
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 32a56df..caf1b07 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2726,7 +2726,6 @@ av_cold void ff_dsputil_init(DSPContext* c, 
AVCodecContext *avctx)
 c-clear_blocks  = FUNCC(clear_blocks ## dct   , depth);\
 c-add_pixels8   = FUNCC(add_pixels8  ## dct   , depth);\
 c-add_pixels4   = FUNCC(add_pixels4  ## dct   , depth);\
-c-put_no_rnd_pixels_l2  = FUNCC(put_no_rnd_pixels8_l2 , depth);\
 \
 c-put_h264_chroma_pixels_tab[0] = FUNCC(put_h264_chroma_mc8   , depth);\
 c-put_h264_chroma_pixels_tab[1] = FUNCC(put_h264_chroma_mc4   , depth);\
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index e6cc1c0..9b88058 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -291,8 +291,6 @@ typedef struct DSPContext {
  */
 op_pixels_func avg_no_rnd_pixels_tab[4][4];
 
-void (*put_no_rnd_pixels_l2)(uint8_t *block/*align 8*/, const uint8_t 
*a/*align 1*/, const uint8_t *b/*align 1*/, int line_size, int h);
-
 /**
  * Thirdpel motion compensation with rounding (a+b+1)1.
  * this is an array[12] of motion compensation functions for the 9 thirdpe
diff --git a/libavcodec/dsputil_template.c b/libavcodec/dsputil_template.c
index b9d5e97..bd5c48b 100644
--- a/libavcodec/dsputil_template.c
+++ b/libavcodec/dsputil_template.c
@@ -582,10 +582,6 @@ PIXOP2(put, op_put)
 #define put_no_rnd_pixels8_c  put_pixels8_c
 #define put_no_rnd_pixels16_c put_pixels16_c
 
-static void FUNCC(put_no_rnd_pixels8_l2)(uint8_t *dst, const uint8_t *a, const 
uint8_t *b, int stride, int h){
-FUNC(put_no_rnd_pixels8_l2)(dst, a, b, stride, stride, stride, h);
-}
-
 #define H264_CHROMA_MC(OPNAME, OP)\
 static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst/*align 8*/, uint8_t 
*_src/*align 1*/, int stride, int h, int x, int y){\
 pixel *dst = (pixel*)_dst;\
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 58db890..35cfd24 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -41,6 +41,7 @@
 #include videodsp.h
 #include vp3data.h
 #include vp3dsp.h
+#include vp35mcdsp.h
 #include xiph.h
 #include thread.h
 
@@ -138,6 +139,7 @@ typedef struct Vp3DecodeContext {
 DSPContext dsp;
 VideoDSPContext vdsp;
 VP3DSPContext vp3dsp;
+VP35MCDSPContext vp35mcdsp;
 DECLARE_ALIGNED(16, DCTELEM, block)[64];
 int flipped_image;
 int last_slice_end;
@@ -1564,7 +1566,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
 motion_source, stride, 8);
 }else{
 int d= (motion_x ^ motion_y)31; // d is 0 if 
motion_x and _y have the same sign, else -1
-s-dsp.put_no_rnd_pixels_l2(
+s-vp35mcdsp.put_no_rnd_pixels_l2(
 output_plane + first_pixel,
 motion_source - d,
 motion_source + stride + 1 + d,
@@ 

Re: [libav-devel] [PATCH] Move put_no_rnd_pixels_l2 function to new VP35MCDSPContext.

2013-01-21 Thread Luca Barbato
On 21/01/13 19:45, Ronald S. Bultje wrote:
 From: Ronald S. Bultje rsbul...@gmail.com
 

Change the subject to match our guidelines.

lavc: Move put_no_rnd_pixels_l2 function to new VP35MCDSPContext

Why the MC btw, I doubt there is a need to split _so_ much than we have
MC and non-mc functions in different contexts.

 ---
  configure |  7 ---
  libavcodec/Makefile   |  1 +
  libavcodec/dsputil.c  |  1 -
  libavcodec/dsputil.h  |  2 --
  libavcodec/dsputil_template.c |  4 
  libavcodec/vp3.c  |  5 -
  libavcodec/vp35mcdsp.c| 43 
 +++
  libavcodec/vp35mcdsp.h| 43 
 +++
  libavcodec/vp56.c |  3 ++-
  libavcodec/vp56.h |  2 ++
  10 files changed, 99 insertions(+), 12 deletions(-)
  create mode 100644 libavcodec/vp35mcdsp.c
  create mode 100644 libavcodec/vp35mcdsp.h
 

I'll test it in a bit.

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


Re: [libav-devel] [PATCH] Move put_no_rnd_pixels_l2 function to new VP35MCDSPContext.

2013-01-21 Thread Ronald S. Bultje
Hi,

On Mon, Jan 21, 2013 at 10:53 AM, Luca Barbato lu_z...@gentoo.org wrote:
 On 21/01/13 19:45, Ronald S. Bultje wrote:
 From: Ronald S. Bultje rsbul...@gmail.com


 Change the subject to match our guidelines.

 lavc: Move put_no_rnd_pixels_l2 function to new VP35MCDSPContext

 Why the MC btw, I doubt there is a need to split _so_ much than we have
 MC and non-mc functions in different contexts.

Hm, I just realized VP3DSPContext is already shared between vp3 and
vp56, so I'll merge it back in there, sorry for that.

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


Re: [libav-devel] [PATCH] Move put_no_rnd_pixels_l2 function to new VP35MCDSPContext.

2013-01-21 Thread Diego Biurrun
On Mon, Jan 21, 2013 at 10:45:44AM -0800, Ronald S. Bultje wrote:
 From: Ronald S. Bultje rsbul...@gmail.com
 
 ---
  configure |  7 ---
  libavcodec/Makefile   |  1 +
  libavcodec/dsputil.c  |  1 -
  libavcodec/dsputil.h  |  2 --
  libavcodec/dsputil_template.c |  4 
  libavcodec/vp3.c  |  5 -
  libavcodec/vp35mcdsp.c| 43 
 +++
  libavcodec/vp35mcdsp.h| 43 
 +++
  libavcodec/vp56.c |  3 ++-
  libavcodec/vp56.h |  2 ++
  10 files changed, 99 insertions(+), 12 deletions(-)
  create mode 100644 libavcodec/vp35mcdsp.c
  create mode 100644 libavcodec/vp35mcdsp.h

You don't touch the optimized version below libavcodec/x86/ - why?

 --- /dev/null
 +++ b/libavcodec/vp35mcdsp.h
 @@ -0,0 +1,43 @@
 +
 +#ifndef AVCODEC_VP35MCDSP_H
 +#define AVCODEC_VP35MCDSP_H
 +
 +#include stddef.h
 +
 +typedef struct VP35MCDSPContext {
 +void (*put_no_rnd_pixels_l2)(uint8_t *dst,
 + const uint8_t *a,
 + const uint8_t *b,
 + ptrdiff_t stride, int h);

Add stdint.h for the POSIX int types, I suspect this will fail
make checkheaders otherwise.

 --- a/libavcodec/vp56.c
 +++ b/libavcodec/vp56.c
 @@ -373,7 +373,7 @@ static void vp56_mc(VP56Context *s, int b, int plane, 
 uint8_t *src,
  s-filter(s, dst, src_block, src_offset, 
 src_offset+overlap_offset,
stride, s-mv[b], mask, s-filter_selection, b4);
  else
 -s-dsp.put_no_rnd_pixels_l2(dst, src_block+src_offset,
 +s-vp35mcdsp.put_no_rnd_pixels_l2(dst, src_block+src_offset,
  src_block+src_offset+overlap_offset,
  stride, 8);

Please fix the indentation.

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


[libav-devel] [PATCH] Move put_no_rnd_pixels_l2 function to VP3DSPContext.

2013-01-21 Thread Ronald S. Bultje
From: Ronald S. Bultje rsbul...@gmail.com

The function is only used in VP3 and VP5, so no need to have it in
DSPContext.
---
 libavcodec/dsputil.c  |  1 -
 libavcodec/dsputil.h  |  2 --
 libavcodec/dsputil_template.c |  4 
 libavcodec/vp3.c  |  2 +-
 libavcodec/vp3dsp.c   | 19 +++
 libavcodec/vp3dsp.h   | 15 +++
 libavcodec/vp56.c |  2 +-
 7 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 32a56df..caf1b07 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2726,7 +2726,6 @@ av_cold void ff_dsputil_init(DSPContext* c, 
AVCodecContext *avctx)
 c-clear_blocks  = FUNCC(clear_blocks ## dct   , depth);\
 c-add_pixels8   = FUNCC(add_pixels8  ## dct   , depth);\
 c-add_pixels4   = FUNCC(add_pixels4  ## dct   , depth);\
-c-put_no_rnd_pixels_l2  = FUNCC(put_no_rnd_pixels8_l2 , depth);\
 \
 c-put_h264_chroma_pixels_tab[0] = FUNCC(put_h264_chroma_mc8   , depth);\
 c-put_h264_chroma_pixels_tab[1] = FUNCC(put_h264_chroma_mc4   , depth);\
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index e6cc1c0..9b88058 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -291,8 +291,6 @@ typedef struct DSPContext {
  */
 op_pixels_func avg_no_rnd_pixels_tab[4][4];
 
-void (*put_no_rnd_pixels_l2)(uint8_t *block/*align 8*/, const uint8_t 
*a/*align 1*/, const uint8_t *b/*align 1*/, int line_size, int h);
-
 /**
  * Thirdpel motion compensation with rounding (a+b+1)1.
  * this is an array[12] of motion compensation functions for the 9 thirdpe
diff --git a/libavcodec/dsputil_template.c b/libavcodec/dsputil_template.c
index b9d5e97..bd5c48b 100644
--- a/libavcodec/dsputil_template.c
+++ b/libavcodec/dsputil_template.c
@@ -582,10 +582,6 @@ PIXOP2(put, op_put)
 #define put_no_rnd_pixels8_c  put_pixels8_c
 #define put_no_rnd_pixels16_c put_pixels16_c
 
-static void FUNCC(put_no_rnd_pixels8_l2)(uint8_t *dst, const uint8_t *a, const 
uint8_t *b, int stride, int h){
-FUNC(put_no_rnd_pixels8_l2)(dst, a, b, stride, stride, stride, h);
-}
-
 #define H264_CHROMA_MC(OPNAME, OP)\
 static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst/*align 8*/, uint8_t 
*_src/*align 1*/, int stride, int h, int x, int y){\
 pixel *dst = (pixel*)_dst;\
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 58db890..33cfc8c 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1564,7 +1564,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
 motion_source, stride, 8);
 }else{
 int d= (motion_x ^ motion_y)31; // d is 0 if 
motion_x and _y have the same sign, else -1
-s-dsp.put_no_rnd_pixels_l2(
+s-vp3dsp.put_no_rnd_pixels_l2(
 output_plane + first_pixel,
 motion_source - d,
 motion_source + stride + 1 + d,
diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c
index 9e6209d..1883099 100644
--- a/libavcodec/vp3dsp.c
+++ b/libavcodec/vp3dsp.c
@@ -274,8 +274,27 @@ static void vp3_h_loop_filter_c(uint8_t *first_pixel, int 
stride,
 }
 }
 
+static void put_no_rnd_pixels_l2(uint8_t *dst, const uint8_t *src1,
+ const uint8_t *src2, ptrdiff_t stride, int h)
+{
+int i;
+
+for (i = 0; i  h; i++) {
+uint32_t a, b;
+
+a = AV_RN32A(src1[i * stride]);
+b = AV_RN32A(src2[i * stride]);
+AV_WN32A(dst[i * stride], no_rnd_avg32(a, b));
+a = AV_RN32A(src1[i * stride + 4]);
+b = AV_RN32A(src2[i * stride + 4]);
+AV_WN32A(dst[i * stride + 4], no_rnd_avg32(a, b));
+}
+}
+
 av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags)
 {
+c-put_no_rnd_pixels_l2 = put_no_rnd_pixels_l2;
+
 c-idct_put  = vp3_idct_put_c;
 c-idct_add  = vp3_idct_add_c;
 c-idct_dc_add   = vp3_idct_dc_add_c;
diff --git a/libavcodec/vp3dsp.h b/libavcodec/vp3dsp.h
index feb3000..3e53f0a 100644
--- a/libavcodec/vp3dsp.h
+++ b/libavcodec/vp3dsp.h
@@ -23,6 +23,21 @@
 #include dsputil.h
 
 typedef struct VP3DSPContext {
+/**
+ * Copy 8xH pixels from source to destination buffer using a bilinear
+ * filter with no rounding (i.e. *dst = (*a + *b)  1).
+ *
+ * @param dst destination buffer, aligned by 8
+ * @param a first source buffer, no alignment
+ * @param b second source buffer, no alignment
+ * @param stride distance between two lines in source/dest buffers
+ * @param h height
+ */
+void (*put_no_rnd_pixels_l2)(uint8_t *dst,
+ const uint8_t *a,
+ const uint8_t *b,
+ ptrdiff_t stride, int h);
+
 void 

[libav-devel] [PATCH] vp3/5: move put_no_rnd_pixels_l2 from dsputil to VP3DSPContext.

2013-01-21 Thread Ronald S. Bultje
From: Ronald S. Bultje rsbul...@gmail.com

The function is only used in VP3 and VP5, so no need to have it in
DSPContext.
---
 libavcodec/dsputil.c  |  1 -
 libavcodec/dsputil.h  |  2 --
 libavcodec/dsputil_template.c |  4 
 libavcodec/vp3.c  |  2 +-
 libavcodec/vp3dsp.c   | 19 +++
 libavcodec/vp3dsp.h   | 16 
 libavcodec/vp56.c |  6 +++---
 7 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 32a56df..caf1b07 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2726,7 +2726,6 @@ av_cold void ff_dsputil_init(DSPContext* c, 
AVCodecContext *avctx)
 c-clear_blocks  = FUNCC(clear_blocks ## dct   , depth);\
 c-add_pixels8   = FUNCC(add_pixels8  ## dct   , depth);\
 c-add_pixels4   = FUNCC(add_pixels4  ## dct   , depth);\
-c-put_no_rnd_pixels_l2  = FUNCC(put_no_rnd_pixels8_l2 , depth);\
 \
 c-put_h264_chroma_pixels_tab[0] = FUNCC(put_h264_chroma_mc8   , depth);\
 c-put_h264_chroma_pixels_tab[1] = FUNCC(put_h264_chroma_mc4   , depth);\
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index e6cc1c0..9b88058 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -291,8 +291,6 @@ typedef struct DSPContext {
  */
 op_pixels_func avg_no_rnd_pixels_tab[4][4];
 
-void (*put_no_rnd_pixels_l2)(uint8_t *block/*align 8*/, const uint8_t 
*a/*align 1*/, const uint8_t *b/*align 1*/, int line_size, int h);
-
 /**
  * Thirdpel motion compensation with rounding (a+b+1)1.
  * this is an array[12] of motion compensation functions for the 9 thirdpe
diff --git a/libavcodec/dsputil_template.c b/libavcodec/dsputil_template.c
index b9d5e97..bd5c48b 100644
--- a/libavcodec/dsputil_template.c
+++ b/libavcodec/dsputil_template.c
@@ -582,10 +582,6 @@ PIXOP2(put, op_put)
 #define put_no_rnd_pixels8_c  put_pixels8_c
 #define put_no_rnd_pixels16_c put_pixels16_c
 
-static void FUNCC(put_no_rnd_pixels8_l2)(uint8_t *dst, const uint8_t *a, const 
uint8_t *b, int stride, int h){
-FUNC(put_no_rnd_pixels8_l2)(dst, a, b, stride, stride, stride, h);
-}
-
 #define H264_CHROMA_MC(OPNAME, OP)\
 static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst/*align 8*/, uint8_t 
*_src/*align 1*/, int stride, int h, int x, int y){\
 pixel *dst = (pixel*)_dst;\
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 58db890..33cfc8c 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1564,7 +1564,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
 motion_source, stride, 8);
 }else{
 int d= (motion_x ^ motion_y)31; // d is 0 if 
motion_x and _y have the same sign, else -1
-s-dsp.put_no_rnd_pixels_l2(
+s-vp3dsp.put_no_rnd_pixels_l2(
 output_plane + first_pixel,
 motion_source - d,
 motion_source + stride + 1 + d,
diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c
index 9e6209d..1883099 100644
--- a/libavcodec/vp3dsp.c
+++ b/libavcodec/vp3dsp.c
@@ -274,8 +274,27 @@ static void vp3_h_loop_filter_c(uint8_t *first_pixel, int 
stride,
 }
 }
 
+static void put_no_rnd_pixels_l2(uint8_t *dst, const uint8_t *src1,
+ const uint8_t *src2, ptrdiff_t stride, int h)
+{
+int i;
+
+for (i = 0; i  h; i++) {
+uint32_t a, b;
+
+a = AV_RN32A(src1[i * stride]);
+b = AV_RN32A(src2[i * stride]);
+AV_WN32A(dst[i * stride], no_rnd_avg32(a, b));
+a = AV_RN32A(src1[i * stride + 4]);
+b = AV_RN32A(src2[i * stride + 4]);
+AV_WN32A(dst[i * stride + 4], no_rnd_avg32(a, b));
+}
+}
+
 av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags)
 {
+c-put_no_rnd_pixels_l2 = put_no_rnd_pixels_l2;
+
 c-idct_put  = vp3_idct_put_c;
 c-idct_add  = vp3_idct_add_c;
 c-idct_dc_add   = vp3_idct_dc_add_c;
diff --git a/libavcodec/vp3dsp.h b/libavcodec/vp3dsp.h
index feb3000..d28c847 100644
--- a/libavcodec/vp3dsp.h
+++ b/libavcodec/vp3dsp.h
@@ -19,10 +19,26 @@
 #ifndef AVCODEC_VP3DSP_H
 #define AVCODEC_VP3DSP_H
 
+#include stddef.h
 #include stdint.h
 #include dsputil.h
 
 typedef struct VP3DSPContext {
+/**
+ * Copy 8xH pixels from source to destination buffer using a bilinear
+ * filter with no rounding (i.e. *dst = (*a + *b)  1).
+ *
+ * @param dst destination buffer, aligned by 8
+ * @param a first source buffer, no alignment
+ * @param b second source buffer, no alignment
+ * @param stride distance between two lines in source/dest buffers
+ * @param h height
+ */
+void (*put_no_rnd_pixels_l2)(uint8_t *dst,
+ const uint8_t *a,
+ const 

Re: [libav-devel] [PATCH] Move put_no_rnd_pixels_l2 function to new VP35MCDSPContext.

2013-01-21 Thread Ronald S. Bultje
Hi,

On Mon, Jan 21, 2013 at 10:58 AM, Diego Biurrun di...@biurrun.de wrote:
 On Mon, Jan 21, 2013 at 10:45:44AM -0800, Ronald S. Bultje wrote:
 From: Ronald S. Bultje rsbul...@gmail.com

 ---
  configure |  7 ---
  libavcodec/Makefile   |  1 +
  libavcodec/dsputil.c  |  1 -
  libavcodec/dsputil.h  |  2 --
  libavcodec/dsputil_template.c |  4 
  libavcodec/vp3.c  |  5 -
  libavcodec/vp35mcdsp.c| 43 
 +++
  libavcodec/vp35mcdsp.h| 43 
 +++
  libavcodec/vp56.c |  3 ++-
  libavcodec/vp56.h |  2 ++
  10 files changed, 99 insertions(+), 12 deletions(-)
  create mode 100644 libavcodec/vp35mcdsp.c
  create mode 100644 libavcodec/vp35mcdsp.h

 You don't touch the optimized version below libavcodec/x86/ - why?

Which one? I don't see any.

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


Re: [libav-devel] [PATCH] proresdec: support mixed interlaced/non-interlaced content

2013-01-21 Thread Kostya Shishkov
On Mon, Jan 21, 2013 at 07:40:35PM +0100, Luca Barbato wrote:
 From: Michael Smith msm...@rdio.com
 
 Set interlaced to false if we don't have an interlaced frame
 ---
 
 I still have to figure out how to produce such file, and why the
 picture fields aren't reset. 

By mixing two different files or flipping bits at random, I suppose.

 See https://bugzilla.libav.org/show_bug.cgi?id=382
 
  libavcodec/proresdec.c | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
 index f7e32c9..4b196f6 100644
 --- a/libavcodec/proresdec.c
 +++ b/libavcodec/proresdec.c
 @@ -164,6 +164,8 @@ static int decode_frame_header(ProresContext *ctx, const 
 uint8_t *buf,
  if (ctx-frame_type) {  /* if interlaced */
  ctx-picture.interlaced_frame = 1;
  ctx-picture.top_field_first  = ctx-frame_type  1;
 +} else {
 +ctx-picture.interlaced_frame = 0;
  }
  
  avctx-color_primaries = buf[14];
 -- 

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


[libav-devel] [PATCH] x86: ac3: Fix HAVE_MMXEXT condition to only refer to external assembly

2013-01-21 Thread Diego Biurrun
CC: libav-sta...@libav.org
---
 libavcodec/x86/ac3dsp.asm |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
index ef59db2..b4986ad 100644
--- a/libavcodec/x86/ac3dsp.asm
+++ b/libavcodec/x86/ac3dsp.asm
@@ -66,7 +66,7 @@ cglobal ac3_exponent_min, 3, 4, 2, exp, reuse_blks, expn, 
offset
 %define LOOP_ALIGN
 INIT_MMX mmx
 AC3_EXPONENT_MIN
-%if HAVE_MMXEXT
+%if HAVE_MMXEXT_EXTERNAL
 %define LOOP_ALIGN ALIGN 16
 INIT_MMX mmxext
 AC3_EXPONENT_MIN
-- 
1.7.1

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


[libav-devel] [PATCH] dirac: dwt and dsp extra functions

2013-01-21 Thread Jordi Ortiz
---
This amendment introduces VideoDSPContext into DiracDSPContext.
 libavcodec/dirac_dwt.c | 608 +
 libavcodec/dirac_dwt.h | 132 +++
 libavcodec/diracdsp.c  | 313 +
 libavcodec/diracdsp.h  |  98 
 4 files changed, 1151 insertions(+)
 create mode 100644 libavcodec/dirac_dwt.c
 create mode 100644 libavcodec/dirac_dwt.h
 create mode 100644 libavcodec/diracdsp.c
 create mode 100644 libavcodec/diracdsp.h

diff --git a/libavcodec/dirac_dwt.c b/libavcodec/dirac_dwt.c
new file mode 100644
index 000..1ff5460
--- /dev/null
+++ b/libavcodec/dirac_dwt.c
@@ -0,0 +1,608 @@
+/*
+ * Copyright (C) 2009 David Conrad
+ * Copyright (C) 2012 Jordi Ortiz
+ *
+ * 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 libavutil/attributes.h
+#include libavutil/common.h
+#include avcodec.h
+#include dirac_dwt.h
+
+static inline int mirror(int v, int m)
+{
+while ((unsigned)v  (unsigned)m) {
+v = -v;
+if (v  0)
+v += 2 * m;
+}
+return v;
+}
+
+static av_always_inline void interleave(IDWTELEM *dst, IDWTELEM *src0,
+IDWTELEM *src1, int w2, int add,
+int shift)
+{
+int i;
+for (i = 0; i  w2; i++) {
+dst[2 * i] = src0[i] + add  shift;
+dst[2 * i + 1] = src1[i] + add  shift;
+}
+}
+
+static void vertical_compose53iL0(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2,
+  int width)
+{
+int i;
+
+for (i = 0; i  width; i++)
+b1[i] -= (b0[i] + b2[i] + 2)  2;
+}
+
+static void horizontal_compose_dirac53i(IDWTELEM *b, IDWTELEM *temp, int w)
+{
+const int w2 = w  1;
+int x;
+
+temp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]);
+for (x = 1; x  w2; x++) {
+temp[x]  = COMPOSE_53iL0(b[x + w2 - 1], b[x], b[x + w2]);
+temp[x + w2 - 1] = COMPOSE_DIRAC53iH0(temp[x - 1], b[x + w2 - 1],
+  temp[x]);
+}
+temp[w - 1] = COMPOSE_DIRAC53iH0(temp[w2 - 1], b[w - 1], temp[w2 - 1]);
+
+interleave(b, temp, temp + w2, w2, 1, 1);
+}
+
+static void horizontal_compose_dd97i(IDWTELEM *b, IDWTELEM *tmp, int w)
+{
+const int w2 = w  1;
+int x;
+
+tmp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]);
+for (x = 1; x  w2; x++)
+tmp[x] = COMPOSE_53iL0(b[x + w2 - 1], b[x], b[x + w2]);
+
+// extend the edges
+tmp[-1] = tmp[0];
+tmp[w2 + 1] = tmp[w2] = tmp[w2 - 1];
+
+for (x = 0; x  w2; x++) {
+b[2 * x] = tmp[x] + 1  1;
+b[2 * x + 1] = COMPOSE_DD97iH0(tmp[x - 1], tmp[x], b[x + w2],
+   tmp[x + 1], tmp[x + 2]) + 1  1;
+}
+}
+
+static void horizontal_compose_dd137i(IDWTELEM *b, IDWTELEM *tmp, int w)
+{
+const int w2 = w  1;
+int x;
+
+tmp[0] = COMPOSE_DD137iL0(b[w2], b[w2], b[0], b[w2], b[w2 + 1]);
+tmp[1] = COMPOSE_DD137iL0(b[w2], b[w2], b[1], b[w2 + 1], b[w2 + 2]);
+for (x = 2; x  w2 - 1; x++)
+tmp[x] = COMPOSE_DD137iL0(b[x + w2 - 2], b[x + w2 - 1], b[x], b[x + 
w2],
+  b[x + w2 + 1]);
+tmp[w2 - 1] = COMPOSE_DD137iL0(b[w - 3], b[w - 2], b[w2 - 1], b[w - 1],
+   b[w - 1]);
+
+// extend the edges
+tmp[-1] = tmp[0];
+tmp[w2 + 1] = tmp[w2] = tmp[w2 - 1];
+
+for (x = 0; x  w2; x++) {
+b[2 * x] = tmp[x] + 1  1;
+b[2 * x + 1] = COMPOSE_DD97iH0(tmp[x - 1], tmp[x], b[x + w2],
+   tmp[x + 1], tmp[x + 2]) + 1  1;
+}
+}
+
+static av_always_inline void horizontal_compose_haari(IDWTELEM *b,
+  IDWTELEM *temp, int w,
+  int shift)
+{
+const int w2 = w  1;
+int x;
+
+for (x = 0; x  w2; x++) {
+temp[x]  = COMPOSE_HAARiL0(b[x], b[x + w2]);
+temp[x + w2] = COMPOSE_HAARiH0(b[x + w2], temp[x]);
+}
+
+interleave(b, temp, temp + w2, w2, shift, shift);
+}
+
+static void horizontal_compose_haar0i(IDWTELEM *b, IDWTELEM *temp, int w)
+{
+horizontal_compose_haari(b, temp, w, 0);
+}
+
+static void 

[libav-devel] [PATCH] bfin: vp3: Separate VP3 initialization code

2013-01-21 Thread Luca Barbato
From: Diego Biurrun di...@biurrun.de

---

This one builds, I have yet to patch qemu to run it though...

 libavcodec/bfin/Makefile   |  4 ++--
 libavcodec/bfin/dsputil_bfin.c |  8 +---
 libavcodec/bfin/vp3_bfin.c | 14 ++
 libavcodec/vp3dsp.c|  2 ++
 libavcodec/vp3dsp.h|  1 +
 5 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/libavcodec/bfin/Makefile b/libavcodec/bfin/Makefile
index be81e6c..d1b41bc 100644
--- a/libavcodec/bfin/Makefile
+++ b/libavcodec/bfin/Makefile
@@ -2,7 +2,7 @@ OBJS += bfin/dsputil_bfin.o 
\
 bfin/fdct_bfin.o\
 bfin/idct_bfin.o\
 bfin/pixels_bfin.o  \
-bfin/vp3_bfin.o \
-bfin/vp3_idct_bfin.o\
 
 OBJS-$(CONFIG_MPEGVIDEOENC) += bfin/mpegvideo_bfin.o
+OBJS-$(CONFIG_VP3DSP)   += bfin/vp3_bfin.o  \
+   bfin/vp3_idct_bfin.o
diff --git a/libavcodec/bfin/dsputil_bfin.c b/libavcodec/bfin/dsputil_bfin.c
index 52860c6..699f78a 100644
--- a/libavcodec/bfin/dsputil_bfin.c
+++ b/libavcodec/bfin/dsputil_bfin.c
@@ -257,13 +257,7 @@ void ff_dsputil_init_bfin( DSPContext* c, AVCodecContext 
*avctx )
 if (avctx-dct_algo == FF_DCT_AUTO)
 c-fdct  = ff_bfin_fdct;
 
-// FIXME convert to VP3DSPContext
-if (0) { // avctx-idct_algo == FF_IDCT_VP3) {
-c-idct_permutation_type = FF_NO_IDCT_PERM;
-c-idct  = ff_bfin_vp3_idct;
-c-idct_add  = ff_bfin_vp3_idct_add;
-c-idct_put  = ff_bfin_vp3_idct_put;
-} else if (avctx-idct_algo == FF_IDCT_AUTO) {
+if (avctx-idct_algo == FF_IDCT_AUTO) {
 c-idct_permutation_type = FF_NO_IDCT_PERM;
 c-idct  = ff_bfin_idct;
 c-idct_add  = bfin_idct_add;
diff --git a/libavcodec/bfin/vp3_bfin.c b/libavcodec/bfin/vp3_bfin.c
index bec25a0..d7eecd3 100644
--- a/libavcodec/bfin/vp3_bfin.c
+++ b/libavcodec/bfin/vp3_bfin.c
@@ -19,11 +19,11 @@
  */
 
 #include libavcodec/avcodec.h
-#include libavcodec/dsputil.h
-#include dsputil_bfin.h
+#include libavcodec/vp3dsp.h
+#include vp3_bfin.h
 
 /* Intra iDCT offset 128 */
-void ff_bfin_vp3_idct_put (uint8_t *dest, int line_size, DCTELEM *block)
+void ff_bfin_vp3_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
 {
 uint8_t *cm = ff_cropTbl + MAX_NEG_CROP + 128;
 int i,j;
@@ -36,8 +36,14 @@ void ff_bfin_vp3_idct_put (uint8_t *dest, int line_size, 
DCTELEM *block)
 }
 
 /* Inter iDCT */
-void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, DCTELEM *block)
+void ff_bfin_vp3_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
 {
 ff_bfin_vp3_idct (block);
 ff_bfin_add_pixels_clamped (block, dest, line_size);
 }
+
+void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags)
+{
+c-idct_add  = ff_bfin_vp3_idct_add;
+c-idct_put  = ff_bfin_vp3_idct_put;
+}
diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c
index 9e6209d..f29dc2c 100644
--- a/libavcodec/vp3dsp.c
+++ b/libavcodec/vp3dsp.c
@@ -286,6 +286,8 @@ av_cold void ff_vp3dsp_init(VP3DSPContext *c, int flags)
 
 if (ARCH_ARM)
 ff_vp3dsp_init_arm(c, flags);
+if (ARCH_BFIN)
+ff_vp3dsp_init_bfin(c, flags);
 if (ARCH_PPC)
 ff_vp3dsp_init_ppc(c, flags);
 if (ARCH_X86)
diff --git a/libavcodec/vp3dsp.h b/libavcodec/vp3dsp.h
index feb3000..2e2f9e3 100644
--- a/libavcodec/vp3dsp.h
+++ b/libavcodec/vp3dsp.h
@@ -34,6 +34,7 @@ typedef struct VP3DSPContext {
 
 void ff_vp3dsp_init(VP3DSPContext *c, int flags);
 void ff_vp3dsp_init_arm(VP3DSPContext *c, int flags);
+void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags);
 void ff_vp3dsp_init_ppc(VP3DSPContext *c, int flags);
 void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags);
 
-- 
1.8.0.2

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


Re: [libav-devel] [PATCH] Move put_no_rnd_pixels_l2 function to new VP35MCDSPContext.

2013-01-21 Thread Diego Biurrun
On Mon, Jan 21, 2013 at 11:04:25AM -0800, Ronald S. Bultje wrote:
 On Mon, Jan 21, 2013 at 10:58 AM, Diego Biurrun di...@biurrun.de wrote:
  On Mon, Jan 21, 2013 at 10:45:44AM -0800, Ronald S. Bultje wrote:
  From: Ronald S. Bultje rsbul...@gmail.com
 
  ---
   configure |  7 ---
   libavcodec/Makefile   |  1 +
   libavcodec/dsputil.c  |  1 -
   libavcodec/dsputil.h  |  2 --
   libavcodec/dsputil_template.c |  4 
   libavcodec/vp3.c  |  5 -
   libavcodec/vp35mcdsp.c| 43 
  +++
   libavcodec/vp35mcdsp.h| 43 
  +++
   libavcodec/vp56.c |  3 ++-
   libavcodec/vp56.h |  2 ++
   10 files changed, 99 insertions(+), 12 deletions(-)
   create mode 100644 libavcodec/vp35mcdsp.c
   create mode 100644 libavcodec/vp35mcdsp.h
 
  You don't touch the optimized version below libavcodec/x86/ - why?
 
 Which one? I don't see any.

put_no_rnd_pixels8_l2 in libavcodec/x86/dsputil_avg_template.c

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


Re: [libav-devel] [PATCH] bfin: vp3: Separate VP3 initialization code

2013-01-21 Thread Luca Barbato
On 21/01/13 20:38, Luca Barbato wrote:
 +void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags)
 +{
 +c-idct_add  = ff_bfin_vp3_idct_add;
 +c-idct_put  = ff_bfin_vp3_idct_put;

c-idct missing.

qemu-user is not really working for us sadly =\

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


Re: [libav-devel] [PATCH] x86: ac3: Fix HAVE_MMXEXT condition to only refer to external assembly

2013-01-21 Thread Justin Ruggles
On 01/21/2013 02:21 PM, Diego Biurrun wrote:
 CC: libav-sta...@libav.org
 ---
  libavcodec/x86/ac3dsp.asm |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
 index ef59db2..b4986ad 100644
 --- a/libavcodec/x86/ac3dsp.asm
 +++ b/libavcodec/x86/ac3dsp.asm
 @@ -66,7 +66,7 @@ cglobal ac3_exponent_min, 3, 4, 2, exp, reuse_blks, expn, 
 offset
  %define LOOP_ALIGN
  INIT_MMX mmx
  AC3_EXPONENT_MIN
 -%if HAVE_MMXEXT
 +%if HAVE_MMXEXT_EXTERNAL
  %define LOOP_ALIGN ALIGN 16
  INIT_MMX mmxext
  AC3_EXPONENT_MIN

LGTM

-Justin

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


Re: [libav-devel] [PATCH] dirac: dwt and dsp extra functions

2013-01-21 Thread Diego Biurrun
On Mon, Jan 21, 2013 at 08:20:57PM +0100, Jordi Ortiz wrote:
 --- /dev/null
 +++ b/libavcodec/dirac_dwt.c
 @@ -0,0 +1,608 @@
 +static void spatial_compose_daub97i_dy(DiracDWTContext *d, int level,
 +   unsigned width, unsigned height,
 +   int stride)
 +{
 +DiracDWTCompose *cs = d-cs + level;
 +int i, y= cs-y;
 +IDWTELEM *b[6];
 +
 +for (i = 0; i  4; i++)
 +b[i] = cs-b[i];
 +b[4] = d-buffer + mirror(y + 3, height - 1) * stride;
 +b[5] = d-buffer + mirror(y + 4, height - 1) * stride;
 +
 +if (y + 3  (unsigned)height)
 +d-vertical_compose_l1(b[3], b[4], b[5], width);
 +if (y + 2  (unsigned)height)
 +d-vertical_compose_h1(b[2], b[3], b[4], width);
 +if (y + 1  (unsigned)height)
 +d-vertical_compose_l0_3tap(b[1], b[2], b[3], width);
 +if (y + 0  (unsigned)height)
 +d-vertical_compose_h0_3tap(b[0], b[1], b[2], width);
 +
 +if (y - 1  (unsigned)height)
 +d-horizontal_compose(b[0], d-temp, width);
 +if (y + 0  (unsigned)height)
 +d-horizontal_compose(b[1], d-temp, width);

You cast the unsigned height variable to ... unsigned ...

 --- /dev/null
 +++ b/libavcodec/dirac_dwt.h
 @@ -0,0 +1,132 @@
 +
 +#ifndef AVCODEC_DIRAC_DWT_H
 +#define AVCODEC_DIRAC_DWT_H
 +
 +#include stdint.h
 +
 +typedef int   DWTELEM;
 +typedef short IDWTELEM;

If this needs a fixed size, then the POSIX int types would be safer.

 --- /dev/null
 +++ b/libavcodec/diracdsp.c
 @@ -0,0 +1,313 @@
 +
 +void ff_diracdsp_init(DiracDSPContext *c, AVCodecContext *avctx)
 +{
 +ff_dsputil_init(c-dsp, avctx);

What do you need this for, we're trying to drop dsputil dependencies.

 +// checkme: bitdepth set to 8 but could bitdepth be variable?
 +ff_videodsp_init(c-videodsp, 8);

Is avctx-bits_per_raw_sample set?  Then you could use that value.

 +c-dirac_hpel_filter   = dirac_hpel_filter;
 +c-add_rect_clamped= add_rect_clamped_c;
 +c-put_signed_rect_clamped = put_signed_rect_clamped_c;
 +
 +c-add_dirac_obmc[0] = add_obmc8_c;
 +c-add_dirac_obmc[1] = add_obmc16_c;
 +c-add_dirac_obmc[2] = add_obmc32_c;
 +
 +c-weight_dirac_pixels_tab[0] = weight_dirac_pixels8_c;
 +c-weight_dirac_pixels_tab[1] = weight_dirac_pixels16_c;
 +c-weight_dirac_pixels_tab[2] = weight_dirac_pixels32_c;
 +
 +c-biweight_dirac_pixels_tab[0] = biweight_dirac_pixels8_c;
 +c-biweight_dirac_pixels_tab[1] = biweight_dirac_pixels16_c;
 +c-biweight_dirac_pixels_tab[2] = biweight_dirac_pixels32_c;

nit: Align all of this.

 --- /dev/null
 +++ b/libavcodec/diracdsp.h
 @@ -0,0 +1,98 @@
 +
 +#ifndef AVCODEC_DIRACDSP_H
 +#define AVCODEC_DIRACDSP_H
 +
 +#include stdint.h
 +
 +#include dsputil.h
 +#include videodsp.h
 +
 +typedef struct DiracDSPContext {
 +
 +dirac_weight_func weight_dirac_pixels_tab[3];
 +dirac_biweight_func biweight_dirac_pixels_tab[3];
 +DSPContext dsp;
 +VideoDSPContext videodsp;
 +} DiracDSPContext;

What do you need the DSPContext for?  Can it be dropped?

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


Re: [libav-devel] [PATCH] bfin: vp3: Separate VP3 initialization code

2013-01-21 Thread Luca Barbato
On 21/01/13 22:13, Luca Barbato wrote:
 On 21/01/13 20:38, Luca Barbato wrote:
 +void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags)
 +{
 +c-idct_add  = ff_bfin_vp3_idct_add;
 +c-idct_put  = ff_bfin_vp3_idct_put;
 
 c-idct missing.
 

Actually the idct_dc_add not sure if we can safely mix and match them,
probably we can.

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


Re: [libav-devel] [PATCH] Move put_no_rnd_pixels_l2 function to new VP35MCDSPContext.

2013-01-21 Thread Ronald S. Bultje
Hi,

On Jan 21, 2013 11:59 AM, Diego Biurrun di...@biurrun.de wrote:

 On Mon, Jan 21, 2013 at 11:04:25AM -0800, Ronald S. Bultje wrote:
  On Mon, Jan 21, 2013 at 10:58 AM, Diego Biurrun di...@biurrun.de
wrote:
   On Mon, Jan 21, 2013 at 10:45:44AM -0800, Ronald S. Bultje wrote:
   From: Ronald S. Bultje rsbul...@gmail.com
  
   ---
configure |  7 ---
libavcodec/Makefile   |  1 +
libavcodec/dsputil.c  |  1 -
libavcodec/dsputil.h  |  2 --
libavcodec/dsputil_template.c |  4 
libavcodec/vp3.c  |  5 -
libavcodec/vp35mcdsp.c| 43
+++
libavcodec/vp35mcdsp.h| 43
+++
libavcodec/vp56.c |  3 ++-
libavcodec/vp56.h |  2 ++
10 files changed, 99 insertions(+), 12 deletions(-)
create mode 100644 libavcodec/vp35mcdsp.c
create mode 100644 libavcodec/vp35mcdsp.h
  
   You don't touch the optimized version below libavcodec/x86/ - why?
 
  Which one? I don't see any.

 put_no_rnd_pixels8_l2 in libavcodec/x86/dsputil_avg_template.c

Where is that assigned?

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

Re: [libav-devel] [PATCH] dirac decoder

2013-01-21 Thread Diego Biurrun
Thanks for getting back to this decoder!

On Mon, Jan 21, 2013 at 08:25:39PM +0100, Jordi Ortiz wrote:
 ---
 Use VideoDSPContext.emulated_edge_mc() instead of ff_emultated_edge_mc_8()
 Use the ff_get_buffer() wrapper.
 
  Changelog|1 +
  configure|1 +
  doc/general.texi |5 +-
  libavcodec/Makefile  |3 +
  libavcodec/allcodecs.c   |1 +
  libavcodec/dirac_arith.c |  115 +++
  libavcodec/dirac_arith.h |  166 
  libavcodec/diracdec.c| 2014 
 ++
  libavcodec/version.h |2 +-
  9 files changed, 2305 insertions(+), 3 deletions(-)
  create mode 100644 libavcodec/dirac_arith.c
  create mode 100644 libavcodec/dirac_arith.h
  create mode 100644 libavcodec/diracdec.c

What is the status of this decoder now?  Does it still produce artifacts?
If yes, for which cases?

 --- a/Changelog
 +++ b/Changelog
 @@ -16,6 +16,7 @@ version 9_beta3:
  - multi-channel ALAC encoding up to 7.1
  - TAK demuxer, parser, and decoder
  - adaptive frame-level multithreading for H.264
 +- Native dirac decoder

native

 --- a/libavcodec/allcodecs.c
 +++ b/libavcodec/allcodecs.c
 @@ -120,6 +120,7 @@ void avcodec_register_all(void)
  REGISTER_DECODER(CSCD,  cscd);
  REGISTER_DECODER(CYUV,  cyuv);
  REGISTER_DECODER(DFA,   dfa);
 +REGISTER_DECODER (DIRAC, dirac);
  REGISTER_ENCDEC (DNXHD, dnxhd);
  REGISTER_ENCDEC (DPX,   dpx);
  REGISTER_DECODER(DSICINVIDEO,   dsicinvideo);

Keep this neatly aligned like the rest.

 --- /dev/null
 +++ b/libavcodec/dirac_arith.h
 @@ -0,0 +1,166 @@
 +
 +#ifndef AVCODEC_DIRAC_ARITH_H
 +#define AVCODEC_DIRAC_ARITH_H
 +
 +#include bytestream.h
 +#include get_bits.h

This does not appear to use anything from get_bits.h.

 --- /dev/null
 +++ b/libavcodec/diracdec.c
 @@ -0,0 +1,2014 @@
 +
 +static void dirac_decode_flush(AVCodecContext *avctx)
 +{
 +DiracContext *s = avctx-priv_data;
 +free_sequence_buffers(s);
 +s-seen_sequence_header = 0;
 +s-frame_number = -1;
 +}
 +
 +static av_cold int dirac_decode_end(AVCodecContext *avctx)
 +{
 +dirac_decode_flush(avctx);
 +return 0;
 +}

Why the indirection?

 +/* [DIRAC_STD] 11.2 Picture prediction data. picture_prediction()
 + * Unpack the motion compensation parameters. */
 +static int dirac_unpack_prediction_parameters(DiracContext *s)
 +{
 +if (FFMAX(s-plane[0].xblen, s-plane[0].yblen)  DIRAC_MAX_BLOCKSIZE) {
 +av_log(s-avctx, AV_LOG_ERROR, Unsupported large block size\n);
 +return AVERROR_PATCHWELCOME;

Is this a candidate for av_log_missing_feature or av_log_patch_welcome?

 +/* [DIRAC_STD] 11.1.1 Picture Header. picture_header() */
 +static int dirac_decode_picture_header(DiracContext *s)
 +{
 +int retire, picnum;
 +int i, j, refnum, refdist, ret, distance;
 +GetBitContext *gb = s-gb;
 +
 +/* [DIRAC_STD] 11.1.1 Picture Header. picture_header() PICTURE_NUM */
 +picnum =
 +s-current_picture-avframe.display_picture_number =
 +get_bits_long(gb, 32);
 +picnum = s-current_picture-avframe.display_picture_number = 
 get_bits_long(gb, 32);

nit:

picnum =
s-current_picture-avframe.display_picture_number = get_bits_long(gb, 32);

 +/* if there were no references at all, allocate one */
 +if (!s-ref_pics[i])
 +for (j = 0; j  DIRAC_MAX_FRAMES; j++)
 +if (!s-all_frames[j].avframe.data[0]) {
 +s-ref_pics[i] = s-all_frames[j];
 +if (ff_get_buffer(s-avctx, s-ref_pics[i]-avframe)  
 0) {
 +av_log(s-avctx, AV_LOG_ERROR,
 +   Unable to allocate new frame\n);
 +return AVERROR_BUG;

Propagate the return value instead.

 +static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf,
 +  int size)
 +{
 +if (ff_get_buffer(avctx, pic-avframe)  0) {
 +av_log(avctx, AV_LOG_ERROR, get_buffer() failed\n);
 +return AVERROR_BUG;

same

Please check if there are more instances of ff_get_buffer that I missed.

 +static int dirac_decode_frame(AVCodecContext *avctx, void *data,
 +  int *data_size, AVPacket *pkt)
 +{
 +DiracContext *s = avctx-priv_data;
 +DiracFrame *picture = data;
 +uint8_t *buf= pkt-data;
 +int buf_size= pkt-size;
 +int i, data_unit_size, ret, buf_idx = 0;
 +
 +/* release unused frames */
 +for (i = 0; i  DIRAC_MAX_FRAMES; i++)
 +if (s-all_frames[i].avframe.data[0]
 + !s-all_frames[i].avframe.reference) {

nit: Move the  to the previous line.

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


Re: [libav-devel] [PATCH] bfin: vp3: Separate VP3 initialization code

2013-01-21 Thread Luca Barbato
On 21/01/13 22:43, Luca Barbato wrote:
 Actually the idct_dc_add not sure if we can safely mix and match them,
 probably we can.

I'd push tomorrow the updated patch, idct_dc_add is compatible from what
I can see.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] dirac: dwt and dsp extra functions

2013-01-21 Thread Jordi Ortiz
On 21/01/13 22:29, Diego Biurrun wrote:
 +void ff_diracdsp_init(DiracDSPContext *c, AVCodecContext *avctx)
 +{
 +ff_dsputil_init(c-dsp, avctx);
 What do you need this for, we're trying to drop dsputil dependencies.
I use some functions that are reachable through dspcontext like
draw_edges as well as the put/get_tpel_pixels_tab_(l2/4)_8 ones. Should
I move them into diracdsp.c?

 +// checkme: bitdepth set to 8 but could bitdepth be variable?
 +ff_videodsp_init(c-videodsp, 8);
 Is avctx-bits_per_raw_sample set?  Then you could use that value.
No it is not set but I can set it in dirac_decode_init() although I'm
not sure if that parameter can change dynamically.
 What do you need the DSPContext for?  Can it be dropped?
If we replicate the mentioned functions or they are moved to other place
reachable from diracdec.c and diracdsp.c, then we can drop it.


-- 
Jordi Ortiz
nenjo...@gmail.com
http://www.jordiortiz.es

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


Re: [libav-devel] [PATCH] Move put_no_rnd_pixels_l2 function to new VP35MCDSPContext.

2013-01-21 Thread Diego Biurrun
On Mon, Jan 21, 2013 at 01:45:45PM -0800, Ronald S. Bultje wrote:
 On Jan 21, 2013 11:59 AM, Diego Biurrun di...@biurrun.de wrote:
  On Mon, Jan 21, 2013 at 11:04:25AM -0800, Ronald S. Bultje wrote:
   On Mon, Jan 21, 2013 at 10:58 AM, Diego Biurrun di...@biurrun.de
 wrote:
On Mon, Jan 21, 2013 at 10:45:44AM -0800, Ronald S. Bultje wrote:
From: Ronald S. Bultje rsbul...@gmail.com
   
---
 configure |  7 ---
 libavcodec/Makefile   |  1 +
 libavcodec/dsputil.c  |  1 -
 libavcodec/dsputil.h  |  2 --
 libavcodec/dsputil_template.c |  4 
 libavcodec/vp3.c  |  5 -
 libavcodec/vp35mcdsp.c| 43
 +++
 libavcodec/vp35mcdsp.h| 43
 +++
 libavcodec/vp56.c |  3 ++-
 libavcodec/vp56.h |  2 ++
 10 files changed, 99 insertions(+), 12 deletions(-)
 create mode 100644 libavcodec/vp35mcdsp.c
 create mode 100644 libavcodec/vp35mcdsp.h
   
You don't touch the optimized version below libavcodec/x86/ - why?
  
   Which one? I don't see any.
 
  put_no_rnd_pixels8_l2 in libavcodec/x86/dsputil_avg_template.c
 
 Where is that assigned?

Forget it, I got lost in the dsputil maze, sorry ...

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


[libav-devel] [PATCH] dsputil: remove avg_no_rnd_pixels8.

2013-01-21 Thread Ronald S. Bultje
From: Ronald S. Bultje rsbul...@gmail.com

This is never used.
---
 libavcodec/alpha/dsputil_alpha.c  |   5 -
 libavcodec/arm/dsputil_init_neon.c|   7 -
 libavcodec/arm/dsputil_neon.S |   6 +-
 libavcodec/dsputil.c  |   1 -
 libavcodec/dsputil.h  |   8 +-
 libavcodec/sh4/dsputil_align.c|   9 -
 libavcodec/sparc/dsputil_vis.c| 461 --
 libavcodec/x86/dsputil_mmx.c  |   3 +-
 libavcodec/x86/dsputil_rnd_template.c |   4 +
 9 files changed, 13 insertions(+), 491 deletions(-)

diff --git a/libavcodec/alpha/dsputil_alpha.c b/libavcodec/alpha/dsputil_alpha.c
index ce7cecb..cf1077b 100644
--- a/libavcodec/alpha/dsputil_alpha.c
+++ b/libavcodec/alpha/dsputil_alpha.c
@@ -308,11 +308,6 @@ void ff_dsputil_init_alpha(DSPContext* c, AVCodecContext 
*avctx)
 c-avg_pixels_tab[1][2] = avg_pixels_y2_axp;
 c-avg_pixels_tab[1][3] = avg_pixels_xy2_axp;
 
-c-avg_no_rnd_pixels_tab[1][0] = avg_no_rnd_pixels_axp;
-c-avg_no_rnd_pixels_tab[1][1] = avg_no_rnd_pixels_x2_axp;
-c-avg_no_rnd_pixels_tab[1][2] = avg_no_rnd_pixels_y2_axp;
-c-avg_no_rnd_pixels_tab[1][3] = avg_no_rnd_pixels_xy2_axp;
-
 c-clear_blocks = clear_blocks_axp;
 }
 
diff --git a/libavcodec/arm/dsputil_init_neon.c 
b/libavcodec/arm/dsputil_init_neon.c
index f27aee4..1c5181c 100644
--- a/libavcodec/arm/dsputil_init_neon.c
+++ b/libavcodec/arm/dsputil_init_neon.c
@@ -58,9 +58,6 @@ void ff_avg_pixels8_xy2_neon(uint8_t *, const uint8_t *, int, 
int);
 void ff_avg_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
 void ff_avg_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
 void ff_avg_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
-void ff_avg_pixels8_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
-void ff_avg_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
-void ff_avg_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
 
 void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
 void ff_put_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
@@ -203,10 +200,6 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext 
*avctx)
 c-avg_no_rnd_pixels_tab[0][1] = ff_avg_pixels16_x2_no_rnd_neon;
 c-avg_no_rnd_pixels_tab[0][2] = ff_avg_pixels16_y2_no_rnd_neon;
 c-avg_no_rnd_pixels_tab[0][3] = ff_avg_pixels16_xy2_no_rnd_neon;
-c-avg_no_rnd_pixels_tab[1][0] = ff_avg_pixels8_neon;
-c-avg_no_rnd_pixels_tab[1][1] = ff_avg_pixels8_x2_no_rnd_neon;
-c-avg_no_rnd_pixels_tab[1][2] = ff_avg_pixels8_y2_no_rnd_neon;
-c-avg_no_rnd_pixels_tab[1][3] = ff_avg_pixels8_xy2_no_rnd_neon;
 }
 
 c-add_pixels_clamped = ff_add_pixels_clamped_neon;
diff --git a/libavcodec/arm/dsputil_neon.S b/libavcodec/arm/dsputil_neon.S
index cf92817..f33fa33 100644
--- a/libavcodec/arm/dsputil_neon.S
+++ b/libavcodec/arm/dsputil_neon.S
@@ -421,9 +421,9 @@ function ff_avg_h264_qpel8_mc00_neon, export=1
 endfunc
 
 pixfunc avg_, pixels8, avg=1
-pixfunc2avg_, pixels8_x2,  avg=1
-pixfunc2avg_, pixels8_y2,  avg=1
-pixfunc2avg_, pixels8_xy2, avg=1
+pixfunc avg_, pixels8_x2,  avg=1
+pixfunc avg_, pixels8_y2,  avg=1
+pixfunc avg_, pixels8_xy2, avg=1
 
 function ff_put_pixels_clamped_neon, export=1
 vld1.16 {d16-d19}, [r0,:128]!
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index caf1b07..7bead1d 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2745,7 +2745,6 @@ av_cold void ff_dsputil_init(DSPContext* c, 
AVCodecContext *avctx)
 dspfunc1(avg   , 2,  4, depth);\
 dspfunc1(avg   , 3,  2, depth);\
 dspfunc1(avg_no_rnd, 0, 16, depth);\
-dspfunc1(avg_no_rnd, 1,  8, depth);\
 \
 dspfunc2(put_h264_qpel, 0, 16, depth);\
 dspfunc2(put_h264_qpel, 1,  8, depth);\
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 9b88058..b01c912 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -281,15 +281,15 @@ typedef struct DSPContext {
 
 /**
  * Halfpel motion compensation with no rounding (a+b)1.
- * this is an array[2][4] of motion compensation functions for 2
- * horizontal blocksizes (8,16) and the 4 halfpel positionsbr
- * *pixels_tab[ 0-16xH 1-8xH ][ xhalfpel + 2*yhalfpel ]
+ * this is an array[4] of motion compensation functions for 1
+ * horizontal blocksizes (16) and the 4 halfpel positionsbr
+ * *pixels_tab[0][ xhalfpel + 2*yhalfpel ]
  * @param block destination into which the result is averaged (a+b)1
  * @param pixels source
  * @param line_size number of bytes in a horizontal line of block
  * @param h height
  */
-op_pixels_func avg_no_rnd_pixels_tab[4][4];
+op_pixels_func avg_no_rnd_pixels_tab[1][4];
 
 /**
  * Thirdpel motion compensation with rounding (a+b+1)1.

Re: [libav-devel] [PATCH] bfin: vp3: Separate VP3 initialization code

2013-01-21 Thread Ronald S. Bultje
Hi,

On Mon, Jan 21, 2013 at 1:13 PM, Luca Barbato lu_z...@gentoo.org wrote:
 On 21/01/13 20:38, Luca Barbato wrote:
 +void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags)
 +{
 +c-idct_add  = ff_bfin_vp3_idct_add;
 +c-idct_put  = ff_bfin_vp3_idct_put;

 c-idct missing.

vp3dsp has no idct.

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


Re: [libav-devel] [PATCH] bfin: vp3: Separate VP3 initialization code

2013-01-21 Thread Ronald S. Bultje
Hi,

On Mon, Jan 21, 2013 at 2:31 PM, Luca Barbato lu_z...@gentoo.org wrote:
 On 21/01/13 22:43, Luca Barbato wrote:
 Actually the idct_dc_add not sure if we can safely mix and match them,
 probably we can.

 I'd push tomorrow the updated patch, idct_dc_add is compatible from what
 I can see.

Please make sure that they set their coefficients to zero after the
idct, that was a recent modification in the API (like VP8) which the
asm previously (when this was written) didn't do.

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


Re: [libav-devel] [PATCH] vp3/5: move put_no_rnd_pixels_l2 from dsputil to VP3DSPContext.

2013-01-21 Thread Luca Barbato
On 21/01/13 20:02, Ronald S. Bultje wrote:
 From: Ronald S. Bultje rsbul...@gmail.com
 
 The function is only used in VP3 and VP5, so no need to have it in
 DSPContext.
 ---
  libavcodec/dsputil.c  |  1 -
  libavcodec/dsputil.h  |  2 --
  libavcodec/dsputil_template.c |  4 
  libavcodec/vp3.c  |  2 +-
  libavcodec/vp3dsp.c   | 19 +++
  libavcodec/vp3dsp.h   | 16 
  libavcodec/vp56.c |  6 +++---
  7 files changed, 39 insertions(+), 11 deletions(-)
 

Looks fine, commit anytime.

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


Re: [libav-devel] [PATCH] Drop DCTELEM typedef

2013-01-21 Thread Luca Barbato
On 22/01/13 01:04, Diego Biurrun wrote:
 It does not help as an abstraction and adds dsputil dependencies.
 ---
  doc/optimization.txt   |2 +-
  libavcodec/4xm.c   |   10 ++--
  libavcodec/alpha/dsputil_alpha.c   |   12 ++--
  libavcodec/alpha/dsputil_alpha.h   |   20 
  libavcodec/alpha/dsputil_alpha_asm.S   |4 +-
  libavcodec/alpha/motion_est_alpha.c|4 +-
  libavcodec/alpha/mpegvideo_alpha.c |8 ++--
  libavcodec/alpha/simple_idct_alpha.c   |   12 ++--
  libavcodec/arm/dsputil_init_arm.c  |   18 +++---
  libavcodec/arm/dsputil_init_armv5te.c  |6 +-
  libavcodec/arm/dsputil_init_armv6.c|   12 ++--
  libavcodec/arm/dsputil_init_neon.c |   16 +++---
  libavcodec/arm/h264dsp_init_arm.c  |   16 +++---
  libavcodec/arm/jrevdct_arm.S   |2 +-
  libavcodec/arm/mpegvideo_arm.c |4 +-
  libavcodec/arm/mpegvideo_armv5te.c |8 ++--
  libavcodec/arm/rv34dsp_init_arm.c  |6 +-
  libavcodec/arm/rv34dsp_neon.S  |6 +-
  libavcodec/arm/simple_idct_armv6.S |6 +-
  libavcodec/arm/simple_idct_neon.S  |6 +-
  libavcodec/arm/vp3dsp_init_arm.c   |6 +-
  libavcodec/arm/vp8.h   |2 +-
  libavcodec/arm/vp8dsp_armv6.S  |   12 ++--
  libavcodec/arm/vp8dsp_init_armv6.c |   12 ++--
  libavcodec/arm/vp8dsp_init_neon.c  |   10 ++--
  libavcodec/asv.h   |2 +-
  libavcodec/asvdec.c|8 ++--
  libavcodec/asvenc.c|8 ++--
  libavcodec/bfin/config_bfin.h  |2 +-
  libavcodec/bfin/dsputil_bfin.c |6 +-
  libavcodec/bfin/dsputil_bfin.h |   21 
  libavcodec/bfin/fdct_bfin.S|8 ++--
  libavcodec/bfin/idct_bfin.S|4 +-
  libavcodec/bfin/mpegvideo_bfin.c   |2 +-
  libavcodec/bfin/pixels_bfin.S  |8 ++--
  libavcodec/bfin/vp3_bfin.c |4 +-
  libavcodec/bfin/vp3_idct_bfin.S|4 +-
  libavcodec/bink.c  |6 +-
  libavcodec/cavs.c  |2 +-
  libavcodec/cavs.h  |2 +-
  libavcodec/cavsdec.c   |8 ++--
  libavcodec/cavsdsp.c   |4 +-
  libavcodec/cavsdsp.h   |2 +-
  libavcodec/dct-test.c  |   31 ++-
  libavcodec/dnxhddec.c  |   14 +++---
  libavcodec/dnxhdenc.c  |   20 
  libavcodec/dnxhdenc.h  |4 +-
  libavcodec/dsputil.c   |   34 ++--
  libavcodec/dsputil.h   |   91 
 
  libavcodec/dsputil_template.c  |   14 +++---
  libavcodec/dv.c|4 +-
  libavcodec/dvdata.h|6 +-
  libavcodec/dvdec.c |8 ++--
  libavcodec/eaidct.c|6 +-
  libavcodec/eaidct.h|3 +-
  libavcodec/eamad.c |6 +-
  libavcodec/eatgq.c |6 +-
  libavcodec/eatqi.c |6 +-
  libavcodec/faandct.c   |6 +-
  libavcodec/faandct.h   |6 +-
  libavcodec/faanidct.c  |8 ++--
  libavcodec/faanidct.h  |7 +--
  libavcodec/h261dec.c   |4 +-
  libavcodec/h261enc.c   |8 ++--
  libavcodec/h263.c  |2 +-
  libavcodec/h263.h  |8 ++--
  libavcodec/h264.c  |   10 ++--
  libavcodec/h264.h  |7 +--
  libavcodec/h264_cabac.c|   36 ++---
  libavcodec/h264_cavlc.c|6 +-
  libavcodec/h264_mb_template.c  |2 +-
  libavcodec/h264dsp.h   |   24 -
  libavcodec/h264idct_template.c |   24 
  libavcodec/h264pred.h  |   12 ++--
  libavcodec/h264pred_template.c |   20 
  libavcodec/ituh263dec.c|6 +-
  libavcodec/ituh263enc.c|4 +-
  libavcodec/jfdctfst.c  |   18 +++---
  libavcodec/jfdctint_template.c |   28 +-
  libavcodec/jrevdct.c   |   38 +++---
  libavcodec/mdec.c  |8 ++--
  libavcodec/mimic.c |4 +-
  libavcodec/mjpegdec.c  |   12 ++--
  libavcodec/mjpegdec.h  |4 +-
  libavcodec/mjpegenc.c  |4 +-
  libavcodec/mjpegenc.h  |5 +-
  libavcodec/mpeg12.c|   20 
  libavcodec/mpeg12.h|2 +-
  libavcodec/mpeg12enc.c |8 ++--
  libavcodec/mpeg4video.h|4 +-
  libavcodec/mpeg4videodec.c |8 ++--
  libavcodec/mpeg4videoenc.c |   

Re: [libav-devel] [PATCH] Drop DCTELEM typedef

2013-01-21 Thread Ronald S. Bultje
Hi,

On Mon, Jan 21, 2013 at 4:04 PM, Diego Biurrun di...@biurrun.de wrote:
 It does not help as an abstraction and adds dsputil dependencies.

I like the commit. I do want to add, though, that you're not actually
practically removing the dsputil dependency from a lot of files (at
build time), even though the dependency is (in a code-sense) no longer
there. Examples are in vp3.c or vp8.c, but there's likely more.

Will you remove these in a later commit?

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


[libav-devel] [PATCH] dsputil: remove some never-assigned function pointers from the struct.

2013-01-21 Thread Ronald S. Bultje
From: Ronald S. Bultje rsbul...@gmail.com

---
 libavcodec/dsputil.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index b01c912..e4bbd46 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -277,7 +277,7 @@ typedef struct DSPContext {
  * @param line_size number of bytes in a horizontal line of block
  * @param h height
  */
-op_pixels_func put_no_rnd_pixels_tab[4][4];
+op_pixels_func put_no_rnd_pixels_tab[2][4];
 
 /**
  * Halfpel motion compensation with no rounding (a+b)1.
@@ -307,7 +307,6 @@ typedef struct DSPContext {
 qpel_mc_func put_qpel_pixels_tab[2][16];
 qpel_mc_func avg_qpel_pixels_tab[2][16];
 qpel_mc_func put_no_rnd_qpel_pixels_tab[2][16];
-qpel_mc_func avg_no_rnd_qpel_pixels_tab[2][16];
 qpel_mc_func put_mspel_pixels_tab[8];
 
 /**
@@ -317,7 +316,7 @@ typedef struct DSPContext {
 h264_chroma_mc_func avg_h264_chroma_pixels_tab[3];
 
 qpel_mc_func put_h264_qpel_pixels_tab[4][16];
-qpel_mc_func avg_h264_qpel_pixels_tab[4][16];
+qpel_mc_func avg_h264_qpel_pixels_tab[3][16];
 
 me_cmp_func pix_abs[2][4];
 
-- 
1.7.11.3

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