title: libjpeg decode nv12 or yuv420p
body: <p>I'm trying to get a YUV420 palanar or semiplanar (NV12) image out of jpeg using libjpeg.</p>
  
  <p>I see that there is a option to specify output format to JCS_YCbCr which would generally be a YUV format, but as far as i understand it would give me the data as arrays of 3 elements { Y, U, V }. So to get the image to the right format i would have to rearange and subsample the pixels myself and i want to avoid that for performance reasons.</p>
  
  <p>So I was wondering is there a way to configure libjpeg to output a YUV420p / NV12 buffer directly.</p>