[x265] [PATCH] Reduce half HPEL interpolate works by merge nest point
Steve Borho
steve at borho.org
Thu Sep 26 05:07:15 CEST 2013
On Wed, Sep 25, 2013 at 8:06 AM, chen <chenm003 at 163.com> wrote:
> At 2013-09-25 20:06:45,"Derek Buitenhuis" <derek.buitenhuis at gmail.com> wrote:
> >On 9/25/2013 6:29 AM, Min Chen wrote:
> >> # HG changeset patch
> >> # User Min Chen <chenm003 at 163.com>
> >> # Date 1380086952 -28800
> >> # Node ID 57efca19f5b8d8b5bdc22a0bb9fbfc6169724266
> >> # Parent bdd26fd0325acf0f36409e994bdc262b11fa70f4
> >> Reduce half HPEL interpolate works by merge nest point
> >
> >"half HPEL" == QPEL, no? Or do you mean something else?
> half works of HPEL, my English problem
>
>
>
> >> In the square1[9], the candidate pixel below:
> >>
> >> 5 1 7
> >> 3 x 4
> >> 6 2 8
> >>
> >> The main idea is in the HPEL ME, every two pixel distance is unit '1',
> >> so we can merge 1-2, 3-4, 5-6-7-8 with one interpolate
> by increment 1 extra row/col.
> >
> >[...]
> I means many pixel may share in that time, so we can reduce interpolate operators.
>
>
> >> - assert(height % 2 == 0);
> >> + if (N == 4)
> >> + assert(height % 2 == 0);
> >
> >I don't think this is what
> asserts are meant for.
> The 4-tap interpolate will process 2 rows every loop, so we keep this code, if someone change caller, we can know it need to sync.
>
>
> >> fenc = (pixel*)X265_MALLOC(pixel, MAX_CU_SIZE * MAX_CU_SIZE);
> >> - subpelbuf = (pixel*)X265_MALLOC(pixel, MAX_CU_SIZE * MAX_CU_SIZE);
> >> - immedVal = (short*)X265_MALLOC(short, MAX_CU_SIZE * (MAX_CU_SIZE + NTAPS_LUMA - 1));
> >> + subpelbuf = (pixel*)X265_MALLOC(pixel, (MAX_CU_SIZE + 1) * (MAX_CU_SIZE + 1));
> >> + immedVal = (short*)X265_MALLOC(short, (MAX_CU_SIZE + 1) * (MAX_CU_SIZE + 1 + NTAPS_LUMA - 1));
> >
> >Aside: We really should not be using the 'short' datatype.
> It is not portable.
> Keep old code only, I think we need update all of short when we want to support high_bit_depth
>
>
Derek's point here, which we need to take into account in a new patch, is
that we should use int16_t here instead of short because short is not
always 16bits.
> >> +void MotionEstimate::subpelInterpolate2(pixel *fref, intptr_t lumaStride,
> int xFrac, int yFrac, int dir)
> >> +{
> >> + assert(yFrac | xFrac);
> >
> >See above.
> This function for subpel only, so it will report when invalid used.
>
> >- Derek
> >
> >_______________________________________________
> >x265-devel mailing list
> >x265-devel at videolan.org
> >https://mailman.videolan.org/listinfo/x265-devel
>
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
>
--
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20130925/b26dabb3/attachment.html>
More information about the x265-devel
mailing list