[x265] [PATCH] encoder: do not use std::list

Gopu Govindaswamy gopu at multicorewareinc.com
Wed Sep 18 13:47:43 CEST 2013


On Wed, Sep 18, 2013 at 5:05 PM, Jean-Baptiste Kempf <jb at videolan.org>wrote:

> On 18 Sep, Gopu Govindaswamy wrote :
> > -
> > +
>
> whitespace issue.
> > -            AccessUnit tmp;
> > +           NALUnitEBSP **tmp = NULL;
>
> Identation is off
> Identation ?
>


> > @@ -169,7 +169,7 @@
> >   \param   accessUnitsOut      output bitstream
> >   \retval                      number of encoded pictures
> >   */
> > -int TEncTop::encode(bool flush, const x265_picture_t* pic_in,
> x265_picture_t *pic_out, AccessUnit& accessUnitOut)
> > +int TEncTop::encode(bool flush, const x265_picture_t* pic_in,
> x265_picture_t *pic_out, NALUnitEBSP **nalunits)
>
> You fail to update the doxygen doc.
> I will update into doxygen doc
>


> > -        accessUnit.insert(accessUnit.end(), new NALUnitEBSP(onalu));
> > +        //accessUnit.insert(accessUnit.end(), new NALUnitEBSP(onalu));
>
> Why?
> forgot to modify this place, after sent the patch I have sent the separate
> patch for it,
>


> >      UInt numRBSPBytes = 0;
> > -    for (AccessUnit::const_iterator it = accessUnit.begin(); it !=
> accessUnit.end(); it++)
> > +    int count = 0;
> > +    while (nalunits[count])
>
> Are you sure nalunits[0] always exists?
> Yes i am sure nalunits[0] to nalunits[5] has 0 , i have initialized the
> nalunit in declaration
>


> >      {
> > -        UInt numRBSPBytes_nal = (*it)->m_packetSize;
> > +        UInt numRBSPBytes_nal = nalunits[count]->m_packetSize;
> >  #if VERBOSE_RATE
> >          printf("*** %6s numBytesInNALunit: %u\n",
> nalUnitTypeToString((*it)->m_nalUnitType), numRBSPBytes_nal);
> >  #endif
> > -        if ((*it)->m_nalUnitType != NAL_UNIT_PREFIX_SEI &&
> (*it)->m_nalUnitType != NAL_UNIT_SUFFIX_SEI)
> > +        if (nalunits[count]->m_nalUnitType != NAL_UNIT_PREFIX_SEI &&
> nalunits[count]->m_nalUnitType != NAL_UNIT_SUFFIX_SEI)
> >          {
> >              numRBSPBytes += numRBSPBytes_nal;
> >          }
> > +        count++;
> >      }
>
> Why not keeping the for syntax here?
> syntax?
> > +    NALUnitEBSP *nalunits[5] = { 0, 0, 0, 0, 0 };
>
> You should make this 5 a define, so you can use it later on
>
> >          if (pi_nal) *pi_nal = (int)nalcount;
> > +
>
> White space
>
> > +    NALUnitEBSP *nalunits[5] = { 0, 0, 0, 0, 0 };
> > +    int numEncoded = encoder->encode(!pic_in, pic_in, pic_out,
> nalunits);
> > +
>
> idem
> idem?
> > +            m_accessUnit[m_nalcount] = (NALUnitEBSP
> *)X265_MALLOC(NALUnitEBSP, 1);
>
> Why don't you check your malloc return???
>
    X265_MALLOC Will take care of this

>
> --
> Jean-Baptiste Kempf
> http://www.jbkempf.com/ - +33 672 704 734
> Sent from my Electronic Device
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>



-- 
Thanks & Regards
Gopu G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20130918/05f85e8d/attachment.html>


More information about the x265-devel mailing list