MHEG5  18.9.0
MHEG5 Documentation
Classes | Macros | Typedefs | Functions
decoder.h File Reference

The functions in this file are OPTIONALLY provided by Receiver Platform *. More...

#include "techtype.h"

Go to the source code of this file.

Classes

struct  s_image
 

Macros

#define HAS_TRANSPARENCY   0x00
 
#define COMPLETELY_OPAQUE   0x01
 
#define PIX_BYTES_PLT   1
 
#define PIX_BYTES_RGB   3
 
#define PIX_BYTES_ARGB   4
 
#define SD_METRIC_RESOLUTION   2835
 
#define HD_720_METRIC_RESOLUTION   3543
 
#define HD_1080_METRIC_RESOLUTION   5315
 

Typedefs

typedef struct s_image S_IMAGE
 

Functions

S_IMAGEDEC_DecodePng (U8BIT *data, U32BIT size)
 Allocate memory for PNG and decode bitmap To free "S_IMAGE" memory, DEC_FreePng will be called. More...
 
void DEC_FreePng (S_IMAGE *image)
 Free memory allocated for PNG bitmap. More...
 
S_IMAGEDEC_DecodeJpg (U8BIT *data, U32BIT size)
 Allocate memory for JPEG and decode bitmap To free "S_IMAGE" memory, DEC_FreeJpg will be called. More...
 
void DEC_FreeJpg (S_IMAGE *image)
 Free memory allocated for JPEG bitmap. More...
 
void * DEC_OSDCreateBmpSurf (U32BIT s_width, U32BIT s_height, U32BIT i_width, U32BIT i_height, S_IMAGE *image, U32BIT *pitch)
 This creates a hardware surface of size using STB_OSDMhegCreateSurface() with s_width and s_height, and fills the surface with the IMAGE data. The bitmap must be stretched or shrunk onto surface with image size (i_width,i_height) When surface size is greater than image size, then the bitmap is 'tiled' to fill the surface. Otherwise sizes will be equal. Implementations may choose to ignore requested surface size and leave MHEG5 to do the tiling (where graphic memory is limited). If so, 'tiled' should be set to FALSE, and use (i_width,i_height) for surface size. Colour format of resulting surface is as used in the call to MHEG5_Open() with 'ColourDepth' in setup config. More...
 

Detailed Description

The functions in this file are OPTIONALLY provided by Receiver Platform *.

Date
30/04/2008
Author
Adam Sturtridge

Definition in file decoder.h.

Macro Definition Documentation

#define COMPLETELY_OPAQUE   0x01

Definition at line 31 of file decoder.h.

#define HAS_TRANSPARENCY   0x00

Definition at line 30 of file decoder.h.

#define HD_1080_METRIC_RESOLUTION   5315

Definition at line 39 of file decoder.h.

#define HD_720_METRIC_RESOLUTION   3543

Definition at line 38 of file decoder.h.

#define PIX_BYTES_ARGB   4

Definition at line 35 of file decoder.h.

#define PIX_BYTES_PLT   1

Definition at line 33 of file decoder.h.

#define PIX_BYTES_RGB   3

Definition at line 34 of file decoder.h.

#define SD_METRIC_RESOLUTION   2835

Definition at line 37 of file decoder.h.

Typedef Documentation

typedef struct s_image S_IMAGE

Function Documentation

S_IMAGE* DEC_DecodeJpg ( U8BIT data,
U32BIT  len 
)

Allocate memory for JPEG and decode bitmap To free "S_IMAGE" memory, DEC_FreeJpg will be called.

Parameters
dataJPEG data object
sizeSize of JPEG data in bytes.
Returns
S_IMAGE* The decoded bitmap

Allocate memory for JPEG and decode bitmap To free "S_IMAGE" memory, DEC_FreeJpg will be called.

Parameters
void* data JPG data. int len Length of data for JPG.
Returns
void * The decoded bitmap.
Warning
Bug:

Definition at line 324 of file mg_jpg.c.

S_IMAGE* DEC_DecodePng ( U8BIT data,
U32BIT  len 
)

Allocate memory for PNG and decode bitmap To free "S_IMAGE" memory, DEC_FreePng will be called.

Parameters
dataPNG data object
sizeSize of PNG data in bytes.
Returns
S_IMAGE* The decoded bitmap

Allocate memory for PNG and decode bitmap To free "S_IMAGE" memory, DEC_FreePng will be called.

Parameters
void* data PNG data. int len Length of data for PNG.
Returns
S_IMAGE * The decoded bitmap.
Warning
Bug:

Definition at line 332 of file mg_png.c.

void DEC_FreeJpg ( S_IMAGE image)

Free memory allocated for JPEG bitmap.

Parameters
dataJPG image
Returns
void

Definition at line 495 of file mg_jpg.c.

void DEC_FreePng ( S_IMAGE image)

Free memory allocated for PNG bitmap.

Parameters
dataPNG image
Returns
void

Definition at line 637 of file mg_png.c.

void* DEC_OSDCreateBmpSurf ( U32BIT  s_width,
U32BIT  s_height,
U32BIT  i_width,
U32BIT  i_height,
S_IMAGE image,
U32BIT pStride 
)

This creates a hardware surface of size using STB_OSDMhegCreateSurface() with s_width and s_height, and fills the surface with the IMAGE data. The bitmap must be stretched or shrunk onto surface with image size (i_width,i_height) When surface size is greater than image size, then the bitmap is 'tiled' to fill the surface. Otherwise sizes will be equal. Implementations may choose to ignore requested surface size and leave MHEG5 to do the tiling (where graphic memory is limited). If so, 'tiled' should be set to FALSE, and use (i_width,i_height) for surface size. Colour format of resulting surface is as used in the call to MHEG5_Open() with 'ColourDepth' in setup config.

Parameters
s_widthWidth of requested surface in pixels
s_heightHeight of requested surface in pixels
i_widthWidth of image on surface in pixels
i_heightHeight of image on surface in pixels
imageimage structure returned by DEC_DecodePNG() or DEC_DecodeJPG()
pitchwidth of returned buffer in bytes.
Returns
void* Success - Handle to surface. Failure - NULL (or zero)

Definition at line 1397 of file mg_bitmap.c.