almondyoung / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Implement YUVToARGBScaleClip() for PepperMediaStreamVideoTrackHost::ConvertFromMediaVideoFrame() #471

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
https://code.google.com/p/chromium/codesearch#chromium/src/content/renderer/pepp
er/pepper_media_stream_video_track_host.cc&l=113

Only requires YV12, I420 no rotation -- using bilinear.

Should be covered by tests in:
https://code.google.com/p/chromium/codesearch#chromium/src/ppapi/tests/test_medi
a_stream_video_track.cc

Contact bbudge@ or other content/renderer/pepper/OWNERS for actual application 
usage.

Original issue reported on code.google.com by dalecurtis@chromium.org on 24 Jul 2015 at 9:36

GoogleCodeExporter commented 8 years ago
Need both RGBA and BGRA.

Original comment by dalecurtis@chromium.org on 24 Jul 2015 at 9:56

GoogleCodeExporter commented 8 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/libyuv/libyuv.git/+/60adcbaf323cfa6b7a2ea408f3c904341a1998c7

commit 60adcbaf323cfa6b7a2ea408f3c904341a1998c7
Author: Frank Barchard <fbarchard@google.com>
Date: Fri Nov 13 19:25:56 2015

scale with conversion using 2 steps with unittest

a prototype function to implement the yuv to rgb with conversion and scale.
replace with 1 step function in future version, using same API.

R=harryjin@google.com
BUG=libyuv:471

Review URL: https://codereview.chromium.org/1421553016 .

[modify] 
http://crrev.com/60adcbaf323cfa6b7a2ea408f3c904341a1998c7/README.chromium
[modify] 
http://crrev.com/60adcbaf323cfa6b7a2ea408f3c904341a1998c7/include/libyuv/scale_a
rgb.h
[modify] 
http://crrev.com/60adcbaf323cfa6b7a2ea408f3c904341a1998c7/include/libyuv/version
.h
[modify] 
http://crrev.com/60adcbaf323cfa6b7a2ea408f3c904341a1998c7/source/scale_argb.cc
[modify] 
http://crrev.com/60adcbaf323cfa6b7a2ea408f3c904341a1998c7/unit_test/scale_argb_t
est.cc

Original comment by bugdroid1@chromium.org on 13 Nov 2015 at 7:26

GoogleCodeExporter commented 8 years ago
LIBYUV_FLAGS=-1 LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=999 perf 
record out/Release/libyuv_unittest --gtest_filter=*YUVToRGBScale* && perf report

Samples: 15K of event 'cycles', Event count (approx.): 13708890586
 54.21%  libyuv_unittest  libyuv_unittest      [.] ScaleARGBFilterCols_SSSE3
 25.87%  libyuv_unittest  libyuv_unittest      [.] I422ToARGBRow_AVX2
 18.78%  libyuv_unittest  libyuv_unittest      [.] InterpolateRow_AVX2
  0.43%  libyuv_unittest  libyuv_unittest      [.] libyuv::YUVToARGBTestFilter(int, int, int, int, libyuv::FilterMode, int, int, int) [clone .isra.28] [clone .constprop.3
  0.27%  libyuv_unittest  [kernel.kallsyms]    [k] 0xffffffff8104f45a
  0.18%  libyuv_unittest  libyuv_unittest      [.] ScaleARGB
  0.11%  libyuv_unittest  libyuv_unittest      [.] I420ToARGBMatrix
  0.03%  libyuv_unittest  libc-2.19.so         [.] memset
  0.03%  libyuv_unittest  libc-2.19.so         [.] _int_malloc
  0.03%  libyuv_unittest  libc-2.19.so         [.] _int_free
  0.03%  libyuv_unittest  libc-2.19.so         [.] malloc
  0.01%  libyuv_unittest  libyuv_unittest      [.] testing::internal::UnitTestOptions::PatternMatchesString(char const*, char const*)
  0.01%  libyuv_unittest  libc-2.19.so         [.] free
  0.01%  libyuv_unittest  libyuv_unittest      [.] FixedDiv1_X86
  0.01%  libyuv_unittest  libyuv_unittest      [.] I420ToARGB
  0.00%  libyuv_unittest  libyuv_unittest      [.] testing::internal::UnitTestImpl::FilterTests(testing::internal::UnitTestImpl::ReactionToSharding)
  0.00%  libyuv_unittest  libstdc++.so.6.0.19  [.] std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)
  0.00%  libyuv_unittest  libc-2.19.so         [.] __strchr_sse2
  0.00%  libyuv_unittest  libstdc++.so.6.0.19  [.] std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostr
  0.00%  libyuv_unittest  libstdc++.so.6.0.19  [.] operator new(unsigned long)
  0.00%  libyuv_unittest  libyuv_unittest      [.] testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeL

Original comment by fbarch...@chromium.org on 14 Nov 2015 at 3:07

GoogleCodeExporter commented 8 years ago
LIBYUV_FLAGS=-1 LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=999 perf 
record out/Release/libyuv_unittest --gtest_filter=*YUVToRGBScale*
Note: Google Test filter = *YUVToRGBScale*
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from LibYUVScaleTest
[ RUN      ] LibYUVScaleTest.YUVToRGBScaleUp
[       OK ] LibYUVScaleTest.YUVToRGBScaleUp (2008 ms)
[ RUN      ] LibYUVScaleTest.YUVToRGBScaleDown
[       OK ] LibYUVScaleTest.YUVToRGBScaleDown (1782 ms)
[----------] 2 tests from LibYUVScaleTest (3791 ms total)

Original comment by fbarch...@chromium.org on 16 Nov 2015 at 10:05