Hello,
I have been facing a few issues using the resizer (davinci_resizer). I have a video that is decoded using the XDM VIDDEC 0.9 API calls and reports a resolution of 294x240 through the VIDDEC_Status output structure. I am using the dmai api to perform the resize operation. That is to say that, DMAI will dynamically calculate the resize coefficients for the resize operation. The Resized image size that i want is 1024x768. To do this i specify the following: srcImage.x = 0; srcImage.y = 0; srcImage.width = 294; srcImage.height = 240; srcImage.lineLength = 294* 2; dstImage.x = 0; dstImage.y = 0; dstImage.width = 1024; dstImage.height = 768; dstImage.lineLength = 1024 * 2; When the resize operation is configured using Resize_config(). I get the following error: "Src (588) and dst (2048) must be aligned on 32 bytes" This clearly states that srcImage.lineLength = 588; is not aligned on 32 bytes. How can i handle this case? I dont think i can specify a srcImage.lineLength anything orther than 294* 2 right. This is is always present when the width and height of the decoded video are not a multiple of 16. I am not aware of how i can handle this case. Please help Regards ~Sameer ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Administrator
|
On Thu, 2010-01-07 at 14:36 +0530, Sameer Naik wrote:
> Hello, > I have been facing a few issues using the resizer (davinci_resizer). > > I have a video that is decoded using the XDM VIDDEC 0.9 API calls and > reports a resolution of 294x240 through the VIDDEC_Status output > structure. > I am using the dmai api to perform the resize operation. That is to > say that, DMAI will dynamically calculate the resize coefficients for > the resize operation. > The Resized image size that i want is 1024x768. To do this i specify > the following: > > srcImage.x = 0; > srcImage.y = 0; > srcImage.width = 294; > srcImage.height = 240; > srcImage.lineLength = 294* 2; > > dstImage.x = 0; > dstImage.y = 0; > dstImage.width = 1024; > dstImage.height = 768; > dstImage.lineLength = 1024 * 2; > > When the resize operation is configured using Resize_config(). I get > the following > error: "Src (588) and dst (2048) must be aligned on 32 bytes" ... therefore you must make sure that the lineLength (also known as the stride) is a multiple of 32bytes. .lineLength = ((space needed) + 31)&~31; Or more simply by using the GST_ROUND_UP_32 macro from gst/gstutils.h: .lineLength = GST_ROUND_UP_32 (294 * 2); > > This clearly states that srcImage.lineLength = 588; is not aligned on 32 bytes. > How can i handle this case? I dont think i can specify a > srcImage.lineLength anything orther than 294* 2 right. > This is is always present when the width and height of the decoded > video are not a multiple of 16. > > I am not aware of how i can handle this case. Please help > > Regards > ~Sameer > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Sameer Naik
Hi Sameer,
You can have lineLength mode than width*2 to make it 32 byte aligned. Thanks, Brijesh Jadav -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Sameer Naik Sent: Thursday, January 07, 2010 2:36 PM To: [hidden email]; Discussion of the development of GStreamer Subject: Regarding Resize operation Hello, I have been facing a few issues using the resizer (davinci_resizer). I have a video that is decoded using the XDM VIDDEC 0.9 API calls and reports a resolution of 294x240 through the VIDDEC_Status output structure. I am using the dmai api to perform the resize operation. That is to say that, DMAI will dynamically calculate the resize coefficients for the resize operation. The Resized image size that i want is 1024x768. To do this i specify the following: srcImage.x = 0; srcImage.y = 0; srcImage.width = 294; srcImage.height = 240; srcImage.lineLength = 294* 2; dstImage.x = 0; dstImage.y = 0; dstImage.width = 1024; dstImage.height = 768; dstImage.lineLength = 1024 * 2; When the resize operation is configured using Resize_config(). I get the following error: "Src (588) and dst (2048) must be aligned on 32 bytes" This clearly states that srcImage.lineLength = 588; is not aligned on 32 bytes. How can i handle this case? I dont think i can specify a srcImage.lineLength anything orther than 294* 2 right. This is is always present when the width and height of the decoded video are not a multiple of 16. I am not aware of how i can handle this case. Please help Regards ~Sameer _______________________________________________ Davinci-linux-open-source mailing list [hidden email] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hello Edward,
The .lineLength is used to jump to the next line, i think, as nornally is the case. The point here is that if the decoded video is of 294x240 resolution, the decoder by itself is not adding black borders and rounding up the width to 304. As a result, if the .lineLength is rounded up, the jump to the next line would be wrong. And due to this the image is squashed. This is what i have observed so far if i simply round up the lineLength. If this is not how it is supposed to be, then maybe i am doing something wrong. As pointed by Vladmir setting dynamicParams->displayWidth = 304; makes the decoder add black borders from pixel 294-304. The reported width and height of the decoded video will still be 294x240, but now the image will actually be of size 304x240. Now i can use .lineLength = GST_ROUND_UP_16(294) * 2; and the resizer never complains. Regards ~Sameer On Thu, Jan 7, 2010 at 6:13 PM, Jadav, Brijesh R <[hidden email]> wrote: > Hi Sameer, > > You can have lineLength mode than width*2 to make it 32 byte aligned. > > Thanks, > Brijesh Jadav > > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On Behalf Of Sameer Naik > Sent: Thursday, January 07, 2010 2:36 PM > To: [hidden email]; Discussion of the development of GStreamer > Subject: Regarding Resize operation > > Hello, > I have been facing a few issues using the resizer (davinci_resizer). > > I have a video that is decoded using the XDM VIDDEC 0.9 API calls and > reports a resolution of 294x240 through the VIDDEC_Status output > structure. > I am using the dmai api to perform the resize operation. That is to > say that, DMAI will dynamically calculate the resize coefficients for > the resize operation. > The Resized image size that i want is 1024x768. To do this i specify > the following: > > srcImage.x = 0; > srcImage.y = 0; > srcImage.width = 294; > srcImage.height = 240; > srcImage.lineLength = 294* 2; > > dstImage.x = 0; > dstImage.y = 0; > dstImage.width = 1024; > dstImage.height = 768; > dstImage.lineLength = 1024 * 2; > > When the resize operation is configured using Resize_config(). I get > the following > error: "Src (588) and dst (2048) must be aligned on 32 bytes" > > This clearly states that srcImage.lineLength = 588; is not aligned on 32 bytes. > How can i handle this case? I dont think i can specify a > srcImage.lineLength anything orther than 294* 2 right. > This is is always present when the width and height of the decoded > video are not a multiple of 16. > > I am not aware of how i can handle this case. Please help > > Regards > ~Sameer > _______________________________________________ > Davinci-linux-open-source mailing list > [hidden email] > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source > ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |