FFmpeg
Loading...
Searching...
No Matches
dsd.h
Go to the documentation of this file.
1/*
2 * Direct Stream Digital (DSD) decoder
3 * based on BSD licensed dsd2pcm by Sebastian Gesemann
4 * Copyright (c) 2009, 2011 Sebastian Gesemann. All rights reserved.
5 * Copyright (c) 2014 Peter Ross
6 *
7 * This file is part of FFmpeg.
8 *
9 * FFmpeg is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * FFmpeg is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with FFmpeg; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#ifndef AVCODEC_DSD_H
25#define AVCODEC_DSD_H
26
27#include <stddef.h>
28#include <stdint.h>
29
30#define HTAPS 48 /** number of FIR constants */
31#define FIFOSIZE 16 /** must be a power of two */
32#define FIFOMASK (FIFOSIZE - 1) /** bit mask for FIFO offsets */
33
34#if FIFOSIZE * 8 < HTAPS * 2
35#error "FIFOSIZE too small"
36#endif
37
38/**
39 * Per-channel buffer
40 */
41typedef struct DSDContext {
42 uint8_t buf[FIFOSIZE];
43 unsigned pos;
45
46void ff_init_dsd_data(void);
47
48void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf,
49 const uint8_t *src, ptrdiff_t src_stride,
50 float *dst, ptrdiff_t dst_stride);
51#endif /* AVCODEC_DSD_H */
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
#define s(width, name)
Definition cbs_vp9.c:198
#define FIFOSIZE
Definition dsd.h:31
void ff_init_dsd_data(void)
Definition dsd.c:92
void ff_dsd2pcm_translate(DSDContext *s, size_t samples, int lsbf, const uint8_t *src, ptrdiff_t src_stride, float *dst, ptrdiff_t dst_stride)
Definition dsd.c:98
Per-channel buffer.
Definition dsd.h:41
uint8_t buf[FIFOSIZE]
Definition dsd.h:42
unsigned pos
Definition dsd.h:43
#define src
Definition vp8dsp.c:248