Commit 453642f8 authored by Vittorio Giovara's avatar Vittorio Giovara

hqx: Store shareable data in main decoder context

In preparation for multithreaded decoding.
parent ea031b75
This diff is collapsed.
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#define AVCODEC_HQX_H #define AVCODEC_HQX_H
#include <stdint.h> #include <stdint.h>
#include "libavutil/frame.h"
#include "libavutil/mem.h" #include "libavutil/mem.h"
#include "get_bits.h" #include "get_bits.h"
#include "hqxdsp.h" #include "hqxdsp.h"
...@@ -47,12 +49,23 @@ typedef struct HQXAC { ...@@ -47,12 +49,23 @@ typedef struct HQXAC {
const HQXLUT *lut; const HQXLUT *lut;
} HQXAC; } HQXAC;
struct HQXContext;
typedef int (*mb_decode_func)(struct HQXContext *ctx, GetBitContext *gb, int x, int y);
typedef struct HQXContext { typedef struct HQXContext {
HQXDSPContext hqxdsp; HQXDSPContext hqxdsp;
AVFrame *pic;
mb_decode_func decode_func;
int format, dcb, width, height; int format, dcb, width, height;
int interlaced; int interlaced;
uint8_t *src;
unsigned int data_size;
uint32_t slice_off[17];
DECLARE_ALIGNED(16, int16_t, block)[16][64]; DECLARE_ALIGNED(16, int16_t, block)[16][64];
VLC cbp_vlc; VLC cbp_vlc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment