Optimise Pi zero 2 capture code and modify warning

pull/248/head
IanSB 2021-11-05 23:44:52 +00:00
rodzic b949669d74
commit 31228ffbe6
3 zmienionych plików z 14 dodań i 11 usunięć

Wyświetl plik

@ -117,6 +117,7 @@
#define SCREEN_START 0x1E000000 // start of screen area
#define SCREEN_SIZE 0x02000000 // size of screen area
#define CACHED_SCREEN_OFFSET 0x01000000 // offset to cached screen area
#define WARN_12BIT // warn that 9bpp & 12bpp won't work
#define HIDE_12BIT_PROFILES // 12 bit profile won't work on Pi zero2 etc
//#define INHIBIT_DOUBLE_HEIGHT // inhibit line doubling as it causes memory stalls
//#define USE_ALT_M7DEINTERLACE_CODE // uses re-ordered code for mode7 deinterlace
@ -129,6 +130,7 @@
#define SCREEN_START 0x1E000000 // start of screen area
#define SCREEN_SIZE 0x02000000 // size of screen area
#define CACHED_SCREEN_OFFSET 0x01000000 // offset to cached screen area
#define WARN_12BIT // warn that 9bpp & 12bpp won't work
#define HIDE_12BIT_PROFILES // 12 bit profile won't work on Pi zero2 etc
//#define INHIBIT_DOUBLE_HEIGHT // inhibit line doubling as it causes memory stalls
//#define USE_ALT_M7DEINTERLACE_CODE // uses re-ordered code for mode7 deinterlace

Wyświetl plik

@ -2226,14 +2226,15 @@ wait_capture_count:
beq wait_capture_count
ldr r12, write_pointer
core_capture:
ACTUAL_WAIT_FOR_PSYNC_EDGE_FAST // expects GPLEV0 in r4, result in r8
str r12, write_pointer // write pointer is one sample behind
str r8, [r12], #4
sub r11, r11, #1
cmp r11, #0
bgt core_capture
str r12, write_pointer // final write pointer
mov r11, #0
ldr r8, [r4]
eor r0,r8, r3 // ***adjust register so r8 isn't corrupt
tst r0, #PSYNC_MASK
streq r12, write_pointer
eoreq r3, #PSYNC_MASK
streq r8, [r12], #4
subeqs r11, r11, #1
bne core_capture
str r12, write_pointer // final write pointer
str r11, sync0_flag
str r11, sync1_flag
str r11, capture_count

Wyświetl plik

@ -3250,7 +3250,7 @@ void rgb_to_hdmi_main() {
}
osd_set(1, 0, osdline);
} else {
#if defined(RPI2) || defined(RPI3)
#if defined(WARN_12BIT)
if (capinfo->sample_width >= SAMPLE_WIDTH_9LO) {
osd_set(1, 0, "9/12BPP UNSUPPORTED on Zero2W, use Zero/W");
} else {
@ -3298,7 +3298,7 @@ void rgb_to_hdmi_main() {
ncapture = osd_key(OSD_SW3);
}
#if defined(RPI2) || defined(RPI3)
#if defined(WARN_12BIT)
if (powerup || ((capinfo->sample_width >= SAMPLE_WIDTH_9LO) && !osd_active())) {
#else
if (powerup) {
@ -3318,7 +3318,7 @@ void rgb_to_hdmi_main() {
}
osd_set(0, ATTR_DOUBLE_SIZE, osdline);
osd_display_interface(2);
#if defined(RPI2) || defined(RPI3)
#if defined(WARN_12BIT)
if(capinfo->sample_width >= SAMPLE_WIDTH_9LO) {
osd_set(2 + 4, 0, "9BPP & 12BPP NOT SUPPORTED on Pi Zero 2W");
osd_set(2 + 5, 0, "Please use a Pi Zero or Pi Zero W");