| Index: source/scale_argb.cc
|
| diff --git a/source/scale_argb.cc b/source/scale_argb.cc
|
| index 40a2d1ab205eb0c5672b8883a2fb0e3122b667d7..132581cce855dd52f7b1ee784fb381b3ebb2ac86 100644
|
| --- a/source/scale_argb.cc
|
| +++ b/source/scale_argb.cc
|
| @@ -847,6 +847,37 @@ int ARGBScale(const uint8* src_argb, int src_stride_argb,
|
| return 0;
|
| }
|
|
|
| +// Scale with YUV conversion to ARGB and clipping.
|
| +LIBYUV_API
|
| +int YUVToARGBScaleClip(const uint8* src_y, int src_stride_y,
|
| + const uint8* src_u, int src_stride_u,
|
| + const uint8* src_v, int src_stride_v,
|
| + uint32 src_fourcc,
|
| + int src_width, int src_height,
|
| + uint8* dst_argb, int dst_stride_argb,
|
| + uint32 dst_fourcc,
|
| + int dst_width, int dst_height,
|
| + int clip_x, int clip_y, int clip_width, int clip_height,
|
| + enum FilterMode filtering) {
|
| +
|
| + uint8* argb_buffer = (uint8*)malloc(src_width * src_height * 4);
|
| + int r;
|
| + I420ToARGB(src_y, src_stride_y,
|
| + src_u, src_stride_u,
|
| + src_v, src_stride_v,
|
| + argb_buffer, src_width * 4,
|
| + src_width, src_height);
|
| +
|
| + r = ARGBScaleClip(argb_buffer, src_width * 4,
|
| + src_width, src_height,
|
| + dst_argb, dst_stride_argb,
|
| + dst_width, dst_height,
|
| + clip_x, clip_y, clip_width, clip_height,
|
| + filtering);
|
| + free(argb_buffer);
|
| + return r;
|
| +}
|
| +
|
| #ifdef __cplusplus
|
| } // extern "C"
|
| } // namespace libyuv
|
|
|