diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-11-03 15:47:50 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-11-14 20:24:39 +0200 |
commit | dd1b848d92034be5aea1388c844a4aea9b53bd35 (patch) | |
tree | e62a42345b9d71197afc0d59a9f383e877f395e3 /libmpcodecs/vf.c | |
parent | 991d7387b31f97cdbb1149d703bda7afd42ca58b (diff) | |
download | mpv-dd1b848d92034be5aea1388c844a4aea9b53bd35.tar.bz2 mpv-dd1b848d92034be5aea1388c844a4aea9b53bd35.tar.xz |
cleanup: vf_scale.c, vf.c: replace numbers by flag macro names
Diffstat (limited to 'libmpcodecs/vf.c')
-rw-r--r-- | libmpcodecs/vf.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index b379967711..8bd8145042 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -404,7 +404,8 @@ mp_image_t *vf_get_image(vf_instance_t *vf, unsigned int outfmt, // we have to change width... check if we CAN co it: int flags = vf->query_format(vf, outfmt); // should not fail - if (!(flags & 3)) + if (!(flags & (VFCAP_CSP_SUPPORTED | + VFCAP_CSP_SUPPORTED_BY_HW))) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "??? vf_get_image{vf->query_format(outfmt)} " "failed!\n"); @@ -583,14 +584,14 @@ unsigned int vf_match_csp(vf_instance_t **vfp, const unsigned int *list, if ((p = list)) while (*p) { ret = vf->query_format(vf, *p); - mp_msg(MSGT_VFILTER, MSGL_V, "[%s] query(%s) -> %d\n", - vf->info->name, vo_format_name(*p), ret & 3); - if (ret & 2) { + mp_msg(MSGT_VFILTER, MSGL_V, "[%s] query(%s) -> %x\n", + vf->info->name, vo_format_name(*p), ret); + if (ret & VFCAP_CSP_SUPPORTED_BY_HW) { best = *p; break; - } // no conversion -> bingo! - if (ret & 1 && !best) - best = *p; // best with conversion + } + if (ret & VFCAP_CSP_SUPPORTED && !best) + best = *p; ++p; } if (best) @@ -609,14 +610,14 @@ unsigned int vf_match_csp(vf_instance_t **vfp, const unsigned int *list, if ((p = list)) while (*p) { ret = vf->query_format(vf, *p); - mp_msg(MSGT_VFILTER, MSGL_V, "[%s] query(%s) -> %d\n", - vf->info->name, vo_format_name(*p), ret & 3); - if (ret & 2) { // no conversion -> bingo! + mp_msg(MSGT_VFILTER, MSGL_V, "[%s] query(%s) -> %x\n", + vf->info->name, vo_format_name(*p), ret); + if (ret & VFCAP_CSP_SUPPORTED_BY_HW) { best = *p; break; } - if (ret & 1 && !best) - best = *p; // best with conversion + if (ret & VFCAP_CSP_SUPPORTED && !best) + best = *p; ++p; } if (best) |