Lines Matching refs:width
367 * width, height - Frame dimensions.
372 typedef int (*u_offset_func)(const YUVDesc* desc, int line, int width, int height);
379 * width, height - Frame dimensions.
384 typedef int (*v_offset_func)(const YUVDesc* desc, int line, int width, int height);
571 _UOffIntrlYUV(const YUVDesc* desc, int line, int width, int height)
575 * is twice its width. */
576 return line * width * 2 + desc->U_offset;
581 _VOffIntrlYUV(const YUVDesc* desc, int line, int width, int height)
584 return line * width * 2 + desc->V_offset;
589 _UOffIntrlUV(const YUVDesc* desc, int line, int width, int height)
591 /* UV pane starts right after the Y pane, that occupies 'height * width'
592 * bytes. Eacht line in UV pane contains width / 2 'UV' pairs, which makes UV
593 * lane to contain as many bytes, as the width is.
598 * height * width + (line / 2) * width = (height + line / 2) * width
600 return (height + line / 2) * width + desc->U_offset;
605 _VOffIntrlUV(const YUVDesc* desc, int line, int width, int height)
608 return (height + line / 2) * width + desc->V_offset;
613 _UOffSepYUV(const YUVDesc* desc, int line, int width, int height)
615 /* U, or V pane starts right after the Y pane, that occupies 'height * width'
616 * bytes. Eacht line in each of U and V panes contains width / 2 elements.
620 * <Y pane size> + (line / 2) * width / 2
624 * <Y pane size> + <Y pane size> / 4 + (line / 2) * width / 2
628 const int y_pane_size = height * width;
631 return y_pane_size + (line / 2) * width / 2;
634 return y_pane_size + y_pane_size / 4 + (line / 2) * width / 2;
640 _VOffSepYUV(const YUVDesc* desc, int line, int width, int height)
643 const int y_pane_size = height * width;
646 return y_pane_size + (line / 2) * width / 2;
649 return y_pane_size + y_pane_size / 4 + (line / 2) * width / 2;
662 * width - Number of pixel in a line inside the framebuffer.
667 _get_bayer_color(const BayerDesc* desc, const void* buf, int x, int y, int width)
671 return *((const uint8_t*)buf + y * width + x);
674 return *((const int16_t*)buf + y * width + x) & desc->mask;
676 const uint8_t* pixel = (const uint8_t*)buf + (y * width + x) * 2;
689 * width, height - Framebuffer dimensions.
698 int width,
702 return _get_bayer_color(desc, buf, x + 1, y, width);
703 } else if (x == (width - 1)) {
704 return _get_bayer_color(desc, buf, x - 1, y, width);
706 return (_get_bayer_color(desc, buf, x - 1, y, width) +
707 _get_bayer_color(desc, buf, x + 1, y, width)) / 2;
718 * width, height - Framebuffer dimensions.
727 int width,
731 return _get_bayer_color(desc, buf, x, y + 1, width);
733 return _get_bayer_color(desc, buf, x, y - 1, width);
735 return (_get_bayer_color(desc, buf, x, y - 1, width) +
736 _get_bayer_color(desc, buf, x, y + 1, width)) / 2;
747 * width, height - Framebuffer dimensions.
756 int width,
759 if (x > 0 && x < (width - 1) && y > 0 && y < (height - 1)) {
762 return (_get_bayer_color(desc, buf, x - 1, y, width) +
763 _get_bayer_color(desc, buf, x + 1, y, width) +
764 _get_bayer_color(desc, buf, x, y - 1, width) +
765 _get_bayer_color(desc, buf, x, y + 1, width)) / 4;
772 sum += _get_bayer_color(desc, buf, x + 1, y, width);
774 } else if (x == (width - 1)) {
775 sum += _get_bayer_color(desc, buf, x - 1, y, width);
778 sum += _get_bayer_color(desc, buf, x - 1, y, width) +
779 _get_bayer_color(desc, buf, x + 1, y, width);
785 sum += _get_bayer_color(desc, buf, x, y + 1, width);
788 sum += _get_bayer_color(desc, buf, x, y - 1, width);
791 sum += _get_bayer_color(desc, buf, x, y - 1, width) +
792 _get_bayer_color(desc, buf, x, y + 1, width);
807 * width, height - Framebuffer dimensions.
816 int width,
819 if (x > 0 && x < (width - 1) && y > 0 && y < (height - 1)) {
822 return (_get_bayer_color(desc, buf, x - 1, y - 1, width) +
823 _get_bayer_color(desc, buf, x + 1, y - 1, width) +
824 _get_bayer_color(desc, buf, x - 1, y + 1, width) +
825 _get_bayer_color(desc, buf, x + 1, y + 1, width)) / 4;
832 if (xx >= 0 && yy >= 0 && xx < width && yy < height) {
833 sum += _get_bayer_color(desc, buf, xx, yy, width);
864 * width, height - Framebuffer dimensions.
872 int width,
883 *green = _get_bayer_color(desc, buf, x, y, width);
885 *red = _get_bayer_ave_hor(desc, buf, x, y, width, height);
886 *blue = _get_bayer_ave_vert(desc, buf, x, y, width, height);
888 *red = _get_bayer_ave_vert(desc, buf, x, y, width, height);
889 *blue = _get_bayer_ave_hor(desc, buf, x, y, width, height);
893 *red = _get_bayer_color(desc, buf, x, y, width);
894 *green = _get_bayer_ave_cross(desc, buf, x, y, width
895 *blue = _get_bayer_ave_diag(desc, buf, x, y, width, height);
898 *blue = _get_bayer_color(desc, buf, x, y, width);
899 *green = _get_bayer_ave_cross(desc, buf, x, y, width, height);
900 *red = _get_bayer_ave_diag(desc, buf, x, y, width, height);
914 int width,
924 (uint8_t*)yuv + yuv_fmt->u_offset(yuv_fmt, y, width, height);
926 (uint8_t*)yuv + yuv_fmt->v_offset(yuv_fmt, y, width, height);
927 for (x = 0; x < width; x += 2,
946 int width,
951 for (x = 0; x < width; x++) {
968 int width,
978 (const uint8_t*)yuv + yuv_fmt->u_offset(yuv_fmt, y, width, height);
980 (const uint8_t*)yuv + yuv_fmt->v_offset(yuv_fmt, y, width, height);
981 for (x = 0; x < width; x += 2,
1002 int width,
1016 (const uint8_t*)src + src_fmt->u_offset(src_fmt, y, width, height);
1018 (const uint8_t*)src + src_fmt->v_offset(src_fmt, y, width, height);
1020 (uint8_t*)dst + dst_fmt->u_offset(dst_fmt, y, width, height);
1022 (uint8_t*)dst + dst_fmt->v_offset(dst_fmt, y, width, height);
1023 for (x = 0; x < width; x += 2, pYsrc += Y_next_pair_src,
1041 int width,
1046 for (x = 0; x < width; x++) {
1048 _get_bayerRGB(bayer_fmt, bayer, x, y, width, height, &r, &g, &b);
1067 int width,
1077 (uint8_t*)yuv + yuv_fmt->u_offset(yuv_fmt, y, width, height);
1079 (uint8_t*)yuv + yuv_fmt->v_offset(yuv_fmt, y, width, height);
1080 for (x = 0; x < width; x += 2,
1083 _get_bayerRGB(bayer_fmt, bayer, x, y, width, height, &r, &g, &b);
1085 _get_bayerRGB(bayer_fmt, bayer, x + 1, y, width, height, &r, &g, &b);
1484 int width,
1513 frame, framebuffers[n].framebuffer, width, height);
1516 frame, framebuffers[n].framebuffer, width, height);
1526 frame, framebuffers[n].framebuffer, width, height);
1529 frame, framebuffers[n].framebuffer, width, height);
1539 frame, framebuffers[n].framebuffer, width, height);
1542 frame, framebuffers[n].framebuffer, width, height);