Beispiel #1
0
 // copies huffman tables from parsed stream. should require same scans structure
 public void CopyHuffmanTables(EncoderParams encoderParams, JpegStream jpeg, CudaStream stream)
 {
     res = NvJpegNativeMethods.nvjpegEncoderParamsCopyHuffmanTables(_state, encoderParams.Params, jpeg.Stream, stream.Stream);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegEncoderParamsCopyHuffmanTables", res));
     if (res != nvjpegStatus.Success)
     {
         throw new NvJpegException(res);
     }
 }
Beispiel #2
0
 public void EncodeImage(EncoderParams encoderParams, nvjpegImage source, nvjpegInputFormat input_format, int image_width, int image_height, CudaStream stream)
 {
     res = NvJpegNativeMethods.nvjpegEncodeImage(_nvJpeg.Handle, _state, encoderParams.Params, ref source, input_format, image_width, image_height, stream.Stream);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegEncodeImage", res));
     if (res != nvjpegStatus.Success)
     {
         throw new NvJpegException(res);
     }
 }