2

Im using sws_scale function to convert from YUVA420P to RGBA in my c++ program. It seems that alpha passed "straight" and does not effect the RGB channels but I do want to pre-multiply alpha.

Is it possible with swscale to set the conversion matrix so I will be able to implement the pre-multiplication?

aviyaChe
  • 145
  • 1
  • 9
  • 1
    You can use the premultiply filter before scaling it. – Gyan May 03 '18 at 07:55
  • have you look at the c code for applying an av_filter :) ? I prefer to write it myself. I was more thinking about performance, it will be faster to convert and pre-multiply in the same pass. – aviyaChe May 03 '18 at 12:02
  • 1
    Looks like alpha channel is just copied without any processing. – Andrey Turkin May 06 '18 at 07:21

0 Answers0