Cube B33HD Review Part 2: A look at a Chinese Portable Media Player

Note: Please read part 1 if you haven’t.

As I’ve mentioned, Cube is one of the popular Chinese media player brands. Here is a short review of the B33HD. If you are in a hurry, be sure to check the video review (scroll below).

Build, Accessories

The player itself looks very sleek, and more expensive than any $69 player out there for sure. As I read somewhere, this model is definitely ‘inexpensive, but not cheap’. The unit has a nice weight to it, and its dimensions are perfect for holding and operating with one hand. However, both the front and back are absolute fingerprint magnets. The player comes with a protective cover on both sides though.

This is the box the player came in. Garish, to say the least:

The bundled accessories are fairly minimal: USB cable, earphones (better than usual bundled crappy earphones, but not good either, and somewhat uncomfortable) and a Chinese only manual. I also got a very nice free pouch with the player from HouseOfDap.

Interface

This is a button operated player. A wheel-like rocker is the primary navigation key. Move it up/down and press it inside to select a particular item. There are buttons for Volume-Up/Down, Play/Pause on the top. Slots exist for HDMI output, TF card, earphones, DC charger, USB cable (charging and OTG) and microphone input.

Here’s the home screen. Pretty well laid out, with the main items on the left.

Navigation across these items is via a rocker on the right (not visible in this picture).

Playback

All right, the main course. I’ve bought this player for watching movies, and I’m glad to say that this player does not disappoint in this aspect. The screen is ultra sharp (hard to imagine unless you’ve seen 800x480 pixels crammed into a 3.6″ screen) and as a result, videos are a treat to watch on this player. It has played all my standard definition movie rips without any hiccup. However, I must mention here that if most of your videos are 720p or higher, you should not consider this player (take a look at any with the SoChip 9800 processor instead, such as the Ainol V9000HDA or the Cube H900HD). I’ve seen frame drops on 720p WMV files that I’ve tried.

See the video below for more on this.

Music playback is decent on this player. By the way, sound quality itself is pretty good (be it on movies or music clips). However, the music player interface is not jazzy. If you’re used to the iTouch’s interface, you’ll be disappointed. This player does read ID3 tags and organizes your music files accordingly though.

Negatives

All right, no review is honest without a list of negatives. Here’s my list:

  • As with most such Chinese players, the UI is fairly basic -- looks outdated beside the iTouch/ZuneHD interface
  • The screen is brilliant, but suffers from some backlight bleeding in my piece. If you see the video review or the pic above, you’ll see a slight backlight bleed on the left edge of the screen especially when the scene is dark. Not a deal breaker, but the screen would be a perfect ten without this
  • The battery -- would be great if it had juice worth at least 6 hours of video playback (currently around 4 hours)
  • Uneven capitalization in menu items’ captions -- little things that leave a bad taste

I’ve uploaded a short video review of the player:

Conclusion

At the end of the day, I’m very satisfied with the player since my primary necessity is video playback. The sheer value for money is also outstanding (costs Rs 15,000 lesser than an iTouch, yet plays movies better). Hence, I’d highly recommend this player to anyone looking for a budget portable video player.

If you’re budget is slightly higher ($100-$150), there are some amazing options. The best place to start researching about them would be the MP4Nation and HouseOfDap forums.

~Raj

Cube B33HD Review Part 1: A look at a Chinese Portable Media Player

About a couple of months back, I was contemplating on purchasing an Apple iPod Touch (3rd Generation). Truly a kickass media player, and much much more – unbelievable multi-touch interface, excellent WiFi browsing on Safari, billions of apps, and so on. However, some of it’s ‘features’ put me off:

  • Cannot play most video formats without conversion to its supported formats
  • Costs an astounding Rs.18,400 ($386) for the 32GB version in India (costs $275 in US)
  • iTunes – Voted BloatWare Winner years in succession by experts

The primary reason I wanted the iTouch is to use it as a personal video player (I already have the excellent Sansa Clip for my audio playback needs). And that is where it falls woefully short. I wouldn’t mind converting, if that didn’t take more than an hour for each movie.

Hence I started the hunt. I zeroed in on the acclaimed Cowon S9 ($199 for 16GB) which has a supposedly brilliant 3.3″ AMOLED screen or the Microsoft Zune HD. Truth be told, neither of these are primarily meant for video, and hence I wasn’t really too keen on going for either of them after reading up and seeing them in action in reviews. This is when I discovered the world of…

Drumroll…

Chinese Media Players!

Now, the first image that usually comes to mind upon hearing the word “Chinese” for a gadget is that of a cheap Apple iPod knockoff, or a mobile phone that doesn’t serve as a dishwasher, but does pretty much everything else for a very cheap price. And if you go to any local electronics bazaar in India, it’s easy to see why this is true.

I admit, I had heard of brands such as Meizu before. However, I had no idea of even the existence of the so-called Chinese PMP market before my chance visit to MP4Nation and HouseOfDap. Both have excellent forums (MP4Nation forum, HOD Forum) with some really helpful people. I quickly discovered the merits of these media players:

  • Ability to play AVI (XVid, DivX), VOB, MKV, WMV, FLV (and most commonly used formats) out of the box
  • Support for videos up to 720p or even 1080p
  • Supports subtitles (in SRT, SUB etc formats) in videos. Yaay!
  • Plays files directly from a portable hard drive or a USB pen-drive
  • Costs from USD 50 to USD 150
  • Screen sizes ranging from 3″ to a mammoth 8.9″ (4.3″ is the most common)
  • Screen resolutions are typically 800×480 (iTouch is 480×320)

A little background on these devices. There are a lot of media player brands in China: Ainol, Cube, Onda, Ramos and Teclast are among the popular ones. The software or user interface they use aren’t nearly as slick as the ones on Zune/iTouch but do get the job done. However, their strength lies in the hardware. The main processors they use are, of late, amazingly capable. Almost any video of any resolution is a piece of cake for processors such as the SoChip 9800, or the Telechips TCC8901 for example.

I finally decided upon the Cube B33HD. A cheap player ($69 – a little over Rs3000 at current PayPal exchange rates), it features:

  • SoChip 8600 processor – capable of upto 720p (not the very latest, but enough for my standard movie rips)
  • A very nice 800×480 resolution screen, 3.6″ diagonal size (slightly larger than the iTouch, but not touchscreen)
  • Supports most of the standard video formats, along with support for subtitles (important for me)
  • HDMI output (watch on TV directly), USB OTG support

The next part of this review focuses on this player. For now, here’s a pic. Continue reading…


Cube B33HD Image

Continue to part 2…

~Raj

Programming for multicore: An introduction to OpenMP using GCC-4.4

About a couple of months back, I happened to attend a short seminar on multi-core programming by Intel here at Hyderabad. What I liked immensely about it was that it was not yet another blatant advertising campaign on some hardware or software product by some industry giant.

It was about the paradigm shift that the chip industry is undergoing – the trend towards more cores, rather than higher gigahertz horsepower. However, if you are an average Joe developer like me, you probably program your applications without leveraging the power of two or more cores simultaneously. By default, we don’t ‘think parallel’ for various reasons. For one, threading is not an easy concept. The seminar looked at some of Intel’s software offerings that help developers (especially Visual Studio developers) to create, debug and optimize threaded/multicore applications. (However, this post will not focus on those tools – you may want to visit www.intel.com/go/parallel for more information).

On a related thread (pun intended!), gcc-4.4.0 was released recently. This added support for version 3.0 of the OpenMP specification. OpenMP is something I had heard of before, but never actually tried. It is an API for C, C++ and Fortran programmers that enables you to ‘parallel program’ easily. Jargonspeak calls it ‘platform independent shared memory multiprocessing’. In effect, it’s threads without the associated headache of thread management. By the way, gcc has supported OpenMP way back from version 4.2. So, you don’t need the latest bleeding edge version for this. However, should you want to, on Windows you can always download the excellent TDM MingW builds for gcc-4.4.0 (latest direct link). If you’re a Linux geek, you probably know how to get gcc-4.4 for your distro anyway. Also, Microsoft Visual C++ Express does not include/support OpenMP – hence my experiments are limited to gcc on both Win and Lin.

All right then, let’s see how OpenMP aids a classic case of parallelization: matrix multiplication. Agreed – this is a rather simple programming problem, and real world problems are usually harder to parallelize than this. However, this should serve as a good starting point to explore further.

So, here’s the basic matrix multiplication loop that we want to parallelize, assuming arr1 and arr2 are inputs, and arr3 is the output array:


for(i=0; i<n; ++i) {
  for(j=0; j<n; ++j) {
    temp = 0;
    for(k=0; k<n; ++k) {
      temp += arr1[i][k] * arr2[k][j];
    }
    arr3[i][j] = temp;
  }
}

OpenMP is mostly a set of compiler directives (pragmas) and library routines. In this case, it's enough for us to add on single statement before our loop.


#pragma omp parallel for private(i, j, k, temp)
for(i=0; i<n; ++i) {
  for(j=0; j<n; ++j) {
    temp = 0;
    for(k=0; k<n; ++k) {
      temp += arr1[i][k] * arr2[k][j];
    }
    arr3[i][j] = temp;
  }
}

That’s it! This pragma tells the OpenMP subsystem to do it’s little magic behind the scenes and parallelize the ‘for loop’ following it.

Here’s the complete program, which contains additional code to initialize the arrays arr1 and arr2 pseudo-randomly, and to calculate the timings taken by the normal and the parallelized versions. You can compile the program with gcc-4.4 by the simple command:

gcc -fopenmp matmul.c

And on Windows, you might need to edit the PATH variable to include the GNU libgomp runtime (libgomp-1.dll). (Libgomp is GNU’s implementation of OpenMP). Here’s how I did it, for example:

set PATH=D:\MinGW\lib\gcc\mingw32\bin;%PATH%

So, the end result? Here are 4 sets of execution outputs. Two from Windows (TDM gcc-4.4.0):

Enter dimension ('N' for 'NxN' matrix) (100-2000): 1000
Populating array with random values...
Completed array init.
Crunching without OMP... took 23.032000 seconds.
Crunching with OMP... took 13.000000 seconds.

Enter dimension ('N' for 'NxN' matrix) (100-2000): 2000
Populating array with random values...
Completed array init.
Crunching without OMP... took 216.140000 seconds.
Crunching with OMP... took 118.641000 seconds.

And two from Linux (Ubuntu 9.04, gcc-4.3.3):

Enter dimension ('N' for 'NxN' matrix) (100-2000): 1000
Populating array with random values...
Completed array init.
Crunching without OMP... took 21.623144 seconds.
Crunching with OMP... took 13.686926 seconds.

Enter dimension ('N' for 'NxN' matrix) (100-2000): 2000
Populating array with random values...
Completed array init.
Crunching without OMP... took 189.184673 seconds.
Crunching with OMP... took 104.220751 seconds.

That’s almost doubling the speed, while adding one statement to your program! Actually two statements, if you include the include directive for <omp.h>. I’m sure you’d agree that for this case, OpenMP provides a really easy way of utilizing the idle core of most desktop machines out there. The good part is, even on a single core machine, the code works the way it should (the pragmas essentially NOP out, since there’d be no benefit in parallelizing on one core).

A look at the CPU utilization proves to be interesting too. (By the way, my home system runs an AMD Althon64 X2 4600 dual core, at a clock speed of 2.4GHz). In the first case, here’s a snap of the system information (using the excellent Process Explorer). Notice how the CPU usage remains peaked at around 50%, and the second CPU is mostly idle. Please click on the images below for the full view.

1

And here’s the usage when the OpenMP crunching is in action:

2

That’s more like it. Both horses in action, CPU peaked at 100%. Similar stuff can be seen on Linux, using Ubuntu’s (rather, GNOME’s) inbuilt System Monitor:

ubuntu sm

The portion where the red and orange worms collide at the top is the duration of the OpenMP version of the matrix multiplication program.

As already stated, matrix multiplication is an ideal case – and such 2x speedup on dual core machines are possible with only such ideal problems. However, there often are, if you look closely enough, parts of your program that can be parallelized. Further, we have not even scratched the surface of what’s possible using OpenMP 3.0. It goes way beyond parallelizing simple for loops. (Here’s the link to the spec in PDF).

And for sure, OpenMP is not the only way to go parallel portably. If you work in C++, you would have heard of the Boost C++ libraries. Give boost::threads a go!

With Intel gearing up for the release of its eight core Nehalem EX processors, and with AMD’s six core Istanbul processor already finding its way into mainstream desktop boards, there remains only one thing to say: if there is a time to think in parallel, this is it!

~Raj

Using Qt 4.4 opensource with Microsoft Visual C++ Express 2008

Qt from Trolltech is widely acknowledged as one of the best cross-platform GUI toolkits available. However, installing the Qt open source edition on Windows is not as effortless as “sudo apt-get install qt” on Ubuntu or other Linux flavors. It’s not that hard either, and this post shows you how to develop using the freely available Microsoft Visual C++ 2008 Express as our IDE.

1. I’m assuming you have MSVC 2008 Express already installed. If not, download the offline install ISO from here, mount it (using Daemon Tools for example), and launch the installer from the virtual drive.  Next, download the Windows open source version of Qt from here.

2. Now, you can either extract the Qt source package to a folder where you want it to be installed, or you might want to extract it to a temporary location, and install only the final files to your install directory. Doing the latter of course makes more sense. Except that it is NOT recommended for Windows. I have faced quite a few problems (which I will detail further down the line). Bottom line is – if you have no problems sparing about 1G for Qt, then choose the former approach.

Open up the “Visual Studio 2008 Command Prompt” (available in the “Tools” sub-menu in your Visual C++ start menu entry). For the former approach, issue the following command:

configure

If you want a separate install directory (let’s say in D:\Qt-4.4.3), use the ‘prefix’ flag in this manner:

configure -prefix "D:\Qt-4.4.3"

3. Depending on your system, this takes a quite a while. Oh, and if you face an error like this, fear not:

copy qmake.exe P:\qt-win-opensource-src-4.4.3\bin\qmake.exe
        1 file(s) copied.
Creating makefiles in src...
Generating Visual Studio project files...
Could not find mkspecs for your QMAKESPEC(win32-msvc2008)
after trying:
        D:\Qt-4.4.3\mkspecs
Error processing project file:
P:/qt-win-opensource-src-4.4.3/projects.pro
Qmake failed, return code 3

This is the first of a few problems that crop up when you use a custom install location (i.e. the latter approach). Just copy the “mkspecs” folder from your source directory tree over to your install directory and re-run the configure program.

4. Once ‘configure’ completes, run ‘nmake’. This takes a really long time. If you chose to have a separate install location, run ‘nmake install’ once this completes.

5. Another problem of a separate install directory is that the Makefile forgets to copy the MANIFEST files. So, if at this stage you try to start “designer.exe” from your install/bin folder, you may get an error saying that the application failed to start because MSVCP90.dll was not found.

To fix this, copy over all the “.manifest” files from your source “bin” and “lib” directories over to the install folder’s “bin” and “lib” directories. At this point, you should be able to run Qt-Designer, Qt-Assistant etc from your bin directory.

6. Let us set up a couple of environment variables that make life easier for us. To edit environment variables, you need to right click “My Computer > Properties > Advanced > Environment Variables”. Add a new variable QTDIR pointing to your Qt install directory, and edit your PATH to include Qt’s “bin” directory as follows:

Setting QTDIR

Adding to PATH

 

7. Now let’s try to get Qt’s “Hello World” tutorial program running from the command line. Fire up the Visual Studio Command Prompt, and create a file “Hello.cpp” containing the following code in a new directory called “hello”:


#include "QApplication"
#include "QPushButton"

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QPushButton hello("Hello world");
    hello.resize(100, 30);

    hello.show();
    return app.exec();
}

Now, type the following commands in this new folder:

qmake -project
qmake hello.pro
nmake

This should create an executable “hello.exe”, which you should be able to execute to see your first GUI program using Qt-4.4 and MSVC 2008.

7. I would suggest working from the command prompt, but should you wish to use the Visual Studio Express IDE, here’s what you should do.

Fire it up, and go to “Tools > Options > Projects and Solutions > VC++ Directories”. Add “$(QTDIR)\include” to the “Include files”, and “$(QTDIR)\lib” to the “Library files” drop-down lists respectively.

8. Create a new project (“File > New > Project > General > Makefile Project”) named “HelloQt”.

Go to “Project > Properties > Configuration Properties > Nmake” and enter the following in the build command line “qmake -project && qmake && nmake release-all”. Also enter “release\HelloQt.exe” in the “Output” field. (You may enter corresponding debug versions here as well).

Right click “Source Files” in the “Solution Explorer” and create a new file “HelloQt.cpp”. Copy paste the above program into it.

Run your program using “Ctrl+F5″. You should see this:


Sample Qt 4.4 program running inside Microsoft Visual C++ Express 2008

So there you have it. A crash HOWTO on developing Qt-4.4 programs using Visual Studio 2008 express. Feel free do comment on any problems you may have faced.

~Raj

Ring in the new

Ring out the old, ring in the new,
Ring, happy bells, across the snow:
The year is going, let him go;
Ring out the false, ring in the true.

- Tennyson (“Ring Out, Wild Bells”)

May 2009 be the year that you and I have been waiting for. And the year that ushers in peace in India and the world. And the year of the Linux desktop!

Cheers to a new beginning. Sweets on your desk, true Bong style :-)

 sweets

PS: Did you spot the typo in the box above?

~Raj