Skip to content

Commit

Permalink
Fix 6847 artifact detection
Browse files Browse the repository at this point in the history
  • Loading branch information
IanSB committed Jul 12, 2021
1 parent df4d6db commit bda121a
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/capture_line_ntsc_8bpp.S
Expand Up @@ -155,9 +155,13 @@ skip_psync_loop_no_old\@:
eorne r8, r8, #(0x12 << (PIXEL_BASE + 6))

eor r9, r8, r8, lsr #3
tst r9, #(0x05 << PIXEL_BASE)
tstne r9, #(0x05 << (PIXEL_BASE + 6))
and r9, r9, r9, lsr #2
tst r9, #(0x01 << PIXEL_BASE)
tstne r9, #(0x01 << (PIXEL_BASE + 6))
orreq r3, r3, #BITDUP_LINE_CONDITION_DETECTED //detect if any U/V content
tst r12, #NTSC_IGNORE_FIRST
bicne r3, r3, #BITDUP_LINE_CONDITION_DETECTED
bicne r12, r12, #NTSC_IGNORE_FIRST

and r9, r8, #(0x12 << PIXEL_BASE)
and r14, r8, #(0x12 << (PIXEL_BASE + 6))
Expand All @@ -178,9 +182,13 @@ skip_psync_loop_no_old\@:
eorne r8, r8, #(0x12 << (PIXEL_BASE + 6))

eor r9, r8, r8, lsr #3
tst r9, #(0x05 << PIXEL_BASE)
tstne r9, #(0x05 << (PIXEL_BASE + 6))
and r9, r9, r9, lsr #2
tst r9, #(0x01 << PIXEL_BASE)
tstne r9, #(0x01 << (PIXEL_BASE + 6))
orreq r3, r3, #BITDUP_LINE_CONDITION_DETECTED //detect if any U/V content
tst r12, #NTSC_IGNORE_FIRST
bicne r3, r3, #BITDUP_LINE_CONDITION_DETECTED
bicne r12, r12, #NTSC_IGNORE_FIRST

and r9, r8, #(0x3f << PIXEL_BASE)
and r14, r8, #(0x3f << (PIXEL_BASE + 6))
Expand Down Expand Up @@ -1221,6 +1229,7 @@ capture_line_ntsc_sixbits_double_8bpp_mono:
push {lr}
ldr r12, =ntsc_status
ldr r12, [r12]
orr r12, #NTSC_IGNORE_FIRST
tst r12, #NTSC_ARTIFACT
beq no_ntsc_sixbits_double_8bpp_mono
SKIP_PSYNC_NO_OLD_CPLD_NTSC // returns with ntsc_status in r12
Expand Down Expand Up @@ -1308,6 +1317,7 @@ capture_line_ntsc_sixbits_double_8bpp_mono_auto:
push {lr}
ldr r12, =ntsc_status
ldr r12, [r12]
orr r12, #NTSC_IGNORE_FIRST
tst r12, #NTSC_ARTIFACT
beq no_ntsc_sixbits_double_8bpp_mono_auto
SKIP_PSYNC_NO_OLD_CPLD_NTSC // returns with ntsc_status in r12
Expand Down

0 comments on commit bda121a

Please sign in to comment.