Read about our upcoming Code of Conduct on this issue

Commit 0d740a7b authored by a1ex's avatar a1ex
Browse files

More HDMI tweaks/experiments

--HG--
branch : 550d
parent 6d299d01fa88
......@@ -12,7 +12,6 @@
#include "lens.h"
CONFIG_INT("hdmi.force.vga", hdmi_force_vga, 0);
PROP_INT(PROP_HDMI_CHANGE_CODE, hdmi_code)
// WB workaround (not saved in movie mode)
//**********************************************************************
......@@ -259,10 +258,11 @@ movtweak_task( void* unused )
}
extern int ext_monitor_hdmi;
if (hdmi_force_vga && shooting_mode == SHOOTMODE_MOVIE && lv_drawn() && ext_monitor_hdmi && !recording && !gui_menu_shown())
if (hdmi_force_vga && shooting_mode == SHOOTMODE_MOVIE && (lv_drawn() || PLAY_MODE) && ext_monitor_hdmi && !recording && !gui_menu_shown())
{
if (hdmi_code == 5)
{
msleep(1000);
BMP_SEM (
msleep(500);
ChangeHDMIOutputSizeToVGA();
......@@ -322,8 +322,9 @@ hdmi_force_display(
bmp_printf(
selected ? MENU_FONT_SEL : MENU_FONT,
x, y,
"Force HDMI-VGA: %s",
hdmi_force_vga ? "ON" : "OFF"
"Force HDMI-VGA: %s [code=%d]",
hdmi_force_vga ? "ON" : "OFF",
hdmi_code
);
}
static struct menu_entry mov_menus[] = {
......@@ -396,7 +397,7 @@ static struct menu_entry mov_menus[] = {
.priv = &hdmi_force_vga,
.display = hdmi_force_display,
.select = menu_binary_toggle,
.help = "Force low resolution (3:2) on HDMI displays."
.help = "Force low resolution (720x480) on HDMI displays."
}
};
......
......@@ -284,6 +284,8 @@
#define PROP_ROLLING_PITCHING_LEVEL 0x80030039
#define PROP_VRAM_SIZE_MAYBE 0x8005001f
/** Properties */
extern void
prop_register_slave(
......
......@@ -34,6 +34,7 @@ PROP_INT(PROP_LVAF_MODE, lvaf_mode);
PROP_INT(PROP_IMAGE_REVIEW_TIME, image_review_time);
PROP_INT(PROP_HOUTPUT_TYPE, lv_disp_mode);
PROP_INT(PROP_MIRROR_DOWN, mirror_down);
PROP_INT(PROP_HDMI_CHANGE_CODE, hdmi_code)
int display_sensor = 0;
......
......@@ -29,4 +29,5 @@ extern int lvaf_mode;
extern int image_review_time;
extern int lv_disp_mode;
extern int mirror_down;
extern int hdmi_code;
#endif
......@@ -272,24 +272,26 @@ void* get_write_422_buf()
return 0;
}
int vram_width = 720;
int vram_height = 480;
PROP_HANDLER(PROP_VRAM_SIZE_MAYBE)
{
vram_width = buf[1];
vram_height = buf[2];
return prop_cleanup(token, property);
}
struct vram_info * get_yuv422_vram()
{
static struct vram_info _vram_info;
_vram_info.vram = get_fastrefresh_422_buf();
if (gui_state == GUISTATE_PLAYMENU) _vram_info.vram = (void*) YUV422_LV_BUFFER_DMA_ADDR;
if(ext_monitor_hdmi && !recording) {
_vram_info.pitch=YUV422_LV_PITCH_HDMI;
_vram_info.height=YUV422_LV_HEIGHT_HDMI;
}else if(ext_monitor_rca) {
_vram_info.pitch=YUV422_LV_PITCH_RCA;
_vram_info.height=YUV422_LV_HEIGHT_RCA;
} else {
_vram_info.pitch=YUV422_LV_PITCH;
_vram_info.height=YUV422_LV_HEIGHT;
}
_vram_info.width = vram_width;
_vram_info.height = vram_height;
_vram_info.pitch = _vram_info.width * 2;
_vram_info.width = _vram_info.pitch >> 1;
//~ bmp_printf(FONT_LARGE, 100, 100, "%d x %d", _vram_info.width, _vram_info.height);
return &_vram_info;
}
......@@ -2600,8 +2602,10 @@ cropmark_redraw()
void wait_till_its_safe_to_mess_with_the_display()
{
while (lens_info.job_state || tft_status || recording == 1)
while (lens_info.job_state >= 10 || tft_status || recording == 1)
{
msleep(100);
}
}
int _bmp_cleared = 0;
......@@ -3057,6 +3061,7 @@ TASK_CREATE( "cls_task", clearscreen_task, 0, 0x1e, 0x1000 );
void redraw()
{
wait_till_its_safe_to_mess_with_the_display();
BMP_SEM(
/*static int x;
msleep(500);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment