Intro to Android Video OptimizationOverviewThis short summary is intended for C/C++ developers which haven’t worked withAn...
Basic JNI compilationGoal: Understand JNI and how to work with native C++ code.Task: Compile and run a simple native appli...
Working with SDCardPrepare a RAW YUV video which is used to test the algorithm.Copy the YUV input file to the SDCard using...
Upcoming SlideShare
Loading in …5
×

Video optimization for android - Part I

2,164 views

Published on

Introduction to video optimization on Android for Android Newbies.
How to Install Android development tools, use ADB OpenCV and so on.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,164
On SlideShare
0
From Embeds
0
Number of Embeds
29
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Video optimization for android - Part I

  1. 1. Intro to Android Video OptimizationOverviewThis short summary is intended for C/C++ developers which haven’t worked withAndroid before and would like to use Android for Signal, Image and Video processingApplications. Read ALL the instruction page before starting installationsEnvironment SetupGoal: Understand how to use the Android development tools and Eclipse IDE.Task: Install the tools and run an SDK sample from this list.Choose a development OS (Windows / Linux /MAC) All builds and development shouldbe done on this OS.Instructions for installation in http://developer.android.com/sdk/index.html downloadboth SDK and NDK (include installation of Eclipse, ADT and Phone USB driver).Detailed instructions in the presentation.Alternatively try performing installation according to OpenCV instructions below.Working with ADBGoal: Understand how to work with the ADB.Task: Check the device is connected, pull and push files to/from the device and resetthe device.ADB is the Android Debug Bridge, it assist developers in connecting and controlling thedevice.More on ADB commands in this wiki. 20 Giborey Israel, Sappir Industrial Park, Netanya, Israel | www.mobilevideotech.com e-mail:info@dsp-ip.com | Telephone:+972.545.313092
  2. 2. Basic JNI compilationGoal: Understand JNI and how to work with native C++ code.Task: Compile and run a simple native application from the NDK samples, like the“Hello-JNI”. Building NDK samples requires separate compilation of the C/C++ part andthe Java part. Understand the JNI mechanism.Working with CameraGoal: Understand how to work with the camera.Task: Compile Run and understand “Sample 0”Understand how to work with the camera try OpenCV samples for AndroidRead more at OpenCV Android Pages . OpenCV Android samples are run with C++ API while FastCV uses C APIOptimization for ARMGoal: Understand optimization options for AndroidThere are several methods to optimize code for ARM: 1. Using already optimized functions distributed by SoC vendors, for example: FastCV. More on FastCV Optimization in this slide. 2. Proprietary functions which don’t appear in such libraries require optimization for VFU / NEON.Task: earn more about NEON optimization review the “Hello-NEON” NDK sample. 20 Giborey Israel, Sappir Industrial Park, Netanya, Israel | www.mobilevideotech.com e-mail:info@dsp-ip.com | Telephone:+972.545.313092
  3. 3. Working with SDCardPrepare a RAW YUV video which is used to test the algorithm.Copy the YUV input file to the SDCard using:adb push <FileName.YUV> </SDCard/Path>Get the output file from the device using:adb pull “<Path>/<RawYUVOutFileName.yuv>” .Use standard file operations to read frames from the file and pass them to image/videoprocessing mechanism:FILE* MyInFile;FILE* MyOutFile;MyFile = fopen(“<Path>/<RawYUVInFileName.yuv>”, “rb”);MyFile = fopen(“<Path>/<RawYUVOutFileName.yuv>”, “wb”);Use standard fread / fwrite commands to manipulate the file 20 Giborey Israel, Sappir Industrial Park, Netanya, Israel | www.mobilevideotech.com e-mail:info@dsp-ip.com | Telephone:+972.545.313092

×