diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-10-24 13:09:58 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-10-24 13:09:58 +0200 |
commit | 9c069bf71af2edc666088fa4a0ce20fedaf4ecdc (patch) | |
tree | 7a678c615e1666ca984a5ce2b13ab48263bb084a /libavcodec/hapdec.c | |
parent | e06ef9aa5fe8a423ab58997f0c99112bb415b947 (diff) | |
download | ffmpeg-9c069bf71af2edc666088fa4a0ce20fedaf4ecdc.tar.gz |
lavc/hapdec: Use correct no-transparency colour space.
Reviewed-by: Tom Butterworth
Diffstat (limited to 'libavcodec/hapdec.c')
-rw-r--r-- | libavcodec/hapdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c index 6adac21bbb..5a399dcb25 100644 --- a/libavcodec/hapdec.c +++ b/libavcodec/hapdec.c @@ -383,9 +383,6 @@ static av_cold int hap_init(AVCodecContext *avctx) avctx->coded_width = FFALIGN(avctx->width, TEXTURE_BLOCK_W); avctx->coded_height = FFALIGN(avctx->height, TEXTURE_BLOCK_H); - /* Technically only one mode has alpha, but 32 bits are easier to handle */ - avctx->pix_fmt = AV_PIX_FMT_RGBA; - ff_texturedsp_init(&ctx->dxtc); switch (avctx->codec_tag) { @@ -393,16 +390,19 @@ static av_cold int hap_init(AVCodecContext *avctx) texture_name = "DXT1"; ctx->tex_rat = 8; ctx->tex_fun = ctx->dxtc.dxt1_block; + avctx->pix_fmt = AV_PIX_FMT_RGB0; break; case MKTAG('H','a','p','5'): texture_name = "DXT5"; ctx->tex_rat = 16; ctx->tex_fun = ctx->dxtc.dxt5_block; + avctx->pix_fmt = AV_PIX_FMT_RGBA; break; case MKTAG('H','a','p','Y'): texture_name = "DXT5-YCoCg-scaled"; ctx->tex_rat = 16; ctx->tex_fun = ctx->dxtc.dxt5ys_block; + avctx->pix_fmt = AV_PIX_FMT_RGB0; break; default: return AVERROR_DECODER_NOT_FOUND; |