<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>I've based on FFmpeg -- if you execute wrong pixel format for
      y4m, for example:<br>
      ffmpeg -i 720p50_parkrun_ter.y4m -pix_fmt monow -f yuv4mpegpipe
      w.y4m</p>
    <p>you can see error message:<br>
      ERROR: yuv4mpeg can only handle yuv444p, yuv422p, yuv420p, yuv411p
      and gray8 pixel formats.<br>
      And using 'strict -1' also yuv444p9, yuv422p9, yuv420p9,
      yuv444p10, yuv422p10, yuv420p10, <br>
      yuv444p12, yuv422p12, yuv420p12, yuv444p14, yuv422p14, yuv420p14,
      yuv444p16, yuv422p16, <br>
      yuv420p16 and gray16 pixel formats. Use -pix_fmt to select one.</p>
    <p>For gray8 and gray16 the y4m header has mono and mono16 strings.</p>
    <p>I found also mjpeg (yuv4mpeg creator?):<br>
<a class="moz-txt-link-freetext" href="http://mjpeg.cvs.sourceforge.net/viewvc/mjpeg/mjpeg_play/utils/yuv4mpeg.h?revision=1.28&view=markup">http://mjpeg.cvs.sourceforge.net/viewvc/mjpeg/mjpeg_play/utils/yuv4mpeg.h?revision=1.28&view=markup</a><br>
      -- see line 641.</p>
    <p>Mateusz<br>
    </p>
    <br>
    <div class="moz-cite-prefix">W dniu 2016-10-25 o 06:18, Pradeep
      Ramachandran pisze:<br>
    </div>
    <blockquote
cite="mid:CAKpaXXfZDaFf8ed_VuAzoi1+Evi=rPB0EJZ01pffJGDCcmYqrw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Sun, Oct 16, 2016 at 11:17 PM,
            Mateusz <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:mateusz@msystem.waw.pl" target="_blank">mateusz@msystem.waw.pl</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">This patch fixes issue
              #282.<br>
              <br>
              # HG changeset patch<br>
              # User Ma0 <<a moz-do-not-send="true"
                href="mailto:mateuszb@poczta.onet.pl">mateuszb@poczta.onet.pl</a>><br>
              # Date 1476639059 -7200<br>
              #      Sun Oct 16 19:30:59 2016 +0200<br>
              # Node ID f49487ee92a296a36938dfb92b7b51<wbr>c9fb7f2ff9<br>
              # Parent  c97805dad9148ad3cddba10a67ed55<wbr>96508e8f86<br>
              CLI: allow 'mono' & 'mono16' color space for y4m input<br>
              <br>
              diff -r c97805dad914 -r f49487ee92a2 source/input/y4m.cpp<br>
              --- a/source/input/y4m.cpp    Thu Oct 13 17:53:48 2016
              +0800<br>
              +++ b/source/input/y4m.cpp    Sun Oct 16 19:30:59 2016
              +0200<br>
              @@ -280,7 +280,7 @@<br>
                               {<br>
                                   c = ifs->get();<br>
              <br>
              -                    if (c <= '9' && c >=
              '0')<br>
              +                    if (c <= 'o' && c >=
              '0')<br>
                                       csp = csp * 10 + (c - '0');<br>
                                   else if (c == 'p')<br>
                                   {<br>
              @@ -300,9 +300,23 @@<br>
                                       break;<br>
                               }<br>
              <br>
              -                if (d >= 8 && d <= 16)<br>
              -                    depth = d;<br>
              -                colorSpace = (csp == 444) ? X265_CSP_I444
              : (csp == 422) ? X265_CSP_I422 : X265_CSP_I420;<br>
              +                switch (csp)<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>
              +                    colorSpace = X265_CSP_I400;<br>
              +                    depth = 8;<br>
              +                    break;<br>
              +<br>
              +                default:<br>
              +                    if (d >= 8 && d <= 16)<br>
              +                        depth = d;<br>
              +                    colorSpace = (csp == 444) ?
              X265_CSP_I444 : (csp == 422) ? X265_CSP_I422 :
              X265_CSP_I420;<br>
              +                }<br>
            </blockquote>
            <div><br>
            </div>
            <div>Do you have a pointer to the definition of the Y4M
              headers? From the description on wikipedia (<a
                moz-do-not-send="true"
                href="https://wiki.multimedia.cx/index.php?title=YUV4MPEG2">https://wiki.multimedia.cx/index.php?title=YUV4MPEG2</a>),
              I don't see the mono or mono16 string additions for the
              csp.</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
                               break;<br>
              <br>
                           default:<br>
              @@ -324,7 +338,7 @@<br>
                   if (width < MIN_FRAME_WIDTH || width >
              MAX_FRAME_WIDTH ||<br>
                       height < MIN_FRAME_HEIGHT || height >
              MAX_FRAME_HEIGHT ||<br>
                       (rateNum / rateDenom) < 1 || (rateNum /
              rateDenom) > MAX_FRAME_RATE ||<br>
              -        colorSpace <= X265_CSP_I400 || colorSpace
              >= X265_CSP_COUNT)<br>
              +        colorSpace < X265_CSP_I400 || colorSpace >=
              X265_CSP_COUNT)<br>
                       return false;<br>
              <br>
                   return true;<br>
              <br>
              ______________________________<wbr>_________________<br>
              x265-devel mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
              <a moz-do-not-send="true"
                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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
x265-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a>
<a class="moz-txt-link-freetext" href="https://mailman.videolan.org/listinfo/x265-devel">https://mailman.videolan.org/listinfo/x265-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>