summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-04 04:42:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-04 04:42:04 +0200
commite9cd8f4d20cfe47bef5a2e95ace6b75a347eca68 (patch)
tree73a317ec2d6dc72b7ef2f983ca75515cd78dcca9 /libavcodec
parentc1e7fb60d1ea397e4833b71cf50825a0f2a5b61e (diff)
parentb7616f5716dce68c749d5dfeab19cf595a11807c (diff)
Merge commit 'b7616f5716dce68c749d5dfeab19cf595a11807c'
* commit 'b7616f5716dce68c749d5dfeab19cf595a11807c': huffyuv: Eliminate some pointless casts Conflicts: libavcodec/huffyuvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/huffyuvdec.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index c55bb13b3e..b087809dbf 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -296,11 +296,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
if (avctx->extradata_size < 4)
return -1;
- method = ((uint8_t *) avctx->extradata)[0];
+ method = avctx->extradata[0];
s->decorrelate = method & 64 ? 1 : 0;
s->predictor = method & 63;
if (s->version == 2) {
- s->bitstream_bpp = ((uint8_t *) avctx->extradata)[1];
+ s->bitstream_bpp = avctx->extradata[1];
if (s->bitstream_bpp == 0)
s->bitstream_bpp = avctx->bits_per_coded_sample & ~7;
} else {
@@ -309,15 +309,15 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->vlc_n = FFMIN(s->n, MAX_VLC_N);
s->chroma_h_shift = avctx->extradata[1] & 3;
s->chroma_v_shift = (avctx->extradata[1] >> 2) & 3;
- s->yuv = !!(((uint8_t *) avctx->extradata)[2] & 1);
- s->chroma= !!(((uint8_t *) avctx->extradata)[2] & 3);
- s->alpha = !!(((uint8_t *) avctx->extradata)[2] & 4);
+ s->yuv = !!(avctx->extradata[2] & 1);
+ s->chroma= !!(avctx->extradata[2] & 3);
+ s->alpha = !!(avctx->extradata[2] & 4);
}
- interlace = (((uint8_t *) avctx->extradata)[2] & 0x30) >> 4;
+ interlace = (avctx->extradata[2] & 0x30) >> 4;
s->interlaced = (interlace == 1) ? 1 : (interlace == 2) ? 0 : s->interlaced;
- s->context = ((uint8_t *) avctx->extradata)[2] & 0x40 ? 1 : 0;
+ s->context = avctx->extradata[2] & 0x40 ? 1 : 0;
- if (read_huffman_tables(s, ((uint8_t *) avctx->extradata) + 4,
+ if (read_huffman_tables(s, avctx->extradata + 4,
avctx->extradata_size - 4) < 0)
return AVERROR_INVALIDDATA;
} else {
@@ -548,7 +548,7 @@ static av_cold int decode_init_thread_copy(AVCodecContext *avctx)
s->vlc[i].table = NULL;
if (s->version >= 2) {
- if (read_huffman_tables(s, ((uint8_t *) avctx->extradata) + 4,
+ if (read_huffman_tables(s, avctx->extradata + 4,
avctx->extradata_size) < 0)
return AVERROR_INVALIDDATA;
} else {