From 0135c873a4b1615ef5a0e081d4b122cfeca8152e Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Sat, 3 Aug 2019 16:06:22 +0200 Subject: [PATCH] clear left 2 pixel --- src/common/tv_filters/AtariNTSC.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/common/tv_filters/AtariNTSC.cxx b/src/common/tv_filters/AtariNTSC.cxx index 41694782f..14c88196f 100644 --- a/src/common/tv_filters/AtariNTSC.cxx +++ b/src/common/tv_filters/AtariNTSC.cxx @@ -129,9 +129,13 @@ void AtariNTSC::renderThread(const uInt8* atari_in, const uInt32 in_width, { const uInt8* line_in = atari_in; ATARI_NTSC_BEGIN_ROW(NTSC_black, line_in[0]); - uInt32* restrict line_out = static_cast(rgb_out) + 2; // shift right by 2 pixel + uInt32* restrict line_out = static_cast(rgb_out); ++line_in; + // shift right by 2 pixel + line_out[0] = line_out[1] = 0; + line_out += 2; + for(uInt32 n = chunk_count; n; --n) { // order of input and output pixels must not be altered @@ -202,9 +206,13 @@ void AtariNTSC::renderWithPhosphorThread(const uInt8* atari_in, const uInt32 in_ { const uInt8* line_in = atari_in; ATARI_NTSC_BEGIN_ROW(NTSC_black, line_in[0]); - uInt32* restrict line_out = static_cast(rgb_out) + 2; // shift right by 2 pixel + uInt32* restrict line_out = static_cast(rgb_out); ++line_in; + // shift right by 2 pixel + line_out[0] = line_out[1] = 0; + line_out += 2; + for(uInt32 n = chunk_count; n; --n) { // order of input and output pixels must not be altered @@ -274,7 +282,7 @@ void AtariNTSC::renderWithPhosphorThread(const uInt8* atari_in, const uInt32 in_ rgb_in[bufofs] = getRGBPhosphor(out[bufofs], rgb_in[bufofs]); ++bufofs; } - // finish final pixels + // finish final 565 % 8 = 5 pixels /*rgb_in[bufofs] = getRGBPhosphor(out[bufofs], rgb_in[bufofs]); ++bufofs; rgb_in[bufofs] = getRGBPhosphor(out[bufofs], rgb_in[bufofs]);