[FFmpeg-devel] [PATCH]Fix odd RGB555 camstudio, v2
Michael Niedermayer
michaelni at gmx.at
Tue Apr 17 15:42:20 CEST 2012
On Tue, Apr 17, 2012 at 11:01:26AM +0200, Carl Eugen Hoyos wrote:
> Hi!
>
> New patch for ticket #1220 attached.
>
> Please review, Carl Eugen
> cscd.c | 3 +++
> 1 file changed, 3 insertions(+)
> 6807c884fbac3f169bbc68e8cd5dd105f3bd1bf4 patchcamstudio2.diff
> diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
> index 032b58a..b08e7a2 100644
> --- a/libavcodec/cscd.c
> +++ b/libavcodec/cscd.c
> @@ -234,6 +234,9 @@ static av_cold int decode_init(AVCodecContext *avctx) {
> avcodec_get_frame_defaults(&c->pic);
> c->pic.data[0] = NULL;
> c->linelen = avctx->width * avctx->bits_per_coded_sample / 8;
> + // RGB16 is padded to word boundaries
> + if (avctx->bits_per_coded_sample == 16)
> + c->linelen = FFALIGN(c->linelen, 4);
> c->height = avctx->height;
> stride = c->linelen;
> if (avctx->bits_per_coded_sample == 24)
stride = FFALIGN(stride, 4);
the 24 and 16bpp cases look somehow similar and disimilar
can these be merged somehow into something cleaner ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- 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/20120417/0cd43fd9/attachment.asc>
More information about the ffmpeg-devel
mailing list