summaryrefslogtreecommitdiff
path: root/libswscale/x86/swscale_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-08-13 22:23:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-08-13 22:24:47 +0200
commitca1dfea12771b585846fb86aa08c3d7f066a3cc4 (patch)
tree6db034b36245b9fe51d9a41d41be1718a3be8b89 /libswscale/x86/swscale_template.c
parent75af0e6a1601a4246d6409ca28dc80a3ba0e8d6e (diff)
parent3304a1e69a8a050eb66d2304acd2d01354fa1aac (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: swscale: add dithering to yuv2yuvX_altivec_real rv34: free+allocate buffer instead of reallocating it to preserve alignment h264: add missing brackets. swscale: use 15-bit intermediates for 9/10-bit scaling. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/x86/swscale_template.c')
-rw-r--r--libswscale/x86/swscale_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
index 87248e76fa..4163647fa0 100644
--- a/libswscale/x86/swscale_template.c
+++ b/libswscale/x86/swscale_template.c
@@ -2472,7 +2472,7 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c)
}
}
- if (c->scalingBpp == 8) {
+ if (c->srcBpc == 8 && c->dstBpc <= 10) {
#if !COMPILE_TEMPLATE_MMX2
c->hScale = RENAME(hScale );
#endif /* !COMPILE_TEMPLATE_MMX2 */
@@ -2532,6 +2532,6 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c)
#endif /* !COMPILE_TEMPLATE_MMX2 */
if(isAnyRGB(c->srcFormat) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15)
c->hScale16= RENAME(hScale16);
- if(c->scalingBpp != 8)
+ if(c->dstBpc > 10)
c->hScale16 = NULL;
}