I have an extension question...
Now i doubt i get in trouble with data alignment problem.
( I know there's "echo number > /proc/cpu/alignment" , 
but i would like to modify my code to avoid it )

The sampled data (R Gr Gb B)of AEW is 16 bit.
And my pointer points to the AEW whole data packet structure.
Access those 16 bit data by casting...

unsigned int* ptr;
ACCESS sample data by (unsigned short*)ptr.

Looping accessing this , i always get data alignment error , 
if i don't care about this , close and keep executing program again,
I will get "Segmentation Error"...
   
Could someone guide me how to solve this kind of problem?
Thanks in advance!


--- 09/9/29 (二),Bluebird-Eran Segal <[email protected]> 寫道:

> 寄件者: Bluebird-Eran Segal <[email protected]>
> 主旨: RE: H3A AEW driver : documentation or example user code.
> 收件者: "'Jean-Philippe François'" <[email protected]>, "'Karicheri, 
> Muralidharan'" <[email protected]>
> 副本: [email protected]
> 日期: 2009年9月29日,二,下午6:58
> If someone know if the Histogram/3A
> engine (hardware) and the API Davinci
> DM6441 equal to the Histogram/3A engine (hardware) API of
> DM355?
> Can I use kind Configuration for Davinci
> DM6441?   
> I try to open and set the parameters, in order to read the
> Statistics.
> 
> Below configuration for dm355:  
> 
> 
>     /* Allocate Memory For Configuration
> Structure */
>     config = (struct aew_configuration
> *)malloc(sizeof(struct
> aew_configuration));
>     config->window_config.width = 8;
>     config->window_config.height = 8;
>     config->window_config.hz_line_incr =
> 2;
>     config->window_config.vt_line_incr =
> 2;
>     config->window_config.vt_cnt = 8;
>     config->window_config.hz_cnt = 8;
>     config->window_config.vt_start = 4;
>     config->window_config.hz_start = 4;
>     config->blackwindow_config.height =
> 8;
>     config->blackwindow_config.vt_start =
> 2;
> 
>     /* Enable ALaw */
>     config->alaw_enable =
> H3A_AEW_DISABLE;
> 
>     /* Set Saturation limit */
>     config->saturation_limit = 255;
> 
>     /* Call AEW_S_PARAM to do the
> configuration */
>     buff_size = ioctl(fd, AEW_S_PARAM,
> config);
>     if (buff_size < 0) {
>         printf("ioctl
> AEW_S_PARAM fail \n");
>         return -1;
>     }
> 
> 
>  
> 
> Segal Eran 
> 
> E-mail: [email protected]
> 
>  
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]
> On Behalf Of
> Jean-Philippe Fran蔞is
> Sent: Friday, September 18, 2009 9:44 AM
> To: Karicheri, Muralidharan
> Cc: [email protected]
> Subject: Re: H3A AEW driver : documentation or example user
> code.
> 
> Karicheri, Muralidharan a 嶰rit :
> > jean=Philippe,
> > 
> > The driver just dump the statistics as read from the
> hardware. The VPFE
> Programmers Reference Guide (PRG) explains how the
> information is packed in
> memory.I am not sure if a customer needs to sign any NDA to
> get the details.
> > Please check with TI support channel if that is the
> case.
> > 
> > The driver works in the following way. Application
> sets configuration
> about
> > number of paxels/windows etc in the driver after
> opening the aew device
> > and start capture in VPFE. Application then issues a
> read call to the
> device for statistics. The isr kicks in when statistics is
> available. The
> application read call will get unblocked when isr happens
> and the data
> > is copied to user space. The Application needs to
> process the raw data
> > using the packing information specified in the PRG. 
> > 
> I figured this, but the devil hides in the details.
> I guess my setup is wrong, or the data packing I use is
> wrong, because 
> the data I read are meaningless.
> The window count must be correct, because the read size is
> ok
> I will look for this PRG and eventually check with TI if
> not publicly 
> available.
> 
> Thank you
> Jean-Philippe Fran蔞is
> > Murali Karicheri
> > Software Design Engineer
> > Texas Instruments Inc.
> > Germantown, MD 20874
> > new phone: 301-407-9583
> > Old Phone : 301-515-3736 (will be deprecated)
> > email: [email protected]
> > 
> >> -----Original Message-----
> >> From: davinci-linux-open-source-bounces+m-
> >> [email protected]
> [mailto:davinci-linux-open-source-
> >> [email protected]]
> On Behalf Of Jean-
> >> Philippe Fran蔞is
> >> Sent: Thursday, September 17, 2009 11:16 AM
> >> To: [email protected]
> >> Subject: H3A AEW driver : documentation or example
> user code.
> >>
> >> Hi,
> >>
> >> I have some trouble understanding how the H3A
> hardware is supposed
> >> to work. Is there some documentation or example of
> user code usage ?
> >>
> >> I have some code using the driver, but I don't
> understand the result,
> >> and reading the driver code or the documentation
> is not very helpful.
> >>
> >> THis is on DM365, with the latest TI provided
> LSP.
> >>
> >> Thank You
> >>
> >> Jean-Philippe Fran蔞is
> >>
> >> _______________________________________________
> >> 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
> 
> 
> 
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 

___________________________________________________ 
 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! 
 http://messenger.yahoo.com.tw/

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to