mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-08 08:10:12 +00:00
avcodec/hap: set bits_per_coded_sample
fixes issue where alpha is ignored in some players Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ca09eacbce
commit
a60539bb5e
@ -242,16 +242,19 @@ static av_cold int hap_init(AVCodecContext *avctx)
|
|||||||
case HAP_FMT_RGBDXT1:
|
case HAP_FMT_RGBDXT1:
|
||||||
ratio = 8;
|
ratio = 8;
|
||||||
avctx->codec_tag = MKTAG('H', 'a', 'p', '1');
|
avctx->codec_tag = MKTAG('H', 'a', 'p', '1');
|
||||||
|
avctx->bits_per_coded_sample = 24;
|
||||||
ctx->tex_fun = ctx->dxtc.dxt1_block;
|
ctx->tex_fun = ctx->dxtc.dxt1_block;
|
||||||
break;
|
break;
|
||||||
case HAP_FMT_RGBADXT5:
|
case HAP_FMT_RGBADXT5:
|
||||||
ratio = 4;
|
ratio = 4;
|
||||||
avctx->codec_tag = MKTAG('H', 'a', 'p', '5');
|
avctx->codec_tag = MKTAG('H', 'a', 'p', '5');
|
||||||
|
avctx->bits_per_coded_sample = 32;
|
||||||
ctx->tex_fun = ctx->dxtc.dxt5_block;
|
ctx->tex_fun = ctx->dxtc.dxt5_block;
|
||||||
break;
|
break;
|
||||||
case HAP_FMT_YCOCGDXT5:
|
case HAP_FMT_YCOCGDXT5:
|
||||||
ratio = 4;
|
ratio = 4;
|
||||||
avctx->codec_tag = MKTAG('H', 'a', 'p', 'Y');
|
avctx->codec_tag = MKTAG('H', 'a', 'p', 'Y');
|
||||||
|
avctx->bits_per_coded_sample = 24;
|
||||||
ctx->tex_fun = ctx->dxtc.dxt5ys_block;
|
ctx->tex_fun = ctx->dxtc.dxt5ys_block;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user