]> granicus.if.org Git - handbrake/commitdiff
Use a more direct workaround for the DTS-ES XCh decoding issue.
authorRodeo <tdskywalker@gmail.com>
Sun, 26 Aug 2012 14:35:54 +0000 (14:35 +0000)
committerRodeo <tdskywalker@gmail.com>
Sun, 26 Aug 2012 14:35:54 +0000 (14:35 +0000)
The workaround committed in revision 4896 works for now, but if/when we add 6.1 encoding, we'll want to decode that discrete center surround channel. We could special-case it, but the issue would still be present under 64-bit Windows.

Instead, disable the buggy assembly optimizations until they are fixed.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4918 b64f7644-9d1e-0410-96f1-a4d463321fa5

contrib/ffmpeg/A07-fmac-scalar-asm.patch [new file with mode: 0644]
libhb/decavcodec.c

diff --git a/contrib/ffmpeg/A07-fmac-scalar-asm.patch b/contrib/ffmpeg/A07-fmac-scalar-asm.patch
new file mode 100644 (file)
index 0000000..2ccaee8
--- /dev/null
@@ -0,0 +1,20 @@
+diff --git a/libavutil/x86/float_dsp_init.c b/libavutil/x86/float_dsp_init.c
+index d259a36..3729d91 100644
+--- a/libavutil/x86/float_dsp_init.c
++++ b/libavutil/x86/float_dsp_init.c
+@@ -38,11 +38,13 @@ void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
+     if (mm_flags & AV_CPU_FLAG_SSE && HAVE_SSE) {
+         fdsp->vector_fmul = ff_vector_fmul_sse;
+-        fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse;
++        // buggy under 64-bit Windows: http://bugzilla.libav.org/show_bug.cgi?id=336
++        // fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse;
+     }
+     if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
+         fdsp->vector_fmul = ff_vector_fmul_avx;
+-        fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx;
++        // buggy under 64-bit Windows: http://bugzilla.libav.org/show_bug.cgi?id=336
++        // fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx;
+     }
+ #endif
+ }
index 11a04a8b4e2139b826eea7189d3efcd0949e885d..d0a64a2b089d4a8ccbaf1e22b3b37125d3dcd461 100644 (file)
@@ -221,18 +221,6 @@ static int decavcodecaInit( hb_work_object_t * w, hb_job_t * job )
         hb_log( "decavcodecaInit: avcodec_open failed" );
         return 1;
     }
-    /* Libav's ff_vector_fmac_scalar_*() asm functions are buggy under Win64
-     * we can't let it decode the DTS-ES XCh extension until this is fixed
-     *
-     * Note: the DTS decoder doesn't support request_channels changing
-     * mid-stream, so we must do this here */
-    if ((w->codec_param == CODEC_ID_DTS) &&
-        (w->audio->config.in.channel_layout & ~AV_CH_LOW_FREQUENCY) == AV_CH_LAYOUT_6POINT0)
-    {
-        hb_deep_log(2, "decavcodecaInit: disabling DTS-ES XCh extension processing");
-        pv->context->request_channels =
-            5 + !!(w->audio->config.in.channel_layout & AV_CH_LOW_FREQUENCY);
-    }
 
     return 0;
 }