| @@ -109,7 +109,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) · 108 unmodified lines |
| 109 | 109 | if ( avctx->codec_tag == MKTAG('r','a','w',' ') |
| 110 | 110 | || avctx->codec_tag == MKTAG('N','O','1','6')) |
| 111 | 111 | avctx->pix_fmt = avpriv_find_pix_fmt(pix_fmt_bps_mov, |
| 112 | | − avctx->bits_per_coded_sample & 0x1f); |
| 112 | + avctx->bits_per_coded_sample); |
| 113 | 113 | else if (avctx->codec_tag == MKTAG('W', 'R', 'A', 'W')) |
| 114 | 114 | avctx->pix_fmt = avpriv_find_pix_fmt(pix_fmt_bps_avi, |
| 115 | 115 | avctx->bits_per_coded_sample); |
| @@ -135,7 +135,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) · 19 unmodified lines |
| 135 | 135 | memset(context->palette->data, 0, AVPALETTE_SIZE); |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | | − if (((avctx->bits_per_coded_sample & 0x1f) == 4 || (avctx->bits_per_coded_sample & 0x1f) == 2) && |
| 138 | + if ((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) && |
| 139 | 139 | avctx->pix_fmt == AV_PIX_FMT_PAL8 && |
| 140 | 140 | (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))) { |
| 141 | 141 | context->is_2_4_bpp = 1; |
| @@ -209,14 +209,14 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, · 67 unmodified lines |
| 209 | 209 | int i; |
| 210 | 210 | uint8_t *dst = frame->buf[0]->data; |
| 211 | 211 | buf_size = context->frame_size - AVPALETTE_SIZE; |
| 212 | | − if ((avctx->bits_per_coded_sample & 0x1f) == 4) { |
| 212 | + if (avctx->bits_per_coded_sample == 4) { |
| 213 | 213 | for (i = 0; 2 * i + 1 < buf_size && i<avpkt->size; i++) { |
| 214 | 214 | dst[2 * i + 0] = buf[i] >> 4; |
| 215 | 215 | dst[2 * i + 1] = buf[i] & 15; |
| 216 | 216 | } |
| 217 | 217 | linesize_align = 8; |
| 218 | 218 | } else { |
| 219 | | − av_assert0((avctx->bits_per_coded_sample & 0x1f) == 2); |
| 219 | + av_assert0(avctx->bits_per_coded_sample == 2); |
| 220 | 220 | for (i = 0; 4 * i + 3 < buf_size && i<avpkt->size; i++) { |
| 221 | 221 | dst[4 * i + 0] = buf[i] >> 6; |
| 222 | 222 | dst[4 * i + 1] = buf[i] >> 4 & 3; |