c
int v_sampling = (sp->v_sampling != 0) ? sp->v_sampling : 1;
if ((td->td_tilelength % (v_sampling * DCTSIZE)) != 0) {
    // ... rest of the code
}
