Herman Robak found out that the problem is not the JPEG encoding. It's the DV decoding by dvgrab. In dvframe.cc (dvgrab code) the "quality" is not set to "best".
decoder->quality = DV_QUALITY_COLOR | DV_QUALITY_AC_1;
Should be:
decoder->quality = DV_QUALITY_COLOR | DV_QUALITY_AC_2;
If dvgrab is modified and recompiled, then the grabbing maintains the DV quality.
Herman Robak found out that the problem is not the JPEG encoding. It's the DV decoding by dvgrab.
In dvframe.cc (dvgrab code) the "quality" is not set to "best".
decoder->quality = DV_QUALITY_COLOR | DV_QUALITY_AC_1;
Should be:
decoder->quality = DV_QUALITY_COLOR | DV_QUALITY_AC_2;
If dvgrab is modified and recompiled, then the grabbing maintains the DV quality.