encoder: jpeg: Fix the packed header generation
encoder: jpeg: Fix the packed header generation

This is a work-around to satisfy the va-intel-driver.
Normalize the quality factor and scale QM values (only for packed header
generation) similar to what VA-Intel driver is doing . Otherwise the
generated packed headers will be wrong, since the driver itself is
scaling the QM values using the normalized quality factor.

https://bugzilla.gnome.org/show_bug.cgi?id=748335

Signed-off-by: Sreerenj Balachandran <8526e100bdc7a12d85af109c9f42b86756e50e67@intel.com>

gbeauchesne/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi