1. 19 Jan, 2018 1 commit
    • Frank Barchard's avatar
      Add LibYUVConvertTest.TestH010ToAR30 unittest · 37f97210
      Frank Barchard authored
      Tests accuracy of H010ToAR30 on grey scale ramp against float
      and computes a histogram to detect number of unique shades for
      each channel.
      
      With 2 step intermediate using 8 bit RGB, the test shows 256
      unique values.
      
      [ RUN      ] LibYUVConvertTest.TestH420ToARGB
      uniques: B 220, G, 220, R 220
      [       OK ] LibYUVConvertTest.TestH420ToARGB (0 ms)
      [ RUN      ] LibYUVConvertTest.TestH010ToARGB
      uniques: B 256, G, 256, R 256
      [       OK ] LibYUVConvertTest.TestH010ToARGB (0 ms)
      [ RUN      ] LibYUVConvertTest.TestH010ToAR30
      uniques: B 256, G, 256, R 256
      [       OK ] LibYUVConvertTest.TestH010ToAR30 (0 ms)
      
      Bug: libyuv:751
      Test  LibYUVConvertTest.TestH010ToAR30 unittest
      
      Change-Id: I6b1e1209247cb00b79b594127b02dae5217dc400
      Reviewed-on: https://chromium-review.googlesource.com/875317Reviewed-by: 's avatarMiguel Casas <mcasas@chromium.org>
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      37f97210
  2. 16 Jan, 2018 1 commit
    • Frank Barchard's avatar
      Remove MEMOPREG x64 NaCL macros · ecab5430
      Frank Barchard authored
      MEMOPREG macros are deprecated in row.h
      
      Regular expressions to remove MEMOPREG macros:
      
      MEMOPREG(movd, 0x00, [u_buf], [v_buf], 1, xmm1)                            \
      MEMOPREG\((.*), (.*), (.*), (.*), (.*), (.*)\)
      "\1    \2(%\3,%\4,\5),%%\6            \\n"
      
      MEMOPREG(movdqu,0x00,1,4,1,xmm2)
      MEMOPREG\((.*),(.*),(.*),(.*),(.*),(.*)\)
      "\1    \2(%\3,%\4,\5),%%\6            \\n"
      
      MEMOPREG(movdqu,0x00,1,4,1,xmm2)
      MEMOPREG\((.*),(.*),(.*),(.*),(.*),(.*)\)(.*)(//.*)
      "\1    \2(%\3,%\4,\5),%%\6           \\n"
      
      TBR=braveyao@chromium.org
      
      Bug: libyuv:702
      Test: try bots pass
      Change-Id: If8743abd9af2e8c549d0c7d3d49733a9b0f0ca86
      Reviewed-on: https://chromium-review.googlesource.com/865964Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      ecab5430
  3. 13 Jan, 2018 1 commit
    • Frank Barchard's avatar
      Remove MEMOPMEM x64 NaCL macros · b33e0f97
      Frank Barchard authored
      MEMOPMEM macros are deprecated in row.h
      
      Usage examples
          MEMOPMEM(vmovdqu,ymm0,0x00,0,1,1)          //  vmovdqu %%ymm0,(%0,%1)
          MEMOPMEM(movdqu,xmm2,0x00,1,0,1)
      
      Regular expressions to remove MEMACCESS macros:
      
      MEMOPMEM\((.*),(.*),(.*),(.*),(.*),(.*)\)(.*)(//.*)
      "\1    %%\2,\3(%\4,%\5,\6)\7 \\n"
      
      MEMOPMEM\((.*),(.*),(.*),(.*),(.*),(.*)\)
      "\1    %%\2,\3(%\4,%\5,\6)            \\n"
      
      TBR=braveyao@chromium.org
      Bug: libyuv:702
      Test: try bots pass
      Change-Id: Id8c6963d544d16e39bb6a9a0536babfb7f554b3a
      Reviewed-on: https://chromium-review.googlesource.com/865934Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
      b33e0f97
  4. 12 Jan, 2018 4 commits
    • Frank Barchard's avatar
      Remove VMEMOPREG x64 NaCL macros · a875ed17
      Frank Barchard authored
      VMEMOPREG macros are deprecated in row.h
      
      Usage examples
          VMEMOPREG(vpavgb,0x00,0,4,1,ymm0,ymm0)     // vpavgb (%0,%4,1),%%ymm0,%%ymm0
          VMEMOPREG(vpavgb,0x20,0,4,1,ymm1,ymm1)
      
      Regular expressions to remove MEMACCESS macros:
      
      VMEMOPREG\((.*),(.*),(.*),(.*),(.*),(.*),(.*)\)(.*)(//.*)
      "\1    \2(%\3,%\4,\5),%%\6,%%\7      \\n"
      
      VMEMOPREG\((.*),(.*),(.*),(.*),(.*),(.*),(.*)\)
      "\1    \2(%\3,%\4,\5),%%\6,%%\7            \\n"
      
      TBR=braveyao@chromium.org
      
      Bug: libyuv:702
      Test: try bots pass
      Change-Id: I472446606f7fd568fdf33aaacc22d5ed78673dab
      Reviewed-on: https://chromium-review.googlesource.com/865640Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      a875ed17
    • Frank Barchard's avatar
      Remove VEXTOPMEM x64 NaCL macros · 030042a2
      Frank Barchard authored
      VEXTOPMEM macros are deprecated in row.h
      
      Usage examples
          VEXTOPMEM(vextractf128,1,ymm0,0x0,1,2,1) // vextractf128 $1,%%ymm0,(%1,%2,1)
      
      Regular expressions to remove MEMACCESS macros:
      
      VEXTOPMEM\((.*),(.*),(.*),(.*),(.*),(.*),(.*)\)(.*//.*)
      "\1 $\2,%\3,\4(%\5,%\6,\7)        \\n"
      
      Bug: libyuv:702
      Test: try bots pass
      Change-Id: I177edf9813128408e74816672dd25abb03a5e1ca
      Reviewed-on: https://chromium-review.googlesource.com/865283Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      030042a2
    • Frank Barchard's avatar
      Remove MEMACCESS x64 NaCL macros · 5088f001
      Frank Barchard authored
      MEMACCESS macros are deprecated in row.h
      
      Usage examples
          "movdqu    " MEMACCESS(0) ",%%xmm0         \n"
          "movdqu    " MEMACCESS2(0x10,0) ",%%xmm1   \n"
      
      Regular expressions to remove MEMACCESS macros:
      
      " MEMACCESS2\((.*),(.*)\) "(.*)\\n"
      \1(%\2)\3              \\n"
      
      " MEMACCESS\((.*)\) "(.*)\\n"
      (%\1)\2            \\n"
      
      Bug: libyuv:702
      Test: try bots pass
      Change-Id: I42f62d5dede8ef2ea643e78c204371a7659d25e6
      Reviewed-on: https://chromium-review.googlesource.com/862803Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      5088f001
    • Frank Barchard's avatar
      Remove MEMOPARG x64 NaCL macros · e3797d17
      Frank Barchard authored
      MEMOPARG macros are deprecated in row.h
      
        #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n"
      
      Usage examples
          MEMOPARG(movzwl,0x00,1,3,1,k2)             //  movzwl  (%1,%3,1),%k2
      
      Regular expression to remove MEMACCESS macro:
      
      MEMOPARG\((.*),(.*),(.*),(.*),(.*),(.*)\)(.*//.*)
      "\1    \2(%\3,%\4,\5),%\6                \\n"
      
      Bug: libyuv:702
      Test: try bots pass
      Change-Id: I4a5ad2abf5017e651576f4c8c784be1c8dbf5a83
      Reviewed-on: https://chromium-review.googlesource.com/863108Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
      e3797d17
  5. 10 Jan, 2018 4 commits
  6. 09 Jan, 2018 1 commit
  7. 08 Jan, 2018 2 commits
  8. 07 Jan, 2018 1 commit
    • Frank Barchard's avatar
      H010ToAR30 optimized to 2 step conversion · 9d2cd6a3
      Frank Barchard authored
      Previously H010ToAR30 was done in a 3 step conversion:
      H010ToH420, H420ToARGB, ARGBToAR30.
      This CL merges the first 2 steps into H010ToARGB, to
      improve performance.
      Caveat - only 10 bit YUV is supported at this time.
      Previously the low level code supported different numbers
      of bits - 9, 10, 12 or 16.
      
      Was 3 step conversion:
      LibYUVConvertTest.H010ToAR30_Any (1263 ms)
      LibYUVConvertTest.H010ToAR30_Unaligned (951 ms)
      LibYUVConvertTest.H010ToAR30_Invert (913 ms)
      LibYUVConvertTest.H010ToAR30_Opt (901 ms)
      
      Now 2 step conversion:
      LibYUVConvertTest.H010ToAR30_Any (853 ms)
      LibYUVConvertTest.H010ToAR30_Unaligned (811 ms)
      LibYUVConvertTest.H010ToAR30_Invert (781 ms)
      LibYUVConvertTest.H010ToAR30_Opt (755 ms)
      
      Bug: libyuv:751
      Test: LibYUVConvertTest.H010ToAR30_Opt
      Change-Id: Ica7574040401cd57145a4827acdf3c0e58346a2a
      Reviewed-on: https://chromium-review.googlesource.com/853288Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
      Reviewed-by: 's avatarMiguel Casas <mcasas@chromium.org>
      9d2cd6a3
  9. 05 Jan, 2018 2 commits
  10. 04 Jan, 2018 1 commit
  11. 03 Jan, 2018 1 commit
  12. 02 Jan, 2018 4 commits
  13. 28 Dec, 2017 1 commit
  14. 21 Dec, 2017 2 commits
    • Frank Barchard's avatar
      HalfFloat_SSE2 use movd from memory · c67db605
      Frank Barchard authored
      pshufd requires 16 byte aligned memory or a register.
      Use movd to a register to avoid a segfault if memory for float
      is misaligned
      
      Bug: libyuv:759
      Test: 32 bit build of LibYUVPlanarTest.TestHalfFloatPlane_16bit_denormal
      Change-Id: I6fdcc4317453af5acd4700f9d46425bb2f4a205b
      Reviewed-on: https://chromium-review.googlesource.com/840459Reviewed-by: 's avatarMiguel Casas <mcasas@chromium.org>
      Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      c67db605
    • VladimirTechMan's avatar
      Allow enabling libyuv symbols visibility for shared library targets · 56eb5a47
      VladimirTechMan authored
      When developing WebRTC applications with custom video sources, libyuv's
      API is often the required part of the project. For that, application
      developers can link with a separate standalone instance of libyuv.
      However, it is even better to avoid that binary code duplication and
      link against libyuv as a part compiled into the WebRTC library.
      
      When building WebRTC as a static library target, the symbols from libyuv
      are normally accessible to the linker without any extra actions. When
      building WebRTC as a shared library, that does not work as the exported
      symbols are those marked as visible, while libyuv is built with the
      hidden visibility setting by default.
      
      This patch adds an extra flag to enable switching the symbol visibility
      to default when building shared library targets depending on libyuv in
      WebRTC and Chromium projects. By default the flag is not enabled,
      preserving the prior behaviour.
      
      Bug: NONE
      Change-Id: I48893cb9f54b1e1b49a34e14434e67f91d3e5e79
      Reviewed-on: https://chromium-review.googlesource.com/827746Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      56eb5a47
  15. 20 Dec, 2017 1 commit
  16. 19 Dec, 2017 1 commit
  17. 15 Dec, 2017 1 commit
  18. 14 Dec, 2017 1 commit
  19. 12 Dec, 2017 4 commits
    • Frank Barchard's avatar
      Add I420ToAR30 10 bit RGB · bb3180ae
      Frank Barchard authored
      For more complete support of AR30 format, add I420ToAR30 allowing
      the new RGB 10 bit format to be used from standard 8 bit I420 format.
      
      Bug: libyuv:751
      Test: I420ToAR30 unittest added
      Change-Id: Ia8b0857447408bd6adab485158ce5f38d6dc2faa
      Reviewed-on: https://chromium-review.googlesource.com/823243Reviewed-by: 's avatarWeiyong Yao <braveyao@chromium.org>
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      bb3180ae
    • Frank Barchard's avatar
      ARGBToAR30 SSSE3 use pmulhuw to replicate fields · c3677514
      Frank Barchard authored
      AR30 is optimized with 3 techniques
      1. pmulhuw is used to replicate 8 bits to 10 bits.
      2. Two channels are processed at a time.  R and B, and A and G.
      3. pshufb is used to shift and mask 2 channels of R and B
      
      Bug: libyuv:751
      Test: ARGBToAR30_Opt
      Change-Id: I4e62d6caa4df7d0ae80395fa911d3c922b6b897b
      Reviewed-on: https://chromium-review.googlesource.com/822520Reviewed-by: 's avatarrichard winterton <rrwinterton@gmail.com>
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      c3677514
    • Mirko Bonadei's avatar
      Using all_dependent_configs to pass libyuv_config around. · d94a4867
      Mirko Bonadei authored
      Using public_configs, client projects must rely on public_deps to
      propagate configurations up in the build graph. This is bad because
      public_deps allows the exposition of headers that live in another
      target. This can lead to a really unhealthy build.
      
      On the other side, all_dependent_configs is automatically propagated
      up in the build graph but if a target includes a libyuv header it is
      forced by GN to declare the dependency (and this will propagate
      libyuv_config).
      
      Bug: webrtc:8605, webrtc:8603
      Change-Id: I4d71bb5de0b5b62a4ec110349223614f0b98e655
      No-Try: True
      Reviewed-on: https://chromium-review.googlesource.com/822112
      Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
      Reviewed-by: 's avatarPatrik Höglund <phoglund@chromium.org>
      d94a4867
    • Frank Barchard's avatar
      ARGBToAR30 use vpmulhuw to replicate fields · 11dd1b95
      Frank Barchard authored
      AR30 is optimized with 3 techniques
      1. vpmulhuw is used to replicate 8 bits to 10 bits.
      2. Two channels are processed at a time.  R and B, and A and G.
      3. vpshufb is used to shift and mask 2 channels of R and B
      
      Red Blue
      With the 8 bit value in the upper bits, vpmulhuw by (1024+4) will produce a 10
      bit value in the low 10 bits of each 16 bit value. This is whats wanted for the
      blue channel. The red needs to be shifted 4 left, so multiply by (1024+4)*16 for
      red.
      
      Alpha Green
      Alpha and Green are already in the high bits so vpand can zero out the other
      bits, keeping just 2 upper bits of alpha and 8 bit green. The same multiplier
      could be used for Green - (1024+4) putting the 10 bit green in the lsb.  Alpha
      would be a simple multiplier to shift it into position.  It wants a gap of 10
      above the green.  Green is 10 bits, so there are 6 bits in the low short.  4
      more are needed, so a multiplier of 4 gets the 2 bits into the upper 16 bits,
      and then a shift of 4 is a multiply of 16, so (4*16) = 64.  Then shift the
      result left 10 to position the A and G channels.
      
      Bug: libyuv:751
      Test: ARGBToAR30_Opt
      Change-Id: Ie4f20dce18203bae7b75acb1fd5232db8a8a4f11
      Reviewed-on: https://chromium-review.googlesource.com/820046
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      Reviewed-by: 's avatarCheng Wang <wangcheng@google.com>
      11dd1b95
  20. 09 Dec, 2017 1 commit
  21. 08 Dec, 2017 1 commit
  22. 07 Dec, 2017 1 commit
  23. 05 Dec, 2017 1 commit
  24. 30 Nov, 2017 1 commit
  25. 28 Nov, 2017 1 commit
    • Frank Barchard's avatar
      Convert16To8Row_SSSE3 port from AVX2 · 324fa327
      Frank Barchard authored
      H010ToAR30 uses Convert16To8Row_SSSE3 to convert 10 bit YUV to 8 bit.
      Then standard YUV conversion can be used.  This improves performance
      on low end CPUs.
      Future CL will by pass this conversion allowing for 10 bit YUV source,
      but the function will be useful as a utility for YUV conversions.
      
      Bug: libyuv:559, libyuv:751
      Test: out/Release/libyuv_unittest --gtest_filter=*H010ToAR30* --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1 --libyuv_cpu_info=-1
      Change-Id: I9b3ef22d88a5fd861de4cf1900b4c6e8fd24d0af
      Reviewed-on: https://chromium-review.googlesource.com/792334
      Commit-Queue: Frank Barchard <fbarchard@chromium.org>
      Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
      324fa327