<html><head></head><body><div class="ydpa2eba700yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><span><div>#1. If I am to perform colorspace conversion between YCbCr 601, 709, and sRGB, would I be unable to use swscale? I’ve read the wiki document below, which seems to imply that I am better off using the colorspace filter:</div><div><br></div><div>* https://trac.ffmpeg.org/wiki/colorspace (I'm hoping it's okay to share a link to a FFmpeg page)</div><div><br></div><div>To quote, “Conversion between color types (matrix, primaries, transfer characteristics) can be done using the colorspace or colormatrix video filters.” Reading that, my understanding is that swscale does not possess the same capabilities? I am aware that swscale contains the function `sws_setColorspaceDetails`. Does swscale assume (for example) that if the colorspace is 709 that the transfer characteristcs, etc are 709 too?</div><div><br></div><div>Admittedly, I’m hesitant to use the filters/graphs because they are very rigid – they don’t handle video properties changing on the fly which is why swscale is (potentially) more suitable for my requirements. Yes, I could recreate the filters/graph each time, but that could become costly.</div><div><br></div><div>#2. Following on from my original question, I have a situation where I have loaded a decoded PNG image into an AVFrame (with AVPixelFormat variant of the RGBA pix_fmt). What is the correct values to set for AVFrame’s color characteristics when passing the AVFrame along:</div><div>  - AVFrame::color_primaries =>AVCOL_PRI_BT709 ? AVCOL_PRI_UNSPECIFIED  ?</div><div>  - AVFrame::color_trc => AVCOL_TRC_IEC61966_2_1   ?</div><div>  - AVFrame::colorspace => AVCOL_SPC_RGB  ?</div><div><br></div><div>I’m fairly confident that ‘color_trc’ and ‘colorspace’ are correct but uncertain of ‘color_primaries’</div><div><br></div><div>Any assistance would be much appreciated…</div><div><br></div><div><br></div><div>Gavin.</div></span></div></body></html>