dcam_format_table.h
Upload User: shyika
Upload Date: 2017-11-25
Package Size: 1227k
Code Size: 12k
Category:

Video Capture

Development Platform:

Unix_Linux

  1. /*
  2.     unicap
  3.     Copyright (C) 2004  Arne Caspari
  4.     This program is free software; you can redistribute it and/or modify
  5.     it under the terms of the GNU General Public License as published by
  6.     the Free Software Foundation; either version 2 of the License, or
  7.     (at your option) any later version.
  8.     This program is distributed in the hope that it will be useful,
  9.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.     GNU General Public License for more details.
  12.     You should have received a copy of the GNU General Public License
  13.     along with this program; if not, write to the Free Software
  14.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  15. */
  16. #ifndef __DCAM_FORMAT_TABLE_H__
  17. #define __DCAM_FORMAT_TABLE_H__
  18. #define FOURCC(a,b,c,d) (unsigned int)((((unsigned int)a))+(((unsigned int)b)<<8)+(((unsigned int)c)<<16)+(((unsigned int)d)<<24))
  19. #include "dcam.h"
  20. unicap_format_t _dcam_unicap_formats[] =
  21. {
  22. // format 0
  23. { identifier: "YUV(4:4:4) 160x120",
  24.   size:     { x: 0, y: 0, width:  160, height: 120}, 
  25.   min_size: { x: 0, y: 0, width:  160, height: 120}, 
  26.   max_size: { x: 0, y: 0, width:  160, height: 120}, 
  27.   h_stepping: -1, 
  28.   v_stepping: -1, 
  29.   sizes:      0, 
  30.   size_count: 0, 
  31.   bpp:        24, 
  32.   fourcc:     FOURCC('Y','4','4','4'), 
  33.   flags: 0, 
  34.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  35.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  36.   buffer_size: 160*120*3 },
  37. { identifier: "YUV(4:2:2) 320x240",
  38.   size:     { x: 0, y: 0, width: 320, height: 240}, 
  39.   min_size: { x: 0, y: 0, width: 320, height: 240}, 
  40.   max_size: { x: 0, y: 0, width: 320, height: 240}, 
  41.   h_stepping: -1, 
  42.   v_stepping: -1, 
  43.   sizes:      0, 
  44.   size_count: 0, 
  45.   bpp: 16, 
  46.   fourcc: FOURCC('U','Y','V','Y'), 
  47.   flags: 0, 
  48.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  49.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  50.   buffer_size: 320*240*2 },
  51. { identifier: "YUV(4:1:1) 640x480",
  52.   size:     { x: 0, y: 0, width: 640, height: 480}, 
  53.   min_size: { x: 0, y: 0, width: 640, height: 480}, 
  54.   max_size: { x: 0, y: 0, width: 640, height: 480}, 
  55.   h_stepping: -1, 
  56.   v_stepping: -1, 
  57.   sizes:      0, 
  58.   size_count: 0, 
  59.   bpp: 12, 
  60.   fourcc: FOURCC('Y','4','1','1'), 
  61.   flags: 0, 
  62.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  63.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  64.   buffer_size: 640*480 * 1.5 }, 
  65. { identifier: "YUV(4:2:2) 640x480",
  66.   size: { x: 0, y: 0, width: 640, height: 480}, 
  67.   min_size: { x: 0, y: 0, width: 640, height: 480}, 
  68.   max_size: { x: 0, y: 0, width: 640, height: 480}, 
  69.   h_stepping: -1, 
  70.   v_stepping: -1, 
  71.   sizes:      0, 
  72.   size_count: 0, 
  73.   bpp: 16, 
  74.   fourcc: FOURCC('U','Y','V','Y'), 
  75.   flags: 0, 
  76.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  77.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  78.   buffer_size: 640*480*2 },
  79. { identifier: "RGB 640x480",
  80.   size:     { x: 0, y: 0, width: 640, height: 480}, 
  81.   min_size: { x: 0, y: 0, width: 640, height: 480}, 
  82.   max_size: { x: 0, y: 0, width: 640, height: 480}, 
  83.   h_stepping: -1, 
  84.   v_stepping: -1, 
  85.   sizes:      0, 
  86.   size_count: 0, 
  87.   bpp: 24, 
  88.   fourcc: FOURCC('R','G','B','3'), 
  89.   flags: 0, 
  90.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  91.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  92.   buffer_size: 640*480*3 }, 
  93. { identifier: "Y(Mono) 640x480",
  94.   size:     { x: 0, y: 0, width: 640, height: 480}, 
  95.   min_size: { x: 0, y: 0, width: 640, height: 480}, 
  96.   max_size: { x: 0, y: 0, width: 640, height: 480}, 
  97.   h_stepping: -1, 
  98.   v_stepping: -1, 
  99.   sizes:      0, 
  100.   size_count: 0, 
  101.   bpp: 8, 
  102.   fourcc: FOURCC('Y','8','0','0'), 
  103.   flags: 0, 
  104.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  105.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  106.   buffer_size: 640*480 },
  107. { identifier: "Y(Mono16) 640x480",
  108.   size:     { x: 0, y: 0, width: 640, height: 480}, 
  109.   min_size: { x: 0, y: 0, width: 640, height: 480}, 
  110.   max_size: { x: 0, y: 0, width: 640, height: 480}, 
  111.   h_stepping: -1, 
  112.   v_stepping: -1, 
  113.   sizes:      0, 
  114.   size_count: 0, 
  115.   bpp: 16, 
  116.   fourcc: FOURCC('Y','1','6','0'), 
  117.   flags: 0, 
  118.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  119.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  120.   buffer_size: 640*480*2 }, 
  121. { identifier: "Reserved",
  122.   size:     { x: 0, y: 0, width: 0, height: 0}, 
  123.   min_size: { x: 0, y: 0, width: 0, height: 0}, 
  124.   max_size: { x: 0, y: 0, width: 0, height: 0}, 
  125.   h_stepping: -1, 
  126.   v_stepping: -1, 
  127.   sizes:      0, 
  128.   size_count: 0, 
  129.   bpp: 0, 
  130.   fourcc: FOURCC('R','S','V','D'), 
  131.   flags: 0, 
  132.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  133.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  134.   buffer_size: 0 }, 
  135. // format1
  136. { identifier: "YUV(4:2:2) 800x600",
  137.   size:     { x: 0, y: 0, width: 800, height: 600}, 
  138.   min_size: { x: 0, y: 0, width: 800, height: 600}, 
  139.   max_size: { x: 0, y: 0, width: 800, height: 600}, 
  140.   h_stepping: -1, 
  141.   v_stepping: -1, 
  142.   sizes:      0, 
  143.   size_count: 0, 
  144.   bpp: 16, 
  145.   fourcc: FOURCC('U','Y','V','Y'), 
  146.   flags: 0, 
  147.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  148.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  149.   buffer_size: 800*600*2 },
  150. { identifier: "RGB 800x600", 
  151.   size:     { x: 0, y: 0, width: 800, height: 600}, 
  152.   min_size: { x: 0, y: 0, width: 800, height: 600}, 
  153.   max_size: { x: 0, y: 0, width: 800, height: 600}, 
  154.   h_stepping: -1, 
  155.   v_stepping: -1, 
  156.   sizes:      0, 
  157.   size_count: 0, 
  158.   bpp: 24, 
  159.   fourcc: FOURCC('R','G','B',' '), 
  160.   flags: 0, 
  161.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  162.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  163.   buffer_size: 800*600*3 },
  164. { identifier: "Y(Mono) 800x600",
  165.   size:     { x: 0, y: 0, width: 800, height: 600}, 
  166.   min_size: { x: 0, y: 0, width: 800, height: 600}, 
  167.   max_size: { x: 0, y: 0, width: 800, height: 600}, 
  168.   h_stepping: -1, 
  169.   v_stepping: -1, 
  170.   sizes:      0, 
  171.   size_count: 0, 
  172.   bpp: 8, 
  173.   fourcc: FOURCC('Y','8','0','0'), 
  174.   flags: 0, 
  175.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  176.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  177.   buffer_size: 800*600 },
  178. { identifier: "YUV(4:2:2) 1024x768",
  179.   size:     { x: 0, y: 0, width: 1024, height: 768}, 
  180.   min_size: { x: 0, y: 0, width: 1024, height: 768}, 
  181.   max_size: { x: 0, y: 0, width: 1024, height: 768}, 
  182.   h_stepping: -1, 
  183.   v_stepping: -1, 
  184.   sizes:      0, 
  185.   size_count: 0, 
  186.   bpp: 16, 
  187.   fourcc: FOURCC('U','Y','V','Y'), 
  188.   flags: 0, 
  189.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  190.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  191.   buffer_size: 1024*768*2 }, 
  192. { identifier: "RGB 1024x768",
  193.   size:     { x: 0, y: 0, width: 1024, height: 768},
  194.   min_size: { x: 0, y: 0, width: 1024, height: 768}, 
  195.   max_size: { x: 0, y: 0, width: 1024, height: 768}, 
  196.   h_stepping: -1, 
  197.   v_stepping: -1, 
  198.   sizes:      0, 
  199.   size_count: 0, 
  200.   bpp: 24, 
  201.   fourcc: FOURCC('R','G','B',' '), 
  202.   flags: 0, 
  203.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  204.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  205.   buffer_size: 1024*768*3 },
  206. { identifier: "Y(Mono) 1024x768",
  207.   size:     { x: 0, y: 0, width: 1024, height: 768}, 
  208.   min_size: { x: 0, y: 0, width: 1024, height: 768}, 
  209.   max_size: { x: 0, y: 0, width: 1024, height: 768}, 
  210.   h_stepping: -1, 
  211.   v_stepping: -1, 
  212.   sizes:      0, 
  213.   size_count: 0, 
  214.   bpp: 8, 
  215.   fourcc: FOURCC('Y','8','0','0'), 
  216.   flags: 0, 
  217.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  218.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  219.   buffer_size: 1024*768 },
  220. { identifier: "Y(Mono16) 800x600",
  221.   size:     { x: 0, y: 0, width: 800, height: 600}, 
  222.   min_size: { x: 0, y: 0, width: 800, height: 600}, 
  223.   max_size: { x: 0, y: 0, width: 800, height: 600}, 
  224.   h_stepping: -1, 
  225.   v_stepping: -1, 
  226.   sizes:      0, 
  227.   size_count: 0, 
  228.   bpp: 16, 
  229.   fourcc: FOURCC('Y','1','6','0'), 
  230.   flags: 0, 
  231.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  232.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  233.   buffer_size: 800*600*2 }, 
  234. { identifier: "Y(Mono16) 1024x768",
  235.   size:     { x: 0, y: 0, width: 1024, height: 768}, 
  236.   min_size: { x: 0, y: 0, width: 1024, height: 768}, 
  237.   max_size: { x: 0, y: 0, width: 1024, height: 768}, 
  238.   h_stepping: -1, 
  239.   v_stepping: -1, 
  240.   sizes:      0, 
  241.   size_count: 0, 
  242.   bpp: 16, 
  243.   fourcc: FOURCC('Y','1','6','0'), 
  244.   flags: 0, 
  245.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  246.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  247.   buffer_size: 1024*768*2 },
  248. //format2
  249. { identifier: "YUV(4:2:2) 1280x960",
  250.   size:     { x: 0, y: 0, width: 1280,  height: 960}, 
  251.   min_size: { x: 0, y: 0, width: 1280,  height: 960}, 
  252.   max_size: { x: 0, y: 0, width: 1280,  height: 960}, 
  253.   h_stepping: -1, 
  254.   v_stepping: -1, 
  255.   sizes:      0, 
  256.   size_count: 0, 
  257.   bpp: 16, 
  258.   fourcc: FOURCC('U','Y','V','Y'), 
  259.   flags: 0, 
  260.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  261.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  262.   buffer_size: 1280*960*2 },
  263. { identifier: "RGB 1280x960",
  264.   size:     { x: 0, y: 0, width: 1280,  height: 960}, 
  265.   min_size: { x: 0, y: 0, width: 1280,  height: 960}, 
  266.   max_size: { x: 0, y: 0, width: 1280,  height: 960}, 
  267.   h_stepping: -1, 
  268.   v_stepping: -1, 
  269.   sizes:      0, 
  270.   size_count: 0,
  271.   bpp: 24, 
  272.   fourcc: FOURCC('R','G','B',' '), 
  273.   flags: 0, 
  274.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  275.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  276.   buffer_size: 1280*960*3 },
  277. { identifier: "Y(Mono) 1280x960",
  278.   size:     { x: 0, y: 0, width: 1280,  height: 960}, 
  279.   min_size: { x: 0, y: 0, width: 1280,  height: 960}, 
  280.   max_size: { x: 0, y: 0, width: 1280,  height: 960}, 
  281.   h_stepping: -1, 
  282.   v_stepping: -1, 
  283.   sizes:      0, 
  284.   size_count: 0, 
  285.   bpp: 8, 
  286.   fourcc: FOURCC('Y','8','0','0'), 
  287.   flags: 0, 
  288.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  289.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  290.   buffer_size: 1280*960 }, 
  291. { identifier: "YUV(4:2:2) 1600x1200",
  292.   size:     { x: 0, y: 0, width: 1600, height: 1200}, 
  293.   min_size: { x: 0, y: 0, width: 1600, height: 1200}, 
  294.   max_size: { x: 0, y: 0, width: 1600, height: 1200},
  295.   h_stepping: -1, 
  296.   v_stepping: -1, 
  297.   sizes:      0, 
  298.   size_count: 0, 
  299.   bpp: 16, 
  300.   fourcc: FOURCC('U','Y','V','Y'), 
  301.   flags: 0, 
  302.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  303.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  304.   buffer_size: 1600*1200*2 },
  305. { identifier: "RGB 1600x1200",
  306.   size:     { x: 0, y: 0, width: 1600, height: 1200}, 
  307.   min_size: { x: 0, y: 0, width: 1600, height: 1200}, 
  308.   max_size: { x: 0, y: 0, width: 1600, height: 1200},
  309.   h_stepping: -1, 
  310.   v_stepping: -1, 
  311.   sizes:      0, 
  312.   size_count: 0, 
  313.   bpp: 24, 
  314.   fourcc: FOURCC('R','G','B',' '), 
  315.   flags: 0, 
  316.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  317.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  318.   buffer_size: 1600*1200*3 },
  319. { identifier: "Y(Mono) 1600x1200",
  320.   size:     { x: 0, y: 0, width: 1600, height: 1200}, 
  321.   min_size: { x: 0, y: 0, width: 1600, height: 1200}, 
  322.   max_size: { x: 0, y: 0, width: 1600, height: 1200},
  323.   h_stepping: -1, 
  324.   v_stepping: -1, 
  325.   sizes:      0, 
  326.   size_count: 0, 
  327.   bpp: 8, 
  328.   fourcc: FOURCC('Y','8','0','0'), 
  329.   flags: 0, 
  330.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  331.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  332.   buffer_size: 1600*1200 },
  333. { identifier: "Y(Mono16) 1280x960" ,
  334.   size:     { x: 0, y: 0, width: 1280,  height: 960}, 
  335.   min_size: { x: 0, y: 0, width: 1280,  height: 960}, 
  336.   max_size: { x: 0, y: 0, width: 1280,  height: 960}, 
  337.   bpp: 16, 
  338.   fourcc: FOURCC('Y','1','6','0'), 
  339.   flags: 0, 
  340.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  341.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  342.   buffer_size: 1280*960*2 },
  343. { identifier: "Y(Mono16) 1600x1200",
  344.   size:     { x: 0, y: 0, width: 1600, height: 1200}, 
  345.   min_size: { x: 0, y: 0, width: 1600, height: 1200}, 
  346.   max_size: { x: 0, y: 0, width: 1600, height: 1200}, 
  347.   h_stepping: -1, 
  348.   v_stepping: -1, 
  349.   sizes:      0, 
  350.   size_count: 0, 
  351.   bpp: 16, 
  352.   fourcc: FOURCC('Y','1','6','0'), 
  353.   flags: 0, 
  354.   buffer_types: UNICAP_BUFFER_TYPE_USER | UNICAP_BUFFER_TYPE_SYSTEM, 
  355.   system_buffer_count: DCAM_NUM_DMA_BUFFERS,
  356.   buffer_size: 1600*1200*2 }
  357. };
  358. #endif//__DCAM_FORMAT_TABLE_H__