Pirate TV for the esp32
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
1.1 KiB

/**
* @file CbTable.h
* @brief Line type lookup tables for NTSC/PAL video signal generation
*
* Defines the state machine for each scanline (263 lines NTSC, 313 lines PAL).
* Each entry specifies the line type: sync pulses, blanking, colorburst, active video.
*
* Original Copyright 2015 <>< Charles Lohr
* ESP32 Port 2024
*/
#ifndef CBTABLE_H
#define CBTABLE_H
#include <stdint.h>
#include "sdkconfig.h"
// Line type definitions
#define FT_STA_d 0 // Short Sync A
#define FT_STB_d 1 // Long Sync B
#define FT_B_d 2 // Black/Blanking
#define FT_SRA_d 3 // Short to long sync transition
#define FT_SRB_d 4 // Long to short sync transition
#define FT_LIN_d 5 // Active video line
#define FT_CLOSE 6 // End frame
#define FT_MAX_d 7 // Number of line types
// Line lookup tables (each nibble is a line type)
extern const uint8_t CbLookupPAL[313];
extern const uint8_t CbLookupNTSC[263];
// Select the appropriate table based on video standard
#ifdef CONFIG_VIDEO_PAL
#define VIDEO_LINES 625
#define CbLookup CbLookupPAL
#else
#define VIDEO_LINES 525
#define CbLookup CbLookupNTSC
#endif
#endif // CBTABLE_H