You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
dpcm: replace short with int16_t
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
typedef struct DPCMContext {
|
typedef struct DPCMContext {
|
||||||
int channels;
|
int channels;
|
||||||
short roq_square_array[256];
|
int16_t roq_square_array[256];
|
||||||
int sample[2]; ///< previous sample (for SOL_DPCM)
|
int sample[2]; ///< previous sample (for SOL_DPCM)
|
||||||
const int *sol_table;//for SOL_DPCM
|
const int *sol_table;//for SOL_DPCM
|
||||||
} DPCMContext;
|
} DPCMContext;
|
||||||
@@ -115,7 +115,6 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
|
|||||||
{
|
{
|
||||||
DPCMContext *s = avctx->priv_data;
|
DPCMContext *s = avctx->priv_data;
|
||||||
int i;
|
int i;
|
||||||
short square;
|
|
||||||
|
|
||||||
if (avctx->channels < 1 || avctx->channels > 2) {
|
if (avctx->channels < 1 || avctx->channels > 2) {
|
||||||
av_log(avctx, AV_LOG_INFO, "invalid number of channels\n");
|
av_log(avctx, AV_LOG_INFO, "invalid number of channels\n");
|
||||||
@@ -130,7 +129,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
|
|||||||
case CODEC_ID_ROQ_DPCM:
|
case CODEC_ID_ROQ_DPCM:
|
||||||
/* initialize square table */
|
/* initialize square table */
|
||||||
for (i = 0; i < 128; i++) {
|
for (i = 0; i < 128; i++) {
|
||||||
square = i * i;
|
int16_t square = i * i;
|
||||||
s->roq_square_array[i ] = square;
|
s->roq_square_array[i ] = square;
|
||||||
s->roq_square_array[i + 128] = -square;
|
s->roq_square_array[i + 128] = -square;
|
||||||
}
|
}
|
||||||
@@ -179,7 +178,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
int predictor[2];
|
int predictor[2];
|
||||||
int ch = 0;
|
int ch = 0;
|
||||||
int stereo = s->channels - 1;
|
int stereo = s->channels - 1;
|
||||||
short *output_samples = data;
|
int16_t *output_samples = data;
|
||||||
|
|
||||||
if (!buf_size)
|
if (!buf_size)
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user