caseCOLORMODE_JP4DIFF:/// jp4, 4 blocks, differential red := (R-G1), blue:=(B-G1), green=G1, green2 (G2-G1). G1 is defined by Bayer shift, any pixel can be used
caseCOLORMODE_JP4DIFF:/// jp4, 4 blocks, differential red := (R-G1), blue:=(B-G1), green=G1, green2 (G2-G1). G1 is defined by Bayer shift, any pixel can be used
caseCOLORMODE_JP4DIFF2:/// jp4, 4 blocks, differential, divide differences by 2: red := (R-G1)/2, blue:=(B-G1)/2, green=G1, green2 (G2-G1)/2
caseCOLORMODE_JP4DIFF2:/// jp4, 4 blocks, differential, divide differences by 2: red := (R-G1)/2, blue:=(B-G1)/2, green=G1, green2 (G2-G1)/2
HEADER_COPY_SOF(sof_jp4diff);
HEADER_COPY_SOF(sof_jp4diff);
//header_sof
//header_sof
//bshift
//bshift
buf[header_sof+12+3*((4-params->byrshift)&3)]=0;/// set quantization table 0 for the "base color"
buf[header_sof+12+3*((4-params->byrshift)&3)]=0;/// set quantization table 0 for the "base color"
break;
break;
caseCOLORMODE_JP4HDR:/// jp4, 4 blocks, differential HDR: red := (R-G1), blue:=(B-G1), green=G1, green2 (high gain)=G2) (G1 and G2 - diagonally opposite)
caseCOLORMODE_JP4HDR:/// jp4, 4 blocks, differential HDR: red := (R-G1), blue:=(B-G1), green=G1, green2 (high gain)=G2) (G1 and G2 - diagonally opposite)
if((fp->signffff!=MARKER_FFFF)||// signature is overwritten
* move below two lines to circbuf_all_lseek to remove ccam_dma_buf_ptr and simplify dependencies
rp= (offset >>2) & (~7); // convert to index to long, align to 32-bytes
fp = (struct interframe_params_t *) &ccam_dma_buf_ptr[X313_BUFFSUB(rp, 8)]; //! 32 bytes before the frame pointer, may roll-over to the end of ccam_dma_buf_ptr
*/
//if ((fp->signffff != 0xffff) || //! signature is overwritten
if((fp->signffff!=MARKER_FFFF)||//! signature is overwritten
((fp->timestamp_sec)&X313_LENGTH_MASK))return-EINVAL;//! acquisition of this frame is not done yet - length word high byte is non-zero
((fp->timestamp_sec)&X313_LENGTH_MASK))return-EINVAL;//! acquisition of this frame is not done yet - length word high byte is non-zero
if((offset&0x1f)==0x2)
jpeghead_priv[chn].jpeg_h_sz=qtables_create(fp,jpeghead_priv[chn].header);/// just qunatization tables (128 bytes) - for the streamer
else
///FIXME: pp_index=fp->past_index; /// unsigned short
jpeghead_priv[chn].jpeg_h_sz=jpegheader_create(fp,jpeghead_priv[chn].header,chn);/// full JPEG header
/// if (pp_index>=PASTPARS_SAVE_ENTRIES) return -EINVAL; /// wrong index