[x265] [PATCH 4 of 6] rc: add 2 pass states in RateControl

Aarthi Priya Thirumalai aarthi at multicorewareinc.com
Mon Jun 16 19:46:55 CEST 2014


On Mon, Jun 16, 2014 at 9:43 AM, Steve Borho <steve at borho.org> wrote:

> On Sun, Jun 15, 2014 at 1:50 PM,  <aarthi at multicorewareinc.com> wrote:
> > # HG changeset patch
> > # User Aarthi Thirumalai<aarthi at multicorewareinc.com>
> > # Date 1402857908 -19800
> > #      Mon Jun 16 00:15:08 2014 +0530
> > # Node ID 9e0a1f70169df85350507de83c27eeae172e7547
> > # Parent  5c2aee7700a3e222989fadabcb9ba9b1b3291fbd
> > rc: add 2 pass states in RateControl
> >
> > diff -r 5c2aee7700a3 -r 9e0a1f70169d source/encoder/ratecontrol.h
> > --- a/source/encoder/ratecontrol.h      Mon Jun 16 00:04:10 2014 +0530
> > +++ b/source/encoder/ratecontrol.h      Mon Jun 16 00:15:08 2014 +0530
> > @@ -137,6 +137,30 @@
> >      double   m_nominalRemovalTime;
> >      double   m_prevCpbFinalAT;
> >
> > +    /*2 pass */
>
> white-space
>
> > +    bool m_2pass;
> > +    FILE *m_statFileOut;
> > +    char *m_statFileTmpname;
> > +    FILE *m_cutreeStatFileOut;
> > +    char *m_cutreeStatFileTmpname;
> > +    char *m_cbtreeStatFileName;
> > +    FILE *m_cutreeStatFileIn;
>
> are filenames required here?
>
atleast these two char *m_statFileTmpname;char *m_cutreeStatFileTmpname;
need to be stored, so that they can be used to rename those files back at
the end of the encode - during those intermediate passes where both
inputStatFile and outputStatFile may share the same name.

>
> > +
> > +    struct
> > +    {
> > +        uint16_t *qpBuffer[2]; /* Global buffers for converting MB-tree
> quantizer data. */
> > +        int qpbufPos;          /* In order to handle pyramid
> reordering, QP buffer acts as a stack.
> > +                                * This value is the current position (0
> or 1). */
> > +        int srcCuCount;
> > +        /* For rescaling */
> > +        int rescaleEnabled;
> > +        float *scaleBuffer[2]; /* Intermediate buffers */
> > +        int filtersize[2];     /* filter size (H/V) */
> > +        float *coeffs[2];
> > +        int *pos[2];
> > +        int srcdim[2];         /* Source dimensions (W/H) */
> > +    } m_cuTreeStats;
> > +
> >      RateControl(x265_param *p);
> >
> >      // to be called for each frame to process RateControl and set QP
> > _______________________________________________
> > 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/20140616/075914ad/attachment.html>


More information about the x265-devel mailing list