// pastParsIndex = (thisFrameNumber(sensor_port) - 1) & PASTPARS_SAVE_ENTRIES_MASK; // copying from what was past frame that might include histogram data
pastParsIndex=compressed_frame&PASTPARS_SAVE_ENTRIES_MASK;// copying from what was past frame that might include histogram data
pastParsIndex=compressed_frame&PASTPARS_SAVE_ENTRIES_MASK;// copying from what was past frame that might include histogram data
// memcpy(interframe_pars, &framepars[findex_this].pars[P_GTAB_R], 24); // will leave some gaps, but copy [P_ACTUAL_WIDTH]
// After Frame sync interrupt processed, oldest valid will be is sensor frame number -2, compressor lag is 1 frame (0..2), so read not past-pars is OK
#ifdef USE_PASTPARS_IN_CMPRSIRQ
memcpy(interframe_pars,&apastpars[sensor_port][pastParsIndex].past_pars[P_GTAB_R-PARS_SAVE_FROM],24);// will leave some gaps, but copy [P_ACTUAL_WIDTH]
memcpy(interframe_pars,&apastpars[sensor_port][pastParsIndex].past_pars[P_GTAB_R-PARS_SAVE_FROM],24);// will leave some gaps, but copy [P_ACTUAL_WIDTH]
interframe_pars->height=apastpars[sensor_port][pastParsIndex].past_pars[P_ACTUAL_HEIGHT-PARS_SAVE_FROM];// NOTE: P_ACTUAL_WIDTH,P_QUALITY copied with memcpy
interframe_pars->height=apastpars[sensor_port][pastParsIndex].past_pars[P_ACTUAL_HEIGHT-PARS_SAVE_FROM];// NOTE: P_ACTUAL_WIDTH,P_QUALITY copied with memcpy
// Now update interframe_pars (interframe area) used to create JPEG headers. Interframe area survives exactly as long as the frames themselves (not like pastpars)
// Now update interframe_pars (interframe area) used to create JPEG headers. Interframe area survives exactly as long as the frames themselves (not like pastpars)
#if 0
struct framepars_past_t {
unsigned long past_pars[PARS_SAVE_NUM]; ///< Array of frame parameters preserved for the future
};
#endif
#ifdef NC353
#ifdef NC353
if(interframe_pars){// frame was compressed, not just vsync
if(interframe_pars){// frame was compressed, not just vsync
/** @brief Contains read and write pointers along with IRQ number for a single channel*/
/** @brief Contains read and write pointers along with IRQ number for a single channel*/
structjpeg_ptr_t{
structjpeg_ptr_t{
volatileu32frame;///< Absolute frame number
volatileu32frame;///< Absolute frame number (last compressed)
volatileintjpeg_wp;///< JPEG write pointer in 32 bit words
volatileintjpeg_wp;///< JPEG write pointer in 32 bit words
volatileintjpeg_rp;///< JPEG read pointer in 32 bit words
volatileintjpeg_rp;///< JPEG read pointer in 32 bit words
volatileintfpga_cntr_prev;///< This field contains previous value of the FPGA transfer counter which is used to find out if it has changed. This pointer is in 32 bit words.
volatileintfpga_cntr_prev;///< This field contains previous value of the FPGA transfer counter which is used to find out if it has changed. This pointer is in 32 bit words.
...
@@ -136,8 +136,9 @@ u32 get_compressor_frame(unsigned int chn) ///< Sensor port number (0..3)
...
@@ -136,8 +136,9 @@ u32 get_compressor_frame(unsigned int chn) ///< Sensor port number (0..3)
/** @brief Works like a cache to time save on looking for tags in the directory (forced to recalculate if does not match)
/** @brief Works like a cache to time save on looking for tags in the directory (forced to recalculate if does not match)
* will have offset of the Exif_Image_DateTime data in meta page (Exif_Photo_SubSecTime should go immediately after in meta page)
* will have offset of the Exif_Image_DateTime data in meta page (Exif_Photo_SubSecTime should go immediately after in meta page)
*/
*/
staticstructmeta_offsets_t{// Never used even in NC353?
staticstructmeta_offsets_t{//
intImage_DateTime;///< EXIF Date/Time offset
intImage_DateTime;///< EXIF Date/Time offset
///< Has offset of the Exif_Image_DateTime data in meta page (Exif_Photo_SubSecTime should go immediately after in meta page)
intPhoto_DateTimeOriginal;///< EXIF Date/Time Original offset
intPhoto_DateTimeOriginal;///< EXIF Date/Time Original offset
intPhoto_ExposureTime;///< EXIF exposure offset
intPhoto_ExposureTime;///< EXIF exposure offset
intImage_ImageNumber;///< EXIF image number offset
intImage_ImageNumber;///< EXIF image number offset
...
@@ -182,6 +183,11 @@ void camseq_set_jpeg_rp(unsigned int chn, int ptr)
...
@@ -182,6 +183,11 @@ void camseq_set_jpeg_rp(unsigned int chn, int ptr)
putlong_meta_raw_irq(sensor_port,get_imageParamsThis(sensor_port,P_WOI_LEFT)|(get_imageParamsThis(sensor_port,P_WOI_WIDTH)<<16),maker_offset+32);//No Past
putlong_meta_raw_irq(sensor_port,get_imageParamsThis(sensor_port,P_WOI_TOP)|(get_imageParamsThis(sensor_port,P_WOI_HEIGHT)<<16),maker_offset+36);//No Past
putlong_meta_raw_irq(sensor_port,get_imageParamsFrame(sensor_port,P_WOI_LEFT,frame)|(get_imageParamsFrame(sensor_port,P_WOI_WIDTH,frame)<<16),maker_offset+32);//No Past
putlong_meta_raw_irq(sensor_port,get_imageParamsFrame(sensor_port,P_WOI_TOP,frame)|(get_imageParamsFrame(sensor_port,P_WOI_HEIGHT,frame)<<16),maker_offset+36);//No Past
putlong_meta_raw_irq(sensor_port,global_flips|
putlong_meta_raw_irq(sensor_port,global_flips|
((get_imageParamsThis(sensor_port,P_BAYER)<<2)&0xc)|// No past!
putlong_meta_raw_irq(sensor_port,get_globalParam(sensor_port,G_TEMPERATURE01),maker_offset+56);// data should be provided by a running daemon // No past!
putlong_meta_raw_irq(sensor_port,get_imageParamsFrame(sensor_port,G_TEMPERATURE01,frame),maker_offset+56);// data should be provided by a running daemon
putlong_meta_raw_irq(sensor_port,get_globalParam(sensor_port,G_TEMPERATURE23),maker_offset+60);// No past!