diff options
author | Max Dmytrychenko <[email protected]> | 2015-09-27 16:56:25 +0200 |
---|---|---|
committer | Max Dmytrychenko <[email protected]> | 2015-09-27 16:56:25 +0200 |
commit | 3d8d7044ef5d98f804ca3ac84596e8b7ecf7be3e (patch) | |
tree | 2e529b9ee45bf54217e7e6d32c8f211c0c673c54 /libhb/qsv_common.c | |
parent | 32edfb239d195fb68e6d56b478197db978e8182a (diff) |
fix to prevent lazy compiler assumption and avoid full computation, no local var needed
Diffstat (limited to 'libhb/qsv_common.c')
-rw-r--r-- | libhb/qsv_common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c index 075aada0d..bbe9a1fe5 100644 --- a/libhb/qsv_common.c +++ b/libhb/qsv_common.c @@ -144,9 +144,8 @@ static int qsv_implementation_is_hardware(mfxIMPL implementation) int hb_qsv_available() { - int is_qsv_available = hb_qsv_video_encoder_is_enabled(HB_VCODEC_QSV_H264) ? HB_VCODEC_QSV_H264 : 0; - is_qsv_available |= hb_qsv_video_encoder_is_enabled(HB_VCODEC_QSV_H265) ? HB_VCODEC_QSV_H265 : 0; - return is_qsv_available; + return ((hb_qsv_video_encoder_is_enabled(HB_VCODEC_QSV_H264) ? HB_VCODEC_QSV_H264 : 0) | + (hb_qsv_video_encoder_is_enabled(HB_VCODEC_QSV_H265) ? HB_VCODEC_QSV_H265 : 0)); } int hb_qsv_video_encoder_is_enabled(int encoder) |