aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2016-04-22 17:28:03 -0400
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-04-26 16:30:04 -0400
commit6eb2505855fa832ba7d0a1c2fb9f92c41c5446e3 (patch)
tree7db36fadeca51a38c15ac32bd6dea322d089d7fa /libavcodec
parent39cdbb12aa2140520246bc4c3e22436b9f8a121a (diff)
downloadffmpeg-6eb2505855fa832ba7d0a1c2fb9f92c41c5446e3.tar.gz
dds: Drop gray-alpha swapping
The original sample was generated with invalid software.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dds.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index fcfc84e28c..f549cadf57 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -45,7 +45,6 @@ enum DDSPostProc {
DDS_ALPHA_EXP,
DDS_NORMAL_MAP,
DDS_RAW_YCOCG,
- DDS_SWAP_ALPHA,
DDS_SWIZZLE_A2XY,
DDS_SWIZZLE_RBXG,
DDS_SWIZZLE_RGXB,
@@ -392,8 +391,6 @@ static int parse_pixel_format(AVCodecContext *avctx)
ctx->postproc = DDS_NORMAL_MAP;
else if (ycocg_classic && !ctx->compressed)
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. */
switch (bpp) {
@@ -540,15 +537,6 @@ static void run_postproc(AVCodecContext *avctx, AVFrame *frame)
src[3] = a;
}
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:
/* Swap R and G, often used to restore a standard RGTC2. */
av_log(avctx, AV_LOG_DEBUG, "Post-processing A2XY swizzle.\n");