FFmpeg
libavcodec
dirac_vlc.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 Open Broadcast Systems Ltd.
3
* Author 2016 Rostislav Pehlivanov <rpehlivanov@obe.tv>
4
*
5
* This file is part of FFmpeg.
6
*
7
* FFmpeg is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public
9
* License as published by the Free Software Foundation; either
10
* version 2.1 of the License, or (at your option) any later version.
11
*
12
* FFmpeg is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
16
*
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with FFmpeg; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
*/
21
22
#ifndef AVCODEC_DIRAC_VLC_H
23
#define AVCODEC_DIRAC_VLC_H
24
25
#include "
libavutil/avutil.h
"
26
27
/* Can be 32 bits wide for some performance gain on some machines, but it will
28
* incorrectly decode very long coefficients (usually only 1 or 2 per frame) */
29
typedef
uint64_t
residual
;
30
31
#define LUT_BITS 8
32
33
/* Exactly 64 bytes */
34
typedef
struct
DiracGolombLUT
{
35
residual
preamble
,
leftover
;
36
int32_t
ready
[
LUT_BITS
];
37
int32_t
preamble_bits
,
leftover_bits
,
ready_num
;
38
int8_t
need_s
,
sign
;
39
}
DiracGolombLUT
;
40
41
av_cold
int
ff_dirac_golomb_reader_init
(
DiracGolombLUT
**lut_ctx);
42
43
int
ff_dirac_golomb_read_32bit
(
DiracGolombLUT
*lut_ctx,
const
uint8_t
*
buf
,
44
int
bytes,
uint8_t
*dst,
int
coeffs);
45
46
int
ff_dirac_golomb_read_16bit
(
DiracGolombLUT
*lut_ctx,
const
uint8_t
*
buf
,
47
int
bytes,
uint8_t
*_dst,
int
coeffs);
48
49
av_cold
void
ff_dirac_golomb_reader_end
(
DiracGolombLUT
**lut_ctx);
50
51
#endif
/* AVCODEC_DIRAC_VLC_H */
ff_dirac_golomb_reader_end
av_cold void ff_dirac_golomb_reader_end(DiracGolombLUT **lut_ctx)
Definition:
dirac_vlc.c:249
DiracGolombLUT::preamble_bits
int32_t preamble_bits
Definition:
dirac_vlc.h:37
ff_dirac_golomb_reader_init
av_cold int ff_dirac_golomb_reader_init(DiracGolombLUT **lut_ctx)
Definition:
dirac_vlc.c:232
DiracGolombLUT::leftover_bits
int32_t leftover_bits
Definition:
dirac_vlc.h:37
buf
void * buf
Definition:
avisynth_c.h:766
av_cold
#define av_cold
Definition:
attributes.h:84
DiracGolombLUT::ready_num
int32_t ready_num
Definition:
dirac_vlc.h:37
int32_t
int32_t
Definition:
audio_convert.c:194
DiracGolombLUT::leftover
residual leftover
Definition:
dirac_vlc.h:35
DiracGolombLUT
Definition:
dirac_vlc.h:34
ff_dirac_golomb_read_16bit
int ff_dirac_golomb_read_16bit(DiracGolombLUT *lut_ctx, const uint8_t *buf, int bytes, uint8_t *_dst, int coeffs)
Definition:
dirac_vlc.c:82
residual
uint64_t residual
Definition:
dirac_vlc.h:29
DiracGolombLUT::ready
int32_t ready[LUT_BITS]
Definition:
dirac_vlc.h:36
uint8_t
uint8_t
Definition:
audio_convert.c:194
DiracGolombLUT::preamble
residual preamble
Definition:
dirac_vlc.h:35
avutil.h
ff_dirac_golomb_read_32bit
int ff_dirac_golomb_read_32bit(DiracGolombLUT *lut_ctx, const uint8_t *buf, int bytes, uint8_t *dst, int coeffs)
Definition:
dirac_vlc.c:42
LUT_BITS
#define LUT_BITS
Definition:
dirac_vlc.h:31
DiracGolombLUT::sign
int8_t sign
Definition:
dirac_vlc.h:38
DiracGolombLUT::need_s
int8_t need_s
Definition:
dirac_vlc.h:38
Generated on Wed Aug 24 2022 21:26:38 for FFmpeg by
1.8.17