Move pixel format conversion from uVideoRec to AVWrapper
This has several benefits, being in C-land allows us to better use
libav API and avoid mixing memory allocated from Pascal. Also the C
code for the conversion loop generated by GCC or Clang is probably more
optimized than by Freepascal. Finally it will simplify code in the
future if we are going to enable any other pixel format than yuv420p.
Change the coefficients to improve color accuracy during conversion.
void fpcrtl_halt(int num) {
__coverity_panic__();
}
int fpcrtl_abs(int num) {
return num >= 0 ? num : -num;
}