diff --git a/.gitignore b/.gitignore index ef48dbc..f2c0eb0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ Debug/ apt_audio noaa_apt imgc +apt-colorm diff --git a/README.md b/README.md index c820ced..922e11d 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,19 @@ Information and description: ``` NOAA automatic picture transmission (APT) encoder -Usage: Debug/noaa_apt (-i [-s ] | -I) [(-d | -O) -m -lcr] +Usage: Debug/noaa_apt (-i [-s ] | -I) [(-d | -O) -m -lcrM] -i Input TGA image (909px width, 24bit RGB) -s Second input TGA image (B channel, mode ignored) -d OSS audio device (default /dev/dsp) or file - -m Channel B data mode (R,G,B,N,Y) + -m Channel B data mode (R,G,B,N,Y,C) -I Read image data from stdin -O Write audio data to stdout + -M Multi image reading from stdin -l Enable infinite image loop -c Enable user console -r Device is regular file (write WAV audio file) -h Show this help - Build: 00:35:30 Jul 26 2019, GCC 5.3.0 + Build: 21:52:59 Aug 18 2019, GCC 5.3.0 ``` * Run as: ```guest@porteus:~$ padsp noaa_apt -lci SourceTestImage.tga``` @@ -33,6 +34,18 @@ Usage: Debug/noaa_apt (-i [-s ] | -I) [(-d | -O) -m Source audio Sample +### Special mode C - color + +Mode use 12bit (4096 colors, square root of 4096 is 64) look up table. Each color have 4 bit resolution (16 values). Channel A contain Y-pos values and channel B contain X-pos values (position in LUT). Image quality depends on LUT (color position in table). Current LUT is not ideal. Only X-pos is good. For decoding use apt-colorm and for better image quality disable gamma correction in WxToImg. + + + + + + + +
Look up table (64x64, upscaled 4x)
Original image
Channel A image
Channel B image
Decoded color image
+ ### APT APT means Automatic Picture Transmission. It is a system, developed in the 1960s, made to transmit low-resolution analog image for weather satellites. A complete APT image takes around 12 minutes to be built up at a rate of 2 lines per second. The data is broadcasted by the satellite. The stream is obtained by the AVHRR/3 instrument. Two channels with a low resolution are emitting all the time using VHF signals at reduced rates (around 120 lines/minutes). diff --git a/apt-colorm.c b/apt-colorm.c new file mode 100644 index 0000000..e415313 --- /dev/null +++ b/apt-colorm.c @@ -0,0 +1,105 @@ +#include +#include +#include +#include +#include +#include +#include +#include "image.h" +#include "aptcode.h" + +#define _APT_FILE_NO_SET "σame" + +void Usage(char *p_name); + +int main(int argc, char *argv[]) { + if(argc == 1){ + Usage(argv[0]); + return 0; + } + char channel_a[1024]=_APT_FILE_NO_SET; + char channel_b[1024]=_APT_FILE_NO_SET; + char output[1024]=_APT_FILE_NO_SET; + int opt = 0; + while ((opt = getopt(argc, argv, "a:b:o:h")) != -1){ + switch (opt) { + case 'h': //Help + Usage(argv[0]); + return 0; + break; + case 'a': //Channel A TGA image + strncpy(channel_a,optarg,sizeof(channel_a)-1); + break; + case 'b': //Channel B TGA image + strncpy(channel_b,optarg,sizeof(channel_b)-1); + break; + case 'o': //Output TGA image + strncpy(output,optarg,sizeof(output)-1); + break; + default: + Usage(argv[0]); + return 0; + } + } + if(strncmp(channel_a,_APT_FILE_NO_SET,4) == 0) { + printf("%s: required argument and option -- '-a '\n",argv[0]); + exit(2); + } + if(strncmp(channel_b,_APT_FILE_NO_SET,4) == 0) { + printf("%s: required argument and option -- '-b '\n",argv[0]); + exit(2); + } + if(strncmp(output,_APT_FILE_NO_SET,4) == 0) { + printf("%s: required argument and option -- '-o '\n",argv[0]); + exit(2); + } + TgaImageHead ChannelA, ChannelB, OutputColor; + ChannelA = OpenTgaImage(channel_a); + ChannelB = OpenTgaImage(channel_b); + OutputColor = ChannelA; + OutputColor = WriteTgaImage(output, OutputColor); + if(ChannelA.File == NULL) { // On error + exit(1); + } + if(ChannelB.File == NULL) { // On error + exit(1); + } + if(OutputColor.File == NULL) { // On error + exit(1); + } + + int i,j; + unsigned int pix_a; + unsigned int pix_b; + HsvColor hsvc; + AptColor aptc; + RgbColor rgbc; + // 24 bit RGB, but in grayscale expected + for(i=0;i -b -o -h\n",p_name); + printf(" -a Input channel A TGA image (909px width, 24bit RGB)\n"); + printf(" -b Input channel B TGA image (909px width, 24bit RGB)\n"); + printf(" -o Output color TGA image \n"); + printf(" -h Show this help\n"); + printf(" Build: %s %s, GCC %s\n", __TIME__, __DATE__, __VERSION__); +} + diff --git a/apt-colorm.make b/apt-colorm.make new file mode 100755 index 0000000..21f764d --- /dev/null +++ b/apt-colorm.make @@ -0,0 +1,2 @@ +#!/bin/sh +gcc apt-colorm.c image.c -Wall -o apt-colorm -std=c99 diff --git a/aptcode.c b/aptcode.c index 4d6f64e..d12989e 100644 --- a/aptcode.c +++ b/aptcode.c @@ -66,6 +66,8 @@ AptLine CreateAptLine(uint8_t frame, uint8_t currentline, AptTelemetry ChanA, Ap uint8_t Rval = 0; uint8_t Gval = 0; uint8_t Bval = 0; + RgbColor pixel_r; + AptColor pixel_a; unsigned int pix; // Sync A and Sync B for(i=0;i> 4) & 0xF; + uint8_t G = (rgb.g >> 4) & 0xF; + uint8_t B = (rgb.b >> 4) & 0xF; + uint16_t val = (R << 8) + (G << 4) + B; + uint16_t pos = LUTFromRgb[val]; + uint16_t y_val = pos % 64; + uint16_t x_val = (pos - y_val) / 64; + apt.h = (x_val & 0x3F) * 4; + apt.sv = (y_val & 0x3F) * 4; + return apt; +} + +RgbColor AptToRgb(AptColor apt) { + RgbColor rgb; + uint8_t x_val = (apt.h+2)/4; + uint8_t y_val = (apt.sv+2)/4; + if(x_val > 255) {x_val = 255;} + if(y_val > 255) {y_val = 255;} + uint16_t val = LUTFromApt[x_val][y_val]; + uint8_t R = (val >> 8) & 0xF; + uint8_t G = (val >> 4) & 0xF; + uint8_t B = (val >> 0) & 0xF; + rgb.r = R * 17; rgb.g = G * 17; rgb.b = B * 17; + return rgb; } \ No newline at end of file diff --git a/image.h b/image.h index e96c606..2eeb61a 100644 --- a/image.h +++ b/image.h @@ -1,6 +1,8 @@ #ifndef NA_IMAGE_R_H_ #define NA_IMAGE_R_H_ +#include "imgtable.h" +#include "imgtable_apt.h" #define IMG_TGA_HEAD_SIZE 18 typedef struct { @@ -62,4 +64,6 @@ RgbColor HsvToRgb(HsvColor hsv); AptColor HsvToApt(HsvColor hsv, uint8_t bits); //Convert APT to HSV color space HsvColor AptToHsv(AptColor apt, uint8_t bits); +AptColor RgbToApt(RgbColor rgb); +RgbColor AptToRgb(AptColor apt); #endif diff --git a/img.c b/img.c index eead488..b3996d4 100644 --- a/img.c +++ b/img.c @@ -1,10 +1,33 @@ #include "main.h" #include "image.h" #include "aptcode.h" - +#include "imgtable.h" +#include "imgtable_apt.h" +#include #define IMG_COL_STEP 4.2666666 +#define IMG_COL_STEP_42 6.071428 +#define IMG_COL_STEP_43 5.930232 + +typedef struct { + uint8_t x[16]; + uint8_t y[16]; +}ColorMap; + +typedef struct { + uint8_t x[16]; + uint8_t y[4]; +}ColorMap16; + +void CallColorTable(FILE *zf, int16_t luma); + +float ctruncate(float value); +void OpenTgaRaw(); +void LUTToApt(); +RgbColor From2DApt(AptColor apt); +void TestRGB(); +void WriteGLine(ColorMap16 cmap, uint8_t B,FILE *zp); +void Write4CLine(ColorMap Square2D, uint8_t Bcol, FILE *zp); -void CallColorTable(); int main() { printf("Start\n"); @@ -21,10 +44,10 @@ int main() { //APT = fopen("fileAPT.tga","wb"); printf("Write\n"); //TestTGAImage(fp); - unsigned int data=0; + //unsigned int data=0; int i,j; - TgaImageHead ReadTga = OpenTgaImage("duha.tga"); + TgaImageHead ReadTga = OpenTgaImage("139.tga"); if(ReadTga.File == NULL) { printf("Error\n"); exit(1); @@ -40,14 +63,14 @@ int main() { if(SecTga.File==NULL) {printf("Error\n"); exit(1);} ThirdTga = WriteTgaImage("file_col_3.tga", ThirdTga); if(ThirdTga.File==NULL) {printf("Error\n"); exit(1);} - - AptLine AptTrans; - uint8_t frame=1; - uint32_t currentline = 1; - uint8_t APTdata = 0; - AptLineAr ConvLine; - AptTelemetry TelemetryA = {16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 255}; - AptTelemetry TelemetryB = {16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 255}; + + //AptLine AptTrans; + //uint8_t frame=1; + //uint32_t currentline = 1; + //uint8_t APTdata = 0; + //AptLineAr ConvLine; + //AptTelemetry TelemetryA = {16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 255}; + //AptTelemetry TelemetryB = {16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 255}; /*for(j=0;j255) {G=255;} radius++; } - for(i=0;i<60;i++) { - printf("%d:%d,%d,%d\n",radius,(uint8_t)R,(uint8_t)G,(uint8_t)B); - R -= IMG_COL_STEP; + for(i=0;i<43;i++) { + //printf("%d:%d,%d,%d\n",radius,(uint8_t)R,(uint8_t)G,(uint8_t)B); + WriteTGAPixel((uint8_t)ctruncate(R+luma)&0xF0,(uint8_t)ctruncate(G+luma)&0xF0,(uint8_t)ctruncate(B+luma)&0xF0, zf); + R -= IMG_COL_STEP_43; if(R<0) {R=0;} radius++; } - for(i=0;i<60;i++) { - printf("%d:%d,%d,%d\n",radius,(uint8_t)R,(uint8_t)G,(uint8_t)B); - B += IMG_COL_STEP; + for(i=0;i<43;i++) { + //printf("%d:%d,%d,%d\n",radius,(uint8_t)R,(uint8_t)G,(uint8_t)B); + WriteTGAPixel((uint8_t)ctruncate(R+luma)&0xF0,(uint8_t)ctruncate(G+luma)&0xF0,(uint8_t)ctruncate(B+luma)&0xF0, zf); + B += IMG_COL_STEP_43; if(B>255) {B=255;} radius++; } - for(i=0;i<60;i++) { - printf("%d:%d,%d,%d\n",radius,(uint8_t)R,(uint8_t)G,(uint8_t)B); - G -= IMG_COL_STEP; + for(i=0;i<42;i++) { + //printf("%d:%d,%d,%d\n",radius,(uint8_t)R,(uint8_t)G,(uint8_t)B); + WriteTGAPixel((uint8_t)ctruncate(R+luma)&0xF0,(uint8_t)ctruncate(G+luma)&0xF0,(uint8_t)ctruncate(B+luma)&0xF0, zf); + G -= IMG_COL_STEP_42; if(G<0) {G=0;} radius++; } - for(i=0;i<60;i++) { - printf("%d:%d,%d,%d\n",radius,(uint8_t)R,(uint8_t)G,(uint8_t)B); - R += IMG_COL_STEP; + for(i=0;i<43;i++) { + //printf("%d:%d,%d,%d\n",radius,(uint8_t)R,(uint8_t)G,(uint8_t)B); + WriteTGAPixel((uint8_t)ctruncate(R+luma)&0xF0,(uint8_t)ctruncate(G+luma)&0xF0,(uint8_t)ctruncate(B+luma)&0xF0, zf); + R += IMG_COL_STEP_43; if(R>255) {R=255;} radius++; } - for(i=0;i<60;i++) { - printf("%d:%d,%d,%d\n",radius,(uint8_t)R,(uint8_t)G,(uint8_t)B); - B -= IMG_COL_STEP; + for(i=0;i<43;i++) { + //printf("%d:%d,%d,%d\n",radius,(uint8_t)R,(uint8_t)G,(uint8_t)B); + WriteTGAPixel((uint8_t)ctruncate(R+luma)&0xF0,(uint8_t)ctruncate(G+luma)&0xF0,(uint8_t)ctruncate(B+luma)&0xF0, zf); + B -= IMG_COL_STEP_43; if(B<0) {B=0;} radius++; } } +float ctruncate(float value) { + if(value < 0) return 0; + if(value > 255) return 255; + + return value; +} + +void OpenTgaRaw() { + FILE *fp; + FILE *zp; + zp = fopen("test-space-4k-moved.tga","rb"); + fp = fopen("imgtable.h","wt"); + if(fp==NULL) { + return; + } + if(zp==NULL) { + return; + } + int i,j; + uint8_t Rval,Gval,Bval; + unsigned int pix, cval; + fseek(zp,IMG_TGA_HEAD_SIZE,SEEK_SET); + fputs("#ifndef NA_IMAGE_TABLE_H_ \n", fp); + fputs("#define NA_IMAGE_TABLE_H_ \n", fp); + fputs("#define IMG_LUT_WIDTH 64 \n", fp); + fputs("#define IMG_LUT_HEIGHT 64 \n", fp); + fputs("static const uint16_t LUTFromApt[64][64] = {\n", fp); + for(i=0;i<64;i++) { + for(j=0;j<64;j++) { + pix = ReadTGAPixel(zp); + Rval = GetRedSubPixel(pix) & 0xF; + Gval = GetGreenSubPixel(pix) & 0xF; + Bval = GetBlueSubPixel(pix) & 0xF; + cval = (Rval << 8)+(Gval << 4)+Bval; + if(i==63 && j==63) { + fprintf(fp,"%d",cval); + } + else { + fprintf(fp,"%d,",cval); + } + } + fputs("\n",fp); + } + + fputs("};\n", fp); + fputs("#endif\n", fp); + fclose(zp); + fclose(fp); +} + +void LUTToApt() { + FILE *fp; + FILE *zp; + zp = fopen("test-space-4k-moved.tga","rb"); + fp = fopen("imgtable_apt.h","wt"); + if(fp==NULL) { + return; + } + if(zp==NULL) { + return; + } + int i,j; + uint8_t Rval,Gval,Bval; + unsigned int pix, cval,val; + uint16_t RGBArray[4096]; + uint16_t counter = 0; + fseek(zp,IMG_TGA_HEAD_SIZE,SEEK_SET); + fputs("#ifndef NA_IMAGE_RGB_TABLE_H_ \n", fp); + fputs("#define NA_IMAGE_RGB_TABLE_H_ \n", fp); + fputs("#define IMG_LUT_RGB_WIDTH 1 \n", fp); + fputs("#define IMG_LUT_RGB_HEIGHT 4096 \n", fp); + fputs("static const uint16_t LUTFromRgb[4096] = {\n", fp); + for(i=0;i<64;i++) { + for(j=0;j<64;j++) { + pix = ReadTGAPixel(zp); + Rval = GetRedSubPixel(pix) & 0xF; + Gval = GetGreenSubPixel(pix) & 0xF; + Bval = GetBlueSubPixel(pix) & 0xF; + cval = (Rval << 8)+(Gval << 4)+Bval; + RGBArray[cval]=counter; + counter++; + } + } + + for(i=0;i<4096;i++) { + if(i==4095) { + fprintf(fp,"%d",RGBArray[i]); + } + else { + fprintf(fp,"%d,",RGBArray[i]); + } + } + + fputs("\n",fp); + fputs("};\n", fp); + fputs("#endif\n", fp); + fclose(zp); + fclose(fp); +} + +RgbColor From2DApt(AptColor apt) { + RgbColor rgb; + uint8_t x = apt.h; + uint8_t y = apt.sv; + unsigned int pix; + //unsigned int pix = LUTFromApt[x][y]; + uint8_t r = (pix >> 16) & 0xFF; + uint8_t g = (pix >> 8) & 0xFF; + uint8_t b = pix & 0xFF; + rgb.r = r; + rgb.g = g; + rgb.b = b; + return rgb; +} + +void TestRGB() { + TgaImageHead test; + test.IDLength = 0; + test.ColorMapType = 0; + test.ImageType = 0x02; + test.CMapDepth = 0; + test.CMapLength = 0; + test.CMapStart = 0; + test.XOffset = 0; + test.YOffset = 0; + test.Width = 64; + test.Height = 64; + test.PixelDepth = 0x18; + test.ImageDescriptor = 0x20; + //uint8_t R=0,G=0,B=0; + test = WriteTgaImage("test-space-4k.tga",test); + uint32_t val = 0; + int i,j,k; + ColorMap Square2D[16]; + + for(i=0;i<16;i++) { + for(j=0;j<16;j++) { + for(k=0;k<16;k++) { + Square2D[k].x[i]=i; + Square2D[k].y[j]=j; + } + } + } + for(i=0;i<16;i++) { + Write4CLine(Square2D[i], i, test.File); + } + + + /* + for(i=0;i<60;i++) { + for(j=0;j<64;j++) { + /*R = (val >> 8) & 0x0F; + G = (val >> 4) & 0x0F; + B = (val >> 0) & 0x0F;*/ + + /* WriteTGAPixel(((i*4) & 0xF0)*255/240,((j*4) & 0xF0)*255/240,255,test.File); + val++; + } + }*/ + fclose(test.File); +} + +/*RgbColor AptToRgb(AptColor apt) { + RgbColor rgb; + uint16_t val = (apt.sv/4) * 64 + (apt.h/4); + uint8_t R = (val >> 8) & 0xF; + uint8_t G = (val >> 4) & 0xF; + uint8_t B = (val >> 0) & 0xF; + rgb.r = R << 4; rgb.g = G << 4; rgb.b = B << 4; + return rgb; +}*/ + +/*AptColor RgbToApt(RgbColor rgb) { + AptColor apt; + uint8_t R = rgb.r >> 4; + uint8_t G = rgb.g >> 4; + uint8_t B = rgb.b >> 4; + uint16_t val = (R << 8) + (G << 4) + B; + uint16_t x_val = val % 64; + uint16_t y_val = (val - x_val) / 64; + apt.h = (x_val & 0x3F) * 4; + apt.sv = (y_val & 0x3F) * 4; + return apt; +}*/ + +void WriteGLine(ColorMap16 cmap, uint8_t B,FILE *zp) { + int i,j; + for(j=0;j<16;j++) { + for(i=0;i<4;i++) { + WriteTGAPixel(cmap.y[i],cmap.x[j],B,zp); + } + } +} + +void Write4CLine(ColorMap Square2D, uint8_t Bcol, FILE *zp) { + int i,j; + uint8_t R,G,B; + ColorMap16 MapLine[4]; + for(i=0;i<16;i++) { + for(j=0;j<16;j++) { + R = Square2D.x[i] * 255/15; + G = Square2D.y[j] * 255/15; + B = Bcol*255/15; + if((i<4) && (j<=16)) { + MapLine[0].y[i]=R; + MapLine[0].x[j]=G; + } + if(((i<8) && (i>=4)) && (j<=16)) { + MapLine[1].y[i-4]=R; + MapLine[1].x[j]=G; + } + if(((i<12) && (i>=8)) && (j<=16)) { + MapLine[2].y[i-8]=R; + MapLine[2].x[j]=G; + } + if(((i<16) && (i>=12)) && (j<=16)) { + MapLine[3].y[i-12]=R; + MapLine[3].x[j]=G; + } + } + } + WriteGLine(MapLine[0],B,zp); + WriteGLine(MapLine[1],B,zp); + WriteGLine(MapLine[2],B,zp); + WriteGLine(MapLine[3],B,zp); + + +} \ No newline at end of file diff --git a/imgc.make b/imgc.make index 2914da0..c082995 100755 --- a/imgc.make +++ b/imgc.make @@ -1,2 +1,2 @@ #!/bin/sh -gcc image.c img.c aptcode.c -Wall -o imgc -std=c99 +gcc image.c img.c aptcode.c -Wall -o imgc -std=c99 -lm diff --git a/imgtable.h b/imgtable.h new file mode 100644 index 0000000..c8f88cc --- /dev/null +++ b/imgtable.h @@ -0,0 +1,71 @@ +#ifndef NA_IMAGE_TABLE_H_ +#define NA_IMAGE_TABLE_H_ +#define IMG_LUT_WIDTH 64 +#define IMG_LUT_HEIGHT 64 +static const uint16_t LUTFromApt[64][64] = { +0,256,512,768,16,272,528,784,32,288,544,800,48,304,560,816,64,320,576,832,80,336,592,848,96,352,608,864,112,368,624,880,128,384,640,896,144,400,656,912,160,416,672,928,176,432,688,944,192,448,704,960,208,464,720,976,224,480,736,992,240,496,752,1008, +1024,1280,1536,1792,1040,1296,1552,1808,1056,1312,1568,1824,1072,1328,1584,1840,1088,1344,1600,1856,1104,1360,1616,1872,1120,1376,1632,1888,1136,1392,1648,1904,1152,1408,1664,1920,1168,1424,1680,1936,1184,1440,1696,1952,1200,1456,1712,1968,1216,1472,1728,1984,1232,1488,1744,2000,1248,1504,1760,2016,1264,1520,1776,2032, +2048,2304,2560,2816,2064,2320,2576,2832,2080,2336,2592,2848,2096,2352,2608,2864,2112,2368,2624,2880,2128,2384,2640,2896,2144,2400,2656,2912,2160,2416,2672,2928,2176,2432,2688,2944,2192,2448,2704,2960,2208,2464,2720,2976,2224,2480,2736,2992,2240,2496,2752,3008,2256,2512,2768,3024,2272,2528,2784,3040,2288,2544,2800,3056, +3072,3328,3584,3840,3088,3344,3600,3856,3104,3360,3616,3872,3120,3376,3632,3888,3136,3392,3648,3904,3152,3408,3664,3920,3168,3424,3680,3936,3184,3440,3696,3952,3200,3456,3712,3968,3216,3472,3728,3984,3232,3488,3744,4000,3248,3504,3760,4016,3264,3520,3776,4032,3280,3536,3792,4048,3296,3552,3808,4064,3312,3568,3824,4080, +3073,3329,3585,3841,3089,3345,3601,3857,3105,3361,3617,3873,3121,3377,3633,3889,3137,3393,3649,3905,3153,3409,3665,3921,3169,3425,3681,3937,3185,3441,3697,3953,3201,3457,3713,3969,3217,3473,3729,3985,3233,3489,3745,4001,3249,3505,3761,4017,3265,3521,3777,4033,3281,3537,3793,4049,3297,3553,3809,4065,3313,3569,3825,4081, +2049,2305,2561,2817,2065,2321,2577,2833,2081,2337,2593,2849,2097,2353,2609,2865,2113,2369,2625,2881,2129,2385,2641,2897,2145,2401,2657,2913,2161,2417,2673,2929,2177,2433,2689,2945,2193,2449,2705,2961,2209,2465,2721,2977,2225,2481,2737,2993,2241,2497,2753,3009,2257,2513,2769,3025,2273,2529,2785,3041,2289,2545,2801,3057, +1025,1281,1537,1793,1041,1297,1553,1809,1057,1313,1569,1825,1073,1329,1585,1841,1089,1345,1601,1857,1105,1361,1617,1873,1121,1377,1633,1889,1137,1393,1649,1905,1153,1409,1665,1921,1169,1425,1681,1937,1185,1441,1697,1953,1201,1457,1713,1969,1217,1473,1729,1985,1233,1489,1745,2001,1249,1505,1761,2017,1265,1521,1777,2033, +1,257,513,769,17,273,529,785,33,289,545,801,49,305,561,817,65,321,577,833,81,337,593,849,97,353,609,865,113,369,625,881,129,385,641,897,145,401,657,913,161,417,673,929,177,433,689,945,193,449,705,961,209,465,721,977,225,481,737,993,241,497,753,1009, +2,258,514,770,18,274,530,786,34,290,546,802,50,306,562,818,66,322,578,834,82,338,594,850,98,354,610,866,114,370,626,882,130,386,642,898,146,402,658,914,162,418,674,930,178,434,690,946,194,450,706,962,210,466,722,978,226,482,738,994,242,498,754,1010, +1026,1282,1538,1794,1042,1298,1554,1810,1058,1314,1570,1826,1074,1330,1586,1842,1090,1346,1602,1858,1106,1362,1618,1874,1122,1378,1634,1890,1138,1394,1650,1906,1154,1410,1666,1922,1170,1426,1682,1938,1186,1442,1698,1954,1202,1458,1714,1970,1218,1474,1730,1986,1234,1490,1746,2002,1250,1506,1762,2018,1266,1522,1778,2034, +2050,2306,2562,2818,2066,2322,2578,2834,2082,2338,2594,2850,2098,2354,2610,2866,2114,2370,2626,2882,2130,2386,2642,2898,2146,2402,2658,2914,2162,2418,2674,2930,2178,2434,2690,2946,2194,2450,2706,2962,2210,2466,2722,2978,2226,2482,2738,2994,2242,2498,2754,3010,2258,2514,2770,3026,2274,2530,2786,3042,2290,2546,2802,3058, +3074,3330,3586,3842,3090,3346,3602,3858,3106,3362,3618,3874,3122,3378,3634,3890,3138,3394,3650,3906,3154,3410,3666,3922,3170,3426,3682,3938,3186,3442,3698,3954,3202,3458,3714,3970,3218,3474,3730,3986,3234,3490,3746,4002,3250,3506,3762,4018,3266,3522,3778,4034,3282,3538,3794,4050,3298,3554,3810,4066,3314,3570,3826,4082, +3075,3331,3587,3843,3091,3347,3603,3859,3107,3363,3619,3875,3123,3379,3635,3891,3139,3395,3651,3907,3155,3411,3667,3923,3171,3427,3683,3939,3187,3443,3699,3955,3203,3459,3715,3971,3219,3475,3731,3987,3235,3491,3747,4003,3251,3507,3763,4019,3267,3523,3779,4035,3283,3539,3795,4051,3299,3555,3811,4067,3315,3571,3827,4083, +2051,2307,2563,2819,2067,2323,2579,2835,2083,2339,2595,2851,2099,2355,2611,2867,2115,2371,2627,2883,2131,2387,2643,2899,2147,2403,2659,2915,2163,2419,2675,2931,2179,2435,2691,2947,2195,2451,2707,2963,2211,2467,2723,2979,2227,2483,2739,2995,2243,2499,2755,3011,2259,2515,2771,3027,2275,2531,2787,3043,2291,2547,2803,3059, +1027,1283,1539,1795,1043,1299,1555,1811,1059,1315,1571,1827,1075,1331,1587,1843,1091,1347,1603,1859,1107,1363,1619,1875,1123,1379,1635,1891,1139,1395,1651,1907,1155,1411,1667,1923,1171,1427,1683,1939,1187,1443,1699,1955,1203,1459,1715,1971,1219,1475,1731,1987,1235,1491,1747,2003,1251,1507,1763,2019,1267,1523,1779,2035, +3,259,515,771,19,275,531,787,35,291,547,803,51,307,563,819,67,323,579,835,83,339,595,851,99,355,611,867,115,371,627,883,131,387,643,899,147,403,659,915,163,419,675,931,179,435,691,947,195,451,707,963,211,467,723,979,227,483,739,995,243,499,755,1011, +4,260,516,772,20,276,532,788,36,292,548,804,52,308,564,820,68,324,580,836,84,340,596,852,100,356,612,868,116,372,628,884,132,388,644,900,148,404,660,916,164,420,676,932,180,436,692,948,196,452,708,964,212,468,724,980,228,484,740,996,244,500,756,1012, +1028,1284,1540,1796,1044,1300,1556,1812,1060,1316,1572,1828,1076,1332,1588,1844,1092,1348,1604,1860,1108,1364,1620,1876,1124,1380,1636,1892,1140,1396,1652,1908,1156,1412,1668,1924,1172,1428,1684,1940,1188,1444,1700,1956,1204,1460,1716,1972,1220,1476,1732,1988,1236,1492,1748,2004,1252,1508,1764,2020,1268,1524,1780,2036, +2052,2308,2564,2820,2068,2324,2580,2836,2084,2340,2596,2852,2100,2356,2612,2868,2116,2372,2628,2884,2132,2388,2644,2900,2148,2404,2660,2916,2164,2420,2676,2932,2180,2436,2692,2948,2196,2452,2708,2964,2212,2468,2724,2980,2228,2484,2740,2996,2244,2500,2756,3012,2260,2516,2772,3028,2276,2532,2788,3044,2292,2548,2804,3060, +3076,3332,3588,3844,3092,3348,3604,3860,3108,3364,3620,3876,3124,3380,3636,3892,3140,3396,3652,3908,3156,3412,3668,3924,3172,3428,3684,3940,3188,3444,3700,3956,3204,3460,3716,3972,3220,3476,3732,3988,3236,3492,3748,4004,3252,3508,3764,4020,3268,3524,3780,4036,3284,3540,3796,4052,3300,3556,3812,4068,3316,3572,3828,4084, +3077,3333,3589,3845,3093,3349,3605,3861,3109,3365,3621,3877,3125,3381,3637,3893,3141,3397,3653,3909,3157,3413,3669,3925,3173,3429,3685,3941,3189,3445,3701,3957,3205,3461,3717,3973,3221,3477,3733,3989,3237,3493,3749,4005,3253,3509,3765,4021,3269,3525,3781,4037,3285,3541,3797,4053,3301,3557,3813,4069,3317,3573,3829,4085, +2053,2309,2565,2821,2069,2325,2581,2837,2085,2341,2597,2853,2101,2357,2613,2869,2117,2373,2629,2885,2133,2389,2645,2901,2149,2405,2661,2917,2165,2421,2677,2933,2181,2437,2693,2949,2197,2453,2709,2965,2213,2469,2725,2981,2229,2485,2741,2997,2245,2501,2757,3013,2261,2517,2773,3029,2277,2533,2789,3045,2293,2549,2805,3061, +1029,1285,1541,1797,1045,1301,1557,1813,1061,1317,1573,1829,1077,1333,1589,1845,1093,1349,1605,1861,1109,1365,1621,1877,1125,1381,1637,1893,1141,1397,1653,1909,1157,1413,1669,1925,1173,1429,1685,1941,1189,1445,1701,1957,1205,1461,1717,1973,1221,1477,1733,1989,1237,1493,1749,2005,1253,1509,1765,2021,1269,1525,1781,2037, +5,261,517,773,21,277,533,789,37,293,549,805,53,309,565,821,69,325,581,837,85,341,597,853,101,357,613,869,117,373,629,885,133,389,645,901,149,405,661,917,165,421,677,933,181,437,693,949,197,453,709,965,213,469,725,981,229,485,741,997,245,501,757,1013, +6,262,518,774,22,278,534,790,38,294,550,806,54,310,566,822,70,326,582,838,86,342,598,854,102,358,614,870,118,374,630,886,134,390,646,902,150,406,662,918,166,422,678,934,182,438,694,950,198,454,710,966,214,470,726,982,230,486,742,998,246,502,758,1014, +1030,1286,1542,1798,1046,1302,1558,1814,1062,1318,1574,1830,1078,1334,1590,1846,1094,1350,1606,1862,1110,1366,1622,1878,1126,1382,1638,1894,1142,1398,1654,1910,1158,1414,1670,1926,1174,1430,1686,1942,1190,1446,1702,1958,1206,1462,1718,1974,1222,1478,1734,1990,1238,1494,1750,2006,1254,1510,1766,2022,1270,1526,1782,2038, +2054,2310,2566,2822,2070,2326,2582,2838,2086,2342,2598,2854,2102,2358,2614,2870,2118,2374,2630,2886,2134,2390,2646,2902,2150,2406,2662,2918,2166,2422,2678,2934,2182,2438,2694,2950,2198,2454,2710,2966,2214,2470,2726,2982,2230,2486,2742,2998,2246,2502,2758,3014,2262,2518,2774,3030,2278,2534,2790,3046,2294,2550,2806,3062, +3078,3334,3590,3846,3094,3350,3606,3862,3110,3366,3622,3878,3126,3382,3638,3894,3142,3398,3654,3910,3158,3414,3670,3926,3174,3430,3686,3942,3190,3446,3702,3958,3206,3462,3718,3974,3222,3478,3734,3990,3238,3494,3750,4006,3254,3510,3766,4022,3270,3526,3782,4038,3286,3542,3798,4054,3302,3558,3814,4070,3318,3574,3830,4086, +3079,3335,3591,3847,3095,3351,3607,3863,3111,3367,3623,3879,3127,3383,3639,3895,3143,3399,3655,3911,3159,3415,3671,3927,3175,3431,3687,3943,3191,3447,3703,3959,3207,3463,3719,3975,3223,3479,3735,3991,3239,3495,3751,4007,3255,3511,3767,4023,3271,3527,3783,4039,3287,3543,3799,4055,3303,3559,3815,4071,3319,3575,3831,4087, +2055,2311,2567,2823,2071,2327,2583,2839,2087,2343,2599,2855,2103,2359,2615,2871,2119,2375,2631,2887,2135,2391,2647,2903,2151,2407,2663,2919,2167,2423,2679,2935,2183,2439,2695,2951,2199,2455,2711,2967,2215,2471,2727,2983,2231,2487,2743,2999,2247,2503,2759,3015,2263,2519,2775,3031,2279,2535,2791,3047,2295,2551,2807,3063, +1031,1287,1543,1799,1047,1303,1559,1815,1063,1319,1575,1831,1079,1335,1591,1847,1095,1351,1607,1863,1111,1367,1623,1879,1127,1383,1639,1895,1143,1399,1655,1911,1159,1415,1671,1927,1175,1431,1687,1943,1191,1447,1703,1959,1207,1463,1719,1975,1223,1479,1735,1991,1239,1495,1751,2007,1255,1511,1767,2023,1271,1527,1783,2039, +7,263,519,775,23,279,535,791,39,295,551,807,55,311,567,823,71,327,583,839,87,343,599,855,103,359,615,871,119,375,631,887,135,391,647,903,151,407,663,919,167,423,679,935,183,439,695,951,199,455,711,967,215,471,727,983,231,487,743,999,247,503,759,1015, +8,264,520,776,24,280,536,792,40,296,552,808,56,312,568,824,72,328,584,840,88,344,600,856,104,360,616,872,120,376,632,888,136,392,648,904,152,408,664,920,168,424,680,936,184,440,696,952,200,456,712,968,216,472,728,984,232,488,744,1000,248,504,760,1016, +1032,1288,1544,1800,1048,1304,1560,1816,1064,1320,1576,1832,1080,1336,1592,1848,1096,1352,1608,1864,1112,1368,1624,1880,1128,1384,1640,1896,1144,1400,1656,1912,1160,1416,1672,1928,1176,1432,1688,1944,1192,1448,1704,1960,1208,1464,1720,1976,1224,1480,1736,1992,1240,1496,1752,2008,1256,1512,1768,2024,1272,1528,1784,2040, +2056,2312,2568,2824,2072,2328,2584,2840,2088,2344,2600,2856,2104,2360,2616,2872,2120,2376,2632,2888,2136,2392,2648,2904,2152,2408,2664,2920,2168,2424,2680,2936,2184,2440,2696,2952,2200,2456,2712,2968,2216,2472,2728,2984,2232,2488,2744,3000,2248,2504,2760,3016,2264,2520,2776,3032,2280,2536,2792,3048,2296,2552,2808,3064, +3080,3336,3592,3848,3096,3352,3608,3864,3112,3368,3624,3880,3128,3384,3640,3896,3144,3400,3656,3912,3160,3416,3672,3928,3176,3432,3688,3944,3192,3448,3704,3960,3208,3464,3720,3976,3224,3480,3736,3992,3240,3496,3752,4008,3256,3512,3768,4024,3272,3528,3784,4040,3288,3544,3800,4056,3304,3560,3816,4072,3320,3576,3832,4088, +3081,3337,3593,3849,3097,3353,3609,3865,3113,3369,3625,3881,3129,3385,3641,3897,3145,3401,3657,3913,3161,3417,3673,3929,3177,3433,3689,3945,3193,3449,3705,3961,3209,3465,3721,3977,3225,3481,3737,3993,3241,3497,3753,4009,3257,3513,3769,4025,3273,3529,3785,4041,3289,3545,3801,4057,3305,3561,3817,4073,3321,3577,3833,4089, +2057,2313,2569,2825,2073,2329,2585,2841,2089,2345,2601,2857,2105,2361,2617,2873,2121,2377,2633,2889,2137,2393,2649,2905,2153,2409,2665,2921,2169,2425,2681,2937,2185,2441,2697,2953,2201,2457,2713,2969,2217,2473,2729,2985,2233,2489,2745,3001,2249,2505,2761,3017,2265,2521,2777,3033,2281,2537,2793,3049,2297,2553,2809,3065, +1033,1289,1545,1801,1049,1305,1561,1817,1065,1321,1577,1833,1081,1337,1593,1849,1097,1353,1609,1865,1113,1369,1625,1881,1129,1385,1641,1897,1145,1401,1657,1913,1161,1417,1673,1929,1177,1433,1689,1945,1193,1449,1705,1961,1209,1465,1721,1977,1225,1481,1737,1993,1241,1497,1753,2009,1257,1513,1769,2025,1273,1529,1785,2041, +9,265,521,777,25,281,537,793,41,297,553,809,57,313,569,825,73,329,585,841,89,345,601,857,105,361,617,873,121,377,633,889,137,393,649,905,153,409,665,921,169,425,681,937,185,441,697,953,201,457,713,969,217,473,729,985,233,489,745,1001,249,505,761,1017, +10,266,522,778,26,282,538,794,42,298,554,810,58,314,570,826,74,330,586,842,90,346,602,858,106,362,618,874,122,378,634,890,138,394,650,906,154,410,666,922,170,426,682,938,186,442,698,954,202,458,714,970,218,474,730,986,234,490,746,1002,250,506,762,1018, +1034,1290,1546,1802,1050,1306,1562,1818,1066,1322,1578,1834,1082,1338,1594,1850,1098,1354,1610,1866,1114,1370,1626,1882,1130,1386,1642,1898,1146,1402,1658,1914,1162,1418,1674,1930,1178,1434,1690,1946,1194,1450,1706,1962,1210,1466,1722,1978,1226,1482,1738,1994,1242,1498,1754,2010,1258,1514,1770,2026,1274,1530,1786,2042, +2058,2314,2570,2826,2074,2330,2586,2842,2090,2346,2602,2858,2106,2362,2618,2874,2122,2378,2634,2890,2138,2394,2650,2906,2154,2410,2666,2922,2170,2426,2682,2938,2186,2442,2698,2954,2202,2458,2714,2970,2218,2474,2730,2986,2234,2490,2746,3002,2250,2506,2762,3018,2266,2522,2778,3034,2282,2538,2794,3050,2298,2554,2810,3066, +3082,3338,3594,3850,3098,3354,3610,3866,3114,3370,3626,3882,3130,3386,3642,3898,3146,3402,3658,3914,3162,3418,3674,3930,3178,3434,3690,3946,3194,3450,3706,3962,3210,3466,3722,3978,3226,3482,3738,3994,3242,3498,3754,4010,3258,3514,3770,4026,3274,3530,3786,4042,3290,3546,3802,4058,3306,3562,3818,4074,3322,3578,3834,4090, +3083,3339,3595,3851,3099,3355,3611,3867,3115,3371,3627,3883,3131,3387,3643,3899,3147,3403,3659,3915,3163,3419,3675,3931,3179,3435,3691,3947,3195,3451,3707,3963,3211,3467,3723,3979,3227,3483,3739,3995,3243,3499,3755,4011,3259,3515,3771,4027,3275,3531,3787,4043,3291,3547,3803,4059,3307,3563,3819,4075,3323,3579,3835,4091, +2059,2315,2571,2827,2075,2331,2587,2843,2091,2347,2603,2859,2107,2363,2619,2875,2123,2379,2635,2891,2139,2395,2651,2907,2155,2411,2667,2923,2171,2427,2683,2939,2187,2443,2699,2955,2203,2459,2715,2971,2219,2475,2731,2987,2235,2491,2747,3003,2251,2507,2763,3019,2267,2523,2779,3035,2283,2539,2795,3051,2299,2555,2811,3067, +1035,1291,1547,1803,1051,1307,1563,1819,1067,1323,1579,1835,1083,1339,1595,1851,1099,1355,1611,1867,1115,1371,1627,1883,1131,1387,1643,1899,1147,1403,1659,1915,1163,1419,1675,1931,1179,1435,1691,1947,1195,1451,1707,1963,1211,1467,1723,1979,1227,1483,1739,1995,1243,1499,1755,2011,1259,1515,1771,2027,1275,1531,1787,2043, +11,267,523,779,27,283,539,795,43,299,555,811,59,315,571,827,75,331,587,843,91,347,603,859,107,363,619,875,123,379,635,891,139,395,651,907,155,411,667,923,171,427,683,939,187,443,699,955,203,459,715,971,219,475,731,987,235,491,747,1003,251,507,763,1019, +12,268,524,780,28,284,540,796,44,300,556,812,60,316,572,828,76,332,588,844,92,348,604,860,108,364,620,876,124,380,636,892,140,396,652,908,156,412,668,924,172,428,684,940,188,444,700,956,204,460,716,972,220,476,732,988,236,492,748,1004,252,508,764,1020, +1036,1292,1548,1804,1052,1308,1564,1820,1068,1324,1580,1836,1084,1340,1596,1852,1100,1356,1612,1868,1116,1372,1628,1884,1132,1388,1644,1900,1148,1404,1660,1916,1164,1420,1676,1932,1180,1436,1692,1948,1196,1452,1708,1964,1212,1468,1724,1980,1228,1484,1740,1996,1244,1500,1756,2012,1260,1516,1772,2028,1276,1532,1788,2044, +2060,2316,2572,2828,2076,2332,2588,2844,2092,2348,2604,2860,2108,2364,2620,2876,2124,2380,2636,2892,2140,2396,2652,2908,2156,2412,2668,2924,2172,2428,2684,2940,2188,2444,2700,2956,2204,2460,2716,2972,2220,2476,2732,2988,2236,2492,2748,3004,2252,2508,2764,3020,2268,2524,2780,3036,2284,2540,2796,3052,2300,2556,2812,3068, +3084,3340,3596,3852,3100,3356,3612,3868,3116,3372,3628,3884,3132,3388,3644,3900,3148,3404,3660,3916,3164,3420,3676,3932,3180,3436,3692,3948,3196,3452,3708,3964,3212,3468,3724,3980,3228,3484,3740,3996,3244,3500,3756,4012,3260,3516,3772,4028,3276,3532,3788,4044,3292,3548,3804,4060,3308,3564,3820,4076,3324,3580,3836,4092, +3085,3341,3597,3853,3101,3357,3613,3869,3117,3373,3629,3885,3133,3389,3645,3901,3149,3405,3661,3917,3165,3421,3677,3933,3181,3437,3693,3949,3197,3453,3709,3965,3213,3469,3725,3981,3229,3485,3741,3997,3245,3501,3757,4013,3261,3517,3773,4029,3277,3533,3789,4045,3293,3549,3805,4061,3309,3565,3821,4077,3325,3581,3837,4093, +2061,2317,2573,2829,2077,2333,2589,2845,2093,2349,2605,2861,2109,2365,2621,2877,2125,2381,2637,2893,2141,2397,2653,2909,2157,2413,2669,2925,2173,2429,2685,2941,2189,2445,2701,2957,2205,2461,2717,2973,2221,2477,2733,2989,2237,2493,2749,3005,2253,2509,2765,3021,2269,2525,2781,3037,2285,2541,2797,3053,2301,2557,2813,3069, +1037,1293,1549,1805,1053,1309,1565,1821,1069,1325,1581,1837,1085,1341,1597,1853,1101,1357,1613,1869,1117,1373,1629,1885,1133,1389,1645,1901,1149,1405,1661,1917,1165,1421,1677,1933,1181,1437,1693,1949,1197,1453,1709,1965,1213,1469,1725,1981,1229,1485,1741,1997,1245,1501,1757,2013,1261,1517,1773,2029,1277,1533,1789,2045, +13,269,525,781,29,285,541,797,45,301,557,813,61,317,573,829,77,333,589,845,93,349,605,861,109,365,621,877,125,381,637,893,141,397,653,909,157,413,669,925,173,429,685,941,189,445,701,957,205,461,717,973,221,477,733,989,237,493,749,1005,253,509,765,1021, +14,270,526,782,30,286,542,798,46,302,558,814,62,318,574,830,78,334,590,846,94,350,606,862,110,366,622,878,126,382,638,894,142,398,654,910,158,414,670,926,174,430,686,942,190,446,702,958,206,462,718,974,222,478,734,990,238,494,750,1006,254,510,766,1022, +1038,1294,1550,1806,1054,1310,1566,1822,1070,1326,1582,1838,1086,1342,1598,1854,1102,1358,1614,1870,1118,1374,1630,1886,1134,1390,1646,1902,1150,1406,1662,1918,1166,1422,1678,1934,1182,1438,1694,1950,1198,1454,1710,1966,1214,1470,1726,1982,1230,1486,1742,1998,1246,1502,1758,2014,1262,1518,1774,2030,1278,1534,1790,2046, +2062,2318,2574,2830,2078,2334,2590,2846,2094,2350,2606,2862,2110,2366,2622,2878,2126,2382,2638,2894,2142,2398,2654,2910,2158,2414,2670,2926,2174,2430,2686,2942,2190,2446,2702,2958,2206,2462,2718,2974,2222,2478,2734,2990,2238,2494,2750,3006,2254,2510,2766,3022,2270,2526,2782,3038,2286,2542,2798,3054,2302,2558,2814,3070, +3086,3342,3598,3854,3102,3358,3614,3870,3118,3374,3630,3886,3134,3390,3646,3902,3150,3406,3662,3918,3166,3422,3678,3934,3182,3438,3694,3950,3198,3454,3710,3966,3214,3470,3726,3982,3230,3486,3742,3998,3246,3502,3758,4014,3262,3518,3774,4030,3278,3534,3790,4046,3294,3550,3806,4062,3310,3566,3822,4078,3326,3582,3838,4094, +3087,3343,3599,3855,3103,3359,3615,3871,3119,3375,3631,3887,3135,3391,3647,3903,3151,3407,3663,3919,3167,3423,3679,3935,3183,3439,3695,3951,3199,3455,3711,3967,3215,3471,3727,3983,3231,3487,3743,3999,3247,3503,3759,4015,3263,3519,3775,4031,3279,3535,3791,4047,3295,3551,3807,4063,3311,3567,3823,4079,3327,3583,3839,4095, +2063,2319,2575,2831,2079,2335,2591,2847,2095,2351,2607,2863,2111,2367,2623,2879,2127,2383,2639,2895,2143,2399,2655,2911,2159,2415,2671,2927,2175,2431,2687,2943,2191,2447,2703,2959,2207,2463,2719,2975,2223,2479,2735,2991,2239,2495,2751,3007,2255,2511,2767,3023,2271,2527,2783,3039,2287,2543,2799,3055,2303,2559,2815,3071, +1039,1295,1551,1807,1055,1311,1567,1823,1071,1327,1583,1839,1087,1343,1599,1855,1103,1359,1615,1871,1119,1375,1631,1887,1135,1391,1647,1903,1151,1407,1663,1919,1167,1423,1679,1935,1183,1439,1695,1951,1199,1455,1711,1967,1215,1471,1727,1983,1231,1487,1743,1999,1247,1503,1759,2015,1263,1519,1775,2031,1279,1535,1791,2047, +15,271,527,783,31,287,543,799,47,303,559,815,63,319,575,831,79,335,591,847,95,351,607,863,111,367,623,879,127,383,639,895,143,399,655,911,159,415,671,927,175,431,687,943,191,447,703,959,207,463,719,975,223,479,735,991,239,495,751,1007,255,511,767,1023 +}; +#endif diff --git a/imgtable_apt.h b/imgtable_apt.h new file mode 100644 index 0000000..71f0ccf --- /dev/null +++ b/imgtable_apt.h @@ -0,0 +1,8 @@ +#ifndef NA_IMAGE_RGB_TABLE_H_ +#define NA_IMAGE_RGB_TABLE_H_ +#define IMG_LUT_RGB_WIDTH 1 +#define IMG_LUT_RGB_HEIGHT 4096 +static const uint16_t LUTFromRgb[4096] = { +0,448,512,960,1024,1472,1536,1984,2048,2496,2560,3008,3072,3520,3584,4032,4,452,516,964,1028,1476,1540,1988,2052,2500,2564,3012,3076,3524,3588,4036,8,456,520,968,1032,1480,1544,1992,2056,2504,2568,3016,3080,3528,3592,4040,12,460,524,972,1036,1484,1548,1996,2060,2508,2572,3020,3084,3532,3596,4044,16,464,528,976,1040,1488,1552,2000,2064,2512,2576,3024,3088,3536,3600,4048,20,468,532,980,1044,1492,1556,2004,2068,2516,2580,3028,3092,3540,3604,4052,24,472,536,984,1048,1496,1560,2008,2072,2520,2584,3032,3096,3544,3608,4056,28,476,540,988,1052,1500,1564,2012,2076,2524,2588,3036,3100,3548,3612,4060,32,480,544,992,1056,1504,1568,2016,2080,2528,2592,3040,3104,3552,3616,4064,36,484,548,996,1060,1508,1572,2020,2084,2532,2596,3044,3108,3556,3620,4068,40,488,552,1000,1064,1512,1576,2024,2088,2536,2600,3048,3112,3560,3624,4072,44,492,556,1004,1068,1516,1580,2028,2092,2540,2604,3052,3116,3564,3628,4076,48,496,560,1008,1072,1520,1584,2032,2096,2544,2608,3056,3120,3568,3632,4080,52,500,564,1012,1076,1524,1588,2036,2100,2548,2612,3060,3124,3572,3636,4084,56,504,568,1016,1080,1528,1592,2040,2104,2552,2616,3064,3128,3576,3640,4088,60,508,572,1020,1084,1532,1596,2044,2108,2556,2620,3068,3132,3580,3644,4092,1,449,513,961,1025,1473,1537,1985,2049,2497,2561,3009,3073,3521,3585,4033,5,453,517,965,1029,1477,1541,1989,2053,2501,2565,3013,3077,3525,3589,4037,9,457,521,969,1033,1481,1545,1993,2057,2505,2569,3017,3081,3529,3593,4041,13,461,525,973,1037,1485,1549,1997,2061,2509,2573,3021,3085,3533,3597,4045,17,465,529,977,1041,1489,1553,2001,2065,2513,2577,3025,3089,3537,3601,4049,21,469,533,981,1045,1493,1557,2005,2069,2517,2581,3029,3093,3541,3605,4053,25,473,537,985,1049,1497,1561,2009,2073,2521,2585,3033,3097,3545,3609,4057,29,477,541,989,1053,1501,1565,2013,2077,2525,2589,3037,3101,3549,3613,4061,33,481,545,993,1057,1505,1569,2017,2081,2529,2593,3041,3105,3553,3617,4065,37,485,549,997,1061,1509,1573,2021,2085,2533,2597,3045,3109,3557,3621,4069,41,489,553,1001,1065,1513,1577,2025,2089,2537,2601,3049,3113,3561,3625,4073,45,493,557,1005,1069,1517,1581,2029,2093,2541,2605,3053,3117,3565,3629,4077,49,497,561,1009,1073,1521,1585,2033,2097,2545,2609,3057,3121,3569,3633,4081,53,501,565,1013,1077,1525,1589,2037,2101,2549,2613,3061,3125,3573,3637,4085,57,505,569,1017,1081,1529,1593,2041,2105,2553,2617,3065,3129,3577,3641,4089,61,509,573,1021,1085,1533,1597,2045,2109,2557,2621,3069,3133,3581,3645,4093,2,450,514,962,1026,1474,1538,1986,2050,2498,2562,3010,3074,3522,3586,4034,6,454,518,966,1030,1478,1542,1990,2054,2502,2566,3014,3078,3526,3590,4038,10,458,522,970,1034,1482,1546,1994,2058,2506,2570,3018,3082,3530,3594,4042,14,462,526,974,1038,1486,1550,1998,2062,2510,2574,3022,3086,3534,3598,4046,18,466,530,978,1042,1490,1554,2002,2066,2514,2578,3026,3090,3538,3602,4050,22,470,534,982,1046,1494,1558,2006,2070,2518,2582,3030,3094,3542,3606,4054,26,474,538,986,1050,1498,1562,2010,2074,2522,2586,3034,3098,3546,3610,4058,30,478,542,990,1054,1502,1566,2014,2078,2526,2590,3038,3102,3550,3614,4062,34,482,546,994,1058,1506,1570,2018,2082,2530,2594,3042,3106,3554,3618,4066,38,486,550,998,1062,1510,1574,2022,2086,2534,2598,3046,3110,3558,3622,4070,42,490,554,1002,1066,1514,1578,2026,2090,2538,2602,3050,3114,3562,3626,4074,46,494,558,1006,1070,1518,1582,2030,2094,2542,2606,3054,3118,3566,3630,4078,50,498,562,1010,1074,1522,1586,2034,2098,2546,2610,3058,3122,3570,3634,4082,54,502,566,1014,1078,1526,1590,2038,2102,2550,2614,3062,3126,3574,3638,4086,58,506,570,1018,1082,1530,1594,2042,2106,2554,2618,3066,3130,3578,3642,4090,62,510,574,1022,1086,1534,1598,2046,2110,2558,2622,3070,3134,3582,3646,4094,3,451,515,963,1027,1475,1539,1987,2051,2499,2563,3011,3075,3523,3587,4035,7,455,519,967,1031,1479,1543,1991,2055,2503,2567,3015,3079,3527,3591,4039,11,459,523,971,1035,1483,1547,1995,2059,2507,2571,3019,3083,3531,3595,4043,15,463,527,975,1039,1487,1551,1999,2063,2511,2575,3023,3087,3535,3599,4047,19,467,531,979,1043,1491,1555,2003,2067,2515,2579,3027,3091,3539,3603,4051,23,471,535,983,1047,1495,1559,2007,2071,2519,2583,3031,3095,3543,3607,4055,27,475,539,987,1051,1499,1563,2011,2075,2523,2587,3035,3099,3547,3611,4059,31,479,543,991,1055,1503,1567,2015,2079,2527,2591,3039,3103,3551,3615,4063,35,483,547,995,1059,1507,1571,2019,2083,2531,2595,3043,3107,3555,3619,4067,39,487,551,999,1063,1511,1575,2023,2087,2535,2599,3047,3111,3559,3623,4071,43,491,555,1003,1067,1515,1579,2027,2091,2539,2603,3051,3115,3563,3627,4075,47,495,559,1007,1071,1519,1583,2031,2095,2543,2607,3055,3119,3567,3631,4079,51,499,563,1011,1075,1523,1587,2035,2099,2547,2611,3059,3123,3571,3635,4083,55,503,567,1015,1079,1527,1591,2039,2103,2551,2615,3063,3127,3575,3639,4087,59,507,571,1019,1083,1531,1595,2043,2107,2555,2619,3067,3131,3579,3643,4091,63,511,575,1023,1087,1535,1599,2047,2111,2559,2623,3071,3135,3583,3647,4095,64,384,576,896,1088,1408,1600,1920,2112,2432,2624,2944,3136,3456,3648,3968,68,388,580,900,1092,1412,1604,1924,2116,2436,2628,2948,3140,3460,3652,3972,72,392,584,904,1096,1416,1608,1928,2120,2440,2632,2952,3144,3464,3656,3976,76,396,588,908,1100,1420,1612,1932,2124,2444,2636,2956,3148,3468,3660,3980,80,400,592,912,1104,1424,1616,1936,2128,2448,2640,2960,3152,3472,3664,3984,84,404,596,916,1108,1428,1620,1940,2132,2452,2644,2964,3156,3476,3668,3988,88,408,600,920,1112,1432,1624,1944,2136,2456,2648,2968,3160,3480,3672,3992,92,412,604,924,1116,1436,1628,1948,2140,2460,2652,2972,3164,3484,3676,3996,96,416,608,928,1120,1440,1632,1952,2144,2464,2656,2976,3168,3488,3680,4000,100,420,612,932,1124,1444,1636,1956,2148,2468,2660,2980,3172,3492,3684,4004,104,424,616,936,1128,1448,1640,1960,2152,2472,2664,2984,3176,3496,3688,4008,108,428,620,940,1132,1452,1644,1964,2156,2476,2668,2988,3180,3500,3692,4012,112,432,624,944,1136,1456,1648,1968,2160,2480,2672,2992,3184,3504,3696,4016,116,436,628,948,1140,1460,1652,1972,2164,2484,2676,2996,3188,3508,3700,4020,120,440,632,952,1144,1464,1656,1976,2168,2488,2680,3000,3192,3512,3704,4024,124,444,636,956,1148,1468,1660,1980,2172,2492,2684,3004,3196,3516,3708,4028,65,385,577,897,1089,1409,1601,1921,2113,2433,2625,2945,3137,3457,3649,3969,69,389,581,901,1093,1413,1605,1925,2117,2437,2629,2949,3141,3461,3653,3973,73,393,585,905,1097,1417,1609,1929,2121,2441,2633,2953,3145,3465,3657,3977,77,397,589,909,1101,1421,1613,1933,2125,2445,2637,2957,3149,3469,3661,3981,81,401,593,913,1105,1425,1617,1937,2129,2449,2641,2961,3153,3473,3665,3985,85,405,597,917,1109,1429,1621,1941,2133,2453,2645,2965,3157,3477,3669,3989,89,409,601,921,1113,1433,1625,1945,2137,2457,2649,2969,3161,3481,3673,3993,93,413,605,925,1117,1437,1629,1949,2141,2461,2653,2973,3165,3485,3677,3997,97,417,609,929,1121,1441,1633,1953,2145,2465,2657,2977,3169,3489,3681,4001,101,421,613,933,1125,1445,1637,1957,2149,2469,2661,2981,3173,3493,3685,4005,105,425,617,937,1129,1449,1641,1961,2153,2473,2665,2985,3177,3497,3689,4009,109,429,621,941,1133,1453,1645,1965,2157,2477,2669,2989,3181,3501,3693,4013,113,433,625,945,1137,1457,1649,1969,2161,2481,2673,2993,3185,3505,3697,4017,117,437,629,949,1141,1461,1653,1973,2165,2485,2677,2997,3189,3509,3701,4021,121,441,633,953,1145,1465,1657,1977,2169,2489,2681,3001,3193,3513,3705,4025,125,445,637,957,1149,1469,1661,1981,2173,2493,2685,3005,3197,3517,3709,4029,66,386,578,898,1090,1410,1602,1922,2114,2434,2626,2946,3138,3458,3650,3970,70,390,582,902,1094,1414,1606,1926,2118,2438,2630,2950,3142,3462,3654,3974,74,394,586,906,1098,1418,1610,1930,2122,2442,2634,2954,3146,3466,3658,3978,78,398,590,910,1102,1422,1614,1934,2126,2446,2638,2958,3150,3470,3662,3982,82,402,594,914,1106,1426,1618,1938,2130,2450,2642,2962,3154,3474,3666,3986,86,406,598,918,1110,1430,1622,1942,2134,2454,2646,2966,3158,3478,3670,3990,90,410,602,922,1114,1434,1626,1946,2138,2458,2650,2970,3162,3482,3674,3994,94,414,606,926,1118,1438,1630,1950,2142,2462,2654,2974,3166,3486,3678,3998,98,418,610,930,1122,1442,1634,1954,2146,2466,2658,2978,3170,3490,3682,4002,102,422,614,934,1126,1446,1638,1958,2150,2470,2662,2982,3174,3494,3686,4006,106,426,618,938,1130,1450,1642,1962,2154,2474,2666,2986,3178,3498,3690,4010,110,430,622,942,1134,1454,1646,1966,2158,2478,2670,2990,3182,3502,3694,4014,114,434,626,946,1138,1458,1650,1970,2162,2482,2674,2994,3186,3506,3698,4018,118,438,630,950,1142,1462,1654,1974,2166,2486,2678,2998,3190,3510,3702,4022,122,442,634,954,1146,1466,1658,1978,2170,2490,2682,3002,3194,3514,3706,4026,126,446,638,958,1150,1470,1662,1982,2174,2494,2686,3006,3198,3518,3710,4030,67,387,579,899,1091,1411,1603,1923,2115,2435,2627,2947,3139,3459,3651,3971,71,391,583,903,1095,1415,1607,1927,2119,2439,2631,2951,3143,3463,3655,3975,75,395,587,907,1099,1419,1611,1931,2123,2443,2635,2955,3147,3467,3659,3979,79,399,591,911,1103,1423,1615,1935,2127,2447,2639,2959,3151,3471,3663,3983,83,403,595,915,1107,1427,1619,1939,2131,2451,2643,2963,3155,3475,3667,3987,87,407,599,919,1111,1431,1623,1943,2135,2455,2647,2967,3159,3479,3671,3991,91,411,603,923,1115,1435,1627,1947,2139,2459,2651,2971,3163,3483,3675,3995,95,415,607,927,1119,1439,1631,1951,2143,2463,2655,2975,3167,3487,3679,3999,99,419,611,931,1123,1443,1635,1955,2147,2467,2659,2979,3171,3491,3683,4003,103,423,615,935,1127,1447,1639,1959,2151,2471,2663,2983,3175,3495,3687,4007,107,427,619,939,1131,1451,1643,1963,2155,2475,2667,2987,3179,3499,3691,4011,111,431,623,943,1135,1455,1647,1967,2159,2479,2671,2991,3183,3503,3695,4015,115,435,627,947,1139,1459,1651,1971,2163,2483,2675,2995,3187,3507,3699,4019,119,439,631,951,1143,1463,1655,1975,2167,2487,2679,2999,3191,3511,3703,4023,123,443,635,955,1147,1467,1659,1979,2171,2491,2683,3003,3195,3515,3707,4027,127,447,639,959,1151,1471,1663,1983,2175,2495,2687,3007,3199,3519,3711,4031,128,320,640,832,1152,1344,1664,1856,2176,2368,2688,2880,3200,3392,3712,3904,132,324,644,836,1156,1348,1668,1860,2180,2372,2692,2884,3204,3396,3716,3908,136,328,648,840,1160,1352,1672,1864,2184,2376,2696,2888,3208,3400,3720,3912,140,332,652,844,1164,1356,1676,1868,2188,2380,2700,2892,3212,3404,3724,3916,144,336,656,848,1168,1360,1680,1872,2192,2384,2704,2896,3216,3408,3728,3920,148,340,660,852,1172,1364,1684,1876,2196,2388,2708,2900,3220,3412,3732,3924,152,344,664,856,1176,1368,1688,1880,2200,2392,2712,2904,3224,3416,3736,3928,156,348,668,860,1180,1372,1692,1884,2204,2396,2716,2908,3228,3420,3740,3932,160,352,672,864,1184,1376,1696,1888,2208,2400,2720,2912,3232,3424,3744,3936,164,356,676,868,1188,1380,1700,1892,2212,2404,2724,2916,3236,3428,3748,3940,168,360,680,872,1192,1384,1704,1896,2216,2408,2728,2920,3240,3432,3752,3944,172,364,684,876,1196,1388,1708,1900,2220,2412,2732,2924,3244,3436,3756,3948,176,368,688,880,1200,1392,1712,1904,2224,2416,2736,2928,3248,3440,3760,3952,180,372,692,884,1204,1396,1716,1908,2228,2420,2740,2932,3252,3444,3764,3956,184,376,696,888,1208,1400,1720,1912,2232,2424,2744,2936,3256,3448,3768,3960,188,380,700,892,1212,1404,1724,1916,2236,2428,2748,2940,3260,3452,3772,3964,129,321,641,833,1153,1345,1665,1857,2177,2369,2689,2881,3201,3393,3713,3905,133,325,645,837,1157,1349,1669,1861,2181,2373,2693,2885,3205,3397,3717,3909,137,329,649,841,1161,1353,1673,1865,2185,2377,2697,2889,3209,3401,3721,3913,141,333,653,845,1165,1357,1677,1869,2189,2381,2701,2893,3213,3405,3725,3917,145,337,657,849,1169,1361,1681,1873,2193,2385,2705,2897,3217,3409,3729,3921,149,341,661,853,1173,1365,1685,1877,2197,2389,2709,2901,3221,3413,3733,3925,153,345,665,857,1177,1369,1689,1881,2201,2393,2713,2905,3225,3417,3737,3929,157,349,669,861,1181,1373,1693,1885,2205,2397,2717,2909,3229,3421,3741,3933,161,353,673,865,1185,1377,1697,1889,2209,2401,2721,2913,3233,3425,3745,3937,165,357,677,869,1189,1381,1701,1893,2213,2405,2725,2917,3237,3429,3749,3941,169,361,681,873,1193,1385,1705,1897,2217,2409,2729,2921,3241,3433,3753,3945,173,365,685,877,1197,1389,1709,1901,2221,2413,2733,2925,3245,3437,3757,3949,177,369,689,881,1201,1393,1713,1905,2225,2417,2737,2929,3249,3441,3761,3953,181,373,693,885,1205,1397,1717,1909,2229,2421,2741,2933,3253,3445,3765,3957,185,377,697,889,1209,1401,1721,1913,2233,2425,2745,2937,3257,3449,3769,3961,189,381,701,893,1213,1405,1725,1917,2237,2429,2749,2941,3261,3453,3773,3965,130,322,642,834,1154,1346,1666,1858,2178,2370,2690,2882,3202,3394,3714,3906,134,326,646,838,1158,1350,1670,1862,2182,2374,2694,2886,3206,3398,3718,3910,138,330,650,842,1162,1354,1674,1866,2186,2378,2698,2890,3210,3402,3722,3914,142,334,654,846,1166,1358,1678,1870,2190,2382,2702,2894,3214,3406,3726,3918,146,338,658,850,1170,1362,1682,1874,2194,2386,2706,2898,3218,3410,3730,3922,150,342,662,854,1174,1366,1686,1878,2198,2390,2710,2902,3222,3414,3734,3926,154,346,666,858,1178,1370,1690,1882,2202,2394,2714,2906,3226,3418,3738,3930,158,350,670,862,1182,1374,1694,1886,2206,2398,2718,2910,3230,3422,3742,3934,162,354,674,866,1186,1378,1698,1890,2210,2402,2722,2914,3234,3426,3746,3938,166,358,678,870,1190,1382,1702,1894,2214,2406,2726,2918,3238,3430,3750,3942,170,362,682,874,1194,1386,1706,1898,2218,2410,2730,2922,3242,3434,3754,3946,174,366,686,878,1198,1390,1710,1902,2222,2414,2734,2926,3246,3438,3758,3950,178,370,690,882,1202,1394,1714,1906,2226,2418,2738,2930,3250,3442,3762,3954,182,374,694,886,1206,1398,1718,1910,2230,2422,2742,2934,3254,3446,3766,3958,186,378,698,890,1210,1402,1722,1914,2234,2426,2746,2938,3258,3450,3770,3962,190,382,702,894,1214,1406,1726,1918,2238,2430,2750,2942,3262,3454,3774,3966,131,323,643,835,1155,1347,1667,1859,2179,2371,2691,2883,3203,3395,3715,3907,135,327,647,839,1159,1351,1671,1863,2183,2375,2695,2887,3207,3399,3719,3911,139,331,651,843,1163,1355,1675,1867,2187,2379,2699,2891,3211,3403,3723,3915,143,335,655,847,1167,1359,1679,1871,2191,2383,2703,2895,3215,3407,3727,3919,147,339,659,851,1171,1363,1683,1875,2195,2387,2707,2899,3219,3411,3731,3923,151,343,663,855,1175,1367,1687,1879,2199,2391,2711,2903,3223,3415,3735,3927,155,347,667,859,1179,1371,1691,1883,2203,2395,2715,2907,3227,3419,3739,3931,159,351,671,863,1183,1375,1695,1887,2207,2399,2719,2911,3231,3423,3743,3935,163,355,675,867,1187,1379,1699,1891,2211,2403,2723,2915,3235,3427,3747,3939,167,359,679,871,1191,1383,1703,1895,2215,2407,2727,2919,3239,3431,3751,3943,171,363,683,875,1195,1387,1707,1899,2219,2411,2731,2923,3243,3435,3755,3947,175,367,687,879,1199,1391,1711,1903,2223,2415,2735,2927,3247,3439,3759,3951,179,371,691,883,1203,1395,1715,1907,2227,2419,2739,2931,3251,3443,3763,3955,183,375,695,887,1207,1399,1719,1911,2231,2423,2743,2935,3255,3447,3767,3959,187,379,699,891,1211,1403,1723,1915,2235,2427,2747,2939,3259,3451,3771,3963,191,383,703,895,1215,1407,1727,1919,2239,2431,2751,2943,3263,3455,3775,3967,192,256,704,768,1216,1280,1728,1792,2240,2304,2752,2816,3264,3328,3776,3840,196,260,708,772,1220,1284,1732,1796,2244,2308,2756,2820,3268,3332,3780,3844,200,264,712,776,1224,1288,1736,1800,2248,2312,2760,2824,3272,3336,3784,3848,204,268,716,780,1228,1292,1740,1804,2252,2316,2764,2828,3276,3340,3788,3852,208,272,720,784,1232,1296,1744,1808,2256,2320,2768,2832,3280,3344,3792,3856,212,276,724,788,1236,1300,1748,1812,2260,2324,2772,2836,3284,3348,3796,3860,216,280,728,792,1240,1304,1752,1816,2264,2328,2776,2840,3288,3352,3800,3864,220,284,732,796,1244,1308,1756,1820,2268,2332,2780,2844,3292,3356,3804,3868,224,288,736,800,1248,1312,1760,1824,2272,2336,2784,2848,3296,3360,3808,3872,228,292,740,804,1252,1316,1764,1828,2276,2340,2788,2852,3300,3364,3812,3876,232,296,744,808,1256,1320,1768,1832,2280,2344,2792,2856,3304,3368,3816,3880,236,300,748,812,1260,1324,1772,1836,2284,2348,2796,2860,3308,3372,3820,3884,240,304,752,816,1264,1328,1776,1840,2288,2352,2800,2864,3312,3376,3824,3888,244,308,756,820,1268,1332,1780,1844,2292,2356,2804,2868,3316,3380,3828,3892,248,312,760,824,1272,1336,1784,1848,2296,2360,2808,2872,3320,3384,3832,3896,252,316,764,828,1276,1340,1788,1852,2300,2364,2812,2876,3324,3388,3836,3900,193,257,705,769,1217,1281,1729,1793,2241,2305,2753,2817,3265,3329,3777,3841,197,261,709,773,1221,1285,1733,1797,2245,2309,2757,2821,3269,3333,3781,3845,201,265,713,777,1225,1289,1737,1801,2249,2313,2761,2825,3273,3337,3785,3849,205,269,717,781,1229,1293,1741,1805,2253,2317,2765,2829,3277,3341,3789,3853,209,273,721,785,1233,1297,1745,1809,2257,2321,2769,2833,3281,3345,3793,3857,213,277,725,789,1237,1301,1749,1813,2261,2325,2773,2837,3285,3349,3797,3861,217,281,729,793,1241,1305,1753,1817,2265,2329,2777,2841,3289,3353,3801,3865,221,285,733,797,1245,1309,1757,1821,2269,2333,2781,2845,3293,3357,3805,3869,225,289,737,801,1249,1313,1761,1825,2273,2337,2785,2849,3297,3361,3809,3873,229,293,741,805,1253,1317,1765,1829,2277,2341,2789,2853,3301,3365,3813,3877,233,297,745,809,1257,1321,1769,1833,2281,2345,2793,2857,3305,3369,3817,3881,237,301,749,813,1261,1325,1773,1837,2285,2349,2797,2861,3309,3373,3821,3885,241,305,753,817,1265,1329,1777,1841,2289,2353,2801,2865,3313,3377,3825,3889,245,309,757,821,1269,1333,1781,1845,2293,2357,2805,2869,3317,3381,3829,3893,249,313,761,825,1273,1337,1785,1849,2297,2361,2809,2873,3321,3385,3833,3897,253,317,765,829,1277,1341,1789,1853,2301,2365,2813,2877,3325,3389,3837,3901,194,258,706,770,1218,1282,1730,1794,2242,2306,2754,2818,3266,3330,3778,3842,198,262,710,774,1222,1286,1734,1798,2246,2310,2758,2822,3270,3334,3782,3846,202,266,714,778,1226,1290,1738,1802,2250,2314,2762,2826,3274,3338,3786,3850,206,270,718,782,1230,1294,1742,1806,2254,2318,2766,2830,3278,3342,3790,3854,210,274,722,786,1234,1298,1746,1810,2258,2322,2770,2834,3282,3346,3794,3858,214,278,726,790,1238,1302,1750,1814,2262,2326,2774,2838,3286,3350,3798,3862,218,282,730,794,1242,1306,1754,1818,2266,2330,2778,2842,3290,3354,3802,3866,222,286,734,798,1246,1310,1758,1822,2270,2334,2782,2846,3294,3358,3806,3870,226,290,738,802,1250,1314,1762,1826,2274,2338,2786,2850,3298,3362,3810,3874,230,294,742,806,1254,1318,1766,1830,2278,2342,2790,2854,3302,3366,3814,3878,234,298,746,810,1258,1322,1770,1834,2282,2346,2794,2858,3306,3370,3818,3882,238,302,750,814,1262,1326,1774,1838,2286,2350,2798,2862,3310,3374,3822,3886,242,306,754,818,1266,1330,1778,1842,2290,2354,2802,2866,3314,3378,3826,3890,246,310,758,822,1270,1334,1782,1846,2294,2358,2806,2870,3318,3382,3830,3894,250,314,762,826,1274,1338,1786,1850,2298,2362,2810,2874,3322,3386,3834,3898,254,318,766,830,1278,1342,1790,1854,2302,2366,2814,2878,3326,3390,3838,3902,195,259,707,771,1219,1283,1731,1795,2243,2307,2755,2819,3267,3331,3779,3843,199,263,711,775,1223,1287,1735,1799,2247,2311,2759,2823,3271,3335,3783,3847,203,267,715,779,1227,1291,1739,1803,2251,2315,2763,2827,3275,3339,3787,3851,207,271,719,783,1231,1295,1743,1807,2255,2319,2767,2831,3279,3343,3791,3855,211,275,723,787,1235,1299,1747,1811,2259,2323,2771,2835,3283,3347,3795,3859,215,279,727,791,1239,1303,1751,1815,2263,2327,2775,2839,3287,3351,3799,3863,219,283,731,795,1243,1307,1755,1819,2267,2331,2779,2843,3291,3355,3803,3867,223,287,735,799,1247,1311,1759,1823,2271,2335,2783,2847,3295,3359,3807,3871,227,291,739,803,1251,1315,1763,1827,2275,2339,2787,2851,3299,3363,3811,3875,231,295,743,807,1255,1319,1767,1831,2279,2343,2791,2855,3303,3367,3815,3879,235,299,747,811,1259,1323,1771,1835,2283,2347,2795,2859,3307,3371,3819,3883,239,303,751,815,1263,1327,1775,1839,2287,2351,2799,2863,3311,3375,3823,3887,243,307,755,819,1267,1331,1779,1843,2291,2355,2803,2867,3315,3379,3827,3891,247,311,759,823,1271,1335,1783,1847,2295,2359,2807,2871,3319,3383,3831,3895,251,315,763,827,1275,1339,1787,1851,2299,2363,2811,2875,3323,3387,3835,3899,255,319,767,831,1279,1343,1791,1855,2303,2367,2815,2879,3327,3391,3839,3903 +}; +#endif diff --git a/main.c b/main.c index ab9037d..d3bdc99 100644 --- a/main.c +++ b/main.c @@ -171,6 +171,7 @@ int main(int argc, char *argv[]) { case 'B': //Blue case 'N': //Negative case 'Y': //Yb + case 'C': //Color aptoptions.datab = optarg[0]; break; default: @@ -344,6 +345,9 @@ int main(int argc, char *argv[]) { else if(!strncmp(consoleinput,"mode Y",6)) { aptoptions.datab = 'Y'; } + else if(!strncmp(consoleinput,"mode C",6)) { + aptoptions.datab = 'C'; + } else if(!strncmp(consoleinput,"load1",5)) { char newimage[1024]; printf("New first image filename: "); @@ -442,7 +446,7 @@ void Usage(char *p_name) { printf(" -i Input TGA image (909px width, 24bit RGB)\n"); printf(" -s Second input TGA image (B channel, mode ignored)\n"); printf(" -d OSS audio device (default /dev/dsp) or file\n"); - printf(" -m Channel B data mode (R,G,B,N,Y)\n"); + printf(" -m Channel B data mode (R,G,B,N,Y,C)\n"); printf(" -I Read image data from stdin\n"); printf(" -O Write audio data to stdout\n"); printf(" -M Multi image reading from stdin\n"); diff --git a/noaa_apt.mk b/noaa_apt.mk index 7019775..a9eab70 100644 --- a/noaa_apt.mk +++ b/noaa_apt.mk @@ -13,7 +13,7 @@ CurrentFileName := CurrentFilePath := CurrentFileFullPath := User := -Date :=6.8.2019 +Date :=18.8.2019 CodeLitePath :="/home/guest/.codelite" LinkerName :=gcc SharedObjectLinkerName :=gcc -shared -fPIC diff --git a/noaa_apt.project b/noaa_apt.project index 63a27f7..b4cb29a 100644 --- a/noaa_apt.project +++ b/noaa_apt.project @@ -31,6 +31,7 @@ +