@colormode uyvy & jit.movie with hap engine

Ricardo's icon

Hi folks,

I set my jit.movie with @engine hap. I read in the reference to jit.movie that the colour mode uyvy is not supported and that if you set @output_texture 1 it will output an argb texture and not uyvy.

If I send the output_texture to a slab with colormode uyvy, will this have any effect at all?
Should I just drop colormode uyvy all together?

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

Rob Ramirez's icon

Should I just drop colormode uyvy all together?

yes. output_texture 1 is all that's needed.

Ricardo's icon

Hi Rob,

I see, for the jit.movie attribute I understand that I can drop the @colormode
But does it not have any effect adding this attribute in the rest of my effects chain?

Rob Ramirez's icon

drop it from everything, it is not needed when using output_texture.

slight caveat, if you are using the AVF engine, there may be some performance increase with large dim files by keeping setting colormode uyvy on the jit.movie (if you don't need an alpha channel). but is not necessary anywhere else down the chain.

Ricardo's icon

Thank you, Rob.
Will do.

Florent Ghys's icon

hello, I am confused here as I am reading a Max documentation called "GL Texture Output" that recommends to use output_texture 1 along with colormode uyvy: "efficiency may be improved further by setting the colormode attribute to uyvy"
but the jit.movie (both avf and viddll version) references mention that colormode is disable when output_texture 1
and the jit.qt.movie reference mentions that colormode is "32-bit only"

is colormode obsolete?
thanks
Florent

Rob Ramirez's icon

sigh, sorry for the confusion in the docs.

colormode is a tricky one. prior to max 7 and the video-engine update it meant one thing, and now it means something slightly different. You can set colormode with output_texture enabled, although it may or may not make a difference. With the avf engine certain codecs may show performance improvement with colormode uyvy. It does not affect the output at all (will still be RGBA). I don't think this is the case with viddll (setting colormode with output_texture enabled will have no effect). And as mentioned above, only if you don't need an alpha channel.

Florent Ghys's icon

thanks Rob! that makes sense

Lid's icon

Sorry, so I am still confused if I should use "@colormode uyvy" as described in "The Video Processing System" tutorials. I realize they were written in 2008/2009, but sounds like it's still relevant in certain cases. I guess it's what was written in the tutorials that switching to uyvy "will essentially double the efficiency of sending frames to the GPU”... and that seems like a very significant gain. Are there still cases where the gain is this great?

Rob Ramirez's icon

Nothing has changed since my reply above. If using avf engine with output_texture, you may find improvements with colormode uyvy with certain codecs if you don't need an alpha channel.

Lid's icon

Ok great thanks Rob.