Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 582852
Collapse All | Expand All

(-)a/dcraw/dcraw.c (-30 / +37 lines)
Lines 5788-5817 void CLASS lin_interpolate() Link Here
5788
 */
5788
 */
5789
void CLASS vng_interpolate()
5789
void CLASS vng_interpolate()
5790
{
5790
{
5791
  static const signed char *cp, terms[] = {
5791
  struct interpolate_terms {
5792
    -2,-2,+0,-1,0,0x01, -2,-2,+0,+0,1,0x01, -2,-1,-1,+0,0,0x01,
5792
    signed char y1, x1, y2, x2, weight;
5793
    -2,-1,+0,-1,0,0x02, -2,-1,+0,+0,0,0x03, -2,-1,+0,+1,1,0x01,
5793
    unsigned char grads;
5794
    -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03,
5794
  };
5795
    -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06,
5795
  static const interpolate_terms terms[] = {
5796
    -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04,
5796
    {-2,-2,+0,-1,0,0x01}, {-2,-2,+0,+0,1,0x01}, {-2,-1,-1,+0,0,0x01},
5797
    -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01,
5797
    {-2,-1,+0,-1,0,0x02}, {-2,-1,+0,+0,0,0x03}, {-2,-1,+0,+1,1,0x01},
5798
    -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40,
5798
    {-2,+0,+0,-1,0,0x06}, {-2,+0,+0,+0,1,0x02}, {-2,+0,+0,+1,0,0x03},
5799
    -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11,
5799
    {-2,+1,-1,+0,0,0x04}, {-2,+1,+0,-1,1,0x04}, {-2,+1,+0,+0,0,0x06},
5800
    -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11,
5800
    {-2,+1,+0,+1,0,0x02}, {-2,+2,+0,+0,1,0x04}, {-2,+2,+0,+1,0,0x04},
5801
    -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22,
5801
    {-1,-2,-1,+0,0,0x80}, {-1,-2,+0,-1,0,0x01}, {-1,-2,+1,-1,0,0x01},
5802
    -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44,
5802
    {-1,-2,+1,+0,1,0x01}, {-1,-1,-1,+1,0,0x88}, {-1,-1,+1,-2,0,0x40},
5803
    -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10,
5803
    {-1,-1,+1,-1,0,0x22}, {-1,-1,+1,+0,0,0x33}, {-1,-1,+1,+1,1,0x11},
5804
    -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04,
5804
    {-1,+0,-1,+2,0,0x08}, {-1,+0,+0,-1,0,0x44}, {-1,+0,+0,+1,0,0x11},
5805
    +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40,
5805
    {-1,+0,+1,-2,1,0x40}, {-1,+0,+1,-1,0,0x66}, {-1,+0,+1,+0,1,0x22},
5806
    +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20,
5806
    {-1,+0,+1,+1,0,0x33}, {-1,+0,+1,+2,1,0x10}, {-1,+1,+1,-1,1,0x44},
5807
    +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08,
5807
    {-1,+1,+1,+0,0,0x66}, {-1,+1,+1,+1,0,0x22}, {-1,+1,+1,+2,0,0x10},
5808
    +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20,
5808
    {-1,+2,+0,+1,0,0x04}, {-1,+2,+1,+0,1,0x04}, {-1,+2,+1,+1,0,0x04},
5809
    +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44,
5809
    {+0,-2,+0,+0,1,0x80}, {+0,-1,+0,+1,1,0x88}, {+0,-1,+1,-2,0,0x40},
5810
    +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60,
5810
    {+0,-1,+1,+0,0,0x11}, {+0,-1,+2,-2,0,0x40}, {+0,-1,+2,-1,0,0x20},
5811
    +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80,
5811
    {+0,-1,+2,+0,0,0x30}, {+0,-1,+2,+1,1,0x10}, {+0,+0,+0,+2,1,0x08},
5812
    +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40,
5812
    {+0,+0,+2,-2,1,0x40}, {+0,+0,+2,-1,0,0x60}, {+0,+0,+2,+0,1,0x20},
5813
    +1,+0,+2,+1,0,0x10
5813
    {+0,+0,+2,+1,0,0x30}, {+0,+0,+2,+2,1,0x10}, {+0,+1,+1,+0,0,0x44},
5814
  }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 };
5814
    {+0,+1,+1,+2,0,0x10}, {+0,+1,+2,-1,1,0x40}, {+0,+1,+2,+0,0,0x60},
5815
    {+0,+1,+2,+1,0,0x20}, {+0,+1,+2,+2,0,0x10}, {+1,-2,+1,+0,0,0x80},
5816
    {+1,-1,+1,+1,0,0x88}, {+1,+0,+1,+2,0,0x08}, {+1,+0,+2,-1,0,0x40},
5817
    {+1,+0,+2,+1,0,0x10}
5818
  };
5819
  const interpolate_terms *cpt;
5820
  signed char *cp;
5821
  signed char chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 };
5815
  ushort (*brow[5])[4], *pix;
5822
  ushort (*brow[5])[4], *pix;
5816
  int prow=8, pcol=2, *ip, *code[16][16], gval[8], gmin, gmax, sum[4];
5823
  int prow=8, pcol=2, *ip, *code[16][16], gval[8], gmin, gmax, sum[4];
5817
  int row, col, x, y, x1, x2, y1, y2, t, weight, grads, color, diag;
5824
  int row, col, x, y, x1, x2, y1, y2, t, weight, grads, color, diag;
Lines 5829-5839 void CLASS vng_interpolate() Link Here
5829
  for (row=0; row < prow; row++)		/* Precalculate for VNG */
5836
  for (row=0; row < prow; row++)		/* Precalculate for VNG */
5830
    for (col=0; col < pcol; col++) {
5837
    for (col=0; col < pcol; col++) {
5831
      code[row][col] = ip;
5838
      code[row][col] = ip;
5832
      for (cp=terms, t=0; t < 64; t++) {
5839
      for (cpt=&terms[0], t=0; t < 64, cpt = &terms[t]; t++) {
5833
	y1 = *cp++;  x1 = *cp++;
5840
	y1 = cpt->y1;  x1 = cpt->x1;
5834
	y2 = *cp++;  x2 = *cp++;
5841
	y2 = cpt->y2;  x2 = cpt->x2;
5835
	weight = *cp++;
5842
	weight = cpt->weight;
5836
	grads = *cp++;
5843
	grads = cpt->grads;
5837
	color = fcol(row+y1,col+x1);
5844
	color = fcol(row+y1,col+x1);
5838
	if (fcol(row+y2,col+x2) != color) continue;
5845
	if (fcol(row+y2,col+x2) != color) continue;
5839
	diag = (fcol(row,col+1) == color && fcol(row+1,col) == color) ? 2:1;
5846
	diag = (fcol(row,col+1) == color && fcol(row+1,col) == color) ? 2:1;
Lines 16289-16295 void CLASS tiff_head (struct tiff_hdr *th, int full) Link Here
16289
  strncpy (th->desc, desc, 512);
16296
  strncpy (th->desc, desc, 512);
16290
  strncpy (th->make, make, 64);
16297
  strncpy (th->make, make, 64);
16291
  strncpy (th->model, model, 64);
16298
  strncpy (th->model, model, 64);
16292
  strcpy (th->soft, "dcraw v"DCRAW_VERSION);
16299
  strcpy (th->soft, "dcraw v" DCRAW_VERSION);
16293
  t = localtime (&timestamp);
16300
  t = localtime (&timestamp);
16294
  sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d",
16301
  sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d",
16295
      t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec);
16302
      t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec);
(-)a/internal/dcraw_common.cpp (-29 / +36 lines)
Lines 4618-4647 void CLASS lin_interpolate() Link Here
4618
 */
4618
 */
4619
void CLASS vng_interpolate()
4619
void CLASS vng_interpolate()
4620
{
4620
{
4621
  static const signed char *cp, terms[] = {
4621
  struct interpolate_terms {
4622
    -2,-2,+0,-1,0,0x01, -2,-2,+0,+0,1,0x01, -2,-1,-1,+0,0,0x01,
4622
    signed char y1, x1, y2, x2, weight;
4623
    -2,-1,+0,-1,0,0x02, -2,-1,+0,+0,0,0x03, -2,-1,+0,+1,1,0x01,
4623
    unsigned char grads;
4624
    -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03,
4624
  };
4625
    -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06,
4625
  static const interpolate_terms terms[] = {
4626
    -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04,
4626
    {-2,-2,+0,-1,0,0x01}, {-2,-2,+0,+0,1,0x01}, {-2,-1,-1,+0,0,0x01},
4627
    -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01,
4627
    {-2,-1,+0,-1,0,0x02}, {-2,-1,+0,+0,0,0x03}, {-2,-1,+0,+1,1,0x01},
4628
    -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40,
4628
    {-2,+0,+0,-1,0,0x06}, {-2,+0,+0,+0,1,0x02}, {-2,+0,+0,+1,0,0x03},
4629
    -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11,
4629
    {-2,+1,-1,+0,0,0x04}, {-2,+1,+0,-1,1,0x04}, {-2,+1,+0,+0,0,0x06},
4630
    -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11,
4630
    {-2,+1,+0,+1,0,0x02}, {-2,+2,+0,+0,1,0x04}, {-2,+2,+0,+1,0,0x04},
4631
    -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22,
4631
    {-1,-2,-1,+0,0,0x80}, {-1,-2,+0,-1,0,0x01}, {-1,-2,+1,-1,0,0x01},
4632
    -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44,
4632
    {-1,-2,+1,+0,1,0x01}, {-1,-1,-1,+1,0,0x88}, {-1,-1,+1,-2,0,0x40},
4633
    -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10,
4633
    {-1,-1,+1,-1,0,0x22}, {-1,-1,+1,+0,0,0x33}, {-1,-1,+1,+1,1,0x11},
4634
    -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04,
4634
    {-1,+0,-1,+2,0,0x08}, {-1,+0,+0,-1,0,0x44}, {-1,+0,+0,+1,0,0x11},
4635
    +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40,
4635
    {-1,+0,+1,-2,1,0x40}, {-1,+0,+1,-1,0,0x66}, {-1,+0,+1,+0,1,0x22},
4636
    +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20,
4636
    {-1,+0,+1,+1,0,0x33}, {-1,+0,+1,+2,1,0x10}, {-1,+1,+1,-1,1,0x44},
4637
    +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08,
4637
    {-1,+1,+1,+0,0,0x66}, {-1,+1,+1,+1,0,0x22}, {-1,+1,+1,+2,0,0x10},
4638
    +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20,
4638
    {-1,+2,+0,+1,0,0x04}, {-1,+2,+1,+0,1,0x04}, {-1,+2,+1,+1,0,0x04},
4639
    +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44,
4639
    {+0,-2,+0,+0,1,0x80}, {+0,-1,+0,+1,1,0x88}, {+0,-1,+1,-2,0,0x40},
4640
    +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60,
4640
    {+0,-1,+1,+0,0,0x11}, {+0,-1,+2,-2,0,0x40}, {+0,-1,+2,-1,0,0x20},
4641
    +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80,
4641
    {+0,-1,+2,+0,0,0x30}, {+0,-1,+2,+1,1,0x10}, {+0,+0,+0,+2,1,0x08},
4642
    +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40,
4642
    {+0,+0,+2,-2,1,0x40}, {+0,+0,+2,-1,0,0x60}, {+0,+0,+2,+0,1,0x20},
4643
    +1,+0,+2,+1,0,0x10
4643
    {+0,+0,+2,+1,0,0x30}, {+0,+0,+2,+2,1,0x10}, {+0,+1,+1,+0,0,0x44},
4644
  }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 };
4644
    {+0,+1,+1,+2,0,0x10}, {+0,+1,+2,-1,1,0x40}, {+0,+1,+2,+0,0,0x60},
4645
    {+0,+1,+2,+1,0,0x20}, {+0,+1,+2,+2,0,0x10}, {+1,-2,+1,+0,0,0x80},
4646
    {+1,-1,+1,+1,0,0x88}, {+1,+0,+1,+2,0,0x08}, {+1,+0,+2,-1,0,0x40},
4647
    {+1,+0,+2,+1,0,0x10}
4648
  };
4649
  const interpolate_terms *cpt;
4650
  signed char *cp;
4651
  signed char chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 };
4645
  ushort (*brow[5])[4], *pix;
4652
  ushort (*brow[5])[4], *pix;
4646
  int prow=8, pcol=2, *ip, *code[16][16], gval[8], gmin, gmax, sum[4];
4653
  int prow=8, pcol=2, *ip, *code[16][16], gval[8], gmin, gmax, sum[4];
4647
  int row, col, x, y, x1, x2, y1, y2, t, weight, grads, color, diag;
4654
  int row, col, x, y, x1, x2, y1, y2, t, weight, grads, color, diag;
Lines 4659-4669 void CLASS vng_interpolate() Link Here
4659
  for (row=0; row < prow; row++)		/* Precalculate for VNG */
4666
  for (row=0; row < prow; row++)		/* Precalculate for VNG */
4660
    for (col=0; col < pcol; col++) {
4667
    for (col=0; col < pcol; col++) {
4661
      code[row][col] = ip;
4668
      code[row][col] = ip;
4662
      for (cp=terms, t=0; t < 64; t++) {
4669
      for (cpt=&terms[0], t=0; t < 64, cpt = &terms[t]; t++) {
4663
	y1 = *cp++;  x1 = *cp++;
4670
	y1 = cpt->y1;  x1 = cpt->x1;
4664
	y2 = *cp++;  x2 = *cp++;
4671
	y2 = cpt->y2;  x2 = cpt->x2;
4665
	weight = *cp++;
4672
	weight = cpt->weight;
4666
	grads = *cp++;
4673
	grads = cpt->grads;
4667
	color = fcol(row+y1,col+x1);
4674
	color = fcol(row+y1,col+x1);
4668
	if (fcol(row+y2,col+x2) != color) continue;
4675
	if (fcol(row+y2,col+x2) != color) continue;
4669
	diag = (fcol(row,col+1) == color && fcol(row+1,col) == color) ? 2:1;
4676
	diag = (fcol(row,col+1) == color && fcol(row+1,col) == color) ? 2:1;
(-)a/libraw/libraw_const.h (-2 / +1 lines)
Lines 255-262 enum LibRaw_progress Link Here
255
255
256
    LIBRAW_PROGRESS_THUMB_LOAD          = 1<<28,
256
    LIBRAW_PROGRESS_THUMB_LOAD          = 1<<28,
257
    LIBRAW_PROGRESS_TRESERVED1          = 1<<29,
257
    LIBRAW_PROGRESS_TRESERVED1          = 1<<29,
258
    LIBRAW_PROGRESS_TRESERVED2          = 1<<30,
258
    LIBRAW_PROGRESS_TRESERVED2          = 1<<30
259
    LIBRAW_PROGRESS_TRESERVED3          = 1<<31
260
};
259
};
261
#define LIBRAW_PROGRESS_THUMB_MASK 0x0fffffff
260
#define LIBRAW_PROGRESS_THUMB_MASK 0x0fffffff
262
261

Return to bug 582852