Changeset 736 for soft/giet_vm/applications/mjpeg/demux.c
- Timestamp:
- Dec 3, 2015, 4:40:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/mjpeg/demux.c
r723 r736 86 86 // giet_tty_alloc( 0 ); 87 87 88 PRINTF("\n[MJPEG] thread DEMUX[%d] starts on P[%d,%d,%d]\n", index, x, y, p ) 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 90 90 91 // initialise BUFIO for MWMR channel <in> … … 95 96 96 97 #if (DEBUG_DEMUX > 1) 97 PRINTF("\nDEMUX[%d] <in> : &mwmr = %x / &bufio = %x\n", 98 index , mwmr_in , &bufio_in ) 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 101 #endif 100 102 … … 106 108 107 109 #if (DEBUG_DEMUX > 1) 108 PRINTF("\nDEMUX[%d] : <out_quanti> : mwmr = %x / &bufio = %x\n", 109 index , mwmr_out_quanti , &bufio_out_quanti ) 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 ) } 110 113 #endif 111 114 … … 117 120 118 121 #if (DEBUG_DEMUX > 1) 119 PRINTF("\nDEMUX[%d] : <out_huff> : mwmr = %x / &bufio = %x\n", 120 index , mwmr_out_huff , &bufio_out_huff ) 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 ) } 121 125 #endif 122 126 … … 128 132 129 133 #if (DEBUG_DEMUX > 1) 130 PRINTF("\nDEMUX[%d] : <out_data> : mwmr = %x / &bufio = %x\n", 131 index , mwmr_out_data , &bufio_out_data ) 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 ) } 132 137 #endif 133 138 … … 150 155 marker = get_next_marker( &bufio_in ); 151 156 152 #if (DEBUG_DEMUX > 1)153 if ( marker == SOI_MK ) PRINTF("\nDEMUX[%x] found Start of Image marker\n", index )154 #endif155 157 } 156 158 while ( marker != SOI_MK ); 159 160 #if (DEBUG_DEMUX > 1) 161 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 162 { PRINTF("\nDEMUX[%x] found Start of Image marker\n", index ) } 163 #endif 157 164 158 165 found_marker = 0; … … 173 180 174 181 #if (DEBUG_DEMUX > 1) 175 PRINTF("\nDEMUX[%x] found Start of Frame marker\n", index ) 182 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 183 { PRINTF("\nDEMUX[%x] found Start of Frame marker\n", index ) } 176 184 #endif 177 185 // Only one component per image is supported … … 208 216 209 217 #if (DEBUG_DEMUX > 1) 210 PRINTF("\nDEMUX[%x] found Quantization Table marker\n", index ) 218 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 219 { PRINTF("\nDEMUX[%x] found Quantization Table marker\n", index ) } 211 220 #endif 212 221 // The quantisation table segment being fixed length, … … 235 244 236 245 #if (DEBUG_DEMUX > 1) 237 PRINTF("\nDEMUX[%x] found Huffman Table marker\n", index ) 246 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 247 { PRINTF("\nDEMUX[%x] found Huffman Table marker\n", index ) } 238 248 #endif 239 249 // The Huffman Table segment being variable length, … … 279 289 280 290 #if (DEBUG_DEMUX > 1) 281 PRINTF("\nDEMUX[%x] found Start of Scan marker\n", index ) 291 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 292 { PRINTF("\nDEMUX[%x] found Start of Scan marker\n", index ) } 282 293 #endif 283 294 // The scan segment has a variable length: … … 330 341 331 342 #if (DEBUG_DEMUX > 1) 332 PRINTF("\nDEMUX[%x] found End of Image marker\n", index ) 343 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 344 { PRINTF("\nDEMUX[%x] found End of Image marker\n", index ) } 333 345 #endif 334 346 mwmr_bufio_flush( &bufio_out_data ); … … 341 353 342 354 #if (DEBUG_DEMUX > 1) 343 PRINTF("\nDEMUX[%x] found Comment or Application marker\n", index ) 355 if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) ) 356 { PRINTF("\nDEMUX[%x] found Comment or Application marker\n", index ) } 344 357 #endif 345 358 // read segment length from bufio_in … … 367 380 368 381 #if DEBUG_DEMUX 369 PRINTF("\nDEMUX[%d] completes image %d at cycle %d\n", index , image , giet_proctime() ) 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() ) } 370 384 #endif 371 385 image = image + x_size * y_size; … … 373 387 } // end while on images 374 388 375 giet_pthread_exit( " demuxcompleted" );389 giet_pthread_exit( "DEMUX completed" ); 376 390 377 391 } // end demux()
Note: See TracChangeset
for help on using the changeset viewer.