[MPlayer-dev-eng] [PATCH] xvid patch and VCD patch
elcabesa
elcabesa at inwind.it
Thu Apr 3 20:34:29 CEST 2003
On Thursday 03 April 2003 16:05, Diego Biurrun wrote:
> elcabesa writes:
> > On Thursday 03 April 2003 10:57, Jindrich Makovicka wrote:
> > > elcabesa wrote:
> > > >On Thursday 03 April 2003 12:29, elcabesa wrote:
> > > >> vcd simply doesen't compile due include error [fixed]
> > > >>xvid doesn't comile due to another include compiel [fixed]
> > > >>xvid vhq changed as requrested by re`my Guyomarch
> > > >
> > > >here the patch=)
> > >
> > > I guess it's about time to read DOCS/tech/patches.txt
> > >
> > > hint: diff -u
> >
> > cvs -diff is not right??
>
> No, we need -u for a unified diff that can be applied with the patch
> program. It's all explained in DOCS/tech/patches.txt.
>
> Diego
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
readed, maked a patch and now posted here
-------------- next part --------------
Index: DOCS/en/mplayer.1
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/en/mplayer.1,v
retrieving revision 1.362
diff -u -r1.362 mplayer.1
--- DOCS/en/mplayer.1 3 Apr 2003 06:52:39 -0000 1.362
+++ DOCS/en/mplayer.1 3 Apr 2003 16:57:03 -0000
@@ -3389,7 +3389,7 @@
.IPs pass=<1|2>
specify the pass in 2pass mode
.IPs bitrate=<value>
-sets the bitrate to be used in kbits/\:second if <16000 or in bits/\:second
+sets the bitrate to be used in kbits/second if <16000 or in bits/second
if >16000
(CBR or 2pass mode, default=687 kbits/s)
.IPs fixed_quant=<1\-31>
@@ -3467,6 +3467,18 @@
print the psnr (peak signal to noise ratio) for the whole video after encoding
and store the per frame psnr in a file with a name like 'psnr_hhmmss.log'.
Returned values are in dB (decibel), the higher the better.
+.IPs hq_ac
+enable a better prediction of ac component, will save bits at cost of a not too slower encoding. (default=off)
+.IPs chroma_opt
+enable a chroma optimizer prefilter.(default=off)
+.IPs vhq=<1\3>
+enable some high quality search using DCT, there are 3 possble setting:
+.br
+limited search
+.br
+medium search
+.br
+wide search.
.RE
Index: libmpcodecs/ve_xvid.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_xvid.c,v
retrieving revision 1.19
diff -u -r1.19 ve_xvid.c
--- libmpcodecs/ve_xvid.c 3 Apr 2003 06:53:01 -0000 1.19
+++ libmpcodecs/ve_xvid.c 3 Apr 2003 16:57:13 -0000
@@ -23,6 +23,7 @@
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
+#include <time.h>
#include <xvid.h>
#include "xvid_vbr.h"
@@ -53,9 +54,9 @@
0,
0,
0,
- PMV_HALFPELREFINE16 | PMV_HALFPELDIAMOND8 | HALFPELREFINE16_BITS,
- PMV_HALFPELREFINE16 | PMV_HALFPELDIAMOND8 | PMV_ADVANCEDDIAMOND16 | HALFPELREFINE16_BITS,
- PMV_HALFPELREFINE16 | PMV_EXTSEARCH16 | PMV_HALFPELREFINE8 | PMV_HALFPELDIAMOND8 | PMV_USESQUARES16 | EXTSEARCH_BITS | HALFPELREFINE8_BITS | HALFPELREFINE16_BITS | CHECKPREDICTION_BITS
+ PMV_HALFPELREFINE16 | PMV_HALFPELDIAMOND8 ,
+ PMV_HALFPELREFINE16 | PMV_HALFPELDIAMOND8 | PMV_ADVANCEDDIAMOND16 ,
+ PMV_HALFPELREFINE16 | PMV_EXTSEARCH16 | PMV_HALFPELREFINE8 | PMV_HALFPELDIAMOND8 | PMV_USESQUARES16
#else
0,
PMV_QUICKSTOP16,
@@ -69,6 +70,16 @@
#endif
};
+#ifdef XVID_API_UNSTABLE
+static int const vhq_presets[4] = {
+ 0,
+ HALFPELREFINE16_BITS|QUARTERPELREFINE16_BITS,
+ HALFPELREFINE16_BITS|QUARTERPELREFINE16_BITS|HALFPELREFINE8_BITS|QUARTERPELREFINE8_BITS|CHECKPREDICTION_BITS,
+ EXTSEARCH_BITS|HALFPELREFINE16_BITS|QUARTERPELREFINE16_BITS|HALFPELREFINE8_BITS|QUARTERPELREFINE8_BITS|CHECKPREDICTION_BITS
+};
+#endif
+
+
extern char* passtmpfile;
static int xvidenc_pass = 0;
@@ -142,7 +153,7 @@
{ "gmc", &xvidenc_gmc, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{ "chroma_me", &xvidenc_chroma_me, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{ "hq_ac", &xvidenc_hqac, CONF_TYPE_FLAG, 0, 0, 1, NULL},
- { "vhq", &xvidenc_vhq, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+ { "vhq", &xvidenc_vhq, CONF_TYPE_INT, CONF_RANGE, 1, 3, NULL},
{ "chroma_opt", &xvidenc_pref, CONF_TYPE_FLAG, 0, 0, 1, NULL},
#endif
{ NULL, NULL, 0, 0, 0, 0, NULL}
@@ -275,10 +286,13 @@
#ifdef XVID_API_UNSTABLE
if (xvidenc_qpel) {
fp->enc_frame.general |= XVID_QUARTERPEL;
- fp->enc_frame.motion |= PMV_QUARTERPELREFINE16 | PMV_QUARTERPELREFINE8 |QUARTERPELREFINE16_BITS | QUARTERPELREFINE8_BITS;
+ fp->enc_frame.motion |= PMV_QUARTERPELREFINE16 | PMV_QUARTERPELREFINE8 ;
}
if (xvidenc_vhq)
+ {
fp->enc_frame.general |= XVID_MODEDECISION_BITS;
+ fp->enc_frame.motion |=vhq_presets[xvidenc_vhq];
+ }
if (xvidenc_gmc)
fp->enc_frame.general |= XVID_GMC;
if (xvidenc_psnr)
@@ -469,8 +483,8 @@
if (!fvstats) {
time_t today2;
struct tm *today;
- today2 = time (NULL);
- today = localtime (&today2);
+ today2=time (NULL);
+ today=localtime(&today2);
sprintf (filename, "psnr_%02d%02d%02d.log", today->tm_hour, today->tm_min, today->tm_sec);
fvstats = fopen (filename,"w");
if (!fvstats) {
More information about the MPlayer-dev-eng
mailing list