[MPlayer-dev-eng] [PATCH] Trivial fix for nv12 swapped chroma

Attila Kinali attila at kinali.ch
Sun Dec 28 11:21:03 CET 2003

On Sat, 27 Dec 2003 00:16:45 -0500 (EST)
John Wehle <john at feith.com> wrote:

> Currently using -rawvideo on:w=720:h=480:format=nv12 to watch
> Hauppauge nv12 video results in a picture which has blue and
> red swapped.  The code currently swaps the destination planes
> if "swapped" is set which is confusing since DOCS/tech/colorspaces.txt
> says:
>   Note: planes[1] is ALWAYS U, and planes[2] is V
> Also "swapped" is currently set if the format is nv12 which is
> confusing since nv12 stores the U and V in the same order as hm12
> which doesn't swap the bytes.
> This patch simply swaps the source (instead of the destination) if
> "swapped" is set and only sets "swapped" if the format is nv21. MPlayer
> plays the video fine after this patch is applied.

What about this patch ?
Although i dont fully understand this part of the code, the
patch makes sense regarding the documentation.

			Attila Kinali

egp ist vergleichbar mit einem ikea bausatz fuer flugzeugtraeger
			-- reeler in +kaosu

More information about the MPlayer-dev-eng mailing list