[MPlayer-dev-eng] [PATCH] Decode economy

Sergey Khlutchin khlut at samaramail.ru
Tue Sep 12 22:31:22 CEST 2006


Dominik 'Rathann' Mierzejewski wrote:
> On Tuesday, 12 September 2006 at 22:02, Sergey Khlutchin wrote:
> 
>>Hi!
>>When the size of video is more than the size of its visible part,
>>it is possible to accelerate decoding not making transformations of invisible blocks of the picture.
>>The attached patch counts the picture visible part in view of used filters and location of the MPlayer's window inside of parents.
>>It was necessary to do changes in different parts, probably some places are insufficiently elegant,
>>and I would like to discuss it.
>>This code works for -vo x11 and MJPEG generated by Elphel camera.
>>
>>Sergey Khlutchin
>>Elphel, Inc
> 
> 
>>Index: libavcodec/mjpeg.c
>>===================================================================
>>--- libavcodec/mjpeg.c	(revision 6237)
>>+++ libavcodec/mjpeg.c	(working copy)
>>@@ -1462,10 +1462,21 @@
>>     return 0;
>> }
>> 
>>+extern struct { int x,y,w,h, fullw, fullh; } vd_visible; // is defined in libmpcodecs/dec_video.c
> 
> 
> This should probably be moved into libavcodec/libavformat instead.
> Making libavcodec dependant on mplayer is unacceptable.

Then maybe to move it to AVCodecContext or define it in a separate file in the avcodec library?
It works for me with gcc if simple to remove "extern" but may cause double definition of the external variable
with other compilers.

Sergey Khlutchin
Elphel, Inc



More information about the MPlayer-dev-eng mailing list