lsmashinput: Use av_image_alloc to simplify the codes of colorspace conversions.