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

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

Modify instrumentation to save results on virtual disk.

File size: 3.6 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         2
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   MAIN_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 to trace all clusters
48
49#define DEBUG_MAIN            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 mwmr_channel_t*  main_2_demux[256];       // one per cluster
61extern mwmr_channel_t*  demux_2_vld_data[256];   // one per cluster
62extern mwmr_channel_t*  demux_2_vld_huff[256];   // one per cluster
63extern mwmr_channel_t*  demux_2_iqzz[256];       // one per cluster
64extern mwmr_channel_t*  vld_2_iqzz[256];         // one per cluster
65extern mwmr_channel_t*  iqzz_2_idct[256];        // one per cluster
66extern mwmr_channel_t*  idct_2_libu[256];        // one per cluster
67
68extern pthread_t        trdid_demux[256];        // one per cluster
69extern pthread_t        trdid_vld[256];          // one per cluster
70extern pthread_t        trdid_iqzz[256];         // one per cluster
71extern pthread_t        trdid_idct[256];         // one per cluster
72extern pthread_t        trdid_libu[256];         // one per cluster
73
74extern user_lock_t      tty_lock;                // lock protecting shared TTY
75
76extern uint8_t*         cma_buf[256];            // CMA buffers (one per cluster)
77extern void*            cma_sts[256];            // CMA buffers status
78
79extern uint32_t         fbf_width;               // Frame Buffer width
80extern uint32_t         fbf_height;              // Frame Buffer height
81
82extern uint32_t         nblocks_h;               // number of blocks in a column
83extern uint32_t         nblocks_w;               // number of blocks in a row   
84
85extern uint32_t         date[MAX_IMAGES];        // date of completion in libu
86
87#endif
Note: See TracBrowser for help on using the repository browser.