mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
ConvertFromI420 respect destination stride for NV12 and NV21
Bug: libyuv:904 Change-Id: Ie1fd39c693e64661eb52f75492a261384db70776 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3176483 Reviewed-by: Frank Barchard <fbarchard@chromium.org> Reviewed-by: richard winterton <rrwinterton@gmail.com> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
33a68ec779
commit
b92a60320f
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 1790
|
Version: 1791
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 1790
|
#define LIBYUV_VERSION 1791
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_
|
#endif // INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|||||||
@ -772,7 +772,8 @@ int ConvertFromI420(const uint8_t* y,
|
|||||||
height);
|
height);
|
||||||
break;
|
break;
|
||||||
case FOURCC_NV12: {
|
case FOURCC_NV12: {
|
||||||
uint8_t* dst_uv = dst_sample + width * height;
|
int dst_y_stride = dst_sample_stride ? dst_sample_stride : width;
|
||||||
|
uint8_t* dst_uv = dst_sample + dst_y_stride * height;
|
||||||
r = I420ToNV12(y, y_stride, u, u_stride, v, v_stride, dst_sample,
|
r = I420ToNV12(y, y_stride, u, u_stride, v, v_stride, dst_sample,
|
||||||
dst_sample_stride ? dst_sample_stride : width, dst_uv,
|
dst_sample_stride ? dst_sample_stride : width, dst_uv,
|
||||||
dst_sample_stride ? dst_sample_stride : width, width,
|
dst_sample_stride ? dst_sample_stride : width, width,
|
||||||
@ -780,7 +781,8 @@ int ConvertFromI420(const uint8_t* y,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case FOURCC_NV21: {
|
case FOURCC_NV21: {
|
||||||
uint8_t* dst_vu = dst_sample + width * height;
|
int dst_y_stride = dst_sample_stride ? dst_sample_stride : width;
|
||||||
|
uint8_t* dst_vu = dst_sample + dst_y_stride * height;
|
||||||
r = I420ToNV21(y, y_stride, u, u_stride, v, v_stride, dst_sample,
|
r = I420ToNV21(y, y_stride, u, u_stride, v, v_stride, dst_sample,
|
||||||
dst_sample_stride ? dst_sample_stride : width, dst_vu,
|
dst_sample_stride ? dst_sample_stride : width, dst_vu,
|
||||||
dst_sample_stride ? dst_sample_stride : width, width,
|
dst_sample_stride ? dst_sample_stride : width, width,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user