2753536587 / libyuv

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

Crash with webrtc video test app #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run webrtc video test app on android

What is the expected output? What do you see instead?
I got crash, callstack is shown below. This happened with r204.

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 012aa028
Stack frame #00  pc 000cf982  
/data/data/org.webrtc.videoengineapp/lib/libwebrtc-video-demo-jni.so: Routine 
TransposeUVWx8_C in third_party/libyuv/source/rotate.cc:891
Stack frame #01  pc 000cfa74  
/data/data/org.webrtc.videoengineapp/lib/libwebrtc-video-demo-jni.so: Routine 
TransposeUV in third_party/libyuv/source/rotate.cc:924
Stack frame #02  pc 000cfac0  
/data/data/org.webrtc.videoengineapp/lib/libwebrtc-video-demo-jni.so: Routine 
RotateUV90 in third_party/libyuv/source/rotate.cc:981
Stack frame #03  pc 000cfc2a  
/data/data/org.webrtc.videoengineapp/lib/libwebrtc-video-demo-jni.so: Routine 
NV12ToI420Rotate in third_party/libyuv/source/rotate.cc:1140
Stack frame #04  pc 000cc4fe  
/data/data/org.webrtc.videoengineapp/lib/libwebrtc-video-demo-jni.so: Routine 
ConvertToI420 in third_party/libyuv/source/convert.cc:1770
Stack frame #05  pc 000ca1da  
/data/data/org.webrtc.videoengineapp/lib/libwebrtc-video-demo-jni.so: Routine 
ConvertToI420 in src/common_video/libyuv/libyuv.cc:293
Stack frame #06  pc 0005cb64  
/data/data/org.webrtc.videoengineapp/lib/libwebrtc-video-demo-jni.so: Routine 
IncomingFrame in src/modules/video_capture/main/source/video_capture_impl.cc:301
Stack frame #07  pc 0005d588  
/data/data/org.webrtc.videoengineapp/lib/libwebrtc-video-demo-jni.so: Routine 
ProvideCameraFrame in 
/usr/local/google/bin/android-ndk-r7/platforms/android-9/arch-arm/usr/include/jn
i.h:919

Original issue reported on code.google.com by leozw...@google.com on 23 Mar 2012 at 12:49

GoogleCodeExporter commented 9 years ago
When using rotation by 90 or 270, the caller should allocate a buffer that is 
HxW instead of WxH.
The source and destination are non-rotated landscape. ie
source rect may be 640x480
dest rect could be 640x360, making the format 16:9 aspect ratio.
The destination buffer is really 360x640, inferred from the rotation being 90 
or 270.
The destination stride should be 360 for Y and 180 for U and V planes.

FYI Also you shouldn't be using TransposeUVWx8_C - you should use NEON or SSE2. 
 Make sure you compile with rotate_neon.cc.neon
See Also
http://gitorious.org/0xdroid/development/blobs/93369c247069b116f39c30530287809f5
a190c22/ndk/apps/hello-neon/project/jni/Android.mk

Original comment by fbarch...@google.com on 23 Mar 2012 at 1:11

GoogleCodeExporter commented 9 years ago
Looks like this is the same issue as 18.
I'm pretty sure its confusion over the parameters to I420Rotate - a bug in 
webrtc not libyuv.

Original comment by fbarch...@google.com on 28 Mar 2012 at 11:58