예제 #1
0
 public void EncodeYUV(EncoderParams encoderParams, nvjpegImage source, nvjpegChromaSubsampling chromaSubsampling, int image_width, int image_height, CudaStream stream)
 {
     res = NvJpegNativeMethods.nvjpegEncodeYUV(_nvJpeg.Handle, _state, encoderParams.Params, ref source, chromaSubsampling, image_width, image_height, stream.Stream);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegEncodeYUV", res));
     if (res != nvjpegStatus.Success)
     {
         throw new NvJpegException(res);
     }
 }