Re: [FFmpeg-devel] [PATCH 2/2] diracdec: Pass DWTPlane to dwt init

2016-02-07 Thread Rostislav Pehlivanov
On 7 February 2016 at 14:53, Timothy Gu  wrote:

> ---
>  libavcodec/dirac_dwt.c | 15 +++
>  libavcodec/dirac_dwt.h |  5 ++---
>  libavcodec/diracdec.c  |  4 ++--
>  3 files changed, 11 insertions(+), 13 deletions(-)
>
>
LGTM

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


[FFmpeg-devel] [PATCH 2/2] diracdec: Pass DWTPlane to dwt init

2016-02-07 Thread Timothy Gu
---
 libavcodec/dirac_dwt.c | 15 +++
 libavcodec/dirac_dwt.h |  5 ++---
 libavcodec/diracdec.c  |  4 ++--
 3 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/libavcodec/dirac_dwt.c b/libavcodec/dirac_dwt.c
index 4f04112..cc08f88 100644
--- a/libavcodec/dirac_dwt.c
+++ b/libavcodec/dirac_dwt.c
@@ -33,18 +33,17 @@
 #define TEMPLATE_12bit
 #include "dirac_dwt_template.c"
 
-int ff_spatial_idwt_init(DWTContext *d, uint8_t *buffer, int width, int height,
- int stride, enum dwt_type type, int 
decomposition_count,
- uint8_t *temp, int bit_depth)
+int ff_spatial_idwt_init(DWTContext *d, DWTPlane *p, enum dwt_type type,
+ int decomposition_count, int bit_depth)
 {
 int ret = 0;
 
-d->buffer = buffer;
-d->width  = width;
-d->height = height;
-d->stride = stride;
+d->buffer = p->buf;
+d->width  = p->width;
+d->height = p->height;
+d->stride = p->stride;
+d->temp   = p->tmp;
 d->decomposition_count = decomposition_count;
-d->temp   = temp;
 
 if (bit_depth == 8)
 ret = ff_spatial_idwt_init_8bit(d, type);
diff --git a/libavcodec/dirac_dwt.h b/libavcodec/dirac_dwt.h
index 63302ae..4d33865 100644
--- a/libavcodec/dirac_dwt.h
+++ b/libavcodec/dirac_dwt.h
@@ -85,9 +85,8 @@ enum dwt_type {
 };
 
 // -1 if an error occurred, e.g. the dwt_type isn't recognized
-int ff_spatial_idwt_init(DWTContext *d, uint8_t *buffer, int width, int height,
- int stride, enum dwt_type type, int 
decomposition_count,
- uint8_t *temp, int bit_depth);
+int ff_spatial_idwt_init(DWTContext *d, DWTPlane *p, enum dwt_type type,
+ int decomposition_count, int bit_depth);
 void ff_spatial_idwt_init_x86(DWTContext *d, enum dwt_type type);
 
 void ff_spatial_idwt_slice2(DWTContext *d, int y);
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index 473dbec..e530a05 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -1750,8 +1750,8 @@ static int dirac_decode_frame_internal(DiracContext *s)
 memset(p->idwt.buf, 0, p->idwt.stride * p->idwt.height);
 decode_component(s, comp); /* [DIRAC_STD] 13.4.1 
core_transform_data() */
 }
-ret = ff_spatial_idwt_init(, p->idwt.buf, p->idwt.width, 
p->idwt.height, p->idwt.stride,
-   s->wavelet_idx+2, s->wavelet_depth, 
p->idwt.tmp, s->bit_depth);
+ret = ff_spatial_idwt_init(, >idwt, s->wavelet_idx+2,
+   s->wavelet_depth, s->bit_depth);
 if (ret < 0)
 return ret;
 
-- 
2.1.4

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


Re: [FFmpeg-devel] [PATCH 2/2] diracdec: Pass DWTPlane to dwt init

2016-02-07 Thread Timothy Gu
On Sun, Feb 07, 2016 at 03:35:31PM +, Rostislav Pehlivanov wrote:
> On 7 February 2016 at 14:53, Timothy Gu  wrote:
> 
> > ---
> >  libavcodec/dirac_dwt.c | 15 +++
> >  libavcodec/dirac_dwt.h |  5 ++---
> >  libavcodec/diracdec.c  |  4 ++--
> >  3 files changed, 11 insertions(+), 13 deletions(-)
> >
> >
> LGTM
> 
> Thanks

Pushed. Thanks.

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