Hi,

On Tue, 25 May 2004, Matto Marjanovic wrote:
> The first coefficient of each macroblock in JPEG is the DC value for
>  the macroblock, right?  Maybe you don't have to completely decode any
>  scanlines at all.  You'd have to decompress/unpack enough to recover
>  the coefficients for blocks toward the center of the screen, but you
>  shouldn't have to do any of the DCT stuff just to recover the average
>  level of a macroblock.

The issue here is that mjpegtools doesn't provide any way of doing this.
You'll have to dive into libjpeg internals yourself to get this done. It's
not that hard, but it's icky, if you know what I mean. You'll definately
get speed improvements, but there's some small issues:

* you originally proposed to use the top few lines: in 16:9 movies
broadcasted over 4:3 TV, those are always black.
* TV broadcast artifacts can make things 99% black instead of 100% black,
so you'll need tresholds.
* Movie trailers often end up in blackness as well, so be sure to not
fetch those ones. This will be a matter of experimenting, but might be
hard.

So the libjpeg internals are not that hard. You can take an example from
the code in lavtools/jpegutils.[ch] and use that as a base for decoding
only part of the image. I think there's a for() loop somewhere that goes
over each line and decodes it, so that should be easy to do only once
instead of <height> times. :).

HTH,

Ronald



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to