Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
AppleJPEGDriver: Difference between revisions - iPhone Development Wiki

AppleJPEGDriver: Difference between revisions

From iPhone Development Wiki
(→‎Methods: added knowledge acquired by Cycorder)
(+ clarification)
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''AppleJPEGDriver''' is a kernel-extension providing accelerating encoding and decoding JPEG images via {{fwlink|IOSurface}}s, esp. for those with [http://en.wikipedia.org/wiki/YUV422 YUV color space]. It powers the {{fwlink|AppleJPEG}} for decoding, {{fwlink|Camera}} for encoding, and {{fwlink|Celestial}} for both.
'''AppleJPEGDriver''' is a kernel-extension providing the acceleration of encoding and decoding JPEG images via {{fwlink|IOSurface}}s, especially for ones with [http://en.wikipedia.org/wiki/YUV422 YUV color space]. It powers the {{fwlink|AppleJPEG}} for decoding, {{fwlink|Camera}} for encoding, and {{fwlink|Celestial}} for both.


== Methods ==
== Methods ==
Line 26: Line 26:
   size_t dest_width /*in*/;
   size_t dest_width /*in*/;
   size_t dest_height /*in*/;
   size_t dest_height /*in*/;
   int normally_four_2 /*in*/;
   int quality /*in: 4 gives decent quality */;
};
};
</source>
</source>
For best results, use an IOSurface that has the kIOSurfaceCacheMode property set to kIOMapInhibitCache.


{{occlass|library=IOKit.framework|navbox=1}}
{{occlass|library=IOKit.framework|navbox=1}}

Revision as of 06:13, 21 January 2014

AppleJPEGDriver is a kernel-extension providing the acceleration of encoding and decoding JPEG images via IOSurfaces, especially for ones with YUV color space. It powers the AppleJPEG for decoding, Camera for encoding, and Celestial for both.

Methods

Selector Action Input Output
0 initializeDecoder - -
1 startDecoder struct JPEGDriverArgs (40 bytes) 40 bytes of stuff
2 initializeEncoder - -
3 startEncoder struct JPEGDriverArgs (40 bytes) 40 bytes of stuff.

where

struct JPEGDriverArgs {
  int must_be_zero_1;
  IOSurfaceID src_surface /*in*/;
  size_t src_size /*in*/;
  int must_be_zero_2;
  IOSurfaceID dest_surface /*in*/;
  size_t dest_size /*in*/;
  size_t result_size /*out*/;
  size_t dest_width /*in*/;
  size_t dest_height /*in*/;
  int quality /*in: 4 gives decent quality */;
};

For best results, use an IOSurface that has the kIOSurfaceCacheMode property set to kIOMapInhibitCache.