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

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

2 Comments

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.

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

ARM Cross Compilation

1 Comment

Building an ARM GCC Toolchain from Source

This article will explain how to build a cross compiling toolchain for the ARM platform and how to cross compile various programs and libraries.

Before I go ahead and build the toolchain for arm from scratch, I just wanted to introduce some of the precompiled GNU GCC toolchains available for ARM such as CodeSourcery G++ Lite or Yagarto, using a precompiled toolchain leaves you at the mercy of someone else’s whims and fancies about what features to include, what libraries to use, etc.  Depending on precompiled toolchains also means that you’re depending on their authors to regularly update them when new releases of GCC become available. More

BeagleBoard

Leave a comment

BeagleBoard Gives New Power to Open Source Gadgets

Open source hardware hobbyists now have a chipset to play with that’s comparable to the powerful processors found in smartphones.

“The USB-powered Beagle Board is a low-cost, fan-less single board computer that unleashes laptop-like performance and expandability without the bulk, expense, or noise of typical desktop machines.”

Above is the description of the beagleboard as written on their website. It is a really small piece of hardware (about 7.6 cm) and can be extended with other (USB) hardware. Just like the Dream it also uses an ARM processor.

Texas Instruments has released a new version of its low-power, single-board computer called BeagleBoard-xM. It’s based on the same 1-GHz ARM Cortex A8 processor that drives the most sophisticated smartphones today. That gives it far more processing power than the leading open-source microcontroller platform, Arduino, which many hobbyists currently use to create robots, sensors, toys and other DIY devices. More