Lines Matching refs:desc
455 * desc - Descriptor for the YUV frame for which the offset is being calculated.
462 typedef int (*u_offset_func)(const YUVDesc* desc, int line, int width, int height);
467 * desc - Descriptor for the YUV frame for which the offset is being calculated.
474 typedef int (*v_offset_func)(const YUVDesc* desc, int line, int width, int height);
661 _UOffIntrlYUV(const YUVDesc* desc, int line, int width, int height)
666 return line * width * 2 + desc->U_offset;
671 _VOffIntrlYUV(const YUVDesc* desc, int line, int width, int height)
674 return line * width * 2 + desc->V_offset;
679 _UOffIntrlUV(const YUVDesc* desc, int line, int width, int height)
690 return (height + line / 2) * width + desc->U_offset;
695 _VOffIntrlUV(const YUVDesc* desc, int line, int width, int height)
698 return (height + line / 2) * width + desc->V_offset;
703 _UOffSepYUV(const YUVDesc* desc, int line, int width, int height)
719 if (desc->U_offset) {
730 _VOffSepYUV(const YUVDesc* desc, int line, int width, int height)
734 if (desc->V_offset) {
749 * desc - Bayer framebuffer descriptor.
757 _get_bayer_color(const BayerDesc* desc, const void* buf, int x, int y, int width)
759 if (desc->mask == kBayer8) {
764 return *((const int16_t*)buf + y * width + x) & desc->mask;
767 return (((uint16_t)pixel[1] << 8) | pixel[0]) & desc->mask;
775 * desc - Bayer framebuffer descriptor.
784 _get_bayer_ave_hor(const BayerDesc* desc,
792 return _get_bayer_color(desc, buf, x + 1, y, width);
794 return _get_bayer_color(desc, buf, x - 1, y, width);
796 return (_get_bayer_color(desc, buf, x - 1, y, width) +
797 _get_bayer_color(desc, buf, x + 1, y, width)) / 2;
804 * desc - Bayer framebuffer descriptor.
813 _get_bayer_ave_vert(const BayerDesc* desc,
821 return _get_bayer_color(desc, buf, x, y + 1, width);
823 return _get_bayer_color(desc, buf, x, y - 1, width);
825 return (_get_bayer_color(desc, buf, x, y - 1, width) +
826 _get_bayer_color(desc, buf, x, y + 1, width)) / 2;
833 * desc - Bayer framebuffer descriptor.
842 _get_bayer_ave_cross(const BayerDesc* desc,
852 return (_get_bayer_color(desc, buf, x - 1, y, width) +
853 _get_bayer_color(desc, buf, x + 1, y, width) +
854 _get_bayer_color(desc, buf, x, y - 1, width) +
855 _get_bayer_color(desc, buf, x, y + 1, width)) / 4;
862 sum += _get_bayer_color(desc, buf, x + 1, y, width);
865 sum += _get_bayer_color(desc, buf, x - 1, y, width);
868 sum += _get_bayer_color(desc, buf, x - 1, y, width) +
869 _get_bayer_color(desc, buf, x + 1, y, width);
875 sum += _get_bayer_color(desc, buf, x, y + 1, width);
878 sum += _get_bayer_color(desc, buf, x, y - 1, width);
881 sum += _get_bayer_color(desc, buf, x, y - 1, width) +
882 _get_bayer_color(desc, buf, x, y + 1, width);
893 * desc - Bayer framebuffer descriptor.
902 _get_bayer_ave_diag(const BayerDesc* desc,
912 return (_get_bayer_color(desc, buf, x - 1, y - 1, width) +
913 _get_bayer_color(desc, buf, x + 1, y - 1, width) +
914 _get_bayer_color(desc, buf, x - 1, y + 1, width) +
915 _get_bayer_color(desc, buf, x + 1, y + 1, width)) / 4;
923 sum += _get_bayer_color(desc, buf, xx, yy, width);
934 * desc - Bayer framebuffer descriptor.
944 _get_bayer_color_sel(const BayerDesc* desc, int x, int y)
946 return desc->color_order[((y & 1) << 1) | (x & 1)];
951 * desc - Bayer framebuffer descriptor.
958 _get_bayerRGB(const BayerDesc* desc,
968 const char pixel_color = _get_bayer_color_sel(desc, x, y);
972 const char next_pixel_color = _get_bayer_color_sel(desc, x + 1, y);
973 *green = _get_bayer_color(desc, buf, x, y, width);
975 *red = _get_bayer_ave_hor(desc, buf, x, y, width, height);
976 *blue = _get_bayer_ave_vert(desc, buf, x, y, width, height);
978 *red = _get_bayer_ave_vert(desc, buf, x, y, width, height);
979 *blue = _get_bayer_ave_hor(desc, buf, x, y, width, height);
983 *red = _get_bayer_color(desc, buf, x, y, width);
984 *green = _get_bayer_ave_cross(desc, buf, x, y, width, height);
985 *blue = _get_bayer_ave_diag(desc, buf, x, y, width, height);
988 *blue = _get_bayer_color(desc, buf, x, y, width);
989 *green = _get_bayer_ave_cross(desc, buf, x, y, width, height);
990 *red = _get_bayer_ave_diag(desc, buf, x, y, width, height);
1529 } desc;
1535 { V4L2_PIX_FMT_RGB32, PIX_FMT_RGB, .desc.rgb_desc = &_RGB32 },
1536 { V4L2_PIX_FMT_BGR32, PIX_FMT_RGB, .desc.rgb_desc = &_BRG32 },
1537 { V4L2_PIX_FMT_RGB565, PIX_FMT_RGB, .desc.rgb_desc = &_RGB16 },
1538 { V4L2_PIX_FMT_RGB24, PIX_FMT_RGB, .desc.rgb_desc = &_RGB24 },
1539 { V4L2_PIX_FMT_BGR24, PIX_FMT_RGB, .desc.rgb_desc = &_BRG24 },
1542 { V4L2_PIX_FMT_YVU420, PIX_FMT_YUV, .desc.yuv_desc = &_YV12 },
1543 { V4L2_PIX_FMT_YUV420, PIX_FMT_YUV, .desc.yuv_desc = &_YU12 },
1544 { V4L2_PIX_FMT_NV12, PIX_FMT_YUV, .desc.yuv_desc = &_NV12 },
1545 { V4L2_PIX_FMT_NV21, PIX_FMT_YUV, .desc.yuv_desc = &_NV21 },
1548 { V4L2_PIX_FMT_YUYV, PIX_FMT_YUV, .desc.yuv_desc = &_YUYV },
1549 { V4L2_PIX_FMT_YYUV, PIX_FMT_YUV, .desc.yuv_desc = &_YYUV },
1550 { V4L2_PIX_FMT_YVYU, PIX_FMT_YUV, .desc.yuv_desc = &_YVYU },
1551 { V4L2_PIX_FMT_UYVY, PIX_FMT_YUV, .desc.yuv_desc = &_UYVY },
1552 { V4L2_PIX_FMT_VYUY, PIX_FMT_YUV, .desc.yuv_desc = &_VYUY },
1553 { V4L2_PIX_FMT_YVYU, PIX_FMT_YUV, .desc.yuv_desc = &_YVYU },
1554 { V4L2_PIX_FMT_VYUY, PIX_FMT_YUV, .desc.yuv_desc = &_VYUY },
1555 { V4L2_PIX_FMT_YYVU, PIX_FMT_YUV, .desc.yuv_desc = &_YYVU },
1556 { V4L2_PIX_FMT_YUY2, PIX_FMT_YUV, .desc.yuv_desc = &_YUYV },
1557 { V4L2_PIX_FMT_YUNV, PIX_FMT_YUV, .desc.yuv_desc = &_YUYV },
1558 { V4L2_PIX_FMT_V422, PIX_FMT_YUV, .desc.yuv_desc = &_YUYV },
1561 { V4L2_PIX_FMT_SBGGR8, PIX_FMT_BAYER, .desc.bayer_desc = &_BG8 },
1562 { V4L2_PIX_FMT_SGBRG8, PIX_FMT_BAYER, .desc.bayer_desc = &_GB8 },
1563 { V4L2_PIX_FMT_SGRBG8, PIX_FMT_BAYER, .desc.bayer_desc = &_GR8 },
1564 { V4L2_PIX_FMT_SRGGB8, PIX_FMT_BAYER, .desc.bayer_desc = &_RG8 },
1565 { V4L2_PIX_FMT_SBGGR10, PIX_FMT_BAYER, .desc.bayer_desc = &_BG10 },
1566 { V4L2_PIX_FMT_SGBRG10, PIX_FMT_BAYER, .desc.bayer_desc = &_GB10 },
1567 { V4L2_PIX_FMT_SGRBG10, PIX_FMT_BAYER, .desc.bayer_desc = &_GR10 },
1568 { V4L2_PIX_FMT_SRGGB10, PIX_FMT_BAYER, .desc.bayer_desc = &_RG10 },
1569 { V4L2_PIX_FMT_SBGGR12, PIX_FMT_BAYER, .desc.bayer_desc = &_BG12 },
1570 { V4L2_PIX_FMT_SGBRG12, PIX_FMT_BAYER, .desc.bayer_desc = &_GB12 },
1571 { V4L2_PIX_FMT_SGRBG12, PIX_FMT_BAYER, .desc.bayer_desc = &_GR12 },
1572 { V4L2_PIX_FMT_SRGGB12, PIX_FMT_BAYER, .desc.bayer_desc = &_RG12 },
1648 RGBToRGB(src_desc->desc.rgb_desc, dst_desc->desc.rgb_desc,
1652 RGBToYUV(src_desc->desc.rgb_desc, dst_desc->desc.yuv_desc,
1663 YUVToRGB(src_desc->desc.yuv_desc, dst_desc->desc.rgb_desc,
1667 YUVToYUV(src_desc->desc.yuv_desc, dst_desc->desc.yuv_desc,
1678 BAYERToRGB(src_desc->desc.bayer_desc, dst_desc->desc.rgb_desc,
1682 BAYERToYUV(src_desc->desc.bayer_desc, dst_desc->desc.yuv_desc,