[FFmpeg-devel] [GSOC][PATCH 2/3] lavc/cfhd:corrected decompanding for table 9 used in cfhd
Michael Niedermayer
michael at niedermayer.cc
Thu Sep 6 11:57:04 EEST 2018
On Thu, Sep 06, 2018 at 11:36:22AM +0530, Gagandeep Singh wrote:
> On Fri, Aug 17, 2018 at 11:34 AM Gagandeep Singh <deepgagan231197 at gmail.com>
> wrote:
>
> >
> >
> > On Thu, Aug 16, 2018 at 2:37 AM Kieran Kunhya <kierank at obe.tv> wrote:
> >
> >> On Tue, 14 Aug 2018 at 08:43 Gagandeep Singh <deepgagan231197 at gmail.com>
> >> wrote:
> >>
> >> > Second patch for fixing decompanding in table 9.
> >> >
> >> > Gagandeep Singh
> >> >
> >>
> >> Seems ok
> >>
> >> Kieran
> >>
> >
> > Thanks!!
> >
> > Gagandeep Singh
> >
>
> Hi,
> This patch is to be applied along with the other updated patches.
>
> Thanks
> Gagandeep Singh
>
> > _______________________________________________
> >> ffmpeg-devel mailing list
> >> ffmpeg-devel at ffmpeg.org
> >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> >
> cfhd.c | 25 ++++++++++++++++++++++++-
> 1 file changed, 24 insertions(+), 1 deletion(-)
> 44fe9de4bb44ecd39071a9e543b7f8a718a41915 decompanding_fix.patch
> From 4f0c812aaf50738e579bde0bb12b9f2391eb15e5 Mon Sep 17 00:00:00 2001
> From: Gagandeep Singh <deepgagan231197 at gmail.com>
> Date: Thu, 6 Sep 2018 11:12:16 +0530
> Subject: [GSOC][PATCH 2/3] lavc/cfhd: correct decompanding for old codebook (table 9)
>
> ---
> libavcodec/cfhd.c | 25 ++++++++++++++++++++++++-
> 1 file changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
> index 3929b54f31..e78fa81655 100644
> --- a/libavcodec/cfhd.c
> +++ b/libavcodec/cfhd.c
> @@ -114,7 +114,30 @@ static inline int dequant_and_decompand(int level, int quantisation, int codeboo
> {
> if (lossless)
> return level;
> - if (codebook == 0 || codebook == 1) {
> + if (codebook == 0) {
> + if (level >= 40 && level < 264) {
> + if (level >= 54) {
> + level -= 54;
> + level <<= 2;
> + level += 54;
this can be simplified:
level = (level<<2) - 3*54;
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180906/1302c3ad/attachment.sig>
More information about the ffmpeg-devel
mailing list