This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to implement Jpeg rotation at DM368

I have finished Jpeg rotation at DM365, and it worked well(0, 90, 180,360)

DM365 / MV5.0 / linux-davinci-2.6.18 / dvsdk_2_10_01_18

The key code is: Refer dvsdk test examples

     

+++ b/stream_capture/framework/alg/src/alg_jpgEnc.c
@@ -12,6 +12,8 @@
* =========================================================================== */
#include <alg_priv.h>
#include <alg_jpgEnc.h>
+#include <ti/sdo/codecs/jpegenc/ijpegenc.h>
+
typedef struct {

IMGENC1_Handle hEncode;
@@ -167,6 +169,39 @@ int ALG_jpgEncSetQvalue(void *hndl, int qValue)
return OSA_SOK;
}

+int ALG_jpgEncSetRotation(void *hndl, Uint16 rotation)
+{
+ ALG_JpgEncObj *pObj = (ALG_JpgEncObj*)hndl;
+ XDAS_Int32 status;
+ IJPEGENC_DynamicParams jpeg_extDynParams;
+
+ if(pObj == NULL)
+ {
+ return OSA_EFAIL;
+ }
+
+ memcpy(&(jpeg_extDynParams.imgencDynamicParams), &(pObj->dynamicParams),
+ sizeof(IMGENC1_DynamicParams));
+ /* Set other external DynParams*/
+ jpeg_extDynParams.imgencDynamicParams.size = sizeof(IJPEGENC_DynamicParams);/* it is very important */
+ jpeg_extDynParams.rotation = rotation;
+ jpeg_extDynParams.rstInterval = 84;
+ jpeg_extDynParams.disableEOI = XDM_DEFAULT;
+ jpeg_extDynParams.customQ = NULL;

+ pObj->encStatus.size = sizeof(pObj->encStatus);
+ pObj->encStatus.data.buf = NULL;
+
+ status = IMGENC1_control(pObj->hEncode, XDM_SETPARAMS, (IMGENC1_DynamicParams*)(&jpeg_extDynParams),
+ &pObj->encStatus);
+ if (status != IMGENC1_EOK) {
+ g_warning("%s XDM_SETPARAMS failed, status=%ld\n", status);
+ return OSA_EFAIL;
+ }
+
+ return OSA_SOK;
+}

Now, I want to implement it at Dm368

DM368 / CodeSourcery / Linux2.6.32 / ti-dvsdk_dm368-evm_4_02_00_06

1) I used the same method as DM365, and av_server.out could not work,  the application was blocked at ALG_jpgEncRum()

2) the jpegenc of DVSDK also could not be built successfully.

  From e2e Found the following explain

   These individual codec test applications are not buildable within a DVSDK  3.xx or 4.xx. They are used for module testing under a different tool chain.

How can I to test the rotation of JPEG at DM368,Thanks