Skip to content

YUV422P to RGB and back to YUV422P format #91

Closed Answered by asticode
Kalit31 asked this question in Q&A
Discussion options

You must be logged in to vote

There are 2 ways to convert pixel formats using go-astiav directly:

  • use a software scale context
  • use filters

Since the pion example you've linked uses software scale context and since it's the simplest one to setup, I think that'd be better for you to try this first.

You can basically create a software scale context to convert from YUV422P into RGB and another one to convert from RGB to YUV422P. For the first one you'd have to make sure source and destination width and height are the same but source pixel format is YUV422P and destination pixel format is RGB here then, as in the example, use ScaleFrame() to convert pixel format. You can then use the same logic with your second software …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Kalit31
Comment options

You must be logged in to vote
5 replies
@asticode
Comment options

@Kalit31
Comment options

@asticode
Comment options

@Kalit31
Comment options

@asticode
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #90 on October 22, 2024 08:17.