# HG changeset patch # User bcoudurier # Date 1204214719 0 # Node ID da04b574d13146bb364c4d154b3f0e778b33d43f # Parent 18517a0b71f35a8debc78d5385a110f7c8514c21 set codec bps to grayscale bits, fix 256grey.mov diff -r 18517a0b71f3 -r da04b574d131 mov.c --- a/mov.c Wed Feb 27 20:34:44 2008 +0000 +++ b/mov.c Thu Feb 28 16:05:19 2008 +0000 @@ -725,7 +725,8 @@ st->codec->bits_per_sample = get_be16(pb); /* depth */ st->codec->color_table_id = get_be16(pb); /* colortable id */ - + dprintf(c->fc, "depth %d, ctab id %d\n", + st->codec->bits_per_sample, st->codec->color_table_id); /* figure out the palette situation */ color_depth = st->codec->bits_per_sample & 0x1F; color_greyscale = st->codec->bits_per_sample & 0x20; @@ -735,6 +736,7 @@ (color_depth == 8)) { if (color_greyscale) { /* compute the greyscale palette */ + st->codec->bits_per_sample = color_depth; color_count = 1 << color_depth; color_index = 255; color_dec = 256 / (color_count - 1);