Discussion:
Video recording at 320x240 with pimg.exe
(too old to reply)
prabha
2007-08-07 04:44:51 UTC
Permalink
Hi,
We are developing our camera driver for Pxa27X, this camera driver
works fine for still capturing and video capturing upto 176x144,
however video captured at 320x240 using pimg.exe when played back is
very slow, it appears frame by frame.

We also developed a sample video capture application to test video
capturing at 320x240, with our application it worked fine and play
back was good.
Can anybody help us how to resolve this problem with pimg.exe.
We are to finish this issue as soon as possile.
your help will be greatly appreciated.


Thanks,
Prabha
Prabu
2007-08-31 10:20:43 UTC
Permalink
Hi Prabha,

We are also doing the same thing as you but we are able to capture the
still as well as video using pimg.exe.But it is possible in only one
resolution format

(i.e)1.Still(480x640)
2.Preview(192x256)
3.Video Capture(192x256)

But we are not able to switch the resolution format for still as well
as video capture pins.These are changes made by me:


My camera supports 2MP(1600x1200) resolution in STILL mode.So for
taking 2MP
picture using microsoft camera application i have given the below
registry
entries.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Pictures\Camera\OEM
\PictureResolution\1]
"Width"=dword:1e0
"Height"=dword:280
"HighQualityFileSize"=dword:de60
"NormalQualityFileSize"=dword:6400
"LowQualityFileSize"=dword:2800
"ItemString"="480x640"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Pictures\Camera\OEM
\PictureResolution\2]
"Width"=dword:00000640
"Height"=dword:000004b0
"HighQualityFileSize"=dword:00034000
"NormalQualityFileSize"=dword:00017600
"LowQualityFileSize"=dword:0000a600
"ItemString"="1600x1200"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Pictures\Camera\OEM
\PictureResolution]
"OptionNum"=dword:2

And also defined the new CS_DATARANGE_VIDEO structure for 2MP

CS_DATARANGE_VIDEO DCAM_StreamMode_UXGA =
{
// CSDATARANGE
{
sizeof (CS_DATARANGE_VIDEO),
0, // Flags
SAMPLESIZE, // SampleSize
0, // Reserved
STATIC_CSDATAFORMAT_TYPE_VIDEO,
0xe436eb7b, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b,
0xa7, 0x70,
STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO
},

TRUE, // BOOL, bFixedSizeSamples (all samples same
size?)
TRUE, // BOOL, bTemporalCompression (all I frames?)
CS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags (CS_VIDEO_DESC_*)
0, // MemoryAllocationFlags (CS_VIDEO_ALLOC_*)

// _CS_VIDEO_STREAM_CONFIG_CAPS
{
STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO,
CS_AnalogVideo_None, // AnalogVideoStandard
DX,DY, // InputSize, (the inherent size of the incoming signal
// with every digitized pixel unique)
DX,DY, // MinCroppingSize, smallest rcSrc cropping rect allowed
DX,DY, // MaxCroppingSize, largest rcSrc cropping rect allowed
1, // CropGranularityX, granularity of cropping size
1, // CropGranularityY
1, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
DX, DY, // MinOutputSize, smallest bitmap stream can produce
DX, DY, // MaxOutputSize, largest bitmap stream can produce
DX, // OutputGranularityX, granularity of output bitmap size
DY, // OutputGranularityY;
0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
FRAMEINTERVAL_15FPS, // MinFrameInterval (10,000,000 /
15.00FPS), 100nS units
FRAMEINTERVAL_7_5FPS, // MaxFrameInterval (10,000,000 /
7.50FPS), 100nS units
BITRATE / 2, // MinBitsPerSecond ( 7.50 FPS);
BITRATE // MaxBitsPerSecond (15.00 FPS);
},

// CS_VIDEOINFOHEADER (default format)
{
0,0,0,0, // RECT rcSource;
0,0,0,0, // RECT rcTarget;
BITRATE, // DWORD dwBitRate;
0L, // DWORD dwBitErrorRate;
REFTIME_15FPS, // REFERENCE_TIME
AvgTimePerFrame. For (15 FPS) use 666666.
{
sizeof (CS_BITMAPINFOHEADER), // DWORD biSize;
DX, // LONG biWidth;
-DY, // LONG biHeight;
-biHeight indicate TopDown for RGB
1, // WORD biPlanes;
DBITCOUNT, // WORD biBitCount;
CS_BI_BITFIELDS | BI_SRCPREROTATE, // DWORD biCompression;
SAMPLESIZE, // DWORD biSizeImage;
0, // LONG biXPelsPerMeter;
0, // LONG biYPelsPerMeter;
0, // DWORD biClrUsed;
0 // DWORD biClrImportant;
},
{
0xF800, // DWORD
dwBitMasks[CS_iMASK_COLORS];
0x07E0,
0x001F
}
}
};

And also during intialization of the driver i have assigned the
pointer of
the structure to the STILL pin.

m_PinVideoFormat[STILL].categoryGUID = PINNAME_VIDEO_STILL;
m_PinVideoFormat[STILL].ulAvailFormats = 2;
m_PinVideoFormat[STILL].pCsDataRangeVideo[0] = &DCAM_StreamMode_1;
m_PinVideoFormat[STILL].pCsDataRangeVideo[1] = &DCAM_StreamMode_UXGA;

But after doing all these things i am not able to open the application
it is
throwing access violation exception.

Since I don't know the location of source code of the microsoft
camera
application, i am not able to debug the issue exactly.

My question is,
Am i missing any other setting needed for the application to support
multiple resolution format?
How to give support for multiple resolution format in the driver?



Please Could you suggest me where i was wrong?


Advanced Thanks,
Prabu Kumar.K
Post by prabha
Hi,
We are developing our camera driver for Pxa27X, this camera driver
works fine for still capturing and video capturing upto 176x144,
however video captured at 320x240 using pimg.exe when played back is
very slow, it appears frame by frame.
We also developed a sample video capture application to test video
capturing at 320x240, with our application it worked fine and play
back was good.
Can anybody help us how to resolve this problem with pimg.exe.
We are to finish this issue as soon as possile.
your help will be greatly appreciated.
Thanks,
Prabha
Loading...