- int table_id = lrintf((x + LANCZOS_RADIUS) * LANCZOS_RESOLUTION);
- if (table_id < 0 || table_id >= (LANCZOS_RADIUS * 2) * LANCZOS_RESOLUTION) {
+ int table_id = lrintf(fabs(x) * LANCZOS_RESOLUTION);
+ if (table_id >= LANCZOS_RADIUS * LANCZOS_RESOLUTION) {