I am trying to add fp32 tiff reading via ffmpeg for cinelerra-gg.
we have this routine:
convert_ctx = sws_getCachedContext(convert_ctx, ip->width, ip->height, pix_fmt,
frame->get_w(), frame->get_h(), ofmt, SWS_POINT, NULL, NULL, NULL);
if( !convert_ctx ) { fprintf(stderr, "FFVideoConvert::convert_picture_frame:" " sws_getCachedContext() failed\n"); fprintf(stderr, "pix_fmt %s \n", av_get_pix_fmt_name(pix_fmt));
fprintf(stderr, "output format %s \n", av_get_pix_fmt_name(ofmt));
return -1;
}
so for rgbaf32 tiff it prints:
FFMPEG::open_decoder: some stream have bad times: /data/data/com.termux/files/home/test_color.tif FFMPEG::open_decoder: some stream have bad times: /data/data/com.termux/files/home/test_color.tif FFVideoConvert::convert_picture_frame: sws_getCachedContext() failed pix_fmt rgbf32le output format rgbaf32le FFVideoConvert::convert_picture_frame: sws_getCachedContext() failed pix_fmt rgbf32le output format rgbf32le
for rgba-float pipeline, or
FFVideoConvert::convert_picture_frame: sws_getCachedContext() failed pix_fmt rgbf32le output format rgba
for rgba-8 pipeline.
tiff images from
our ffmpeg.C
I just added mappings to
case BC_RGBA_FLOAT: return AV_PIX_FMT_RGBAF32LE;
and from libavcodec
case AV_PIX_FMT_RGBAF32LE: return BC_RGBA_FLOAT;
did I miss something in setup parameters for this format?