Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
celljpegdec_ti.c
Package: DSP-C6000-DM642DEMO.rar [view]
Upload User: dahaojd
Upload Date: 2008-01-29
Package Size: 14357k
Code Size: 3k
Category:
DSP program
Development Platform:
C/C++
- /*
- * Copyright 2002 by Texas Instruments Incorporated.
- * All rights reserved. Property of Texas Instruments Incorporated.
- * Restricted rights to use, duplicate or disclose this code are
- * granted through contract.
- *
- */
- /* "@(#) RF5_IEK 1.20.07 09-26-02 (swat-c12)" */
- /*
- * ======== celljpegdec.c ========
- */
- #include <stdio.h>
- #include <stdlib.h>
- #include <std.h>
- #include <log.h>
- #include <tsk.h>
- #include <algrf.h>
- #include <icell.h>
- #include <utl.h>
- #include "celljpegdec_ti.h"
- #include "ijpegdec.h"
- #include <dman.h>
- #include "appThreads.h"
- #include "appResources.h"
- extern far IDMA2_Fxns JPEGDEC_IDMA2; /* the algorithm's IDMA2 v-table */
- // v-table for this cell
- ICELL_Fxns JPEGDEC_CELLFXNS =
- {
- JPEGDEC_cellClose, // cellClose
- NULL, // cellControl
- JPEGDEC_cellExecute, // cellExecute
- JPEGDEC_cellOpen // cellOpen
- };
- /*
- * ======== JPEGDEC_cellClose ========
- *
- */
- Bool JPEGDEC_cellClose( ICELL_Handle handle )
- {
- // Withdraw DMA resources from algorithm
- return (DMAN_removeAlg((IALG_Handle)handle->algHandle, &JPEGDEC_IDMA2));
- }
- /*
- * ======== JPEGDEC_cellExecute ========
- *
- */
- Bool JPEGDEC_cellExecute( ICELL_Handle handle, Arg arg )
- {
- int ret_val;
- unsigned int **Input = handle->inputIcc[0]->buffer;
- UTL_stsStart( stsExeTimeChJpegDec );
- // activate instance object
- ALGRF_activate( handle->algHandle );
- // call JPEG decode through IALG layer
- ret_val = ((IJPEGDEC_Fxns *)(handle->algFxns))->decode
- (
- (IJPEGDEC_Handle)handle->algHandle,
- (XDAS_Int8 *)(Input[1]),
- (XDAS_Int8 **)handle->outputIcc[0]->buffer
- );
- // negative value here, implies incorrect decode.
- UTL_assert(ret_val >= 0);
- // deactivate instance object
- ALGRF_deactivate( handle->algHandle );
- UTL_stsStop( stsExeTimeChJpegDec );
- return(1);
- }
- /*
- * ======== JPEGDEC_cellOpen ========
- *
- */
- Bool JPEGDEC_cellOpen( ICELL_Handle handle )
- {
- // Grant DMA resources
- return (DMAN_addAlg((IALG_Handle)handle->algHandle, &JPEGDEC_IDMA2));
- }
- /*------------------------------------------------------------------*/
- /* Texas Instruments Incorporated 1997-2003. */
- /*==================================================================*/
- /* */
- /*------------------------------------------------------------------*/