[FFmpeg-devel] [PATCH]Fix odd RGB555 camstudio, v2

Michael Niedermayer michaelni at gmx.at
Thu Apr 19 00:48:59 CEST 2012


On Wed, Apr 18, 2012 at 11:57:04PM +0200, Reimar Döffinger wrote:
> On Tue, Apr 17, 2012 at 03:42:20PM +0200, Michael Niedermayer wrote:
> > 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 ?
> 
> Hm. It depends. For the 24 bpp case we tried to avoid writing the
> padding.
> If you/we think that is really pointless we can get rid of the line
> len/stride distinction and just round linelen up completely independent
> of format I think.

iam fine with any solution
i just wanted to make sure this difference in handling wasnt
unintended

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20120419/51768b28/attachment.asc>


More information about the ffmpeg-devel mailing list