Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Video optimization for android - Part I


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
  • Be the first to comment

  • Be the first to like this

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 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 | | 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 | | 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 | | Telephone:+972.545.313092