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.

Problem with IMGLIB function

Other Parts Discussed in Thread: CCSTUDIO

I am trying to use the IMG_conv_5x5_i8_c16s function but I am not getting the same results as the C-version.  I've tried using a filter with all zeros and a 1 in the center tap just to see if I can get my original data back.  The data matches when using the C-version of the code but not when using the IMGLIB call.  I'm using IMGLIB v2_01 on a DM6441 device.

Also, when I try using the 8-bit version of this function (IMG_conv_5x5_i8_c8s) it works correctly.  I do not want to have to change my coefficients to 8-bit values, though.  Any insight on this is greatly appreciated.

  • What chip and platform are you running on?  Are you using the BIOS RTOS (this thread is currently on the BIOS forum)?

  • I am running a DM6441 and developing in Linux.  Yes, BIOS is being used.  The thread was moved so I do not know if it is in the appropriate place anymore.

  • Hello Jason, sorry for delay in response. Please note that IMG_conv_5x5_i8_c16s function is provided in two forms. First a natural C version is provided (C:\CCStudio_v3.3\c64plus\imglib_v201\kernels\c) and then an optimized version is provided which is intrinsic C (C:\CCStudio_v3.3\c64plus\imglib_v201\kernels\intrinsic). For verifying the kernel, test ode is provided here: C:\CCStudio_v3.3\c64plus\imglib_v201\test_drivers\drivers\IMG_conv_5x5_i8_c16s

    Now, I looked at the code but didn't immediately spot anything that may be incorrect. Please note the intrinsic C code has the below requirements:
    /*  ASSUMPTIONS                                                             */
    /*      1. width:       'width' >= 2 and multiples of 2.                    */
    /*      2. pitch:       'pitch' >= 'width'                                  */
    /*      3. Filter Coefficient array should be half-word aligned             */
    /*      4. Output array should be word-aligned.                             */
    /*      5. No restrictions on the alignment of Input arrays                 */
    /*      6. Input and Output arrays should not overlap.                      */

    Can you ensure that the above requirements are met?
    Also, it may be easy to update the provided test code to see if the issue can be reproduced.
    Please provide us the parameters you are using or provide updated test driver code that demonstrates the issue. We can then try to debug the issue.

    Regards,
    Gagan

     

  • Gagan,

    I believe all the restrictions have been met.  To verify the issue, I took the natural C code and copied it into my code to run the filter.  I compared its result to the intrinsic function's result and did got get a match.  I was using a very simple test case, the filter was all zeros with a 1 as the center tap.  The shift parameter was set to 0.  I will look at the driver test code to see if there is anything that I can do with it.

    Thanks,

    Jason