Ticket #4653: 28_skiploop_multithread.dpatch

File 28_skiploop_multithread.dpatch, 1.2 KB (added by reidjr_at_lineone_net, 10 years ago)

as described above

Line 
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## 27_skiploop_multithread.dpatch by John Reid <reidjr_at_lineone.net>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: disables the deblocking loop filter for h.264 ffmpeg, when max CPU > 1.
6## DP: Without this patch BBC-HD and most h.264 content will only use a single core/thread.
7## DP: Updated by reidjr_at_lineone_net, against mythtv-0.22.0~trunk21644
8
9@DPATCH@
10
11diff -urNad mythtv-0.22.0~trunk21644~/libs/libmythtv/avformatdecoder.cpp mythtv-0.22.0~trunk21644/libs/libmythtv/avformatdecoder.cpp
12--- mythtv-0.22.0~trunk21644~/libs/libmythtv/avformatdecoder.cpp        2009-09-01 23:49:21.000000000 +0100
13+++ mythtv-0.22.0~trunk21644/libs/libmythtv/avformatdecoder.cpp 2009-09-03 23:04:23.000000000 +0100
14@@ -1625,8 +1625,12 @@
15                     vdp.SetInput(QSize(width, height));
16                     dec = vdp.GetDecoder();
17                     thread_count = vdp.GetMaxCPUs();
18+                    if  (thread_count > 1)
19+                    {
20+                    enc->skip_loop_filter = AVDISCARD_ALL;
21+                    } 
22                 }
23
24                 bool handled = false;
25                 if (!using_null_videoout && mpeg_version(enc->codec_id))
26                 {