kiwifig / libyuv

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

Regression in libyuv::I420Psnr on Android ARM64 #502

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Get a WebRTC checkout using 'fetch webrtc'
2. Create a local branch and apply https://codereview.webrtc.org/1399453002:
git checkout master
git checkout -b test
git cl patch 1399453002
3. Compile for ARM64:
export GYP_CROSSCOMPILE=1
export GYP_DEFINES="OS=android target_arch=arm64 component=static_library 
dcheck_always_on=1 fastbuild=1"
gclient runhooks
ninja -C out/Release common_video_unittests_apk

4. Run common_video_unittests on Android with an ARM64 device, e.g. Nexus 9:
webrtc/build/android/test_runner.py gtest -s common_video_unittests --verbose 
--release 
--isolate_file_path=webrtc/common_video/common_video_unittests.isolate 
--gtest_filter=TestLibYuv.ConvertTest

What is the expected output? What do you see instead?

The test should pass. Instead if fails like this:

run_tests_on_device(HT4ADJT02469)  [ RUN      ] TestLibYuv.ConvertTest
I   24.629s run_tests_on_device(HT4ADJT02469)  
I   24.629s run_tests_on_device(HT4ADJT02469)  Convert #0 I420 <-> I420 
I   24.629s run_tests_on_device(HT4ADJT02469)  
I   24.629s run_tests_on_device(HT4ADJT02469)  Convert #1 I420 <-> RGB24
I   24.629s run_tests_on_device(HT4ADJT02469)  
../../webrtc/common_video/libyuv/libyuv_unittest.cc:181: Failure
I   24.629s run_tests_on_device(HT4ADJT02469)  Expected: (ceil(psnr)) > (44), 
actual: 15 vs 44
I   24.629s run_tests_on_device(HT4ADJT02469)  
I   24.629s run_tests_on_device(HT4ADJT02469)  Convert #2 I420 <-> UYVY
I   24.629s run_tests_on_device(HT4ADJT02469)  
I   24.629s run_tests_on_device(HT4ADJT02469)  Convert #3 I420 <-> YV12
I   24.629s run_tests_on_device(HT4ADJT02469)  
I   24.629s run_tests_on_device(HT4ADJT02469)  Convert #4 I420 <-> YUY2
I   24.629s run_tests_on_device(HT4ADJT02469)  
I   24.630s run_tests_on_device(HT4ADJT02469)  Convert #4 I420 <-> RGB565
I   24.630s run_tests_on_device(HT4ADJT02469)  
../../webrtc/common_video/libyuv/libyuv_unittest.cc:249: Failure
I   24.630s run_tests_on_device(HT4ADJT02469)  Expected: (ceil(psnr)) > (40), 
actual: 15 vs 40
I   24.630s run_tests_on_device(HT4ADJT02469)  
I   24.630s run_tests_on_device(HT4ADJT02469)  Convert #5 I420 <-> ARGB8888
I   24.630s run_tests_on_device(HT4ADJT02469)  
../../webrtc/common_video/libyuv/libyuv_unittest.cc:266: Failure
I   24.630s run_tests_on_device(HT4ADJT02469)  Expected: (ceil(psnr)) > (42), 
actual: 15 vs 42
I   24.630s run_tests_on_device(HT4ADJT02469)  [  FAILED  ] 
TestLibYuv.ConvertTest (35 ms)

(from 
http://build.chromium.org/p/tryserver.webrtc/builders/android_arm64_rel/builds/2
867/steps/common_video_unittests/logs/stdio)

I also reproduced with my local checkout using the instructions above.

What version of the product are you using? On what operating system?
Android ARM64

Please provide any additional information below.

I'm reverting the libyuv roll in Chrome 
https://codereview.chromium.org/1389233002 for now, to unblock WebRTC from 
rolling forward.

Original issue reported on code.google.com by kjellan...@google.com on 8 Oct 2015 at 5:51

GoogleCodeExporter commented 9 years ago
Instructions above didnt work on a new linux machine.  Looks like first step 
should be
1. fetch webrtc_android

but I did get the webrtc tests to run... without the patch, they pass.

Is it possible to adapt this to run libyuv_unittest?

Original comment by fbarch...@chromium.org on 10 Oct 2015 at 1:54

GoogleCodeExporter commented 9 years ago
The old code used hard coded constants for BT.601

// TODO(fbarchard): replace movi with constants from struct.
#define YUVTORGB_SETUP                                                         \
    "ld1r       {v24.8h}, [%[kUVBiasBGR]], #2  \n"                             \
    "ld1r       {v25.8h}, [%[kUVBiasBGR]], #2  \n"                             \
    "ld1r       {v26.8h}, [%[kUVBiasBGR]]      \n"                             \
    "ld1r       {v31.4s}, [%[kYToRgb]]         \n"                             \
    "movi       v27.8h, #128                   \n"                             \
    "movi       v28.8h, #102                   \n"                             \
    "movi       v29.8h, #25                    \n"                             \
    "movi       v30.8h, #52                    \n"

If I change back to that, the webrtc test passes.

Original comment by fbarch...@google.com on 11 Oct 2015 at 8:13

GoogleCodeExporter commented 9 years ago
fixed in r1507

I   21.805s TimeoutThread-1-for-run_tests_on_device(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/src/webrtc/src/third_party/android_tools/sdk/pl
atform-tools/ad
b -s HT4A2JT03762 shell '( pm clear org.chromium.native_test );echo %$?'
I   49.414s run_tests_on_device(HT4A2JT03762)  >>ScopedMainEntryLogger
I   49.414s run_tests_on_device(HT4A2JT03762)  Note: Google Test filter = 
TestLibYuv.ConvertTest
I   49.414s run_tests_on_device(HT4A2JT03762)  [==========] Running 1 test from 
1 test case.
I   49.414s run_tests_on_device(HT4A2JT03762)  [----------] Global test 
environment set-up.
I   49.414s run_tests_on_device(HT4A2JT03762)  [----------] 1 test from 
TestLibYuv
I   49.414s run_tests_on_device(HT4A2JT03762)  [ RUN      ] 
TestLibYuv.ConvertTest
I   49.415s run_tests_on_device(HT4A2JT03762)
I   49.415s run_tests_on_device(HT4A2JT03762)  Convert #0 I420 <-> I420
I   49.415s run_tests_on_device(HT4A2JT03762)
I   49.415s run_tests_on_device(HT4A2JT03762)  Convert #1 I420 <-> RGB24
I   49.415s run_tests_on_device(HT4A2JT03762)
I   49.415s run_tests_on_device(HT4A2JT03762)  Convert #2 I420 <-> UYVY
I   49.415s run_tests_on_device(HT4A2JT03762)
I   49.415s run_tests_on_device(HT4A2JT03762)  Convert #3 I420 <-> YV12
I   49.415s run_tests_on_device(HT4A2JT03762)
I   49.415s run_tests_on_device(HT4A2JT03762)  Convert #4 I420 <-> YUY2
I   49.415s run_tests_on_device(HT4A2JT03762)
I   49.415s run_tests_on_device(HT4A2JT03762)  Convert #4 I420 <-> RGB565
I   49.415s run_tests_on_device(HT4A2JT03762)
I   49.415s run_tests_on_device(HT4A2JT03762)  Convert #5 I420 <-> ARGB8888
I   49.415s run_tests_on_device(HT4A2JT03762)  [       OK ] 
TestLibYuv.ConvertTest (38 ms)
I   49.415s run_tests_on_device(HT4A2JT03762)  [----------] 1 test from 
TestLibYuv (38 ms total)
I   49.415s run_tests_on_device(HT4A2JT03762)
I   49.416s run_tests_on_device(HT4A2JT03762)  [----------] Global test 
environment tear-down
I   49.416s run_tests_on_device(HT4A2JT03762)  [==========] 1 test from 1 test 
case ran. (38 ms total)
I   49.416s run_tests_on_device(HT4A2JT03762)  [  PASSED  ] 1 test.
I   49.416s run_tests_on_device(HT4A2JT03762)
I   49.416s run_tests_on_device(HT4A2JT03762)  OK (1 tests)
I   49.416s run_tests_on_device(HT4A2JT03762)  Finished running tests on this 
device.
I   49.450s Main  FINISHED TRY #1/3
I   49.450s Main  All tests completed.
C   49.451s Main  
********************************************************************************
C   49.451s Main  Summary
C   49.451s Main  
********************************************************************************
C   49.451s Main  [==========] 1 test ran.
C   49.451s Main  [  PASSED  ] 1 test.
C   49.451s Main  
********************************************************************************

Original comment by fbarch...@chromium.org on 12 Oct 2015 at 7:13

GoogleCodeExporter commented 9 years ago

Original comment by fbarch...@chromium.org on 12 Oct 2015 at 9:42