+ if (doffs > doffs_old)
+ clear_counter = 2;
+ doffs_old = doffs;
+
+ if (clear_counter > 0) {
+ if (pl_plat_clear)
+ pl_plat_clear();
+ else
+ memset(pl_vout_buf, 0,
+ dstride * pl_vout_h * pl_vout_bpp / 8);
+ clear_counter--;
+ }
+
+ if (pl_plat_blit)
+ {
+ pl_plat_blit(doffs, src, w, h, stride, bgr24);
+ goto out_hud;
+ }
+
+ if (dest == NULL)
+ goto out;
+
+ dest += doffs * 2;
+
+ if (bgr24)
+ {
+ if (pl_rearmed_cbs.only_16bpp) {
+ for (; h1-- > 0; dest += dstride * 2, src += stride)
+ {
+ bgr888_to_rgb565(dest, src, w * 3);
+ }
+ }
+ else {
+ dest -= doffs * 2;
+ dest += (doffs / 8) * 24;
+
+ for (; h1-- > 0; dest += dstride * 3, src += stride)
+ {
+ bgr888_to_rgb888(dest, src, w * 3);
+ }
+ }
+ }
+#ifdef __ARM_NEON__
+ else if (soft_filter == SOFT_FILTER_SCALE2X && pl_vout_scale_w == 2)
+ {
+ neon_scale2x_16_16(src, (void *)dest, w,
+ stride * 2, dstride * 2, h);
+ }
+ else if (soft_filter == SOFT_FILTER_EAGLE2X && pl_vout_scale_w == 2)
+ {
+ neon_eagle2x_16_16(src, (void *)dest, w,
+ stride * 2, dstride * 2, h);
+ }
+ else if (scanlines != 0 && scanline_level != 100)
+ {
+ int 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)
+ {
+ 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;
+ }
+ }