Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 The Android Open Source Project |
| 3 | * Copyright (C) 2012, The Linux Foundation. All rights reserved. |
| 4 | * |
| 5 | * Not a Contribution, Apache license notifications and license are |
| 6 | * retained for attribution purposes only. |
| 7 | * |
| 8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | * you may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | * |
| 14 | * Unless required by applicable law or agreed to in writing, software |
| 15 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | * See the License for the specific language governing permissions and |
| 18 | * limitations under the License. |
| 19 | */ |
| 20 | |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 21 | #define DEBUG_FBUPDATE 0 |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 22 | #include <gralloc_priv.h> |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 23 | #include "hwc_fbupdate.h" |
Sravan Kumar D.V.N | b5ed029 | 2013-03-15 08:51:16 +0530 | [diff] [blame] | 24 | #include "hwc_video.h" |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 25 | |
| 26 | namespace qhwc { |
| 27 | |
| 28 | namespace ovutils = overlay::utils; |
| 29 | |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 30 | IFBUpdate* IFBUpdate::getObject(const int& width, const int& dpy) { |
| 31 | if(width > MAX_DISPLAY_DIM) { |
| 32 | return new FBUpdateHighRes(dpy); |
| 33 | } |
| 34 | return new FBUpdateLowRes(dpy); |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 35 | } |
| 36 | |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 37 | inline void IFBUpdate::reset() { |
| 38 | mModeOn = false; |
| 39 | } |
| 40 | |
Sravan Kumar D.V.N | c6a8250 | 2013-03-22 06:20:04 +0530 | [diff] [blame] | 41 | bool IFBUpdate::needFbUpdate(hwc_context_t *ctx, |
| 42 | const hwc_display_contents_1_t *list, int dpy) { |
| 43 | // if Video Overlay is on and and YUV layers are passed through overlay |
| 44 | // , no need to configure FB layer. |
| 45 | if(ctx->mVidOv[dpy]->isModeOn() && |
| 46 | (ctx->listStats[dpy].yuvCount == ctx->listStats[dpy].numAppLayers)) |
| 47 | return false; |
| 48 | |
| 49 | return true; |
| 50 | } |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 51 | //================= Low res==================================== |
| 52 | FBUpdateLowRes::FBUpdateLowRes(const int& dpy): IFBUpdate(dpy) {} |
| 53 | |
| 54 | inline void FBUpdateLowRes::reset() { |
| 55 | IFBUpdate::reset(); |
| 56 | mDest = ovutils::OV_INVALID; |
| 57 | } |
| 58 | |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 59 | bool FBUpdateLowRes::prepare(hwc_context_t *ctx, hwc_display_contents_1 *list) |
| 60 | { |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 61 | if(!ctx->mMDP.hasOverlay) { |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 62 | ALOGD_IF(DEBUG_FBUPDATE, "%s, this hw doesnt support overlays", |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 63 | __FUNCTION__); |
| 64 | return false; |
| 65 | } |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 66 | mModeOn = configure(ctx, list); |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 67 | ALOGD_IF(DEBUG_FBUPDATE, "%s, mModeOn = %d", __FUNCTION__, mModeOn); |
| 68 | return mModeOn; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | // Configure |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 72 | bool FBUpdateLowRes::configure(hwc_context_t *ctx, |
| 73 | hwc_display_contents_1 *list) |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 74 | { |
| 75 | bool ret = false; |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 76 | hwc_layer_1_t *layer = &list->hwLayers[list->numHwLayers - 1]; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 77 | if (LIKELY(ctx->mOverlay)) { |
Sravan Kumar D.V.N | c6a8250 | 2013-03-22 06:20:04 +0530 | [diff] [blame] | 78 | // When Video overlay is in use and there are no UI layers to |
| 79 | // be composed to FB , no need to configure FbUpdate. |
| 80 | if(!needFbUpdate(ctx, list, mDpy)) |
| 81 | return false; |
| 82 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 83 | overlay::Overlay& ov = *(ctx->mOverlay); |
| 84 | private_handle_t *hnd = (private_handle_t *)layer->handle; |
Saurabh Shah | acf1020 | 2013-02-26 10:15:15 -0800 | [diff] [blame] | 85 | ovutils::Whf info(hnd->width, hnd->height, |
| 86 | ovutils::getMdpFormat(hnd->format), hnd->size); |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 87 | |
| 88 | //Request an RGB pipe |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 89 | ovutils::eDest dest = ov.nextPipe(ovutils::OV_MDP_PIPE_RGB, mDpy); |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 90 | if(dest == ovutils::OV_INVALID) { //None available |
| 91 | return false; |
| 92 | } |
| 93 | |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 94 | mDest = dest; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 95 | |
| 96 | ovutils::eMdpFlags mdpFlags = ovutils::OV_MDP_FLAGS_NONE; |
Sravan Kumar D.V.N | b5ed029 | 2013-03-15 08:51:16 +0530 | [diff] [blame] | 97 | // If any of the layers has pre-multiplied alpha, set Pre multiplied |
| 98 | // Flag as the compositied output is alpha pre-multiplied. |
| 99 | if(ctx->listStats[mDpy].preMultipliedAlpha == true) |
| 100 | ovutils::setMdpFlags(mdpFlags, ovutils::OV_MDP_BLEND_FG_PREMULT); |
| 101 | |
| 102 | ovutils::eZorder z_order = |
| 103 | ctx->mVidOv[mDpy]->isModeOn()?ovutils::ZORDER_1:ovutils::ZORDER_0; |
| 104 | ovutils::eIsFg is_fg = |
| 105 | ctx->mVidOv[mDpy]->isModeOn()? ovutils::IS_FG_OFF:ovutils::IS_FG_SET; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 106 | |
| 107 | ovutils::PipeArgs parg(mdpFlags, |
| 108 | info, |
Sravan Kumar D.V.N | b5ed029 | 2013-03-15 08:51:16 +0530 | [diff] [blame] | 109 | z_order, |
| 110 | is_fg, |
Ramkumar Radhakrishnan | 288f8c7 | 2013-01-15 11:37:54 -0800 | [diff] [blame] | 111 | ovutils::ROT_FLAGS_NONE); |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 112 | ov.setSource(parg, dest); |
| 113 | |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 114 | hwc_rect_t sourceCrop; |
| 115 | getNonWormholeRegion(list, sourceCrop); |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 116 | // x,y,w,h |
| 117 | ovutils::Dim dcrop(sourceCrop.left, sourceCrop.top, |
| 118 | sourceCrop.right - sourceCrop.left, |
| 119 | sourceCrop.bottom - sourceCrop.top); |
| 120 | ov.setCrop(dcrop, dest); |
| 121 | |
| 122 | int transform = layer->transform; |
| 123 | ovutils::eTransform orient = |
| 124 | static_cast<ovutils::eTransform>(transform); |
| 125 | ov.setTransform(orient, dest); |
| 126 | |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 127 | hwc_rect_t displayFrame = sourceCrop; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 128 | ovutils::Dim dpos(displayFrame.left, |
| 129 | displayFrame.top, |
| 130 | displayFrame.right - displayFrame.left, |
| 131 | displayFrame.bottom - displayFrame.top); |
Arun Kumar K.R | feb2d8a | 2013-02-01 02:53:13 -0800 | [diff] [blame] | 132 | // Calculate the actionsafe dimensions for External(dpy = 1 or 2) |
| 133 | if(mDpy) |
| 134 | getActionSafePosition(ctx, mDpy, dpos.x, dpos.y, dpos.w, dpos.h); |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 135 | ov.setPosition(dpos, dest); |
| 136 | |
| 137 | ret = true; |
| 138 | if (!ov.commit(dest)) { |
| 139 | ALOGE("%s: commit fails", __FUNCTION__); |
| 140 | ret = false; |
| 141 | } |
| 142 | } |
| 143 | return ret; |
| 144 | } |
| 145 | |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 146 | bool FBUpdateLowRes::draw(hwc_context_t *ctx, private_handle_t *hnd) |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 147 | { |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 148 | if(!mModeOn) { |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 149 | return true; |
| 150 | } |
| 151 | bool ret = true; |
| 152 | overlay::Overlay& ov = *(ctx->mOverlay); |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 153 | ovutils::eDest dest = mDest; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 154 | if (!ov.queueBuffer(hnd->fd, hnd->offset, dest)) { |
Amara Venkata Mastan Manoj Kumar | dc01a53 | 2013-01-30 18:34:56 -0800 | [diff] [blame] | 155 | ALOGE("%s: queueBuffer failed for FBUpdate", __FUNCTION__); |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 156 | ret = false; |
| 157 | } |
| 158 | return ret; |
| 159 | } |
| 160 | |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 161 | //================= High res==================================== |
| 162 | FBUpdateHighRes::FBUpdateHighRes(const int& dpy): IFBUpdate(dpy) {} |
| 163 | |
| 164 | inline void FBUpdateHighRes::reset() { |
| 165 | IFBUpdate::reset(); |
| 166 | mDestLeft = ovutils::OV_INVALID; |
| 167 | mDestRight = ovutils::OV_INVALID; |
| 168 | } |
| 169 | |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 170 | bool FBUpdateHighRes::prepare(hwc_context_t *ctx, hwc_display_contents_1 *list) |
| 171 | { |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 172 | if(!ctx->mMDP.hasOverlay) { |
| 173 | ALOGD_IF(DEBUG_FBUPDATE, "%s, this hw doesnt support overlays", |
| 174 | __FUNCTION__); |
| 175 | return false; |
| 176 | } |
| 177 | ALOGD_IF(DEBUG_FBUPDATE, "%s, mModeOn = %d", __FUNCTION__, mModeOn); |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 178 | mModeOn = configure(ctx, list); |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 179 | return mModeOn; |
| 180 | } |
| 181 | |
| 182 | // Configure |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 183 | bool FBUpdateHighRes::configure(hwc_context_t *ctx, |
| 184 | hwc_display_contents_1 *list) |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 185 | { |
| 186 | bool ret = false; |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 187 | hwc_layer_1_t *layer = &list->hwLayers[list->numHwLayers - 1]; |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 188 | if (LIKELY(ctx->mOverlay)) { |
Sravan Kumar D.V.N | c6a8250 | 2013-03-22 06:20:04 +0530 | [diff] [blame] | 189 | // When Video overlay is in use and there are no UI layers to |
| 190 | // be composed to FB , no need to configure FbUpdate. |
| 191 | if(!needFbUpdate(ctx, list, mDpy)) |
| 192 | return false; |
| 193 | |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 194 | overlay::Overlay& ov = *(ctx->mOverlay); |
| 195 | private_handle_t *hnd = (private_handle_t *)layer->handle; |
Saurabh Shah | acf1020 | 2013-02-26 10:15:15 -0800 | [diff] [blame] | 196 | ovutils::Whf info(hnd->width, hnd->height, |
| 197 | ovutils::getMdpFormat(hnd->format), hnd->size); |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 198 | |
| 199 | //Request left RGB pipe |
| 200 | ovutils::eDest destL = ov.nextPipe(ovutils::OV_MDP_PIPE_RGB, mDpy); |
| 201 | if(destL == ovutils::OV_INVALID) { //None available |
| 202 | return false; |
| 203 | } |
| 204 | //Request right RGB pipe |
| 205 | ovutils::eDest destR = ov.nextPipe(ovutils::OV_MDP_PIPE_RGB, mDpy); |
| 206 | if(destR == ovutils::OV_INVALID) { //None available |
| 207 | return false; |
| 208 | } |
| 209 | |
| 210 | mDestLeft = destL; |
| 211 | mDestRight = destR; |
| 212 | |
| 213 | ovutils::eMdpFlags mdpFlagsL = ovutils::OV_MDP_FLAGS_NONE; |
Sravan Kumar D.V.N | b5ed029 | 2013-03-15 08:51:16 +0530 | [diff] [blame] | 214 | //If any layer has pre-multiplied alpha, set Pre multiplied |
| 215 | //Flag as the compositied output is alpha pre-multiplied. |
| 216 | if(ctx->listStats[mDpy].preMultipliedAlpha == true) |
| 217 | ovutils::setMdpFlags(mdpFlagsL, ovutils::OV_MDP_BLEND_FG_PREMULT); |
| 218 | |
| 219 | ovutils::eZorder z_order = |
| 220 | ctx->mVidOv[mDpy]->isModeOn()?ovutils::ZORDER_1:ovutils::ZORDER_0; |
| 221 | ovutils::eIsFg is_fg = |
| 222 | ctx->mVidOv[mDpy]->isModeOn()? ovutils::IS_FG_OFF:ovutils::IS_FG_SET; |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 223 | |
| 224 | ovutils::PipeArgs pargL(mdpFlagsL, |
| 225 | info, |
Sravan Kumar D.V.N | b5ed029 | 2013-03-15 08:51:16 +0530 | [diff] [blame] | 226 | z_order, |
| 227 | is_fg, |
Ramkumar Radhakrishnan | 288f8c7 | 2013-01-15 11:37:54 -0800 | [diff] [blame] | 228 | ovutils::ROT_FLAGS_NONE); |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 229 | ov.setSource(pargL, destL); |
| 230 | |
| 231 | ovutils::eMdpFlags mdpFlagsR = mdpFlagsL; |
| 232 | ovutils::setMdpFlags(mdpFlagsR, ovutils::OV_MDSS_MDP_RIGHT_MIXER); |
| 233 | ovutils::PipeArgs pargR(mdpFlagsR, |
| 234 | info, |
Sravan Kumar D.V.N | b5ed029 | 2013-03-15 08:51:16 +0530 | [diff] [blame] | 235 | z_order, |
| 236 | is_fg, |
Ramkumar Radhakrishnan | 288f8c7 | 2013-01-15 11:37:54 -0800 | [diff] [blame] | 237 | ovutils::ROT_FLAGS_NONE); |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 238 | ov.setSource(pargR, destR); |
| 239 | |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 240 | hwc_rect_t sourceCrop; |
| 241 | getNonWormholeRegion(list, sourceCrop); |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 242 | ovutils::Dim dcropL(sourceCrop.left, sourceCrop.top, |
| 243 | (sourceCrop.right - sourceCrop.left) / 2, |
| 244 | sourceCrop.bottom - sourceCrop.top); |
| 245 | ovutils::Dim dcropR( |
| 246 | sourceCrop.left + (sourceCrop.right - sourceCrop.left) / 2, |
| 247 | sourceCrop.top, |
| 248 | (sourceCrop.right - sourceCrop.left) / 2, |
| 249 | sourceCrop.bottom - sourceCrop.top); |
| 250 | ov.setCrop(dcropL, destL); |
| 251 | ov.setCrop(dcropR, destR); |
| 252 | |
| 253 | int transform = layer->transform; |
| 254 | ovutils::eTransform orient = |
| 255 | static_cast<ovutils::eTransform>(transform); |
| 256 | ov.setTransform(orient, destL); |
| 257 | ov.setTransform(orient, destR); |
| 258 | |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 259 | hwc_rect_t displayFrame = sourceCrop; |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 260 | //For FB left, top will always be 0 |
| 261 | //That should also be the case if using 2 mixers for single display |
Arun Kumar K.R | 0e8efb8 | 2013-03-18 17:31:50 -0700 | [diff] [blame] | 262 | ovutils::Dim dposL(displayFrame.left, |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 263 | displayFrame.top, |
| 264 | (displayFrame.right - displayFrame.left) / 2, |
| 265 | displayFrame.bottom - displayFrame.top); |
Arun Kumar K.R | 0e8efb8 | 2013-03-18 17:31:50 -0700 | [diff] [blame] | 266 | ov.setPosition(dposL, destL); |
| 267 | ovutils::Dim dposR(0, |
| 268 | displayFrame.top, |
| 269 | (displayFrame.right - displayFrame.left) / 2, |
| 270 | displayFrame.bottom - displayFrame.top); |
| 271 | ov.setPosition(dposR, destR); |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 272 | |
| 273 | ret = true; |
| 274 | if (!ov.commit(destL)) { |
| 275 | ALOGE("%s: commit fails for left", __FUNCTION__); |
| 276 | ret = false; |
| 277 | } |
| 278 | if (!ov.commit(destR)) { |
| 279 | ALOGE("%s: commit fails for right", __FUNCTION__); |
| 280 | ret = false; |
| 281 | } |
| 282 | } |
| 283 | return ret; |
| 284 | } |
| 285 | |
Naseer Ahmed | 64b8121 | 2013-02-14 10:29:47 -0500 | [diff] [blame] | 286 | bool FBUpdateHighRes::draw(hwc_context_t *ctx, private_handle_t *hnd) |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 287 | { |
| 288 | if(!mModeOn) { |
| 289 | return true; |
| 290 | } |
| 291 | bool ret = true; |
| 292 | overlay::Overlay& ov = *(ctx->mOverlay); |
| 293 | ovutils::eDest destL = mDestLeft; |
| 294 | ovutils::eDest destR = mDestRight; |
Saurabh Shah | cf053c6 | 2012-12-13 12:32:55 -0800 | [diff] [blame] | 295 | if (!ov.queueBuffer(hnd->fd, hnd->offset, destL)) { |
| 296 | ALOGE("%s: queue failed for left of dpy = %d", |
| 297 | __FUNCTION__, mDpy); |
| 298 | ret = false; |
| 299 | } |
| 300 | if (!ov.queueBuffer(hnd->fd, hnd->offset, destR)) { |
| 301 | ALOGE("%s: queue failed for right of dpy = %d", |
| 302 | __FUNCTION__, mDpy); |
| 303 | ret = false; |
| 304 | } |
| 305 | return ret; |
| 306 | } |
| 307 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 308 | //--------------------------------------------------------------------- |
| 309 | }; //namespace qhwc |