FFmpeg
hq_hqa.c
Go to the documentation of this file.
1 /*
2  * Canopus HQ/HQA decoder
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 
23 #include "libavutil/attributes.h"
24 #include "libavutil/intreadwrite.h"
25 
26 #include "avcodec.h"
27 #include "bytestream.h"
28 #include "canopus.h"
29 #include "codec_internal.h"
30 #include "get_bits.h"
31 #include "internal.h"
32 
33 #include "hq_hqa.h"
34 #include "hq_hqadsp.h"
35 
36 /* HQ/HQA slices are a set of macroblocks belonging to a frame, and
37  * they usually form a pseudorandom pattern (probably because it is
38  * nicer to display on partial decode).
39  *
40  * For HQA it just happens that each slice is on every 8th macroblock,
41  * but they can be on any frame width like
42  * X.......X.
43  * ......X...
44  * ....X.....
45  * ..X.......
46  * etc.
47  *
48  * The original decoder has special handling for edge macroblocks,
49  * while lavc simply aligns coded_width and coded_height.
50  */
51 
52 static inline void put_blocks(HQContext *c, AVFrame *pic,
53  int plane, int x, int y, int ilace,
54  int16_t *block0, int16_t *block1)
55 {
56  uint8_t *p = pic->data[plane] + x;
57 
58  c->hqhqadsp.idct_put(p + y * pic->linesize[plane],
59  pic->linesize[plane] << ilace, block0);
60  c->hqhqadsp.idct_put(p + (y + (ilace ? 1 : 8)) * pic->linesize[plane],
61  pic->linesize[plane] << ilace, block1);
62 }
63 
64 static int hq_decode_block(HQContext *c, GetBitContext *gb, int16_t block[64],
65  int qsel, int is_chroma, int is_hqa)
66 {
67  const int32_t *q;
68  int val, pos = 1;
69 
70  memset(block, 0, 64 * sizeof(*block));
71 
72  if (!is_hqa) {
73  block[0] = get_sbits(gb, 9) * 64;
74  q = ff_hq_quants[qsel][is_chroma][get_bits(gb, 2)];
75  } else {
76  q = ff_hq_quants[qsel][is_chroma][get_bits(gb, 2)];
77  block[0] = get_sbits(gb, 9) * 64;
78  }
79 
80  for (;;) {
81  val = get_vlc2(gb, c->hq_ac_vlc.table, 9, 2);
82  if (val < 0)
83  return AVERROR_INVALIDDATA;
84 
86  if (pos >= 64)
87  break;
88  block[ff_zigzag_direct[pos]] = (int)(ff_hq_ac_syms[val] * (unsigned)q[pos]) >> 12;
89  pos++;
90  }
91 
92  return 0;
93 }
94 
95 static int hq_decode_mb(HQContext *c, AVFrame *pic,
96  GetBitContext *gb, int x, int y)
97 {
98  int qgroup, flag;
99  int i, ret;
100 
101  qgroup = get_bits(gb, 4);
102  flag = get_bits1(gb);
103 
104  for (i = 0; i < 8; i++) {
105  ret = hq_decode_block(c, gb, c->block[i], qgroup, i >= 4, 0);
106  if (ret < 0)
107  return ret;
108  }
109 
110  put_blocks(c, pic, 0, x, y, flag, c->block[0], c->block[2]);
111  put_blocks(c, pic, 0, x + 8, y, flag, c->block[1], c->block[3]);
112  put_blocks(c, pic, 2, x >> 1, y, flag, c->block[4], c->block[5]);
113  put_blocks(c, pic, 1, x >> 1, y, flag, c->block[6], c->block[7]);
114 
115  return 0;
116 }
117 
119  int prof_num, size_t data_size)
120 {
121  const HQProfile *profile;
122  GetBitContext gb;
123  const uint8_t *perm, *src = gbc->buffer;
124  uint32_t slice_off[21];
125  int slice, start_off, next_off, i, ret;
126 
127  if ((unsigned)prof_num >= NUM_HQ_PROFILES) {
128  profile = &ff_hq_profile[0];
129  avpriv_request_sample(ctx->avctx, "HQ Profile %d", prof_num);
130  } else {
131  profile = &ff_hq_profile[prof_num];
132  av_log(ctx->avctx, AV_LOG_VERBOSE, "HQ Profile %d\n", prof_num);
133  }
134 
135  ctx->avctx->coded_width = FFALIGN(profile->width, 16);
136  ctx->avctx->coded_height = FFALIGN(profile->height, 16);
137  ctx->avctx->width = profile->width;
138  ctx->avctx->height = profile->height;
139  ctx->avctx->bits_per_raw_sample = 8;
140  ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P;
141 
142  ret = ff_get_buffer(ctx->avctx, pic, 0);
143  if (ret < 0)
144  return ret;
145 
146  /* Offsets are stored from CUV position, so adjust them accordingly. */
147  for (i = 0; i < profile->num_slices + 1; i++)
148  slice_off[i] = bytestream2_get_be24(gbc) - 4;
149 
150  next_off = 0;
151  for (slice = 0; slice < profile->num_slices; slice++) {
152  start_off = next_off;
153  next_off = profile->tab_h * (slice + 1) / profile->num_slices;
154  perm = profile->perm_tab + start_off * profile->tab_w * 2;
155 
156  if (slice_off[slice] < (profile->num_slices + 1) * 3 ||
157  slice_off[slice] >= slice_off[slice + 1] ||
158  slice_off[slice + 1] > data_size) {
159  av_log(ctx->avctx, AV_LOG_ERROR,
160  "Invalid slice size %"SIZE_SPECIFIER".\n", data_size);
161  break;
162  }
163  init_get_bits(&gb, src + slice_off[slice],
164  (slice_off[slice + 1] - slice_off[slice]) * 8);
165 
166  for (i = 0; i < (next_off - start_off) * profile->tab_w; i++) {
167  ret = hq_decode_mb(ctx, pic, &gb, perm[0] * 16, perm[1] * 16);
168  if (ret < 0) {
169  av_log(ctx->avctx, AV_LOG_ERROR,
170  "Error decoding macroblock %d at slice %d.\n", i, slice);
171  return ret;
172  }
173  perm += 2;
174  }
175  }
176 
177  return 0;
178 }
179 
180 static int hqa_decode_mb(HQContext *c, AVFrame *pic, int qgroup,
181  GetBitContext *gb, int x, int y)
182 {
183  int flag = 0;
184  int i, ret, cbp;
185 
186  if (get_bits_left(gb) < 1)
187  return AVERROR_INVALIDDATA;
188 
189  cbp = get_vlc2(gb, c->hqa_cbp_vlc.table, 5, 1);
190 
191  for (i = 0; i < 12; i++)
192  memset(c->block[i], 0, sizeof(*c->block));
193  for (i = 0; i < 12; i++)
194  c->block[i][0] = -128 * (1 << 6);
195 
196  if (cbp) {
197  flag = get_bits1(gb);
198 
199  cbp |= cbp << 4;
200  if (cbp & 0x3)
201  cbp |= 0x500;
202  if (cbp & 0xC)
203  cbp |= 0xA00;
204  for (i = 0; i < 12; i++) {
205  if (!(cbp & (1 << i)))
206  continue;
207  ret = hq_decode_block(c, gb, c->block[i], qgroup, i >= 8, 1);
208  if (ret < 0)
209  return ret;
210  }
211  }
212 
213  put_blocks(c, pic, 3, x, y, flag, c->block[ 0], c->block[ 2]);
214  put_blocks(c, pic, 3, x + 8, y, flag, c->block[ 1], c->block[ 3]);
215  put_blocks(c, pic, 0, x, y, flag, c->block[ 4], c->block[ 6]);
216  put_blocks(c, pic, 0, x + 8, y, flag, c->block[ 5], c->block[ 7]);
217  put_blocks(c, pic, 2, x >> 1, y, flag, c->block[ 8], c->block[ 9]);
218  put_blocks(c, pic, 1, x >> 1, y, flag, c->block[10], c->block[11]);
219 
220  return 0;
221 }
222 
224  int quant, int slice_no, int w, int h)
225 {
226  int i, j, off;
227  int ret;
228 
229  for (i = 0; i < h; i += 16) {
230  off = (slice_no * 16 + i * 3) & 0x70;
231  for (j = off; j < w; j += 128) {
232  ret = hqa_decode_mb(ctx, pic, quant, gb, j, i);
233  if (ret < 0) {
234  av_log(ctx->avctx, AV_LOG_ERROR,
235  "Error decoding macroblock at %dx%d.\n", i, j);
236  return ret;
237  }
238  }
239  }
240 
241  return 0;
242 }
243 
244 static int hqa_decode_frame(HQContext *ctx, AVFrame *pic, GetByteContext *gbc, size_t data_size)
245 {
246  GetBitContext gb;
247  const int num_slices = 8;
248  uint32_t slice_off[9];
249  int i, slice, ret;
250  int width, height, quant;
251  const uint8_t *src = gbc->buffer;
252 
253  if (bytestream2_get_bytes_left(gbc) < 8 + 4*(num_slices + 1))
254  return AVERROR_INVALIDDATA;
255 
256  width = bytestream2_get_be16(gbc);
257  height = bytestream2_get_be16(gbc);
258 
259  ret = ff_set_dimensions(ctx->avctx, width, height);
260  if (ret < 0)
261  return ret;
262 
263  ctx->avctx->coded_width = FFALIGN(width, 16);
264  ctx->avctx->coded_height = FFALIGN(height, 16);
265  ctx->avctx->bits_per_raw_sample = 8;
266  ctx->avctx->pix_fmt = AV_PIX_FMT_YUVA422P;
267 
268  av_log(ctx->avctx, AV_LOG_VERBOSE, "HQA Profile\n");
269 
270  quant = bytestream2_get_byte(gbc);
271  bytestream2_skip(gbc, 3);
272  if (quant >= NUM_HQ_QUANTS) {
273  av_log(ctx->avctx, AV_LOG_ERROR,
274  "Invalid quantization matrix %d.\n", quant);
275  return AVERROR_INVALIDDATA;
276  }
277 
278  ret = ff_get_buffer(ctx->avctx, pic, 0);
279  if (ret < 0)
280  return ret;
281 
282  /* Offsets are stored from HQA1 position, so adjust them accordingly. */
283  for (i = 0; i < num_slices + 1; i++)
284  slice_off[i] = bytestream2_get_be32(gbc) - 4;
285 
286  for (slice = 0; slice < num_slices; slice++) {
287  if (slice_off[slice] < (num_slices + 1) * 3 ||
288  slice_off[slice] >= slice_off[slice + 1] ||
289  slice_off[slice + 1] > data_size) {
290  av_log(ctx->avctx, AV_LOG_ERROR,
291  "Invalid slice size %"SIZE_SPECIFIER".\n", data_size);
292  break;
293  }
294  init_get_bits(&gb, src + slice_off[slice],
295  (slice_off[slice + 1] - slice_off[slice]) * 8);
296 
297  ret = hqa_decode_slice(ctx, pic, &gb, quant, slice, width, height);
298  if (ret < 0)
299  return ret;
300  }
301 
302  return 0;
303 }
304 
306  int *got_frame, AVPacket *avpkt)
307 {
308  HQContext *ctx = avctx->priv_data;
309  GetByteContext gbc0, *const gbc = &gbc0;
310  uint32_t info_tag;
311  unsigned int data_size;
312  int ret;
313  unsigned tag;
314 
315  bytestream2_init(gbc, avpkt->data, avpkt->size);
316  if (bytestream2_get_bytes_left(gbc) < 4 + 4) {
317  av_log(avctx, AV_LOG_ERROR, "Frame is too small (%d).\n", avpkt->size);
318  return AVERROR_INVALIDDATA;
319  }
320 
321  info_tag = bytestream2_peek_le32(gbc);
322  if (info_tag == MKTAG('I', 'N', 'F', 'O')) {
323  int info_size;
324  bytestream2_skip(gbc, 4);
325  info_size = bytestream2_get_le32(gbc);
326  if (info_size < 0 || bytestream2_get_bytes_left(gbc) < info_size) {
327  av_log(avctx, AV_LOG_ERROR, "Invalid INFO size (%d).\n", info_size);
328  return AVERROR_INVALIDDATA;
329  }
330  ff_canopus_parse_info_tag(avctx, gbc->buffer, info_size);
331 
332  bytestream2_skip(gbc, info_size);
333  }
334 
335  data_size = bytestream2_get_bytes_left(gbc);
336  if (data_size < 4) {
337  av_log(avctx, AV_LOG_ERROR, "Frame is too small (%d).\n", data_size);
338  return AVERROR_INVALIDDATA;
339  }
340 
341  /* HQ defines dimensions and number of slices, and thus slice traversal
342  * order. HQA has no size constraint and a fixed number of slices, so it
343  * needs a separate scheme for it. */
344  tag = bytestream2_get_le32(gbc);
345  if ((tag & 0x00FFFFFF) == (MKTAG('U', 'V', 'C', ' ') & 0x00FFFFFF)) {
346  ret = hq_decode_frame(ctx, pic, gbc, tag >> 24, data_size);
347  } else if (tag == MKTAG('H', 'Q', 'A', '1')) {
348  ret = hqa_decode_frame(ctx, pic, gbc, data_size);
349  } else {
350  av_log(avctx, AV_LOG_ERROR, "Not a HQ/HQA frame.\n");
351  return AVERROR_INVALIDDATA;
352  }
353  if (ret < 0) {
354  av_log(avctx, AV_LOG_ERROR, "Error decoding frame.\n");
355  return ret;
356  }
357 
358  pic->key_frame = 1;
360 
361  *got_frame = 1;
362 
363  return avpkt->size;
364 }
365 
367 {
368  HQContext *ctx = avctx->priv_data;
369  ctx->avctx = avctx;
370 
371  ff_hqdsp_init(&ctx->hqhqadsp);
372 
373  return ff_hq_init_vlcs(ctx);
374 }
375 
377 {
378  HQContext *ctx = avctx->priv_data;
379 
380  ff_free_vlc(&ctx->hq_ac_vlc);
381  ff_free_vlc(&ctx->hqa_cbp_vlc);
382 
383  return 0;
384 }
385 
387  .p.name = "hq_hqa",
388  .p.long_name = NULL_IF_CONFIG_SMALL("Canopus HQ/HQA"),
389  .p.type = AVMEDIA_TYPE_VIDEO,
390  .p.id = AV_CODEC_ID_HQ_HQA,
391  .priv_data_size = sizeof(HQContext),
394  .close = hq_hqa_decode_close,
395  .p.capabilities = AV_CODEC_CAP_DR1,
396  .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
397 };
hq_decode_block
static int hq_decode_block(HQContext *c, GetBitContext *gb, int16_t block[64], int qsel, int is_chroma, int is_hqa)
Definition: hq_hqa.c:64
hq_hqa_decode_close
static av_cold int hq_hqa_decode_close(AVCodecContext *avctx)
Definition: hq_hqa.c:376
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:41
get_bits_left
static int get_bits_left(GetBitContext *gb)
Definition: get_bits.h:839
GetByteContext
Definition: bytestream.h:33
hq_decode_mb
static int hq_decode_mb(HQContext *c, AVFrame *pic, GetBitContext *gb, int x, int y)
Definition: hq_hqa.c:95
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:325
w
uint8_t w
Definition: llviddspenc.c:38
internal.h
AVPacket::data
uint8_t * data
Definition: packet.h:374
FFCodec
Definition: codec_internal.h:118
AV_LOG_VERBOSE
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:196
init_get_bits
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
Definition: get_bits.h:649
ff_hq_quants
const int32_t *const ff_hq_quants[16][2][4]
Definition: hq_hqadata.c:1126
hq_hqa_decode_frame
static int hq_hqa_decode_frame(AVCodecContext *avctx, AVFrame *pic, int *got_frame, AVPacket *avpkt)
Definition: hq_hqa.c:305
AVFrame::data
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:346
init
static int init
Definition: av_tx.c:47
bytestream2_skip
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
Definition: bytestream.h:168
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:122
ff_canopus_parse_info_tag
int ff_canopus_parse_info_tag(AVCodecContext *avctx, const uint8_t *src, size_t size)
Definition: canopus.c:30
GetBitContext
Definition: get_bits.h:61
AVFrame::key_frame
int key_frame
1 -> keyframe, 0-> not
Definition: frame.h:417
perm
perm
Definition: f_perms.c:74
val
static double val(void *priv, double ch)
Definition: aeval.c:77
hq_decode_frame
static int hq_decode_frame(HQContext *ctx, AVFrame *pic, GetByteContext *gbc, int prof_num, size_t data_size)
Definition: hq_hqa.c:118
quant
static int quant(float coef, const float Q, const float rounding)
Quantize one coefficient.
Definition: aacenc_utils.h:59
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
av_cold
#define av_cold
Definition: attributes.h:90
ff_hq_profile
const HQProfile ff_hq_profile[NUM_HQ_PROFILES]
Definition: hq_hqadata.c:8343
width
#define width
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:260
HQProfile
Definition: hq_hqa.h:45
intreadwrite.h
hqa_decode_slice
static int hqa_decode_slice(HQContext *ctx, AVFrame *pic, GetBitContext *gb, int quant, int slice_no, int w, int h)
Definition: hq_hqa.c:223
GetByteContext::buffer
const uint8_t * buffer
Definition: bytestream.h:34
get_sbits
static int get_sbits(GetBitContext *s, int n)
Definition: get_bits.h:359
ctx
AVFormatContext * ctx
Definition: movenc.c:48
get_bits.h
ff_hq_init_vlcs
int ff_hq_init_vlcs(HQContext *c)
Definition: hq_hqadata.c:8368
if
if(ret)
Definition: filter_design.txt:179
hqa_decode_mb
static int hqa_decode_mb(HQContext *c, AVFrame *pic, int qgroup, GetBitContext *gb, int x, int y)
Definition: hq_hqa.c:180
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
hqa_decode_frame
static int hqa_decode_frame(HQContext *ctx, AVFrame *pic, GetByteContext *gbc, size_t data_size)
Definition: hq_hqa.c:244
NUM_HQ_PROFILES
#define NUM_HQ_PROFILES
Definition: hq_hqa.h:33
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
canopus.h
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
bytestream2_get_bytes_left
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
Definition: bytestream.h:158
ff_hq_ac_syms
const int16_t ff_hq_ac_syms[NUM_HQ_AC_ENTRIES]
Definition: hq_hqadata.c:1342
AVFrame::pict_type
enum AVPictureType pict_type
Picture type of the frame.
Definition: frame.h:422
ff_get_buffer
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
Definition: decode.c:1462
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
codec_internal.h
HQContext
Definition: hq_hqa.h:36
height
#define height
attributes.h
hq_hqadsp.h
ff_hqdsp_init
av_cold void ff_hqdsp_init(HQDSPContext *c)
Definition: hq_hqadsp.c:127
AV_CODEC_ID_HQ_HQA
@ AV_CODEC_ID_HQ_HQA
Definition: codec_id.h:238
flag
#define flag(name)
Definition: cbs_av1.c:553
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
put_blocks
static void put_blocks(HQContext *c, AVFrame *pic, int plane, int x, int y, int ilace, int16_t *block0, int16_t *block1)
Definition: hq_hqa.c:52
AVCodec::name
const char * name
Name of the codec implementation.
Definition: codec.h:211
profile
int profile
Definition: mxfenc.c:2005
ff_free_vlc
void ff_free_vlc(VLC *vlc)
Definition: vlc.c:375
avcodec.h
ff_zigzag_direct
const uint8_t ff_zigzag_direct[64]
Definition: mathtables.c:98
tag
uint32_t tag
Definition: movenc.c:1646
ret
ret
Definition: filter_design.txt:187
pos
unsigned int pos
Definition: spdifenc.c:412
SIZE_SPECIFIER
#define SIZE_SPECIFIER
Definition: internal.h:195
AVCodecContext
main external API structure.
Definition: avcodec.h:398
hq_hqa.h
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
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
ff_set_dimensions
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
Definition: utils.c:90
avpriv_request_sample
#define avpriv_request_sample(...)
Definition: tableprint_vlc.h:36
FFALIGN
#define FFALIGN(x, a)
Definition: macros.h:78
AVCodecContext::priv_data
void * priv_data
Definition: avcodec.h:425
AVPacket
This structure stores compressed data.
Definition: packet.h:351
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418
NUM_HQ_QUANTS
#define NUM_HQ_QUANTS
Definition: hq_hqa.h:34
int32_t
int32_t
Definition: audioconvert.c:56
bytestream.h
bytestream2_init
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
Definition: bytestream.h:137
AVFrame::linesize
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
Definition: frame.h:370
block
The exact code depends on how similar the blocks are and how related they are to the block
Definition: filter_design.txt:207
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
ff_hq_ac_skips
const uint8_t ff_hq_ac_skips[NUM_HQ_AC_ENTRIES]
Definition: hq_hqadata.c:1292
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
int
int
Definition: ffmpeg_filter.c:155
block1
static int16_t block1[64]
Definition: dct.c:118
ff_hq_hqa_decoder
const FFCodec ff_hq_hqa_decoder
Definition: hq_hqa.c:386
AV_PIX_FMT_YUVA422P
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: pixfmt.h:166
hq_hqa_decode_init
static av_cold int hq_hqa_decode_init(AVCodecContext *avctx)
Definition: hq_hqa.c:366