[gst-devel] Regarding Resize operation

Sameer Naik sameer.subscriptions at damagehead.com
Thu Jan 7 15:11:43 CET 2010


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 <brijesh.j at ti.com> wrote:
> Hi Sameer,
>
> You can have lineLength mode than width*2 to make it 32 byte aligned.
>
> Thanks,
> Brijesh Jadav
>
> -----Original Message-----
> From: davinci-linux-open-source-bounces at linux.davincidsp.com [mailto:davinci-linux-open-source-bounces at linux.davincidsp.com] On Behalf Of Sameer Naik
> Sent: Thursday, January 07, 2010 2:36 PM
> To: davinci-linux-open-source at linux.davincidsp.com; 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
> Davinci-linux-open-source at linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>




More information about the gstreamer-devel mailing list