I've been a part-time user of ffmpeg (using cli), and I'm now trying out the API/SDK to perform some processing.
One keen feature I'm interested in is being able to encode or decode using a packed 10-bit YUYV 422 pixel format. Thus far, I have noticed the 8-bits-per-component 'AV_PIX_FMT_YUYV422' pixel format but I have not seen a corresponding equivalent for 10-bits. I can appreciate that 10-bit formats are very awkward (CPU hardware is traditionally built for powers of 2).
I had a look at the example code (decoding__encoding.c) which is where my question originates, specifically in the video_encode_example(..) function. I was trying to understand how I call pass in a packed 10-bit YUYV 422 format for encoding.
The code includes some of the following:
c->pix_fmt = AV_PIX_FMT_YUV420P; // This is the pertinent code that had me interested.
frame->format = c->pix_fmt;
frame->width = c->width;
frame->height = c->height;
From: Carl Eugen Hoyos <[hidden email]> To: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." <[hidden email]> Sent: Wednesday, 3 May 2017, 2:55 Subject: Re: [Libav-user] Handling uncompressed 10-bit YUYV 422 (packed)