Hey Jeff,

I just got this working. I think what you forgot to do was

>   dynParams.size = sizeof(IMGENC1_DynamicParams) + 
> sizeof(IJPEGENC_DynamicParams);

It's the size change that cues the library that extended data is present.

good luck
Chris


On Wed, Jun 18, 2008 at 1:55 PM, Jeff Cooper <[EMAIL PROTECTED]> wrote:
> I'm trying to use the JPEG codec to rotate an image but I'm not having any
> luck with it and was wondering if anyone else has done it.
>
> I'm setting up my dynamic parameters as follows:
>   IMGENC1_DynamicParams dynParams;
>   IJPEGENC_DynamicParams extDynParams;
>
>   /* set the parameters for encoding */
>   dynParams.size = sizeof(IMGENC1_DynamicParams);
>   dynParams.numAU = XDM_DEFAULT;
>   dynParams.inputChromaFormat = CHROMAFORMAT;
>   dynParams.inputHeight = VID_HEIGHT;
>   dynParams.inputWidth = VID_WIDTH;
>   dynParams.captureWidth = VID_WIDTH;
>   dynParams.generateHeader = XDM_ENCODE_AU;
>   dynParams.qValue = QVALUE;
>
>   /* set the extended parameters for encoding */
>   extDynParams.imgencDynamicParams = dynParams;
>   dynParams.size = sizeof(IJPEGENC_DynamicParams);
>   extDynParams.rstInterval = XDM_DEFAULT;
>   extDynParams.disableEOI = XDM_DEFAULT;
>   extDynParams.rotation = 180;
>   extDynParams.customQ = NULL;
>
> Then I call:
>
>   imgStatus.size = sizeof(imgStatus);
>   if (IMGENC1_control(m_Private->enc, XDM_SETPARAMS, (IMGENC1_DynamicParams
> *)&extDynParams, &imgStatus) ==
>       XDM_EFAIL) {
>
>       ERROR("Could not set PARAMS."
>           << hparam("Error", imgStatus.extendedError));
>       return;
>   }
>
> I don't have any warning when I compile and I don't get any runtime errors,
> but my image doesn't rotate.
>
> Does anyone see anything obvious that I'm doing wrong?
>
> thanks,
> Jeff
>
> --
> Jeff Cooper // senior embedded software engineer
>
> LOGIC // engineering design services
> 411 Washington Ave. N. Suite 400
> Minneapolis, MN 55401
> T // 612.436.5176
> F // 612.672.9489
>
> [EMAIL PROTECTED]
> www.logicpd.com
>
> / / / / / / / / / / / / / / / / / / / / / / / / / / / /
> This message (including any attachments) contains confidential
> information intended for a specific individual and purpose, and
> is protected by law. If you are not the intended recipient, you
> should delete this message and are hereby notified that any
> disclosure, copying, distribution, or other use of this message,
> or the taking of any action based on it, is strictly prohibited.
>
>
>
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to