aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/huffyuv.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-13 01:14:05 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-16 16:59:15 +0100
commitb53aab1a5819abe7c65b5f645e09559bb42db793 (patch)
treeef402d37750932538e0b090cc3d0b964a51cbfc8 /libavcodec/huffyuv.h
parent6c004e8aada00d96f5c38e50c9770efb1eaaaa59 (diff)
downloadffmpeg-b53aab1a5819abe7c65b5f645e09559bb42db793.tar.gz
libavcodec/huffyuv: >8 bit support
This adds only yuv420p10, others are trivial to add after this commit and will be added in a subsequent commit. Currently the implementation is not optimized, optimizations will be added later Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/huffyuv.h')
-rw-r--r--libavcodec/huffyuv.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/libavcodec/huffyuv.h b/libavcodec/huffyuv.h
index c69274ea57..b529f1b52b 100644
--- a/libavcodec/huffyuv.h
+++ b/libavcodec/huffyuv.h
@@ -38,6 +38,9 @@
#define VLC_BITS 11
+#define MAX_BITS 14
+#define MAX_N (1<<MAX_BITS)
+
#if HAVE_BIGENDIAN
#define B 3
#define G 2
@@ -80,9 +83,10 @@ typedef struct HYuvContext {
int picture_number;
int last_slice_end;
uint8_t *temp[3];
- uint64_t stats[4][256];
- uint8_t len[4][256];
- uint32_t bits[4][256];
+ uint16_t *temp16[3]; ///< identical to temp but 16bit type
+ uint64_t stats[4][MAX_N];
+ uint8_t len[4][MAX_N];
+ uint32_t bits[4][MAX_N];
uint32_t pix_bgr_map[1<<VLC_BITS];
VLC vlc[8]; //Y,U,V,A,YY,YU,YV,AA
uint8_t *bitstream_buffer;
@@ -93,6 +97,6 @@ typedef struct HYuvContext {
void ff_huffyuv_common_init(AVCodecContext *s);
void ff_huffyuv_common_end(HYuvContext *s);
int ff_huffyuv_alloc_temp(HYuvContext *s);
-int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table);
+int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table, int n);
#endif /* AVCODEC_HUFFYUV_H */