mirror of https://git.ffmpeg.org/ffmpeg.git
dds: Drop gray-alpha swapping
The original sample was generated with invalid software.
This commit is contained in:
parent
39cdbb12aa
commit
6eb2505855
|
@ -45,7 +45,6 @@ enum DDSPostProc {
|
||||||
DDS_ALPHA_EXP,
|
DDS_ALPHA_EXP,
|
||||||
DDS_NORMAL_MAP,
|
DDS_NORMAL_MAP,
|
||||||
DDS_RAW_YCOCG,
|
DDS_RAW_YCOCG,
|
||||||
DDS_SWAP_ALPHA,
|
|
||||||
DDS_SWIZZLE_A2XY,
|
DDS_SWIZZLE_A2XY,
|
||||||
DDS_SWIZZLE_RBXG,
|
DDS_SWIZZLE_RBXG,
|
||||||
DDS_SWIZZLE_RGXB,
|
DDS_SWIZZLE_RGXB,
|
||||||
|
@ -392,8 +391,6 @@ static int parse_pixel_format(AVCodecContext *avctx)
|
||||||
ctx->postproc = DDS_NORMAL_MAP;
|
ctx->postproc = DDS_NORMAL_MAP;
|
||||||
else if (ycocg_classic && !ctx->compressed)
|
else if (ycocg_classic && !ctx->compressed)
|
||||||
ctx->postproc = DDS_RAW_YCOCG;
|
ctx->postproc = DDS_RAW_YCOCG;
|
||||||
else if (avctx->pix_fmt == AV_PIX_FMT_YA8)
|
|
||||||
ctx->postproc = DDS_SWAP_ALPHA;
|
|
||||||
|
|
||||||
/* ATI/NVidia variants sometimes add swizzling in bpp. */
|
/* ATI/NVidia variants sometimes add swizzling in bpp. */
|
||||||
switch (bpp) {
|
switch (bpp) {
|
||||||
|
@ -540,15 +537,6 @@ static void run_postproc(AVCodecContext *avctx, AVFrame *frame)
|
||||||
src[3] = a;
|
src[3] = a;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DDS_SWAP_ALPHA:
|
|
||||||
/* Alpha and Luma are stored swapped. */
|
|
||||||
av_log(avctx, AV_LOG_DEBUG, "Post-processing swapped Luma/Alpha.\n");
|
|
||||||
|
|
||||||
for (i = 0; i < frame->linesize[0] * frame->height; i += 2) {
|
|
||||||
uint8_t *src = frame->data[0] + i;
|
|
||||||
FFSWAP(uint8_t, src[0], src[1]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case DDS_SWIZZLE_A2XY:
|
case DDS_SWIZZLE_A2XY:
|
||||||
/* Swap R and G, often used to restore a standard RGTC2. */
|
/* Swap R and G, often used to restore a standard RGTC2. */
|
||||||
av_log(avctx, AV_LOG_DEBUG, "Post-processing A2XY swizzle.\n");
|
av_log(avctx, AV_LOG_DEBUG, "Post-processing A2XY swizzle.\n");
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#tb 0: 1/25
|
#tb 0: 1/25
|
||||||
0, 0, 0, 1, 28160, 0xd3981fcb
|
0, 0, 0, 1, 28160, 0x5aa41fcb
|
||||||
|
|
Loading…
Reference in New Issue