Lines Matching refs:payload
153 bool RotationBufferProvider::createVaSurface(VideoPayloadBuffer *payload, int transform, bool isTarget)
165 width = payload->width;
166 height = payload->height;
168 width = payload->height;
169 height = payload->width;
176 width = payload->width;
177 height = payload->height;
178 bufferHeight = (payload->height + 0x1f) & ~0x1f;
179 stride = payload->luma_stride; /* NV12 srouce buffer */
187 mBobDeinterlace = payload->bob_deinterlace;
198 vaSurfaceAttrib->pixel_format = payload->format;
200 vaSurfaceAttrib->tiling = payload->tiling;
222 vaSurfaceAttrib->buffers[0] = (uintptr_t) payload->khandle;
225 if (payload->crop_width && payload->crop_height) {
226 width = payload->crop_width;
227 height = (payload->crop_height >> mBobDeinterlace);
230 payload->crop_width = width;
231 payload->crop_height = height;
245 isTarget, width, height, bufferHeight, payload->tiling);
253 bool RotationBufferProvider::startVA(VideoPayloadBuffer *payload, int transform)
313 ret = createVaSurface(payload, transform, true);
321 payload->width,
322 payload->height,
377 bool RotationBufferProvider::setupRotationBuffer(VideoPayloadBuffer *payload, int transform)
386 if (payload->format != VA_FOURCC_NV12 || payload->width == 0 || payload->height == 0) {
387 WTRACE("payload data is not correct: format %#x, width %d, height %d",
388 payload->format, payload->width, payload->height);
392 if (payload->width > 1280 && payload->width <= 2048) {
393 payload->tiling = 1;
397 if (isContextChanged(payload->width, payload->height, transform)) {
404 mWidth = payload->width;
405 mHeight = payload->height;
409 ret = startVA(payload, transform);
418 ret = createVaSurface(payload, transform, true);
427 ret = createVaSurface(payload, transform, false);
481 // Populate payload fields so that overlayPlane can flip the buffer
482 payload->rotated_width = mRotatedStride;
483 payload->rotated_height = mRotatedHeight;
484 payload->rotated_buffer_handle = mKhandles[mTargetIndex];
486 payload->client_transform = 0;
510 if (!payload->khandle) {
518 bool RotationBufferProvider::prepareBufferInfo(int w, int h, int stride, VideoPayloadBuffer *payload, void *user_pt)
523 payload->width = payload->crop_width = w;
524 payload->height = payload->crop_height = h;
525 payload->coded_width = ((w + 0xf) & ~0xf);
526 payload->coded_height = ((h + 0xf) & ~0xf);
527 payload->format = VA_FOURCC_NV12;
528 payload->tiling = 1;
529 payload->luma_stride = stride;
530 payload->chroma_u_stride = stride;
531 payload->chroma_v_stride = stride;
532 payload->client_transform = 0;
533 payload->bob_deinterlace = 0;
559 payload->khandle = (buffer_handle_t) mWsbm->getKBufHandle(buf);