avcodec/ffv1: template functions to allow data types different from int16_t