[FFmpeg-devel] [GSoC][PATCH v2 2/2] mlpenc: Working MLP/TrueHD encoder
Michael Niedermayer
michael at niedermayer.cc
Thu Dec 29 03:14:12 EET 2016
On Tue, Aug 30, 2016 at 03:53:02PM +0530, Jai Luthra wrote:
> * Multichannel support for TrueHD is experimental
>
> There should be downmix substreams present for 2+ channel bitstreams,
> but ffmpeg decoder doesn't need it. Will add support for this soon.
>
> * There might be lossless check failures on LFE channels
>
> * 32-bit sample support has been removed for now, will add it later
>
> While testing, some samples gave lossless check failures when enforcing
> s32. Probably this will also get solved with the LFE issues.
>
> Signed-off-by: Jai Luthra <me at jailuthra.in>
> ---
>
> > a fate test could also be added
>
> sure. i will add it in a separate patch later.
>
> libavcodec/Makefile | 2 +
> libavcodec/allcodecs.c | 4 +-
> libavcodec/mlp.c | 21 +
> libavcodec/mlp.h | 40 +
> libavcodec/mlpenc.c | 2416 ++++++++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 2481 insertions(+), 2 deletions(-)
> create mode 100644 libavcodec/mlpenc.c
[...]
> +/** Determines the amount of bits needed to encode the samples using no
> + * codebooks and a specified offset.
> + */
> +static void no_codebook_bits_offset(MLPEncodeContext *ctx,
> + unsigned int channel, int16_t offset,
> + int32_t min, int32_t max,
> + BestOffset *bo)
> +{
> + DecodingParams *dp = ctx->cur_decoding_params;
> + int32_t unsign;
> + int lsb_bits;
> +
> + min -= offset;
> + max -= offset;
> +
> + lsb_bits = FFMAX(number_sbits(min), number_sbits(max)) - 1;
> +
> + lsb_bits += !!lsb_bits;
> +
> + unsign = 1 << (lsb_bits - 1);
coverity issue 1396239 says lsb_bits can be 0 here
which would result in an undefined shift
ill send you a invite to coverity so you can take a look
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161229/04ce1a26/attachment.sig>
More information about the ffmpeg-devel
mailing list