<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 13, 2017 at 4:09 PM, Ma0 <span dir="ltr"><<a href="mailto:mateuszb@poczta.onet.pl" target="_blank">mateuszb@poczta.onet.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Ma0 <<a href="mailto:mateuszb@poczta.onet.pl">mateuszb@poczta.onet.pl</a>><br>
# Date 1507448003 -7200<br>
# Sun Oct 08 09:33:23 2017 +0200<br>
# Node ID daef862c9d0a5d2b2a1e1e8da7ec56<wbr>facfa08272<br>
# Parent 0e168bdeb48b3d57d896d3823e2efb<wbr>2bf69d4b26<br>
input/y4m: support all bit depths from 'mono9' to 'mono16' in y4m<br></blockquote><div><br></div><div>Pushed to default branch. Thanks!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff -r 0e168bdeb48b -r daef862c9d0a source/input/y4m.cpp<br>
--- a/source/input/y4m.cpp Mon Oct 09 12:34:25 2017 +0530<br>
+++ b/source/input/y4m.cpp Sun Oct 08 09:33:23 2017 +0200<br>
@@ -307,23 +307,26 @@<br>
break;<br>
}<br>
<br>
- switch (csp)<br>
+ if (csp / 100 == ('m'-'0')*1000 + ('o'-'0')*100 + ('n'-'0')*10 + ('o'-'0'))<br>
{<br>
- case ('m'-'0')*100000 + ('o'-'0')*10000 + ('n'-'0')*1000 + ('o'-'0')*100 + 16:<br>
colorSpace = X265_CSP_I400;<br>
- depth = 16;<br>
- break;<br>
-<br>
- case ('m'-'0')*1000 + ('o'-'0')*100 + ('n'-'0')*10 + ('o'-'0'):<br>
+ d = csp % 100;<br>
+ }<br>
+ else if (csp / 10 == ('m'-'0')*1000 + ('o'-'0')*100 + ('n'-'0')*10 + ('o'-'0'))<br>
+ {<br>
colorSpace = X265_CSP_I400;<br>
- depth = 8;<br>
- break;<br>
-<br>
- default:<br>
- if (d >= 8 && d <= 16)<br>
- depth = d;<br>
+ d = csp % 10;<br>
+ }<br>
+ else if (csp == ('m'-'0')*1000 + ('o'-'0')*100 + ('n'-'0')*10 + ('o'-'0'))<br>
+ {<br>
+ colorSpace = X265_CSP_I400;<br>
+ d = 8;<br>
+ }<br>
+ else<br>
colorSpace = (csp == 444) ? X265_CSP_I444 : (csp == 422) ? X265_CSP_I422 : X265_CSP_I420;<br>
- }<br>
+<br>
+ if (d >= 8 && d <= 16)<br>
+ depth = d;<br>
break;<br>
<br>
default:<br>
______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>