On Fri, Apr 19, 2013 at 11:51:36AM +0200, Nicolas Bertrand wrote:
> ---
> Dondiego remakrs taken into account.
> And used of 2 types(int32_t and float) pointer buffer for DWT buffers
> The patch base is DonDiego jpeg2000_current branch in gitorious.
>
>
> libavcodec/jpeg2000.c | 9 +-
> libavcodec/jpeg2000dec.c | 132 ++++++++++++++++------
> libavcodec/jpeg2000dwt.c | 182
> ++++++++++++++++++++++++------
> libavcodec/jpeg2000dwt.h | 6 +-
> tests/fate/video.mak | 3 +
> tests/ref/fate/jpeg2000-dcinema-bitexact | 3 +
> 6 files changed, 262 insertions(+), 73 deletions(-)
> create mode 100644 tests/ref/fate/jpeg2000-dcinema-bitexact
>
> diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
> index c7b612c..fd73622 100644
> --- a/libavcodec/jpeg2000dwt.c
> +++ b/libavcodec/jpeg2000dwt.c
> @@ -260,5 +366,13 @@ int ff_dwt_decode(DWTContext *s, void *t)
>
> void ff_dwt_destroy(DWTContext *s)
> {
> - av_freep(&s->linebuf);
> + switch (s->type) {
> + case FF_DWT97:
> + av_freep(&s->f_linebuf);
> + break;
> + case FF_DWT97_INT:
> + case FF_DWT53:
> + av_freep(&s->i_linebuf);
> + break;
> + }
> }
just av_freep(&s->f_linebuf); av_freep(&s->i_linebuf);
freeing NULL pointers is safe
Otherwise LGTM.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel