Chris Gahan | 2 Oct 2008 04:36
Picon
Favicon

"expand" filter has a problem handling certain widths

= Summary =

I've discovered a bug in the "expand" filter that I'm unable to fix. I've looked at the source, but it's not
obvious to me what the problem is. (I'm using an mplayer SVN build from 2008-09-28, revision 27668.)

Here are some cases that illustrate the bug in action.

== Case 1: Expand width by odd number of pixels  ==

You try to expand the video by an odd number of pixels, the whole video becomes sheared.

Sample clip -- http://chris.ill-logic.com/files/expand_bug/odd_width.avi
(created with: -vf expand=-621:0:0:0)

== Case 2: Even width, bmovl overlay ==

If you specify an even width that's not a multiple of 16, the overlaid bmovl image's chroma plane becomes
sheared. The rest of the video is fine.

Sample clip -- http://chris.ill-logic.com/files/expand_bug/bmovl_two-pixel-grid.avi
(created with: -vf scale=640:480,expand=-620:0:620:0,bmovl=0:1:/tmp/fifo)

Overlaid image -- http://chris.ill-logic.com/files/expand_bug/bmovl_two-pixel-grid.jpg

= Followup =

Any advice would be appreciated. :)

---
Chris 
(Continue reading)

onitake | 2 Oct 2008 14:27
Picon
Gravatar

[PATCH] Replaced deprecated QuickDraw calls in vo_quartz

hello.

when compiling mplayer against a recent (10.4+) sdk, gcc spits out  
quite a few deprecation warnings in the vo_quartz output module. the  
respective functions are part of quickdraw, which is recommended not  
to be used any more, and not supported at all when compiling for 64bit.
i tried to fix these by replacing them with quartz calls. as far as i  
can see, the modifications work, the compiler warnings are gone and  
there are no performance issues.
please review the patch and provide feedback.

i know there's also the cocoa based vo_macosx module, but since both  
are around, they should both be free from legacy code, shouldn't  
they? :)

i think i used one function marked as 10.1+, but the rest is marked to  
be available even in 10.0, if people still want to build against that.

best regards,
oni


_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng <at> mplayerhq.hu
(Continue reading)

Guillaume POIRIER | 2 Oct 2008 23:01
Picon
Gravatar

Re: [PATCH] Replaced deprecated QuickDraw calls in vo_quartz

Hello,

On Thu, Oct 2, 2008 at 2:27 PM, onitake <onitake <at> gmail.com> wrote:
> hello.
>
> when compiling mplayer against a recent (10.4+) sdk, gcc spits out quite a
> few deprecation warnings in the vo_quartz output module. the respective
> functions are part of quickdraw, which is recommended not to be used any
> more, and not supported at all when compiling for 64bit.

Your code does allow to get rid of warnings here on 10.5.5, MacIntel,
32 bits mode, but there are still lots of warnings and errors when
compiling in 64 bits mode:

gcc -arch x86_64 -Wdisabled-optimization -Wno-pointer-sign
-Wdeclaration-after-statement -std=gnu99 -Wall -Wno-switch
-Wpointer-arith -Wredundant-decls -O4   -pipe -ffast-math
-fomit-frame-pointer -mdynamic-no-pic -falign-loops=16 -shared-libgcc
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I.
-I/usr/local/include -I/usr/X11/include   -c -o libvo/vo_quartz.o
libvo/vo_quartz.c
libvo/vo_quartz.c:57: error: syntax error before 'seqId'
libvo/vo_quartz.c:57: warning: type defaults to 'int' in declaration of 'seqId'
libvo/vo_quartz.c:57: warning: data definition has no type or storage class
libvo/vo_quartz.c:58: error: syntax error before 'image_qtcodec'
libvo/vo_quartz.c:58: warning: type defaults to 'int' in declaration
of 'image_qtcodec'
libvo/vo_quartz.c:58: warning: data definition has no type or storage class
libvo/vo_quartz.c:59: error: syntax error before '*' token
libvo/vo_quartz.c:59: warning: type defaults to 'int' in declaration of 'P'
(Continue reading)

Gregor Riepl | 3 Oct 2008 12:57
Picon
Gravatar

Re: [PATCH] Replaced deprecated QuickDraw calls in vo_quartz

> Your code does allow to get rid of warnings here on 10.5.5, MacIntel,
> 32 bits mode,

glad to hear that. i don't have a core2duo mac at hand, so i couldn't  
test.

> but there are still lots of warnings and errors when
> compiling in 64 bits mode:

> libvo/vo_quartz.c:57: error: syntax error before 'seqId'
> libvo/vo_quartz.c:58: error: syntax error before 'image_qtcodec'
> libvo/vo_quartz.c:59: error: syntax error before '*' token
> libvo/vo_quartz.c:62: error: syntax error before  
> 'ImageDescriptionHandle'
> libvo/vo_quartz.c:68: error: syntax error before 'matrix'

this is odd. these data types are part of quicktime and not  
deprecated. also, there is an unconditional include of QuickTime.h.

> libvo/vo_quartz.c:299: warning: implicit declaration of function  
> 'FindWindow'
> libvo/vo_quartz.c:347: warning: implicit declaration of function  
> 'ResizeWindow'
> libvo/vo_quartz.c:352: warning: implicit declaration of function  
> 'MenuSelect'
> libvo/vo_quartz.c:353: warning: implicit declaration of function  
> 'HiliteMenu'
......

those are all part of the carbon api. it looks like apple wants to get  
(Continue reading)

Guillaume POIRIER | 3 Oct 2008 13:22
Picon
Gravatar

Re: [PATCH] Replaced deprecated QuickDraw calls in vo_quartz

Hello,

On Fri, Oct 3, 2008 at 12:57 PM, Gregor Riepl <onitake <at> gmail.com> wrote:
>> but there are still lots of warnings and errors when
>> compiling in 64 bits mode:
>
>> libvo/vo_quartz.c:57: error: syntax error before 'seqId'
>> libvo/vo_quartz.c:58: error: syntax error before 'image_qtcodec'
>> libvo/vo_quartz.c:59: error: syntax error before '*' token
>> libvo/vo_quartz.c:62: error: syntax error before
>> 'ImageDescriptionHandle'
>> libvo/vo_quartz.c:68: error: syntax error before 'matrix'
>
> this is odd. these data types are part of quicktime and not
> deprecated. also, there is an unconditional include of QuickTime.h.
>
>> libvo/vo_quartz.c:299: warning: implicit declaration of function
>> 'FindWindow'
>> libvo/vo_quartz.c:347: warning: implicit declaration of function
>> 'ResizeWindow'
>> libvo/vo_quartz.c:352: warning: implicit declaration of function
>> 'MenuSelect'
>> libvo/vo_quartz.c:353: warning: implicit declaration of function
>> 'HiliteMenu'
> ......
>
> those are all part of the carbon api. it looks like apple wants to get
> rid of it eventually, as carbon isn't supported in 64bit mode. or they
> just didn't have the resources to port it yet.

(Continue reading)

Guillaume Poirier | 3 Oct 2008 13:40
Picon

Re: [PATCH] Replaced deprecated QuickDraw calls in vo_quartz

Hello,

Guillaume POIRIER wrote:

[..]
> The good thing is that Cocoa already supports (and for several MacOSX) what should be needed to implement a
fast video out driver for Darwin

I meant to say: "To the best of my knowledge, Cocoa has supported for
several MacOSX releases what is needed to implement a fast video out
driver for Darwin".

Sorry for the confusion.

Guillaume
Andrew Wason | 3 Oct 2008 16:24
Gravatar

[PATCH] offset_t removed from avio.h

offset_t typedef was removed from avio.h but demux_lavf and muxer_lavf still use
it.  So I guess they should use int64_t directly instead.

Index: libmpdemux/demux_lavf.c
===================================================================
--- libmpdemux/demux_lavf.c	(revision 27687)
+++ libmpdemux/demux_lavf.c	(working copy)
 <at>  <at>  -94,9 +94,9  <at>  <at> 
     return ret;
 }

-static offset_t mp_seek(void *opaque, offset_t pos, int whence) {
+static int64_t mp_seek(void *opaque, int64_t pos, int whence) {
     stream_t *stream = opaque;
-    offset_t current_pos;
+    int64_t current_pos;
     mp_msg(MSGT_HEADER,MSGL_DBG2,"mp_seek(%p, %d, %d)\n", stream, (int)pos,
whence);
     if(whence == SEEK_CUR)
         pos +=stream_tell(stream);
Index: libmpdemux/muxer_lavf.c
===================================================================
--- libmpdemux/muxer_lavf.c	(revision 27687)
+++ libmpdemux/muxer_lavf.c	(working copy)
 <at>  <at>  -73,7 +73,7  <at>  <at> 
 	return stream_write_buffer(muxer->stream, buf, size);
 }

-static offset_t mp_seek(void *opaque, offset_t pos, int whence)
+static int64_t mp_seek(void *opaque, int64_t pos, int whence)
(Continue reading)

Guillaume POIRIER | 3 Oct 2008 16:55
Picon
Gravatar

Re: [PATCH] offset_t removed from avio.h

Hello,

On Fri, Oct 3, 2008 at 4:24 PM, Andrew Wason <rectalogic <at> rectalogic.com> wrote:
> offset_t typedef was removed from avio.h but demux_lavf and muxer_lavf still use
> it.  So I guess they should use int64_t directly instead.

Thanks, patch applied. For some reason, your patch showed up inline in
the message. Did you paste it into the email body? If you did, please
attach the patch instead next time.

Guillaume
--

-- 
One should not give up hope on imbeciles. With a little training, you
can make them into soldiers.
 -- Pierre Desproges
Gregor Riepl | 3 Oct 2008 17:49
Picon
Gravatar

Re: [PATCH] Replaced deprecated QuickDraw calls in vo_quartz

> Sorry for the confusion.

your first statement was perfectly intelligible. :)

anyway, i dug up a two things.
first, UpdateSystemActivity is nowhere mentioned as being deprecated  
or not available. it's even in the CoreServices/OSServices framework  
for all 4 supported architectures. the only problem is that apple  
inserted a
#if !__LP64__
#ifndef __POWER__
#include <OSServices/Power.h>
#endif
into /System/Library/Frameworks/CoreServices.framework/Frameworks/ 
OSServices.framework/Headers/OSServices.h, which makes the compiler  
fail. the linker would in fact succeed.
i filed a bug (radar #6267445) against this.

second, up from 10.5, there is a replacement for this function:
IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep,  
kIOPMAssertionLevelOn, &assertionID);
the problem is that this only disables display power management and  
not the screensaver. i have yet to find a good way to do this. people  
suggest
defaults write com.apple.screensaver write idleTime 0
but this looks like a terrible hack to me and it seems setting it back  
to a positive number doesn't turn the screensaver back on again.

here's an updated patch. i don't suggest applying it yet, as it  
switches to IOPMAssertion when compiling for 10.5, and the screensaver  
(Continue reading)

Laurent | 3 Oct 2008 17:53
Picon

Re: [PATCH] Fix packed YUV in dshow vo

On 9/23/08, Laurent <laurent.aml <at> gmail.com> wrote:
> Here is a patch to support packed yuv in DirectX when strides are
> different between input and output buffers.
>
> Thanks,
>
>

MPlayer crashes on Intel-based GPU (eg 945) when the Packed YUV
colorspace is used.

To reproduce the crash, start
  mplayer.exe -vf format=YUY2 <yourvideo>

Would it be possible to apply this patch, or get suggestions?

Thanks,

Laurent
Index: libvo/vo_directx.c
===================================================================
--- libvo/vo_directx.c	(revision 27514)
+++ libvo/vo_directx.c	(working copy)
 <at>  <at>  -1276,7 +1276,35  <at>  <at> 
 	}
 	else //packed
 	{
-        fast_memcpy( image, mpi->planes[0], image_height * dstride);
(Continue reading)


Gmane