Blargg md_ntsc 0.1.2 kernel support for Kega Refusion RGB565 filtering.

Source: Genesis Plus GX revision f27655b592ef43f317272d79883bcaa10d3ac8ad,
core/ntsc/md_ntsc.c, md_ntsc.h, md_ntsc_impl.h and license.txt:
https://github.com/libretro/Genesis-Plus-GX/tree/f27655b592ef43f317272d79883bcaa10d3ac8ad/core/ntsc
Upstream: md_ntsc 0.1.2, http://www.slack.net/~ant/
Copyright (C) 2006-2007 Shay Green; LGPL version 2.1 or later.
The md_ntsc.c donor also identifies GPX adaptations by EkeEke.

The small kernel implementation is retained here, with its original notices.
Kega Refusion changes, 2026-11-01: remove unused output/global-blitter helpers;
use explicitly unsigned 32-bit RGB packing to avoid signed-shift undefined
behavior; make immutable two-phase MD pixel weights local to this translation
unit. No mutable global state, GPX bitmap or Qt dependency is retained.

src/core32x/video/ntsc565.c/.h adapts initialization, error correction and the
4-input/8-output row algorithm to an optional 65536-entry full RGB565 kernel.
The table contains 65536 * 32 * sizeof(uint32_t) = 8388608 bytes, independent
of LP64/LLP64 unsigned-long size. Gamma inputs retain all 32 red/blue and all
64 green levels. Presets use the same coefficients as GPX's monochrome,
composite, S-Video and RGB presets. Existing GPX filtering is not changed.

The original LGPL 2.1 text is included in COPYING.LGPL-2.1. The component and
these adaptations are provided under LGPL 2.1 or later, as the original code.

GPU Blargg kernel adaptation, Kega Refusion, 2026-11-14.

Source: the md_ntsc 0.1.2 and sms_ntsc 0.2.3 implementations in
Genesis Plus GX revision f27655b592ef43f317272d79883bcaa10d3ac8ad:
https://github.com/libretro/Genesis-Plus-GX/tree/f27655b592ef43f317272d79883bcaa10d3ac8ad/core/ntsc
Copyright (C) 2006-2007 Shay Green; LGPL version 2.1 or later.
GPX adaptations are identified by EkeEke in the donors.

md_ntsc_kernel_impl.h derives from the retained MD kernel implementation
and adds the upstream SMS three-alignment pixel weights. The common
resampling logic already supports the SMS 8-composite-sample/7-output ratio.
BlarggKernel.cpp retains the preset coefficients and MD/SMS error correction,
using fixed uint32_t packing and all 5/6/5 input bits for mixed/native RGB.
The GPU uses byte-packed RGBA8 lookup textures and the original six/eight
phase contributions. It never approximates the filter with a generic blur.
The common RGB presentation image has no core palette backdrop. Its edge
policy intentionally differs from the donor's backdrop padding: repeat each
row's leftmost/rightmost RGB samples, including H32 initial extra pixels and
the final chunk. This keeps uniform backgrounds uniform to the screen edge.
The phase order and coefficients remain upstream exact. H40 widths not
divisible by four are extended and cropped to twice their source width.

The LGPL 2.1 text is included in COPYING.LGPL-2.1.
