aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-08-18 10:20:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-08-18 10:56:08 +0200
commitedae3dbf1d9d7d76af961914c07998eb7bbb482b (patch)
treecaded6febf91793f858df78f1f7bed6430c88c5e /libswscale
parent2f53fce3b193beeffdcd1ecf1bf7c80a4e3dc388 (diff)
parentb490f0c2bcec9d66d8878187f7e6661017e6d398 (diff)
downloadffmpeg-edae3dbf1d9d7d76af961914c07998eb7bbb482b.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits) h264: hide reference frame errors unless requested swscale: split hScale() function pointer into h[cy]Scale(). Move clipd macros to x86util.asm. avconv: reindent. avconv: rescue poor abused start_time global. avconv: rescue poor abused recording_time global. avconv: merge two loops in output_packet(). avconv: fix broken indentation. avconv: get rid of the arbitrary MAX_FILES limit. avconv: get rid of the output_streams_for_file vs. ost_table schizophrenia avconv: add a wrapper for output AVFormatContexts and merge output_opts into it avconv: make itsscale syntax consistent with other options. avconv: factor out adding input streams. avconv: Factorize combining auto vsync with format. avconv: Factorize video resampling. avconv: Don't unnecessarily convert ipts to a double. ffmpeg: remove unsed variable nopts RV3/4 parser: remove unused variable 'off' add XMV demuxer rmdec: parse FPS in RealMedia properly ... Conflicts: avconv.c libavformat/version.h libswscale/swscale.c tests/ref/fate/lmlm4-demux Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/ppc/swscale_altivec.c2
-rw-r--r--libswscale/swscale.c12
-rw-r--r--libswscale/swscale_internal.h11
-rw-r--r--libswscale/x86/swscale_template.c2
4 files changed, 16 insertions, 11 deletions
diff --git a/libswscale/ppc/swscale_altivec.c b/libswscale/ppc/swscale_altivec.c
index 8a5bac308e..439aa91461 100644
--- a/libswscale/ppc/swscale_altivec.c
+++ b/libswscale/ppc/swscale_altivec.c
@@ -400,7 +400,7 @@ void ff_sws_init_swScale_altivec(SwsContext *c)
return;
if (c->srcBpc == 8 && c->dstBpc <= 10) {
- c->hScale = hScale_altivec_real;
+ c->hyScale = c->hcScale = hScale_altivec_real;
}
if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) &&
dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21 &&
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index e94a6f7a7c..0f886486e8 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -2212,7 +2212,7 @@ static av_always_inline void hyscale(SwsContext *c, int16_t *dst, int dstWidth,
int shift= isAnyRGB(c->srcFormat) || c->srcFormat==PIX_FMT_PAL8 ? 13 : av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1;
c->hScale16(dst, dstWidth, (const uint16_t*)src, srcW, xInc, hLumFilter, hLumFilterPos, hLumFilterSize, shift);
} else 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);
}
@@ -2258,8 +2258,8 @@ static av_always_inline void hcscale(SwsContext *c, int16_t *dst1, int16_t *dst2
c->hScale16(dst1, dstWidth, (const uint16_t*)src1, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize, shift);
c->hScale16(dst2, dstWidth, (const uint16_t*)src2, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize, shift);
} else 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);
}
@@ -2929,16 +2929,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)) {
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index a936f96373..c572acb958 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -483,9 +483,14 @@ typedef struct SwsContext {
* (and input coefficients thus padded with zeroes)
* to simplify creating SIMD code.
*/
- void (*hScale)(struct SwsContext *c, int16_t *dst, int dstW, const uint8_t *src,
- const int16_t *filter, const int16_t *filterPos,
- int filterSize);
+ /** @{ */
+ void (*hyScale)(struct SwsContext *c, int16_t *dst, int dstW, const uint8_t *src,
+ const int16_t *filter, const int16_t *filterPos,
+ int filterSize);
+ void (*hcScale)(struct SwsContext *c, int16_t *dst, int dstW, const uint8_t *src,
+ const int16_t *filter, const int16_t *filterPos,
+ int filterSize);
+ /** @} */
void (*hScale16)(int16_t *dst, int dstW, const uint16_t *src, int srcW,
int xInc, const int16_t *filter, const int16_t *filterPos,
diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
index 4163647fa0..7ba1901e21 100644
--- a/libswscale/x86/swscale_template.c
+++ b/libswscale/x86/swscale_template.c
@@ -2474,7 +2474,7 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c)
if (c->srcBpc == 8 && c->dstBpc <= 10) {
#if !COMPILE_TEMPLATE_MMX2
- c->hScale = RENAME(hScale );
+ c->hyScale = c->hcScale = RENAME(hScale );
#endif /* !COMPILE_TEMPLATE_MMX2 */
// Use the new MMX scaler if the MMX2 one can't be used (it is faster than the x86 ASM one).