-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvpe-common.c
664 lines (556 loc) · 20.4 KB
/
vpe-common.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
/*
* Copyright (c) 2013-2014, Texas Instruments Incorporated
* Author: alaganraj <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Contact information for paper mail:
* Texas Instruments
* Post Office Box 655303
* Dallas, Texas 75265
* Contact information:
* http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
* DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
* ============================================================================
*
*/
/*
* @File vpe-common.c
* @Brief vpe specific common functions, used to integrate vpe
* with other modules.
*
* Input buffer must be allocated in application, queue it to vpe
* by passing buffer index
*
* Output buffer allocated in vpe_output_init() as vpe output intended
* to display on LCD.
*/
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <linux/videodev2.h>
#include <linux/v4l2-controls.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <xf86drm.h>
#include <omap_drm.h>
#include <omap_drmif.h>
#include "util.h"
#include "vpe-common.h"
#define pexit(fmt, arg...) { \
printf(fmt, ## arg); \
exit(1); \
}
#define V4L2_CID_TRANS_NUM_BUFS (V4L2_CID_PRIVATE_BASE)
//#define vpe_debug
#ifdef vpe_debug
#define dprintf(fmt, arg...) printf(fmt, ## arg)
#else
#define dprintf(fmt, arg...) do {} while(0)
#endif
/**
*****************************************************************************
* @brief: open the device
*
* @return: vpe struct vpe pointer
*****************************************************************************
*/
struct vpe *vpe_open(void)
{
char devname[20] = "/dev/video0";
struct vpe *vpe;
vpe = calloc(1, sizeof(*vpe));
vpe->fd = open(devname, O_RDWR);
if(vpe->fd < 0) {
pexit("Cant open %s\n", devname);
free(vpe);
vpe = NULL;
}
return vpe;
}
/**
*****************************************************************************
* @brief: close the device and free memory
*
* @param: vpe struct vpe pointer
*
* @return: 0 on success
*****************************************************************************
*/
int vpe_close(struct vpe *vpe)
{
close(vpe->fd);
free(vpe);
return 0;
}
/**
*****************************************************************************
* @brief: fills 4cc, size, coplanar, colorspace based on command line input
*
* @param: format char pointer
* @param: image struct image_params pointer
*
* @return: 0 on success
*****************************************************************************
*/
int describeFormat (char *format, struct image_params *image)
{
image->size = -1;
image->fourcc = -1;
if (strcmp (format, "rgb24") == 0) {
image->fourcc = V4L2_PIX_FMT_RGB24;
image->size = image->height * image->width * 3;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SRGB;
} else if (strcmp (format, "bgr24") == 0) {
image->fourcc = V4L2_PIX_FMT_BGR24;
image->size = image->height * image->width * 3;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SRGB;
} else if (strcmp (format, "argb32") == 0) {
image->fourcc = V4L2_PIX_FMT_RGB32;
image->size = image->height * image->width * 4;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SRGB;
} else if (strcmp (format, "abgr32") == 0) {
image->fourcc = V4L2_PIX_FMT_BGR32;
image->size = image->height * image->width * 4;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SRGB;
} else if (strcmp (format, "yuv444") == 0) {
image->fourcc = V4L2_PIX_FMT_YUV444;
image->size = image->height * image->width * 3;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SMPTE170M;
} else if (strcmp (format, "yvyu") == 0) {
image->fourcc = V4L2_PIX_FMT_YVYU;
image->size = image->height * image->width * 2;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SMPTE170M;
} else if (strcmp (format, "yuyv") == 0) {
image->fourcc = V4L2_PIX_FMT_YUYV;
image->size = image->height * image->width * 2;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SMPTE170M;
} else if (strcmp (format, "uyvy") == 0) {
image->fourcc = V4L2_PIX_FMT_UYVY;
image->size = image->height * image->width * 2;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SMPTE170M;
} else if (strcmp (format, "vyuy") == 0) {
image->fourcc = V4L2_PIX_FMT_VYUY;
image->size = image->height * image->width * 2;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SMPTE170M;
} else if (strcmp (format, "nv16") == 0) {
image->fourcc = V4L2_PIX_FMT_NV16;
image->size = image->height * image->width * 2;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SMPTE170M;
} else if (strcmp (format, "nv61") == 0) {
image->fourcc = V4L2_PIX_FMT_NV61;
image->size = image->height * image->width * 2;
image->coplanar = 0;
image->colorspace = V4L2_COLORSPACE_SMPTE170M;
} else if (strcmp (format, "nv12") == 0) {
image->fourcc = V4L2_PIX_FMT_NV12;
image->size = image->height * image->width * 1.5;
image->coplanar = 1;
image->colorspace = V4L2_COLORSPACE_SMPTE170M;
} else if (strcmp (format, "nv21") == 0) {
image->fourcc = V4L2_PIX_FMT_NV21;
image->size = image->height * image->width * 1.5;
image->coplanar = 1;
image->colorspace = V4L2_COLORSPACE_SMPTE170M;
} else {
return 0;
}
return 1;
}
/**
*****************************************************************************
* @brief: sets crop parameters
*
* @param: vpe struct vpe pointer
*
* @return: 0 on success
*****************************************************************************
*/
static int set_crop(struct vpe *vpe)
{
int ret = 0;
if ((vpe->crop.c.top == 0) && (vpe->crop.c.left == 0) &&
(vpe->crop.c.width == 0) && (vpe->crop.c.height == 0)) {
dprintf("setting default crop params\n");
vpe->crop.c.top = 0;
vpe->crop.c.left = 0;
vpe->crop.c.width = vpe->src.width;
vpe->crop.c.height = vpe->src.height;
vpe->crop.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
}
ret = ioctl(vpe->fd, VIDIOC_S_CROP, &vpe->crop);
if (ret < 0)
pexit("error setting crop\n");
return 0;
}
/**
*****************************************************************************
* @brief: sets control, howmany jobs to be handled on multi instance
*
* @param: vpe struct vpe pointer
*
* @return: 0 on success
*****************************************************************************
*/
static int set_ctrl(struct vpe *vpe)
{
int ret;
struct v4l2_control ctrl;
memset(&ctrl, 0, sizeof(ctrl));
ctrl.id = V4L2_CID_TRANS_NUM_BUFS;
ctrl.value = vpe->translen;
ret = ioctl(vpe->fd, VIDIOC_S_CTRL, &ctrl);
if (ret < 0)
pexit("vpe: S_CTRL failed\n");
return 0;
}
/**
*****************************************************************************
* @brief: Intialize the vpe input by calling set_control, set_format,
* set_crop, refbuf ioctls
*
* @param: vpe struct vpe pointer
*
* @return: 0 on success
*****************************************************************************
*/
int vpe_input_init(struct vpe *vpe)
{
int ret;
struct v4l2_format fmt;
struct v4l2_requestbuffers rqbufs;
set_ctrl(vpe);
memset(&fmt, 0, sizeof fmt);
fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
ret = ioctl(vpe->fd, VIDIOC_G_FMT, &fmt);
if (ret < 0)
pexit( "vpe i/p: G_FMT_1 failed: %s\n", strerror(errno));
fmt.fmt.pix_mp.width = vpe->src.width;
fmt.fmt.pix_mp.height = vpe->src.height;
fmt.fmt.pix_mp.pixelformat = vpe->src.fourcc;
fmt.fmt.pix_mp.colorspace = vpe->src.colorspace;
switch (vpe->deint) {
case 1:
fmt.fmt.pix_mp.field = V4L2_FIELD_ALTERNATE;
break;
case 2:
fmt.fmt.pix_mp.field = V4L2_FIELD_SEQ_TB;
break;
case 0:
fmt.fmt.pix_mp.field = V4L2_FIELD_TOP;
break;
default:
fmt.fmt.pix_mp.field = V4L2_FIELD_ANY;
break;
}
ret = ioctl(vpe->fd, VIDIOC_S_FMT, &fmt);
if (ret < 0) {
pexit( "vpe i/p: S_FMT failed: %s\n", strerror(errno));
} else {
vpe->src.size = fmt.fmt.pix_mp.plane_fmt[0].sizeimage;
vpe->src.size_uv = fmt.fmt.pix_mp.plane_fmt[1].sizeimage;
}
ret = ioctl(vpe->fd, VIDIOC_G_FMT, &fmt);
if (ret < 0)
pexit( "vpe i/p: G_FMT_2 failed: %s\n", strerror(errno));
MSG("vpe i/p: G_FMT: width = %u, height = %u, 4cc = %.4s",
fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height,
(char*)&fmt.fmt.pix_mp.pixelformat);
set_crop(vpe);
memset(&rqbufs, 0, sizeof(rqbufs));
rqbufs.count = NUMBUF;
rqbufs.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
rqbufs.memory = V4L2_MEMORY_DMABUF;
ret = ioctl(vpe->fd, VIDIOC_REQBUFS, &rqbufs);
if (ret < 0)
pexit( "vpe i/p: REQBUFS failed: %s\n", strerror(errno));
vpe->src.numbuf = rqbufs.count;
dprintf("vpe i/p: allocated buffers = %d\n", rqbufs.count);
return 0;
}
/**
*****************************************************************************
* @brief: Initialize vpe output by calling set_format, reqbuf ioctls.
* Also allocates buffer to display the vpe output.
*
* @param: vpe struct vpe pointer
*
* @return: 0 on success
*****************************************************************************
*/
int vpe_output_init(struct vpe *vpe)
{
int ret, i;
struct v4l2_format fmt;
struct v4l2_requestbuffers rqbufs;
memset(&fmt, 0, sizeof fmt);
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
ret = ioctl(vpe->fd, VIDIOC_G_FMT, &fmt);
if (ret < 0)
pexit( "vpe o/p: G_FMT_1 failed: %s\n", strerror(errno));
fmt.fmt.pix_mp.width = vpe->dst.width;
fmt.fmt.pix_mp.height = vpe->dst.height;
fmt.fmt.pix_mp.pixelformat = vpe->dst.fourcc;
fmt.fmt.pix_mp.field = V4L2_FIELD_ANY;
fmt.fmt.pix_mp.colorspace = vpe->dst.colorspace;
ret = ioctl(vpe->fd, VIDIOC_S_FMT, &fmt);
if (ret < 0)
pexit( "vpe o/p: S_FMT failed: %s\n", strerror(errno));
ret = ioctl(vpe->fd, VIDIOC_G_FMT, &fmt);
if (ret < 0)
pexit( "vpe o/p: G_FMT_2 failed: %s\n", strerror(errno));
MSG("vpe o/p: G_FMT: width = %u, height = %u, 4cc = %.4s",
fmt.fmt.pix_mp.width, fmt.fmt.pix_mp.height,
(char*)&fmt.fmt.pix_mp.pixelformat);
memset(&rqbufs, 0, sizeof(rqbufs));
rqbufs.count = NUMBUF;
rqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
rqbufs.memory = V4L2_MEMORY_DMABUF;
ret = ioctl(vpe->fd, VIDIOC_REQBUFS, &rqbufs);
if (ret < 0)
pexit( "vpe o/p: REQBUFS failed: %s\n", strerror(errno));
vpe->dst.numbuf = rqbufs.count;
dprintf("vpe o/p: allocated buffers = %d\n", rqbufs.count);
vpe->disp_bufs = disp_get_vid_buffers(vpe->disp, NUMBUF, vpe->dst.fourcc,
vpe->dst.width, vpe->dst.height);
if (!vpe->disp_bufs)
pexit("allocating display buffer failed\n");
for (i = 0; i < NUMBUF; i++) {
vpe->output_buf_dmafd[i] = omap_bo_dmabuf(vpe->disp_bufs[i]->bo[0]);
vpe->disp_bufs[i]->fd[0] = vpe->output_buf_dmafd[i];
if(vpe->dst.coplanar) {
vpe->output_buf_dmafd_uv[i] = omap_bo_dmabuf(vpe->disp_bufs[i]->bo[1]);
vpe->disp_bufs[i]->fd[1] = vpe->output_buf_dmafd_uv[i];
}
/* display only image widthxheight, no full screen */
// vpe->disp_bufs[i]->noScale = true;
dprintf("vpe->disp_bufs_fd[%d] = %d\n", i, vpe->output_buf_dmafd[i]);
}
dprintf("allocating display buffer success\n");
return 0;
}
/**
*****************************************************************************
* @brief: queue buffer to vpe input
*
* @param: vpe struct vpe pointer
* @param: index buffer index to queue
*
* @return: 0 on success
*****************************************************************************
*/
int vpe_input_qbuf(struct vpe *vpe, int index)
{
int ret;
struct v4l2_buffer buf;
struct v4l2_plane planes[2];
dprintf("vpe: src QBUF (%d):%s field", vpe->field,
vpe->field==V4L2_FIELD_TOP?"top":"bottom");
memset(&buf, 0, sizeof buf);
memset(&planes, 0, sizeof planes);
planes[0].length = planes[0].bytesused = vpe->src.size;
if(vpe->src.coplanar)
planes[1].length = planes[1].bytesused = vpe->src.size_uv;
planes[0].data_offset = planes[1].data_offset = 0;
buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
buf.memory = V4L2_MEMORY_DMABUF;
buf.index = index;
buf.m.planes = planes;
buf.field = vpe->field;
if(vpe->src.coplanar)
buf.length = 2;
else
buf.length = 1;
buf.m.planes[0].m.fd = vpe->input_buf_dmafd[index];
if(vpe->src.coplanar)
buf.m.planes[1].m.fd = vpe->input_buf_dmafd_uv[index];
ret = ioctl(vpe->fd, VIDIOC_QBUF, &buf);
if (ret < 0)
pexit( "vpe i/p: QBUF failed: %s, index = %d\n",
strerror(errno), index);
return 0;
}
/**
*****************************************************************************
* @brief: queue buffer to vpe output
*
* @param: vpe struct vpe pointer
* @param: index buffer index to queue
*
* @return: 0 on success
*****************************************************************************
*/
int vpe_output_qbuf(struct vpe *vpe, int index)
{
int ret;
struct v4l2_buffer buf;
struct v4l2_plane planes[2];
dprintf("vpe output buffer queue\n");
memset(&buf, 0, sizeof buf);
memset(&planes, 0, sizeof planes);
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
buf.memory = V4L2_MEMORY_DMABUF;
buf.index = index;
buf.m.planes = planes;
if(vpe->dst.coplanar)
buf.length = 2;
else
buf.length = 1;
buf.m.planes[0].m.fd = vpe->output_buf_dmafd[index];
if(vpe->dst.coplanar)
buf.m.planes[1].m.fd = vpe->output_buf_dmafd_uv[index];
ret = ioctl(vpe->fd, VIDIOC_QBUF, &buf);
if (ret < 0)
pexit( "vpe o/p: QBUF failed: %s, index = %d\n",
strerror(errno), index);
return 0;
}
/**
*****************************************************************************
* @brief: start stream
*
* @param: fd device fd
* @param: type buffer type (CAPTURE or OUTPUT)
*
* @return: 0 on success
*****************************************************************************
*/
int vpe_stream_on(int fd, int type)
{
int ret;
ret = ioctl(fd, VIDIOC_STREAMON, &type);
if (ret < 0)
pexit("STREAMON failed, %d: %s\n", type, strerror(errno));
dprintf("stream ON: done! fd = %d, type = %d\n", fd, type);
return 0;
}
/**
*****************************************************************************
* @brief: stop stream
*
* @param: fd device fd
* @param: type buffer type (CAPTURE or OUTPUT)
*
* @return: 0 on success
*****************************************************************************
*/
int vpe_stream_off(int fd, int type)
{
int ret;
ret = ioctl(fd, VIDIOC_STREAMOFF, &type);
if (ret < 0)
pexit("STREAMOFF failed, %d: %s\n", type, strerror(errno));
dprintf("stream OFF: done! fd = %d, type = %d\n", fd, type);
return 0;
}
/**
*****************************************************************************
* @brief: dequeue vpe input buffer
*
* @param: vpe struct vpe pointer
*
* @return: buf.index index of dequeued buffer
*****************************************************************************
*/
int vpe_input_dqbuf(struct vpe *vpe)
{
int ret;
struct v4l2_buffer buf;
struct v4l2_plane planes[2];
dprintf("vpe input dequeue buffer\n");
memset(&buf, 0, sizeof buf);
memset(&planes, 0, sizeof planes);
buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
buf.memory = V4L2_MEMORY_DMABUF;
buf.m.planes = planes;
if(vpe->src.coplanar)
buf.length = 2;
else
buf.length = 1;
ret = ioctl(vpe->fd, VIDIOC_DQBUF, &buf);
if (ret < 0)
pexit("vpe i/p: DQBUF failed: %s\n", strerror(errno));
dprintf("vpe i/p: DQBUF index = %d\n", buf.index);
return buf.index;
}
/**
*****************************************************************************
* @brief: dequeue vpe output buffer
*
* @param: vpe struct vpe pointer
*
* @return: buf.index index of dequeued buffer
*****************************************************************************
*/
int vpe_output_dqbuf(struct vpe* vpe)
{
int ret;
struct v4l2_buffer buf;
struct v4l2_plane planes[2];
dprintf("vpe output dequeue buffer\n");
memset(&buf, 0, sizeof buf);
memset(&planes, 0, sizeof planes);
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
buf.memory = V4L2_MEMORY_DMABUF;
buf.m.planes = planes;
if(vpe->dst.coplanar)
buf.length = 2;
else
buf.length = 1;
ret = ioctl(vpe->fd, VIDIOC_DQBUF, &buf);
if (ret < 0)
pexit("vpe o/p: DQBUF failed: %s\n", strerror(errno));
dprintf("vpe o/p: DQBUF index = %d\n", buf.index);
return buf.index;
}
/**
* @brief Set vpe display buffer scale value. if noScale is false, it's full screen.
* @param vpe: pointer to parameter of struct vpe display
bfull: true/false about full screen
* @retval none
*/
void vpe_output_fullscreen(struct vpe* vpe, bool bfull)
{
int i;
for(i=0; i<NUMBUF; i++)
vpe->disp_bufs[i]->noScale = (bfull) ? false : true;
}