Exploit databaseDownload repository ZIP
GH-13794a28e99af8452ce8e4224a1bc216
trinadh465/frameworks_base_aosp10_r33_cve-2022-20138
Sources for CVE-2022-20138
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files54
trinadh465/frameworks_base_aosp10_r33_cve-2022-20138Revision 144017c26d03
- ↑..Parent directory
- fonts/
- pdf/
- text/
- AnimatedImageDrawable.cpp
- Bitmap.cpp
- Bitmap.h
- BitmapFactory.cpp
- BitmapFactory.h
- BitmapRegionDecoder.cpp
- ByteBufferStreamAdaptor.cpp
- ByteBufferStreamAdaptor.h
- Camera.cpp
- CanvasProperty.cpp
- ColorFilter.cpp
- CreateJavaOutputStreamAdaptor.cpp
- CreateJavaOutputStreamAdaptor.h
- FontFamily.cpp
- FontUtils.cpp
- FontUtils.h
- GIFMovie.cpp
- GraphicBuffer.cpp
- GraphicBuffer.h
- Graphics.cpp
- GraphicsJNI.h
- ImageDecoder.cpp
- ImageDecoder.h
- Interpolator.cpp
- MaskFilter.cpp
- Matrix.cpp
- Matrix.h
- Movie.cpp
- Movie.h
- MovieImpl.cpp
- NinePatch.cpp
- NinePatchPeeker.cpp
- NinePatchPeeker.h
- Paint.cpp
- PaintFilter.cpp
- Path.cpp
- PathEffect.cpp
- PathMeasure.cpp
- Picture.cpp
- Picture.h
- Region.cpp
- Region.h
- RtlProperties.h
- Shader.cpp
- SurfaceTexture.cpp
- TEST_MAPPING
- Typeface.cpp
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
core/jni/android/graphics/YuvToJpegEncoder.h
Text · 2,649 bytes#ifndef _ANDROID_GRAPHICS_YUV_TO_JPEG_ENCODER_H_
#define _ANDROID_GRAPHICS_YUV_TO_JPEG_ENCODER_H_
#include "SkTypes.h"
#include "SkStream.h"
extern "C" {
#include "jpeglib.h"
#include "jerror.h"
}
class YuvToJpegEncoder {
public:
/** Create an encoder based on the YUV format.
*
* @param pixelFormat The yuv pixel format as defined in ui/PixelFormat.h.
* @param strides The number of row bytes in each image plane.
* @return an encoder based on the pixelFormat.
*/
static YuvToJpegEncoder* create(int pixelFormat, int* strides);
explicit YuvToJpegEncoder(int* strides);
/** Encode YUV data to jpeg, which is output to a stream.
*
* @param stream The jpeg output stream.
* @param inYuv The input yuv data.
* @param width Width of the the Yuv data in terms of pixels.
* @param height Height of the Yuv data in terms of pixels.
* @param offsets The offsets in each image plane with respect to inYuv.
* @param jpegQuality Picture quality in [0, 100].
* @return true if successfully compressed the stream.
*/
bool encode(SkWStream* stream, void* inYuv, int width,
int height, int* offsets, int jpegQuality);
virtual ~YuvToJpegEncoder() {}
protected:
int fNumPlanes;
int* fStrides;
void setJpegCompressStruct(jpeg_compress_struct* cinfo, int width,
int height, int quality);
virtual void configSamplingFactors(jpeg_compress_struct* cinfo) = 0;
virtual void compress(jpeg_compress_struct* cinfo,
uint8_t* yuv, int* offsets) = 0;
};
class Yuv420SpToJpegEncoder : public YuvToJpegEncoder {
public:
explicit Yuv420SpToJpegEncoder(int* strides);
virtual ~Yuv420SpToJpegEncoder() {}
private:
void configSamplingFactors(jpeg_compress_struct* cinfo);
void deinterleaveYuv(uint8_t* yuv, int width, int height,
uint8_t*& yPlanar, uint8_t*& uPlanar, uint8_t*& vPlanar);
void deinterleave(uint8_t* vuPlanar, uint8_t* uRows, uint8_t* vRows,
int rowIndex, int width, int height);
void compress(jpeg_compress_struct* cinfo, uint8_t* yuv, int* offsets);
};
class Yuv422IToJpegEncoder : public YuvToJpegEncoder {
public:
explicit Yuv422IToJpegEncoder(int* strides);
virtual ~Yuv422IToJpegEncoder() {}
private:
void configSamplingFactors(jpeg_compress_struct* cinfo);
void compress(jpeg_compress_struct* cinfo, uint8_t* yuv, int* offsets);
void deinterleave(uint8_t* yuv, uint8_t* yRows, uint8_t* uRows,
uint8_t* vRows, int rowIndex, int width, int height);
};
#endif // _ANDROID_GRAPHICS_YUV_TO_JPEG_ENCODER_H_