source: soft/giet_vm/applications/mjpeg/mjpeg.h @ 736

Last change on this file since 736 was 736, checked in by alain, 9 years ago

Modify the mjpeg application to support an optional
DCT hardware coprocessor.

File size: 3.7 KB
Line 
1/////////////////////////////////////////////////////////////////////////////////////////
2// File   : mjpeg.h   
3// Date   : octobre 2015
4// author : Alain Greiner
5/////////////////////////////////////////////////////////////////////////////////////////
6// This file contains all global variables allocated in the mjpeg.c file,
7// and used by the threads of the MJPEG application.
8// It defines also the debug directives.
9/////////////////////////////////////////////////////////////////////////////////////////
10
11#ifndef MJPEG_GLOBALS_H
12#define MJPEG_GLOBALS_H
13
14#include <stdint.h>
15#include <mwmr_channel.h>
16#include <user_lock.h>
17
18////////////////////////////////////////////////////////////////////////////////////////
19//  Configuration Variables
20////////////////////////////////////////////////////////////////////////////////////////
21
22#define   MAX_IMAGES         16
23
24#define   USE_DCT_COPROC     1
25
26#define   INTERACTIVE_MODE   0
27
28////////////////////////////////////////////////////////////////////////////////////////
29//  MWMMR channels depths (number of 32 bits words)
30////////////////////////////////////////////////////////////////////////////////////////
31
32#define   TG_2_DEMUX_DEPTH          1024
33#define   DEMUX_2_VLD_DATA_DEPTH    1024
34#define   DEMUX_2_VLD_HUFF_DEPTH    1024
35#define   DEMUX_2_IQZZ_DEPTH        1024
36#define   VLD_2_IQZZ_DEPTH          1024
37#define   IQZZ_2_IDCT_DEPTH         1024
38#define   IDCT_2_LIBU_DEPTH         1024
39
40////////////////////////////////////////////////////////////////////////////////////////
41// debug variables
42// O : No trace
43// 1 : simple debug
44// 2 : detailed debug
45////////////////////////////////////////////////////////////////////////////////////////
46
47#define DEBUG_CLUSTER_INDEX   0xFFFFFFFF   // use 0xFFFFFFFF for all clusters
48
49#define DEBUG_TG              1
50#define DEBUG_DEMUX           1
51#define DEBUG_VLD             1
52#define DEBUG_IQZZ            1
53#define DEBUG_IDCT            1
54#define DEBUG_LIBU            1
55
56////////////////////////////////////////////////////////////////////////////////////////
57//       Global variables (allocated in mjpeg.c)
58////////////////////////////////////////////////////////////////////////////////////////
59
60extern uint32_t         fd;    // file descriptor for the file containing MJPEG stream
61
62extern mwmr_channel_t*  tg_2_demux[256];         // one per cluster
63extern mwmr_channel_t*  demux_2_vld_data[256];   // one per cluster
64extern mwmr_channel_t*  demux_2_vld_huff[256];   // one per cluster
65extern mwmr_channel_t*  demux_2_iqzz[256];       // one per cluster
66extern mwmr_channel_t*  vld_2_iqzz[256];         // one per cluster
67extern mwmr_channel_t*  iqzz_2_idct[256];        // one per cluster
68extern mwmr_channel_t*  idct_2_libu[256];        // one per cluster
69
70extern pthread_t        trdid_tg; 
71extern pthread_t        trdid_demux[256];        // one per cluster
72extern pthread_t        trdid_vld[256];          // one per cluster
73extern pthread_t        trdid_iqzz[256];         // one per cluster
74extern pthread_t        trdid_idct[256];         // one per cluster
75extern pthread_t        trdid_libu[256];         // one per cluster
76
77extern user_lock_t      tty_lock;                // lock protecting shared TTY
78
79extern uint8_t*         cma_buf[256];            // CMA buffers (one per cluster)
80extern void*            cma_sts[256];            // CMA buffers status
81
82extern uint32_t         fbf_width;               // Frame Buffer width
83extern uint32_t         fbf_height;              // Frame Buffer height
84
85extern uint32_t         nblocks_h;               // number of blocks in a column
86extern uint32_t         nblocks_w;               // number of blocks in a row   
87
88extern uint32_t         date[MAX_IMAGES];        // date of completion in libu
89
90#endif
Note: See TracBrowser for help on using the repository browser.