[FFmpeg-devel] What about pre-processing?

Michael Niedermayer michaelni
Sat Apr 19 16:37:07 CEST 2008

On Sat, Apr 19, 2008 at 02:10:08PM +0100, Ramiro Polla wrote:
> Hello,
> The same way the libmimic decoder had lots of post-processing, the 
> libmimic encoder does one pre-processing on the luma planes. It copies 
> bytes from the previous frame, if that same byte on the current frame is 
> no more than 7 greater or smaller then the previous frame's byte. Like 
> in this code:
>      for (i = 0; i < height; i++) {
>          for (j = 0; j < width; j++) {
>              if (FFABS(prev[j] - cur[j]) < 7)
>                  cur[j] = prev[j];
>          }
>          cur  += stride;
>          prev += stride;
>      }
> This way the block has more chances of being like the previous frame's 
> one. It has the disadvantage of possibly making the block more different 
> than the backreference frames, since it is only checked against the 
> previous frame.
> I am thinking of just removing this pre-processing and raising the 
> threshold for the cmp functions. Is this the right way to go?


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080419/a2860579/attachment.pgp>

More information about the ffmpeg-devel mailing list