[FFmpeg-devel] [PATCH] set bits_per_raw_sample when transcoding into wide colorspace
Michael Niedermayer
michaelni
Fri Sep 4 21:20:36 CEST 2009
On Fri, Sep 04, 2009 at 03:22:54PM +0200, Lars T?uber wrote:
> $subject
>
> Lars
> ffmpeg.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
> 84909e388d819a1c59f18c4d7ee229c144134d81 16bps.diff
> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c (revision 19746)
> +++ ffmpeg.c (working copy)
> @@ -985,6 +985,20 @@
> }
> sws_scale(ost->img_resample_ctx, formatted_picture->data, formatted_picture->linesize,
> 0, ost->resample_height, resampling_dst->data, resampling_dst->linesize);
> +
> + switch (ost->st->codec->pix_fmt) {
> + case PIX_FMT_GRAY16BE:
> + case PIX_FMT_GRAY16LE:
> + case PIX_FMT_RGB48BE:
> + case PIX_FMT_RGB48LE:
> + case PIX_FMT_YUV420PBE:
> + case PIX_FMT_YUV422PBE:
> + case PIX_FMT_YUV444PBE:
> + case PIX_FMT_YUV420PLE:
> + case PIX_FMT_YUV422PLE:
> + case PIX_FMT_YUV444PLE:
> + ost->st->codec->bits_per_raw_sample = 16;
> + }
doing it like that is a sure recipe for forgetting to add a format
in the future.
the pix_fmt_info table might be a better way to check
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Thouse 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: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090904/4bb94b15/attachment.pgp>
More information about the ffmpeg-devel
mailing list