kleopatra999 / webm

Automatically exported from code.google.com/p/webm
0 stars 0 forks source link

set android-x86 default to --enable-realtime-only #873

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It takes the encoder a long time to process incoming buffers and cpu load is
very high ( around 90% ).

tested on samsung galaxy tab 3 10.1 x86 and dell venue 7

I am not sure if it is related but I am seeing this in the build log:

/tmp/vpx-conf-11237-32127.c:2:2: error: #error "not x32"
 #error "not x32"
  ^
  enabling runtime_cpu_detect
  enabling mmx
  enabling sse
  enabling sse2
  enabling sse3
  enabling ssse3

( arm devices work fine )

version 1.3.0 on android-x86 ( 4.2 and 4.3 )

I am using a libvpx in a gstreamer pipeline

Original issue reported on code.google.com by iddosho...@gmail.com on 27 Oct 2014 at 3:38

GoogleCodeExporter commented 9 years ago
The error appears to be related to an expectation on integer size. Presumably 
these are 32 and not 64 bit devices?

Is the optimized code getting built (it appears it is from the 'enabling' lines)

Is the runtime cpu detection working? Are the function calls to the assembly or 
to the C fallback routines?

Original comment by johannko...@google.com on 27 Oct 2014 at 7:53

GoogleCodeExporter commented 9 years ago
Yes, these are 32bit devices, and as far I know I am building for 32bit ( I 
attached the build log )

How can I check if the optimized code is getting built ? are there any logs 
indicating that at runtime ?

Same for runtime cpu detection and function calls, I do not know how to check 
that.

Original comment by iddosho...@gmail.com on 27 Oct 2014 at 9:23

Attachments:

GoogleCodeExporter commented 9 years ago
You could add print statements to vpx_ports/x86.h to see what processor 
features it detects. It looks like it tries to use 'cpuid' where on arm it 
parses /proc/cpuinfo.

Original comment by johannko...@google.com on 28 Oct 2014 at 8:28

GoogleCodeExporter commented 9 years ago

Original comment by johannko...@google.com on 29 Oct 2014 at 10:45

GoogleCodeExporter commented 9 years ago
x86_simd_caps() returns 0x1f , which means mmx was detected.
So I guess libvpx encoder is just slow on android-x86 devices ?

Original comment by iddosho...@gmail.com on 30 Oct 2014 at 4:57

GoogleCodeExporter commented 9 years ago
0x1f indicates MMX, SSE, SSE2, SSE3, and SSSE3 (which is good and expected) so 
I would expect the assembly to be running. Do you see the files in vp8/*/x86/ 
being built when your run ndk-build?

Original comment by johannko...@google.com on 30 Oct 2014 at 5:00

GoogleCodeExporter commented 9 years ago
I am using cerbero build system in gstreamer and attached is the compile log

Original comment by iddosho...@gmail.com on 30 Oct 2014 at 9:13

Attachments:

GoogleCodeExporter commented 9 years ago
Unfortunately I'm not familiar with cerbero but the compile log does show the 
optimized files being built. Between the cpuid info and the build log, it 
should be running the optimized code.

How are you configuring the codec instances? I believe the arm build defaults 
to "realtime-only" while the x86 build may not. You really want to be using a 
realtime-only build or be specifying realtime only and a reasonable cpu-used 
during configuration. You can look at how WebRTC sets up the codec:
https://code.google.com/p/webrtc/source/browse/trunk/webrtc/modules/video_coding
/codecs/vp8/vp8_impl.cc

Original comment by johannko...@google.com on 31 Oct 2014 at 9:10

GoogleCodeExporter commented 9 years ago
setting VPX_DL_REALTIME in the encoder solved my issue, I guess you were right 
and the defaults in arm are different than x86.

Original comment by iddosho...@gmail.com on 2 Nov 2014 at 8:34

GoogleCodeExporter commented 9 years ago
OK, we may be interested in defaulting to similar settings across android 
targets.

Original comment by johannko...@google.com on 3 Nov 2014 at 4:32

GoogleCodeExporter commented 9 years ago

Original comment by johannko...@google.com on 6 Nov 2014 at 12:52