ffmpeg bgr vs rgb and other similiar pixel formats I was wondering about the difference between rgb and bgr pixel formats available in many codecs.

It reminds me in some way the Big Endian and Little Endian flavours of computer processors.

While I always guessed that the big / little endian was more a matter of patents rather than performance, why we have both rgb and bgr?


It's still a matter of patents?  
Have something to do with Subpixels Rendering ?  
Why some codecs has alternate support of them like this huffyuv example here:



  Encoder huffyuv [Huffyuv / HuffYUV]:
  Threading capabilities: no
  Supported pixel formats: yuv422p rgb24 bgra


It has rgb24 but then not rgba as I could expect. It jumps directly to bgra!  

Could be again a matter of patents that the codec author could not break ?



Please feed my curiosity with some extended explaination here if possible, i want to know something more about this various pixel formats!
While I always guessed that the big / little endian was more a matter of patents rather than performance,


Nope little endian was developed as a performance optimization whern moving to multi byte words. https://en.wikipedia.org/wiki/Endianness#Optimization

Nothing to to with patents. Different representation have different advantages and disadvantage. Hence different situations may use different representations. Codecs suffer from network effect. Nobody wants to use your encoder if nobody uses your decoder. And vice-versa. So codec designers go for maximum compatibility, and often support several formats. But the usually don't support them all, because there are dozens. So they use a combination of the most common, and easiest to include into the design.