[FFmpeg-devel] Ticket 165, grayscale Cinepak in mov
Michael Niedermayer
michaelni at gmx.at
Wed Sep 7 06:01:09 CEST 2011
On Tue, Sep 06, 2011 at 08:20:34PM -0700, Baptiste Coudurier wrote:
> On 09/06/2011 07:51 PM, Michael Niedermayer wrote:
> > On Mon, Aug 29, 2011 at 11:22:42PM +0200, Carl Eugen Hoyos wrote:
> >> Hi!
> >>
> >> I had attached this patch to ticket 165, it seems to fix all samples.
> >>
> >> Please comment, Carl Eugen
> >
> >> mov.c | 3 ++-
> >> 1 file changed, 2 insertions(+), 1 deletion(-)
> >> 1f3316d440d4702ea0f6743d5a3513c8cb502dec patchmovcinepak.diff
> >
> > in absence of a better solution i think this LGTM
> > baptiste, whats your oppinon ?
>
> What's wrong with hacking the decoder ?
that looks like this:
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index d2e0c26..7f408b9 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -394,9 +394,9 @@ static av_cold int cinepak_decode_init(AVCodecContext *avctx)
s->width = (avctx->width + 3) & ~3;
s->height = (avctx->height + 3) & ~3;
s->sega_film_skip_bytes = -1; /* uninitialized state */
-
+av_log(0,0, "bits %d\n", avctx->bits_per_coded_sample);
// check for paletted data
- if (avctx->bits_per_coded_sample != 8) {
+ if (avctx->bits_per_coded_sample != 8 || 1) {
s->palette_video = 0;
avctx->pix_fmt = PIX_FMT_YUV420P;
} else {
so the else would never be reached, which is likely breaking something
better suggestions are welcome
> Assuming the demuxer works with the binary decoder,
> does it still work with the patch ?
this has to be tested ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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/20110907/ee538323/attachment.asc>
More information about the ffmpeg-devel
mailing list