Im not familiar with the ffmpeg source code and I'm not so professional in programming to can change or find out the code. I just want to extract quantization matrix in jpeg conversion also the residual error in mpeg conversion. Thanks everyone for helping.