[FFmpeg-devel] [PATCH 2/2] Fix writing 12 bit DPX
Michael Niedermayer
michaelni at gmx.at
Sat Oct 6 02:38:08 CEST 2012
On Fri, Oct 05, 2012 at 10:42:18PM +0200, Georg Lippitsch wrote:
> The DPX encoder now writes 12 DPX that open correctly (tested with
> ImageMagick), and also correspond to the 12 bit sample files at
> http://samples.ffmpeg.org/image-samples/dpx_samples.zip
> ---
> libavcodec/dpxenc.c | 13 ++++++++++++-
> 1 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
> index 451b7b9..85899f9 100644
> --- a/libavcodec/dpxenc.c
> +++ b/libavcodec/dpxenc.c
> @@ -148,14 +148,25 @@ static void encode_gbrp10(AVCodecContext *avctx, const AVPicture *pic, uint8_t *
>
> static void encode_gbrp12(AVCodecContext *avctx, const AVPicture *pic, uint16_t *dst)
> {
> + DPXContext *s = avctx->priv_data;
> const uint16_t *src[3] = {(uint16_t*)pic->data[0],
> (uint16_t*)pic->data[1],
> (uint16_t*)pic->data[2]};
> int x, y, i;
> for (y = 0; y < avctx->height; y++) {
> for (x = 0; x < avctx->width; x++) {
> + uint16_t value[3];
> + if (avctx->pix_fmt & 1) {
if the pix fmts where reordered or somehow changed in an ABI bump
then this would break. Nothing like that is planed but if it happens
in the future noone will think of / remember this here.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121006/0abb48a2/attachment.asc>
More information about the ffmpeg-devel
mailing list