Skip to content

Commit

Permalink
fix get_num_planes().
Browse files Browse the repository at this point in the history
  • Loading branch information
chikuzen committed Aug 14, 2016
1 parent 556b102 commit 2df0a7a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/avs2pipemod.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <windows.h>
#include <avisynth.h>

#define A2PM_VERSION "1.1.0"
#define A2PM_VERSION "1.1.1"


enum action_t {
Expand Down
Binary file modified src/avs2pipemod.rc
Binary file not shown.
File renamed without changes.
12 changes: 6 additions & 6 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ const char* get_string_y4mheader(int pix_type)
case VideoInfo::CS_YUV422P16: return "422p16";

case VideoInfo::CS_YV24: return "444";
case VideoInfo::CS_YUV444P10: return "444p10";
case VideoInfo::CS_YUV444P12: return "444p12";
case VideoInfo::CS_YUV444P14: return "444p14";
case VideoInfo::CS_YUV444P10: return "444p10";
case VideoInfo::CS_YUV444P12: return "444p12";
case VideoInfo::CS_YUV444P14: return "444p14";
case VideoInfo::CS_YUV444P16: return "444p16";

case VideoInfo::CS_YUVA444: return "444alpha";
Expand Down Expand Up @@ -275,10 +275,10 @@ int get_num_planes(int pixel_type)
if (pixel_type & VideoInfo::CS_INTERLEAVED) {
return 1;
}
if (pixel_type & (VideoInfo::CS_YUVA | VideoInfo::CS_RGBA_TYPE)) {
return 4;
if (pixel_type & VideoInfo::CS_BGR) {
return (pixel_type & VideoInfo::CS_RGBA_TYPE) ? 4 : 3;
}
return 3;
return (pixel_type & VideoInfo::CS_YUVA) ? 4 : 3;
}

#if 0
Expand Down
2 changes: 1 addition & 1 deletion vs2015/avs2pipemod.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
<ItemGroup>
<ClInclude Include="..\src\avs2pipemod.h" />
<ClInclude Include="..\src\getopt.h" />
<ClInclude Include="..\src\resource4.h" />
<ClInclude Include="..\src\resource.h" />
<ClInclude Include="..\src\utils.h" />
<ClInclude Include="..\src\wave.h" />
</ItemGroup>
Expand Down

0 comments on commit 2df0a7a

Please sign in to comment.