Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dmICChooseConverter(3dm) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dmICCreate(3dm)

dmICSetSrcParams(3dm)

dmICSetDstParams(3dm)

dmICSetConvParams(3dm)

dmParams(3dm)

dmSetImageDefaults(3dm)

dmGetError(3dm)



dmIC(3dm)                                                            dmIC(3dm)



NAME
     dmICChooseConverter - return an image converter that matches specified
     image parameters

SYNOPSIS
     #include <dmedia/dmimageconvert.h>

     int dmICChooseConverter(DMparams* src, DMparams *dst, DMparams *conv);

DESCRIPTION
     dmICChooseConverter returns the index of an image converter which
     performs the conversion of image data described by src to that described
     by dst using the conversion control parameters in conv. The number
     returned is for use in dmICGetDescription and dmICCreate.

     If no converter could be found, -1 will be returned and an error will be
     set (see dmSetError(3dm)).

     If the function succeeds, src, dst and conv can then be used in
     dmICSetSrcParams, dmICSetDstParams and dmICSetConvParams respectively.

     In order for dmICChooseConverter to work correctly, src, dst and conv
     must be set with their respective required parameters.  In addition, one
     of the following requirements must be met.

     DMICID and DMICCODEDIRECTION set in conv
          In this case, the converter with the matching ID and code direction
          that satisfies the requirements in src, dst and conv is chosen.

     DMIMAGECOMPRESSION set in src and dst
          In this case, the converter that matches the compression
          requirements in src, dst and conv will be chosen.

     Currently there is no provision for choosing a realtime over a non-
     realtime converter , and vice-versa . Extra code needs to be written to
     do so. The following code fragment shows how to to find a realtime JPEG
     decoder.


     DMimageconverter ic;
     DMparams *p;
     int n = dmICGetNum();
     while (n--) {
             dmParamsCreate(&p);
             if (dmICGetDescription(n, p) == DM_SUCCESS
                     dmParamsGetInt(p, DM_IC_ID) == 'jpeg' &&
                     dmParamsGetEnum(p, DM_IC_SPEED) == DM_IC_SPEED_REALTIME &&
                     dmParamsGetEnum(p, DM_IC_CODE_DIRECTION) ==
                                            DM_IC_CODE_DIRECTION_DECODE) {
                     dmParamsDestroy(p);
                     break;
             }



                                                                        Page 1





dmIC(3dm)                                                            dmIC(3dm)



             dmParamsDestroy(p);
     }
     dmICCreate(n, &ic);


SEE ALSO
     dmICCreate(3dm), dmICSetSrcParams(3dm), dmICSetDstParams(3dm),
     dmICSetConvParams(3dm), dmParams(3dm), dmSetImageDefaults(3dm),
     dmGetError(3dm).














































                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026