From 2523b0afee6750e798d2b530bd40d35ec774c7c5 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 1 May 2025 04:07:24 +0800 Subject: [PATCH] gc2145 talking and up exposure and noise levels need to be fixed, and need to find a way to rotate/flip the screen? i think. --- libs/cramium-hal/src/gc2145/constants.rs | 37 + libs/cramium-hal/src/gc2145/gc2145.rs | 326 ++++ libs/cramium-hal/src/gc2145/mod.rs | 4 + libs/cramium-hal/src/gc2145/tables.rs | 1974 ++++++++++++++++++++++ 4 files changed, 2341 insertions(+) create mode 100644 libs/cramium-hal/src/gc2145/constants.rs create mode 100644 libs/cramium-hal/src/gc2145/gc2145.rs create mode 100644 libs/cramium-hal/src/gc2145/mod.rs create mode 100644 libs/cramium-hal/src/gc2145/tables.rs diff --git a/libs/cramium-hal/src/gc2145/constants.rs b/libs/cramium-hal/src/gc2145/constants.rs new file mode 100644 index 000000000..50aff9455 --- /dev/null +++ b/libs/cramium-hal/src/gc2145/constants.rs @@ -0,0 +1,37 @@ +#![allow(dead_code)] +/* + The constant tables below are derived from https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/video/gc2145.c + with the following license: + + * Copyright (c) 2024 Felipe Neves + * + * SPDX-License-Identifier: Apache-2.0 +*/ + +pub(crate) const GC2145_REG_AMODE1: u8 = 0x17; +pub(crate) const GC2145_AMODE1_WINDOW_MASK: u8 = 0xFC; +pub(crate) const GC2145_REG_AMODE1_DEF: u8 = 0x14; +pub(crate) const GC2145_REG_OUTPUT_FMT: u8 = 0x84; +pub(crate) const GC2145_REG_OUTPUT_FMT_MASK: u8 = 0x1F; +pub(crate) const GC2145_REG_OUTPUT_FMT_RGB565: u8 = 0x06; +pub(crate) const GC2145_REG_OUTPUT_FMT_YCBYCR: u8 = 0x02; +pub(crate) const GC2145_REG_SYNC_MODE: u8 = 0x86; +pub(crate) const GC2145_REG_SYNC_MODE_DEF: u8 = 0x23; +pub(crate) const GC2145_REG_SYNC_MODE_COL_SWITCH: u8 = 0x10; +pub(crate) const GC2145_REG_SYNC_MODE_ROW_SWITCH: u8 = 0x20; +pub(crate) const GC2145_REG_RESET: u8 = 0xFE; +pub(crate) const GC2145_REG_SW_RESET: u8 = 0x80; +pub(crate) const GC2145_SET_P0_REGS: u8 = 0x00; +pub(crate) const GC2145_REG_CROP_ENABLE: u8 = 0x90; +pub(crate) const GC2145_CROP_SET_ENABLE: u8 = 0x01; +pub(crate) const GC2145_REG_BLANK_WINDOW_BASE: u8 = 0x09; +pub(crate) const GC2145_REG_WINDOW_BASE: u8 = 0x91; +pub(crate) const GC2145_REG_SUBSAMPLE: u8 = 0x99; +pub(crate) const GC2145_REG_SUBSAMPLE_MODE: u8 = 0x9A; +pub(crate) const GC2145_SUBSAMPLE_MODE_SMOOTH: u8 = 0x0E; +pub(crate) const GC2145_PIDH: u8 = 0xF0; +pub(crate) const GC2145_PIDL: u8 = 0xF1; +pub(crate) const GC2145_I2C_ID: u8 = 0xFB; + +pub(crate) const UXGA_HSIZE: u16 = 1600; +pub(crate) const UXGA_VSIZE: u16 = 1200; diff --git a/libs/cramium-hal/src/gc2145/gc2145.rs b/libs/cramium-hal/src/gc2145/gc2145.rs new file mode 100644 index 000000000..1817677c4 --- /dev/null +++ b/libs/cramium-hal/src/gc2145/gc2145.rs @@ -0,0 +1,326 @@ +use cramium_api::camera::*; +use cramium_api::*; +use utralib::CSR; +use utralib::utra; +use utralib::utra::udma_camera::REG_CAM_CFG_GLOB; + +use super::constants::*; +use super::tables::*; +use crate::ifram::IframRange; +use crate::udma::Udma; +use crate::udma::*; + +pub const GC2145_DEV: u8 = 0x3C; + +pub const CFG_FRAMEDROP_EN: utralib::Field = utralib::Field::new(1, 0, REG_CAM_CFG_GLOB); +pub const CFG_FRAMEDROP_VAL: utralib::Field = utralib::Field::new(6, 1, REG_CAM_CFG_GLOB); +pub const CFG_FRAMESLICE_EN: utralib::Field = utralib::Field::new(1, 7, REG_CAM_CFG_GLOB); +pub const CFG_FORMAT: utralib::Field = utralib::Field::new(3, 8, REG_CAM_CFG_GLOB); +pub const CFG_SHIFT: utralib::Field = utralib::Field::new(4, 11, REG_CAM_CFG_GLOB); +pub const CFG_GLOB_EN: utralib::Field = utralib::Field::new(1, 31, REG_CAM_CFG_GLOB); + +pub struct Gc2145 { + csr: CSR, + ifram: Option, + resolution: Resolution, + slicing: Option<(usize, usize)>, +} + +impl Udma for Gc2145 { + fn csr_mut(&mut self) -> &mut CSR { &mut self.csr } + + fn csr(&self) -> &CSR { &self.csr } +} + +impl Gc2145 { + #[cfg(feature = "std")] + /// Safety: clocks must be turned on before this is called + pub unsafe fn new() -> Result { + let ifram_virt = xous::syscall::map_memory( + xous::MemoryAddress::new(crate::board::CAM_IFRAM_ADDR), + None, + crate::board::CAM_IFRAM_LEN_PAGES * 4096, + xous::MemoryFlags::R | xous::MemoryFlags::W, + )?; + let ifram = IframRange::from_raw_parts( + crate::board::CAM_IFRAM_ADDR, + ifram_virt.as_ptr() as usize, + ifram_virt.len(), + ); + Ok(Gc2145::new_with_ifram(ifram)) + } + + pub unsafe fn new_with_ifram(ifram: IframRange) -> Self { + #[cfg(target_os = "xous")] + let csr_range = xous::syscall::map_memory( + xous::MemoryAddress::new(utra::udma_camera::HW_UDMA_CAMERA_BASE), + None, + 4096, + xous::MemoryFlags::R | xous::MemoryFlags::W, + ) + .expect("couldn't map cam port"); + #[cfg(target_os = "xous")] + let csr = CSR::new(csr_range.as_mut_ptr() as *mut u32); + #[cfg(not(target_os = "xous"))] + let csr = CSR::new(utra::udma_camera::HW_UDMA_CAMERA_BASE as *mut u32); + + Self { + csr, + ifram: Some(ifram), + // bogus value + resolution: Resolution::Res160x120, + slicing: None, + } + } + + pub fn release_ifram(&mut self) { + if let Some(ifram) = self.ifram.take() { + xous::syscall::unmap_memory(ifram.virt_range).unwrap(); + } + } + + pub fn claim_ifram(&mut self) -> Result<(), xous::Error> { + if self.ifram.is_none() { + let ifram = xous::syscall::map_memory( + xous::MemoryAddress::new(crate::board::CAM_IFRAM_ADDR), + None, + crate::board::CAM_IFRAM_LEN_PAGES * 4096, + xous::MemoryFlags::R | xous::MemoryFlags::W, + )?; + let cam_ifram = unsafe { + crate::ifram::IframRange::from_raw_parts( + crate::board::CAM_IFRAM_ADDR, + ifram.as_ptr() as usize, + ifram.len(), + ) + }; + self.ifram = Some(cam_ifram); + } + Ok(()) + } + + pub fn has_ifram(&self) -> bool { self.ifram.is_some() } + + pub fn poke(&self, i2c: &mut dyn I2cApi, adr: u8, dat: u8) { + i2c.i2c_write(GC2145_DEV, adr, &[dat]).expect("write failed"); + } + + // chip does not support sequential reads + pub fn peek(&self, i2c: &mut dyn I2cApi, adr: u8, dat: &mut [u8]) { + for (i, d) in dat.iter_mut().enumerate() { + let mut one_byte = [0u8]; + i2c.i2c_read(GC2145_DEV, adr + i as u8, &mut one_byte, false).expect("read failed"); + *d = one_byte[0]; + } + } + + fn gc2145_set_window(&self, i2c: &mut dyn I2cApi, mut reg: u8, x: u16, y: u16, w: u16, h: u16) { + self.poke(i2c, GC2145_REG_RESET, GC2145_SET_P0_REGS); + + /* Y/row offset */ + self.poke(i2c, reg, (y >> 8) as u8); + reg += 1; + self.poke(i2c, reg, (y & 0xff) as u8); + reg += 1; + + /* X/col offset */ + self.poke(i2c, reg, (x >> 8) as u8); + reg += 1; + self.poke(i2c, reg, (x & 0xff) as u8); + reg += 1; + + /* Window height */ + self.poke(i2c, reg, (h >> 8) as u8); + reg += 1; + self.poke(i2c, reg, (h & 0xff) as u8); + reg += 1; + + /* Window width */ + self.poke(i2c, reg, (w >> 8) as u8); + reg += 1; + self.poke(i2c, reg, (w & 0xff) as u8); + } + + fn set_resolution(&self, i2c: &mut dyn I2cApi, w: u16, h: u16) { + // TODO: figure out what this parameter even means in the context of an...unconstrained variable + // resolution? Maybe? It's not even clear to me that was the original intent from the C driver. + + // 160x120 base scaling + // let c_ratio = 4u16; + // let r_ratio = 4u16; + // 320x240 base scaling + let c_ratio = 3u16; + let r_ratio = 3u16; + // 640x480 base scaling + // let c_ratio = 2u16; + // let r_ratio = 2u16; + + /* Calculates the window boundaries to obtain the desired resolution */ + let win_w = w * c_ratio; + let win_h = h * r_ratio; + let x = ((win_w / c_ratio) - w) / 2; + let y = ((win_h / r_ratio) - h) / 2; + let win_x = (UXGA_HSIZE - win_w) / 2; + let win_y = (UXGA_VSIZE - win_h) / 2; + + /* Set readout window first. */ + self.gc2145_set_window(i2c, GC2145_REG_BLANK_WINDOW_BASE, win_x, win_y, win_w + 16, win_h + 8); + + /* Set cropping window next. */ + self.gc2145_set_window(i2c, GC2145_REG_WINDOW_BASE, x, y, w, h); + + /* Enable crop */ + self.poke(i2c, GC2145_REG_CROP_ENABLE, GC2145_CROP_SET_ENABLE); + // self.poke(i2c, GC2145_REG_CROP_ENABLE, 0); + + /* Set Sub-sampling ratio and mode */ + self.poke(i2c, GC2145_REG_SUBSAMPLE, ((r_ratio << 4) | c_ratio) as u8); + + self.poke(i2c, GC2145_REG_SUBSAMPLE_MODE, GC2145_SUBSAMPLE_MODE_SMOOTH); + + self.delay(30); + + // divide the clock down + self.poke(i2c, 0xFA, 0x32); + // self.poke(i2c, 0xFA, 0x63); + } + + #[inline(never)] + pub fn init(&mut self, i2c: &mut dyn I2cApi, resolution: Resolution) { + // initiate a reset + self.poke(i2c, GC2145_REG_RESET, GC2145_REG_SW_RESET); + self.delay(300); // wait for reset + + // do the init pokes + for &[adr, dat] in GC2145_INIT.iter() { + self.poke(i2c, adr, dat); + } + // setup AEC + for &[adr, dat] in GC2145_AEC.iter() { + self.poke(i2c, adr, dat); + } + + // set up YUV mode + self.poke(i2c, GC2145_REG_RESET, GC2145_SET_P0_REGS); + self.delay(30); + let mut buf = [0u8; 1]; + self.peek(i2c, GC2145_REG_OUTPUT_FMT, &mut buf); + self.delay(30); + self.poke( + i2c, + GC2145_REG_OUTPUT_FMT, + (buf[0] & !GC2145_REG_OUTPUT_FMT_MASK) | GC2145_REG_OUTPUT_FMT_YCBYCR, + ); + self.delay(30); + + let (w, h) = resolution.into(); + crate::println!("resolution set to {}x{}", w, h); + self.set_resolution(i2c, w as u16, h as u16); + self.resolution = resolution; + + crate::println!("udma setup"); + // set sync polarity + let vsync_pol = 0; + let hsync_pol = match resolution { + Resolution::Res320x240 => 0, + _ => 0, + }; + self.csr.wo( + utra::udma_camera::REG_CAM_VSYNC_POLARITY, + self.csr.ms(utra::udma_camera::REG_CAM_VSYNC_POLARITY_R_CAM_VSYNC_POLARITY, vsync_pol) + | self.csr.ms(utra::udma_camera::REG_CAM_VSYNC_POLARITY_R_CAM_HSYNC_POLARITY, hsync_pol), + ); + + // multiply by 1 + self.csr.wo(utra::udma_camera::REG_CAM_CFG_FILTER, 0x01_01_01); + + let (x, _y) = resolution.into(); + self.csr.wo(utra::udma_camera::REG_CAM_CFG_SIZE, (x as u32 - 1) << 16); + + let global = self.csr.ms(CFG_FRAMEDROP_EN, 0) + | self.csr.ms(CFG_FORMAT, Format::BypassLe as u32) + | self.csr.ms(CFG_FRAMESLICE_EN, 0) + | self.csr.ms(CFG_SHIFT, 0); + self.csr.wo(utra::udma_camera::REG_CAM_CFG_GLOB, global); + } + + /// TODO: figure out how to length-bound this to...the frame slice size? line size? idk... + pub fn rx_buf(&self) -> &[T] { &self.ifram.as_ref().unwrap().as_slice() } + + /// TODO: figure out how to length-bound this to...the frame slice size? line size? idk... + pub unsafe fn rx_buf_phys(&self) -> &[T] { &self.ifram.as_ref().unwrap().as_phys_slice() } + + /// TODO: Rework this to use the frame sync + automatic re-initiation on capture_await() for frames + /// TODO: Also make an interrupt driven version of this. + pub fn capture_async(&mut self) { + // we want the sliced resolution so resolve resolution through the method call wrapper + let (cols, rows) = self.resolution(); + let total_len = rows * cols; + self.csr.rmwf(CFG_GLOB_EN, 1); + unsafe { self.udma_enqueue(Bank::Rx, &self.rx_buf_phys::()[..total_len], CFG_EN | CFG_SIZE_16) } + } + + pub fn capture_await(&mut self, _use_yield: bool) { + while self.udma_busy(Bank::Rx) { + #[cfg(feature = "std")] + if _use_yield { + xous::yield_slice(); + } + } + } + + pub fn resolution(&self) -> (usize, usize) { + if let Some((x, y)) = self.slicing { (x, y) } else { self.resolution.into() } + } + + pub fn set_slicing(&mut self, ll: (usize, usize), ur: (usize, usize)) { + let (llx, lly) = ll; + let (urxx, uryy) = ur; + let urx = urxx.saturating_sub(1); + let ury = uryy.saturating_sub(1); + self.csr.wo(utra::udma_camera::REG_CAM_CFG_LL, llx as u32 & 0xFFFF | ((lly as u32 & 0xFFFF) << 16)); + self.csr.wo(utra::udma_camera::REG_CAM_CFG_UR, urx as u32 & 0xFFFF | ((ury as u32 & 0xFFFF) << 16)); + self.csr.rmwf(CFG_FRAMESLICE_EN, 1); + self.slicing = Some((urxx - llx, uryy - lly)); + // self.csr.wo(utra::udma_camera::REG_CAM_CFG_SIZE, (urx - llx) as u32 - 1); + } + + pub fn disable_slicing(&mut self) { + self.csr.rmwf(CFG_FRAMESLICE_EN, 0); + self.slicing = None; + } + + /// Returns (product ID, manufacturer ID) + /// Should be 0x2155, 0x0078 + pub fn read_id(&self, i2c: &mut dyn I2cApi) -> (u16, u16) { + let mut pid = [0u8; 2]; + let mut did = [0u8; 1]; + self.peek(i2c, GC2145_PIDH, &mut pid); // should return 0x2155 + self.peek(i2c, GC2145_I2C_ID, &mut did); + (u16::from_be_bytes(pid), did[0] as u16) + } + + pub fn delay(&self, quantum: usize) { + #[cfg(feature = "std")] + { + let tt = xous_api_ticktimer::Ticktimer::new().unwrap(); + tt.sleep_ms(quantum).ok(); + } + #[cfg(not(feature = "std"))] + { + use utralib::{CSR, utra}; + // abuse the d11ctime timer to create some time-out like thing + let mut d11c = CSR::new(utra::d11ctime::HW_D11CTIME_BASE as *mut u32); + d11c.wfo(utra::d11ctime::CONTROL_COUNT, 333_333); // 1.0ms per interval + let mut polarity = d11c.rf(utra::d11ctime::HEARTBEAT_BEAT); + for _ in 0..quantum { + while polarity == d11c.rf(utra::d11ctime::HEARTBEAT_BEAT) {} + polarity = d11c.rf(utra::d11ctime::HEARTBEAT_BEAT); + } + // we have to split this because we don't know where we caught the previous interval + if quantum == 1 { + while polarity == d11c.rf(utra::d11ctime::HEARTBEAT_BEAT) {} + } + } + } +} diff --git a/libs/cramium-hal/src/gc2145/mod.rs b/libs/cramium-hal/src/gc2145/mod.rs new file mode 100644 index 000000000..ae1af9719 --- /dev/null +++ b/libs/cramium-hal/src/gc2145/mod.rs @@ -0,0 +1,4 @@ +mod constants; +pub mod gc2145; +mod tables; +pub use gc2145::*; diff --git a/libs/cramium-hal/src/gc2145/tables.rs b/libs/cramium-hal/src/gc2145/tables.rs new file mode 100644 index 000000000..a98bc5fb8 --- /dev/null +++ b/libs/cramium-hal/src/gc2145/tables.rs @@ -0,0 +1,1974 @@ +/* + The constant tables below are derived from https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/video/gc2145.c + with the following license: + + * Copyright (c) 2024 Felipe Neves + * + * SPDX-License-Identifier: Apache-2.0 +*/ +use crate::gc2145::constants::*; + +pub(crate) const GC2145_INIT: [[u8; 2]; 607] = [ + [0xfe, 0xf0], + [0xfe, 0xf0], + [0xfe, 0xf0], + [0xfc, 0x06], + [0xf6, 0x00], + [0xf7, 0x1d], + [0xf8, 0x85], + [0xfa, 0x00], + [0xf9, 0xfe], + [0xf2, 0x00], + /* ISP settings */ + [0xfe, 0x00], + [0x03, 0x04], + [0x04, 0xe2], + [0x09, 0x00], + [0x0a, 0x00], + [0x0b, 0x00], + [0x0c, 0x00], + [0x0d, 0x04], /* Window height */ + [0x0e, 0xc0], + [0x0f, 0x06], /* Window width */ + [0x10, 0x52], + [0x99, 0x11], /* Subsample */ + [0x9a, 0x0E], /* Subsample mode */ + [0x12, 0x2e], + [0x17, 0x14], /* Analog Mode 1 (vflip/mirror[1:0]) */ + [0x18, 0x22], /* Analog Mode 2 */ + [0x19, 0x0e], + [0x1a, 0x01], + [0x1b, 0x4b], + [0x1c, 0x07], + [0x1d, 0x10], + [0x1e, 0x88], + [0x1f, 0x78], + [0x20, 0x03], + [0x21, 0x40], + [0x22, 0xa0], + [0x24, 0x16], + [0x25, 0x01], + [0x26, 0x10], + [0x2d, 0x60], + [0x30, 0x01], + [0x31, 0x90], + [0x33, 0x06], + [0x34, 0x01], + [0x80, 0x7f], + [0x81, 0x26], + [0x82, 0xfa], + [0x83, 0x00], + [GC2145_REG_OUTPUT_FMT, 0x06], + [GC2145_REG_SYNC_MODE, 0x23], + [0x88, 0x03], + [0x89, 0x03], + [0x85, 0x08], + [0x8a, 0x00], + [0x8b, 0x00], + [0xb0, 0x55], + [0xc3, 0x00], + [0xc4, 0x80], + [0xc5, 0x90], + [0xc6, 0x3b], + [0xc7, 0x46], + [0xec, 0x06], + [0xed, 0x04], + [0xee, 0x60], + [0xef, 0x90], + [0xb6, 0x01], + [0x90, 0x01], + [0x91, 0x00], + [0x92, 0x00], + [0x93, 0x00], + [0x94, 0x00], + [0x95, 0x02], + [0x96, 0x58], + [0x97, 0x03], + [0x98, 0x20], + [0x99, 0x22], + [0x9a, 0x0E], + [0x9b, 0x00], + [0x9c, 0x00], + [0x9d, 0x00], + [0x9e, 0x00], + [0x9f, 0x00], + [0xa0, 0x00], + [0xa1, 0x00], + [0xa2, 0x00], + /* BLK Settings */ + [0xfe, 0x00], + [0x40, 0x42], + [0x41, 0x00], + [0x43, 0x5b], + [0x5e, 0x00], + [0x5f, 0x00], + [0x60, 0x00], + [0x61, 0x00], + [0x62, 0x00], + [0x63, 0x00], + [0x64, 0x00], + [0x65, 0x00], + [0x66, 0x20], + [0x67, 0x20], + [0x68, 0x20], + [0x69, 0x20], + [0x76, 0x00], + [0x6a, 0x08], + [0x6b, 0x08], + [0x6c, 0x08], + [0x6d, 0x08], + [0x6e, 0x08], + [0x6f, 0x08], + [0x70, 0x08], + [0x71, 0x08], + [0x76, 0x00], + [0x72, 0xf0], + [0x7e, 0x3c], + [0x7f, 0x00], + [0xfe, 0x02], + [0x48, 0x15], + [0x49, 0x00], + [0x4b, 0x0b], + [0xfe, 0x00], + /* AEC Settings */ + [0xfe, 0x01], + [0x01, 0x04], + [0x02, 0xc0], + [0x03, 0x04], + [0x04, 0x90], + [0x05, 0x30], + [0x06, 0x90], + [0x07, 0x30], + [0x08, 0x80], + [0x09, 0x00], + [0x0a, 0x82], + [0x0b, 0x11], + [0x0c, 0x10], + [0x11, 0x10], + [0x13, 0x68], + [GC2145_REG_OUTPUT_FMT, 0x00], + [0x1c, 0x11], + [0x1e, 0x61], + [0x1f, 0x35], + [0x20, 0x40], + [0x22, 0x40], + [0x23, 0x20], + [0xfe, 0x02], + [0x0f, 0x04], + [0xfe, 0x01], + [0x12, 0x30], + [0x15, 0xb0], + [0x10, 0x31], + [0x3e, 0x28], + [0x3f, 0xb0], + [0x40, 0x90], + [0x41, 0x0f], + [0xfe, 0x02], + [0x90, 0x6c], + [0x91, 0x03], + [0x92, 0xcb], + [0x94, 0x33], + [0x95, 0x84], + [0x97, 0x65], + [0xa2, 0x11], + [0xfe, 0x00], + [0xfe, 0x02], + [0x80, 0xc1], + [0x81, 0x08], + [0x82, 0x05], + [0x83, 0x08], + [GC2145_REG_OUTPUT_FMT, 0x0a], + [GC2145_REG_SYNC_MODE, 0xf0], + [0x87, 0x50], + [0x88, 0x15], + [0x89, 0xb0], + [0x8a, 0x30], + [0x8b, 0x10], + [0xfe, 0x01], + [0x21, 0x04], + [0xfe, 0x02], + [0xa3, 0x50], + [0xa4, 0x20], + [0xa5, 0x40], + [0xa6, 0x80], + [0xab, 0x40], + [0xae, 0x0c], + [0xb3, 0x46], + [0xb4, 0x64], + [0xb6, 0x38], + [0xb7, 0x01], + [0xb9, 0x2b], + [0x3c, 0x04], + [0x3d, 0x15], + [0x4b, 0x06], + [0x4c, 0x20], + [0xfe, 0x00], + /* Gamma Control */ + [0xfe, 0x02], + [0x10, 0x09], + [0x11, 0x0d], + [0x12, 0x13], + [0x13, 0x19], + [0x14, 0x27], + [0x15, 0x37], + [0x16, 0x45], + [GC2145_REG_OUTPUT_FMT, 0x53], + [0x18, 0x69], + [0x19, 0x7d], + [0x1a, 0x8f], + [0x1b, 0x9d], + [0x1c, 0xa9], + [0x1d, 0xbd], + [0x1e, 0xcd], + [0x1f, 0xd9], + [0x20, 0xe3], + [0x21, 0xea], + [0x22, 0xef], + [0x23, 0xf5], + [0x24, 0xf9], + [0x25, 0xff], + [0xfe, 0x00], + [0xc6, 0x20], + [0xc7, 0x2b], + [0xfe, 0x02], + [0x26, 0x0f], + [0x27, 0x14], + [0x28, 0x19], + [0x29, 0x1e], + [0x2a, 0x27], + [0x2b, 0x33], + [0x2c, 0x3b], + [0x2d, 0x45], + [0x2e, 0x59], + [0x2f, 0x69], + [0x30, 0x7c], + [0x31, 0x89], + [0x32, 0x98], + [0x33, 0xae], + [0x34, 0xc0], + [0x35, 0xcf], + [0x36, 0xda], + [0x37, 0xe2], + [0x38, 0xe9], + [0x39, 0xf3], + [0x3a, 0xf9], + [0x3b, 0xff], + [0xfe, 0x02], + [0xd1, 0x32], + [0xd2, 0x32], + [0xd3, 0x40], + [0xd6, 0xf0], + [0xd7, 0x10], + [0xd8, 0xda], + [0xdd, 0x14], + [0xde, 0x86], + [0xed, 0x80], + [0xee, 0x00], + [0xef, 0x3f], + [0xd8, 0xd8], + [0xfe, 0x01], + [0x9f, 0x40], + [0xfe, 0x01], + [0xc2, 0x14], + [0xc3, 0x0d], + [0xc4, 0x0c], + [0xc8, 0x15], + [0xc9, 0x0d], + [0xca, 0x0a], + [0xbc, 0x24], + [0xbd, 0x10], + [0xbe, 0x0b], + [0xb6, 0x25], + [0xb7, 0x16], + [0xb8, 0x15], + [0xc5, 0x00], + [0xc6, 0x00], + [0xc7, 0x00], + [0xcb, 0x00], + [0xcc, 0x00], + [0xcd, 0x00], + [0xbf, 0x07], + [0xc0, 0x00], + [0xc1, 0x00], + [0xb9, 0x00], + [0xba, 0x00], + [0xbb, 0x00], + [0xaa, 0x01], + [0xab, 0x01], + [0xac, 0x00], + [0xad, 0x05], + [0xae, 0x06], + [0xaf, 0x0e], + [0xb0, 0x0b], + [0xb1, 0x07], + [0xb2, 0x06], + [0xb3, 0x17], + [0xb4, 0x0e], + [0xb5, 0x0e], + [0xd0, 0x09], + [0xd1, 0x00], + [0xd2, 0x00], + [0xd6, 0x08], + [0xd7, 0x00], + [0xd8, 0x00], + [0xd9, 0x00], + [0xda, 0x00], + [0xdb, 0x00], + [0xd3, 0x0a], + [0xd4, 0x00], + [0xd5, 0x00], + [0xa4, 0x00], + [0xa5, 0x00], + [0xa6, 0x77], + [0xa7, 0x77], + [0xa8, 0x77], + [0xa9, 0x77], + [0xa1, 0x80], + [0xa2, 0x80], + [0xfe, 0x01], + [0xdf, 0x0d], + [0xdc, 0x25], + [0xdd, 0x30], + [0xe0, 0x77], + [0xe1, 0x80], + [0xe2, 0x77], + [0xe3, 0x90], + [0xe6, 0x90], + [0xe7, 0xa0], + [0xe8, 0x90], + [0xe9, 0xa0], + [0xfe, 0x00], + [0xfe, 0x01], + [0x4f, 0x00], + [0x4f, 0x00], + [0x4b, 0x01], + [0x4f, 0x00], + [0x4c, 0x01], + [0x4d, 0x71], + [0x4e, 0x01], + [0x4c, 0x01], + [0x4d, 0x91], + [0x4e, 0x01], + [0x4c, 0x01], + [0x4d, 0x70], + [0x4e, 0x01], + [0x4c, 0x01], + [0x4d, 0x90], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xb0], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0x8f], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0x6f], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xaf], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xd0], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xf0], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xcf], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xef], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0x6e], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8e], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xae], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xce], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x4d], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x6d], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8d], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xad], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xcd], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x4c], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x6c], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8c], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xac], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xcc], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xcb], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x4b], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x6b], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8b], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xab], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8a], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xaa], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xca], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xca], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xc9], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0x8a], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0x89], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xa9], + [0x4e, 0x04], + [0x4c, 0x02], + [0x4d, 0x0b], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x0a], + [0x4e, 0x05], + [0x4c, 0x01], + [0x4d, 0xeb], + [0x4e, 0x05], + [0x4c, 0x01], + [0x4d, 0xea], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x09], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x29], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x2a], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x4a], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x8a], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x49], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x69], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x89], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0xa9], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x48], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x68], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x69], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0xca], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xc9], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xe9], + [0x4e, 0x07], + [0x4c, 0x03], + [0x4d, 0x09], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xc8], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xe8], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xa7], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xc7], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xe7], + [0x4e, 0x07], + [0x4c, 0x03], + [0x4d, 0x07], + [0x4e, 0x07], + [0x4f, 0x01], + [0x50, 0x80], + [0x51, 0xa8], + [0x52, 0x47], + [0x53, 0x38], + [0x54, 0xc7], + [0x56, 0x0e], + [0x58, 0x08], + [0x5b, 0x00], + [0x5c, 0x74], + [0x5d, 0x8b], + [0x61, 0xdb], + [0x62, 0xb8], + [0x63, 0x86], + [0x64, 0xc0], + [0x65, 0x04], + [0x67, 0xa8], + [0x68, 0xb0], + [0x69, 0x00], + [0x6a, 0xa8], + [0x6b, 0xb0], + [0x6c, 0xaf], + [0x6d, 0x8b], + [0x6e, 0x50], + [0x6f, 0x18], + [0x73, 0xf0], + [0x70, 0x0d], + [0x71, 0x60], + [0x72, 0x80], + [0x74, 0x01], + [0x75, 0x01], + [0x7f, 0x0c], + [0x76, 0x70], + [0x77, 0x58], + [0x78, 0xa0], + [0x79, 0x5e], + [0x7a, 0x54], + [0x7b, 0x58], + [0xfe, 0x00], + [0xfe, 0x02], + [0xc0, 0x01], + [0xc1, 0x44], + [0xc2, 0xfd], + [0xc3, 0x04], + [0xc4, 0xF0], + [0xc5, 0x48], + [0xc6, 0xfd], + [0xc7, 0x46], + [0xc8, 0xfd], + [0xc9, 0x02], + [0xca, 0xe0], + [0xcb, 0x45], + [0xcc, 0xec], + [0xcd, 0x48], + [0xce, 0xf0], + [0xcf, 0xf0], + [0xe3, 0x0c], + [0xe4, 0x4b], + [0xe5, 0xe0], + [0xfe, 0x01], + [0x9f, 0x40], + [0xfe, 0x00], + /* Output Control */ + [0xfe, 0x00], + [0xf2, 0x0f], + [0xfe, 0x02], + [0x40, 0xbf], + [0x46, 0xcf], + [0xfe, 0x00], + [0xfe, 0x00], + [0x05, 0x01], + [0x06, 0x1C], + [0x07, 0x00], + [0x08, 0x32], + [0x11, 0x00], + [0x12, 0x1D], + [0x13, 0x00], + [0x14, 0x00], + [0xfe, 0x01], + [0x3c, 0x00], + [0x3d, 0x04], + [0xfe, 0x00], + [0x00, 0x00], +]; + +pub(crate) const GC2145_INIT_2: [[u8; 2]; 633] = [ + [0xfe, 0xf0], + [0xfe, 0xf0], + [0xfe, 0xf0], + [0xfc, 0x06], + [0xf6, 0x00], + [0xf7, 0x1d], + [0xf8, 0x84], + [0xfa, 0x00], + [0xf9, 0x8e], + [0xf2, 0x00], + [0xfe, 0x00], + [0x03, 0x04], + [0x04, 0xe2], + [0x09, 0x00], + [0x0a, 0x00], + [0x0b, 0x00], + [0x0c, 0x00], + [0x0d, 0x04], + [0x0e, 0xc0], + [0x0f, 0x06], + [0x10, 0x52], + [0x12, 0x2e], + [0x17, 0x14], + [0x18, 0x22], + [0x19, 0x0e], + [0x1a, 0x01], + [0x1b, 0x4b], + [0x1c, 0x07], + [0x1d, 0x10], + [0x1e, 0x88], + [0x1f, 0x78], + [0x20, 0x03], + [0x21, 0x40], + [0x22, 0xa0], + [0x24, 0x16], + [0x25, 0x01], + [0x26, 0x10], + [0x2d, 0x60], + [0x30, 0x01], + [0x31, 0x90], + [0x33, 0x06], + [0x34, 0x01], + [0xfe, 0x00], + [0x80, 0x7f], + [0x81, 0x26], + [0x82, 0xfa], + [0x83, 0x00], + [0x84, 0x02], + [0x86, 0x02], + [0x88, 0x03], + [0x89, 0x03], + [0x85, 0x08], + [0x8a, 0x00], + [0x8b, 0x00], + [0xb0, 0x55], + [0xc3, 0x00], + [0xc4, 0x80], + [0xc5, 0x90], + [0xc6, 0x3b], + [0xc7, 0x46], + [0xec, 0x06], + [0xed, 0x04], + [0xee, 0x60], + [0xef, 0x90], + [0xb6, 0x01], + [0x90, 0x01], + [0x91, 0x00], + [0x92, 0x00], + [0x93, 0x00], + [0x94, 0x00], + [0x95, 0x04], + [0x96, 0xb0], + [0x97, 0x06], + [0x98, 0x40], + [0xfe, 0x00], + [0x40, 0x42], + [0x41, 0x00], + [0x43, 0x5b], + [0x5e, 0x00], + [0x5f, 0x00], + [0x60, 0x00], + [0x61, 0x00], + [0x62, 0x00], + [0x63, 0x00], + [0x64, 0x00], + [0x65, 0x00], + [0x66, 0x20], + [0x67, 0x20], + [0x68, 0x20], + [0x69, 0x20], + [0x76, 0x00], + [0x6a, 0x08], + [0x6b, 0x08], + [0x6c, 0x08], + [0x6d, 0x08], + [0x6e, 0x08], + [0x6f, 0x08], + [0x70, 0x08], + [0x71, 0x08], + [0x76, 0x00], + [0x72, 0xf0], + [0x7e, 0x3c], + [0x7f, 0x00], + [0xfe, 0x02], + [0x48, 0x15], + [0x49, 0x00], + [0x4b, 0x0b], + [0xfe, 0x00], + [0xfe, 0x01], + [0x01, 0x04], + [0x02, 0xc0], + [0x03, 0x04], + [0x04, 0x90], + [0x05, 0x30], + [0x06, 0x90], + [0x07, 0x30], + [0x08, 0x80], + [0x09, 0x00], + [0x0a, 0x82], + [0x0b, 0x11], + [0x0c, 0x10], + [0x11, 0x10], + [0x13, 0x7b], + [0x17, 0x00], + [0x1c, 0x11], + [0x1e, 0x61], + [0x1f, 0x35], + [0x20, 0x40], + [0x22, 0x40], + [0x23, 0x20], + [0xfe, 0x02], + [0x0f, 0x04], + [0xfe, 0x01], + [0x12, 0x35], + [0x15, 0xb0], + [0x10, 0x31], + [0x3e, 0x28], + [0x3f, 0xb0], + [0x40, 0x90], + [0x41, 0x0f], + [0xfe, 0x02], + [0x90, 0x6c], + [0x91, 0x03], + [0x92, 0xcb], + [0x94, 0x33], + [0x95, 0x84], + [0x97, 0x65], + [0xa2, 0x11], + [0xfe, 0x00], + [0xfe, 0x02], + [0x80, 0xc1], + [0x81, 0x08], + [0x82, 0x05], + [0x83, 0x08], + [0x84, 0x0a], + [0x86, 0xf0], + [0x87, 0x50], + [0x88, 0x15], + [0x89, 0xb0], + [0x8a, 0x30], + [0x8b, 0x10], + [0xfe, 0x01], + [0x21, 0x04], + [0xfe, 0x02], + [0xa3, 0x50], + [0xa4, 0x20], + [0xa5, 0x40], + [0xa6, 0x80], + [0xab, 0x40], + [0xae, 0x0c], + [0xb3, 0x46], + [0xb4, 0x64], + [0xb6, 0x38], + [0xb7, 0x01], + [0xb9, 0x2b], + [0x3c, 0x04], + [0x3d, 0x15], + [0x4b, 0x06], + [0x4c, 0x20], + [0xfe, 0x00], + [0xfe, 0x02], + [0x10, 0x09], + [0x11, 0x0d], + [0x12, 0x13], + [0x13, 0x19], + [0x14, 0x27], + [0x15, 0x37], + [0x16, 0x45], + [0x17, 0x53], + [0x18, 0x69], + [0x19, 0x7d], + [0x1a, 0x8f], + [0x1b, 0x9d], + [0x1c, 0xa9], + [0x1d, 0xbd], + [0x1e, 0xcd], + [0x1f, 0xd9], + [0x20, 0xe3], + [0x21, 0xea], + [0x22, 0xef], + [0x23, 0xf5], + [0x24, 0xf9], + [0x25, 0xff], + [0xfe, 0x00], + [0xc6, 0x20], + [0xc7, 0x2b], + [0xfe, 0x02], + [0x26, 0x0f], + [0x27, 0x14], + [0x28, 0x19], + [0x29, 0x1e], + [0x2a, 0x27], + [0x2b, 0x33], + [0x2c, 0x3b], + [0x2d, 0x45], + [0x2e, 0x59], + [0x2f, 0x69], + [0x30, 0x7c], + [0x31, 0x89], + [0x32, 0x98], + [0x33, 0xae], + [0x34, 0xc0], + [0x35, 0xcf], + [0x36, 0xda], + [0x37, 0xe2], + [0x38, 0xe9], + [0x39, 0xf3], + [0x3a, 0xf9], + [0x3b, 0xff], + [0xfe, 0x02], + [0xd1, 0x32], + [0xd2, 0x32], + [0xd3, 0x40], + [0xd6, 0xf0], + [0xd7, 0x10], + [0xd8, 0xda], + [0xdd, 0x14], + [0xde, 0x86], + [0xed, 0x80], + [0xee, 0x00], + [0xef, 0x3f], + [0xd8, 0xd8], + [0xfe, 0x01], + [0x9f, 0x40], + [0xfe, 0x01], + [0xc2, 0x14], + [0xc3, 0x0d], + [0xc4, 0x0c], + [0xc8, 0x15], + [0xc9, 0x0d], + [0xca, 0x0a], + [0xbc, 0x24], + [0xbd, 0x10], + [0xbe, 0x0b], + [0xb6, 0x25], + [0xb7, 0x16], + [0xb8, 0x15], + [0xc5, 0x00], + [0xc6, 0x00], + [0xc7, 0x00], + [0xcb, 0x00], + [0xcc, 0x00], + [0xcd, 0x00], + [0xbf, 0x07], + [0xc0, 0x00], + [0xc1, 0x00], + [0xb9, 0x00], + [0xba, 0x00], + [0xbb, 0x00], + [0xaa, 0x01], + [0xab, 0x01], + [0xac, 0x00], + [0xad, 0x05], + [0xae, 0x06], + [0xaf, 0x0e], + [0xb0, 0x0b], + [0xb1, 0x07], + [0xb2, 0x06], + [0xb3, 0x17], + [0xb4, 0x0e], + [0xb5, 0x0e], + [0xd0, 0x09], + [0xd1, 0x00], + [0xd2, 0x00], + [0xd6, 0x08], + [0xd7, 0x00], + [0xd8, 0x00], + [0xd9, 0x00], + [0xda, 0x00], + [0xdb, 0x00], + [0xd3, 0x0a], + [0xd4, 0x00], + [0xd5, 0x00], + [0xa4, 0x00], + [0xa5, 0x00], + [0xa6, 0x77], + [0xa7, 0x77], + [0xa8, 0x77], + [0xa9, 0x77], + [0xa1, 0x80], + [0xa2, 0x80], + [0xfe, 0x01], + [0xdf, 0x0d], + [0xdc, 0x25], + [0xdd, 0x30], + [0xe0, 0x77], + [0xe1, 0x80], + [0xe2, 0x77], + [0xe3, 0x90], + [0xe6, 0x90], + [0xe7, 0xa0], + [0xe8, 0x90], + [0xe9, 0xa0], + [0xfe, 0x00], + [0xfe, 0x01], + [0x4f, 0x00], + [0x4f, 0x00], + [0x4b, 0x01], + [0x4f, 0x00], + [0x4c, 0x01], + [0x4d, 0x71], + [0x4e, 0x01], + [0x4c, 0x01], + [0x4d, 0x91], + [0x4e, 0x01], + [0x4c, 0x01], + [0x4d, 0x70], + [0x4e, 0x01], + [0x4c, 0x01], + [0x4d, 0x90], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xb0], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0x8f], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0x6f], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xaf], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xd0], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xf0], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xcf], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xef], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0x6e], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8e], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xae], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xce], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x4d], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x6d], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8d], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xad], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xcd], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x4c], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x6c], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8c], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xac], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xcc], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xcb], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x4b], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x6b], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8b], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xab], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8a], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xaa], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xca], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xca], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xc9], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0x8a], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0x89], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xa9], + [0x4e, 0x04], + [0x4c, 0x02], + [0x4d, 0x0b], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x0a], + [0x4e, 0x05], + [0x4c, 0x01], + [0x4d, 0xeb], + [0x4e, 0x05], + [0x4c, 0x01], + [0x4d, 0xea], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x09], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x29], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x2a], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x4a], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x8a], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x49], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x69], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x89], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0xa9], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x48], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x68], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x69], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0xca], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xc9], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xe9], + [0x4e, 0x07], + [0x4c, 0x03], + [0x4d, 0x09], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xc8], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xe8], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xa7], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xc7], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xe7], + [0x4e, 0x07], + [0x4c, 0x03], + [0x4d, 0x07], + [0x4e, 0x07], + [0x4f, 0x01], + [0x50, 0x80], + [0x51, 0xa8], + [0x52, 0x47], + [0x53, 0x38], + [0x54, 0xc7], + [0x56, 0x0e], + [0x58, 0x08], + [0x5b, 0x00], + [0x5c, 0x74], + [0x5d, 0x8b], + [0x61, 0xdb], + [0x62, 0xb8], + [0x63, 0x86], + [0x64, 0xc0], + [0x65, 0x04], + [0x67, 0xa8], + [0x68, 0xb0], + [0x69, 0x00], + [0x6a, 0xa8], + [0x6b, 0xb0], + [0x6c, 0xaf], + [0x6d, 0x8b], + [0x6e, 0x50], + [0x6f, 0x18], + [0x73, 0xf0], + [0x70, 0x0d], + [0x71, 0x60], + [0x72, 0x80], + [0x74, 0x01], + [0x75, 0x01], + [0x7f, 0x0c], + [0x76, 0x70], + [0x77, 0x58], + [0x78, 0xa0], + [0x79, 0x5e], + [0x7a, 0x54], + [0x7b, 0x58], + [0xfe, 0x00], + [0xfe, 0x02], + [0xc0, 0x01], + [0xc1, 0x44], + [0xc2, 0xfd], + [0xc3, 0x04], + [0xc4, 0xf0], + [0xc5, 0x48], + [0xc6, 0xfd], + [0xc7, 0x46], + [0xc8, 0xfd], + [0xc9, 0x02], + [0xca, 0xe0], + [0xcb, 0x45], + [0xcc, 0xec], + [0xcd, 0x48], + [0xce, 0xf0], + [0xcf, 0xf0], + [0xe3, 0x0c], + [0xe4, 0x4b], + [0xe5, 0xe0], + [0xfe, 0x01], + [0x9f, 0x40], + [0xfe, 0x00], + [0xfe, 0x02], + [0x40, 0xbf], + [0x46, 0xcf], + [0xfe, 0x00], + [0xfe, 0x00], + [0x05, 0x01], + [0x06, 0x56], + [0x07, 0x00], + [0x08, 0x10], + [0xfe, 0x01], + [0x25, 0x00], + [0x26, 0xfa], + [0x27, 0x04], + [0x28, 0xe2], + [0x29, 0x04], + [0x2a, 0xe2], + [0x2b, 0x04], + [0x2c, 0xe2], + [0x2d, 0x04], + [0x2e, 0xe2], + [0xfe, 0x00], + [0xfe, 0x00], + [0xf2, 0x00], + [0xfe, 0x03], + [0x01, 0x87], + [0x02, 0x22], + [0x03, 0x10], + [0x06, 0x88], + [0x10, 0x95], + [0x11, 0x1e], + [0x15, 0x10], + [0x22, 0x04], + [0x23, 0x10], + [0x24, 0x10], + [0x25, 0x10], + [0x26, 0x05], + [0x21, 0x10], + [0x29, 0x03], + [0x2a, 0x0a], + [0x2b, 0x06], + [0xfe, 0x00], + [0xfe, 0x00], + [0x84, 0x02], + [0x86, 0x02], + [0x86, 0x02], + [0xfe, 0x03], + [0x13, 0x0c], + [0x12, 0x80], + [0x05, 0x00], + [0x04, 0x01], + [0x17, 0xf0], + [0x11, 0x1e], + [0xfe, 0x00], + [0x8c, 0x00], + [0x8d, 0x00], + [0x17, 0x14], + [0x17, 0x14], +]; + +pub(crate) const GC2145_INIT_3: [[u8; 2]; 673] = [ + [0xfe, 0xf0], + [0xfe, 0xf0], + [0xfe, 0xf0], + [0xfc, 0x06], + [0xf6, 0x00], + [0xf7, 0x1d], + [0xf8, 0x86], + [0xfa, 0x00], + [0xf9, 0x8e], + [0xf2, 0x00], + [0xfe, 0x00], + [0x03, 0x04], + [0x04, 0xe2], + [0x09, 0x00], + [0x0a, 0x00], + [0x0b, 0x00], + [0x0c, 0x00], + [0x0d, 0x04], + [0x0e, 0xc0], + [0x0f, 0x06], + [0x10, 0x52], + [0x12, 0x2e], + [0x17, 0x14], + [0x18, 0x22], + [0x19, 0x0e], + [0x1a, 0x01], + [0x1b, 0x4b], + [0x1c, 0x07], + [0x1d, 0x10], + [0x1e, 0x88], + [0x1f, 0x78], + [0x20, 0x03], + [0x21, 0x40], + [0x22, 0xa0], + [0x24, 0x16], + [0x25, 0x01], + [0x26, 0x10], + [0x2d, 0x60], + [0x30, 0x01], + [0x31, 0x90], + [0x33, 0x06], + [0x34, 0x01], + [0xfe, 0x00], + [0x80, 0x7f], + [0x81, 0x26], + [0x82, 0xfa], + [0x83, 0x00], + [0x84, 0x02], + [0x86, 0x02], + [0x88, 0x03], + [0x89, 0x03], + [0x85, 0x08], + [0x8a, 0x00], + [0x8b, 0x00], + [0xb0, 0x55], + [0xc3, 0x00], + [0xc4, 0x80], + [0xc5, 0x90], + [0xc6, 0x3b], + [0xc7, 0x46], + [0xec, 0x06], + [0xed, 0x04], + [0xee, 0x60], + [0xef, 0x90], + [0xb6, 0x01], + [0x90, 0x01], + [0x91, 0x00], + [0x92, 0x00], + [0x93, 0x00], + [0x94, 0x00], + [0x95, 0x04], + [0x96, 0xb0], + [0x97, 0x06], + [0x98, 0x40], + [0xfe, 0x00], + [0x40, 0x42], + [0x41, 0x00], + [0x43, 0x5b], + [0x5e, 0x00], + [0x5f, 0x00], + [0x60, 0x00], + [0x61, 0x00], + [0x62, 0x00], + [0x63, 0x00], + [0x64, 0x00], + [0x65, 0x00], + [0x66, 0x20], + [0x67, 0x20], + [0x68, 0x20], + [0x69, 0x20], + [0x76, 0x00], + [0x6a, 0x08], + [0x6b, 0x08], + [0x6c, 0x08], + [0x6d, 0x08], + [0x6e, 0x08], + [0x6f, 0x08], + [0x70, 0x08], + [0x71, 0x08], + [0x76, 0x00], + [0x72, 0xf0], + [0x7e, 0x3c], + [0x7f, 0x00], + [0xfe, 0x02], + [0x48, 0x15], + [0x49, 0x00], + [0x4b, 0x0b], + [0xfe, 0x00], + [0xfe, 0x01], + [0x01, 0x04], + [0x02, 0xc0], + [0x03, 0x04], + [0x04, 0x90], + [0x05, 0x30], + [0x06, 0x90], + [0x07, 0x30], + [0x08, 0x80], + [0x09, 0x00], + [0x0a, 0x82], + [0x0b, 0x11], + [0x0c, 0x10], + [0x11, 0x10], + [0x13, 0x7b], + [0x17, 0x00], + [0x1c, 0x11], + [0x1e, 0x61], + [0x1f, 0x35], + [0x20, 0x40], + [0x22, 0x40], + [0x23, 0x20], + [0xfe, 0x02], + [0x0f, 0x04], + [0xfe, 0x01], + [0x12, 0x35], + [0x15, 0xb0], + [0x10, 0x31], + [0x3e, 0x28], + [0x3f, 0xb0], + [0x40, 0x90], + [0x41, 0x0f], + [0xfe, 0x02], + [0x90, 0x6c], + [0x91, 0x03], + [0x92, 0xcb], + [0x94, 0x33], + [0x95, 0x84], + [0x97, 0x65], + [0xa2, 0x11], + [0xfe, 0x00], + [0xfe, 0x02], + [0x80, 0xc1], + [0x81, 0x08], + [0x82, 0x05], + [0x83, 0x08], + [0x84, 0x0a], + [0x86, 0xf0], + [0x87, 0x50], + [0x88, 0x15], + [0x89, 0xb0], + [0x8a, 0x30], + [0x8b, 0x10], + [0xfe, 0x01], + [0x21, 0x04], + [0xfe, 0x02], + [0xa3, 0x50], + [0xa4, 0x20], + [0xa5, 0x40], + [0xa6, 0x80], + [0xab, 0x40], + [0xae, 0x0c], + [0xb3, 0x46], + [0xb4, 0x64], + [0xb6, 0x38], + [0xb7, 0x01], + [0xb9, 0x2b], + [0x3c, 0x04], + [0x3d, 0x15], + [0x4b, 0x06], + [0x4c, 0x20], + [0xfe, 0x00], + [0xfe, 0x02], + [0x10, 0x09], + [0x11, 0x0d], + [0x12, 0x13], + [0x13, 0x19], + [0x14, 0x27], + [0x15, 0x37], + [0x16, 0x45], + [0x17, 0x53], + [0x18, 0x69], + [0x19, 0x7d], + [0x1a, 0x8f], + [0x1b, 0x9d], + [0x1c, 0xa9], + [0x1d, 0xbd], + [0x1e, 0xcd], + [0x1f, 0xd9], + [0x20, 0xe3], + [0x21, 0xea], + [0x22, 0xef], + [0x23, 0xf5], + [0x24, 0xf9], + [0x25, 0xff], + [0xfe, 0x00], + [0xc6, 0x20], + [0xc7, 0x2b], + [0xfe, 0x02], + [0x26, 0x0f], + [0x27, 0x14], + [0x28, 0x19], + [0x29, 0x1e], + [0x2a, 0x27], + [0x2b, 0x33], + [0x2c, 0x3b], + [0x2d, 0x45], + [0x2e, 0x59], + [0x2f, 0x69], + [0x30, 0x7c], + [0x31, 0x89], + [0x32, 0x98], + [0x33, 0xae], + [0x34, 0xc0], + [0x35, 0xcf], + [0x36, 0xda], + [0x37, 0xe2], + [0x38, 0xe9], + [0x39, 0xf3], + [0x3a, 0xf9], + [0x3b, 0xff], + [0xfe, 0x02], + [0xd1, 0x32], + [0xd2, 0x32], + [0xd3, 0x40], + [0xd6, 0xf0], + [0xd7, 0x10], + [0xd8, 0xda], + [0xdd, 0x14], + [0xde, 0x86], + [0xed, 0x80], + [0xee, 0x00], + [0xef, 0x3f], + [0xd8, 0xd8], + [0xfe, 0x01], + [0x9f, 0x40], + [0xfe, 0x01], + [0xc2, 0x14], + [0xc3, 0x0d], + [0xc4, 0x0c], + [0xc8, 0x15], + [0xc9, 0x0d], + [0xca, 0x0a], + [0xbc, 0x24], + [0xbd, 0x10], + [0xbe, 0x0b], + [0xb6, 0x25], + [0xb7, 0x16], + [0xb8, 0x15], + [0xc5, 0x00], + [0xc6, 0x00], + [0xc7, 0x00], + [0xcb, 0x00], + [0xcc, 0x00], + [0xcd, 0x00], + [0xbf, 0x07], + [0xc0, 0x00], + [0xc1, 0x00], + [0xb9, 0x00], + [0xba, 0x00], + [0xbb, 0x00], + [0xaa, 0x01], + [0xab, 0x01], + [0xac, 0x00], + [0xad, 0x05], + [0xae, 0x06], + [0xaf, 0x0e], + [0xb0, 0x0b], + [0xb1, 0x07], + [0xb2, 0x06], + [0xb3, 0x17], + [0xb4, 0x0e], + [0xb5, 0x0e], + [0xd0, 0x09], + [0xd1, 0x00], + [0xd2, 0x00], + [0xd6, 0x08], + [0xd7, 0x00], + [0xd8, 0x00], + [0xd9, 0x00], + [0xda, 0x00], + [0xdb, 0x00], + [0xd3, 0x0a], + [0xd4, 0x00], + [0xd5, 0x00], + [0xa4, 0x00], + [0xa5, 0x00], + [0xa6, 0x77], + [0xa7, 0x77], + [0xa8, 0x77], + [0xa9, 0x77], + [0xa1, 0x80], + [0xa2, 0x80], + [0xfe, 0x01], + [0xdf, 0x0d], + [0xdc, 0x25], + [0xdd, 0x30], + [0xe0, 0x77], + [0xe1, 0x80], + [0xe2, 0x77], + [0xe3, 0x90], + [0xe6, 0x90], + [0xe7, 0xa0], + [0xe8, 0x90], + [0xe9, 0xa0], + [0xfe, 0x00], + [0xfe, 0x01], + [0x4f, 0x00], + [0x4f, 0x00], + [0x4b, 0x01], + [0x4f, 0x00], + [0x4c, 0x01], + [0x4d, 0x71], + [0x4e, 0x01], + [0x4c, 0x01], + [0x4d, 0x91], + [0x4e, 0x01], + [0x4c, 0x01], + [0x4d, 0x70], + [0x4e, 0x01], + [0x4c, 0x01], + [0x4d, 0x90], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xb0], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0x8f], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0x6f], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xaf], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xd0], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xf0], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xcf], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0xef], + [0x4e, 0x02], + [0x4c, 0x01], + [0x4d, 0x6e], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8e], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xae], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xce], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x4d], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x6d], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8d], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xad], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xcd], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x4c], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x6c], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8c], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xac], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xcc], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xcb], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x4b], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x6b], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8b], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0xab], + [0x4e, 0x03], + [0x4c, 0x01], + [0x4d, 0x8a], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xaa], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xca], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xca], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xc9], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0x8a], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0x89], + [0x4e, 0x04], + [0x4c, 0x01], + [0x4d, 0xa9], + [0x4e, 0x04], + [0x4c, 0x02], + [0x4d, 0x0b], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x0a], + [0x4e, 0x05], + [0x4c, 0x01], + [0x4d, 0xeb], + [0x4e, 0x05], + [0x4c, 0x01], + [0x4d, 0xea], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x09], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x29], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x2a], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x4a], + [0x4e, 0x05], + [0x4c, 0x02], + [0x4d, 0x8a], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x49], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x69], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x89], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0xa9], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x48], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x68], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0x69], + [0x4e, 0x06], + [0x4c, 0x02], + [0x4d, 0xca], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xc9], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xe9], + [0x4e, 0x07], + [0x4c, 0x03], + [0x4d, 0x09], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xc8], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xe8], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xa7], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xc7], + [0x4e, 0x07], + [0x4c, 0x02], + [0x4d, 0xe7], + [0x4e, 0x07], + [0x4c, 0x03], + [0x4d, 0x07], + [0x4e, 0x07], + [0x4f, 0x01], + [0x50, 0x80], + [0x51, 0xa8], + [0x52, 0x47], + [0x53, 0x38], + [0x54, 0xc7], + [0x56, 0x0e], + [0x58, 0x08], + [0x5b, 0x00], + [0x5c, 0x74], + [0x5d, 0x8b], + [0x61, 0xdb], + [0x62, 0xb8], + [0x63, 0x86], + [0x64, 0xc0], + [0x65, 0x04], + [0x67, 0xa8], + [0x68, 0xb0], + [0x69, 0x00], + [0x6a, 0xa8], + [0x6b, 0xb0], + [0x6c, 0xaf], + [0x6d, 0x8b], + [0x6e, 0x50], + [0x6f, 0x18], + [0x73, 0xf0], + [0x70, 0x0d], + [0x71, 0x60], + [0x72, 0x80], + [0x74, 0x01], + [0x75, 0x01], + [0x7f, 0x0c], + [0x76, 0x70], + [0x77, 0x58], + [0x78, 0xa0], + [0x79, 0x5e], + [0x7a, 0x54], + [0x7b, 0x58], + [0xfe, 0x00], + [0xfe, 0x02], + [0xc0, 0x01], + [0xc1, 0x44], + [0xc2, 0xfd], + [0xc3, 0x04], + [0xc4, 0xf0], + [0xc5, 0x48], + [0xc6, 0xfd], + [0xc7, 0x46], + [0xc8, 0xfd], + [0xc9, 0x02], + [0xca, 0xe0], + [0xcb, 0x45], + [0xcc, 0xec], + [0xcd, 0x48], + [0xce, 0xf0], + [0xcf, 0xf0], + [0xe3, 0x0c], + [0xe4, 0x4b], + [0xe5, 0xe0], + [0xfe, 0x01], + [0x9f, 0x40], + [0xfe, 0x00], + [0xfe, 0x02], + [0x40, 0xbf], + [0x46, 0xcf], + [0xfe, 0x00], + [0xfe, 0x00], + [0x05, 0x01], + [0x06, 0x30], + [0x07, 0x00], + [0x08, 0x0c], + [0xfe, 0x01], + [0x25, 0x01], + [0x26, 0x75], + [0x27, 0x04], + [0x28, 0x5f], + [0x29, 0x04], + [0x2a, 0x5f], + [0x2b, 0x04], + [0x2c, 0x5f], + [0x2d, 0x04], + [0x2e, 0x5f], + [0xfe, 0x00], + [0xfe, 0x00], + [0xf2, 0x00], + [0xfe, 0x03], + [0x02, 0x22], + [0x03, 0x10], + [0x06, 0x88], + [0x01, 0x87], + [0x10, 0x95], + [0x11, 0x1e], + [0x15, 0x10], + [0x22, 0x04], + [0x23, 0x10], + [0x24, 0x10], + [0x25, 0x10], + [0x26, 0x05], + [0x21, 0x10], + [0x29, 0x03], + [0x2a, 0x0a], + [0x2b, 0x06], + [0xfe, 0x00], + [0xfe, 0x00], + [0xfd, 0x01], + [0xfa, 0x00], + [0xfe, 0x00], + [0x90, 0x01], + [0x91, 0x00], + [0x92, 0x00], + [0x93, 0x00], + [0x94, 0x00], + [0x95, 0x01], + [0x96, 0xe0], + [0x97, 0x02], + [0x98, 0x80], + [0x99, 0x55], + [0x9a, 0x06], + [0x9b, 0x01], + [0x9c, 0x23], + [0x9d, 0x00], + [0x9e, 0x00], + [0x9f, 0x01], + [0xa0, 0x23], + [0xa1, 0x00], + [0xa2, 0x00], + [0xfe, 0x00], + [0xec, 0x06], + [0xed, 0x04], + [0xee, 0x60], + [0xef, 0x90], + [0xfe, 0x01], + [0x74, 0x01], + [0xfe, 0x01], + [0x01, 0x04], + [0x02, 0xc0], + [0x03, 0x04], + [0x04, 0x90], + [0x05, 0x30], + [0x06, 0x90], + [0x07, 0x30], + [0x08, 0x80], + [0x0a, 0x82], + [0xfe, 0x01], + [0x21, 0x04], + [0xfe, 0x00], + [0x84, 0x06], + [0xfe, 0x03], + [0x13, 0x05], + [0x12, 0x00], + [0x05, 0x01], + [0x04, 0x90], + [0x17, 0xf0], + [0x11, 0x22], + [0xfe, 0x00], + [0x8c, 0x00], + [0x8d, 0x00], + [0x17, 0x14], + [0x17, 0x14], +]; + +pub(crate) const GC2145_AEC: [[u8; 2]; 35] = [ + [0xfe, 0x00], + [0x03, 0x04], // default exposure msb + [0x04, 0xe2], // default exposure lsb + [0xfe, 0x01], + [0x01, 0x04], + [0x02, 0xc0], + [0x03, 0x04], + [0x04, 0x90], + [0x05, 0x30], + [0x06, 0x90], + [0x07, 0x30], + [0x08, 0x80], + [0x09, 0x00], + [0x0a, 0x82], + [0x0b, 0x11], + [0x0c, 0x10], + [0x11, 0x10], + [0x13, 0x7b], + [0x17, 0x00], + [0x1c, 0x11], + [0x1e, 0x61], + [0x1f, 0x35], + [0x20, 0x40], + [0x22, 0x40], + [0x23, 0x20], + [0xfe, 0x02], + [0x0f, 0x04], + [0xfe, 0x01], + [0x12, 0x35], + [0x15, 0xb0], + [0x10, 0x31], + [0x3e, 0x28], + [0x3f, 0xb0], + [0x40, 0x90], + [0x41, 0x0f], +];