static const char h_soft_filter[] = "Works only if game uses low resolution modes";
static const char h_gamma[] = "Gamma/brightness adjustment (default 100)";
#ifdef __ARM_NEON__
+static const char *men_scanlines[] = { "OFF", "1", "2", "3", NULL };
static const char h_scanline_l[] = "Scanline brightness, 0-100%";
#endif
mee_enum ("Hardware Filter", MA_OPT_HWFILTER, plat_target.hwfilter, men_dummy),
mee_enum_h ("Software Filter", MA_OPT_SWFILTER, soft_filter, men_soft_filter, h_soft_filter),
#ifdef __ARM_NEON__
- mee_onoff ("Scanlines", MA_OPT_SCANLINES, scanlines, 1),
+ mee_enum ("Scanlines", MA_OPT_SCANLINES, scanlines, men_scanlines),
mee_range_h ("Scanline brightness", MA_OPT_SCANLINE_LEVEL, scanline_level, 0, 100, h_scanline_l),
#endif
mee_range_h ("Gamma adjustment", MA_OPT_GAMMA, g_gamma, 1, 200, h_gamma),
}
else if (scanlines != 0 && scanline_level != 100)
{
- int l = scanline_level * 2048 / 100;
+ int h2, l = scanline_level * 2048 / 100;
int stride_0 = pl_vout_scale_h >= 2 ? 0 : stride;
h1 *= pl_vout_scale_h;
- for (; h1 >= 2; h1 -= 2)
+ while (h1 > 0)
{
- bgr555_to_rgb565(dest, src, w * 2);
- dest += dstride * 2, src += stride_0;
+ for (h2 = scanlines; h2 > 0 && h1 > 0; h2--, h1--) {
+ bgr555_to_rgb565(dest, src, w * 2);
+ dest += dstride * 2, src += stride_0;
+ }
- bgr555_to_rgb565_b(dest, src, w * 2, l);
- dest += dstride * 2, src += stride;
+ for (h2 = scanlines; h2 > 0 && h1 > 0; h2--, h1--) {
+ bgr555_to_rgb565_b(dest, src, w * 2, l);
+ dest += dstride * 2, src += stride;
+ }
}
}
#endif