#include "libyuv/convert.h"
#include "libyuv/convert_argb.h"
#ifdef HAVE_JPEG
#include "libyuv/mjpeg_decoder.h"
#endif
#ifdef __cplusplus
namespace libyuv {
extern "C" {
#endif
#ifdef HAVE_JPEG
struct I420Buffers { … };
static void JpegCopyI420(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI422ToI420(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI444ToI420(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI400ToI420(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
LIBYUV_API
int MJPGSize(const uint8_t* src_mjpg,
size_t src_size_mjpg,
int* width,
int* height) { … }
LIBYUV_API
int MJPGToI420(const uint8_t* src_mjpg,
size_t src_size_mjpg,
uint8_t* dst_y,
int dst_stride_y,
uint8_t* dst_u,
int dst_stride_u,
uint8_t* dst_v,
int dst_stride_v,
int src_width,
int src_height,
int dst_width,
int dst_height) { … }
struct NV21Buffers { … };
static void JpegI420ToNV21(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI422ToNV21(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI444ToNV21(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI400ToNV21(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
LIBYUV_API
int MJPGToNV21(const uint8_t* src_mjpg,
size_t src_size_mjpg,
uint8_t* dst_y,
int dst_stride_y,
uint8_t* dst_vu,
int dst_stride_vu,
int src_width,
int src_height,
int dst_width,
int dst_height) { … }
static void JpegI420ToNV12(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI422ToNV12(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI444ToNV12(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI400ToNV12(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
LIBYUV_API
int MJPGToNV12(const uint8_t* sample,
size_t sample_size,
uint8_t* dst_y,
int dst_stride_y,
uint8_t* dst_uv,
int dst_stride_uv,
int src_width,
int src_height,
int dst_width,
int dst_height) { … }
struct ARGBBuffers { … };
static void JpegI420ToARGB(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI422ToARGB(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI444ToARGB(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
static void JpegI400ToARGB(void* opaque,
const uint8_t* const* data,
const int* strides,
int rows) { … }
LIBYUV_API
int MJPGToARGB(const uint8_t* src_mjpg,
size_t src_size_mjpg,
uint8_t* dst_argb,
int dst_stride_argb,
int src_width,
int src_height,
int dst_width,
int dst_height) { … }
#endif
#ifdef __cplusplus
}
}
#endif