On Thu, 20 Mar 2014, Ben Avison wrote:
Verified with profiling that this doesn't have a measurable effect upon overall performance. --- libavcodec/mlpdec.c | 40 +++++++++++++++++++++++----------------- libavcodec/mlpdsp.c | 38 ++++++++++++++++++++++++++++++++++++++ libavcodec/mlpdsp.h | 22 ++++++++++++++++++++++ 3 files changed, 83 insertions(+), 17 deletions(-)diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index b9d1704..49353d9 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -360,6 +360,10 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb) m->avctx->sample_fmt = AV_SAMPLE_FMT_S32; else m->avctx->sample_fmt = AV_SAMPLE_FMT_S16; + m->dsp.mlp_pack_output = m->dsp.mlp_select_pack_output(m->substream[m->max_decoded_substream].ch_assign, + m->substream[m->max_decoded_substream].output_shift, + m->substream[m->max_decoded_substream].max_matrix_channel, + m->avctx->sample_fmt == AV_SAMPLE_FMT_S32);
I'm not sure if this is the right way to do this, or if the mlp_packet_output function pointer should be in MLPDecodeContext instead? Practically it probably doesn't matter though.
// Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
