Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 28044

Re: H264_BPEncoder for CCES

$
0
0

Hi Gerhard,

 

I haven't revisited that particular example, but I did get a (slightly unhelpful) reply to my query PR74433 from private support about the same issue:-

 

>Hi Peter,

>

>Sorry for the delay in replying to you. Please use CCES 1.0.3 and ADSP-BF609 BSP and Video Decoder BSP >version mentioned in the release documents.

>

>CCES 1.0.3 can be downloaded from www.analog.com/cces. If you need to build it on CCES 1.1.0, please wait for >next release of H.264 BP/MP Encoder (Release 4.1.0) which will happen shortly.

>

>Regards,

>Processor Tools Support

 

It seems that you need to use CCES 1.0.3 instead of the latest version. There's progress for you! In fact many of the other examples fail with the same error in CCES 1.1.0, and some also won't compile because the compiler in 1.1.0 no longer allows casting a pointer to a different type and then incrementing as the type that it has been cast to. e.g the following code will not compile in 1.10 because casting pSrc to unsigned * and casting pDst to unsigned short * doesn't return an lvalue which can be incremented by the postfix ++, but this compiles fine in CCES 1.0.3:-

 

void RGB8882RGB565(void *pSrc, void *pDst, unsigned short nWidth, unsigned short nHeight, void *pArg)

{

    unsigned int    nIndex;

    unsigned short  nRGB565;

    unsigned char   cR, cG, cB;

    for(nIndex = 0; nIndex < (nWidth * nHeight); nIndex++)

    {

        cR = *(((unsigned char *)pSrc)++);

        cG = *(((unsigned char *)pSrc)++);

        cB = *(((unsigned char *)pSrc)++);

        nRGB565 = ((cR>>3)<<11) | ((cG>>2)<<5) | ((cB>>3)<<0);

        *(((unsigned short *)pDst)++) = nRGB565;

    }

}

 

Actually, I believe the CCES 1.1.0 behavior is correct according to ISO C 1990 or whatever, but it is a bit annoying since this sort of casting has been uses a lot in some of the example programs!

 

Hope that helps

 

Peter


Viewing all articles
Browse latest Browse all 28044

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>