[FFmpeg-cvslog] wavpackenc: fix number of samples per block

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Fri Aug 22 09:31:42 2014 +| [ddad09397247f523d7cc66c7f4ed7ea6894cc40e] | 
committer: Michael Niedermayer

wavpackenc: fix number of samples per block

Currently, the encoder will try to reduce it down to 15, but the
decoder will complain starting at 131072 (WV_MAX_SAMPLES). Therefore,
change the loop limit.

Fixes ticket #3881.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ddad09397247f523d7cc66c7f4ed7ea6894cc40e
---

 libavcodec/wavpackenc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c
index 3631a08..169836a 100644
--- a/libavcodec/wavpackenc.c
+++ b/libavcodec/wavpackenc.c
@@ -135,7 +135,7 @@ static av_cold int wavpack_encode_init(AVCodecContext 
*avctx)
 else
 block_samples = avctx->sample_rate;
 
-while (block_samples * avctx->channels > 15)
+while (block_samples * avctx->channels > WV_MAX_SAMPLES)
 block_samples /= 2;
 
 while (block_samples * avctx->channels < 4)

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


[FFmpeg-cvslog] wavpackenc: make assert more thorough

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Fri Aug 22 09:31:43 2014 +| [e32eddaa51ad6e84ce9592b9634a788fcda9bad3] | 
committer: Michael Niedermayer

wavpackenc: make assert more thorough

It was only validating that normal data wasn't filling the buffer.
However, extra data may be written afterwards.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e32eddaa51ad6e84ce9592b9634a788fcda9bad3
---

 libavcodec/wavpackenc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c
index 169836a..299a035 100644
--- a/libavcodec/wavpackenc.c
+++ b/libavcodec/wavpackenc.c
@@ -2813,7 +2813,7 @@ static int wavpack_encode_block(WavPackEncodeContext *s,
 block_size = bytestream2_tell_p(&pb);
 AV_WL32(out + 4, block_size - 8);
 
-av_assert0(put_bits_left(&s->pb) > 0);
+av_assert0(!bytestream2_get_eof(&pb));
 
 return block_size;
 }

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


[FFmpeg-cvslog] x86: hevc_mc: assume 2nd source stride is 64

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Mon Jul 28 08:55:26 2014 +0200| [fb1a98ec5b4e34a3dc63ad06db707806906dc74c] | 
committer: Michael Niedermayer

x86: hevc_mc: assume 2nd source stride is 64

Reviewed-by: Mickaël Raulet 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb1a98ec5b4e34a3dc63ad06db707806906dc74c
---

 libavcodec/x86/hevc_mc.asm |   36 +---
 1 file changed, 21 insertions(+), 15 deletions(-)

diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm
index c525078..3b492fb 100644
--- a/libavcodec/x86/hevc_mc.asm
+++ b/libavcodec/x86/hevc_mc.asm
@@ -75,6 +75,8 @@ QPEL_TABLE  8, 8, b, sse4
 QPEL_TABLE 10, 4, w, sse4
 QPEL_TABLE 12, 4, w, sse4
 
+%define MAX_PB_SIZE  64
+
 %define hevc_qpel_filters_sse4_14 hevc_qpel_filters_sse4_10
 
 %if ARCH_X86_64
@@ -377,7 +379,11 @@ QPEL_TABLE 12, 4, w, sse4
 %endmacro
 
 %macro LOOP_END 4
+%ifnum %2
+add  %1q, 2*%2   ; dst += dststride
+%else
 lea  %1q, [%1q+2*%2q]; dst += dststride
+%endif
 add  %3q, %4q; src += srcstride
 dec  heightd ; cmp height
 jnz   .loop  ; height loop
@@ -548,7 +554,7 @@ cglobal hevc_put_hevc_pel_pixels%1_%2, 5, 5, 3, dst, 
dststride, src, srcstride,h
 SIMPLE_LOAD   %1, %2, srcq, m0
 MC_PIXEL_COMPUTE  %1, %2
 PEL_10STORE%1 dstq, m0, m1
-LOOP_END dst, dststride, src, srcstride
+LOOP_END dst, MAX_PB_SIZE, src, srcstride
 RET
 
 cglobal hevc_put_hevc_uni_pel_pixels%1_%2, 5, 5, 2, dst, dststride, src, 
srcstride,height
@@ -572,7 +578,7 @@ cglobal hevc_put_hevc_bi_pel_pixels%1_%2, 7, 7, 6, dst, 
dststride, src, srcstrid
 PEL_%2STORE%1   dstq, m0, m1
 add dstq, dststrideq ; dst += dststride
 add srcq, srcstrideq ; src += srcstride
-leasrc2q, [src2q+2*src2strideq]  ; src += srcstride
+addsrc2q, 2*MAX_PB_SIZE  ; src += srcstride
 dec  heightd ; cmp height
 jnz   .loop  ; height loop
 RET
@@ -596,7 +602,7 @@ cglobal hevc_put_hevc_epel_h%1_%2, 6, 7, 6, dst, dststride, 
src, srcstride, heig
 EPEL_LOAD %2, srcq-%%stride, %%stride, %1
 EPEL_COMPUTE  %2, %1, m4, m5
 PEL_10STORE%1  dstq, m0, m1
-LOOP_END dst, dststride, src, srcstride
+LOOP_END dst, MAX_PB_SIZE, src, srcstride
 RET
 
 cglobal hevc_put_hevc_uni_epel_h%1_%2, 6, 7, 7, dst, dststride, src, 
srcstride, height, mx, rfilter
@@ -625,7 +631,7 @@ cglobal hevc_put_hevc_bi_epel_h%1_%2, 8, 9, 7, dst, 
dststride, src, srcstride, s
 PEL_%2STORE%1   dstq, m0, m1
 add dstq, dststrideq ; dst += dststride
 add srcq, srcstrideq ; src += srcstride
-leasrc2q, [src2q+2*src2strideq]  ; src += srcstride
+addsrc2q, 2*MAX_PB_SIZE  ; src += srcstride
 dec  heightd ; cmp height
 jnz   .loop  ; height loop
 RET
@@ -645,7 +651,7 @@ cglobal hevc_put_hevc_epel_v%1_%2, 7, 8, 6, dst, dststride, 
src, srcstride, heig
 EPEL_LOAD %2, srcq, srcstride, %1
 EPEL_COMPUTE  %2, %1, m4, m5
 PEL_10STORE%1 dstq, m0, m1
-LOOP_END  dst, dststride, src, srcstride
+LOOP_END  dst, MAX_PB_SIZE, src, srcstride
 RET
 
 cglobal hevc_put_hevc_uni_epel_v%1_%2, 7, 8, 7, dst, dststride, src, 
srcstride, height, r3src, my, rfilter
@@ -678,7 +684,7 @@ cglobal hevc_put_hevc_bi_epel_v%1_%2, 9, 10, 7, dst, 
dststride, src, srcstride,
 PEL_%2STORE%1   dstq, m0, m1
 add dstq, dststrideq ; dst += dststride
 add srcq, srcstrideq ; src += srcstride
-leasrc2q, [src2q+2*src2strideq]  ; src += srcstride
+addsrc2q, 2*MAX_PB_SIZE  ; src += srcstride
 dec  heightd ; cmp height
 jnz   .loop  ; height loop
 RET
@@ -723,7 +729,7 @@ cglobal hevc_put_hevc_epel_hv%1_%2, 7, 9, 12 , dst, 
dststride, src, srcstride, h
 movdqam4, m5
 movdqam5, m6
 movdqam6, m7
-LOOP_END dst, dststride, src, srcstride
+LOOP_END dst, MAX_PB_SIZE, src, srcstride
 RET
 
 cglobal hevc_put_hevc_uni_epel_hv%1_%2, 7, 9, 12 , dst, dststride, src, 
srcstride, height, mx, my, r3src, rfilter
@@ -800,7 +806,7 @@ cglobal hevc_put_hevc_bi_epel_hv%1_%2, 9, 11, 16, dst, 
dststride, src, srcstride
 movdqam6, m7
 add dstq, dststrideq ; dst += dststride
 add srcq, srcstrideq ; src += srcstride
-leasrc2q, [src2q+2*src2strideq]  ; src +=

[FFmpeg-cvslog] hevc: move MAX_PB_SIZE declaration

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Mon Jul 28 17:17:25 2014 +| [b9f3912a65ac98b7bc6916c9e3a9d60d79637416] | 
committer: Michael Niedermayer

hevc: move MAX_PB_SIZE declaration

Reviewed-by: Mickaël Raulet 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9f3912a65ac98b7bc6916c9e3a9d60d79637416
---

 libavcodec/hevc.h|1 -
 libavcodec/hevcdsp.h |2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h
index 8420f38..0369d8f 100644
--- a/libavcodec/hevc.h
+++ b/libavcodec/hevc.h
@@ -56,7 +56,6 @@
 #define MAX_TRANSFORM_DEPTH 5
 
 #define MAX_TB_SIZE 32
-#define MAX_PB_SIZE 64
 #define MAX_LOG2_CTB_SIZE 6
 #define MAX_QP 51
 #define DEFAULT_INTRA_TC_OFFSET 2
diff --git a/libavcodec/hevcdsp.h b/libavcodec/hevcdsp.h
index 2736037..6cc96e8 100644
--- a/libavcodec/hevcdsp.h
+++ b/libavcodec/hevcdsp.h
@@ -27,6 +27,8 @@
 
 #include "get_bits.h"
 
+#define MAX_PB_SIZE 64
+
 typedef struct SAOParams {
 int offset_abs[3][4];   ///< sao_offset_abs
 int offset_sign[3][4];  ///< sao_offset_sign

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


[FFmpeg-cvslog] hevcdsp: remove compilation-time-fixed parameter

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Mon Jul 28 17:17:26 2014 +| [d4f44b66d36c405d5152d8d333cc4a35c7766af0] | 
committer: Michael Niedermayer

hevcdsp: remove compilation-time-fixed parameter

The dststride parameter is always MAX_PB_SIZE.

Reviewed-by: Mickaël Raulet 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d4f44b66d36c405d5152d8d333cc4a35c7766af0
---

 libavcodec/hevc.c |4 ++--
 libavcodec/hevcdsp.h  |4 ++--
 libavcodec/hevcdsp_template.c |   27 +--
 libavcodec/x86/hevc_mc.asm|   16 
 libavcodec/x86/hevcdsp.h  |2 +-
 libavcodec/x86/hevcdsp_init.c |   16 
 6 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 6291dc6..9fa6fa4 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -1387,7 +1387,7 @@ static void luma_mc_uni(HEVCContext *s, uint8_t *dst, 
ptrdiff_t dststride,
 src1stride = edge_emu_stride;
 }
 
-s->hevcdsp.put_hevc_qpel[idx][!!my0][!!mx0](tmp, MAX_PB_SIZE, src0, 
src0stride,
+s->hevcdsp.put_hevc_qpel[idx][!!my0][!!mx0](tmp, src0, src0stride,
 block_h, mx0, my0, block_w);
 if (!weight_flag)
 s->hevcdsp.put_hevc_qpel_bi[idx][!!my1][!!mx1](dst, dststride, src1, 
src1stride, tmp, MAX_PB_SIZE,
@@ -1559,7 +1559,7 @@ static void chroma_mc_bi(HEVCContext *s, uint8_t *dst0, 
ptrdiff_t dststride, AVF
 src2stride = edge_emu_stride;
 }
 
-s->hevcdsp.put_hevc_epel[idx][!!my0][!!mx0](tmp, tmpstride, src1, 
src1stride,
+s->hevcdsp.put_hevc_epel[idx][!!my0][!!mx0](tmp, src1, src1stride,
 block_h, _mx0, _my0, block_w);
 if (!weight_flag)
 s->hevcdsp.put_hevc_epel_bi[idx][!!my1][!!mx1](dst0, 
s->frame->linesize[cidx+1],
diff --git a/libavcodec/hevcdsp.h b/libavcodec/hevcdsp.h
index 6cc96e8..4244fd8 100644
--- a/libavcodec/hevcdsp.h
+++ b/libavcodec/hevcdsp.h
@@ -67,7 +67,7 @@ typedef struct HEVCDSPContext {
int _height, int c_idx, uint8_t *vert_edge,
uint8_t *horiz_edge, uint8_t *diag_edge);
 
-void (*put_hevc_qpel[10][2][2])(int16_t *dst, ptrdiff_t dststride, uint8_t 
*src, ptrdiff_t srcstride,
+void (*put_hevc_qpel[10][2][2])(int16_t *dst, uint8_t *src, ptrdiff_t 
srcstride,
 int height, intptr_t mx, intptr_t my, int 
width);
 void (*put_hevc_qpel_uni[10][2][2])(uint8_t *dst, ptrdiff_t dststride, 
uint8_t *src, ptrdiff_t srcstride,
 int height, intptr_t mx, intptr_t my, 
int width);
@@ -81,7 +81,7 @@ typedef struct HEVCDSPContext {
  int16_t *src2, ptrdiff_t src2stride,
  int height, int denom, int wx0, int 
wx1,
  int ox0, int ox1, intptr_t mx, 
intptr_t my, int width);
-void (*put_hevc_epel[10][2][2])(int16_t *dst, ptrdiff_t dststride, uint8_t 
*src, ptrdiff_t srcstride,
+void (*put_hevc_epel[10][2][2])(int16_t *dst, uint8_t *src, ptrdiff_t 
srcstride,
 int height, intptr_t mx, intptr_t my, int 
width);
 
 void (*put_hevc_epel_uni[10][2][2])(uint8_t *dst, ptrdiff_t dststride, 
uint8_t *_src, ptrdiff_t _srcstride,
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c
index b9b27f8..e63d848 100644
--- a/libavcodec/hevcdsp_template.c
+++ b/libavcodec/hevcdsp_template.c
@@ -543,7 +543,7 @@ static void FUNC(sao_edge_filter_1)(uint8_t *_dst, uint8_t 
*_src,
 

 //
 

-static void FUNC(put_hevc_pel_pixels)(int16_t *dst, ptrdiff_t dststride,
+static void FUNC(put_hevc_pel_pixels)(int16_t *dst,
   uint8_t *_src, ptrdiff_t _srcstride,
   int height, intptr_t mx, intptr_t my, 
int width)
 {
@@ -555,7 +555,7 @@ static void FUNC(put_hevc_pel_pixels)(int16_t *dst, 
ptrdiff_t dststride,
 for (x = 0; x < width; x++)
 dst[x] = src[x] << (14 - BIT_DEPTH);
 src += srcstride;
-dst += dststride;
+dst += MAX_PB_SIZE;
 }
 }
 
@@ -664,7 +664,7 @@ static void FUNC(put_hevc_pel_bi_w_pixels)(uint8_t *_dst, 
ptrdiff_t _dststride,
  filter[6] * src[x + 3 * stride] + 
\
  filter[7] * src[x + 4 * stride])
 
-static void FUNC(put_hevc_qpel_h)(int16_t *dst,  ptrdiff_t dststride,
+static void FUNC(put_hevc_qpel_h)(int16_t *dst,
   uint8_t *_src, ptrdiff_t _srcstride,
   int height, intptr_t mx, intptr_t my, int 
width)
 {
@@ -676,11 +676,11

[FFmpeg-cvslog] hevcdsp: remove more instances of compile-time-fixed parameters

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Mon Jul 28 12:13:06 2014 +0200| [dad7f155678f5325a04b26791cd51fd49522d00c] | 
committer: Michael Niedermayer

hevcdsp: remove more instances of compile-time-fixed parameters

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dad7f155678f5325a04b26791cd51fd49522d00c
---

 libavcodec/hevc.c |9 +++
 libavcodec/hevcdsp.h  |8 +++---
 libavcodec/hevcdsp_template.c |   56 -
 libavcodec/x86/hevc_mc.asm|   42 ++-
 libavcodec/x86/hevcdsp.h  |6 ++---
 libavcodec/x86/hevcdsp_init.c |   12 -
 6 files changed, 64 insertions(+), 69 deletions(-)

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 9fa6fa4..863ed23 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -1390,10 +1390,10 @@ static void luma_mc_uni(HEVCContext *s, uint8_t *dst, 
ptrdiff_t dststride,
 s->hevcdsp.put_hevc_qpel[idx][!!my0][!!mx0](tmp, src0, src0stride,
 block_h, mx0, my0, block_w);
 if (!weight_flag)
-s->hevcdsp.put_hevc_qpel_bi[idx][!!my1][!!mx1](dst, dststride, src1, 
src1stride, tmp, MAX_PB_SIZE,
+s->hevcdsp.put_hevc_qpel_bi[idx][!!my1][!!mx1](dst, dststride, src1, 
src1stride, tmp,
block_h, mx1, my1, 
block_w);
 else
-s->hevcdsp.put_hevc_qpel_bi_w[idx][!!my1][!!mx1](dst, dststride, src1, 
src1stride, tmp, MAX_PB_SIZE,
+s->hevcdsp.put_hevc_qpel_bi_w[idx][!!my1][!!mx1](dst, dststride, src1, 
src1stride, tmp,
  block_h, 
s->sh.luma_log2_weight_denom,
  
s->sh.luma_weight_l0[current_mv->ref_idx[0]],
  
s->sh.luma_weight_l1[current_mv->ref_idx[1]],
@@ -1489,7 +1489,6 @@ static void chroma_mc_bi(HEVCContext *s, uint8_t *dst0, 
ptrdiff_t dststride, AVF
  int x_off, int y_off, int block_w, int block_h, 
struct MvField *current_mv, int cidx)
 {
 DECLARE_ALIGNED(16, int16_t, tmp [MAX_PB_SIZE * MAX_PB_SIZE]);
-int tmpstride = MAX_PB_SIZE;
 HEVCLocalContext *lc = s->HEVClc;
 uint8_t *src1= ref0->data[cidx+1];
 uint8_t *src2= ref1->data[cidx+1];
@@ -1563,11 +1562,11 @@ static void chroma_mc_bi(HEVCContext *s, uint8_t *dst0, 
ptrdiff_t dststride, AVF
 block_h, _mx0, _my0, block_w);
 if (!weight_flag)
 s->hevcdsp.put_hevc_epel_bi[idx][!!my1][!!mx1](dst0, 
s->frame->linesize[cidx+1],
-   src2, src2stride, tmp, 
tmpstride,
+   src2, src2stride, tmp,
block_h, _mx1, _my1, 
block_w);
 else
 s->hevcdsp.put_hevc_epel_bi_w[idx][!!my1][!!mx1](dst0, 
s->frame->linesize[cidx+1],
- src2, src2stride, 
tmp, tmpstride,
+ src2, src2stride, tmp,
  block_h,
  
s->sh.chroma_log2_weight_denom,
  
s->sh.chroma_weight_l0[current_mv->ref_idx[0]][cidx],
diff --git a/libavcodec/hevcdsp.h b/libavcodec/hevcdsp.h
index 4244fd8..ced3b99 100644
--- a/libavcodec/hevcdsp.h
+++ b/libavcodec/hevcdsp.h
@@ -75,10 +75,10 @@ typedef struct HEVCDSPContext {
   int height, int denom, int wx, int 
ox, intptr_t mx, intptr_t my, int width);
 
 void (*put_hevc_qpel_bi[10][2][2])(uint8_t *dst, ptrdiff_t dststride, 
uint8_t *_src, ptrdiff_t _srcstride,
-   int16_t *src2, ptrdiff_t src2stride,
+   int16_t *src2,
int height, intptr_t mx, intptr_t my, 
int width);
 void (*put_hevc_qpel_bi_w[10][2][2])(uint8_t *dst, ptrdiff_t dststride, 
uint8_t *_src, ptrdiff_t _srcstride,
- int16_t *src2, ptrdiff_t src2stride,
+ int16_t *src2,
  int height, int denom, int wx0, int 
wx1,
  int ox0, int ox1, intptr_t mx, 
intptr_t my, int width);
 void (*put_hevc_epel[10][2][2])(int16_t *dst, uint8_t *src, ptrdiff_t 
srcstride,
@@ -89,10 +89,10 @@ typedef struct HEVCDSPContext {
 void (*put_hevc_epel_uni_w[10][2][2])(uint8_t *_dst, ptrdiff_t _dststride, 
uint8_t *_src, ptrdiff_t _srcstride,
   int height, int denom, int wx, int 
ox, intptr_t mx, intptr_t my, int width);

[FFmpeg-cvslog] x86: hevcdsp: use compilation-time-fixed constant

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Mon Jul 28 17:17:28 2014 +| [2346f2b5db595a9f2d0e23ae4faa34b8977f9704] | 
committer: Michael Niedermayer

x86: hevcdsp: use compilation-time-fixed constant

The stride for some buffers is known.

Reviewed-by: Mickaël Raulet 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2346f2b5db595a9f2d0e23ae4faa34b8977f9704
---

 libavcodec/x86/hevc_mc.asm |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm
index 30c4a39..06fec12 100644
--- a/libavcodec/x86/hevc_mc.asm
+++ b/libavcodec/x86/hevc_mc.asm
@@ -1211,7 +1211,7 @@ cglobal hevc_put_hevc_uni_w%1_%2, 6, 6, 7, dst, 
dststride, src, srcstride, heigh
 %endif
 PEL_%2STORE%1   dstq, m0, m1
 add dstq, dststrideq ; dst += dststride
-lea srcq, [srcq+2*srcstrideq]  ; src += srcstride
+add srcq, 2*MAX_PB_SIZE  ; src += srcstride
 dec  heightd ; cmp height
 jnz   .loop  ; height loop
 RET
@@ -1282,7 +1282,7 @@ cglobal hevc_put_hevc_bi_w%1_%2, 5, 7, 10, dst, 
dststride, src, srcstride, src2,
 %endif
 PEL_%2STORE%1   dstq, m0, m1
 add dstq, dststrideq ; dst += dststride
-lea srcq, [srcq+2*srcstrideq]  ; src += srcstride
+add srcq, 2*MAX_PB_SIZE  ; src += srcstride
 addsrc2q, 2*MAX_PB_SIZE  ; src2 += srcstride
 dec  r6d ; cmp height
 jnz   .loop  ; height loop

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


[FFmpeg-cvslog] configure: Suppress "potentially uninitialized variable" warnings from MSVC

2014-08-22 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Fri Aug 15 
20:03:27 2014 +0200| [b0bfd09f88da8b7c7666faf0ac7d5e74559dba9f] | committer: 
Diego Biurrun

configure: Suppress "potentially uninitialized variable" warnings from MSVC

The same is done for GCC and clang already.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0bfd09f88da8b7c7666faf0ac7d5e74559dba9f
---

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

diff --git a/configure b/configure
index c073f30..db3ee36 100755
--- a/configure
+++ b/configure
@@ -2688,7 +2688,7 @@ msvc_flags(){
 -Wall)echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 
\
-wd4146 -wd4057 -wd4204 -wd4706 -wd4305 
\
-wd4152 -wd4324 -we4013 -wd4100 -wd4214 
\
-   -wd4273 ;;
+   -wd4273 -wd4701 ;;
 esac
 done
 }

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


[FFmpeg-cvslog] Merge commit 'b0bfd09f88da8b7c7666faf0ac7d5e74559dba9f'

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug 22 
18:43:26 2014 +0200| [de9e0386b2f01852e305faae62736f387cf5a18a] | committer: 
Michael Niedermayer

Merge commit 'b0bfd09f88da8b7c7666faf0ac7d5e74559dba9f'

* commit 'b0bfd09f88da8b7c7666faf0ac7d5e74559dba9f':
  configure: Suppress "potentially uninitialized variable" warnings from MSVC

Conflicts:
configure

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de9e0386b2f01852e305faae62736f387cf5a18a
---



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


[FFmpeg-cvslog] rv34: use ff_mpeg_update_thread_context only when decoder is fully initialized

2014-08-22 Thread Janne Grunau
ffmpeg | branch: master | Janne Grunau  | Thu Aug 21 
13:26:33 2014 +0200| [dc4b2e7d33903a6b9380e8a84b22b3a20facbb08] | committer: 
Janne Grunau

rv34: use ff_mpeg_update_thread_context only when decoder is fully initialized

MpegEncContext based decoders are only fully initialized after the first
ff_thread_get_buffer() call. The RV30/40 decoders may fail before a frame
buffer was requested. ff_mpeg_update_thread_context() fails on half
initialized MpegEncContexts. Since this can only happen before a the
first frame was decoded there is no need to call
ff_mpeg_update_thread_context().

Based on patches by John Stebbins and tested by John Stebbins.

CC: libav-sta...@libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc4b2e7d33903a6b9380e8a84b22b3a20facbb08
---

 libavcodec/rv34.c |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 4ed2a33..26ab7e4 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1555,16 +1555,18 @@ int ff_rv34_decode_update_thread_context(AVCodecContext 
*dst, const AVCodecConte
 return err;
 }
 
-if ((err = ff_mpeg_update_thread_context(dst, src)))
-return err;
-
 r->cur_pts  = r1->cur_pts;
 r->last_pts = r1->last_pts;
 r->next_pts = r1->next_pts;
 
 memset(&r->si, 0, sizeof(r->si));
 
-return 0;
+// Do no call ff_mpeg_update_thread_context on a partially initialized
+// decoder context.
+if (!s1->linesize)
+return 0;
+
+return ff_mpeg_update_thread_context(dst, src);
 }
 
 static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n)

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


[FFmpeg-cvslog] Merge commit 'dc4b2e7d33903a6b9380e8a84b22b3a20facbb08'

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug 22 
18:49:22 2014 +0200| [e356f6c55d46bf3e58005c4e55b2226834a2c22a] | committer: 
Michael Niedermayer

Merge commit 'dc4b2e7d33903a6b9380e8a84b22b3a20facbb08'

* commit 'dc4b2e7d33903a6b9380e8a84b22b3a20facbb08':
  rv34: use ff_mpeg_update_thread_context only when decoder is fully initialized

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e356f6c55d46bf3e58005c4e55b2226834a2c22a
---



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


[FFmpeg-cvslog] electronicarts: do not fail on zero-sized chunks

2014-08-22 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Wed Aug 20 
05:40:53 2014 +| [4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b] | committer: 
Anton Khirnov

electronicarts: do not fail on zero-sized chunks

At least one FATE sample contains such chunks and happens to work simply
by accident (due to find_stream_info() swallowing the error).

CC: libav-sta...@libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b
---

 libavformat/electronicarts.c |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 879ed97..adcd45a 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -522,7 +522,7 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
 while (!packet_read) {
 chunk_type = avio_rl32(pb);
 chunk_size = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
-if (chunk_size <= 8)
+if (chunk_size < 8)
 return AVERROR_INVALIDDATA;
 chunk_size -= 8;
 
@@ -547,6 +547,9 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
 avio_skip(pb, 8);
 chunk_size -= 12;
 }
+if (!chunk_size)
+continue;
+
 ret = av_get_packet(pb, pkt, chunk_size);
 if (ret < 0)
 return ret;
@@ -607,6 +610,9 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
 goto get_video_packet;
 
 case mTCD_TAG:
+if (chunk_size < 8)
+return AVERROR_INVALIDDATA;
+
 avio_skip(pb, 8);   // skip ea DCT header
 chunk_size -= 8;
 goto get_video_packet;
@@ -617,6 +623,9 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
 key = AV_PKT_FLAG_KEY;
 case MV0F_TAG:
 get_video_packet:
+if (!chunk_size)
+continue;
+
 ret = av_get_packet(pb, pkt, chunk_size);
 if (ret < 0)
 return ret;

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


[FFmpeg-cvslog] Merge commit '4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b'

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug 22 
19:01:26 2014 +0200| [350dd8534575e89a8ed5f2bdafc24651a82338e5] | committer: 
Michael Niedermayer

Merge commit '4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b'

* commit '4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b':
  electronicarts: do not fail on zero-sized chunks

Conflicts:
libavformat/electronicarts.c

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=350dd8534575e89a8ed5f2bdafc24651a82338e5
---



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


[FFmpeg-cvslog] wavpackenc: reset trailer info on block encoding

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Fri Aug 22 09:31:45 2014 +| [4adad5a19ac85de69ced6b1d154344609ff4e493] | 
committer: Paul B Mahol

wavpackenc: reset trailer info on block encoding

In some cases, in particular if several blocks are needed because of
the channel layout (e.g. 2.1), the information used to write the
trailing bits terminating the sample data was not reset.

This would cause potential desync on the decoder, although decoded
samples were actually mostly fine.

Fixes ticket #3879.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4adad5a19ac85de69ced6b1d154344609ff4e493
---

 libavcodec/wavpackenc.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c
index 299a035..63971c6 100644
--- a/libavcodec/wavpackenc.c
+++ b/libavcodec/wavpackenc.c
@@ -2487,6 +2487,9 @@ static int wavpack_encode_block(WavPackEncodeContext *s,
 struct Decorr *dpp;
 PutByteContext pb;
 
+if (s->flags & WV_MONO_DATA) {
+CLEAR(s->w);
+}
 if (!(s->flags & WV_MONO) && s->optimize_mono) {
 int32_t lor = 0, diff = 0;
 

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


[FFmpeg-cvslog] wavpack: check number of channels

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Fri Aug 22 09:31:44 2014 +| [a59f85d1064d5eeea9c0d6a4db8d0f4f76605d93] | 
committer: Paul B Mahol

wavpack: check number of channels

This means container and codec disagree. The codec is supposed to
know better so this could be an error instead.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a59f85d1064d5eeea9c0d6a4db8d0f4f76605d93
---

 libavcodec/wavpack.c |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 9f72ebe..1ad3901 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -906,7 +906,10 @@ static int wavpack_decode_block(AVCodecContext *avctx, int 
block_no,
 chmask = bytestream2_get_le32(&gb);
 break;
 case 5:
-bytestream2_skip(&gb, 1);
+size = bytestream2_get_byte(&gb);
+if (avctx->channels != size)
+av_log(avctx, AV_LOG_WARNING, "%i channels signalled"
+   " instead of %i.\n", size, avctx->channels);
 chan  |= (bytestream2_get_byte(&gb) & 0xF) << 8;
 chmask = bytestream2_get_le16(&gb);
 break;

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


[FFmpeg-cvslog] electronicarts: read the framerate for MAD

2014-08-22 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Wed Aug 20 
05:52:44 2014 +| [7b6aae23e12f41cdfac7f1069debfe44d9a3d136] | committer: 
Anton Khirnov

electronicarts: read the framerate for MAD

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b6aae23e12f41cdfac7f1069debfe44d9a3d136
---

 libavformat/electronicarts.c |2 +
 tests/ref/fate/ea-mad|  194 +-
 2 files changed, 99 insertions(+), 97 deletions(-)

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index adcd45a..255bb7b 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -402,6 +402,8 @@ static int process_ea_header(AVFormatContext *s)
 
 case MADk_TAG:
 ea->video_codec = AV_CODEC_ID_MAD;
+avio_skip(pb, 6);
+ea->time_base = (AVRational) { avio_rl16(pb), 1000 };
 break;
 
 case MVhd_TAG:
diff --git a/tests/ref/fate/ea-mad b/tests/ref/fate/ea-mad
index ce1df4a..1ea92fd 100644
--- a/tests/ref/fate/ea-mad
+++ b/tests/ref/fate/ea-mad
@@ -1,97 +1,97 @@
-#tb 0: 1/9
-0,  0,  0,0,   535680, 0x889c32cf
-0,   2970,   2970,0,   535680, 0x0b1ef044
-0,   5940,   5940,0,   535680, 0xa7d0818b
-0,   8910,   8910,0,   535680, 0xf392e4e1
-0,  11880,  11880,0,   535680, 0x08480c69
-0,  14850,  14850,0,   535680, 0x2b8af1ed
-0,  17820,  17820,0,   535680, 0x0d58e062
-0,  20790,  20790,0,   535680, 0xd140ced0
-0,  23760,  23760,0,   535680, 0xbd0e6652
-0,  26730,  26730,0,   535680, 0xdc2f2a6b
-0,  29700,  29700,0,   535680, 0x97c31a38
-0,  32670,  32670,0,   535680, 0x1a2bdf38
-0,  35640,  35640,0,   535680, 0xb3af3ac4
-0,  38610,  38610,0,   535680, 0x07a52577
-0,  41580,  41580,0,   535680, 0x78407368
-0,  44550,  44550,0,   535680, 0xd2a9efc3
-0,  47520,  47520,0,   535680, 0x36df2f29
-0,  50490,  50490,0,   535680, 0x9821d8f7
-0,  53460,  53460,0,   535680, 0xf64321aa
-0,  56430,  56430,0,   535680, 0x53e4d9aa
-0,  59400,  59400,0,   535680, 0xdbd6f853
-0,  62370,  62370,0,   535680, 0x5d40cf8b
-0,  65340,  65340,0,   535680, 0xe624af9d
-0,  68310,  68310,0,   535680, 0xd9dbb4cd
-0,  71280,  71280,0,   535680, 0xf14e72ec
-0,  74250,  74250,0,   535680, 0xb35c18f6
-0,  77220,  77220,0,   535680, 0xc96d7757
-0,  80190,  80190,0,   535680, 0xdfb937df
-0,  83160,  83160,0,   535680, 0x40cd71d7
-0,  86130,  86130,0,   535680, 0x15e176d6
-0,  89100,  89100,0,   535680, 0x7f891b24
-0,  92070,  92070,0,   535680, 0xb87a8c32
-0,  95040,  95040,0,   535680, 0x0c01541f
-0,  98010,  98010,0,   535680, 0x9eee99b3
-0, 100980, 100980,0,   535680, 0xd65eb689
-0, 103950, 103950,0,   535680, 0x6e733cfa
-0, 106920, 106920,0,   535680, 0xac536670
-0, 109890, 109890,0,   535680, 0x002275b8
-0, 112860, 112860,0,   535680, 0x6a5385cb
-0, 115830, 115830,0,   535680, 0xd129ade3
-0, 118800, 118800,0,   535680, 0x32cab5d7
-0, 121770, 121770,0,   535680, 0x08be1c8f
-0, 124740, 124740,0,   535680, 0x59e1fba0
-0, 127710, 127710,0,   535680, 0x138aee3a
-0, 130680, 130680,0,   535680, 0x4cfbcd5e
-0, 133650, 133650,0,   535680, 0xf6cf0fb4
-0, 136620, 136620,0,   535680, 0xb13a06de
-0, 139590, 139590,0,   535680, 0x59176f00
-0, 142560, 142560,0,   535680, 0xf84b4ca3
-0, 145530, 145530,0,   535680, 0x7fd09f73
-0, 148500, 148500,0,   535680, 0x3be383b8
-0, 151470, 151470,0,   535680, 0xa7118e51
-0, 154440, 154440,0,   535680, 0xbd83120c
-0, 157410, 157410,0,   535680, 0x3bc9d256
-0, 160380, 160380,0,   535680, 0xb6c87f87
-0, 163350, 163350,0,   535680, 0xe80d110a
-0, 166320, 166320,0,   535680, 0xb3a83362
-0, 169290, 169290,0,   535680, 0xfb39eb52
-0, 172260, 172260,0,   535680, 0xbf6e1220
-0, 175230, 175230,0,   535680, 0x9ecdfbae
-0, 178200, 178200,0,   535680, 0x069a65f5
-0, 181170, 181170,0,   535680, 0x206e372c
-0, 184140, 184140,0,   535680, 0x58c83dd4
-0, 187110, 187110,0,   535680, 0xc3562b03
-0, 190080, 190080,0,   535680, 0xd1ed85a0
-0, 193050, 193050,0,   535680, 0xb6205

[FFmpeg-cvslog] Merge commit '7b6aae23e12f41cdfac7f1069debfe44d9a3d136'

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug 22 
19:52:49 2014 +0200| [ce1059d5c9098d4c2f89288653198b2c03ea8f85] | committer: 
Michael Niedermayer

Merge commit '7b6aae23e12f41cdfac7f1069debfe44d9a3d136'

* commit '7b6aae23e12f41cdfac7f1069debfe44d9a3d136':
  electronicarts: read the framerate for MAD

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce1059d5c9098d4c2f89288653198b2c03ea8f85
---



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


[FFmpeg-cvslog] electronicarts: set the framerate for TGQ/TQI

2014-08-22 Thread Anton Khirnov
ffmpeg | branch: master | Anton Khirnov  | Wed Aug 20 
06:06:41 2014 +| [cb7b1a2dfb547ab78342a7a9d5cd729d77d90421] | committer: 
Anton Khirnov

electronicarts: set the framerate for TGQ/TQI

It is hardcoded to 15fps.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cb7b1a2dfb547ab78342a7a9d5cd729d77d90421
---

 libavformat/electronicarts.c |2 +
 tests/ref/fate/ea-tgq|  558 +-
 tests/ref/fate/ea-tqi|   54 ++--
 3 files changed, 308 insertions(+), 306 deletions(-)

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 255bb7b..7c1fabe 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -394,10 +394,12 @@ static int process_ea_header(AVFormatContext *s)
 case pQGT_TAG:
 case TGQs_TAG:
 ea->video_codec = AV_CODEC_ID_TGQ;
+ea->time_base   = (AVRational) { 1, 15 };
 break;
 
 case pIQT_TAG:
 ea->video_codec = AV_CODEC_ID_TQI;
+ea->time_base   = (AVRational) { 1, 15 };
 break;
 
 case MADk_TAG:
diff --git a/tests/ref/fate/ea-tgq b/tests/ref/fate/ea-tgq
index edb04fa..5c0648d 100644
--- a/tests/ref/fate/ea-tgq
+++ b/tests/ref/fate/ea-tgq
@@ -1,279 +1,279 @@
-#tb 0: 1/9
-0,  0,  0,0,34944, 0xe33671a4
-0,   6000,   6000,0,34944, 0xe33671a4
-0,  12000,  12000,0,34944, 0xe33671a4
-0,  18000,  18000,0,34944, 0xe33671a4
-0,  24000,  24000,0,34944, 0xe33671a4
-0,  3,  3,0,34944, 0xe33671a4
-0,  36000,  36000,0,34944, 0xe33671a4
-0,  42000,  42000,0,34944, 0xe33671a4
-0,  48000,  48000,0,34944, 0xe33671a4
-0,  54000,  54000,0,34944, 0xe33671a4
-0,  6,  6,0,34944, 0xe33671a4
-0,  66000,  66000,0,34944, 0xe33671a4
-0,  72000,  72000,0,34944, 0xe33671a4
-0,  78000,  78000,0,34944, 0xe33671a4
-0,  84000,  84000,0,34944, 0xe33671a4
-0,  9,  9,0,34944, 0x63196b41
-0,  96000,  96000,0,34944, 0x308d6f10
-0, 102000, 102000,0,34944, 0x86026ced
-0, 108000, 108000,0,34944, 0xaa6a6bc9
-0, 114000, 114000,0,34944, 0x58276ee3
-0, 12, 12,0,34944, 0x402d70c2
-0, 126000, 126000,0,34944, 0x948d74bf
-0, 132000, 132000,0,34944, 0x3d31759c
-0, 138000, 138000,0,34944, 0x638c734e
-0, 144000, 144000,0,34944, 0xe218768a
-0, 15, 15,0,34944, 0xed6678ff
-0, 156000, 156000,0,34944, 0x381b7dda
-0, 162000, 162000,0,34944, 0x216680e7
-0, 168000, 168000,0,34944, 0xaca5810f
-0, 174000, 174000,0,34944, 0xf70b81eb
-0, 18, 18,0,34944, 0x3675858b
-0, 186000, 186000,0,34944, 0xa51188c3
-0, 192000, 192000,0,34944, 0x3a848bf1
-0, 198000, 198000,0,34944, 0x67608d4d
-0, 204000, 204000,0,34944, 0xafe49165
-0, 21, 21,0,34944, 0x7e8a94a7
-0, 216000, 216000,0,34944, 0x3b889432
-0, 222000, 222000,0,34944, 0x97e89623
-0, 228000, 228000,0,34944, 0x07819793
-0, 234000, 234000,0,34944, 0xdac39b87
-0, 24, 24,0,34944, 0x4d8c9d93
-0, 246000, 246000,0,34944, 0xcf009fa7
-0, 252000, 252000,0,34944, 0x2f109f6e
-0, 258000, 258000,0,34944, 0xcedda4eb
-0, 264000, 264000,0,34944, 0xfe89a6df
-0, 27, 27,0,34944, 0x195ea7a9
-0, 276000, 276000,0,34944, 0x9287ab92
-0, 282000, 282000,0,34944, 0x6d21af54
-0, 288000, 288000,0,34944, 0xd627b28b
-0, 294000, 294000,0,34944, 0x3ad5b6fd
-0, 30, 30,0,34944, 0x5101b64d
-0, 306000, 306000,0,34944, 0xb968b8ca
-0, 312000, 312000,0,34944, 0xa105b74a
-0, 318000, 318000,0,34944, 0xc056bdd6
-0, 324000, 324000,0,34944, 0xec7fc1d9
-0, 33, 33,0,34944, 0x92c3c3e0
-0, 336000, 336000,0,34944, 0x9bffc45c
-0, 342000, 342000,0,34944, 0x5aabca4b
-0, 348000, 348000,0,34944, 0xcbdacb26
-0, 354000, 354000,0,34944, 0xed6cce3f
-0, 36, 36,0,34944, 0xcc61cfb8
-0, 366000, 366000,0,34944, 0x7a97d427
-0, 372000, 372000

[FFmpeg-cvslog] Merge commit 'cb7b1a2dfb547ab78342a7a9d5cd729d77d90421'

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug 22 
20:59:49 2014 +0200| [3e07a056a8e67c8c8a1fdf4b1efd231aa9bcd0ad] | committer: 
Michael Niedermayer

Merge commit 'cb7b1a2dfb547ab78342a7a9d5cd729d77d90421'

* commit 'cb7b1a2dfb547ab78342a7a9d5cd729d77d90421':
  electronicarts: set the framerate for TGQ/TQI

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e07a056a8e67c8c8a1fdf4b1efd231aa9bcd0ad
---



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


[FFmpeg-cvslog] ogg: Provide aliases for Speex, Opus and audio-only ogg

2014-08-22 Thread Luca Barbato
ffmpeg | branch: master | Luca Barbato  | Sun Aug 17 
20:55:37 2014 +0200| [051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd] | committer: 
Luca Barbato

ogg: Provide aliases for Speex, Opus and audio-only ogg

Since they are aliases for ogg enabling any of them enables ogg as well.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd
---

 Changelog|1 +
 configure|3 +++
 libavformat/allformats.c |3 +++
 libavformat/oggenc.c |   53 +-
 libavformat/version.h|2 +-
 5 files changed, 60 insertions(+), 2 deletions(-)

diff --git a/Changelog b/Changelog
index ea9d721..cfdf11b 100644
--- a/Changelog
+++ b/Changelog
@@ -31,6 +31,7 @@ version :
 - Icecast protocol
 - request icecast metadata by default
 - support for using metadata in stream specifiers in avtools
+- Aliases and defaults for Ogg subtypes (opus, spx)
 
 
 version 10:
diff --git a/configure b/configure
index db3ee36..97b60cd 100755
--- a/configure
+++ b/configure
@@ -2047,7 +2047,9 @@ mpegtsraw_demuxer_select="mpegts_demuxer"
 mxf_d10_muxer_select="mxf_muxer"
 nut_muxer_select="riffenc"
 nuv_demuxer_select="riffdec"
+oga_muxer_select="ogg_muxer"
 ogg_demuxer_select="golomb"
+opus_muxer_select="ogg_muxer"
 psp_muxer_select="mov_muxer"
 rtp_demuxer_select="sdp_demuxer"
 rtpdec_select="asf_demuxer rm_demuxer rtp_protocol mpegts_demuxer mov_demuxer"
@@ -2058,6 +2060,7 @@ sap_muxer_select="rtp_muxer rtp_protocol rtpenc_chain"
 sdp_demuxer_select="rtpdec"
 smoothstreaming_muxer_select="ismv_muxer"
 spdif_muxer_select="aac_parser"
+spx_muxer_select="ogg_muxer"
 tak_demuxer_select="tak_parser"
 tg2_muxer_select="mov_muxer"
 tgp_muxer_select="mov_muxer"
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 984bb52..bef155f 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -174,8 +174,10 @@ void av_register_all(void)
 REGISTER_MUXER   (NULL, null);
 REGISTER_MUXDEMUX(NUT,  nut);
 REGISTER_DEMUXER (NUV,  nuv);
+REGISTER_MUXER   (OGA,  oga);
 REGISTER_MUXDEMUX(OGG,  ogg);
 REGISTER_MUXDEMUX(OMA,  oma);
+REGISTER_MUXER   (OPUS, opus);
 REGISTER_DEMUXER (PAF,  paf);
 REGISTER_MUXDEMUX(PCM_ALAW, pcm_alaw);
 REGISTER_MUXDEMUX(PCM_MULAW,pcm_mulaw);
@@ -226,6 +228,7 @@ void av_register_all(void)
 REGISTER_DEMUXER (SMUSH,smush);
 REGISTER_DEMUXER (SOL,  sol);
 REGISTER_MUXDEMUX(SOX,  sox);
+REGISTER_MUXER   (SPX,  spx);
 REGISTER_MUXDEMUX(SPDIF,spdif);
 REGISTER_MUXDEMUX(SRT,  srt);
 REGISTER_DEMUXER (STR,  str);
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 19c7759..8ef6765 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -627,11 +627,12 @@ static int ogg_write_trailer(AVFormatContext *s)
 return 0;
 }
 
+#if CONFIG_OGG_MUXER
 AVOutputFormat ff_ogg_muxer = {
 .name  = "ogg",
 .long_name = NULL_IF_CONFIG_SMALL("Ogg"),
 .mime_type = "application/ogg",
-.extensions= "ogg,ogv,spx,opus",
+.extensions= "ogg,ogv",
 .priv_data_size= sizeof(OGGContext),
 .audio_codec   = CONFIG_LIBVORBIS_ENCODER ?
  AV_CODEC_ID_VORBIS : AV_CODEC_ID_FLAC,
@@ -642,3 +643,53 @@ AVOutputFormat ff_ogg_muxer = {
 .flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
 .priv_class= &ogg_muxer_class,
 };
+#endif
+
+#if CONFIG_OGA_MUXER
+AVOutputFormat ff_oga_muxer = {
+.name  = "oga",
+.long_name = NULL_IF_CONFIG_SMALL("Ogg Audio"),
+.mime_type = "audio/ogg",
+.extensions= "oga",
+.priv_data_size= sizeof(OGGContext),
+.audio_codec   = CONFIG_LIBVORBIS_ENCODER ?
+ AV_CODEC_ID_VORBIS : AV_CODEC_ID_FLAC,
+.write_header  = ogg_write_header,
+.write_packet  = ogg_write_packet,
+.write_trailer = ogg_write_trailer,
+.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
+.priv_class= &ogg_muxer_class,
+};
+#endif
+
+#if CONFIG_SPX_MUXER
+AVOutputFormat ff_spx_muxer = {
+.name  = "spx",
+.long_name = NULL_IF_CONFIG_SMALL("Ogg Speex"),
+.mime_type = "audio/ogg",
+.extensions= "spx",
+.priv_data_size= sizeof(OGGContext),
+.audio_codec   = AV_CODEC_ID_SPEEX,
+.write_header  = ogg_write_header,
+.write_packet  = ogg_write_packet,
+.write_trailer = ogg_write_trailer,
+.flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
+.priv_class= &ogg_muxer_class,
+};
+#endif
+
+#if CONFIG_OPUS_MUXER
+AVOutputFormat ff_opus_muxer = {
+.name  = "opus",
+.long_name 

[FFmpeg-cvslog] Merge commit '051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd'

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug 22 
21:14:43 2014 +0200| [300d489ac9bb11b67bde90521d43d12fe68be72e] | committer: 
Michael Niedermayer

Merge commit '051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd'

* commit '051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd':
  ogg: Provide aliases for Speex, Opus and audio-only ogg

Conflicts:
Changelog
libavformat/oggenc.c
libavformat/version.h

See: 2ccc6ff03acc3ca31db1aeb828c747d05b5cb6aa
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=300d489ac9bb11b67bde90521d43d12fe68be72e
---



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


[FFmpeg-cvslog] os_support: Undefine lseek/stat/fstat before defining them

2014-08-22 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Fri Aug 15 
21:42:56 2014 +0200| [1019b7c4edff537499c4a6cb0d65abae04ce58f6] | committer: 
Diego Biurrun

os_support: Undefine lseek/stat/fstat before defining them

This avoids a number of redefinition warnings on MinGW64.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1019b7c4edff537499c4a6cb0d65abae04ce58f6
---

 libavformat/os_support.h |3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/os_support.h b/libavformat/os_support.h
index ae8cef7..8a757d7 100644
--- a/libavformat/os_support.h
+++ b/libavformat/os_support.h
@@ -33,8 +33,11 @@
 
 #if defined(_WIN32) && !defined(__MINGW32CE__)
 #  include 
+#  undef lseek
 #  define lseek(f,p,w) _lseeki64((f), (p), (w))
+#  undef stat
 #  define stat _stati64
+#  undef fstat
 #  define fstat(f,s) _fstati64((f), (s))
 #endif /* defined(__MINGW32__) && !defined(__MINGW32CE__) */
 

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


[FFmpeg-cvslog] Merge commit '1019b7c4edff537499c4a6cb0d65abae04ce58f6'

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug 22 
21:49:00 2014 +0200| [8f3caf52fc0d75a38137d0cb97d23c8802abd1ce] | committer: 
Michael Niedermayer

Merge commit '1019b7c4edff537499c4a6cb0d65abae04ce58f6'

* commit '1019b7c4edff537499c4a6cb0d65abae04ce58f6':
  os_support: Undefine lseek/stat/fstat before defining them

Conflicts:
libavformat/os_support.h

See: ef122ff5072463366c020157f0a27aad7e6610db
See: ed3c0fe85dd5c228e98126b18e50ffb617e77070
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f3caf52fc0d75a38137d0cb97d23c8802abd1ce
---



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


[FFmpeg-cvslog] qt-faststart: Undefine fseeko/ftello before defining them

2014-08-22 Thread Diego Biurrun
ffmpeg | branch: master | Diego Biurrun  | Fri Aug 15 
21:43:48 2014 +0200| [3526ab891c28396ada8b58bf7647309bab30de1d] | committer: 
Diego Biurrun

qt-faststart: Undefine fseeko/ftello before defining them

This avoids a number of redefinition warnings on MinGW64.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3526ab891c28396ada8b58bf7647309bab30de1d
---

 tools/qt-faststart.c |4 
 1 file changed, 4 insertions(+)

diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c
index ed6de1b..0db5ca2 100644
--- a/tools/qt-faststart.c
+++ b/tools/qt-faststart.c
@@ -30,10 +30,14 @@
 #include 
 
 #ifdef __MINGW32__
+#undef fseeko
 #define fseeko(x, y, z) fseeko64(x, y, z)
+#undef ftello
 #define ftello(x)   ftello64(x)
 #elif defined(_WIN32)
+#undef fseeko
 #define fseeko(x, y, z) _fseeki64(x, y, z)
+#undef ftello
 #define ftello(x)   _ftelli64(x)
 #endif
 

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


[FFmpeg-cvslog] Merge commit '3526ab891c28396ada8b58bf7647309bab30de1d'

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug 22 
21:55:00 2014 +0200| [d2a06242966d7a640d32d304a5653f4e1545f259] | committer: 
Michael Niedermayer

Merge commit '3526ab891c28396ada8b58bf7647309bab30de1d'

* commit '3526ab891c28396ada8b58bf7647309bab30de1d':
  qt-faststart: Undefine fseeko/ftello before defining them

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2a06242966d7a640d32d304a5653f4e1545f259
---



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


[FFmpeg-cvslog] vidstabutils: improve documentation

2014-08-22 Thread Timothy Gu
ffmpeg | branch: master | Timothy Gu  | Thu Aug 21 
19:12:10 2014 -0700| [8495c6086d04ffc6c2cf85a0497c428f60c76395] | committer: 
Michael Niedermayer

vidstabutils: improve documentation

Signed-off-by: Timothy Gu 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8495c6086d04ffc6c2cf85a0497c428f60c76395
---

 libavfilter/vidstabutils.h |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/libavfilter/vidstabutils.h b/libavfilter/vidstabutils.h
index 93278f6..c6d6ced 100644
--- a/libavfilter/vidstabutils.h
+++ b/libavfilter/vidstabutils.h
@@ -25,12 +25,23 @@
 
 #include "avfilter.h"
 
-/* ** some conversions from avlib to vid.stab constants and functions *** */
+/* Conversion routines between libav* and vid.stab */
 
-/** converts the pixelformat of avlib into the one of the vid.stab library */
+/**
+ * Converts an AVPixelFormat to a VSPixelFormat.
+ *
+ * @param[in] ctx AVFilterContext used for logging
+ * @param[in] pf  AVPixelFormat
+ * @returna corresponding VSPixelFormat
+ */
 VSPixelFormat ff_av2vs_pixfmt(AVFilterContext *ctx, enum AVPixelFormat pf);
 
-/** sets the memory allocation function and logging constants to av versions */
+/**
+ * Initialize libvidstab
+ *
+ * Sets the memory allocation functions and logging constants to corresponding
+ * av* versions.
+ */
 void ff_vs_init(void);
 
 #endif

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


[FFmpeg-cvslog] vidstab*: Remove accidentally exported av_2_vs_pixel_format()

2014-08-22 Thread Timothy Gu
ffmpeg | branch: master | Timothy Gu  | Thu Aug 21 
19:12:09 2014 -0700| [6e51e746c42607e35e8595bd66a8f50e1d9c40a4] | committer: 
Michael Niedermayer

vidstab*: Remove accidentally exported av_2_vs_pixel_format()

Also correctly namespace other functions in vidstabutils, and decrease
difference from Libav.

Initial-patch-by: Vittorio Giovara 
Signed-off-by: Timothy Gu 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e51e746c42607e35e8595bd66a8f50e1d9c40a4
---

 libavfilter/vf_vidstabdetect.c|5 +++--
 libavfilter/vf_vidstabtransform.c |6 +++---
 libavfilter/vidstabutils.c|8 
 libavfilter/vidstabutils.h|4 ++--
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/libavfilter/vf_vidstabdetect.c b/libavfilter/vf_vidstabdetect.c
index 9b4b20f..bf067af 100644
--- a/libavfilter/vf_vidstabdetect.c
+++ b/libavfilter/vf_vidstabdetect.c
@@ -63,7 +63,7 @@ AVFILTER_DEFINE_CLASS(vidstabdetect);
 static av_cold int init(AVFilterContext *ctx)
 {
 StabData *sd = ctx->priv;
-vs_set_mem_and_log_functions();
+ff_vs_init();
 sd->class = &vidstabdetect_class;
 av_log(ctx, AV_LOG_VERBOSE, "vidstabdetect filter: init %s\n", 
LIBVIDSTAB_VERSION);
 return 0;
@@ -106,7 +106,8 @@ static int config_input(AVFilterLink *inlink)
 VSFrameInfo fi;
 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
 
-vsFrameInfoInit(&fi, inlink->w, inlink->h, av_2_vs_pixel_format(ctx, 
inlink->format));
+vsFrameInfoInit(&fi, inlink->w, inlink->h,
+ff_av2vs_pixfmt(ctx, inlink->format));
 if (fi.bytesPerPixel != av_get_bits_per_pixel(desc)/8) {
 av_log(ctx, AV_LOG_ERROR, "pixel-format error: wrong bits/per/pixel, 
please report a BUG");
 return AVERROR(EINVAL);
diff --git a/libavfilter/vf_vidstabtransform.c 
b/libavfilter/vf_vidstabtransform.c
index 3ce4769..1bd43ff 100644
--- a/libavfilter/vf_vidstabtransform.c
+++ b/libavfilter/vf_vidstabtransform.c
@@ -107,7 +107,7 @@ AVFILTER_DEFINE_CLASS(vidstabtransform);
 static av_cold int init(AVFilterContext *ctx)
 {
 TransformContext *tc = ctx->priv;
-vs_set_mem_and_log_functions();
+ff_vs_init();
 tc->class = &vidstabtransform_class;
 av_log(ctx, AV_LOG_VERBOSE, "vidstabtransform filter: init %s\n", 
LIBVIDSTAB_VERSION);
 return 0;
@@ -151,9 +151,9 @@ static int config_input(AVFilterLink *inlink)
 VSFrameInfo fi_dest;
 
 if (!vsFrameInfoInit(&fi_src, inlink->w, inlink->h,
- av_2_vs_pixel_format(ctx, inlink->format)) ||
+ ff_av2vs_pixfmt(ctx, inlink->format)) ||
 !vsFrameInfoInit(&fi_dest, inlink->w, inlink->h,
- av_2_vs_pixel_format(ctx, inlink->format))) {
+ ff_av2vs_pixfmt(ctx, inlink->format))) {
 av_log(ctx, AV_LOG_ERROR, "unknown pixel format: %i (%s)",
inlink->format, desc->name);
 return AVERROR(EINVAL);
diff --git a/libavfilter/vidstabutils.c b/libavfilter/vidstabutils.c
index 6b0f0c7..13544cf 100644
--- a/libavfilter/vidstabutils.c
+++ b/libavfilter/vidstabutils.c
@@ -21,7 +21,7 @@
 #include "vidstabutils.h"
 
 /** convert AV's pixelformat to vid.stab pixelformat */
-VSPixelFormat av_2_vs_pixel_format(AVFilterContext *ctx, enum AVPixelFormat pf)
+VSPixelFormat ff_av2vs_pixfmt(AVFilterContext *ctx, enum AVPixelFormat pf)
 {
 switch (pf) {
 case AV_PIX_FMT_YUV420P:  return PF_YUV420P;
@@ -47,7 +47,7 @@ typedef struct {
 } VS2AVLogCtx;
 
 /** wrapper to log vs_log into av_log */
-static int vs_2_av_log_wrapper(int type, const char *tag, const char *format, 
...)
+static int vs2av_log(int type, const char *tag, const char *format, ...)
 {
 va_list ap;
 VS2AVLogCtx ctx;
@@ -66,7 +66,7 @@ static int vs_2_av_log_wrapper(int type, const char *tag, 
const char *format, ..
 }
 
 /** sets the memory allocation function and logging constants to av versions */
-void vs_set_mem_and_log_functions(void)
+void ff_vs_init(void)
 {
 vs_malloc  = av_malloc;
 vs_zalloc  = av_mallocz;
@@ -78,7 +78,7 @@ void vs_set_mem_and_log_functions(void)
 VS_INFO_TYPE  = AV_LOG_INFO;
 VS_MSG_TYPE   = AV_LOG_VERBOSE;
 
-vs_log   = vs_2_av_log_wrapper;
+vs_log   = vs2av_log;
 
 VS_ERROR = 0;
 VS_OK= 1;
diff --git a/libavfilter/vidstabutils.h b/libavfilter/vidstabutils.h
index f1c20e6..93278f6 100644
--- a/libavfilter/vidstabutils.h
+++ b/libavfilter/vidstabutils.h
@@ -28,9 +28,9 @@
 /* ** some conversions from avlib to vid.stab constants and functions *** */
 
 /** converts the pixelformat of avlib into the one of the vid.stab library */
-VSPixelFormat av_2_vs_pixel_format(AVFilterContext *ctx, enum AVPixelFormat 
pf);
+VSPixelFormat ff_av2vs_pixfmt(AVFilterContext *ctx, enum AVPixelFormat pf);
 
 /** sets the memory allocation function and logging constants to av versions */
-void vs_set_mem_and_log_functions(void);
+void

[FFmpeg-cvslog] avcodec/hevc_ps: fix 1 vs. 0 typo

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri Aug 22 
23:00:41 2014 +0200| [aaaf7261b707d2df518599e9ed1524f4298ad8db] | committer: 
Michael Niedermayer

avcodec/hevc_ps: fix 1 vs. 0 typo

Found-by: Timothy Gu 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aaaf7261b707d2df518599e9ed1524f4298ad8db
---

 libavcodec/hevc_ps.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 29412d2..365652c 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -472,7 +472,7 @@ static void decode_vui(HEVCContext *s, HEVCSPS *sps)
 VUI *vui  = &sps->vui;
 GetBitContext *gb = &s->HEVClc->gb;
 GetBitContext backup;
-int sar_present, alt = 1;
+int sar_present, alt = 0;
 
 av_log(s->avctx, AV_LOG_DEBUG, "Decoding VUI\n");
 

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


[FFmpeg-cvslog] h264: do not return on sidedata allocation failure

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: master | Christophe Gisquet  | 
Fri Aug 22 16:49:54 2014 +0200| [585047bb7dae67a366734db0845529add764f3b9] | 
committer: Michael Niedermayer

h264: do not return on sidedata allocation failure

Not having allocated it is not a good reason to leave the object
in an undetermined state. Though a particular setting like the
AV_EF_* flags could be useful to control that behaviour.

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=585047bb7dae67a366734db0845529add764f3b9
---

 libavcodec/h264.c |   16 +++-
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 389307b..cfe627f 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -835,9 +835,7 @@ static void decode_postinit(H264Context *h, int 
setup_finished)
 h->content_interpretation_type > 0 &&
 h->content_interpretation_type < 3) {
 AVStereo3D *stereo = av_stereo3d_create_side_data(&cur->f);
-if (!stereo)
-return;
-
+if (stereo) {
 switch (h->frame_packing_arrangement_type) {
 case 0:
 stereo->type = AV_STEREO3D_CHECKERBOARD;
@@ -867,6 +865,7 @@ static void decode_postinit(H264Context *h, int 
setup_finished)
 
 if (h->content_interpretation_type == 2)
 stereo->flags = AV_STEREO3D_FLAG_INVERT;
+}
 }
 
 if (h->sei_display_orientation_present &&
@@ -875,12 +874,11 @@ static void decode_postinit(H264Context *h, int 
setup_finished)
 AVFrameSideData *rotation = av_frame_new_side_data(&cur->f,

AV_FRAME_DATA_DISPLAYMATRIX,
sizeof(int32_t) * 
9);
-if (!rotation)
-return;
-
-av_display_rotation_set((int32_t *)rotation->data, angle);
-av_display_matrix_flip((int32_t *)rotation->data,
-   h->sei_vflip, h->sei_hflip);
+if (rotation) {
+av_display_rotation_set((int32_t *)rotation->data, angle);
+av_display_matrix_flip((int32_t *)rotation->data,
+   h->sei_vflip, h->sei_hflip);
+}
 }
 
 cur->mmco_reset = h->mmco_reset;

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


[FFmpeg-cvslog] avcodec/imc: Fix bitstream buffer padding

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat Aug 23 
01:34:28 2014 +0200| [7444cf9a9c0b8b2bba8198af2823521c654a48f4] | committer: 
Michael Niedermayer

avcodec/imc: Fix bitstream buffer padding

Fixes buffer overread

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7444cf9a9c0b8b2bba8198af2823521c654a48f4
---

 libavcodec/imc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 0df0dd1..2a5eac9 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -1018,7 +1018,7 @@ static int imc_decode_frame(AVCodecContext *avctx, void 
*data,
 
 IMCContext *q = avctx->priv_data;
 
-LOCAL_ALIGNED_16(uint16_t, buf16, [IMC_BLOCK_SIZE / 2]);
+LOCAL_ALIGNED_16(uint16_t, buf16, [IMC_BLOCK_SIZE / 2 + 
FF_INPUT_BUFFER_PADDING_SIZE/2]);
 
 if (buf_size < IMC_BLOCK_SIZE * avctx->channels) {
 av_log(avctx, AV_LOG_ERROR, "frame too small!\n");

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


[FFmpeg-cvslog] ffv1dec: check that global parameters do not change in version 0/1

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Fri Aug 
30 04:51:09 2013 +0200| [8231764784a405f546e9c427a6de22d3f4de5c35] | committer: 
Anton Khirnov

ffv1dec: check that global parameters do not change in version 0/1

Such changes are neither allowed nor supported

Found-by: ami_stuff
Bug-Id: CVE-2013-7020
CC: libav-sta...@libav.org
Signed-off-by: Anton Khirnov 
(cherry picked from commit da7d839a0d3ec40423a665dc85e0cfaed3f92eb8)
Signed-off-by: Anton Khirnov 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8231764784a405f546e9c427a6de22d3f4de5c35
---

 libavcodec/ffv1dec.c |   32 +---
 1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 8f7b2bf..e6c46e7 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -542,6 +542,7 @@ static int read_header(FFV1Context *f)
 memset(state, 128, sizeof(state));
 
 if (f->version < 2) {
+int chroma_planes, chroma_h_shift, chroma_v_shift, transparency, 
colorspace, bits_per_raw_sample;
 unsigned v = get_symbol(c, state, 0);
 if (v > 1) {
 av_log(f->avctx, AV_LOG_ERROR,
@@ -558,15 +559,32 @@ static int read_header(FFV1Context *f)
 get_symbol(c, state, 1) + c->one_state[i];
 }
 
-f->colorspace = get_symbol(c, state, 0); //YUV cs type
+colorspace  = get_symbol(c, state, 0); //YUV cs type
+bits_per_raw_sample = f->version > 0 ? get_symbol(c, state, 0) : 
f->avctx->bits_per_raw_sample;
+chroma_planes   = get_rac(c, state);
+chroma_h_shift  = get_symbol(c, state, 0);
+chroma_v_shift  = get_symbol(c, state, 0);
+transparency= get_rac(c, state);
+
+if (f->plane_count) {
+if (colorspace  != f->colorspace ||
+bits_per_raw_sample != f->avctx->bits_per_raw_sample ||
+chroma_planes   != f->chroma_planes  ||
+chroma_h_shift  != f->chroma_h_shift ||
+chroma_v_shift  != f->chroma_v_shift ||
+transparency!= f->transparency) {
+av_log(f->avctx, AV_LOG_ERROR, "Invalid change of global 
parameters\n");
+return AVERROR_INVALIDDATA;
+}
+}
 
-if (f->version > 0)
-f->avctx->bits_per_raw_sample = get_symbol(c, state, 0);
+f->colorspace = colorspace;
+f->avctx->bits_per_raw_sample = bits_per_raw_sample;
+f->chroma_planes  = chroma_planes;
+f->chroma_h_shift = chroma_h_shift;
+f->chroma_v_shift = chroma_v_shift;
+f->transparency   = transparency;
 
-f->chroma_planes  = get_rac(c, state);
-f->chroma_h_shift = get_symbol(c, state, 0);
-f->chroma_v_shift = get_symbol(c, state, 0);
-f->transparency   = get_rac(c, state);
 f->plane_count= 2 + f->transparency;
 }
 

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


[FFmpeg-cvslog] mpegts: Define the section length with a constant

2014-08-22 Thread Luca Barbato
ffmpeg | branch: release/2.2 | Luca Barbato  | Sun Aug  3 
19:27:07 2014 +0200| [23376ae2f0247ff659724b6a5313639db0c991ad] | committer: 
Diego Biurrun

mpegts: Define the section length with a constant

The specification says the value is expressed in 10 bits including
the 4-byte CRC.

(cherry picked from commit 89616408e38ac7257e36976723df0e23d6ee1157)
Signed-off-by: Diego Biurrun 

Conflicts:
libavformat/mpegtsenc.c

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23376ae2f0247ff659724b6a5313639db0c991ad
---

 libavformat/mpegtsenc.c |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 8efd93e..1026200 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -88,6 +88,10 @@ typedef struct MpegTSWrite {
 #define DEFAULT_PES_HEADER_FREQ 16
 #define DEFAULT_PES_PAYLOAD_SIZE ((DEFAULT_PES_HEADER_FREQ - 1) * 184 + 170)
 
+/* The section length is 12 bits. The first 2 are set to 0, the remaining
+ * 10 bits should not exceed 1021. */
+#define SECTION_LENGTH 1020
+
 static const AVOption options[] = {
 { "mpegts_transport_stream_id", "Set transport_stream_id field.",
   offsetof(MpegTSWrite, transport_stream_id), AV_OPT_TYPE_INT, {.i64 = 
0x0001 }, 0x0001, 0x, AV_OPT_FLAG_ENCODING_PARAM},
@@ -234,7 +238,7 @@ static void mpegts_write_pat(AVFormatContext *s)
 {
 MpegTSWrite *ts = s->priv_data;
 MpegTSService *service;
-uint8_t data[1012], *q;
+uint8_t data[SECTION_LENGTH], *q;
 int i;
 
 q = data;
@@ -250,7 +254,7 @@ static void mpegts_write_pat(AVFormatContext *s)
 static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
 {
 MpegTSWrite *ts = s->priv_data;
-uint8_t data[1012], *q, *desc_length_ptr, *program_info_length_ptr;
+uint8_t data[SECTION_LENGTH], *q, *desc_length_ptr, 
*program_info_length_ptr;
 int val, stream_type, i;
 
 q = data;
@@ -405,7 +409,7 @@ static void mpegts_write_sdt(AVFormatContext *s)
 {
 MpegTSWrite *ts = s->priv_data;
 MpegTSService *service;
-uint8_t data[1012], *q, *desc_list_len_ptr, *desc_len_ptr;
+uint8_t data[SECTION_LENGTH], *q, *desc_list_len_ptr, *desc_len_ptr;
 int i, running_status, free_ca_mode, val;
 
 q = data;

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


[FFmpeg-cvslog] proresenc_kostya: properly account for alpha

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: release/2.2 | Christophe Gisquet 
 | Mon Aug 11 19:43:27 2014 +0200| 
[1578986a0da41ab417f5964fa192d27b759f] | committer: Michael Niedermayer

proresenc_kostya: properly account for alpha

The packet buffer allocation considered as dct-coded, while it is
actually run-coded and thus requires a larger buffer.

Signed-off-by: Michael Niedermayer 
(cherry picked from commit 117bc8e6ffc744fedcf77edf2fdb33c964b83370)

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1578986a0da41ab417f5964fa192d27b759f
---

 libavcodec/proresenc_kostya.c |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index aac4b07..463056c 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1209,8 +1209,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
 ctx->bits_per_mb = ls * 8;
 if (ctx->chroma_factor == CFACTOR_Y444)
 ctx->bits_per_mb += ls * 4;
-if (ctx->num_planes == 4)
-ctx->bits_per_mb += ls * 4;
 }
 
 ctx->frame_size_upper_bound = ctx->pictures_per_frame *
@@ -1219,6 +1217,14 @@ static av_cold int encode_init(AVCodecContext *avctx)
(mps * ctx->bits_per_mb) / 8)
   + 200;
 
+if (ctx->alpha_bits) {
+ // alpha plane is run-coded and might run over bit budget
+ ctx->frame_size_upper_bound += ctx->pictures_per_frame *
+ctx->slices_per_picture *
+ /* num pixels per slice */ (ctx->mbs_per_slice * 256 *
+ /* bits per pixel */(1 + ctx->alpha_bits + 1) + 7 >> 3);
+}
+
 avctx->codec_tag   = ctx->profile_info->tag;
 
 av_log(avctx, AV_LOG_DEBUG,

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


[FFmpeg-cvslog] Merge commit '23376ae2f0247ff659724b6a5313639db0c991ad' into release/2.2

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sat Aug 
23 02:17:42 2014 +0200| [f1da6691a41fb46059a4d4a413c6e34abea135bd] | committer: 
Michael Niedermayer

Merge commit '23376ae2f0247ff659724b6a5313639db0c991ad' into release/2.2

* commit '23376ae2f0247ff659724b6a5313639db0c991ad':
  mpegts: Define the section length with a constant

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f1da6691a41fb46059a4d4a413c6e34abea135bd
---



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


[FFmpeg-cvslog] Merge commit '8231764784a405f546e9c427a6de22d3f4de5c35' into release/2.2

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sat Aug 
23 02:15:54 2014 +0200| [5b1a953960ddb78995c9a784baf910ad3299ecce] | committer: 
Michael Niedermayer

Merge commit '8231764784a405f546e9c427a6de22d3f4de5c35' into release/2.2

* commit '8231764784a405f546e9c427a6de22d3f4de5c35':
  ffv1dec: check that global parameters do not change in version 0/1

Conflicts:
libavcodec/ffv1dec.c

See: b05cd1ea7e45a836f7f6071a716c38bb30326e0f
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5b1a953960ddb78995c9a784baf910ad3299ecce
---



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


[FFmpeg-cvslog] Merge commit '7788297a59656ececd84f602292bfeb79f7eedd7' into release/2.2

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sat Aug 
23 02:32:04 2014 +0200| [afbaf6b367e17b487864ac37fb42fed6c274c500] | committer: 
Michael Niedermayer

Merge commit '7788297a59656ececd84f602292bfeb79f7eedd7' into release/2.2

* commit '7788297a59656ececd84f602292bfeb79f7eedd7':
  mpegts: Do not try to write a PMT larger than SECTION_SIZE

Conflicts:
libavformat/mpegtsenc.c

See: 842b6c14bcfc1c5da1a2d288fd65386eb8c158ad
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=afbaf6b367e17b487864ac37fb42fed6c274c500
---



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


[FFmpeg-cvslog] mpegts: Do not try to write a PMT larger than SECTION_SIZE

2014-08-22 Thread Luca Barbato
ffmpeg | branch: release/2.2 | Luca Barbato  | Tue Aug 12 
20:21:12 2014 +0200| [7788297a59656ececd84f602292bfeb79f7eedd7] | committer: 
Diego Biurrun

mpegts: Do not try to write a PMT larger than SECTION_SIZE

Prevent out of array writes.

Similar to what Michael Niedermayer did to address the same issue.

Bug-Id: CVE-2014-2263
CC: libav-sta...@libav.org

Signed-off-by: Diego Biurrun 
(cherry picked from commit e8049af1325dd59a51546c15b2e71a0f578e9d27)

Conflicts:
libavformat/mpegtsenc.c

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7788297a59656ececd84f602292bfeb79f7eedd7
---

 libavformat/mpegtsenc.c |   24 +++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 1026200..4dc52bf 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -255,7 +255,7 @@ static void mpegts_write_pmt(AVFormatContext *s, 
MpegTSService *service)
 {
 MpegTSWrite *ts = s->priv_data;
 uint8_t data[SECTION_LENGTH], *q, *desc_length_ptr, 
*program_info_length_ptr;
-int val, stream_type, i;
+int val, stream_type, i, err = 0;
 
 q = data;
 put16(&q, 0xe000 | service->pcr_pid);
@@ -273,6 +273,11 @@ static void mpegts_write_pmt(AVFormatContext *s, 
MpegTSService *service)
 AVStream *st = s->streams[i];
 MpegTSWriteStream *ts_st = st->priv_data;
 AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", 
NULL,0);
+
+if (q - data > SECTION_LENGTH - 3 - 2 - 6) {
+err = 1;
+break;
+}
 switch(st->codec->codec_id) {
 case AV_CODEC_ID_MPEG1VIDEO:
 case AV_CODEC_ID_MPEG2VIDEO:
@@ -325,6 +330,10 @@ static void mpegts_write_pmt(AVFormatContext *s, 
MpegTSService *service)
 *len_ptr = 0;
 
 for (p = lang->value; next && *len_ptr < 255 / 4 * 4; p = next 
+ 1) {
+if (q - data > SECTION_LENGTH - 4) {
+err = 1;
+break;
+}
 next = strchr(p, ',');
 if (strlen(p) != 3 && (!next || next != p + 3))
 continue; /* not a 3-letter code */
@@ -359,6 +368,12 @@ static void mpegts_write_pmt(AVFormatContext *s, 
MpegTSService *service)
 *q++ = language[1];
 *q++ = language[2];
 *q++ = 0x10; /* normal subtitles (0x20 = if hearing pb) */
+
+if (q - data > SECTION_LENGTH - 4) {
+err = 1;
+break;
+}
+
 if(st->codec->extradata_size == 4) {
 memcpy(q, st->codec->extradata, 4);
 q += 4;
@@ -384,6 +399,13 @@ static void mpegts_write_pmt(AVFormatContext *s, 
MpegTSService *service)
 desc_length_ptr[0] = val >> 8;
 desc_length_ptr[1] = val;
 }
+
+if (err)
+av_log(s, AV_LOG_ERROR,
+   "The PMT section cannot fit stream %d and all following 
streams.\n"
+   "Try reducing the number of languages in the audio streams "
+   "or the total number of streams.\n", i);
+
 mpegts_write_section1(&service->pmt, PMT_TID, service->sid, 0, 0, 0,
   data, q - data);
 }

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


[FFmpeg-cvslog] proresenc: Remove unneeded parameters from encode_alpha_plane()

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: release/2.2 | Christophe Gisquet 
 | Mon Aug 18 14:15:21 2014 +| 
[b3f48a5044fd04539337e91d28022207c9d3b9e8] | committer: Luca Barbato

proresenc: Remove unneeded parameters from encode_alpha_plane()

Signed-off-by: Diego Biurrun 
Signed-off-by: Luca Barbato 
(cherry picked from commit b16699f2da9c1d41eff852ec3a0c81f74fd44421)
Signed-off-by: Luca Barbato 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3f48a5044fd04539337e91d28022207c9d3b9e8
---

 libavcodec/proresenc.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c
index 7e9ce54..c03b3b5 100644
--- a/libavcodec/proresenc.c
+++ b/libavcodec/proresenc.c
@@ -467,7 +467,6 @@ static void put_alpha_run(PutBitContext *pb, int run)
 
 // todo alpha quantisation for high quants
 static int encode_alpha_plane(ProresContext *ctx, PutBitContext *pb,
-  const uint16_t *src, int linesize,
   int mbs_per_slice, uint16_t *blocks,
   int quant)
 {
@@ -562,9 +561,8 @@ static int encode_slice(AVCodecContext *avctx, const 
AVFrame *pic,
 get_alpha_data(ctx, src, linesize, xp, yp,
pwidth, avctx->height / ctx->pictures_per_frame,
ctx->blocks[0], mbs_per_slice, ctx->alpha_bits);
-sizes[i] = encode_alpha_plane(ctx, pb, src, linesize,
-  mbs_per_slice, ctx->blocks[0],
-  quant);
+sizes[i] = encode_alpha_plane(ctx, pb, mbs_per_slice,
+  ctx->blocks[0], quant);
 }
 total_size += sizes[i];
 }

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


[FFmpeg-cvslog] Update Changelog for v10.4

2014-08-22 Thread Reinhard Tartler
ffmpeg | branch: release/2.2 | Reinhard Tartler  | Sun Aug 
17 10:23:20 2014 -0400| [ee9e966296d74ca3836be5b5adc839cfc73d8c98] | committer: 
Reinhard Tartler

Update Changelog for v10.4

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee9e966296d74ca3836be5b5adc839cfc73d8c98
---

 Changelog |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/Changelog b/Changelog
index 07ea870..ed1292b 100644
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,20 @@
 Entries are sorted chronologically from oldest to youngest within each release,
 releases are sorted from youngest to oldest.
 
+version 10.4:
+- mpegts: Do not try to write a PMT larger than SECTION_SIZE (CVE-2014-2263)
+- mpegts: Define the section length with a constant
+- ffv1dec: check that global parameters do not change in version 0/1 
(CVE-2013-7020)
+- h264: fix interpretation of interleaved stereo modes
+- svq1: do not modify the input packet
+- cdgraphics: do not return 0 from the decode function
+- cdgraphics: switch to bytestream2 (CVE-2013-3674)
+- jpeg2000: enable 4 component pixel formats
+- stereo3d: add missing include guards
+- huffyuvdec: check width size for yuv422p (CVE-2013-0848)
+- mmvideo: check horizontal coordinate too (CVE-2013-3672)
+- wmalosslessdec: fix mclms_coeffs* array size (CVE-2014-2098)
+
 version 10.3:
 - huffyuv: Check and propagate function return values (CVE-2013-0868)
 - h264: prevent theoretical infinite loop in SEI parsing (CVE-2011-3946)

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


[FFmpeg-cvslog] proresenc: Report buffer overflow

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: release/2.2 | Christophe Gisquet 
 | Mon Aug 18 14:15:22 2014 +| 
[e912b0777b24133df27836b6c529faa89af588dc] | committer: Luca Barbato

proresenc: Report buffer overflow

If the allocated size, despite best efforts, is too small, exit
with the appropriate error.

CC: libav-sta...@libav.org

Signed-off-by: Diego Biurrun 
Signed-off-by: Luca Barbato 
(cherry picked from commit 58b68e4fdea22e22178e237bda950b09cc6f363a)
Signed-off-by: Luca Barbato 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e912b0777b24133df27836b6c529faa89af588dc
---

 libavcodec/proresenc.c |   14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c
index c03b3b5..90f7406 100644
--- a/libavcodec/proresenc.c
+++ b/libavcodec/proresenc.c
@@ -565,6 +565,11 @@ static int encode_slice(AVCodecContext *avctx, const 
AVFrame *pic,
   ctx->blocks[0], quant);
 }
 total_size += sizes[i];
+if (put_bits_left(pb) < 0) {
+av_log(avctx, AV_LOG_ERROR,
+   "Underestimated required buffer size.\n");
+return AVERROR_BUG;
+}
 }
 return total_size;
 }
@@ -935,9 +940,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
 avctx->coded_frame->key_frame = 1;
 
-pkt_size = ctx->frame_size_upper_bound + FF_MIN_BUFFER_SIZE;
+pkt_size = ctx->frame_size_upper_bound;
 
-if ((ret = ff_alloc_packet(pkt, pkt_size)) < 0) {
+if ((ret = ff_alloc_packet(pkt, pkt_size + FF_MIN_BUFFER_SIZE)) < 0) {
 av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n");
 return ret;
 }
@@ -1016,7 +1021,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 slice_hdr = buf;
 buf += slice_hdr_size - 1;
 init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8);
-encode_slice(avctx, pic, &pb, sizes, x, y, q, mbs_per_slice);
+ret = encode_slice(avctx, pic, &pb, sizes, x, y, q,
+   mbs_per_slice);
+if (ret < 0)
+return ret;
 
 bytestream_put_byte(&slice_hdr, q);
 slice_size = slice_hdr_size + sizes[ctx->num_planes - 1];

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


[FFmpeg-cvslog] Merge commit 'e912b0777b24133df27836b6c529faa89af588dc' into release/2.2

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sat Aug 
23 02:47:33 2014 +0200| [459a84ada3b7e0bac3a0ea7360e83cc87f625d31] | committer: 
Michael Niedermayer

Merge commit 'e912b0777b24133df27836b6c529faa89af588dc' into release/2.2

* commit 'e912b0777b24133df27836b6c529faa89af588dc':
  proresenc: Report buffer overflow

Conflicts:
libavcodec/proresenc_kostya.c

See: 1ad1723c24cd2683df6d00a83b6f28d3ff45fb96
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=459a84ada3b7e0bac3a0ea7360e83cc87f625d31
---



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


[FFmpeg-cvslog] Prepare for 10.4 Release

2014-08-22 Thread Reinhard Tartler
ffmpeg | branch: release/2.2 | Reinhard Tartler  | Sun Aug 
17 10:19:48 2014 -0400| [493a92313fa6c7529ddab0045e1b4eee9ec7a85e] | committer: 
Reinhard Tartler

Prepare for 10.4 Release

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=493a92313fa6c7529ddab0045e1b4eee9ec7a85e
---

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

diff --git a/RELEASE b/RELEASE
index 260e375..1be519c 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1 +1 @@
-10.3
+10.4

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


[FFmpeg-cvslog] Merge commit 'b3f48a5044fd04539337e91d28022207c9d3b9e8' into release/2.2

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sat Aug 
23 02:45:00 2014 +0200| [35fe089dd9b667bb5e7537b35a0d03b6bcb01b0c] | committer: 
Michael Niedermayer

Merge commit 'b3f48a5044fd04539337e91d28022207c9d3b9e8' into release/2.2

* commit 'b3f48a5044fd04539337e91d28022207c9d3b9e8':
  proresenc: Remove unneeded parameters from encode_alpha_plane()

Conflicts:
libavcodec/proresenc_kostya.c

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35fe089dd9b667bb5e7537b35a0d03b6bcb01b0c
---



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


[FFmpeg-cvslog] Merge commit 'ee9e966296d74ca3836be5b5adc839cfc73d8c98' into release/2.2

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sat Aug 
23 02:43:40 2014 +0200| [9e6d8c309f2763364ca2aaab801963a302bdfe82] | committer: 
Michael Niedermayer

Merge commit 'ee9e966296d74ca3836be5b5adc839cfc73d8c98' into release/2.2

* commit 'ee9e966296d74ca3836be5b5adc839cfc73d8c98':
  Update Changelog for v10.4
  Prepare for 10.4 Release

Conflicts:
Changelog
RELEASE

Not merged as these dont apply to FFmpeg

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e6d8c309f2763364ca2aaab801963a302bdfe82
---



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


[FFmpeg-cvslog] Merge commit 'a437298de55c6a6a4f06b12335b3891bf4459082' into release/2.2

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sat Aug 
23 02:58:21 2014 +0200| [bb1d75e6c5e3ff0f4c4b7e53e4f9aacc25a110f4] | committer: 
Michael Niedermayer

Merge commit 'a437298de55c6a6a4f06b12335b3891bf4459082' into release/2.2

* commit 'a437298de55c6a6a4f06b12335b3891bf4459082':
  proresenc: Realloc if buffer is too small

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bb1d75e6c5e3ff0f4c4b7e53e4f9aacc25a110f4
---



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


[FFmpeg-cvslog] proresenc: Properly account for alpha plane

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: release/2.2 | Christophe Gisquet 
 | Mon Aug 18 14:15:24 2014 +| 
[f25f5f8c62ec7728ee7f5dcc8f1abd0dc6235735] | committer: Luca Barbato

proresenc: Properly account for alpha plane

The packet buffer allocation considers the alpha channel as DCT-coded,
while it is actually run-coded and thus requires a larger buffer.

CC: libav-sta...@libav.org

Signed-off-by: Diego Biurrun 
Signed-off-by: Luca Barbato 
(cherry picked from commit 41e1354c101004ccd46dc08d3dd6e956e83a6b51)
Signed-off-by: Luca Barbato 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f25f5f8c62ec7728ee7f5dcc8f1abd0dc6235735
---

 libavcodec/proresenc.c |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c
index 570a73c..a43612c 100644
--- a/libavcodec/proresenc.c
+++ b/libavcodec/proresenc.c
@@ -1231,8 +1231,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
 ctx->bits_per_mb = ls * 8;
 if (ctx->chroma_factor == CFACTOR_Y444)
 ctx->bits_per_mb += ls * 4;
-if (ctx->num_planes == 4)
-ctx->bits_per_mb += ls * 4;
 }
 
 ctx->frame_size_upper_bound = ctx->pictures_per_frame *
@@ -1241,6 +1239,14 @@ static av_cold int encode_init(AVCodecContext *avctx)
(mps * ctx->bits_per_mb) / 8)
   + 200;
 
+if (ctx->alpha_bits) {
+ // The alpha plane is run-coded and might exceed the bit budget.
+ ctx->frame_size_upper_bound += ctx->pictures_per_frame *
+ctx->slices_per_picture *
+ /* num pixels per slice */ (ctx->mbs_per_slice * 256 *
+ /* bits per pixel */(1 + ctx->alpha_bits + 1) + 7 >> 3);
+}
+
 avctx->codec_tag   = ctx->profile_info->tag;
 
 av_log(avctx, AV_LOG_DEBUG,

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


[FFmpeg-cvslog] proresenc: Realloc if buffer is too small

2014-08-22 Thread Christophe Gisquet
ffmpeg | branch: release/2.2 | Christophe Gisquet 
 | Mon Aug 18 14:15:23 2014 +| 
[a437298de55c6a6a4f06b12335b3891bf4459082] | committer: Luca Barbato

proresenc: Realloc if buffer is too small

The buffer allocation may be incorrect (e.g. with an alpha plane),
and currently causes the buffer to be set to NULL by init_put_bits,
causing a crash later on.

So, detect that situation, and if detected, reallocate the buffer
and ask for a sample that shows the problem.

CC: libav-sta...@libav.org

Signed-off-by: Diego Biurrun 
Signed-off-by: Luca Barbato 
(cherry picked from commit 45ce880a9b3e50cfa088f111dffaf8685bd7bc6b)
Signed-off-by: Luca Barbato 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a437298de55c6a6a4f06b12335b3891bf4459082
---

 libavcodec/proresenc.c |   38 +-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c
index 90f7406..570a73c 100644
--- a/libavcodec/proresenc.c
+++ b/libavcodec/proresenc.c
@@ -205,6 +205,7 @@ typedef struct ProresContext {
 int bits_per_mb;
 int force_quant;
 int alpha_bits;
+int warn;
 
 char *vendor;
 int quant_sel;
@@ -933,7 +934,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 int sizes[4] = { 0 };
 int slice_hdr_size = 2 + 2 * (ctx->num_planes - 1);
 int frame_size, picture_size, slice_size;
-int pkt_size, ret;
+int pkt_size, ret, max_slice_size = 0;
 uint8_t frame_flags;
 
 *avctx->coded_frame   = *pic;
@@ -1020,6 +1021,39 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 bytestream_put_byte(&buf, slice_hdr_size << 3);
 slice_hdr = buf;
 buf += slice_hdr_size - 1;
+if (pkt_size <= buf - orig_buf + 2 * max_slice_size) {
+uint8_t *start = pkt->data;
+// Recompute new size according to max_slice_size
+// and deduce delta
+int delta = 200 + ctx->pictures_per_frame *
+ctx->slices_per_picture * max_slice_size -
+pkt_size;
+
+delta = FFMAX(delta, 2 * max_slice_size);
+ctx->frame_size_upper_bound += delta;
+
+if (!ctx->warn) {
+avpriv_request_sample(avctx,
+  "Packet too small: is %i,"
+  " needs %i (slice: %i). "
+  "Correct allocation",
+  pkt_size, delta, max_slice_size);
+ctx->warn = 1;
+}
+
+ret = av_grow_packet(pkt, delta);
+if (ret < 0)
+return ret;
+
+pkt_size += delta;
+// restore pointers
+orig_buf = pkt->data + (orig_buf - start);
+buf  = pkt->data + (buf  - start);
+picture_size_pos = pkt->data + (picture_size_pos - start);
+slice_sizes  = pkt->data + (slice_sizes  - start);
+slice_hdr= pkt->data + (slice_hdr- start);
+tmp  = pkt->data + (tmp  - start);
+}
 init_put_bits(&pb, buf, (pkt_size - (buf - orig_buf)) * 8);
 ret = encode_slice(avctx, pic, &pb, sizes, x, y, q,
mbs_per_slice);
@@ -1034,6 +1068,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 }
 bytestream_put_be16(&slice_sizes, slice_size);
 buf += slice_size - slice_hdr_size;
+if (max_slice_size < slice_size)
+max_slice_size = slice_size;
 }
 }
 

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


[FFmpeg-cvslog] Merge commit 'f25f5f8c62ec7728ee7f5dcc8f1abd0dc6235735' into release/2.2

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sat Aug 
23 02:59:22 2014 +0200| [8b55f67e3ee3dabb11877aa0df2ba56d1423be43] | committer: 
Michael Niedermayer

Merge commit 'f25f5f8c62ec7728ee7f5dcc8f1abd0dc6235735' into release/2.2

* commit 'f25f5f8c62ec7728ee7f5dcc8f1abd0dc6235735':
  proresenc: Properly account for alpha plane

Conflicts:
libavcodec/proresenc_kostya.c

See: 1578986a0da41ab417f5964fa192d27b759f
Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b55f67e3ee3dabb11877aa0df2ba56d1423be43
---



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


[FFmpeg-cvslog] setpts: Add missing inttypes.h #include for PRId64

2014-08-22 Thread Diego Biurrun
ffmpeg | branch: release/2.2 | Diego Biurrun  | Wed Aug 20 
09:54:50 2014 -0700| [37e2d574ddcedc25e32bd963737b033354543789] | committer: 
Diego Biurrun

setpts: Add missing inttypes.h #include for PRId64

Also convert a debug av_log() to av_dlog().

(cherry picked from commit a89dd9a72c6e9c3111d6f34d9b08cd624fe76358)
Signed-off-by: Diego Biurrun 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37e2d574ddcedc25e32bd963737b033354543789
---

 libavfilter/setpts.c |   17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c
index be190c0..926fbf7 100644
--- a/libavfilter/setpts.c
+++ b/libavfilter/setpts.c
@@ -24,6 +24,8 @@
  * video presentation timestamp (PTS) modification filter
  */
 
+#include 
+
 #include "libavutil/eval.h"
 #include "libavutil/internal.h"
 #include "libavutil/mathematics.h"
@@ -141,15 +143,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*frame)
 d = av_expr_eval(setpts->expr, setpts->var_values, NULL);
 frame->pts = D2TS(d);
 
-#ifdef DEBUG
-av_log(inlink->dst, AV_LOG_DEBUG,
-   "n:%"PRId64" interlaced:%d pts:%"PRId64" t:%f -> pts:%"PRId64" 
t:%f\n",
-   (int64_t)setpts->var_values[VAR_N],
-   (int)setpts->var_values[VAR_INTERLACED],
-   in_pts, in_pts * av_q2d(inlink->time_base),
-   frame->pts, frame->pts * av_q2d(inlink->time_base));
-#endif
-
+av_dlog(inlink->dst,
+"n:%"PRId64" interlaced:%d pts:%"PRId64" t:%f -> pts:%"PRId64" 
t:%f\n",
+(int64_t)setpts->var_values[VAR_N],
+(int)setpts->var_values[VAR_INTERLACED],
+in_pts, in_pts * av_q2d(inlink->time_base),
+frame->pts, frame->pts * av_q2d(inlink->time_base));
 
 if (inlink->type == AVMEDIA_TYPE_VIDEO) {
 setpts->var_values[VAR_N] += 1.0;

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


[FFmpeg-cvslog] Merge commit '37e2d574ddcedc25e32bd963737b033354543789' into release/2.2

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: release/2.2 | Michael Niedermayer  | Sat Aug 
23 03:15:51 2014 +0200| [5ac46a0969a3c86422794c838b681c75fda6b25e] | committer: 
Michael Niedermayer

Merge commit '37e2d574ddcedc25e32bd963737b033354543789' into release/2.2

* commit '37e2d574ddcedc25e32bd963737b033354543789':
  setpts: Add missing inttypes.h #include for PRId64

Conflicts:
libavfilter/setpts.c

Merged-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ac46a0969a3c86422794c838b681c75fda6b25e
---



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


[FFmpeg-cvslog] avcodec/h264: do proper cleanup in ff_h264_alloc_tables() in case DPB alloc fails

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu Aug 21 
16:15:16 2014 +0200| [949057c95879e601bd33c8a42eeca39ced2b9a2d] | committer: 
Michael Niedermayer

avcodec/h264: do proper cleanup in ff_h264_alloc_tables() in case DPB alloc 
fails

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=949057c95879e601bd33c8a42eeca39ced2b9a2d
---

 libavcodec/h264.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index cfe627f..ed1365d 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -473,7 +473,7 @@ int ff_h264_alloc_tables(H264Context *h)
 if (!h->DPB) {
 h->DPB = av_mallocz_array(H264_MAX_PICTURE_COUNT, sizeof(*h->DPB));
 if (!h->DPB)
-return AVERROR(ENOMEM);
+goto fail;
 for (i = 0; i < H264_MAX_PICTURE_COUNT; i++)
 av_frame_unref(&h->DPB[i].f);
 av_frame_unref(&h->cur_pic.f);

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


[FFmpeg-cvslog] avcodec/h264_slice: More complete cleanup in h264_slice_header_init()

2014-08-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu Aug 21 
16:33:03 2014 +0200| [1fa35e4352cc39894987e14de464e3d72b55739f] | committer: 
Michael Niedermayer

avcodec/h264_slice: More complete cleanup in h264_slice_header_init()

Fixes null pointer dereference
Fixes Ticket3873

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1fa35e4352cc39894987e14de464e3d72b55739f
---

 libavcodec/h264_slice.c |   16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index fc744f2..c5a9784 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1173,7 +1173,7 @@ static int h264_slice_header_init(H264Context *h, int 
reinit)
 ret = ff_h264_alloc_tables(h);
 if (ret < 0) {
 av_log(h->avctx, AV_LOG_ERROR, "Could not allocate memory\n");
-return ret;
+goto fail;
 }
 
 if (nb_slices > H264_MAX_THREADS || (nb_slices > h->mb_height && 
h->mb_height)) {
@@ -1192,14 +1192,16 @@ static int h264_slice_header_init(H264Context *h, int 
reinit)
 ret = ff_h264_context_init(h);
 if (ret < 0) {
 av_log(h->avctx, AV_LOG_ERROR, "context_init() failed.\n");
-return ret;
+goto fail;
 }
 } else {
 for (i = 1; i < h->slice_context_count; i++) {
 H264Context *c;
 c= h->thread_context[i] = 
av_mallocz(sizeof(H264Context));
-if (!c)
-return AVERROR(ENOMEM);
+if (!c) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
 c->avctx = h->avctx;
 if (CONFIG_ERROR_RESILIENCE) {
 c->mecc  = h->mecc;
@@ -1238,13 +1240,17 @@ static int h264_slice_header_init(H264Context *h, int 
reinit)
 for (i = 0; i < h->slice_context_count; i++)
 if ((ret = ff_h264_context_init(h->thread_context[i])) < 0) {
 av_log(h->avctx, AV_LOG_ERROR, "context_init() failed.\n");
-return ret;
+goto fail;
 }
 }
 
 h->context_initialized = 1;
 
 return 0;
+fail:
+ff_h264_free_tables(h, 0);
+h->context_initialized = 0;
+return ret;
 }
 
 static enum AVPixelFormat non_j_pixfmt(enum AVPixelFormat a)

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