~ubuntu-branches/ubuntu/raring/libjpeg-turbo/raring-updates

« back to all changes in this revision

Viewing changes to tjunittest.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-09-20 00:18:15 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: package-import@ubuntu.com-20120920001815-c1zmkkxe9tbljr0y
Tags: upstream-1.2.1
ImportĀ upstreamĀ versionĀ 1.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C)2009-2011 D. R. Commander.  All Rights Reserved.
 
2
 * Copyright (C)2009-2012 D. R. Commander.  All Rights Reserved.
3
3
 *
4
4
 * Redistribution and use in source and binary forms, with or without
5
5
 * modification, are permitted provided that the following conditions are met:
77
77
const int _onlyRGB[]={TJPF_RGB};
78
78
 
79
79
enum {YUVENCODE=1, YUVDECODE};
80
 
int yuv=0, alloc=0, alpha=0;
 
80
int yuv=0, alloc=0;
81
81
 
82
82
int exitStatus=0;
83
83
#define bailout() {exitStatus=-1;  goto bailout;}
502
502
                for(i=0; i<2; i++)
503
503
                {
504
504
                        int flags=0;
 
505
                        if(subsamp==TJSAMP_422 || subsamp==TJSAMP_420 || subsamp==TJSAMP_440)
 
506
                                flags|=TJFLAG_FASTUPSAMPLE;
505
507
                        if(i==1)
506
508
                        {
507
509
                                if(yuv==YUVDECODE) goto bailout;
617
619
        if(doyuv) {yuv=YUVENCODE;  alloc=0;}
618
620
        doTest(35, 39, _3byteFormats, 2, TJSAMP_444, "test");
619
621
        doTest(39, 41, _4byteFormats, 4, TJSAMP_444, "test");
620
 
        if(doyuv)
621
 
        {
622
 
                doTest(41, 35, _3byteFormats, 2, TJSAMP_422, "test");
623
 
                doTest(35, 39, _4byteFormats, 4, TJSAMP_422, "test");
624
 
                doTest(39, 41, _3byteFormats, 2, TJSAMP_420, "test");
625
 
                doTest(41, 35, _4byteFormats, 4, TJSAMP_420, "test");
626
 
                doTest(35, 39, _3byteFormats, 2, TJSAMP_440, "test");
627
 
                doTest(39, 41, _4byteFormats, 4, TJSAMP_440, "test");
628
 
        }
 
622
        doTest(41, 35, _3byteFormats, 2, TJSAMP_422, "test");
 
623
        doTest(35, 39, _4byteFormats, 4, TJSAMP_422, "test");
 
624
        doTest(39, 41, _3byteFormats, 2, TJSAMP_420, "test");
 
625
        doTest(41, 35, _4byteFormats, 4, TJSAMP_420, "test");
 
626
        doTest(35, 39, _3byteFormats, 2, TJSAMP_440, "test");
 
627
        doTest(39, 41, _4byteFormats, 4, TJSAMP_440, "test");
629
628
        doTest(35, 39, _onlyGray, 1, TJSAMP_GRAY, "test");
630
629
        doTest(39, 41, _3byteFormats, 2, TJSAMP_GRAY, "test");
631
630
        doTest(41, 35, _4byteFormats, 4, TJSAMP_GRAY, "test");