summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/dsputil.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2007-01-13 21:19:52 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2007-01-13 21:19:52 +0000
commit6e8ff6e5c232de4b8235626af31ab85345120a93 (patch)
tree25930156aa9f4f2014bf6fe3d65c183262626b8d /src/libffmpeg/libavcodec/dsputil.c
parent2f5905081ee2040537f043fe4afabbb66d26354e (diff)
downloadxine-lib-6e8ff6e5c232de4b8235626af31ab85345120a93.tar.gz
xine-lib-6e8ff6e5c232de4b8235626af31ab85345120a93.tar.bz2
* ffmpeg update to 51.28.0
* Workaround ffmpeg buggy codecs that don't release their DR1 frames. * Fix several segfaults and freezing problem with H264 streams that use a lot of reference frames (eg. 15) * Initial support to enable/disable ffmpeg codecs. Codecs may be disabled in groups by --disable-ffmpeg-uncommon-codecs/--disable-ffmpeg-popular-codecs Think of "uncommon" codecs what people would never want to play with their PDAs (they will save memory by removing them). Note: currently both uncommon/popular codecs are _build_ but disabled. that is, build system still need some improvements to really save memory. warning: non-autoconf guru playing with the build system, likely breakage. CVS patchset: 8499 CVS date: 2007/01/13 21:19:52
Diffstat (limited to 'src/libffmpeg/libavcodec/dsputil.c')
-rw-r--r--src/libffmpeg/libavcodec/dsputil.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/dsputil.c b/src/libffmpeg/libavcodec/dsputil.c
index 51eddbc60..916d8658c 100644
--- a/src/libffmpeg/libavcodec/dsputil.c
+++ b/src/libffmpeg/libavcodec/dsputil.c
@@ -2549,6 +2549,11 @@ void ff_put_vc1_mspel_mc00_c(uint8_t *dst, uint8_t *src, int stride, int rnd) {
}
#endif /* CONFIG_VC1_DECODER||CONFIG_WMV3_DECODER */
+#if defined(CONFIG_H264_ENCODER)
+/* H264 specific */
+void ff_h264dsp_init(DSPContext* c, AVCodecContext *avctx);
+#endif /* CONFIG_H264_ENCODER */
+
static void wmv2_mspel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int w){
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int i;
@@ -3801,11 +3806,31 @@ void dsputil_static_init(void)
for(i=0; i<64; i++) inv_zigzag_direct16[ff_zigzag_direct[i]]= i+1;
}
+int ff_check_alignment(void){
+ static int did_fail=0;
+ DECLARE_ALIGNED_16(int, aligned);
+
+ if((int)&aligned & 15){
+ if(!did_fail){
+#if defined(HAVE_MMX) || defined(HAVE_ALTIVEC)
+ av_log(NULL, AV_LOG_ERROR,
+ "Compiler did not align stack variables. Libavcodec has been miscompiled\n"
+ "and may be very slow or crash. This is not a bug in libavcodec,\n"
+ "but in the compiler. Do not report crashes to FFmpeg developers.\n");
+#endif
+ did_fail=1;
+ }
+ return -1;
+ }
+ return 0;
+}
void dsputil_init(DSPContext* c, AVCodecContext *avctx)
{
int i;
+ ff_check_alignment();
+
#ifdef CONFIG_ENCODERS
if(avctx->dct_algo==FF_DCT_FASTINT) {
c->fdct = fdct_ifast;
@@ -4006,6 +4031,9 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
#if defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER)
ff_vc1dsp_init(c,avctx);
#endif
+#if defined(CONFIG_H264_ENCODER)
+ ff_h264dsp_init(c,avctx);
+#endif
c->put_mspel_pixels_tab[0]= put_mspel8_mc00_c;
c->put_mspel_pixels_tab[1]= put_mspel8_mc10_c;