[x265] [PATCH] param: update calculated maxCLL, maxFALL values to contentLightLevelInfo

Deepthi Nandakumar deepthi at multicorewareinc.com
Wed Aug 26 13:34:24 CEST 2015


Agreed that's the general philosophy. But this works better if the user
wants to regenerate headers, because the encoder->param has now been
reset.  Else, the user is responsible for

a) copying stats->maxCLL to user Param
b) doing an encoder reconfig, and copying user param to encoder->param
c) generate headers

What we have here avoids step 1 and 2.



On Wed, Aug 26, 2015 at 4:53 PM, Steve Borho <steve at borho.org> wrote:

> On 08/26, kavitha at multicorewareinc.com wrote:
> > # HG changeset patch
> > # User Kavitha Sampath <kavitha at multicorewareinc.com>
> > # Date 1440572877 -19800
> > #      Wed Aug 26 12:37:57 2015 +0530
> > # Node ID 73b94b3431f98bc94c2113d98f7788783453197e
> > # Parent  a28a863393994d8fb1d58c721352d9b4ec8c46ee
> > param: update calculated maxCLL, maxFALL values to contentLightLevelInfo
>
> the encoder is generally supposed to treat the param structure as
> read-only (the encoder keeps a seperate copy from what the cli/user
> passed into the encoder creation function).
>
> > diff -r a28a86339399 -r 73b94b3431f9 source/encoder/encoder.cpp
> > --- a/source/encoder/encoder.cpp      Mon Aug 24 14:04:32 2015 +0530
> > +++ b/source/encoder/encoder.cpp      Wed Aug 26 12:37:57 2015 +0530
> > @@ -39,6 +39,10 @@
> >
> >  #include "x265.h"
> >
> > +#if _MSC_VER
> > +#pragma warning(disable: 4996) // POSIX functions are just fine, thanks
> > +#endif
> > +
> >  namespace X265_NS {
> >  const char g_sliceTypeToChar[] = {'B', 'P', 'I'};
> >  }
> > @@ -1046,6 +1050,14 @@
> >
> >          stats->maxCLL         = m_analyzeAll.m_maxCLL;
> >          stats->maxFALL        = (uint16_t)(m_analyzeAll.m_maxFALL /
> m_analyzeAll.m_numPics);
> > +        if (m_param->contentLightLevelInfo)
> > +        {
> > +            free((char*)m_param->contentLightLevelInfo);
> > +
> > +            char value[16];
> > +            sprintf(value, "%hu,%hu", stats->maxCLL, stats->maxFALL);
> > +            m_param->contentLightLevelInfo = strdup(value);
> > +        }
> >      }
> >
> >      /* If new statistics are added to x265_stats, we must check here
> whether the
> > _______________________________________________
> > x265-devel mailing list
> > x265-devel at videolan.org
> > https://mailman.videolan.org/listinfo/x265-devel
>
> --
> Steve Borho
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150826/a942f3be/attachment-0001.html>


More information about the x265-devel mailing list