scaling problem with YUV

julienrobert's icon

I am trying to program a kind of video scrub. I use the third channel of an audio file (float32) to control the frame number of a 3d matrix.

This is tha patch used to store the matrix in jit binary format and to store the number of the frames in the third channel of the audio file (which the sound is stereo).

Max Patch
Copy patch and select New From Clipboard in Max.

I need to work in uyvy to save half the size in RAM.

But, when I try to read the video, the resolution looks half the resolution is should be (horizontal little lines everywhere...) This is the second patch.

Max Patch
Copy patch and select New From Clipboard in Max.

Did I miss something to get the video back to its original dimension?

julienrobert's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I did a lot of tests. I defined the problem. The problem comes from writing the 3d matrix on the disk in binary format and reading it in another patch. The quality is good when I put the 2 patches together in the same patch avoiding saving the 3d matrix on the disk. Like in this patch:

But I need to write the matrix on the disk to be able to load quickly all the videos at the same time...

julienrobert's icon

These are samples of the image to compare the quality.

the result coming from the first patch (2 different patches) with lost of quality: http://julienrobert.net/upload/imagejitter.png

julienrobert's icon

ok. This was the problem. The jit.qt.movie size fitted for the destination matrix which was in half vertical resolution, so it gave us 320x240 instead of 320x480. We have to use the parameter @adapt 1 to get a matrix of 320x480.

Thanks anyway!