Read about our upcoming Code of Conduct on this issue

Commit 7afefb8e authored by alex@thinkpad's avatar alex@thinkpad
Browse files

Raw backend: use (*height)-- adjustment on all DIGIC 5 models

700D, 650D, 100D, M: fine-tuned skip offsets
Allow odd values for skip_bottom

650D/M x5 zoom: skip_top is the same as with regular 1080p or 720p or mv1080crop

700D/650D/M 720p
before: H=727, skip_bottom = 4 => active area y2=723 (real 724)
after: H=725, skip_bottom = 1 => active area y2=724

100D 720p:
before: H=726, skip_bottom = 4 => active area y2=722 (real 724)
after: H=726, skip_bottom = 2 => active area y2=724

650D/M 1080p:
before: H=1190, skip_bottom = 4 => active area y2=1186 (2 white lines at bottom)
after: H=1188, skip_bottom = 0 => active area y2=1188 (no bad lines at bottom)

EOSM movie crop: H=1060, top=28, active area y2=1060, no bad lines at bottom
(unsure about skip_bottom on 100D - to be tested with a silent DNG in movie crop mode)

See also:
https://www.magiclantern.fm/forum/index.php?topic=18443.msg198140#msg198140
https://www.magiclantern.fm/forum/index.php?topic=16054.msg195213#msg195213

--HG--
branch : crop_rec_4k
parent 997c44034ffe
......@@ -537,20 +537,21 @@ static int raw_lv_get_resolution(int* width, int* height)
*width = ((bot_right & 0xFFFF) - (top_left & 0xFFFF)) * column_factor;
*height = (bot_right >> 16) - (top_left >> 16);
/* height may be a little different; 5D3 needs to subtract 1,
* EOSM/700D/650D needs to add 1, 100D usually gives exact value
* but tests show better results if we subtract 1.
* is it really important to have exact height?
* for some raw types, yes! */
/* height may be a little different
* 5D3 needs to subtract 1 to match EDMAC; without height-1, raw type DEFCORRE
* (8..12-bit lossless) will only work every other frame (also OK at lower heights)
* 100D/M2 report exact value (matches EDMAC), but this results in hiccups in x5 zoom
* these hiccups disappear when using height-1 or lower
* (100D 720p: top=28 active=696 y2=724 above=727 adjusted=726)
* EOSM/700D/650D needs to add 1 to match EDMAC - no hiccups reported
* however, height+1 would give 4 invalid lines at the bottom
* (650D 720p: top=28 active=696 y2=724 above=726 adjusted=725)
* see also https://a1ex.magiclantern.fm/bleeding-edge/raw/raw_res.txt */
#if defined(CONFIG_5D3) || defined(CONFIG_100D)
#ifdef CONFIG_DIGIC_V
(*height)--;
#endif
#if defined(CONFIG_700D) || defined(CONFIG_650D)
(*height)++;
#endif
#ifdef CONFIG_EOSM
/* EOS M exception */
/* http://www.magiclantern.fm/forum/index.php?topic=16608.msg176023#msg176023 */
......@@ -558,7 +559,6 @@ static int raw_lv_get_resolution(int* width, int* height)
{
*height = 727;
}
else (*height)++;
#endif
return 1;
......@@ -801,14 +801,17 @@ int raw_update_params_work()
skip_top = 26;
skip_left = zoom ? 64: 74;
skip_right = 0;
skip_bottom = 0;
#endif
#if defined(CONFIG_EOSM) || defined(CONFIG_700D) || defined(CONFIG_650D) || defined(CONFIG_100D)
skip_top = zoom ? 26 : 28;
skip_top = 28;
skip_left = 72;
skip_right = 0;
skip_bottom = zoom ? 0 : mv1080crop ? 2 : 4;
#ifdef CONFIG_100D
skip_bottom = mv720 ? 2 : 0; /* 720p: H=726, last valid line at y=723, 2 white lines at bottom */
#else
skip_bottom = mv720 ? 1 : 0; /* 720p: H=725, last valid line at y=723, 1 white line at bottom */
#endif
#endif
#ifdef CONFIG_7D
......@@ -945,7 +948,7 @@ int raw_update_params_work()
skip_left &= ~1;
skip_right &= ~1;
skip_top &= ~1;
skip_bottom &= ~1;
//skip_bottom &= ~1;
if (width != raw_info.width || height != raw_info.height)
{
......
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