Giter Site home page Giter Site logo

py_omxilc's Introduction

py_omxilc

This package defines a component class for writing OpenMAX IL client applications in Python 2.7.3 for the Raspberry Pi B/B+ board. It is mainly based on the file ilclient.c developed by Broadcom which defines an IL client side library. It is also based on the python module pyopenmax.py developed by Peter de Rivaz.

The component class omxComponent is defined in the main module omxilc.py. ctypes is used to call the core and component methods provided by the Broadcom C library libopenmaxil.so.

There are several other modules in the package. The majority of them are simply python converion of the OpenMAX IL standard C header files. omxerr.py and omxnames.py are supporting modules for omxilc.py. The converted headers are: omx_audio.py, omx_component.py, omx_core.py, omx_image.py, omx_index.py, omx_ivcommon.py, omx_other.py, omx_types.py, and omx_video.py. The module omxbcport.py defines all known port indices of the OpenMAX components in Broadcom VMCS-X release. The last module is included for reference and is not required for writing applications.

The module omxjpgdec.py is an application module. This module pairs an image_decode with a resize component to decode a JPEG image from a file to a specified color format and resize it to a specified dimension for display. Supported color formats are: 16bitRGB565, YUV420PackedPlanar and 32bitABGR8888.

There are two methods in the JPEG decoder module for setting up the components and converting a file. The first method sets up the components without the decoder-resizer tunnel before the decoder goes into state Executing. The alternate method is developed by Matt Ownby and Anthong Sale and used in their hello_jpeg demo program for the Raspberry Pi board.

There is a local variable _verbose in omxilc.py which enables the console printouts of statuses when it is set to True.

The JPEG decoder was run from the console with verbose off and 1 million continuous conversions of a single 1920x1080 JPEG file to 32-bit ABGR. The output image size is 1104x621. The total run time was 13h 51m 4s which amounts to 49.864 ms/frame or 20.055 frames/sec.

Copyright (c) 2014 Binh Bui

Redistribution and use in source and binary forms, with or without modification, are permitted.

This package requires the following C libraries:

  • libopenmaxil.so
  • libbcm_host.so

These libraries can be otained at: https://github.com/raspberrypi/firmware/tree/master/opt/vc/lib

py_omxilc's People

Contributors

bcbodin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.