Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into mod
Browse files Browse the repository at this point in the history
  • Loading branch information
AkarinVS committed Aug 6, 2022
2 parents f748dde + fcd73b2 commit cde6e02
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/avsplugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ static AVS_Value AVSC_CC avs_descale_create(AVS_ScriptEnvironment *env, AVS_Valu
else
opt_enum = DESCALE_OPT_AUTO;

int bytes_per_pixel = avs_component_size(vi);
if (bytes_per_pixel != 4) {
int bits_per_pixel = avs_bits_per_component(vi);
if (bits_per_pixel != 32) {
AVS_Value c2, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11;
c1 = avs_new_value_clip(clip);
avs_release_clip(clip);
Expand All @@ -300,7 +300,7 @@ static AVS_Value AVSC_CC avs_descale_create(AVS_ScriptEnvironment *env, AVS_Valu
AVS_Value descale_args[] = {c2, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11};
c1 = avs_invoke(env, "Descale", avs_new_value_array(descale_args, 12), NULL);
avs_release_value(c2);
a1 = avs_new_value_int(bytes_per_pixel * 8);
a1 = avs_new_value_int(bits_per_pixel);
AVS_Value convert_args2[] = {c1, a1};
c2 = avs_invoke(env, "ConvertBits", avs_new_value_array(convert_args2, 2), NULL);
avs_release_value(c1);
Expand Down Expand Up @@ -330,6 +330,7 @@ static AVS_Value AVSC_CC avs_descale_create(AVS_ScriptEnvironment *env, AVS_Valu
avs_release_clip(clip);
AVS_FilterInfo *fi;
clip = avs_new_c_filter(env, &fi, c1, true);
avs_release_value(c1);

fi->vi.width = dst_width;
fi->vi.height = dst_height;
Expand Down

5 comments on commit cde6e02

@kedaitinh12
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder your release support avs too??
https://github.com/AmusementClub/descale/releases

@AkarinVS
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, generally speaking, our releases only support VS as we have phased out AVS years ago.

@kedaitinh12
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So why you edit avsplugin.c??

@AkarinVS
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a merge of upstream commit Irrational-Encoding-Wizardry@fcd73b2 to minimize unnecessary divergence.

@kedaitinh12
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a merge of upstream commit Irrational-Encoding-Wizardry@fcd73b2 to minimize unnecessary divergence.

Ok, thanks

Please sign in to comment.