elifcolor_mode==vrlg.CMPRS_CBIT_CMODE_JP46DC:# jp4, dc -improved (4:2:0)
header_copy_sof(buf,bpl,SOF_JP46DC)
elifcolor_mode==vrlg.CMPRS_CBIT_CMODE_JP4DC:# jp4, 4 blocks, dc -improved
header_copy_sof(buf,bpl,SOF_JP4DC)
elifcolor_modein(vrlg.CMPRS_CBIT_CMODE_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
vrlg.CMPRS_CBIT_CMODE_JP4DIFFDIV2):# 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(buf,bpl,SOF_JP4DIFF)
buf[header_sof+12+3*((4-byrshift)&3)]=0# set quantization table 0 for the base color
elifcolor_modein(vrlg.CMPRS_CBIT_CMODE_JP4DIFFHDR,# jp4, 4 blocks, differential HDR: red := (R-G1), blue:=(B-G1), green=G1, green2 (high gain)=G2) (G1 and G2 - diagonally opposite)
elifcolor_mode==vrlg.CMPRS_CBIT_CMODE_JP46DC:# jp4, dc -improved (4:2:0)
header_copy_sos(buf,SOS_JP46DC)
elifcolor_mode==vrlg.CMPRS_CBIT_CMODE_JP4DC:# jp4, 4 blocks, dc -improved
header_copy_sos(buf,SOS_JP4DC)
elifcolor_modein(vrlg.CMPRS_CBIT_CMODE_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
vrlg.CMPRS_CBIT_CMODE_JP4DIFFDIV2):# jp4, 4 blocks, differential, divide differences by 2: red := (R-G1)/2, blue:=(B-G1)/2, green=G1, green2 (G2-G1)/2
header_copy_sos(buf,SOS_JP4DIFF)
buf[header_sos+6+2*((4-byrshift)&3)]=0# set huffman table 0 for the base color
elifcolor_modein(vrlg.CMPRS_CBIT_CMODE_JP4DIFFHDR,# jp4, 4 blocks, differential HDR: red := (R-G1), blue:=(B-G1), green=G1, green2 (high gain)=G2) (G1 and G2 - diagonally opposite)