Mercurial > libavcodec.hg
comparison 8bps.c @ 7823:4525dcd81357 libavcodec
Bump Major version, this commit is almost just renaming bits_per_sample to
bits_per_coded_sample but that cannot be done seperately.
Patch by Luca Abeni
Also reset the minor version and fix the forgotton change to libfaad.
Note: The API/ABI should not be considered stable yet, there still may
be a change done here or there if some developer has some cleanup ideas and
patches!
author | michael |
---|---|
date | Mon, 08 Sep 2008 14:24:59 +0000 |
parents | e943e1409077 |
children | 2acf0ae7b041 |
comparison
equal
deleted
inserted
replaced
7822:67cfe4983e6d | 7823:4525dcd81357 |
---|---|
158 | 158 |
159 if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) { | 159 if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) { |
160 return 1; | 160 return 1; |
161 } | 161 } |
162 | 162 |
163 switch (avctx->bits_per_sample) { | 163 switch (avctx->bits_per_coded_sample) { |
164 case 8: | 164 case 8: |
165 avctx->pix_fmt = PIX_FMT_PAL8; | 165 avctx->pix_fmt = PIX_FMT_PAL8; |
166 c->planes = 1; | 166 c->planes = 1; |
167 c->planemap[0] = 0; // 1st plane is palette indexes | 167 c->planemap[0] = 0; // 1st plane is palette indexes |
168 if (avctx->palctrl == NULL) { | 168 if (avctx->palctrl == NULL) { |
191 c->planemap[2] = 0; // 3rd plane is blue | 191 c->planemap[2] = 0; // 3rd plane is blue |
192 c->planemap[3] = 3; // 4th plane is alpha??? | 192 c->planemap[3] = 3; // 4th plane is alpha??? |
193 #endif | 193 #endif |
194 break; | 194 break; |
195 default: | 195 default: |
196 av_log(avctx, AV_LOG_ERROR, "Error: Unsupported color depth: %u.\n", avctx->bits_per_sample); | 196 av_log(avctx, AV_LOG_ERROR, "Error: Unsupported color depth: %u.\n", avctx->bits_per_coded_sample); |
197 return -1; | 197 return -1; |
198 } | 198 } |
199 | 199 |
200 return 0; | 200 return 0; |
201 } | 201 } |