[x265] [PATCH] Reduce half HPEL interpolate works by merge nest point
Derek Buitenhuis
derek.buitenhuis at gmail.com
Wed Sep 25 14:06:45 CEST 2013
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?
> 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.
[...]
> - assert(height % 2 == 0);
> + if (N == 4)
> + assert(height % 2 == 0);
I don't think this is what asserts are meant for.
> 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.
> +void MotionEstimate::subpelInterpolate2(pixel *fref, intptr_t lumaStride, int xFrac, int yFrac, int dir)
> +{
> + assert(yFrac | xFrac);
See above.
- Derek
More information about the x265-devel
mailing list