From 5b5338f6d1272526d2634501555cbaff4cdfb87b Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Thu, 9 Apr 2015 19:10:45 +0200 Subject: hqx: Implement slice-threaded decoding Inspired by a patch from Ferdinand Oeinck . Signed-off-by: Vittorio Giovara --- libavcodec/hqx.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libavcodec/hqx.h') diff --git a/libavcodec/hqx.h b/libavcodec/hqx.h index 7e3fd6a3be..7f329712fd 100644 --- a/libavcodec/hqx.h +++ b/libavcodec/hqx.h @@ -51,10 +51,17 @@ typedef struct HQXAC { struct HQXContext; -typedef int (*mb_decode_func)(struct HQXContext *ctx, GetBitContext *gb, int x, int y); +typedef int (*mb_decode_func)(struct HQXContext *ctx, + int slice_no, int x, int y); + +typedef struct HQXSlice { + GetBitContext gb; + DECLARE_ALIGNED(16, int16_t, block)[16][64]; +} HQXSlice; typedef struct HQXContext { HQXDSPContext hqxdsp; + HQXSlice slice[16]; AVFrame *pic; mb_decode_func decode_func; @@ -66,8 +73,6 @@ typedef struct HQXContext { unsigned int data_size; uint32_t slice_off[17]; - DECLARE_ALIGNED(16, int16_t, block)[16][64]; - VLC cbp_vlc; VLC dc_vlc[3]; } HQXContext; -- cgit v1.2.3