]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cfhd.h
Merge commit 'cbebc3251bc2544b469e0dcb176bc04779d8866c'
[ffmpeg] / libavcodec / cfhd.h
index 67a0e4c32c5a8f761262a8b8a73f5dfc3973a02b..2573e750a6dd8009ae7407ec2e84d9b1d7cf8274 100644 (file)
 
 #include "avcodec.h"
 #include "get_bits.h"
+#include "vlc.h"
 
-#define VLC_BITS 9
-#define NB_VLC_TABLE_9 (71+3)
-#define NB_VLC_TABLE_18 (263+1)
+#define VLC_BITS       9
+#define SUBBAND_COUNT 10
 
 typedef struct CFHD_RL_VLC_ELEM {
     int16_t level;
@@ -43,7 +43,7 @@ typedef struct CFHD_RL_VLC_ELEM {
 typedef struct SubBand {
     int level;
     int orientation;
-    int stride;
+    ptrdiff_t stride;
     int a_width;
     int width;
     int a_height;
@@ -62,7 +62,7 @@ typedef struct Plane {
     int16_t *idwt_tmp;
 
     /* TODO: merge this into SubBand structure */
-    int16_t *subband[10];
+    int16_t *subband[SUBBAND_COUNT];
     int16_t *l_h[8];
 
     SubBand band[DWT_LEVELS][4];
@@ -79,18 +79,16 @@ typedef struct CFHDContext {
 
     GetBitContext gb;
 
-    int chroma_x_shift;
-    int chroma_y_shift;
-
     int coded_width;
     int coded_height;
-    int coded_format;
+    int cropped_height;
+    enum AVPixelFormat coded_format;
 
     int a_width;
     int a_height;
     int a_format;
 
-    int bpc;
+    int bpc; // bits per channel/component
     int channel_cnt;
     int subband_cnt;
     int channel_num;
@@ -106,7 +104,6 @@ typedef struct CFHDContext {
 
     uint8_t prescale_shift[3];
     Plane plane[4];
-
 } CFHDContext;
 
 int ff_cfhd_init_vlcs(CFHDContext *s);