[MPlayer-dev-eng] More about strides... :-m

D Richard Felker III dalias at aerifal.cx
Thu Jan 30 23:55:13 CET 2003


On Thu, Jan 30, 2003 at 04:59:57PM +0100, Daniel Moreno wrote:
> Arpi wrote:
> 
> >- fix your code to honor both mpi->stride[] and dmpi->stride[] (preferred)
> 
> I'm not that sure about this "preferred". :-m
> 
> The filter needs the previous line in order to filter the current one. 
> The first line is processed diferently outside the loop.
> 
> But... do I have a way to know if I'm being passed the first stride of 
> an image or some other stride? If not, then I have 3 choices:
> 
> - Assume every stride is the first one. This will cause every stride to 
> be processed as if it were a whole frame and may lead to horizontal 
> "discontinuities".
> 
> - Assume no stride is the first one. This will cause the bottom part of 
> a frame to influence the top part of the next.
> 
> - Not support strides at all, so that I require to be given whole frames 
> only. This would produce proper output.
> 
> Since this filter is intended for preprocessing before encoding... I 
> think I'd take thas last option if there is no way to know what stride 
> I'm dealing with.

Huh? It sounds like you're confusing strides and slices. Supporting
strides just means handling the case where line2 does not begin
exactly width bytes from line1. There's never an excuse for not
supporting arbitrary strides unless your filter is doing sketchy
stride arithmetic to accomplish its affect, or unless you're writing a
module to interface with a crappy codec that can't handle strides.

Rich



More information about the MPlayer-dev-eng mailing list