diff --git a/yuv420p_gray.cpp b/yuv420p_gray.cpp index a8eeb03..d44f0f6 100644 --- a/yuv420p_gray.cpp +++ b/yuv420p_gray.cpp @@ -6,6 +6,7 @@ typedef int BOOL; #define TRUE 1 #define FALSE 0 +//将YUV420P像素数据去掉颜色(变成灰度图) BOOL yuv420p_gray(const char *file, int width, int height) { if (file == NULL) { diff --git a/yuv420p_split.cpp b/yuv420p_split.cpp index 7533f72..5171a59 100644 --- a/yuv420p_split.cpp +++ b/yuv420p_split.cpp @@ -6,6 +6,7 @@ typedef int BOOL; #define TRUE 1 #define FALSE 0 +//分离YUV420P像素数据中的Y、U、V分量 BOOL yuv420p_split(const char *file, int width, int height) { if (file == NULL) { @@ -30,6 +31,7 @@ BOOL yuv420p_split(const char *file, int width, int height) free(data); fclose(fp); + fclose(fp0); fclose(fp1); fclose(fp2); fclose(fp3); diff --git a/yuv422p_split.cpp b/yuv422p_split.cpp index 11f174d..cc273c5 100644 --- a/yuv422p_split.cpp +++ b/yuv422p_split.cpp @@ -6,6 +6,7 @@ typedef int BOOL; #define TRUE 1 #define FALSE 0 +//分离YUV422P像素数据中的Y、U、V分量(还有问题,图像显示不完整) BOOL yuv422p_split(const char *file, int width, int height) { if (file == NULL) { @@ -30,6 +31,7 @@ BOOL yuv422p_split(const char *file, int width, int height) free(data); fclose(fp); + fclose(fp0); fclose(fp1); fclose(fp2); fclose(fp3); diff --git a/yuv444p_split.cpp b/yuv444p_split.cpp index 4ee0caa..6850dcd 100644 --- a/yuv444p_split.cpp +++ b/yuv444p_split.cpp @@ -6,6 +6,7 @@ typedef int BOOL; #define TRUE 1 #define FALSE 0 +//## 分离YUV444P像素数据中的Y、U、V分量 BOOL yuv444p_split(const char *file, int width, int height) { if (file == NULL) { @@ -30,6 +31,7 @@ BOOL yuv444p_split(const char *file, int width, int height) free(data); fclose(fp); + fclose(fp0); fclose(fp1); fclose(fp2); fclose(fp3);