66 for (
int i = 0;
i <
s->dict_entries;
i++) {
69 if (
s->dict[
i].l >= 0 &&
70 (
s->dict[
i].l >=
s->dict_entries ||
71 s->dict[
i].r >=
s->dict_entries ||
91 if (
pkt->size > INT16_MAX)
103 s->dict_entry =
s->dict[
s->dict_entry].r;
105 s->dict_entry =
s->dict[
s->dict_entry].l;
107 if (
s->dict[
s->dict_entry].l < 0) {
110 datum =
s->dict[
s->dict_entry].r;
112 if (!
s->delta_compression)
114 s->sample = (
s->sample + datum) & 0xFF;
116 frame->data[0][n++] =
s->sample;
122 frame->nb_samples = n;
const FFCodec ff_hcom_decoder
static av_cold void close(AVCodecParserContext *s)
Libavcodec external API header.
#define i(width, name, range_min, range_max)
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
int(* init)(AVBSFContext *ctx)
bitstream reader API header.
static int get_bits_left(GetBitContext *gb)
static unsigned int get_bits1(GetBitContext *s)
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
@ AV_SAMPLE_FMT_U8
unsigned 8 bits
static av_cold int hcom_init(AVCodecContext *avctx)
static int hcom_decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
static av_cold int hcom_close(AVCodecContext *avctx)
void * av_calloc(size_t nmemb, size_t size)
Memory handling functions.
int nb_channels
Number of channels in this layout.
main external API structure.
AVChannelLayout ch_layout
Audio channel layout.
enum AVSampleFormat sample_fmt
audio sample format
uint8_t * extradata
Out-of-band global headers that may be used by some codecs.
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.