Hello,<div><br></div><div>I am currently developing a program that uses the libavcodec library for decoding (not encoding) various movie formats. I have some questions about color space conversion and how ffmpeg handles it.</div><div><br></div><div>Assume I have RGB input where I don't know if its FullRange or ITU-R BT.709 and I want to have my output ITU-R BT.709. How can I configure SwSContext properly?</div><div><br></div><div>Assume I have YUV422 BT 601 input and I want my output to be YUV444 FullRange. Is this possible without telling SwsContext that my input source is BT 601?</div><div><br></div><div>I would also appreciate if someone could explain to me how swscale works in terms of color space conversion. I did read through the source and I think I understand a bit but I don't get the whole picture. Does color space conversion work on 10bit and 12bit as well or does it always downscale first to 8bit? (would be a big bummer). Also, does swscale first transform the input color space to XYZ and then transform it further into the target color space? And why is there no yuv2rgb function but only a rgb2yuv function? If I want my output color space to be rgb, such a function would be needed or not? </div><div><br></div><div>Thanks a lot already for your answers. I hope my english is understandable (not native)</div><div><br></div><div>With best regards, </div><div>Markus<span style="white-space: pre-wrap; ">    </span></div>