Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

JPEG Viewer

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

JPEG decoding is often done on the DSP or accelerators (e.g. DM6446, DM355), but can also be done on ARM only devices (e.g. DM335). Here's an easy way to display JPEG pictures on an LCD using an ARM9.


Compiling fbida

The following instructions assume the use of Montavista Linux 4.0.1, RHEL4 Host and DM355 DVSDK. A similar procedure should also work for DM6446. It's easiest to do the following using TFTP/NFS.

  1. Download and untar (on your target file system) the fbida project from http://linux.bytesex.org/fbida/ - Look under the "releases" link, and then select fbida. The latest version will most likely work.
  2. Download and untar (on your target file system) libexif from http://libexif.sourceforge.net/
  3. Compile libexif via:
    1. target# cd /opt/libexif-x.x.x
    2. target# ./configure
    3. target# make
    4. target# make install
    5. Add the line /opt/libexif-x.x.x/lib (or the location of where your libexif lib are installed--they may show up in /usr/local/lib) to /etc/ld.so.conf followed by target# ldconfig
  4. Compile fbida via:
    1. target# cd /opt/fbida-x.xx
    2. target# make
      1. If you get an error like "-Wno-pointer-sign" unrecognized by compiler, edit the file fbida-x.xx/GNUMakefile and comment out the line CFLAGS += -Wno-pointer-sign by adding a "#" to the beginning of the line
      2. If you receive a timestamp error, set the date on your EVM by typing: target# date -s "MM/DD/YYYY HH:MM:SS. Verify the date is set by typing target# date
    3. target# make install


Setting up your Virtual Terminal

You could modify the source so you didn't have to do this step... or take a few minutes to do this:

  1. Enable the following two device drivers by typing: host# make menuconfig in LSP_dir/montavista/pro/devkit/lsp/ti-davinci
    1. Device Drivers -> Character Devices -> Support for console on virtual terminal
    2. Device Drivers -> Graphics Support -> Console display driver support -> Framebuffer Console support
  2. Set your PATH to include /opt/montavista/pro/devkit/arm/v5t_le/bin and /opt/montavista/pro/bin
  3. Rebuild the kernel via: host# make uImage and copy to /tftpboot
  4. Connect an LCD via composite cable and USB keyboard to the EVM
  5. Use standard TFTP/NFS bootargs as given in the Getting Started Guide, but remove "console=ttyS0,115200n8" and boot the EVM

Running fbida

For complete instructions, see the fbida documentation, but if you just want to see something work:

  1. Create a directory /opt/myjpeg and copy your favorite .jpg files to here
  2. target# fbi /opt/myjpeg/* -d /dev/fb/0 --edit
  3. To flip through the pictures, use pg-up and pg-down
  4. To rotate, use shift-r and shift-l

Enjoy your JPEG viewer!