Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-06 Thread Andrew Stevens
Hi Andrei,

> Is it possible that the hi-res matrix does not provide the best image
> quality?
It is very possible!  The 'hi-res' matrix does not roll of higher coefficients 
for inter-coded frames at all.  As such it only sane if you have LOTS of 
bits.  If you have less bits a matrix that trades a bit of (theoretical) 
texture detail for (practical) reduction in quantisation will be better.

> This is the custom matrix (suggested by Steven Schultz a while ago):
...


Note that these tables are actually available in the encoder.  I tend to use 
them myself all the time. Select matrix 'tmpgenc'.   Should perhaps be made 
default...

cheers,

Andrew

-- 

Dr Andrew Stevens
Erdingerstrasse 23
85464 Neufinsing
Germany

Home: +49 8121 883672
Mobile: +49 173 5397553

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-06 Thread Bernhard Praschinger
Hallo

Florin Andrei wrote:
> Is it possible that the hi-res matrix does not provide the best image 
> quality?
> My goal is to obtain the highest image quality possible, while the MPEG2 
> stream remains compatible with as many DVD players as possible.
> 
> Using mjpegtools-1.9.0-rc2
The RC2 has a rate control bug. So if you use high -q values like 1-4 
maybe 5 you might see that problem. So please downgrade to RC1 , or 
upgrade to the CVS. (where the problem is fixed.)

auf hoffentlich bald,

Berni the Chaos of Woodquarter

Email: [EMAIL PROTECTED]
www: http://www.lysator.liu.se/~gz/bernhard

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-06 Thread Florin Andrei
Bernhard Praschinger wrote:
> 
> The RC2 has a rate control bug. So if you use high -q values like 1-4 
> maybe 5 you might see that problem. So please downgrade to RC1 , or 
> upgrade to the CVS. (where the problem is fixed.)

I checked out the CVS about 30 minutes ago. make fails.
rc2 compiles just fine.

creating testrec
if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I.. -I/opt/mjpegtools/include 
-I../utils-march=k8 -mtune=k8 -g -O2 -pthread -Wall -Wunused -MT 
lavvideo.o -MD -MP -MF ".deps/lavvideo.Tpo" -c -o lavvideo.o lavvideo.c; \
 then mv -f ".deps/lavvideo.Tpo" ".deps/lavvideo.Po"; else rm -f 
".deps/lavvideo.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I.. -I/opt/mjpegtools/include 
-I../utils-march=k8 -mtune=k8 -g -O2 -pthread -Wall -Wunused -MT 
frequencies.o -MD -MP -MF ".deps/frequencies.Tpo" -c -o frequencies.o 
frequencies.c; \
 then mv -f ".deps/frequencies.Tpo" ".deps/frequencies.Po"; else 
rm -f ".deps/frequencies.Tpo"; exit 1; fi
/bin/bash ../libtool --mode=link gcc  -march=k8 -mtune=k8 -g -O2 
-pthread -Wall -Wunused   -o lavvideo  lavvideo.o frequencies.o  -lm
gcc -march=k8 -mtune=k8 -g -O2 -pthread -Wall -Wunused -o lavvideo 
lavvideo.o frequencies.o  -lm
if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I.. -I/opt/mjpegtools/include 
-I../utils-march=k8 -mtune=k8 -g -O2 -pthread -Wall -Wunused -MT 
lavplay.o -MD -MP -MF ".deps/lavplay.Tpo" -c -o lavplay.o lavplay.c; \
 then mv -f ".deps/lavplay.Tpo" ".deps/lavplay.Po"; else rm -f 
".deps/lavplay.Tpo"; exit 1; fi
/bin/bash ../libtool --mode=link gcc  -march=k8 -mtune=k8 -g -O2 
-pthread -Wall -Wunused   -o lavplay  lavplay.o 
../utils/libmjpegutils.la  liblavplay.la liblavjpeg.la liblavfile.la 
-L/usr/lib -lSDL  -lm
gcc -march=k8 -mtune=k8 -g -O2 -pthread -Wall -Wunused -o .libs/lavplay 
lavplay.o  ../utils/.libs/libmjpegutils.so ./.libs/liblavplay.so 
./.libs/liblavjpeg.so ./.libs/liblavfile.so -L/usr/lib 
/usr/lib/libSDL.so -lm -Wl,--rpath -Wl,/opt/mjpegtools/lib
./.libs/liblavplay.so: undefined reference to `XOpenDisplay'
./.libs/liblavplay.so: undefined reference to `XGetWindowAttributes'
collect2: ld returned 1 exit status
make[2]: *** [lavplay] Error 1
make[2]: Leaving directory 
`/home/florin/work/mjpeg_play-cvs-20071106/lavtools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/florin/work/mjpeg_play-cvs-20071106'
make: *** [all] Error 2


-- 
Florin Andrei

http://florin.myip.org/

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-06 Thread Steven M. Schultz

On Tue, 6 Nov 2007, Florin Andrei wrote:

> I checked out the CVS about 30 minutes ago. make fails.
> rc2 compiles just fine.

Current cvs compiled fine this weekend on a SuSE 10.2 system so it
is puzzling why the problem:

> /usr/lib/libSDL.so -lm -Wl,--rpath -Wl,/opt/mjpegtools/lib
> ./.libs/liblavplay.so: undefined reference to `XOpenDisplay'
> ./.libs/liblavplay.so: undefined reference to `XGetWindowAttributes'

of not linking in -lX11 is happening.

I know what the problem is but not why it's happening to you.  
My guess is it was how the SDL was built/installed.

The fix is to add back in the X libs but that can't be done the
way it was being done because then the linker gives a fatal error
on OSX.

The temporary workaround is to edit lib lavtools/Makefile and add
"-lX11" after the "-lSDL".

I can try to fix the problem but since I don't have a system where
the problem happens it'll be a 'try it now and see if it works
this time' type of thing.

Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-06 Thread Florin Andrei
Steven M. Schultz wrote:
> 
>   The temporary workaround is to edit lib lavtools/Makefile and add
>   "-lX11" after the "-lSDL".

The following patch fixed it:

--- lavtools/Makefile.orig  2007-11-06 11:35:04.0 -0800
+++ lavtools/Makefile   2007-11-06 11:35:15.0 -0800
@@ -372,7 +372,7 @@
  RANLIB = ranlib
  SDL_CFLAGS = -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
  SDL_CONFIG = /usr/bin/sdl-config
-SDL_LIBS = -L/usr/lib -lSDL
+SDL_LIBS = -L/usr/lib -lSDL -lX11
  SDLgfx_LIBS =
  SET_MAKE =
  SHELL = /bin/bash


But now something else doesn't work:

  g++ -DHAVE_CONFIG_H -I. -I. -I.. -I .. -I ../utils -march=k8 -mtune=k8 
-g -O2 -pthread -MT libmplex2_la-videostrm_out.lo -MD -MP -MF 
.deps/libmplex2_la-videostrm_out.Tpo -c videostrm_out.cpp  -fPIC -DPIC 
-o .libs/libmplex2_la-videostrm_out.o
  g++ -DHAVE_CONFIG_H -I. -I. -I.. -I .. -I ../utils -march=k8 -mtune=k8 
-g -O2 -pthread -MT libmplex2_la-videostrm_out.lo -MD -MP -MF 
.deps/libmplex2_la-videostrm_out.Tpo -c videostrm_out.cpp -o 
libmplex2_la-videostrm_out.o >/dev/null 2>&1
/bin/bash ../libtool --mode=link g++  -march=k8 -mtune=k8 -g -O2 
-pthread-o libmplex2.la -rpath /opt/mjpegtools/lib  -version-info 
1:1:1 -release 1.9  libmplex2_la-ac3strm_in.lo 
libmplex2_la-audiostrm_out.lo libmplex2_la-bits.lo 
libmplex2_la-decodebufmodel.lo libmplex2_la-dtsstrm_in.lo 
libmplex2_la-inputstrm.lo libmplex2_la-interact.lo 
libmplex2_la-lpcmstrm_in.lo libmplex2_la-mpastrm_in.lo 
libmplex2_la-multiplexor.lo libmplex2_la-padstrm.lo 
libmplex2_la-stillsstream.lo libmplex2_la-stream_params.lo 
libmplex2_la-systems.lo libmplex2_la-videostrm_in.lo 
libmplex2_la-videostrm_out.lo  ../utils/libmjpegutils.la  -lm
g++ -shared -nostdlib 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crti.o 
/usr/lib/gcc/i486-linux-gnu/4.1.2/crtbeginS.o 
.libs/libmplex2_la-ac3strm_in.o .libs/libmplex2_la-audiostrm_out.o 
.libs/libmplex2_la-bits.o .libs/libmplex2_la-decodebufmodel.o 
.libs/libmplex2_la-dtsstrm_in.o .libs/libmplex2_la-inputstrm.o 
.libs/libmplex2_la-interact.o .libs/libmplex2_la-lpcmstrm_in.o 
.libs/libmplex2_la-mpastrm_in.o .libs/libmplex2_la-multiplexor.o 
.libs/libmplex2_la-padstrm.o .libs/libmplex2_la-stillsstream.o 
.libs/libmplex2_la-stream_params.o .libs/libmplex2_la-systems.o 
.libs/libmplex2_la-videostrm_in.o .libs/libmplex2_la-videostrm_out.o 
-Wl,--rpath -Wl,/home/florin/work/mjpeg_play-cvs-20071106/utils/.libs 
-Wl,--rpath -Wl,/opt/mjpegtools/lib ../utils/.libs/libmjpegutils.so 
-L/usr/lib/gcc/i486-linux-gnu/4.1.2 
-L/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib -L/lib/../lib 
-L/usr/lib/../lib -lstdc++ -lm -lc -lgcc_s 
/usr/lib/gcc/i486-linux-gnu/4.1.2/crtendS.o 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crtn.o  -march=k8 
-mtune=k8 -pthread -Wl,-soname -Wl,libmplex2-1.9.so.0 -o 
.libs/libmplex2-1.9.so.0.1.1
(cd .libs && rm -f libmplex2-1.9.so.0 && ln -s libmplex2-1.9.so.0.1.1 
libmplex2-1.9.so.0)
(cd .libs && rm -f libmplex2.so && ln -s libmplex2-1.9.so.0.1.1 
libmplex2.so)
ar cru .libs/libmplex2.a  libmplex2_la-ac3strm_in.o 
libmplex2_la-audiostrm_out.o libmplex2_la-bits.o 
libmplex2_la-decodebufmodel.o libmplex2_la-dtsstrm_in.o 
libmplex2_la-inputstrm.o libmplex2_la-interact.o 
libmplex2_la-lpcmstrm_in.o libmplex2_la-mpastrm_in.o 
libmplex2_la-multiplexor.o libmplex2_la-padstrm.o 
libmplex2_la-stillsstream.o libmplex2_la-stream_params.o 
libmplex2_la-systems.o libmplex2_la-videostrm_in.o 
libmplex2_la-videostrm_out.o
ranlib .libs/libmplex2.a
creating libmplex2.la
(cd .libs && rm -f libmplex2.la && ln -s ../libmplex2.la libmplex2.la)
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I .. -I ../utils-march=k8 
-mtune=k8 -g -O2 -pthread  -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o 
main.o main.cpp; \
 then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f 
".deps/main.Tpo"; exit 1; fi
/bin/bash ../libtool --mode=link g++  -march=k8 -mtune=k8 -g -O2 
-pthread-o mplex  main.o libmplex2.la  -lm  -lm
g++ -march=k8 -mtune=k8 -g -O2 -pthread -o .libs/mplex main.o 
./.libs/libmplex2.so -lm -Wl,--rpath -Wl,/opt/mjpegtools/lib
./.libs/libmplex2.so: undefined reference to `mjpeg_loglev_t'
collect2: ld returned 1 exit status
make[2]: *** [mplex] Error 1
make[2]: Leaving directory `/home/florin/work/mjpeg_play-cvs-20071106/mplex'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/florin/work/mjpeg_play-cvs-20071106'
make: *** [all] Error 2


>   I can try to fix the problem but since I don't have a system where
>   the problem happens it'll be a 'try it now and see if it works
>   this time' type of thing.

Well, it's Ubuntu 7.04 with the Ubuntu Studio packages installed (plus a 
bunch of multimedia-related libs and apps), but I'll be happy to be a 
crash test dummy every once in a while.
I can probably test it also on Ubuntu 7.10, I'll see what I can do about 
that.

Thanks,

-- 
Florin Andrei

http://florin.myip.org/

--

Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-06 Thread Steven M. Schultz

On Tue, 6 Nov 2007, Florin Andrei wrote:

> The following patch fixed it:

Well, 'worked around' ;)  On some systems that have SDL built to
include its own depencendies then included -lX11 again causes 
an error.  

> -SDL_LIBS = -L/usr/lib -lSDL
> +SDL_LIBS = -L/usr/lib -lSDL -lX11

Which says that the SDL kit wasn't built or installed quite 100%
correct.  If I run "sdl-config --libs" here I see:

-L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lm -ldl -L/usr/X11R6/lib -lX1 
-lXext

which means that since SDL uses/needs the X11 libraries it includes
them and doesn't rely on the higher level applications adding them.

That's why I don't see the problem (on the 3rd different OS I've 
tried) - SDL is configured to include its own dependencies.

A better workaround would be to edit the sdl-config script and add
the -lX11 there.  That way it will be available for all applications
as well as future mjpegtools builds

> /bin/bash ../libtool --mode=link g++  -march=k8 -mtune=k8 -g -O2 
> -pthread-o mplex  main.o libmplex2.la  -lm  -lm
> g++ -march=k8 -mtune=k8 -g -O2 -pthread -o .libs/mplex main.o 
> ./.libs/libmplex2.so -lm -Wl,--rpath -Wl,/opt/mjpegtools/lib
> ./.libs/libmplex2.so: undefined reference to `mjpeg_loglev_t'
> collect2: ld returned 1 exit status
> make[2]: *** [mplex] Error 1
> make[2]: Leaving directory `/home/florin/work/mjpeg_play-cvs-20071106/mplex'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/florin/work/mjpeg_play-cvs-20071106'
> make: *** [all] Error 2

./utils/mjpeg_logging.c:mjpeg_loglev_t(const char *level)
./utils/mjpeg_logging.h:mjpeg_loglev_t(const char *str);

so it would seem that ../utils/.libs/libmjpegutils.so isn't being
included when linking mplex.  Another thing which doesn't happen,
it seems, outside Ubuntu.

> Well, it's Ubuntu 7.04 with the Ubuntu Studio packages installed (plus a 
> bunch of multimedia-related libs and apps), but I'll be happy to be a 

You wouldn't happen to be getting an OLD version of
libmjpegutils.so from somewhere?  It is an installed library and
if Ubuntu or an old mjpegtools was present and found first
(due to the order of library search path) that would explain
`mjpeg_loglev_t' being undefined - that routine is present in
utils/mjpeg_logging.c

Makes sure that utils/.libs/libmjpegutils.so is being used and
that the undef'd symbol is present in that.

Cheers,
Steven


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-06 Thread Florin Andrei
Steven M. Schultz wrote:
>   correct.  If I run "sdl-config --libs" here I see:
> 
> -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lm -ldl -L/usr/X11R6/lib 
> -lX1 -lXext
> 
>   which means that since SDL uses/needs the X11 libraries it includes
>   them and doesn't rely on the higher level applications adding them.

[EMAIL PROTECTED]:~$ sdl-config --libs
-L/usr/lib -lSDL

Maybe the output of this command could be used to make a decision when 
lavtools/Makefile is generated?

>   A better workaround would be to edit the sdl-config script and add
>   the -lX11 there.  That way it will be available for all applications
>   as well as future mjpegtools builds

Hm, if I do that, I wonder what other things may break.

>   You wouldn't happen to be getting an OLD version of
>   libmjpegutils.so from somewhere?  It is an installed library and
>   if Ubuntu or an old mjpegtools was present and found first
>   (due to the order of library search path) that would explain
>   `mjpeg_loglev_t' being undefined - that routine is present in
>   utils/mjpeg_logging.c

Oops, yeah, I had 1.9.0-rc2 installed in /opt and it was in PATH and in 
the /etc/ld.so.conf*
Moved it out of the way and today's CVS compiles just fine. Sorry for 
the false alarm.

-- 
Florin Andrei

http://florin.myip.org/

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-06 Thread Steven M. Schultz

On Tue, 6 Nov 2007, Florin Andrei wrote:

> > which means that since SDL uses/needs the X11 libraries it includes
> > them and doesn't rely on the higher level applications adding them.
> 
> [EMAIL PROTECTED]:~$ sdl-config --libs
> -L/usr/lib -lSDL

Hmmm, but if SDL calls X11 shouldn't it include the necessary info
in its --libs?

> Maybe the output of this command could be used to make a decision when 
> lavtools/Makefile is generated?

No, it can't.  Some systems don't use X11 to do their SDL output.
On another system I have the sdl-config --libs gives:

-L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa -Wl,-framework,OpenGL

> > A better workaround would be to edit the sdl-config script and add

> Hm, if I do that, I wonder what other things may break.

I don't think anything will break.

I'll look into the problem some  more.  There's only 1 place in 
lavtools/ that might need X11 - so maybe a more specific test can
be found.

> > You wouldn't happen to be getting an OLD version of...
> 
> Oops, yeah, I had 1.9.0-rc2 installed in /opt and it was in PATH and in 
> Moved it out of the way and today's CVS compiles just fine. Sorry for ...

Whew, that's a relief ;)

Cheers,
Steven Schultz


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-06 Thread Florin Andrei
Andrew Stevens wrote:
> 
> Note that these tables are actually available in the encoder.  I tend to use 
> them myself all the time. Select matrix 'tmpgenc'.   Should perhaps be made 
> default...

Did some tests, using a low-light sample and another in broad daylight, 
with the same cheap digital camera.

It's pretty hard to distinguish between the custom matrix and tmpgenc. 
They pretty much look the same to me.

Both are clearly better than the default and the hi-res matrices, which 
have massive (by comparison) artifacts and blockiness.

-- 
Florin Andrei

http://florin.myip.org/

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-06 Thread Florin Andrei
Florin Andrei wrote:
> I can probably test it also on Ubuntu 7.10, I'll see what I can do about 
> that.

CVS compiles fine on 7.10 if I use the same -lX11 patch.

-- 
Florin Andrei

http://florin.myip.org/

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] hi-res matrix - not the best image quality?

2007-11-07 Thread Steven M. Schultz

On Tue, 6 Nov 2007, Florin Andrei wrote:

> Florin Andrei wrote:
> > I can probably test it also on Ubuntu 7.10, I'll see what I can do about 
> > that.
> 
> CVS compiles fine on 7.10 if I use the same -lX11 patch.

You can try without the patch.  I made a small change to the
lavtools/Makefile.am that should do the right thing.

Steven Schultz


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users