Lines 519-524
Link Here
|
519 |
{ |
519 |
{ |
520 |
TIFFPredictorState *sp = PredictorState(tif); |
520 |
TIFFPredictorState *sp = PredictorState(tif); |
521 |
|
521 |
|
|
|
522 |
assert(sp != NULL); |
523 |
assert(sp->vsetparent != NULL); |
524 |
|
522 |
switch (tag) { |
525 |
switch (tag) { |
523 |
case TIFFTAG_PREDICTOR: |
526 |
case TIFFTAG_PREDICTOR: |
524 |
sp->predictor = (uint16) va_arg(ap, int); |
527 |
sp->predictor = (uint16) va_arg(ap, int); |
Lines 536-541
Link Here
|
536 |
{ |
539 |
{ |
537 |
TIFFPredictorState *sp = PredictorState(tif); |
540 |
TIFFPredictorState *sp = PredictorState(tif); |
538 |
|
541 |
|
|
|
542 |
assert(sp != NULL); |
543 |
assert(sp->vgetparent != NULL); |
544 |
|
539 |
switch (tag) { |
545 |
switch (tag) { |
540 |
case TIFFTAG_PREDICTOR: |
546 |
case TIFFTAG_PREDICTOR: |
541 |
*va_arg(ap, uint16*) = sp->predictor; |
547 |
*va_arg(ap, uint16*) = sp->predictor; |
Lines 569-574
Link Here
|
569 |
TIFFPredictorInit(TIFF* tif) |
575 |
TIFFPredictorInit(TIFF* tif) |
570 |
{ |
576 |
{ |
571 |
TIFFPredictorState* sp = PredictorState(tif); |
577 |
TIFFPredictorState* sp = PredictorState(tif); |
|
|
578 |
|
579 |
assert(sp != NULL); |
572 |
|
580 |
|
573 |
/* |
581 |
/* |
574 |
* Merge codec-specific tag information and |
582 |
* Merge codec-specific tag information and |
Lines 595-598
Link Here
|
595 |
return 1; |
603 |
return 1; |
596 |
} |
604 |
} |
597 |
|
605 |
|
|
|
606 |
int |
607 |
TIFFPredictorCleanup(TIFF* tif) |
608 |
{ |
609 |
TIFFPredictorState* sp = PredictorState(tif); |
610 |
|
611 |
assert(sp != 0); |
612 |
|
613 |
tif->tif_tagmethods.vgetfield = sp->vgetparent; |
614 |
tif->tif_tagmethods.vsetfield = sp->vsetparent; |
615 |
tif->tif_tagmethods.printdir = sp->printdir; |
616 |
tif->tif_setupdecode = sp->setupdecode; |
617 |
tif->tif_setupencode = sp->setupencode; |
618 |
|
619 |
return 1; |
620 |
} |
621 |
|
598 |
/* vim: set ts=8 sts=8 sw=8 noet: */ |
622 |
/* vim: set ts=8 sts=8 sw=8 noet: */ |