FFmpeg
mvha.c
Go to the documentation of this file.
1 /*
2  * MidiVid Archive codec
3  *
4  * Copyright (c) 2019 Paul B Mahol
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26 
27 #define CACHED_BITSTREAM_READER !ARCH_X86_32
28 #include "libavutil/intreadwrite.h"
29 
30 #include "avcodec.h"
31 #include "bytestream.h"
32 #include "codec_internal.h"
33 #include "get_bits.h"
34 #include "internal.h"
35 #include "lossless_videodsp.h"
36 #include "zlib_wrapper.h"
37 
38 #include <zlib.h>
39 
40 typedef struct MVHAContext {
43 
44  uint8_t symb[256];
45  uint32_t prob[256];
47 
50 } MVHAContext;
51 
52 typedef struct Node {
53  int16_t sym;
54  int16_t n0;
55  int16_t l, r;
56  uint32_t count;
57 } Node;
58 
59 static void get_tree_codes(uint32_t *bits, int16_t *lens, uint8_t *xlat,
60  Node *nodes, int node,
61  uint32_t pfx, int pl, int *pos)
62 {
63  int s;
64 
65  s = nodes[node].sym;
66  if (s != -1) {
67  bits[*pos] = (~pfx) & ((1ULL << FFMAX(pl, 1)) - 1);
68  lens[*pos] = FFMAX(pl, 1);
69  xlat[*pos] = s + (pl == 0);
70  (*pos)++;
71  } else {
72  pfx <<= 1;
73  pl++;
74  get_tree_codes(bits, lens, xlat, nodes, nodes[node].l, pfx, pl,
75  pos);
76  pfx |= 1;
77  get_tree_codes(bits, lens, xlat, nodes, nodes[node].r, pfx, pl,
78  pos);
79  }
80 }
81 
82 static int build_vlc(AVCodecContext *avctx, VLC *vlc)
83 {
84  MVHAContext *s = avctx->priv_data;
85  Node nodes[512];
86  uint32_t bits[256];
87  int16_t lens[256];
88  uint8_t xlat[256];
89  int cur_node, i, j, pos = 0;
90 
91  ff_free_vlc(vlc);
92 
93  for (i = 0; i < s->nb_symbols; i++) {
94  nodes[i].count = s->prob[i];
95  nodes[i].sym = s->symb[i];
96  nodes[i].n0 = -2;
97  nodes[i].l = i;
98  nodes[i].r = i;
99  }
100 
101  cur_node = s->nb_symbols;
102  j = 0;
103  do {
104  for (i = 0; ; i++) {
105  int new_node = j;
106  int first_node = cur_node;
107  int second_node = cur_node;
108  unsigned nd, st;
109 
110  nodes[cur_node].count = -1;
111 
112  do {
113  int val = nodes[new_node].count;
114  if (val && (val < nodes[first_node].count)) {
115  if (val >= nodes[second_node].count) {
116  first_node = new_node;
117  } else {
118  first_node = second_node;
119  second_node = new_node;
120  }
121  }
122  new_node += 1;
123  } while (new_node != cur_node);
124 
125  if (first_node == cur_node)
126  break;
127 
128  nd = nodes[second_node].count;
129  st = nodes[first_node].count;
130  nodes[second_node].count = 0;
131  nodes[first_node].count = 0;
132  if (nd >= UINT32_MAX - st) {
133  av_log(avctx, AV_LOG_ERROR, "count overflow\n");
134  return AVERROR_INVALIDDATA;
135  }
136  nodes[cur_node].count = nd + st;
137  nodes[cur_node].sym = -1;
138  nodes[cur_node].n0 = cur_node;
139  nodes[cur_node].l = first_node;
140  nodes[cur_node].r = second_node;
141  cur_node++;
142  }
143  j++;
144  } while (cur_node - s->nb_symbols == j);
145 
146  get_tree_codes(bits, lens, xlat, nodes, cur_node - 1, 0, 0, &pos);
147 
148  return ff_init_vlc_sparse(vlc, 12, pos, lens, 2, 2, bits, 4, 4, xlat, 1, 1, 0);
149 }
150 
152  int *got_frame, AVPacket *avpkt)
153 {
154  MVHAContext *s = avctx->priv_data;
155  uint32_t type, size;
156  int ret;
157 
158  if (avpkt->size <= 8)
159  return AVERROR_INVALIDDATA;
160 
161  type = AV_RB32(avpkt->data);
162  size = AV_RL32(avpkt->data + 4);
163 
164  if (size < 1 || size >= avpkt->size)
165  return AVERROR_INVALIDDATA;
166 
167  if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
168  return ret;
169 
170  if (type == MKTAG('L','Z','Y','V')) {
171  z_stream *const zstream = &s->zstream.zstream;
172  ret = inflateReset(zstream);
173  if (ret != Z_OK) {
174  av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", ret);
175  return AVERROR_EXTERNAL;
176  }
177 
178  zstream->next_in = avpkt->data + 8;
179  zstream->avail_in = avpkt->size - 8;
180 
181  for (int p = 0; p < 3; p++) {
182  for (int y = 0; y < avctx->height; y++) {
183  zstream->next_out = frame->data[p] + (avctx->height - y - 1) * frame->linesize[p];
184  zstream->avail_out = avctx->width >> (p > 0);
185 
186  ret = inflate(zstream, Z_SYNC_FLUSH);
187  if (ret != Z_OK && ret != Z_STREAM_END) {
188  av_log(avctx, AV_LOG_ERROR, "Inflate error: %d\n", ret);
189  return AVERROR_EXTERNAL;
190  }
191  }
192  }
193  } else if (type == MKTAG('H','U','F','Y')) {
194  GetBitContext *gb = &s->gb;
195  int first_symbol, symbol;
196 
197  ret = init_get_bits8(gb, avpkt->data + 8, avpkt->size - 8);
198  if (ret < 0)
199  return ret;
200 
201  skip_bits(gb, 24);
202 
203  first_symbol = get_bits(gb, 8);
204  s->nb_symbols = get_bits(gb, 8) + 1;
205 
206  symbol = first_symbol;
207  for (int i = 0; i < s->nb_symbols; symbol++) {
208  int prob;
209 
210  if (get_bits_left(gb) < 4)
211  return AVERROR_INVALIDDATA;
212 
213  if (get_bits1(gb)) {
214  prob = get_bits(gb, 12);
215  } else {
216  prob = get_bits(gb, 3);
217  }
218 
219  if (prob) {
220  s->symb[i] = symbol;
221  s->prob[i] = prob;
222  i++;
223  }
224  }
225 
226  ret = build_vlc(avctx, &s->vlc);
227  if (ret < 0)
228  return ret;
229 
230  for (int p = 0; p < 3; p++) {
231  int width = avctx->width >> (p > 0);
232  ptrdiff_t stride = frame->linesize[p];
233  uint8_t *dst;
234 
235  dst = frame->data[p] + (avctx->height - 1) * frame->linesize[p];
236  for (int y = 0; y < avctx->height; y++) {
237  if (get_bits_left(gb) < width)
238  return AVERROR_INVALIDDATA;
239  for (int x = 0; x < width; x++) {
240  int v = get_vlc2(gb, s->vlc.table, s->vlc.bits, 3);
241 
242  if (v < 0)
243  return AVERROR_INVALIDDATA;
244 
245  dst[x] = v;
246  }
247  dst -= stride;
248  }
249  }
250  } else {
251  return AVERROR_INVALIDDATA;
252  }
253 
254  for (int p = 0; p < 3; p++) {
255  int left, lefttop;
256  int width = avctx->width >> (p > 0);
257  ptrdiff_t stride = frame->linesize[p];
258  uint8_t *dst;
259 
260  dst = frame->data[p] + (avctx->height - 1) * frame->linesize[p];
261  s->llviddsp.add_left_pred(dst, dst, width, 0);
262  if (avctx->height > 1) {
263  dst -= stride;
264  lefttop = left = dst[0];
265  for (int y = 1; y < avctx->height; y++) {
266  s->llviddsp.add_median_pred(dst, dst + stride, dst, width, &left, &lefttop);
267  lefttop = left = dst[0];
268  dst -= stride;
269  }
270  }
271  }
272 
273  frame->pict_type = AV_PICTURE_TYPE_I;
274  frame->key_frame = 1;
275  *got_frame = 1;
276 
277  return avpkt->size;
278 }
279 
281 {
282  MVHAContext *s = avctx->priv_data;
283 
284  avctx->pix_fmt = AV_PIX_FMT_YUV422P;
285 
286  ff_llviddsp_init(&s->llviddsp);
287 
288  return ff_inflate_init(&s->zstream, avctx);
289 }
290 
292 {
293  MVHAContext *s = avctx->priv_data;
294 
295  ff_inflate_end(&s->zstream);
296  ff_free_vlc(&s->vlc);
297 
298  return 0;
299 }
300 
302  .p.name = "mvha",
303  .p.long_name = NULL_IF_CONFIG_SMALL("MidiVid Archive Codec"),
304  .p.type = AVMEDIA_TYPE_VIDEO,
305  .p.id = AV_CODEC_ID_MVHA,
306  .priv_data_size = sizeof(MVHAContext),
307  .init = decode_init,
308  .close = decode_close,
310  .p.capabilities = AV_CODEC_CAP_DR1,
311  .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
313 };
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:39
get_bits_left
static int get_bits_left(GetBitContext *gb)
Definition: get_bits.h:839
r
const char * r
Definition: vf_curves.c:116
MVHAContext::symb
uint8_t symb[256]
Definition: mvha.c:44
decode_close
static av_cold int decode_close(AVCodecContext *avctx)
Definition: mvha.c:291
Node
Definition: agm.c:916
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:325
MVHAContext::prob
uint32_t prob[256]
Definition: mvha.c:45
internal.h
AVPacket::data
uint8_t * data
Definition: packet.h:374
FFCodec
Definition: codec_internal.h:112
FFMAX
#define FFMAX(a, b)
Definition: macros.h:47
init
static int init
Definition: av_tx.c:47
skip_bits
static void skip_bits(GetBitContext *s, int n)
Definition: get_bits.h:467
get_bits
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
Definition: get_bits.h:379
FFCodec::p
AVCodec p
The public AVCodec.
Definition: codec_internal.h:116
inflate
static void inflate(uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)
Definition: vf_neighbor.c:195
GetBitContext
Definition: get_bits.h:61
val
static double val(void *priv, double ch)
Definition: aeval.c:77
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
LLVidDSPContext
Definition: lossless_videodsp.h:28
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
zlib_wrapper.h
av_cold
#define av_cold
Definition: attributes.h:90
init_get_bits8
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
Definition: get_bits.h:667
width
#define width
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:254
intreadwrite.h
s
#define s(width, name)
Definition: cbs_vp9.c:256
MVHAContext::nb_symbols
int nb_symbols
Definition: mvha.c:42
bits
uint8_t bits
Definition: vp3data.h:141
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: mvha.c:280
get_bits.h
ff_mvha_decoder
const FFCodec ff_mvha_decoder
Definition: mvha.c:301
AV_PICTURE_TYPE_I
@ AV_PICTURE_TYPE_I
Intra.
Definition: avutil.h:274
get_bits1
static unsigned int get_bits1(GetBitContext *s)
Definition: get_bits.h:498
Node::l
int16_t l
Definition: mvha.c:55
get_vlc2
static av_always_inline int get_vlc2(GetBitContext *s, const VLCElem *table, int bits, int max_depth)
Parse a vlc code.
Definition: get_bits.h:787
ff_get_buffer
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
Definition: decode.c:1403
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
AVPacket::size
int size
Definition: packet.h:375
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
MVHAContext::llviddsp
LLVidDSPContext llviddsp
Definition: mvha.c:49
codec_internal.h
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
size
int size
Definition: twinvq_data.h:10344
AV_RB32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
Definition: bytestream.h:96
MVHAContext::gb
GetBitContext gb
Definition: mvha.c:41
AVERROR_EXTERNAL
#define AVERROR_EXTERNAL
Generic error in an external library.
Definition: error.h:59
Node::r
int16_t r
Definition: mvha.c:55
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
ff_init_vlc_sparse
int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags)
Definition: vlc.c:272
FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: codec_internal.h:31
AVCodec::name
const char * name
Name of the codec implementation.
Definition: codec.h:203
ff_inflate_end
void ff_inflate_end(FFZStream *zstream)
Wrapper around inflateEnd().
AVCodecContext::height
int height
Definition: avcodec.h:562
AVCodecContext::pix_fmt
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
Definition: avcodec.h:599
AV_CODEC_ID_MVHA
@ AV_CODEC_ID_MVHA
Definition: codec_id.h:298
ff_free_vlc
void ff_free_vlc(VLC *vlc)
Definition: vlc.c:375
avcodec.h
stride
#define stride
Definition: h264pred_template.c:537
MVHAContext::zstream
FFZStream zstream
Definition: mvha.c:48
ret
ret
Definition: filter_design.txt:187
MVHAContext::vlc
VLC vlc
Definition: mvha.c:46
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:264
prob
#define prob(name, subs,...)
Definition: cbs_vp9.c:372
Node::n0
int16_t n0
Definition: huffman.h:35
pos
unsigned int pos
Definition: spdifenc.c:412
left
Tag MUST be and< 10hcoeff half pel interpolation filter coefficients, hcoeff[0] are the 2 middle coefficients[1] are the next outer ones and so on, resulting in a filter like:...eff[2], hcoeff[1], hcoeff[0], hcoeff[0], hcoeff[1], hcoeff[2] ... the sign of the coefficients is not explicitly stored but alternates after each coeff and coeff[0] is positive, so ...,+,-,+,-,+,+,-,+,-,+,... hcoeff[0] is not explicitly stored but found by subtracting the sum of all stored coefficients with signs from 32 hcoeff[0]=32 - hcoeff[1] - hcoeff[2] - ... a good choice for hcoeff and htaps is htaps=6 hcoeff={40,-10, 2} an alternative which requires more computations at both encoder and decoder side and may or may not be better is htaps=8 hcoeff={42,-14, 6,-2}ref_frames minimum of the number of available reference frames and max_ref_frames for example the first frame after a key frame always has ref_frames=1spatial_decomposition_type wavelet type 0 is a 9/7 symmetric compact integer wavelet 1 is a 5/3 symmetric compact integer wavelet others are reserved stored as delta from last, last is reset to 0 if always_reset||keyframeqlog quality(logarithmic quantizer scale) stored as delta from last, last is reset to 0 if always_reset||keyframemv_scale stored as delta from last, last is reset to 0 if always_reset||keyframe FIXME check that everything works fine if this changes between framesqbias dequantization bias stored as delta from last, last is reset to 0 if always_reset||keyframeblock_max_depth maximum depth of the block tree stored as delta from last, last is reset to 0 if always_reset||keyframequant_table quantization tableHighlevel bitstream structure:==============================--------------------------------------------|Header|--------------------------------------------|------------------------------------|||Block0||||split?||||yes no||||......... intra?||||:Block01 :yes no||||:Block02 :....... ..........||||:Block03 ::y DC ::ref index:||||:Block04 ::cb DC ::motion x :||||......... :cr DC ::motion y :||||....... ..........|||------------------------------------||------------------------------------|||Block1|||...|--------------------------------------------|------------ ------------ ------------|||Y subbands||Cb subbands||Cr subbands||||--- ---||--- ---||--- ---|||||LL0||HL0||||LL0||HL0||||LL0||HL0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||LH0||HH0||||LH0||HH0||||LH0||HH0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HL1||LH1||||HL1||LH1||||HL1||LH1|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HH1||HL2||||HH1||HL2||||HH1||HL2|||||...||...||...|||------------ ------------ ------------|--------------------------------------------Decoding process:=================------------|||Subbands|------------||||------------|Intra DC||||LL0 subband prediction ------------|\ Dequantization ------------------- \||Reference frames|\ IDWT|------- -------|Motion \|||Frame 0||Frame 1||Compensation . OBMC v -------|------- -------|--------------. \------> Frame n output Frame Frame<----------------------------------/|...|------------------- Range Coder:============Binary Range Coder:------------------- The implemented range coder is an adapted version based upon "Range encoding: an algorithm for removing redundancy from a digitised message." by G. N. N. Martin. The symbols encoded by the Snow range coder are bits(0|1). The associated probabilities are not fix but change depending on the symbol mix seen so far. bit seen|new state ---------+----------------------------------------------- 0|256 - state_transition_table[256 - old_state];1|state_transition_table[old_state];state_transition_table={ 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 190, 191, 192, 194, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 204, 205, 206, 207, 208, 209, 209, 210, 211, 212, 213, 215, 215, 216, 217, 218, 219, 220, 220, 222, 223, 224, 225, 226, 227, 227, 229, 229, 230, 231, 232, 234, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 0, 0, 0, 0, 0, 0, 0};FIXME Range Coding of integers:------------------------- FIXME Neighboring Blocks:===================left and top are set to the respective blocks unless they are outside of the image in which case they are set to the Null block top-left is set to the top left block unless it is outside of the image in which case it is set to the left block if this block has no larger parent block or it is at the left side of its parent block and the top right block is not outside of the image then the top right block is used for top-right else the top-left block is used Null block y, cb, cr are 128 level, ref, mx and my are 0 Motion Vector Prediction:=========================1. the motion vectors of all the neighboring blocks are scaled to compensate for the difference of reference frames scaled_mv=(mv *(256 *(current_reference+1)/(mv.reference+1))+128)> the median of the scaled left
Definition: snow.txt:386
AV_RL32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Definition: bytestream.h:92
ff_llviddsp_init
void ff_llviddsp_init(LLVidDSPContext *c)
Definition: lossless_videodsp.c:113
AVCodecContext
main external API structure.
Definition: avcodec.h:389
VLC
Definition: vlc.h:31
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FFZStream
Definition: zlib_wrapper.h:27
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:70
Node::sym
int16_t sym
Definition: huffman.h:34
get_tree_codes
static void get_tree_codes(uint32_t *bits, int16_t *lens, uint8_t *xlat, Node *nodes, int node, uint32_t pfx, int pl, int *pos)
Definition: mvha.c:59
lossless_videodsp.h
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: mvha.c:151
AVPacket
This structure stores compressed data.
Definition: packet.h:351
AVCodecContext::priv_data
void * priv_data
Definition: avcodec.h:416
ff_inflate_init
int ff_inflate_init(FFZStream *zstream, void *logctx)
Wrapper around inflateInit().
AVCodecContext::width
int width
picture width / height.
Definition: avcodec.h:562
bytestream.h
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
MKTAG
#define MKTAG(a, b, c, d)
Definition: macros.h:55
Node::count
uint32_t count
Definition: huffman.h:36
build_vlc
static int build_vlc(AVCodecContext *avctx, VLC *vlc)
Definition: mvha.c:82
MVHAContext
Definition: mvha.c:40