Is “PIX_FMT_YUV420P” a ffmpeg constant? I’m surprised it works with
SDL_BYTESPERPIXEL.
I get greenish and purplish video with SDL 1.3.
My buffer is in PIX_FMT_YUV420P. I use ffmpeg to decode.
If the video is correct, but miscolored, you probably have the Cb and Cr
channels backwards. I would guess that if you changed
SDL_PIXELFORMAT_IYUV to SDL_PIXELFORMAT_YV12 in your SDL_CreateTexture()
call, it’ll work correctly.
Is “PIX_FMT_YUV420P” a ffmpeg constant? I’m surprised it
works with SDL_BYTESPERPIXEL.
I get greenish and purplish video with SDL 1.3.
My buffer is in PIX_FMT_YUV420P. I use ffmpeg to
decode.
If the video is correct, but miscolored, you probably have
the Cb and Cr channels backwards. I would guess that if you
changed SDL_PIXELFORMAT_IYUV to SDL_PIXELFORMAT_YV12 in your
SDL_CreateTexture() call, it’ll work correctly.
–ryan.
Hi Ryan
It worked with corrections you suggested.
Best regards
Unga— On Wed, 8/17/11, Ryan C. Gordon wrote:
From: Ryan C. Gordon
Subject: Re: [SDL] Why I get greenish and purplish video?
To: “SDL Development List”
Date: Wednesday, August 17, 2011, 3:25 PM