# Added IP before HDMI out IP not working

**URL:** <https://discuss.pynq.io/t/added-ip-before-hdmi-out-ip-not-working/4079>\
**Category:** Support\
**Created:** [April 21, 2022, 7:48am UTC](https://discuss.pynq.io/t/added-ip-before-hdmi-out-ip-not-working/4079 "2022-04-21T07:48:23Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [April 21, 2022, 4:48pm UTC](https://discuss.pynq.io/t/added-ip-before-hdmi-out-ip-not-working/4079/6 "2022-04-21T16:48:50Z")

</div>

Hi,

The buffer you get from the VDMA is always going to have multiple channels per each pixel. So, you want to pack 4x 8-bit into a 1x 32-bit element. In essence, you want to go from 1920x1080x4 unit8 to 1920x1080x1 uint32.

You can try to pack the 4 channels into a single uint32, but it is going to be slow as it involves shifts and multiplications. You can explore numpy `frombuffer` and `tobytes` to reinterpret to pixels.

You can try something like this [Any method to reduce the calculation time on PS (PYNQ-z2) - #5 by marioruiz](https://discuss.pynq.io/t/any-method-to-reduce-the-calculation-time-on-ps-pynq-z2/3915/5)

You will get your VDMA buffer then you will create your DMA buffer

```python
buf_a =pynq.allocate((1920,1080), dtype=np.uint32) 

```

Instead of assigning anything to this buffer you change the physical address to the VDMA buffer

```python
buf_a.physical_address = buf_vdma.physical_address 

```

Hopefully this would do the trick.

The real question is why do you want to use a DMA for video? The VDMA is optimized for Video

Mario

---

_[View the full topic](https://discuss.pynq.io/t/added-ip-before-hdmi-out-ip-not-working/4079)._
