FFmpeg
lscrdec.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 Paul B Mahol
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #include <stdint.h>
22 #include <zlib.h>
23 
24 #include "libavutil/frame.h"
25 #include "libavutil/error.h"
26 #include "libavutil/log.h"
27 #include "libavutil/mem.h"
28 
29 #include "avcodec.h"
30 #include "bytestream.h"
31 #include "codec.h"
32 #include "codec_internal.h"
33 #include "decode.h"
34 #include "packet.h"
35 #include "png.h"
36 #include "pngdsp.h"
37 #include "zlib_wrapper.h"
38 
39 typedef struct LSCRContext {
42 
44  uint8_t *buffer;
46  uint8_t *crow_buf;
47  int crow_size;
48  uint8_t *last_row;
49  unsigned int last_row_size;
50 
52  uint8_t *image_buf;
54  int row_size;
55  int cur_h;
56  int y;
57 
59 } LSCRContext;
60 
61 static void handle_row(LSCRContext *s)
62 {
63  uint8_t *ptr, *last_row;
64 
65  ptr = s->image_buf + s->image_linesize * s->y;
66  if (s->y == 0)
67  last_row = s->last_row;
68  else
69  last_row = ptr - s->image_linesize;
70 
71  ff_png_filter_row(&s->dsp, ptr, s->crow_buf[0], s->crow_buf + 1,
72  last_row, s->row_size, 3);
73 
74  s->y++;
75 }
76 
77 static int decode_idat(LSCRContext *s, z_stream *zstream, int length)
78 {
79  int ret;
80  zstream->avail_in = FFMIN(length, bytestream2_get_bytes_left(&s->gb));
81  zstream->next_in = s->gb.buffer;
82 
83  if (length <= 0)
84  return AVERROR_INVALIDDATA;
85 
86  bytestream2_skip(&s->gb, length);
87 
88  /* decode one line if possible */
89  while (zstream->avail_in > 0) {
90  ret = inflate(zstream, Z_PARTIAL_FLUSH);
91  if (ret != Z_OK && ret != Z_STREAM_END) {
92  av_log(s->avctx, AV_LOG_ERROR, "inflate returned error %d\n", ret);
93  return AVERROR_EXTERNAL;
94  }
95  if (zstream->avail_out == 0) {
96  if (s->y < s->cur_h) {
97  handle_row(s);
98  }
99  zstream->avail_out = s->crow_size;
100  zstream->next_out = s->crow_buf;
101  }
102  if (ret == Z_STREAM_END && zstream->avail_in > 0) {
103  av_log(s->avctx, AV_LOG_WARNING,
104  "%d undecompressed bytes left in buffer\n", zstream->avail_in);
105  return 0;
106  }
107  }
108  return 0;
109 }
110 
111 static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe,
112  int *got_frame, AVPacket *avpkt)
113 {
114  LSCRContext *const s = avctx->priv_data;
115  GetByteContext *gb = &s->gb;
116  AVFrame *frame = s->last_picture;
117  int ret, nb_blocks, offset = 0;
118 
119  if (avpkt->size < 2)
120  return AVERROR_INVALIDDATA;
121  if (avpkt->size == 2)
122  return 0;
123 
124  bytestream2_init(gb, avpkt->data, avpkt->size);
125 
126  nb_blocks = bytestream2_get_le16(gb);
127  if (bytestream2_get_bytes_left(gb) < 2 + nb_blocks * (12 + 8))
128  return AVERROR_INVALIDDATA;
129 
130  ret = ff_reget_buffer(avctx, frame,
131  nb_blocks ? 0 : FF_REGET_BUFFER_FLAG_READONLY);
132  if (ret < 0)
133  return ret;
134 
135  for (int b = 0; b < nb_blocks; b++) {
136  z_stream *const zstream = &s->zstream.zstream;
137  int x, y, x2, y2, w, h, left;
138  uint32_t csize, size;
139 
140  if (inflateReset(zstream) != Z_OK)
141  return AVERROR_EXTERNAL;
142 
143  bytestream2_seek(gb, 2 + b * 12, SEEK_SET);
144 
145  x = bytestream2_get_le16(gb);
146  y = bytestream2_get_le16(gb);
147  x2 = bytestream2_get_le16(gb);
148  y2 = bytestream2_get_le16(gb);
149  w = x2-x;
150  s->cur_h = h = y2-y;
151 
152  if (w <= 0 || x < 0 || x >= avctx->width || w + x > avctx->width ||
153  h <= 0 || y < 0 || y >= avctx->height || h + y > avctx->height)
154  return AVERROR_INVALIDDATA;
155 
156  size = bytestream2_get_le32(gb);
157 
158  if ((nb_blocks == 1) &&
159  (w == avctx->width) &&
160  (h == avctx->height) &&
161  (x == 0) && (y == 0))
162  frame->flags |= AV_FRAME_FLAG_KEY;
163  else
164  frame->flags &= ~AV_FRAME_FLAG_KEY;
165 
166  bytestream2_seek(gb, 2 + nb_blocks * 12 + offset, SEEK_SET);
167  csize = bytestream2_get_be32(gb);
168  if (bytestream2_get_le32(gb) != MKTAG('I', 'D', 'A', 'T'))
169  return AVERROR_INVALIDDATA;
170 
171  offset += size;
172  left = size;
173 
174  s->y = 0;
175  s->row_size = w * 3;
176 
177  av_fast_padded_malloc(&s->buffer, &s->buffer_size, s->row_size + 16);
178  if (!s->buffer)
179  return AVERROR(ENOMEM);
180 
181  av_fast_padded_malloc(&s->last_row, &s->last_row_size, s->row_size);
182  if (!s->last_row)
183  return AVERROR(ENOMEM);
184 
185  s->crow_size = w * 3 + 1;
186  s->crow_buf = s->buffer + 15;
187  zstream->avail_out = s->crow_size;
188  zstream->next_out = s->crow_buf;
189  s->image_buf = frame->data[0] + (avctx->height - y - 1) * frame->linesize[0] + x * 3;
190  s->image_linesize =-frame->linesize[0];
191 
192  while (left > 16) {
193  ret = decode_idat(s, zstream, csize);
194  if (ret < 0)
195  return ret;
196  left -= csize + 16;
197  if (left > 16) {
198  bytestream2_skip(gb, 4);
199  csize = bytestream2_get_be32(gb);
200  if (bytestream2_get_le32(gb) != MKTAG('I', 'D', 'A', 'T'))
201  return AVERROR_INVALIDDATA;
202  }
203  }
204  }
205 
207 
208  if ((ret = av_frame_ref(rframe, frame)) < 0)
209  return ret;
210 
211  *got_frame = 1;
212 
213  return avpkt->size;
214 }
215 
217 {
218  LSCRContext *s = avctx->priv_data;
219 
220  av_frame_free(&s->last_picture);
221  av_freep(&s->buffer);
222  av_freep(&s->last_row);
223  ff_inflate_end(&s->zstream);
224 
225  return 0;
226 }
227 
229 {
230  LSCRContext *s = avctx->priv_data;
231 
232  avctx->color_range = AVCOL_RANGE_JPEG;
233  avctx->pix_fmt = AV_PIX_FMT_BGR24;
234 
235  s->avctx = avctx;
236  s->last_picture = av_frame_alloc();
237  if (!s->last_picture)
238  return AVERROR(ENOMEM);
239 
240  ff_pngdsp_init(&s->dsp);
241 
242  return ff_inflate_init(&s->zstream, avctx);
243 }
244 
246 {
247  LSCRContext *s = avctx->priv_data;
248  av_frame_unref(s->last_picture);
249 }
250 
252  .p.name = "lscr",
253  CODEC_LONG_NAME("LEAD Screen Capture"),
254  .p.type = AVMEDIA_TYPE_VIDEO,
255  .p.id = AV_CODEC_ID_LSCR,
256  .p.capabilities = AV_CODEC_CAP_DR1,
257  .priv_data_size = sizeof(LSCRContext),
259  .close = lscr_decode_close,
261  .flush = lscr_decode_flush,
262  .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
263 };
handle_row
static void handle_row(LSCRContext *s)
Definition: lscrdec.c:61
PNGDSPContext
Definition: pngdsp.h:27
AV_LOG_WARNING
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:186
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:42
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
GetByteContext
Definition: bytestream.h:33
lscr_decode_close
static int lscr_decode_close(AVCodecContext *avctx)
Definition: lscrdec.c:216
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:160
LSCRContext::last_row
uint8_t * last_row
Definition: lscrdec.c:48
bytestream2_seek
static av_always_inline int bytestream2_seek(GetByteContext *g, int offset, int whence)
Definition: bytestream.h:212
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:375
w
uint8_t w
Definition: llviddspenc.c:38
AVCOL_RANGE_JPEG
@ AVCOL_RANGE_JPEG
Full range content.
Definition: pixfmt.h:686
AVPacket::data
uint8_t * data
Definition: packet.h:524
b
#define b
Definition: input.c:41
FFCodec
Definition: codec_internal.h:127
AV_PIX_FMT_BGR24
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:76
LSCRContext::last_picture
AVFrame * last_picture
Definition: lscrdec.c:43
bytestream2_skip
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
Definition: bytestream.h:168
LSCRContext::last_row_size
unsigned int last_row_size
Definition: lscrdec.c:49
FFCodec::p
AVCodec p
The public AVCodec.
Definition: codec_internal.h:131
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:194
LSCRContext::dsp
PNGDSPContext dsp
Definition: lscrdec.c:40
codec.h
av_frame_alloc
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
Definition: frame.c:148
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
pngdsp.h
zlib_wrapper.h
AV_FRAME_FLAG_KEY
#define AV_FRAME_FLAG_KEY
A flag to mark frames that are keyframes.
Definition: frame.h:626
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
s
#define s(width, name)
Definition: cbs_vp9.c:198
decode.h
LSCRContext
Definition: lscrdec.c:39
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
LSCRContext::gb
GetByteContext gb
Definition: lscrdec.c:51
AVCodecContext::color_range
enum AVColorRange color_range
MPEG vs JPEG YUV range.
Definition: avcodec.h:695
AV_PICTURE_TYPE_I
@ AV_PICTURE_TYPE_I
Intra.
Definition: avutil.h:279
LSCRContext::cur_h
int cur_h
Definition: lscrdec.c:55
bytestream2_get_bytes_left
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
Definition: bytestream.h:158
error.h
ff_lscr_decoder
const FFCodec ff_lscr_decoder
Definition: lscrdec.c:251
AV_CODEC_ID_LSCR
@ AV_CODEC_ID_LSCR
Definition: codec_id.h:295
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:366
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:525
av_frame_ref
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
Definition: frame.c:384
codec_internal.h
LSCRContext::zstream
FFZStream zstream
Definition: lscrdec.c:58
size
int size
Definition: twinvq_data.h:10344
LSCRContext::row_size
int row_size
Definition: lscrdec.c:54
frame.h
LSCRContext::buffer_size
int buffer_size
Definition: lscrdec.c:45
AVERROR_EXTERNAL
#define AVERROR_EXTERNAL
Generic error in an external library.
Definition: error.h:59
offset
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 offset
Definition: writing_filters.txt:86
ff_png_filter_row
void ff_png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type, uint8_t *src, uint8_t *last, int size, int bpp)
Definition: pngdec.c:283
ff_pngdsp_init
av_cold void ff_pngdsp_init(PNGDSPContext *dsp)
Definition: pngdsp.c:56
LSCRContext::image_buf
uint8_t * image_buf
Definition: lscrdec.c:52
log.h
packet.h
av_fast_padded_malloc
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
Same behaviour av_fast_malloc but the buffer has additional AV_INPUT_BUFFER_PADDING_SIZE at the end w...
Definition: utils.c:52
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
av_frame_unref
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
Definition: frame.c:606
AVCodec::name
const char * name
Name of the codec implementation.
Definition: codec.h:194
ff_inflate_end
void ff_inflate_end(FFZStream *zstream)
Wrapper around inflateEnd().
AVCodecContext::height
int height
Definition: avcodec.h:618
AVCodecContext::pix_fmt
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
Definition: avcodec.h:657
avcodec.h
ff_reget_buffer
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Identical in function to ff_get_buffer(), except it reuses the existing buffer if available.
Definition: decode.c:1663
ret
ret
Definition: filter_design.txt:187
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
decode_frame_lscr
static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition: lscrdec.c:111
LSCRContext::crow_buf
uint8_t * crow_buf
Definition: lscrdec.c:46
LSCRContext::crow_size
int crow_size
Definition: lscrdec.c:47
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
AVCodecContext
main external API structure.
Definition: avcodec.h:445
lscr_decode_flush
static void lscr_decode_flush(AVCodecContext *avctx)
Definition: lscrdec.c:245
LSCRContext::image_linesize
int image_linesize
Definition: lscrdec.c:53
LSCRContext::buffer
uint8_t * buffer
Definition: lscrdec.c:44
LSCRContext::y
int y
Definition: lscrdec.c:56
AV_PICTURE_TYPE_P
@ AV_PICTURE_TYPE_P
Predicted.
Definition: avutil.h:280
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FFZStream
Definition: zlib_wrapper.h:27
LSCRContext::avctx
AVCodecContext * avctx
Definition: lscrdec.c:41
mem.h
AVCodecContext::priv_data
void * priv_data
Definition: avcodec.h:472
AVPacket
This structure stores compressed data.
Definition: packet.h:501
png.h
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:34
ff_inflate_init
int ff_inflate_init(FFZStream *zstream, void *logctx)
Wrapper around inflateInit().
AVCodecContext::width
int width
picture width / height.
Definition: avcodec.h:618
bytestream.h
bytestream2_init
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
Definition: bytestream.h:137
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
h
h
Definition: vp9dsp_template.c:2038
lscr_decode_init
static int lscr_decode_init(AVCodecContext *avctx)
Definition: lscrdec.c:228
decode_idat
static int decode_idat(LSCRContext *s, z_stream *zstream, int length)
Definition: lscrdec.c:77
FF_REGET_BUFFER_FLAG_READONLY
#define FF_REGET_BUFFER_FLAG_READONLY
the returned buffer does not need to be writable
Definition: decode.h:128