I was using sws_scale
to convert a group of RGB32 images to YUV420 format. Each image is very similar to the previous one and they only differ on a rectangle region Q.
My question is how to utilize Q to speed up the conversion process? An additional parameter should be added to sws_scale
function.
sws_scale( ctx, in_plane, in_stride, sliceY, height, out_plane, out_stride, Q){
// parameter out_plane stores the YUV420 data of previous image
Instead of scanning the whole image, scan through rectangle Q{
Do conversion
}
}