[mythtv] looking through NuppelVideoRecorder.cpp, mpeg4 interlacing not set?

steve at nexusuk.org steve at nexusuk.org
Wed Mar 10 05:02:14 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 9 Mar 2004, Isaac Richards wrote:

> On Tuesday 09 March 2004 03:53 pm, D Banerjee wrote:
> > Looks like we don't ever set CODEC_FLAG_INTERLACED_DCT or
> > CODEC_FLAG_INTERLACED_ME, but we are asking v4l2 for interlaced video. Is
> > this codec option being set elsewhere, or is it defaulting to interlaced?
> 
> They're not there because they're both relatively recent flags in libavcodec, 
> and I have never gotten around to testing how they effect quality and cpu 
> usage.  I'd be happy to add them if someone wants to look into that.

I wrote a patch a couple of weeks ago which I never got around to 
submitting to the list, so I've attached it to this mail.  It adds 
tickboxes to the recording profiles which allow you to turn on the 
interlaced DCT and ME options.  I've been running it for the past 2 or 3 
weeks with no problems (and no noticable increase or decrease in CPU 
usage).

- -- 

 - Steve                                             http://www.nexusuk.org/

     Servatis a periculum, servatis a maleficum - Whisper, Evanescence

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Public key available at http://www.nexusuk.org/pubkey.txt

iD8DBQFATuep5zUOsIV3bqERAoO9AKCqvpzzDuyy/zliYL6wRw12pHTDHgCgooqX
4XQJXETetqwRivOzOIS/XzE=
=j5DA
-----END PGP SIGNATURE-----
-------------- next part --------------
diff -urN mythtv.vanilla/libs/libmythtv/NuppelVideoRecorder.cpp mythtv.interlaced/libs/libmythtv/NuppelVideoRecorder.cpp
--- mythtv.vanilla/libs/libmythtv/NuppelVideoRecorder.cpp	2004-02-18 09:08:12.000000000 +0000
+++ mythtv.interlaced/libs/libmythtv/NuppelVideoRecorder.cpp	2004-02-26 18:50:38.000000000 +0000
@@ -244,6 +244,20 @@
         else
             mb_decision = FF_MB_DECISION_SIMPLE;
     }
+    else if (opt == "mpeg4optionidct")
+    {
+        if (value)
+            mp4opts |= CODEC_FLAG_INTERLACED_DCT;
+        else
+            mp4opts &= ~CODEC_FLAG_INTERLACED_DCT;
+    }
+    else if (opt == "mpeg4optionime")
+    {
+        if (value)
+            mp4opts |= CODEC_FLAG_INTERLACED_ME;
+        else
+            mp4opts &= ~CODEC_FLAG_INTERLACED_ME;
+    }
     else if (opt == "mpeg4option4mv")
     {
         if (value)
diff -urN mythtv.vanilla/libs/libmythtv/recordingprofile.cpp mythtv.interlaced/libs/libmythtv/recordingprofile.cpp
--- mythtv.vanilla/libs/libmythtv/recordingprofile.cpp	2004-01-28 22:34:58.000000000 +0000
+++ mythtv.interlaced/libs/libmythtv/recordingprofile.cpp	2004-02-26 18:48:48.000000000 +0000
@@ -356,6 +356,30 @@
     };
 };
 
+class MPEG4OptionIDCT: public CodecParam, public CheckBoxSetting {
+public:
+    MPEG4OptionIDCT(const RecordingProfile& parent):
+        CodecParam(parent, "mpeg4optionidct") {
+        setLabel(QObject::tr("Enable interlaced DCT encoding"));
+        setValue(false);
+        setHelpText(QObject::tr("If set, the MPEG4 encoder will use interlaced "
+                    "DCT encoding.  You probably want this when encoding "
+                    "interlaced video."));
+    };
+};
+
+class MPEG4OptionIME: public CodecParam, public CheckBoxSetting {
+public:
+    MPEG4OptionIME(const RecordingProfile& parent):
+        CodecParam(parent, "mpeg4optionime") {
+        setLabel(QObject::tr("Enable interlaced motion estimation"));
+        setValue(false);
+        setHelpText(QObject::tr("If set, the MPEG4 encoder will use interlaced "
+                    "motion estimation.  You probably want this when encoding "
+                    "interlaced video."));
+    };
+};
+
 class MPEG4Option4MV: public CodecParam, public CheckBoxSetting {
 public:
     MPEG4Option4MV(const RecordingProfile& parent):
@@ -503,6 +527,8 @@
         params->addChild(new MPEG4ScaleBitrate(parent));
         params->addChild(new MPEG4OptionVHQ(parent));
         params->addChild(new MPEG4Option4MV(parent));
+        params->addChild(new MPEG4OptionIDCT(parent));
+        params->addChild(new MPEG4OptionIME(parent));
 
         addTarget("MPEG-4", params);
 
@@ -516,6 +542,8 @@
         params->addChild(new MPEG4ScaleBitrate(parent));
         params->addChild(new MPEG4OptionVHQ(parent));
         params->addChild(new MPEG4Option4MV(parent));
+        params->addChild(new MPEG4OptionIDCT(parent));
+        params->addChild(new MPEG4OptionIME(parent));
         addTarget("MPEG-2", params);
 
         params = new VerticalConfigurationGroup();


More information about the mythtv-dev mailing list