<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">Den 18.11.2024 04:48, skrev Andrew
      Randrianasulu:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+rFky5mUESDNoFC9ijTfumVB6t6bocP-odkwqVEqCFXxFcxEQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Mon, Nov 18, 2024 at
            3:35 AM Phyllis Smith <<a
              href="mailto:phylsmith2017@gmail.com"
              moz-do-not-send="true" class="moz-txt-link-freetext">phylsmith2017@gmail.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div dir="ltr">
              <div style="font-size:small">Terje, Andrew:</div>
              <div style="font-size:small">Just so I got this right and
                did not miss any.  These 8 are all tested new render
                formats to add?</div>
              <blockquote class="gmail_default gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">av1_qsv_8b420.mp4<br>
                av1_qsv_10b420.mp4<br>
                hevc_qsv_8b420.mp4<br>
                hevc_qsv_10b420.mp4<br>
                hevc_qsv_10b422.mp4<br>
                hevc_vaapi_8b420.mp4<br>
                hevc_vaapi_10b420.mp4<br>
                hevc_vaapi_10b422.mp4<br>
              </blockquote>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>May be Terje will make few more how we found qsv is picky
            about tff-interlaced input .... <br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Yeah, I have continued with more vaapi presets.<br>
    <br>
    While progressive video worked fine as input for av1_qsv, the
    av1_vaapi output become ruined with no visible pictures.<br>
    <br>
    My av1_vaapi_8b420.mp4 preset based on nv12 renders interlaced input
    as it should.<br>
    <br>
    av1_vaapi_10b420.mp4 render attempts fail however with the following
    errors:<br>
    <br>
    [av1_vaapi @ 0x7f692202a880] Specified pixel format p010le is not
    supported by the av1_vaapi encoder.<br>
    [av1_vaapi @ 0x7f692202a880] Supported pixel formats:<br>
    [av1_vaapi @ 0x7f692202a880]   vaapi<br>
    <br>
    As my system ffmpeg 7.1 has encoded video to p010le without issues,
    I wonder if there may be lesser vaapi support in Cingg's internal
    ffmpeg 7,0?<br>
    <br>
    And what about the qsv interlace tff input issues, may it be fixed
    in 7.1 ?<br>
    <br>
    <br>
    <blockquote type="cite"
cite="mid:CA+rFky5mUESDNoFC9ijTfumVB6t6bocP-odkwqVEqCFXxFcxEQ@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div>I have idea about ffmpeg's internals but it has potential
            to either fix it or broke it :)</div>
          <div><br>
          </div>
          <div>I'll try to make patch tomorrow</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
            <div class="gmail_quote">
              <div dir="ltr" class="gmail_attr">On Sun, Nov 17, 2024 at
                5:13 PM Terje J. Hanssen via Cin <<a
                  href="mailto:cin@lists.cinelerra-gg.org"
                  target="_blank" moz-do-not-send="true"
                  class="moz-txt-link-freetext">cin@lists.cinelerra-gg.org</a>>
                wrote:<br>
              </div>
              <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div> <br>
                  <br>
                  <br>
                  <div>Den 17.11.2024 19:53, skrev Andrew Randrianasulu:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="auto">
                      <div><br>
                        <br>
                        <div class="gmail_quote">
                          <div dir="ltr" class="gmail_attr">вс, 17 нояб.
                            2024 г., 20:50 Terje J. Hanssen <<a
                              href="mailto:terjejhanssen@gmail.com"
                              rel="noreferrer noreferrer noreferrer"
                              target="_blank" moz-do-not-send="true"
                              class="moz-txt-link-freetext">terjejhanssen@gmail.com</a>>:<br>
                          </div>
                          <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                            <div> <br>
                              <br>
                              <br>
                              <div>Den 17.11.2024 11:53, skrev Andrew
                                Randrianasulu:<br>
                              </div>
                              <blockquote type="cite">
                                <div dir="auto">
                                  <div><br>
                                    <br>
                                    <div class="gmail_quote">
                                      <div dir="ltr" class="gmail_attr">вс,
                                        17 нояб. 2024 г., 13:24 Terje J.
                                        Hanssen <<a
href="mailto:terjejhanssen@gmail.com"
rel="noreferrer noreferrer noreferrer noreferrer" target="_blank"
                                          moz-do-not-send="true"
                                          class="moz-txt-link-freetext">terjejhanssen@gmail.com</a>>:<br>
                                      </div>
                                      <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                        <div> <br>
                                          <div>Den 16.11.2024 23:24,
                                            skrev Terje J. Hanssen:<br>
                                          </div>
                                          <blockquote type="cite"> <br>
                                            <br>
                                            <br>
                                            <div>Den 16.11.2024 22:20,
                                              skrev Andrew
                                              Randrianasulu:<br>
                                            </div>
                                            <blockquote type="cite">
                                              <div dir="auto">
                                                <div><br>
                                                  <br>
                                                  <div
                                                    class="gmail_quote">
                                                    <div dir="ltr"
                                                      class="gmail_attr">вс,
                                                      17 нояб. 2024 г.,
                                                      00:02 Terje J.
                                                      Hanssen <<a
href="mailto:terjejhanssen@gmail.com"
rel="noreferrer noreferrer noreferrer noreferrer noreferrer"
                                                        target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">terjejhanssen@gmail.com</a>>:<br>
                                                    </div>
                                                    <blockquote
class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                                      <div> <br>
                                                        <br>
                                                        <br>
                                                        <div>Den
                                                          16.11.2024
                                                          20:36, skrev
                                                          Terje J.
                                                          Hanssen:<br>
                                                        </div>
                                                        <blockquote
                                                          type="cite"> <br>
                                                          <br>
                                                          <br>
                                                          <div>Den
                                                          16.11.2024
                                                          19:00, skrev
                                                          Andrew
                                                          Randrianasulu:<br>
                                                          </div>
                                                          <blockquote
                                                          type="cite">
                                                          <div
                                                          dir="auto">
                                                          <div><br>
                                                          <br>
                                                          <div
class="gmail_quote">
                                                          <div dir="ltr"
class="gmail_attr">сб, 16 нояб. 2024 г., 20:56 Terje J. Hanssen via Cin
                                                          <<a
href="mailto:cin@lists.cinelerra-gg.org"
rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer"
target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">cin@lists.cinelerra-gg.org</a>>:<br>
                                                          </div>
                                                          <blockquote
class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                                          <div> Now when
                                                          10bit hevc_qsv
                                                          and hevc_vaapi
                                                          accelerated
                                                          encoding looks
                                                          to be in box,
                                                          I wonder if
                                                          something
                                                          prohibits us
                                                          to get
                                                          accelerated
                                                          encoding for
                                                          av1 and h264?<br>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          </div>
                                                          <div
                                                          dir="auto"><br>
                                                          </div>
                                                          <div
                                                          dir="auto">I
                                                          think av1 was
                                                          complaining
                                                          about invalid
                                                          picture
                                                          structure?</div>
                                                          <div
                                                          dir="auto"><br>
                                                          </div>
                                                          <div
                                                          dir="auto"><br>
                                                          </div>
                                                          <div
                                                          dir="auto">feel
                                                          free to
                                                          experiment.
                                                          You can also
                                                          try vp9 ....</div>
                                                          <div
                                                          dir="auto"><br>
                                                          </div>
                                                          <div
                                                          dir="auto"><br>
                                                          </div>
                                                          <div
                                                          dir="auto">
                                                          <div
class="gmail_quote">
                                                          <blockquote
class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                                          <div> <br>
                                                          According to
                                                          ffmpeg help
                                                          the following
                                                          support should
                                                          be available:<br>
                                                          <br>
                                                          <font
face="Courier New, Courier, monospace">av1_qsv<br>
                                                              Supported
                                                          pixel formats:
                                                          nv12 p010le
                                                          qsv<br>
                                                           
                                                          -profile          
<int>        E..V....... (from 0 to INT_MAX) (default unknown)<br>
                                                              
                                                          unknown        
                                                          0           
                                                          E..V.......<br>
                                                              
                                                          main           
                                                          1           
                                                          E..V.......<br>
                                                          <br>
                                                          av1_vaapi<br>
                                                              Supported
                                                          pixel formats:
                                                          vaapi<br>
                                                           
                                                          -profile          
<int>        E..V....... Set profile (seq_profile) (from -99 to
                                                          255) (default
                                                          -99)<br>
                                                              
                                                          main           
                                                          0           
                                                          E..V.......<br>
                                                              
                                                          high           
                                                          1           
                                                          E..V.......<br>
                                                              
                                                          professional   
                                                          2           
                                                          E..V.......<br>
                                                          </font></div>
                                                          </blockquote>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          </blockquote>
                                                        </blockquote>
                                                      </div>
                                                    </blockquote>
                                                  </div>
                                                </div>
                                              </div>
                                            </blockquote>
                                          </blockquote>
                                          <blockquote type="cite">
                                            <blockquote type="cite">
                                              <div dir="auto">
                                                <div>
                                                  <div
                                                    class="gmail_quote">
                                                    <blockquote
class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                                      <div>
                                                        <blockquote
                                                          type="cite">
                                                          <blockquote
                                                          type="cite">
                                                          <div
                                                          dir="auto">
                                                          <div
                                                          dir="auto">
                                                          <div
class="gmail_quote">
                                                          <blockquote
class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                                          <div><font
face="Courier New, Courier, monospace">..........h264 snip</font></div>
                                                          </blockquote>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          </blockquote>
                                                        </blockquote>
                                                      </div>
                                                    </blockquote>
                                                  </div>
                                                </div>
                                              </div>
                                            </blockquote>
                                          </blockquote>
                                          <blockquote type="cite">
                                            <blockquote type="cite">
                                              <div dir="auto">
                                                <div>
                                                  <div
                                                    class="gmail_quote">
                                                    <blockquote
class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                                      <div>
                                                        <blockquote
                                                          type="cite">
                                                          =============================<br>
                                                          <br>
                                                          Starting tests
                                                          with<br>
                                                          <br>
                                                          /Cin # bin/cin<br>
                                                          Cinelerra
                                                          Infinity -
                                                          built: Nov 15
                                                          2024 20:29:14<br>
                                                          <br>
                                                          <br>
                                                          <font
face="Courier New, Courier, monospace">1) AV1_QSV<br>
                                                          -----------<br>
                                                          </font><br>
                                                          <font
face="Courier New, Courier, monospace">av1_qsv.mp4<br>
                                                          </font>
                                                          <blockquote><font
face="Courier New, Courier, monospace">mp4 av1_qsv</font><br>
                                                          <font
face="Courier New, Courier, monospace"># only usable with ext. ffmpeg</font><br>
                                                          <font
face="Courier New, Courier, monospace">cin_pix_fmt=nv12<br>
                                                          <br>
                                                          </font></blockquote>
                                                          <font
face="Courier New, Courier, monospace">DV input renders ok to yuv420p<br>
                                                          ** rendered
                                                          2832 frames in
                                                          5.475 secs,
                                                          517.260 fps<br>
                                                          <br>
                                                          HDV input
                                                          fails:<br>
                                                          [av1_qsv @
                                                          0x7ff7cca8b9c0]
                                                          Current
                                                          picture
                                                          structure is
                                                          unsupported<br>
                                                          [av1_qsv @
                                                          0x7ff7cca8b9c0]
                                                          some encoding
                                                          parameters are
                                                          not supported
                                                          by the QSV
                                                          runtime.
                                                          Please double
                                                          check the
                                                          input
                                                          parameters.<br>
FFMPEG::open_encoder  err: Function not implemented<br>
                                                          int
                                                          FFMPEG::open_encoder(const
                                                          char*, const
                                                          char*):<br>
                                                          open failed
                                                          av1_qsv:/Videoklipp/QSV/hdv09_04_av1_qsv.mp4<br>
                                                          <br>
                                                          FHD input
                                                          fails<br>
                                                          [av1_qsv @
                                                          0x7ff7918e82c0]
                                                          Current
                                                          picture
                                                          structure is
                                                          unsupported<br>
                                                          [av1_qsv @
                                                          0x7ff7918e82c0]
                                                          some encoding
                                                          parameters are
                                                          not supported
                                                          by the QSV
                                                          runtime.
                                                          Please double
                                                          check the
                                                          input
                                                          parameters.<br>
FFMPEG::open_encoder  err: Function not implemented<br>
                                                          int
                                                          FFMPEG::open_encoder(const
                                                          char*, const
                                                          char*):<br>
                                                          open failed
                                                          av1_qsv:/Videoklipp/QSV/hd01_av1_qsv.mp4<br>
                                                          </font><br>
                                                        </blockquote>
                                                      </div>
                                                    </blockquote>
                                                  </div>
                                                </div>
                                              </div>
                                            </blockquote>
                                          </blockquote>
                                          <br>
                                          <font
face="Courier New, Courier, monospace">After this overview:<br>
                                            <br>
                                            I modified
                                            ffmpeg/encode.opts to
                                            loglevel=debug and tried to
                                            render HDV (and FHD) again:<br>
                                            <br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Trying to
                                            use DRM render node for
                                            device 0.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] libva:
                                            VA-API version 1.22.0<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] libva: User
                                            requested driver 'iHD'<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] libva:
                                            Trying to open
                                            /usr/lib64/dri/iHD_drv_video.so<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] libva: Found
                                            init function
                                            __vaDriverInit_1_22<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] libva:
                                            va_openDriver() returns 0<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Initialised
                                            VAAPI connection: version
                                            1.22<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x41524742 -> bgra.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x41424752 -> rgba.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x58524742 -> bgr0.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x58424752 -> rgb0.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x30335241 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x30334241 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x30335258 -> x2rgb10le.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x30334258 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x36314752 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x56555941 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x56555958 -> vuyx.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x30303859 -> gray.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x3231564e -> nv12.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x3132564e -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x32595559 -> yuyv422.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x59565955 -> uyvy422.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x32315659 -> yuv420p.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x30323449 -> yuv420p.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x50313134 -> yuv411p.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x48323234 -> yuv422p.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x56323234 -> yuv440p.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x50343434 -> yuv444p.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x33434d49 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x30313050 -> p010le.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x32313050 -> p012le.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x36313050 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x30313259 -> y210le.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x32313259 -> y212le.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x36313259 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x30313459 -> xv30le.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x32313459 -> xv36le.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x36313459 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x50424752 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Format
                                            0x50524742 -> unknown.<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] VAAPI
                                            driver: Intel iHD driver for
                                            Intel(R) Gen Graphics -
                                            24.4.0 ().<br>
                                            [AVHWDeviceContext @
                                            0x7f99881fee40] Driver not
                                            found in known nonstandard
                                            list, using standard
                                            behaviour.<br>
                                            [av1_qsv @ 0x7f99880565c0]
                                            Initialized an internal MFX
                                            session using hardware
                                            accelerated implementation<br>
                                            [av1_qsv @ 0x7f99880565c0]
                                            Using the constant
                                            quantization parameter (CQP)
                                            by default. Please use the
                                            global_quality option and
                                            other options for a
                                            quality-based mode or the b
                                            option and other options for
                                            a bitrate-based mode if the
                                            default is not the desired
                                            choice.<br>
                                            [av1_qsv @ 0x7f99880565c0]
                                            Using the constant
                                            quantization parameter (CQP)
                                            ratecontrol method<br>
                                            [av1_qsv @ 0x7f99880565c0]
                                            Current picture structure is
                                            unsupported<br>
                                            [av1_qsv @ 0x7f99880565c0]
                                            some encoding parameters are
                                            not supported by the QSV
                                            runtime. Please double check
                                            the input parameters.<br>
                                            FFMPEG::open_encoder  err:
                                            Function not implemented<br>
                                            int
                                            FFMPEG::open_encoder(const
                                            char*, const char*):<br>
                                            open failed
                                            av1_qsv:/Videoklipp/QSV/hdv09_04_av1_qsv.mp4<br>
                                            Render::render_single:
                                            Session finished.<br>
                                          </font></div>
                                      </blockquote>
                                    </div>
                                  </div>
                                  <div dir="auto"><br>
                                  </div>
                                  <div dir="auto">Sorry, but even with
                                    additional msgs  root case of this
                                    problem is not clearer at all for
                                    me.</div>
                                  <div dir="auto"><br>
                                  </div>
                                  <div dir="auto">You tried with
                                    progressive/deinterlaced source,
                                    with everything set to progressive?</div>
                                  <div dir="auto"><br>
                                  </div>
                                  <div dir="auto">Isn't point of this
                                    thread to get 10bit, 10bit + yuv422
                                    encoder presets working? I suggest
                                    to put aside obviously failing ones
                                    for now.</div>
                                  <div dir="auto"><br>
                                  </div>
                                  <div dir="auto"><br>
                                  </div>
                                </div>
                              </blockquote>
                              <br>
                              I think AV1-10bit yuv422 is only supported
                              by librav1e software encoding yet.<br>
                              <br>
                              But av1_qsv encoding 8bit (nv12) and 10bit
                              420 (p010)  is supported by ffmpeg.<br>
                              The following command works for me for me
                              with HDV and FHD interlaced input:<br>
                              <br>
                              <font
                                face="Courier New, Courier, monospace">HDV
                                --> av1_qsv -global_quality 25<br>
                                -----------------------------------<br>
                                ffmpeg -hide_banner -qsv_device
                                /dev/dri/renderD128 -i hdv09_04.m2t
                                -pix_fmt nv12 -c:v av1_qsv
                                -global_quality 25
                                hdv09_04_av1_qsv_format_nv12_gq25.mp4<br>
                                <br>
                                ffprobe -hide_banner
                                hdv09_04_av1_qsv_format_nv12_gq25.mp4<br>
                                  Stream #0:0[0x1](und): Video: av1
                                (libdav1d) (Main) (av01 / 0x31307661),
                                yuv420p(tv, bt709, top coded first
                                (swapped)), 1440x1080, 7902 kb/s, SAR
                                4:3 DAR 16:9, 24.99 fps, 25 tbr, 12800
                                tbn (default)<br>
                              </font><br>
                              <br>
                              <font
                                face="Courier New, Courier, monospace">FHD
                                --> av1_qsv -global_quality 25<br>
                                -----------------------------------<br>
                                ffmpeg -hide_banner -qsv_device
                                /dev/dri/renderD128 -i cfhd01.mkv
                                -pix_fmt p010 -c:v av1_qsv
                                -global_quality 25
                                cfhd01_av1_qsv_format_p010_gq25.mp4<br>
                                <br>
                                ffprobe -hide_banner
                                cfhd01_av1_qsv_format_p010_gq25.mp4<br>
                                  Stream #0:0[0x1](eng): Video: av1
                                (libdav1d) (Main) (av01 / 0x31307661),
                                yuv420p10le(tv, bt709, progressive),
                                1920x1080, 5761 kb/s, SAR 1:1 DAR 16:9,
                                25 fps, 25 tbr, 12800 tbn (default)<br>
                                <br>
                                <br>
                                ffmpeg output some mpeg warnings in the
                                HDV file, but renders it seemingly ok<br>
                                <br>
                                [mpegts @ 0x560dbed1b800] PES packet
                                size mismatch0:03:56.16
                                bitrate=8036.6kbits/s speed=22.5x    <br>
                                [mpegts @ 0x560dbed1b800] Packet corrupt
                                (stream = 1, dts = 258142320).<br>
                                [mpeg2video @ 0x560dbec663c0] ac-tex
                                damaged at 10 61<br>
                                [mpeg2video @ 0x560dbec663c0] Warning
                                MVs not available<br>
                                [mpeg2video @ 0x560dbec663c0] concealing
                                630 DC, 630 AC, 630 MV errors in P frame<br>
                                [vist#0:0/mpeg2video @ 0x560dbedd2f40]
                                [dec:mpeg2video @ 0x560dbecb4140]
                                corrupt decoded frame<br>
                                [out#0/mp4 @ 0x560dbec67440]
                                video:230191KiB audio:3787KiB
                                subtitle:0KiB other streams:0KiB global
                                headers:0KiB muxing overhead: 0.051687%<br>
                                frame= 5963 fps=561 q=-0.0 Lsize= 
                                234099KiB time=00:03:58.77
                                bitrate=8031.5kbits/s speed=22.5x <br>
                              </font><br>
                              <br>
                              I tried to adapt my hevc_qsv preset for
                              av1_qsv as follows<br>
                              <br>
                              <font
                                face="Courier New, Courier, monospace">av1_qsv_8b420.mp4<br>
                              </font>
                              <blockquote><font
                                  face="Courier New, Courier, monospace">mp4
                                  av1_qsv</font><br>
                                <font
                                  face="Courier New, Courier, monospace">#
                                  av1_qsv_8b420</font><br>
                                <font
                                  face="Courier New, Courier, monospace">#
                                  usable with Pixels: nv12</font><br>
                                <font
                                  face="Courier New, Courier, monospace">profile=main</font><br>
                                <font
                                  face="Courier New, Courier, monospace">global_quality=25<br>
                                </font></blockquote>
                              <font
                                face="Courier New, Courier, monospace"><br>
                                but attempt to render the same HDV file
                                fails with the following output<br>
                                <br>
                                [av1_qsv @ 0x7fd604299600] Encoder:
                                input is system memory surface<br>
                                [av1_qsv @ 0x7fd604299600] Use Intel(R)
                                oneVPL to create MFX session, the
                                required implementation version is 1.1<br>
                                libva info: VA-API version 1.22.0<br>
                                libva info: Trying to open
                                /usr/lib64/dri/iHD_drv_video.so<br>
                                libva info: Found init function
                                __vaDriverInit_1_22<br>
                                libva info: va_openDriver() returns 0<br>
                                libva info: VA-API version 1.22.0<br>
                                libva info: Trying to open
                                /usr/lib64/dri/iHD_drv_video.so<br>
                                libva info: Found init function
                                __vaDriverInit_1_22<br>
                                libva info: va_openDriver() returns 0<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Trying to use DRM render node for device
                                0.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                libva: VA-API version 1.22.0<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                libva: User requested driver 'iHD'<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                libva: Trying to open
                                /usr/lib64/dri/iHD_drv_video.so<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                libva: Found init function
                                __vaDriverInit_1_22<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                libva: va_openDriver() returns 0<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Initialised VAAPI connection: version
                                1.22<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x41524742 -> bgra.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x41424752 -> rgba.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x58524742 -> bgr0.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x58424752 -> rgb0.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x30335241 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x30334241 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x30335258 -> x2rgb10le.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x30334258 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x36314752 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x56555941 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x56555958 -> vuyx.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x30303859 -> gray.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x3231564e -> nv12.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x3132564e -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x32595559 -> yuyv422.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x59565955 -> uyvy422.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x32315659 -> yuv420p.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x30323449 -> yuv420p.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x50313134 -> yuv411p.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x48323234 -> yuv422p.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x56323234 -> yuv440p.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x50343434 -> yuv444p.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x33434d49 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x30313050 -> p010le.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x32313050 -> p012le.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x36313050 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x30313259 -> y210le.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x32313259 -> y212le.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x36313259 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x30313459 -> xv30le.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x32313459 -> xv36le.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x36313459 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x50424752 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Format 0x50524742 -> unknown.<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                VAAPI driver: Intel iHD driver for
                                Intel(R) Gen Graphics - 24.4.0 ().<br>
                                [AVHWDeviceContext @ 0x7fd60408bd40]
                                Driver not found in known nonstandard
                                list, using standard behaviour.<br>
                                [av1_qsv @ 0x7fd604299600] Initialized
                                an internal MFX session using hardware
                                accelerated implementation<br>
                                [av1_qsv @ 0x7fd604299600] Using the
                                intelligent constant quality (ICQ)
                                ratecontrol method<br>
                                [av1_qsv @ 0x7fd604299600] Current
                                picture structure is unsupported<br>
                              </font></div>
                          </blockquote>
                        </div>
                      </div>
                      <div dir="auto"><br>
                      </div>
                      <div dir="auto">I think this error comes from</div>
                      <div dir="auto"><br>
                      </div>
                      <div dir="auto"><a
href="http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/refs/heads/release/7.0:/libavcodec/qsvenc.c"
                          rel="noreferrer noreferrer noreferrer"
                          target="_blank" moz-do-not-send="true"
                          class="moz-txt-link-freetext">http://git.ffmpeg.org/gitweb/ffmpeg.git/blob/refs/heads/release/7.0:/libavcodec/qsvenc.c</a></div>
                      <div dir="auto"><br>
                      </div>
                      <div dir="auto">
                        <div dir="auto">     if
                          (UNMATCH(FrameInfo.PicStruct))</div>
                        <div dir="auto"> 689               av_log(avctx,
                          AV_LOG_ERROR, "Current picture structure is
                          unsupported\n");</div>
                        <div dir="auto"><br>
                        </div>
                        <div dir="auto">
                          <div dir="auto">    if (avctx->flags &
                            AV_CODEC_FLAG_INTERLACED_DCT) {</div>
                          <div dir="auto"> 850         // it is
                            important that PicStruct be setup correctly
                            from the</div>
                          <div dir="auto"> 851         //
                            start--otherwise, encoding doesn't work and
                            results in a bunch</div>
                          <div dir="auto"> 852         // of
                            incompatible video parameter errors</div>
                          <div dir="auto"> 853       
                             q->param.mfx.FrameInfo.PicStruct =
                            MFX_PICSTRUCT_FIELD_TFF;</div>
                          <div dir="auto"> 854         // height
                            alignment always must be 32 for interlaced
                            video</div>
                          <div dir="auto"> 855       
                             q->height_align = 32;</div>
                          <div dir="auto"> 856     } else {</div>
                          <div dir="auto"> 857       
                             q->param.mfx.FrameInfo.PicStruct =
                            MFX_PICSTRUCT_PROGRESSIVE;</div>
                          <div dir="auto"> 858         // for
                            progressive video, the height should be
                            aligned to 16 for</div>
                          <div dir="auto"> 859         // H.264.  For
                            HEVC, depending on the version of MFX, it
                            should be</div>
                          <div dir="auto"> 860         // either 32 or
                            16.  The lower number is better if possible.</div>
                          <div dir="auto"> 861         // For AV1, it is
                            32</div>
                          <div dir="auto"> 862       
                             q->height_align = (avctx->codec_id ==
                            AV_CODEC_ID_HEVC ||</div>
                          <div dir="auto"> 863                         
                              avctx->codec_id == AV_CODEC_ID_AV1) ?
                            32 : 16;</div>
                          <div dir="auto"> 864     }</div>
                          <div dir="auto"> 865   
                             q->param.mfx.FrameInfo.Height =
                            FFALIGN(avctx->height,
                            q->height_align);</div>
                          <div dir="auto"><br>
                          </div>
                          <div dir="auto"><br>
                          </div>
                          <div dir="auto">
                            <div dir="auto">2030 </div>
                            <div dir="auto">2031       
                               qf->surface.Info.PicStruct =</div>
                            <div dir="auto">2032           
                               !(frame->flags &
                              AV_FRAME_FLAG_INTERLACED) ?
                              MFX_PICSTRUCT_PROGRESSIVE :</div>
                            <div dir="auto">2033           
                               (frame->flags &
                              AV_FRAME_FLAG_TOP_FIELD_FIRST) ?
                              MFX_PICSTRUCT_FIELD_TFF :</div>
                            <div dir="auto">2034                       
                                              MFX_PICSTRUCT_FIELD_BFF;</div>
                          </div>
                          <div dir="auto"><br>
                          </div>
                          <div dir="auto"><br>
                          </div>
                          <div dir="auto"><br>
                          </div>
                          <div dir="auto">i.e. common code for all qsv
                            encoders?</div>
                          <div dir="auto"><br>
                          </div>
                          <div dir="auto">so *I think* it only test  for
                            either bff or tff and fails if +ildct flag
                            actually set.</div>
                          <div dir="auto"><br>
                          </div>
                          <div dir="auto">you can try to add it ffmpeg
                            line and see if it starts to fail</div>
                          <div dir="auto"><br>
                          </div>
                          <div dir="auto">BUT</div>
                        </div>
                        <div dir="auto"><br>
                        </div>
                      </div>
                      <div dir="auto"><br>
                      </div>
                      <div dir="auto">can you test progressive or bff
                        source in cingg ??</div>
                      <div dir="auto"><br>
                      </div>
                      <div dir="auto">i do not ask just for lulz, I want
                        to understand *where* it fails, and does this
                        mean we need to ask ffmpeg guys todo something
                        or alter ourselves.</div>
                      <div dir="auto"><br>
                      </div>
                      <div dir="auto">So, *PLEASE* do progressive/bff
                        test!</div>
                      <div dir="auto"><br>
                      </div>
                      <div dir="auto">
                        <div class="gmail_quote">
                          <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                            <div><font
                                face="Courier New, Courier, monospace"><br>
                              </font></div>
                          </blockquote>
                        </div>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                  <font face="Courier New, Courier, monospace">Yeah,
                    thank you for all help and tip to solve this.<br>
                    I had just to finish my std interlaced HDV and FHD
                    input testing with various preset parameters </font>😉<br>
                  <font face="Courier New, Courier, monospace"><br>
                    And my first bff interlaced test already worked
                    without those problems<br>
                    <br>
                    1) SD-DV --> AV1_QSV<br>
                    <br>
                    mediainfo dv01_07.dv | grep -i scan<br>
                    Scan type                                :
                    Interlaced<br>
                    Scan order                               : Bottom
                    Field First<br>
                    <br>
                    av1_qsv_8b420.mp4<br>
                        mp4 av1_qsv<br>
                        # av1_qsv_8b420<br>
                        # usable with Pixels: nv12<br>
                        profile=main<br>
                        # global_quality=25<br>
                    <br>
                    BC_DisplayInfo::gl_fb_config failed<br>
                    libva info: VA-API version 1.22.0<br>
                    libva info: Trying to open
                    /usr/lib64/dri/iHD_drv_video.so<br>
                    libva info: Found init function __vaDriverInit_1_22<br>
                    libva info: va_openDriver() returns 0<br>
                    libva info: VA-API version 1.22.0<br>
                    libva info: Trying to open
                    /usr/lib64/dri/iHD_drv_video.so<br>
                    libva info: Found init function __vaDriverInit_1_22<br>
                    libva info: va_openDriver() returns 0<br>
                    Render::render_single: Session finished.<br>
                    ** rendered 2832 frames in 3.645 secs, 776.955 fps<br>
                    <br>
                    -----------------------<br>
                    <br>
                    while the std HDV and FHD input files were tff
                    interlaced:<br>
                    <br>
                    mediainfo hdv09_04.m2t  | grep -i scan<br>
                    Scan type                                :
                    Interlaced<br>
                    Scan order                               : Top Field
                    First<br>
                    <br>
                    mediainfo cfhd01.mkv  | grep -i scan<br>
                    Scan type                                :
                    Interlaced<br>
                    Scan type, store method                  :
                    Interleaved fields<br>
                    Scan order                               : Top Field
                    First<br>
                    <br>
                    So I deinterlaced them to-night with ffmpeg and
                    yadif and bitrate to keep quality.<br>
                    And it was no "lul" for cfhd (FHD) with very high
                    bitrate (fps=0.8, speed=0.03) </font>🙁<br>
                  <br>
                  <font face="Courier New, Courier, monospace">ffmpeg
                    -hide_banner -i hdv09_04.m2t -vf yadif=parity=auto
                    -vb 30M hdv09_04_progr.m2t<br>
                    <br>
                    ffmpeg -hide_banner -i cfhd01.mkv -vf
                    yadif=parity=auto -vb 400M cfhd01_progr.mkv<br>
                    <br>
                    And the good thing to report back is rendering now
                    worked for the progressive input files</font> 🙂<br>
                  <br>
                  -----------<br>
                  <br>
                  2) HDV progressive --> av1_qsv <font
                    face="Courier New, Courier, monospace">(8bit
                    yuv420p, nv12)</font><br>
                  <br>
                  <font face="Courier New, Courier, monospace">av1_qsv_8b420.mp4<br>
                        mp4 av1_qsv<br>
                        # av1_qsv_8b420<br>
                        # usable with Pixels: nv12<br>
                        profile=main<br>
                        # global_quality=25</font><br>
                  <br>
                  <font face="Courier New, Courier, monospace">BC_DisplayInfo::gl_fb_config
                    failed<br>
                    libva info: VA-API version 1.22.0<br>
                    libva info: Trying to open
                    /usr/lib64/dri/iHD_drv_video.so<br>
                    libva info: Found init function __vaDriverInit_1_22<br>
                    libva info: va_openDriver() returns 0<br>
                    libva info: VA-API version 1.22.0<br>
                    libva info: Trying to open
                    /usr/lib64/dri/iHD_drv_video.so<br>
                    libva info: Found init function __vaDriverInit_1_22<br>
                    libva info: va_openDriver() returns 0<br>
                    Render::render_single: Session finished.<br>
                    ** rendered 2832 frames in 3.645 secs, 776.955 fps<br>
                    <br>
                    ffprobe -hide_banner hdv09_04_progr_av1_qsv.mp4<br>
                      Stream #0:0[0x1](und): Video: av1 (libdav1d)
                    (Main) (av01 / 0x31307661), yuv420p(tv,
                    bt709/unknown/unknown, progressive), 1440x1080, 927
                    kb/s, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 12800 tbn
                    (default)<br>
                    <br>
                  </font>----------<br>
                  <br>
                  <font face="Courier New, Courier, monospace">3) FHD
                    (cfhd) progressive --> av1_qsv (10bit yuv420p,
                    p010le)<br>
                    <br>
                    av1_qsv_10b420.mp4<br>
                        mp4 av1_qsv<br>
                        # av1_qsv_10b420<br>
                        # usabel with Pixels: p010le<br>
                        profile=main<br>
                        # global_quality=25<br>
                    <br>
                  </font><font face="Courier New, Courier, monospace">libva
                    info: VA-API version 1.22.0<br>
                    libva info: Trying to open
                    /usr/lib64/dri/iHD_drv_video.so<br>
                    libva info: Found init function __vaDriverInit_1_22<br>
                    libva info: va_openDriver() returns 0<br>
                    libva info: VA-API version 1.22.0<br>
                    libva info: Trying to open
                    /usr/lib64/dri/iHD_drv_video.so<br>
                    libva info: Found init function __vaDriverInit_1_22<br>
                    libva info: va_openDriver() returns 0<br>
                    FFMPEG::open_decoder: some stream times estimated:
                    /Videoklipp/QSV/cfhd01_progr.mkv<br>
                    Render::render_single: Session finished.<br>
                    ** rendered 1780 frames in 28.383 secs, 62.714 fps<br>
                    FFMPEG::open_decoder: some stream times estimated:
                    /Videoklipp/QSV/cfhd01_progr.mkv<br>
                    <br>
                    <br>
                    ffprobe -hide_banner hdv09_04_progr_av1_qsv.mp4<br>
                      Stream #0:0[0x1](und): Video: av1 (libdav1d)
                    (Main) (av01 / 0x31307661), yuv420p10le(tv,
                    bt709/unknown/unknown, progressive), 1440x1080, 926
                    kb/s, SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 12800 tbn <br>
                    <br>
                    -------<br>
                    <br>
                    I tested also that HDV could be rendered correctly
                    using both 8bit and 10 presets as attached<br>
                  </font>
                  <blockquote><font
                      face="Courier New, Courier, monospace">av1_qsv_10b420.mp4</font><br>
                    <font face="Courier New, Courier, monospace">av1_qsv_8b420.mp4</font><br>
                  </blockquote>
                  <font face="Courier New, Courier, monospace"><br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                  </font><br>
                </div>
                -- <br>
                Cin mailing list<br>
                <a href="mailto:Cin@lists.cinelerra-gg.org"
                  target="_blank" moz-do-not-send="true"
                  class="moz-txt-link-freetext">Cin@lists.cinelerra-gg.org</a><br>
                <a
href="https://lists.cinelerra-gg.org/mailman/listinfo/cin"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
              </blockquote>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>