# [vlc-devel] How to draw a line in subpicture_t region

Peter Tap ptrtap at yahoo.com
Tue Aug 28 07:19:23 CEST 2012

```
Hi Rémi,

Thank you very much for your help. No wonder "i_planes" value was coming out to be just one.

I had created a region of width=100 and height=100. However,while debugging, I noticed that, for the first plane, i_lines was 114 and i_pitch was 448. I was thinking i_lines should have been 100 and i_pitch should have been 400. Where is the extra margin coming from?

Regards,
Peter

________________________________
From: Rémi Denis-Courmont <remi at remlab.net>
To: vlc-devel at videolan.org
Sent: Monday, August 27, 2012 7:24 PM
Subject: Re: [vlc-devel] How to draw a line in subpicture_t region

Hello,

On Monday 27 August 2012, Peter Tap wrote:
> Now, picture_t structure has four planes. I am guessing the first three
> planes are for R, G, and B, and the fourth plane is alpha.
>
> for(int i=0;i<100;i++) {  *(pPic->p[0].p_pixels + (i * p[0].i_pitch) + i) =
> 0xAA;
>
>   *(pPic->p[1].p_pixels + (i * p[1].i_pitch) + i) = 0xBB;
>
>   *(pPic->p[2].p_pixels + (i * p[2].i_pitch) + i) = 0xCC;
>
>   *(pPic->p[3].p_pixels + (i * p[3].i_pitch) + i) = 0x00; // No
> transparency for alpha channel
>
> }
>
> Is this thought process correct? Am I missing something?

RGBA and RV32 are made of one plane of 32-bits pixels, not four planes of 8-
bits components. You will never find color planes in RGB space.

--
Rémi Denis-Courmont
http://www.remlab.info
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
http://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120827/65014dbf/attachment.html>
```