diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-10-02 11:08:37 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-10-02 11:08:37 +0200 |
| commit | fae11d166fd4f1d56ce8cfe59a3af78feb336733 (patch) | |
| tree | 0e81b9ad882fb53470f4f3a4c89c4e45bb9ffade /src/lib/image.cc | |
| parent | d8a20fef494065a9b3ccf2d93328861b1eea1d4f (diff) | |
Add round_to_log_2()
Diffstat (limited to 'src/lib/image.cc')
| -rw-r--r-- | src/lib/image.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc index 8e6c5717b..548c3a2b7 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -144,7 +144,7 @@ static int round_width_for_subsampling (int p, AVPixFmtDescriptor const * desc) { - return p & ~ ((1 << desc->log2_chroma_w) - 1); + return round_to_log_2 (p, desc->log2_chroma_w); } @@ -152,7 +152,7 @@ static int round_height_for_subsampling (int p, AVPixFmtDescriptor const * desc) { - return p & ~ ((1 << desc->log2_chroma_h) - 1); + return round_to_log_2 (p, desc->log2_chroma_h); } |
