Skip to content

Commit

Permalink
Setup video resolution for MIPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Ruiz committed Nov 17, 2021
1 parent b84298e commit 1b8a33f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pynq_composable/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pynq import Overlay
from pynq.lib.video import DrmDriver, VideoMode, PIXEL_RGB
from pynq.lib.video.clocks import *
from pynq.ps import CPU_ARCH, ZU_ARCH
from pynq.ps import CPU_ARCH, ZU_ARCH, ZYNQ_ARCH
from time import sleep
import threading

Expand Down Expand Up @@ -511,10 +511,10 @@ def __init__(self, ol: Overlay, source: VSource=VSource.HDMI,
"""

if not mode:
if CPU_ARCH == ZU_ARCH:
mode = VideoMode(1920, 1080, 24, 60)
else:
if CPU_ARCH == ZYNQ_ARCH or source == VSource.MIPI:
mode = VideoMode(1280, 720, 24, 60)
else:
mode = VideoMode(1920, 1080, 24, 60)

if (source == VSource.HDMI or source == VSource.MIPI) and \
sink == VSink.HDMI:
Expand Down

0 comments on commit 1b8a33f

Please sign in to comment.