From: Bram R. <bra...@nx...> - 2008-10-14 06:46:24
|
Hi Madalina, all, For me it is not clear what motivates this proposal. Is there a significant advantage? I have the followign comments: - Note that current API supports reading a frame, also for interlaced data the p_read_frame_xxx() call then actually reads two fields and combines it in a frame buffer. - If we decide to combine frame&field calls, then we shall do this for all read/write calls: this holds for the 8 bit versions, and 16 bit version; it holds for the 2 and 3 component calls, etc. this way the interface remains orthogonal and consistent. - Note that all cpfspd api calls must be accompanied by tests, so this will also add a substantial amount of test code. - Your proposed call suffers from unclarity: stride per frame line or per field line? - I suspect you will use a frame height, not a field height, since frame height is defined in all cases, whereas field height is not. As far as I can see, this introduces more issues than it solves. In particular, I prefer to see a really good reason to add interface calls. Obviously, you can always create such wrapper around some cpfspd calls in your application. Regards, Bram. -- Bram Riemens, Senior Principal NXP Semiconductors / Corporate I&T / Research Email: bra...@nx... Phone: +31 40 27 25910; Fax: +31 40 27 28504 High Tech Campus 32 (floor 1, office 138) 5656 AE Eindhoven, The Netherlands The information contained in this message is confidential and may be legally privileged. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, or reproduction is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message. From: Iota, Madalina [mailto:mad...@ph...] Sent: Monday 13 October 2008 15:49 To: pfs...@li... Subject: [Pfs...@sf...] cpfspd: combine the call of p_read_frame_comp_16() and p_read_field_comp_16() in one method Hi all, I would like to have two functions to read and write image data per frame/field/component. The prototype of these functions would be: pT_status p_read_comp_16 (const char *filename, pT_header *header, int frame, int field, int comp, unsigned short *c_fld, int read_mode, int width, int fld_height, int stride); pT_status p_write_comp_16(const char *filename, pT_header *header, int frame, int field, int comp, const unsigned short *c_fld, int write_mode, int width, int fld_height, int stride); where: filename file to read/write header pointer to pT_header struct frame frame number field 0: frame, 1/2: field access. comp the component id. i.e. the index in the header structure. c_fld pointer to field/frame buffer. read_mode mem_data_fmt write_mode mem_data_fmt width width of frame in memory. fld_height height of frame in memory. stride stride of frame in memory. The idea is to combine the reading/writing of a frame and of a field in one method. According to the given value of field, p_read_comp_16() method will call the p_read_frame_comp_16() and p_read_field_comp_16(). The same holds for p_write_comp_16() method. Do you agree with adding them to cpfspd_rwi.c ? Best regards, Madalina TASS Software Professionals Ir. Madalina Iota PDEng T+31 40 2503200 | F +31 40 2503201 W www.tass.nl<http://www.tass.nl> | M mad...@ta...<mailto:mad...@ta...> Temporary address: Philips Research Location HTC Phone: +31 40 274 1604 E-mail: mad...@ph...<mailto:mad...@ph...> ________________________________ The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message. |