Commit 330ba8d5 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/dsd: use uint8_t instead of unsigned char

parent 9606e4b6
...@@ -53,12 +53,12 @@ av_cold void ff_init_dsd_data(void) ...@@ -53,12 +53,12 @@ av_cold void ff_init_dsd_data(void)
} }
void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf, void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf,
const unsigned char *src, ptrdiff_t src_stride, const uint8_t *src, ptrdiff_t src_stride,
float *dst, ptrdiff_t dst_stride) float *dst, ptrdiff_t dst_stride)
{ {
unsigned char buf[FIFOSIZE]; uint8_t buf[FIFOSIZE];
unsigned pos, i; unsigned pos, i;
unsigned char* p; uint8_t* p;
double sum; double sum;
pos = s->pos; pos = s->pos;
...@@ -74,8 +74,8 @@ void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf, ...@@ -74,8 +74,8 @@ void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf,
sum = 0.0; sum = 0.0;
for (i = 0; i < CTABLES; i++) { for (i = 0; i < CTABLES; i++) {
unsigned char a = buf[(pos - i) & FIFOMASK]; uint8_t a = buf[(pos - i) & FIFOMASK];
unsigned char b = buf[(pos - (CTABLES*2 - 1) + i) & FIFOMASK]; uint8_t b = buf[(pos - (CTABLES*2 - 1) + i) & FIFOMASK];
sum += ctables[i][a] + ctables[i][b]; sum += ctables[i][a] + ctables[i][b];
} }
......
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
* Per-channel buffer * Per-channel buffer
*/ */
typedef struct DSDContext { typedef struct DSDContext {
unsigned char buf[FIFOSIZE]; uint8_t buf[FIFOSIZE];
unsigned pos; unsigned pos;
} DSDContext; } DSDContext;
void ff_init_dsd_data(void); void ff_init_dsd_data(void);
void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf, void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf,
const unsigned char *src, ptrdiff_t src_stride, const uint8_t *src, ptrdiff_t src_stride,
float *dst, ptrdiff_t dst_stride); float *dst, ptrdiff_t dst_stride);
#endif /* AVCODEC_DSD_H */ #endif /* AVCODEC_DSD_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment