aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/swscale.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-08-03 11:25:01 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2011-08-17 20:56:06 -0700
commit3f04ab4fcddaaf166da2d623927a6b8547ab87a6 (patch)
tree7b7a0b0bcb9b93f84ca8954845313088538afaa9 /libswscale/swscale.c
parent38e06c2969184b5b55ec41d0c053b2480ab52846 (diff)
downloadffmpeg-3f04ab4fcddaaf166da2d623927a6b8547ab87a6.tar.gz
swscale: split hScale() function pointer into h[cy]Scale().
This allows using more specific implementations for chroma/luma, e.g. we can make assumptions on filterSize being constant, thus avoiding that test at runtime.
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r--libswscale/swscale.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index f5b0ab4986..733f57b049 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -2087,7 +2087,7 @@ static av_always_inline void hyscale(SwsContext *c, int16_t *dst, int dstWidth,
}
if (!c->hyscale_fast) {
- c->hScale(c, dst, dstWidth, src, hLumFilter, hLumFilterPos, hLumFilterSize);
+ c->hyScale(c, dst, dstWidth, src, hLumFilter, hLumFilterPos, hLumFilterSize);
} else { // fast bilinear upscale / crap downscale
c->hyscale_fast(c, dst, dstWidth, src, srcW, xInc);
}
@@ -2125,8 +2125,8 @@ static av_always_inline void hcscale(SwsContext *c, int16_t *dst1, int16_t *dst2
}
if (!c->hcscale_fast) {
- c->hScale(c, dst1, dstWidth, src1, hChrFilter, hChrFilterPos, hChrFilterSize);
- c->hScale(c, dst2, dstWidth, src2, hChrFilter, hChrFilterPos, hChrFilterSize);
+ c->hcScale(c, dst1, dstWidth, src1, hChrFilter, hChrFilterPos, hChrFilterSize);
+ c->hcScale(c, dst2, dstWidth, src2, hChrFilter, hChrFilterPos, hChrFilterSize);
} else { // fast bilinear upscale / crap downscale
c->hcscale_fast(c, dst1, dst2, dstWidth, src1, src2, srcW, xInc);
}
@@ -2789,16 +2789,16 @@ static av_cold void sws_init_swScale_c(SwsContext *c)
if (c->srcBpc == 8) {
if (c->dstBpc <= 10) {
- c->hScale = hScale8To15_c;
+ c->hyScale = c->hcScale = hScale8To15_c;
if (c->flags & SWS_FAST_BILINEAR) {
c->hyscale_fast = hyscale_fast_c;
c->hcscale_fast = hcscale_fast_c;
}
} else {
- c->hScale = hScale8To19_c;
+ c->hyScale = c->hcScale = hScale8To19_c;
}
} else {
- c->hScale = c->dstBpc > 10 ? hScale16To19_c : hScale16To15_c;
+ c->hyScale = c->hcScale = c->dstBpc > 10 ? hScale16To19_c : hScale16To15_c;
}
if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat)) {