Android NDK C++ Exceptions and RTTI Link Errors

Leave a comment

Android NDK C++ Exceptions and RTTI Link Errors

When using Android NDK to build performance-critical portions of Android apps in native C++ code, we may get C++ link errors such as:
undefined reference to `__cxa_end_cleanup’;
undefined reference to `__gxx_personality_v0′;
undefined reference to `vtable for __cxxabiv1::__si_class_type_info’;
undefined reference to `vtable for __cxxabiv1::__class_type_info’.
The first two errors are caused by no exceptions support in Android NDK toolchain, and the last two errors are caused by no RTTI support in the toolchain, according to the latest Android NDK release note STANDALONE-TOOLCHAIN.html under the docs directory. The documentation also mentioned any C++ STL (either STLport or the GNU libstdc++) with it are also not supported.

To get around the above linking errors, add compile flags
-fno-exceptions to disable exceptions
-fno-rtti to turn off RTTI


Qualcomm Demonstrates HEVC / H.265 Video Codec on Android Tablet

Leave a comment

At the Mobile World Congress 2012 show in Barcelona, Qualcomm, demonstrated a preliminary version of H.265 or HEVC, video on an Android tablet powered by Qualcomm Snapdragon, a current-generation S4 dual-core the processor running at 1.5GHz.

H.264 is today’s leader when it comes to mainstream video encoding technologies, but it will have to share the stage in 2013 with a successor called H.265 that can squeeze a video into nearly half the file size. H.264, also known as the Advanced Video Codec (AVC), defines how a video can be compressed for reduced storage requirements and – very importantly given the online video explosion – for streaming across networks. H.265, also called High Efficiency Video Codec (HEVC) , the uses new techniques to compress video even more.

The H.265 codec is likely to gain widespread support, but it and H.264 competes with a royalty-free alternative called VP8 that Google has released. Qualcomm competitor Nvidia has built VP8 decoding support into its newer Tegra 3 chips alongside H.264 support.

Qualcomm is bullish about the codec. If a given network capacity can sustain higher-quality video, that means mobile devices are better for entertainment. And because H.265 ‘s efficiencies come at the cost of a significantly higher need for processing power, mobile device makers have a new reason to buy the latest chips.

Qualcomm showed a software based encoded demo video, showing race cars peeling around a track, played at a bit rate of 610 kilobits per second on H.265 compared to 1,183 Kbps for H.264. The size of the video file itself was 3.10MB for H.265 vs 6.01MB for H.264. Each video had 800×480-pixel resolution. Qualcomm will build H.265 encoding into its chips, though it is not promised when or in which processor model.

Source CNET report

Barometers in Android Smartphone

1 Comment

Before we go into details of how a barometer in a Smartphone can be useful to the consumer, let us first understand what a barometer is. Typically it is said to be an instrument that evaluates atmospheric pressure. The reading thus got can be utilized to predict interim weather changes and also to get a fair idea of altitude.

The primary purpose of the barometer is (at least, I’ve been told) to make GPS lockons faster. Locking on to a GPS involves numerically solving a 4-dimensional set of linear equations — 3 dimensions in space, and time. (Yes, you get accurate time for free if you lock on to GPS.) Because of the way GPS works, this can take a few minutes. This goes much faster if you already have an estimate of your location. This is why “aGPS” (assisted GPS) services are so popular: by starting with a rough city-level coordinate fix through something like cell-tower network location, you can reduce the amount of math you have to do to lock on. This is where the barometer comes in. The 3 dimensions in space are latitude, longitude… and altitude. The barometer gives you a reasonable first-cut estimate for altitude. This gives you a bit of a leg up on one of the dimensions — especially combined with “2D” aGPS — which can help speed up lock-on in general. Now of course, the barometer can also be used for things like, well, determining atmospheric pressure (although I’m not sure it’s really weather grade.) But the main reason it’s in your phone is to help with GPS.

TI DM8168 HDVICP2 H.264 Encoder

Leave a comment

According to TMS320DM816x DaVinci Digital Media Processors Technical Reference Manual:

  • HDVICP2 in DM816x supports 1080p 60 fps h.264 encoder or dual 1080p 30 fps h.264 encoders, other video codec supports including:
  • H.264: BP/MP/HP Encode and Decode
  • H.264: Fast Profile/RCDO Encode and Decode
  • MPEG-4: SP/ASP Encode/Decode (No support for GMC)
  • DivX 5.x & higher Encode/Decode (No lower version; for example, 3.11 and 4.x)
  • H.263: Profile 0 and 3 for Decode, Profile 0 for Encode
  • Sorenson Spark: V0 and V1 Decode (No encode support)
  • MPEG-2 SP/MP Encode/Decode
  • MPEG-1 Encode/Decode
  • VC1/WMV9/RTV : SP/MP/AP Encode and Decode
  • ON2 VP6/VP7 Decode
  • RV 8/9/10 Decode
  • AVS 1.0 Encode and Decode
  • JPEG (also MJPEG) Baseline Encode/Decode
  • H264 Annex H (MVC)

The HDVICP2 subsystem is composed of:

  • A primary and a secondary sequencer: ICONT1 & ICONT2, which include its memories and an interrupt controller. Both these sequencers, ICONT1 and ICONT2, are identical.
  • A video DMA engine: vDMA
  • An entropy coder/decoder: ECD3
  • A motion compensation engine: MC3
  • A transform and quantization calculation engine: CALC3
  • A loop filter acceleration engine: iLF3
  • A motion estimation acceleration engine: iME3
  • An intraprediction estimation engine: iPE3
  • Shared level 2 (L2) interface and memory (of size 256 Kbytes)
  • Local interconnect
  • A message interface for communication between SyncBoxes
  • Mailbox
  • A debug module for trace event and software instrumentation: SMSET

Possibly it may also support 2048×2048 h.264 encoding (Level 5). However, currently the h.264 encoder is not ready yet in the HDVICP2 CODECS Product Download Page

Video Capability of TI OMAP 4 and 5


The last OMAP 4 is OMAP 4470, which is offering dual ARM Cortex-M3 CPU cores running at up to 1.8GHz. TI claimed that OMAP 4470’s overall graphics performance on the new SoC is 250 percent better than the OMAP4430 which runs in the RIM’s BlackBerry PlayBook tablet. The OMAP 4 uses the IVA 3 multimedia accelerator which supports:

Full HD 1080p30 multi-standard video encode/decode
Hardwired codecs deliver high performance at low power levels
Programmable DSP provides flexibility for future codecs VTC 1080p30
Provides support for high definition stereoscopic 3D encode/decode (OMAP4430: 720p, OMAP4460/4470: 1080p)
Ittiam demonstrated the OMAP 4 was capable of driving 4-way 720p video conferencing and high quality peer-to-peer 720p class HD video conferencing.
The OMAP 5 will have Quad-core, two high-powered CPU cores, up to 2GHz, and two lowly tickers, which are to carry out the mundane tasks to save on battery life. It will use the IVA 3 HD multimedia accelerator and supports
Full HD 1080p60 multi-standard video encode/decode
Hardwired codecs deliver high performance at low power levels
Programmable DSP provides flexibility for future codecs
Provides support for high definition stereoscopic 3D encode/decode at 1080p30
TI will also add some value for image processing, such as gesture recognition for commanding your device, as well as great DSP engines for photography. Special care is paid to the camera department in OMAP 5 as well, with built-in chips for what TI calls “computational photography”, using the powerful silicon to compensate for motion blur, camera shake, and bring about enhanced HDR, as well as real-time face recognition. Object and text recognition are also taken to the next level, which should bring along some promising augmented reality apps.

VGA output for BeagleBoard


I have been with beagleboard for 3 months now. Well, it only has a digital video output, so I cannot connect a normal vga (crt) monitor to it.

I started googling if there was a converter for the BeagleBoard….
I found something ‘vga-converter-for-beagleboard‘ but in stead I came accros this

Very simple circuit… this should do the trick. Why should it be complicated?

So, why are HDMI(DVI-D) to VGA converters to expensive?

This circuit that I’ve found is just a few resistors and two transistors. So, this circuit should costs about 5 dollars!!! Why are those converters a few hunderd dollars? (Okay, thet are connected to the DVI-D port, and this circuit goes to the LCD interface….)

So, I guess I should get some resistors, transistors and a soldering iron, much cheaper then a hdmi to vga converter or a new monitor…

Next Generation of ARM cores are interesting indeed

1 Comment

Pretty exciting news that the next generation of the of ARM cpus (A15) to arrive in early 2013 are being touted as having up to 16 cores, clock speeds of up to 2.5 GHz whilst using a similar amount of power as the current A9s (based in part on new fabrication techniques).

It is still a ARMv7-A Cortex architecture so hopefully all the software developed for the BeagleBoard and PandaBoards will happily exist on this new beast. So we are still dealing with a 32 bit processor with 40-bit memory address space.

Your current Pandaboard ships with a dual core A9 running at 1Ghz and this author is hoping since the codename is Eagle for the A15 will will see an “EagleBoard” or similar in late 2012 from TI. Maybe a “GrizzlyBoard” would better capture the grunt on offer.

TI has announced the OMAP 5 will use the A15s. Here is a great little summary of the capability:

Source ChannelRegister ARM

Older Entries