On date Tuesday 2024-03-05 23:51:39 +0100, Marton Balint wrote: > Should be easier to add new codecs by using the same order as in > av_get_exact_bits_per_sample(). > > Signed-off-by: Marton Balint <c...@passwd.hu> > --- > libavcodec/bsf/pcm_rechunk.c | 21 +++++++++++++-------- > 1 file changed, 13 insertions(+), 8 deletions(-) > > diff --git a/libavcodec/bsf/pcm_rechunk.c b/libavcodec/bsf/pcm_rechunk.c > index 28b5722ac9..9bbc5a74d6 100644 > --- a/libavcodec/bsf/pcm_rechunk.c > +++ b/libavcodec/bsf/pcm_rechunk.c > @@ -193,21 +193,26 @@ static const AVClass pcm_rechunk_class = { > }; > > static const enum AVCodecID codec_ids[] = { > - AV_CODEC_ID_PCM_S16LE, > - AV_CODEC_ID_PCM_S16BE, > + // 8 bit > AV_CODEC_ID_PCM_S8, > - AV_CODEC_ID_PCM_S32LE, > - AV_CODEC_ID_PCM_S32BE, > - AV_CODEC_ID_PCM_S24LE, > + // 16 bit > + AV_CODEC_ID_PCM_S16BE, > + AV_CODEC_ID_PCM_S16LE, > + // 24 bit > AV_CODEC_ID_PCM_S24BE, > + AV_CODEC_ID_PCM_S24LE, > + // 32 bit > + AV_CODEC_ID_PCM_S32BE, > + AV_CODEC_ID_PCM_S32LE, > AV_CODEC_ID_PCM_F32BE, > AV_CODEC_ID_PCM_F32LE, > + AV_CODEC_ID_PCM_F24LE, > + AV_CODEC_ID_PCM_F16LE, > + // 64 bit > AV_CODEC_ID_PCM_F64BE, > AV_CODEC_ID_PCM_F64LE, > - AV_CODEC_ID_PCM_S64LE, > AV_CODEC_ID_PCM_S64BE, > - AV_CODEC_ID_PCM_F16LE, > - AV_CODEC_ID_PCM_F24LE, > + AV_CODEC_ID_PCM_S64LE, > AV_CODEC_ID_NONE,
or just use lexical order (given than AV_CODEC_ID_PCM_F24LE/AV_CODEC_ID_PCM_F16LE => 32 might be confusing). _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".