% see http://www.magiclantern.fm/forum/index.php?topic=16814.msg164062#msg164062 % check how Canon shutter values are rounded - in 1/8, or 1/3 & 1/2 EV increments? f = fopen("SHUTTER.LOG", "r") R = []; S = []; colors_normal = {"b--.", "b--.", "b--o"}; colors_rounded = {"r--.", "r--.", "r--o"}; while 1, l = fgetl(f); if l == -1, break, end if length(l) > 5 if strcmp(l(1:5), "1080p"), fps = str2num(l(6:7)); raw = str2num(l(14:17)); us = str2num(l(83:88)); %~ us = us + 5; R(end+1) = raw; S(end+1) = log2(1/(us/1e6)); end else fps Rr = R; Rr(mod(R,8)~=4) = round(Rr(mod(R,8)~=4)/8*3)/3*8; stem(R, (R-S*8-56)/8, colors_normal{1}, 'linewidth', 0); hold on; stem(Rr, (Rr-S*8-56)/8, colors_rounded{1}, 'linewidth', 0); plot(R, (R-S*8-56)/8, 'color', [0.7 0.7 1], 'markersize', 0); plot(Rr, (Rr-S*8-56)/8, 'color', [1 0.7 0.7], 'markersize', 0); colors_normal = colors_normal(2:end); colors_rounded = colors_rounded(2:end); R = []; S = []; end end fclose(f) a = axis; h_normal = plot(0, 0, "b", 'markersize', 0); h_rounded = plot(0, 0, "r", 'markersize', 0); h_30p = plot(0, 0, "k--."); h_25p = plot(0, 0, "k--o"); grid on set(gca, 'xtick', [96:8:160]) axis(a); legend([h_normal, h_rounded, h_25p, h_30p], {'raw shutter (1/8-stop increments)', 'rounded to 1/3 and 1/2-stop', "1080p 25 fps", "1080p 24/30 fps (identical)"}); xlabel('raw shutter') ylabel('raw\_shutter / 8 - log2(1 / adtg\_shutter\_seconds) - 56 / 8 (EV)') title('Shutter speed rounding test - 5D3 movie mode, raw shutter vs computed from ADTG') print -dpng -FHelvetica:10 shutter.png