/*
ESP32 Composite Video Library
Copyright (C) 2022 aquaticus
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#include "sdkconfig.h"
#if CONFIG_VIDEO_DIAG_DISPLAY_TEST_FUNC
#include
#include "esp_system.h"
#include
#include
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "video.h"
static const char* TAG = "VIDEO";
#define HEADER_PIXEL(data,pixel) {\
pixel[0] = (((data[0] - 33) << 2) | ((data[1] - 33) >> 4)); \
pixel[1] = ((((data[1] - 33) & 0xF) << 4) | ((data[2] - 33) >> 2)); \
pixel[2] = ((((data[2] - 33) & 0x3) << 6) | ((data[3] - 33))); \
data += 4; \
}
#include "Philips_PM5544_384x288.h"
#include "Philips_PM5544_320x240.h"
static void display_pm554(bool pal_resolution)
{
uint8_t pixel[3];
uint8_t grey1,grey2;
uint8_t mask;
const char* p= pal_resolution ? pm5544_384x288_data : pm5544_320x240_data;
const size_t ratio = 8/g_video_signal.bits_per_pixel;
for(unsigned int y=0; y= WHITE_LEVEL )
{
mask |= 1U<