On 23/07/2009, at 8:33 AM, Chris Birch wrote:

Dear libav users,

I'd be grateful for any pointers, hints or tips anyone can give me, I've been struggling with this problem for a month now!

My goal is to write DNX36 video essence created from a stream of RGB48p video data. The steps I'm following are:

1. Crop 48 bit planar RGB video from 2048 x 1152 to 1920 x 1080
2. Convert to YUV422p by taking the most significant byte for each pixel from each RGB plane and performing the standard calculations to create YUV and copy the Y value to it's plane each time and the UV values to their planes every other pixel. 3. I then pass my YUV422p from to avcodec_encode_video() with a context that's been setup and the codec successfully opened. 4. The resulting length of the encoded bytes is correct and I write the data to a file.

Sounds like something more suited to the mjpegutils.
It's designed to work with yuv planar data and y4mscaler may already support RGB48p.

I have written a player for a yuv 420 stream, using mjpegutils, cocoa and core video. It shouldn't be difficult to convert to 422, infact CoreVideo require 422, so I upsample it anyway.

http://silicontrip.net/~mark/lavtools/yuvCoreVideoplay_src.tar.bz2

mplayer supports yuv420p streams, not sure if it supports 422.
yuvplay (part of mjpegutils should support all types of yuv streams)

Mark
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to