Changeset 748 for soft/giet_vm/applications/mjpeg/demux.c
- Timestamp:
- Dec 16, 2015, 1:03:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/mjpeg/demux.c
r741 r748 36 36 37 37 // macro to use a shared TTY 38 #define PRINTF(...) 39 giet_tty_printf(__VA_ARGS__); \40 lock_release( &tty_lock);38 #define PRINTF(...) do { lock_acquire( &tty_lock ); \ 39 giet_tty_printf(__VA_ARGS__); \ 40 lock_release( &tty_lock ); } while(0); 41 41 42 42 /////////////////////////////////////////////////////////// … … 87 87 88 88 PRINTF("\n[MJPEG] thread DEMUX[%d] starts on P[%d,%d,%d] / trdid = %x\n", 89 index , x , y , p, (uint32_t)trdid_demux[index] ) 89 index , x , y , p, (uint32_t)trdid_demux[index] ); 90 90 91 91 // initialise BUFIO for MWMR channel <in> … … 97 97 #if (DEBUG_DEMUX > 1) 98 98 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 99 {PRINTF("\nDEMUX[%d] <in> : &mwmr = %x / &bufio = %x\n",100 index , mwmr_in , &bufio_in ) }99 PRINTF("\nDEMUX[%d] <in> : &mwmr = %x / &bufio = %x\n", 100 index , mwmr_in , &bufio_in ); 101 101 #endif 102 102 … … 109 109 #if (DEBUG_DEMUX > 1) 110 110 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 111 {PRINTF("\nDEMUX[%d] : <out_quanti> : mwmr = %x / &bufio = %x\n",112 index , mwmr_out_quanti , &bufio_out_quanti ) }111 PRINTF("\nDEMUX[%d] : <out_quanti> : mwmr = %x / &bufio = %x\n", 112 index , mwmr_out_quanti , &bufio_out_quanti ); 113 113 #endif 114 114 … … 121 121 #if (DEBUG_DEMUX > 1) 122 122 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 123 {PRINTF("\nDEMUX[%d] : <out_huff> : mwmr = %x / &bufio = %x\n",124 index , mwmr_out_huff , &bufio_out_huff ) }123 PRINTF("\nDEMUX[%d] : <out_huff> : mwmr = %x / &bufio = %x\n", 124 index , mwmr_out_huff , &bufio_out_huff ); 125 125 #endif 126 126 … … 133 133 #if (DEBUG_DEMUX > 1) 134 134 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 135 {PRINTF("\nDEMUX[%d] : <out_data> : mwmr = %x / &bufio = %x\n",136 index , mwmr_out_data , &bufio_out_data ) }135 PRINTF("\nDEMUX[%d] : <out_data> : mwmr = %x / &bufio = %x\n", 136 index , mwmr_out_data , &bufio_out_data ); 137 137 #endif 138 138 … … 160 160 #if (DEBUG_DEMUX > 1) 161 161 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 162 { PRINTF("\nDEMUX[%x] found Start of Image marker\n", index ) } 162 PRINTF("\nDEMUX[%x] found Start of Image marker\n", index ); 163 163 #endif 164 164 … … 181 181 #if (DEBUG_DEMUX > 1) 182 182 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 183 { PRINTF("\nDEMUX[%x] found Start of Frame marker\n", index ) } 183 PRINTF("\nDEMUX[%x] found Start of Frame marker\n", index ); 184 184 #endif 185 185 // Only one component per image is supported … … 217 217 #if (DEBUG_DEMUX > 1) 218 218 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 219 { PRINTF("\nDEMUX[%x] found Quantization Table marker\n", index ) } 219 PRINTF("\nDEMUX[%x] found Quantization Table marker\n", index ); 220 220 #endif 221 221 // The quantisation table segment being fixed length, … … 245 245 #if (DEBUG_DEMUX > 1) 246 246 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 247 { PRINTF("\nDEMUX[%x] found Huffman Table marker\n", index ) } 247 PRINTF("\nDEMUX[%x] found Huffman Table marker\n", index ); 248 248 #endif 249 249 // The Huffman Table segment being variable length, … … 290 290 #if (DEBUG_DEMUX > 1) 291 291 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 292 { PRINTF("\nDEMUX[%x] found Start of Scan marker\n", index ) } 292 PRINTF("\nDEMUX[%x] found Start of Scan marker\n", index ); 293 293 #endif 294 294 // The scan segment has a variable length: … … 342 342 #if (DEBUG_DEMUX > 1) 343 343 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 344 { PRINTF("\nDEMUX[%x] found End of Image marker\n", index ) } 344 PRINTF("\nDEMUX[%x] found End of Image marker\n", index ); 345 345 #endif 346 346 mwmr_bufio_flush( &bufio_out_data ); … … 354 354 #if (DEBUG_DEMUX > 1) 355 355 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 356 { PRINTF("\nDEMUX[%x] found Comment or Application marker\n", index ) } 356 PRINTF("\nDEMUX[%x] found Comment or Application marker\n", index ); 357 357 #endif 358 358 // read segment length from bufio_in … … 381 381 #if DEBUG_DEMUX 382 382 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 383 { PRINTF("\nDEMUX[%d] completes image %d at cycle %d\n", index , image , giet_proctime() ) } 383 PRINTF("\nDEMUX[%d] completes image %d at cycle %d\n", index , image , giet_proctime() ); 384 384 #endif 385 385 image = image + x_size * y_size;
Note: See TracChangeset
for help on using the changeset viewer.