diff options
author | Matthias Dressel <code@deadcode.eu> | 2021-01-27 00:40:21 +0300 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2021-01-28 23:26:40 +0300 |
commit | 6361e88d4ddb69a461f85e8e1f7b9055c49cc17f (patch) | |
tree | 109e6e54e8117b18b2946f475c58431c8c7a0c7f /include | |
parent | 54747d42e27e1cb60d6a46a3ee5089780a9ad3c6 (diff) |
src: Replace check for intra-/key-frame with dedicated macro
Should make the code more readable.
Diffstat (limited to 'include')
-rw-r--r-- | include/common/frame.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/common/frame.h b/include/common/frame.h index de2bd0d..767f7fd 100644 --- a/include/common/frame.h +++ b/include/common/frame.h @@ -30,8 +30,16 @@ /* * Checks whether Dav1dFrameType == INTER || == SWITCH * Both are defined as odd numbers {1, 3} and therefore have the LSB set. + * See also: AV1 spec 6.8.2 */ #define IS_INTER_OR_SWITCH(frame_header) \ ((frame_header)->frame_type & 1) +/* + * Checks whether Dav1dFrameType == KEY || == INTRA + * See also: AV1 spec 6.8.2 + */ +#define IS_KEY_OR_INTRA(frame_header) \ + (!IS_INTER_OR_SWITCH(frame_header)) + #endif /* DAV1D_COMMON_FRAME_H */ |