diff --git a/libavcodec/arm/flacdsp_init_arm.c b/libavcodec/arm/flacdsp_init_arm.c index bac9ff1959..a16de9ee9a 100644 --- a/libavcodec/arm/flacdsp_init_arm.c +++ b/libavcodec/arm/flacdsp_init_arm.c @@ -26,8 +26,7 @@ void ff_flac_lpc_16_arm(int32_t *samples, const int coeffs[32], int order, int qlevel, int len); -av_cold void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, - int bps) +av_cold void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels) { if (CONFIG_FLAC_DECODER) c->lpc16 = ff_flac_lpc_16_arm; diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 17f1821c50..5ddc5a34d2 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -117,7 +117,7 @@ static av_cold int flac_decode_init(AVCodecContext *avctx) return ret; flac_set_bps(s); ff_flacdsp_init(&s->dsp, avctx->sample_fmt, - s->flac_stream_info.channels, s->flac_stream_info.bps); + s->flac_stream_info.channels); s->got_streaminfo = 1; return 0; @@ -185,7 +185,7 @@ static int parse_streaminfo(FLACContext *s, const uint8_t *buf, int buf_size) return ret; flac_set_bps(s); ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, - s->flac_stream_info.channels, s->flac_stream_info.bps); + s->flac_stream_info.channels); s->got_streaminfo = 1; return 0; @@ -536,7 +536,7 @@ static int decode_frame(FLACContext *s) dump_headers(s->avctx, &s->flac_stream_info); } ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, - s->flac_stream_info.channels, s->flac_stream_info.bps); + s->flac_stream_info.channels); // dump_headers(s->avctx, &s->flac_stream_info); diff --git a/libavcodec/flacdsp.c b/libavcodec/flacdsp.c index 79002dcac0..da8400ae0a 100644 --- a/libavcodec/flacdsp.c +++ b/libavcodec/flacdsp.c @@ -86,8 +86,7 @@ static void flac_lpc_32_c(int32_t *decoded, const int coeffs[32], } -av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, - int bps) +av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels) { c->lpc16 = flac_lpc_16_c; c->lpc32 = flac_lpc_32_c; @@ -125,8 +124,8 @@ av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int cha } #if ARCH_ARM - ff_flacdsp_init_arm(c, fmt, channels, bps); + ff_flacdsp_init_arm(c, fmt, channels); #elif ARCH_X86 - ff_flacdsp_init_x86(c, fmt, channels, bps); + ff_flacdsp_init_x86(c, fmt, channels); #endif } diff --git a/libavcodec/flacdsp.h b/libavcodec/flacdsp.h index 4a7a36064a..9f8ed38b66 100644 --- a/libavcodec/flacdsp.h +++ b/libavcodec/flacdsp.h @@ -36,8 +36,8 @@ typedef struct FLACDSPContext { const int32_t coefs[32], int shift); } FLACDSPContext; -void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); -void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); -void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); +void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels); +void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels); +void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels); #endif /* AVCODEC_FLACDSP_H */ diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 9350e42dbc..3cfefbc89f 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -425,8 +425,7 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) s->options.max_prediction_order, FF_LPC_TYPE_LEVINSON); ff_bswapdsp_init(&s->bdsp); - ff_flacdsp_init(&s->flac_dsp, avctx->sample_fmt, channels, - avctx->bits_per_raw_sample); + ff_flacdsp_init(&s->flac_dsp, avctx->sample_fmt, channels); dprint_compression_options(s); diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c index ed2e5ed15b..7975712db9 100644 --- a/libavcodec/x86/flacdsp_init.c +++ b/libavcodec/x86/flacdsp_init.c @@ -52,8 +52,7 @@ DECORRELATE_FUNCS(16, avx); DECORRELATE_FUNCS(32, sse2); DECORRELATE_FUNCS(32, avx); -av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, - int bps) +av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels) { #if HAVE_X86ASM int cpu_flags = av_get_cpu_flags(); diff --git a/tests/checkasm/flacdsp.c b/tests/checkasm/flacdsp.c index 6cd8ac50ef..ef93df8c81 100644 --- a/tests/checkasm/flacdsp.c +++ b/tests/checkasm/flacdsp.c @@ -76,12 +76,12 @@ void checkasm_check_flacdsp(void) int i, j; for (i = 0; i < 2; i++) { - ff_flacdsp_init(&h, fmts[i].fmt, 2, 0); + ff_flacdsp_init(&h, fmts[i].fmt, 2); for (j = 0; j < 3; j++) if (check_func(h.decorrelate[j], "flac_decorrelate_%s_%d", names[j], fmts[i].bits)) check_decorrelate(&ref_dst, ref_src, &new_dst, new_src, 2, fmts[i].bits); for (j = 2; j <= MAX_CHANNELS; j += 2) { - ff_flacdsp_init(&h, fmts[i].fmt, j, 0); + ff_flacdsp_init(&h, fmts[i].fmt, j); if (check_func(h.decorrelate[0], "flac_decorrelate_indep%d_%d", j, fmts[i].bits)) check_decorrelate(&ref_dst, ref_src, &new_dst, new_src, j, fmts[i].bits); }