I'm currently trying to replace the CameraHardwareStub with my own
CameraHardware which uses the v4l2 interface. Now I can capture jpeg
frames from the camera which will be automatically saved onto the SD
card.
I'm having problems with my preview video. I'm not getting a preview
image on my screen. It seems that Android is using some kind of YUV422
format? At the moment I'm getting my frames in YUYV format. How can I
convert this into the format Android is using for it's preview video?
As I get this right, the memory base that's given with
mPreviewCallback is used for preview video?
On Wed, May 6, 2009 at 7:49 PM, Androidphan <niels.kee...@tass.nl> wrote:
> I'm currently trying to replace the CameraHardwareStub with my own
> CameraHardware which uses the v4l2 interface. Now I can capture jpeg
> frames from the camera which will be automatically saved onto the SD
> card.
> I'm having problems with my preview video. I'm not getting a preview
> image on my screen. It seems that Android is using some kind of YUV422
> format? At the moment I'm getting my frames in YUYV format. How can I
> convert this into the format Android is using for it's preview video?
> As I get this right, the memory base that's given with
> mPreviewCallback is used for preview video?
Hi, Androidphan,
Could you please paste ur CameraHardwareStub.cpp ? We are meeting the exact issue as urs. And we haven't successfully grip our data to be a jpeg file. So , if we can get that from you, it will be very appreciate.
BTW, seems YUYV is a kind of YUV422. We can ge video from camera but the image are not correct. We doubt that the YUYV pattern of our camera is different from android system demanded.
thanks.
> I'm currently trying to replace the CameraHardwareStub with my own
> CameraHardware which uses the v4l2 interface. Now I can capture jpeg
> frames from the camera which will be automatically saved onto the SD
> card.
> I'm having problems with my preview video. I'm not getting a preview
> image on my screen. It seems that Android is using some kind of YUV422
> format? At the moment I'm getting my frames in YUYV format. How can I
> convert this into the format Android is using for it's preview video?
> As I get this right, the memory base that's given with
> mPreviewCallback is used for preview video?
Hi androidphan,
See my attachment for get preview image.(unfortunately, android app seems only takes the Y filed but u and v.So our preview image is single colored)
You should transfer ur raw data YUYV to YYYYUUVV format as our device.cpp write.
<teddy.teddy...@gmail.com> wrote:
> Hi androidphan,
> See my attachment for get preview image.(unfortunately, android app
> seems only takes the Y filed but u and v.So our preview image is single
> colored)
> You should transfer ur raw data YUYV to YYYYUUVV format as our
> device.cpp write.
> Androidphan 写道:
> > I now can get a preview through. But still I would like to know how to
> > convert my frame to yuv422sp? How is it stored in memory?
On Thu, May 7, 2009 at 8:11 PM, Androidphan <niels.kee...@tass.nl> wrote:
> My preview video is now black & white only... Anyone from the
> developers can give a hint on how to convert YUYV to this YUV420/
> YUV422 SP format?
> On May 7, 10:50 am, "teddy.teddy...@gmail.com"
> <teddy.teddy...@gmail.com> wrote:
> > Hi androidphan,
> > See my attachment for get preview image.(unfortunately, android
> app
> > seems only takes the Y filed but u and v.So our preview image is single
> > colored)
> > You should transfer ur raw data YUYV to YYYYUUVV format as our
> > device.cpp write.
> > Androidphan 写道:
> > > I now can get a preview through. But still I would like to know how to
> > > convert my frame to yuv422sp? How is it stored in memory?
> you can see android_build/external/opencore/colorconvert/
> there lot of conersions are available.
> Thanks and Regards,
> HarishKumar.V
> On Thu, May 7, 2009 at 8:11 PM, Androidphan <niels.kee...@tass.nl> wrote:
>> My preview video is now black & white only... Anyone from the
>> developers can give a hint on how to convert YUYV to this YUV420/
>> YUV422 SP format?
>> On May 7, 10:50 am, "teddy.teddy...@gmail.com"
>> <teddy.teddy...@gmail.com> wrote:
>> > Hi androidphan,
>> > See my attachment for get preview image.(unfortunately, android
>> app
>> > seems only takes the Y filed but u and v.So our preview image is single
>> > colored)
>> > You should transfer ur raw data YUYV to YYYYUUVV format as our
>> > device.cpp write.
>> > Androidphan 写道:
>> > > I now can get a preview through. But still I would like to know how to
>> > > convert my frame to yuv422sp? How is it stored in memory?
> you can see
> android_build/external/opencore/codecs_v2/utilities/colorconvert/src/
> there lot of conersions are available.
> Thanks and Regards,
> HarishKumar.V
> 2009/5/8 Harishkumar V <harishpres...@gmail.com>
> > Hi Androidplan,
> > you can see android_build/external/opencore/colorconvert/
> > there lot of conersions are available.
> > Thanks and Regards,
> > HarishKumar.V
> > On Thu, May 7, 2009 at 8:11 PM, Androidphan <niels.kee...@tass.nl> wrote:
> >> My preview video is now black & white only... Anyone from the
> >> developers can give a hint on how to convert YUYV to this YUV420/
> >> YUV422 SP format?
> >> On May 7, 10:50 am, "teddy.teddy...@gmail.com"
> >> <teddy.teddy...@gmail.com> wrote:
> >> > Hi androidphan,
> >> > See my attachment for get preview image.(unfortunately, android
> >> app
> >> > seems only takes the Y filed but u and v.So our preview image is single
> >> > colored)
> >> > You should transfer ur raw data YUYV to YYYYUUVV format as our
> >> > device.cpp write.
> >> > Androidphan 写道:
> >> > > I now can get a preview through. But still I would like to know how to
> >> > > convert my frame to yuv422sp? How is it stored in memory?
> Thanks for the tip, I'll let you know if it worked.
> On May 8, 5:07 am, Harishkumar V <harishpres...@gmail.com> wrote:
> > Hi Androidplan,
> > ignore previous mail.
> > you can see
> > android_build/external/opencore/codecs_v2/utilities/colorconvert/src/
> > there lot of conersions are available.
> > Thanks and Regards,
> > HarishKumar.V
> > 2009/5/8 Harishkumar V <harishpres...@gmail.com>
> > > Hi Androidplan,
> > > you can see android_build/external/opencore/colorconvert/
> > > there lot of conersions are available.
> > > Thanks and Regards,
> > > HarishKumar.V
> > > On Thu, May 7, 2009 at 8:11 PM, Androidphan <niels.kee...@tass.nl>
> wrote:
> > >> My preview video is now black & white only... Anyone from the
> > >> developers can give a hint on how to convert YUYV to this YUV420/
> > >> YUV422 SP format?
> > >> On May 7, 10:50 am, "teddy.teddy...@gmail.com"
> > >> <teddy.teddy...@gmail.com> wrote:
> > >> > Hi androidphan,
> > >> > See my attachment for get preview image.(unfortunately,
> android
> > >> app
> > >> > seems only takes the Y filed but u and v.So our preview image is
> single
> > >> > colored)
> > >> > You should transfer ur raw data YUYV to YYYYUUVV format as
> our
> > >> > device.cpp write.
> > >> > Androidphan 写道:
> > >> > > I now can get a preview through. But still I would like to know
> how to
> > >> > > convert my frame to yuv422sp? How is it stored in memory?
> Thanks for the tip, I'll let you know if it worked.
> On May 8, 5:07 am, Harishkumar V <harishpres...@gmail.com> wrote:
> > Hi Androidplan,
> > ignore previous mail.
> > you can see
> > android_build/external/opencore/codecs_v2/utilities/colorconvert/src/
> > there lot of conersions are available.
> > Thanks and Regards,
> > HarishKumar.V
> > 2009/5/8 Harishkumar V <harishpres...@gmail.com>
> > > Hi Androidplan,
> > > you can see android_build/external/opencore/colorconvert/
> > > there lot of conersions are available.
> > > Thanks and Regards,
> > > HarishKumar.V
> > > On Thu, May 7, 2009 at 8:11 PM, Androidphan <niels.kee...@tass.nl> wrote:
> > >> My preview video is now black & white only... Anyone from the
> > >> developers can give a hint on how to convert YUYV to this YUV420/
> > >> YUV422 SP format?
> > >> On May 7, 10:50 am, "teddy.teddy...@gmail.com"
> > >> <teddy.teddy...@gmail.com> wrote:
> > >> > Hi androidphan,
> > >> > See my attachment for get preview image.(unfortunately, android
> > >> app
> > >> > seems only takes the Y filed but u and v.So our preview image is single
> > >> > colored)
> > >> > You should transfer ur raw data YUYV to YYYYUUVV format as our
> > >> > device.cpp write.
> > >> > Androidphan 写道:
> > >> > > I now can get a preview through. But still I would like to know how to
> > >> > > convert my frame to yuv422sp? How is it stored in memory?
The reason that the preview is only grayscale is that OpenGLES (which
is used by Surface Flinger for scene composition) does not support YUV
input. Instead, Surface Flinger is only passing in the Y component in
GLES as a lumiance texture, which gives you the grayscale preview. In
order to get a full color preview, the preview frames would have to be
converted to RGB, likely RGB565, but this will take more time per
frame, since the YUV->RGB conversion is more complicated.
Steve.
On May 8, 3:08 am, Harishkumar V <harishpres...@gmail.com> wrote:
> > Thanks for the tip, I'll let you know if it worked.
> > On May 8, 5:07 am, Harishkumar V <harishpres...@gmail.com> wrote:
> > > Hi Androidplan,
> > > ignore previous mail.
> > > you can see
> > > android_build/external/opencore/codecs_v2/utilities/colorconvert/src/
> > > there lot of conersions are available.
> > > Thanks and Regards,
> > > HarishKumar.V
> > > 2009/5/8 Harishkumar V <harishpres...@gmail.com>
> > > > Hi Androidplan,
> > > > you can see android_build/external/opencore/colorconvert/
> > > > there lot of conersions are available.
> > > > Thanks and Regards,
> > > > HarishKumar.V
> > > > On Thu, May 7, 2009 at 8:11 PM, Androidphan <niels.kee...@tass.nl>
> > wrote:
> > > >> My preview video is now black & white only... Anyone from the
> > > >> developers can give a hint on how to convert YUYV to this YUV420/
> > > >> YUV422 SP format?
> > > >> On May 7, 10:50 am, "teddy.teddy...@gmail.com"
> > > >> <teddy.teddy...@gmail.com> wrote:
> > > >> > Hi androidphan,
> > > >> > See my attachment for get preview image.(unfortunately,
> > android
> > > >> app
> > > >> > seems only takes the Y filed but u and v.So our preview image is
> > single
> > > >> > colored)
> > > >> > You should transfer ur raw data YUYV to YYYYUUVV format as
> > our
> > > >> > device.cpp write.
> > > >> > Androidphan 写道:
> > > >> > > I now can get a preview through. But still I would like to know
> > how to
> > > >> > > convert my frame to yuv422sp? How is it stored in memory?
> The reason that the preview is only grayscale is that OpenGLES (which
> is used by Surface Flinger for scene composition) does not support YUV
> input. Instead, Surface Flinger is only passing in the Y component in
> GLES as a lumiance texture, which gives you the grayscale preview. In
> order to get a full color preview, the preview frames would have to be
> converted to RGB, likely RGB565, but this will take more time per
> frame, since the YUV->RGB conversion is more complicated.
> Steve.
> On May 8, 3:08 am, Harishkumar V <harishpres...@gmail.com> wrote:
> > Hi,
> > i tried to compile libcameraservice.tgz, but its failing.
> > Am i need to modify other files. if so, what are the files.
> > > > > On Thu, May 7, 2009 at 8:11 PM, Androidphan <niels.kee...@tass.nl>
> > > wrote:
> > > > >> My preview video is now black & white only... Anyone from the
> > > > >> developers can give a hint on how to convert YUYV to this YUV420/
> > > > >> YUV422 SP format?
> > > > >> On May 7, 10:50 am, "teddy.teddy...@gmail.com"
> > > > >> <teddy.teddy...@gmail.com> wrote:
> > > > >> > Hi androidphan,
> > > > >> > See my attachment for get preview image.(unfortunately,
> > > android
> > > > >> app
> > > > >> > seems only takes the Y filed but u and v.So our preview image is
> > > single
> > > > >> > colored)
> > > > >> > You should transfer ur raw data YUYV to YYYYUUVV format as
> > > our
> > > > >> > device.cpp write.
> > > > >> > Androidphan 写道:
> > > > >> > > I now can get a preview through. But still I would like to know
> > > how to
> > > > >> > > convert my frame to yuv422sp? How is it stored in memory?
I'm not sure what you are doing: the Android emulator code for
previewing for instance simply ignores all color data and displays
only the Y component, i.e., the first width * height bytes out of the
2 * width * height bytes in the YUV422 data[] in the preview callback.
The G1 hardware code on the other hand does show the color preview,
but uses a quite different (YUV420) encoding with 3/2 * width * height
bytes per preview frame.
On May 13, 11:43 am, Androidphan <niels.kee...@tass.nl> wrote:
> I'm not sure what you are doing: the Android emulator code for
> previewing for instance simply ignores all color data and displays
> only the Y component, i.e., the first width * height bytes out of the
> 2 * width * height bytes in the YUV422 data[] in the preview callback.
> The G1 hardware code on the other hand does show the color preview,
> but uses a quite different (YUV420) encoding with 3/2 * width * height
> bytes per preview frame.
> On May 13, 11:43 am, Androidphan <niels.kee...@tass.nl> wrote:
> > Thanks for the reply. But I already converted my yuyv frame into
> > yuv420sp yuv422sp yuv422, rgb 565, no luck at all.
> > On May 12, 3:44 pm, blindfold <seeingwithso...@gmail.com> wrote:
Don't know why the Android team dropped color preview from the
emulator with recent SDKs. Color preview was still present and fully
functional in the SDK M5 RC15 emulator, but then it stopped working as
of SDK 0.9 beta even though the color info is still in the preview
callback data[] with the moving checkerboard. See my issue 822
http://code.google.com/p/android/issues/detail?id=822
I think you will have to write/adapt your own camera preview branch to
get color, either by fixing the emulator code or by adapting the G1
hardware code (or better still, submit a patch such that everybody
will benefit).
On May 13, 3:00 pm, Androidphan <niels.kee...@tass.nl> wrote:
> I'm porting Android to a x86 netbook. But why is color ignored? Can't
> I get this working?
> On May 13, 2:31 pm, blindfold <seeingwithso...@gmail.com> wrote:
> > I'm not sure what you are doing: the Android emulator code for
> > previewing for instance simply ignores all color data and displays
> > only the Y component, i.e., the first width * height bytes out of the
> > 2 * width * height bytes in the YUV422 data[] in the preview callback.
> > The G1 hardware code on the other hand does show the color preview,
> > but uses a quite different (YUV420) encoding with 3/2 * width * height
> > bytes per preview frame.
> > On May 13, 11:43 am, Androidphan <niels.kee...@tass.nl> wrote:
> > > Thanks for the reply. But I already converted my yuyv frame into
> > > yuv420sp yuv422sp yuv422, rgb 565, no luck at all.
> > > On May 12, 3:44 pm, blindfold <seeingwithso...@gmail.com> wrote:
If you are producing RGB565 frames in your CameraHardwareInterface
implementation, then you will likely need to make a format change in
the "framework/base/camera/libcameraservice/CameraService.cpp" file.
Specifically, in the "startPreview" function, the preview frame format
is hardcoded to "YCbCr_420_SP", as in:
You will need to change this hardcoded value to match the pixel format
of the frames you are producing. I think in there are only a couple
of supported format choices. I believe "RGB_565" is supported. Give
it a try.
Steve.
On May 13, 8:21 am, blindfold <seeingwithso...@gmail.com> wrote:
> Don't know why the Android team dropped color preview from the
> emulator with recent SDKs. Color preview was still present and fully
> functional in the SDK M5 RC15 emulator, but then it stopped working as
> of SDK 0.9 beta even though the color info is still in the preview
> callback data[] with the moving checkerboard. See my issue 822http://code.google.com/p/android/issues/detail?id=822
> I think you will have to write/adapt your own camera preview branch to
> get color, either by fixing the emulator code or by adapting the G1
> hardware code (or better still, submit a patch such that everybody
> will benefit).
> On May 13, 3:00 pm, Androidphan <niels.kee...@tass.nl> wrote:
> > I'm porting Android to a x86 netbook. But why is color ignored? Can't
> > I get this working?
> > On May 13, 2:31 pm, blindfold <seeingwithso...@gmail.com> wrote:
> > > I'm not sure what you are doing: the Android emulator code for
> > > previewing for instance simply ignores all color data and displays
> > > only the Y component, i.e., the first width * height bytes out of the
> > > 2 * width * height bytes in the YUV422 data[] in the preview callback.
> > > The G1 hardware code on the other hand does show the color preview,
> > > but uses a quite different (YUV420) encoding with 3/2 * width * height
> > > bytes per preview frame.
> > > On May 13, 11:43 am, Androidphan <niels.kee...@tass.nl> wrote:
> > > > Thanks for the reply. But I already converted my yuyv frame into
> > > > yuv420sp yuv422sp yuv422, rgb 565, no luck at all.
> > > > On May 12, 3:44 pm, blindfold <seeingwithso...@gmail.com> wrote:
> If you are producing RGB565 frames in your CameraHardwareInterface
> implementation, then you will likely need to make a format change in
> the "framework/base/camera/libcameraservice/CameraService.cpp" file.
> Specifically, in the "startPreview" function, the preview frame format
> is hardcoded to "YCbCr_420_SP", as in:
> You will need to change this hardcoded value to match the pixel format
> of the frames you are producing. I think in there are only a couple
> of supported format choices. I believe "RGB_565" is supported. Give
> it a try.
> Steve.
> On May 13, 8:21 am, blindfold <seeingwithso...@gmail.com> wrote:
> > Don't know why the Android team dropped color preview from the
> > emulator with recent SDKs. Color preview was still present and fully
> > functional in the SDK M5 RC15 emulator, but then it stopped working as
> > of SDK 0.9 beta even though the color info is still in the preview
> > callback data[] with the moving checkerboard. See my issue 822http://code.google.com/p/android/issues/detail?id=822
> > I think you will have to write/adapt your own camera preview branch to
> > get color, either by fixing the emulator code or by adapting the G1
> > hardware code (or better still, submit a patch such that everybody
> > will benefit).
> > On May 13, 3:00 pm, Androidphan <niels.kee...@tass.nl> wrote:
> > > I'm porting Android to a x86 netbook. But why is color ignored? Can't
> > > I get this working?
> > > On May 13, 2:31 pm, blindfold <seeingwithso...@gmail.com> wrote:
> > > > I'm not sure what you are doing: the Android emulator code for
> > > > previewing for instance simply ignores all color data and displays
> > > > only the Y component, i.e., the first width * height bytes out of the
> > > > 2 * width * height bytes in the YUV422 data[] in the preview callback.
> > > > The G1 hardware code on the other hand does show the color preview,
> > > > but uses a quite different (YUV420) encoding with 3/2 * width * height
> > > > bytes per preview frame.
> > > > On May 13, 11:43 am, Androidphan <niels.kee...@tass.nl> wrote:
> > > > > Thanks for the reply. But I already converted my yuyv frame into
> > > > > yuv420sp yuv422sp yuv422, rgb 565, no luck at all.
> > > > > On May 12, 3:44 pm, blindfold <seeingwithso...@gmail.com> wrote:
On Wed, Jun 17, 2009 at 1:46 PM, Androidphan <niels.kee...@tass.nl> wrote:
> A bit late, but that solved it.
> I converted my YUYV to rgb 565 and it worked.
> On May 13, 5:11 pm, Steve Fischer <steve2...@gmail.com> wrote:
> > If you are producing RGB565 frames in your CameraHardwareInterface
> > implementation, then you will likely need to make a format change in
> > the "framework/base/camera/libcameraservice/CameraService.cpp" file.
> > Specifically, in the "startPreview" function, the preview frame format
> > is hardcoded to "YCbCr_420_SP", as in:
> > You will need to change this hardcoded value to match the pixel format
> > of the frames you are producing. I think in there are only a couple
> > of supported format choices. I believe "RGB_565" is supported. Give
> > it a try.
> > Steve.
> > On May 13, 8:21 am, blindfold <seeingwithso...@gmail.com> wrote:
> > > Don't know why the Android team dropped color preview from the
> > > emulator with recent SDKs. Color preview was still present and fully
> > > functional in the SDK M5 RC15 emulator, but then it stopped working as
> > > of SDK 0.9 beta even though the color info is still in the preview
> > > callback data[] with the moving checkerboard. See my issue 822
> http://code.google.com/p/android/issues/detail?id=822
> > > I think you will have to write/adapt your own camera preview branch to
> > > get color, either by fixing the emulator code or by adapting the G1
> > > hardware code (or better still, submit a patch such that everybody
> > > will benefit).
> > > On May 13, 3:00 pm, Androidphan <niels.kee...@tass.nl> wrote:
> > > > I'm porting Android to a x86 netbook. But why is color ignored? Can't
> > > > I get this working?
> > > > On May 13, 2:31 pm, blindfold <seeingwithso...@gmail.com> wrote:
> > > > > I'm not sure what you are doing: the Android emulator code for
> > > > > previewing for instance simply ignores all color data and displays
> > > > > only the Y component, i.e., the first width * height bytes out of
> the
> > > > > 2 * width * height bytes in the YUV422 data[] in the preview
> callback.
> > > > > The G1 hardware code on the other hand does show the color preview,
> > > > > but uses a quite different (YUV420) encoding with 3/2 * width *
> height
> > > > > bytes per preview frame.
> > > > > On May 13, 11:43 am, Androidphan <niels.kee...@tass.nl> wrote:
> > > > > > Thanks for the reply. But I already converted my yuyv frame into
> > > > > > yuv420sp yuv422sp yuv422, rgb 565, no luck at all.
> > > > > > On May 12, 3:44 pm, blindfold <seeingwithso...@gmail.com> wrote:
> Can u update the latest source and share or attach it.
> Thanks and Regards,
> HarishKumar.V
> On Wed, Jun 17, 2009 at 1:46 PM, Androidphan <niels.kee...@tass.nl> wrote:
> > A bit late, but that solved it.
> > I converted my YUYV to rgb 565 and it worked.
> > On May 13, 5:11 pm, Steve Fischer <steve2...@gmail.com> wrote:
> > > If you are producing RGB565 frames in your CameraHardwareInterface
> > > implementation, then you will likely need to make a format change in
> > > the "framework/base/camera/libcameraservice/CameraService.cpp" file.
> > > Specifically, in the "startPreview" function, the preview frame format
> > > is hardcoded to "YCbCr_420_SP", as in:
> > > You will need to change this hardcoded value to match the pixel format
> > > of the frames you are producing. I think in there are only a couple
> > > of supported format choices. I believe "RGB_565" is supported. Give
> > > it a try.
> > > Steve.
> > > On May 13, 8:21 am, blindfold <seeingwithso...@gmail.com> wrote:
> > > > Don't know why the Android team dropped color preview from the
> > > > emulator with recent SDKs. Color preview was still present and fully
> > > > functional in the SDK M5 RC15 emulator, but then it stopped working as
> > > > of SDK 0.9 beta even though the color info is still in the preview
> > > > callback data[] with the moving checkerboard. See my issue 822
> >http://code.google.com/p/android/issues/detail?id=822
> > > > I think you will have to write/adapt your own camera preview branch to
> > > > get color, either by fixing the emulator code or by adapting the G1
> > > > hardware code (or better still, submit a patch such that everybody
> > > > will benefit).
> > > > On May 13, 3:00 pm, Androidphan <niels.kee...@tass.nl> wrote:
> > > > > I'm porting Android to a x86 netbook. But why is color ignored? Can't
> > > > > I get this working?
> > > > > On May 13, 2:31 pm, blindfold <seeingwithso...@gmail.com> wrote:
> > > > > > I'm not sure what you are doing: the Android emulator code for
> > > > > > previewing for instance simply ignores all color data and displays
> > > > > > only the Y component, i.e., the first width * height bytes out of
> > the
> > > > > > 2 * width * height bytes in the YUV422 data[] in the preview
> > callback.
> > > > > > The G1 hardware code on the other hand does show the color preview,
> > > > > > but uses a quite different (YUV420) encoding with 3/2 * width *
> > height
> > > > > > bytes per preview frame.
> > > > > > On May 13, 11:43 am, Androidphan <niels.kee...@tass.nl> wrote:
> > > > > > > Thanks for the reply. But I already converted my yuyv frame into
> > > > > > > yuv420sp yuv422sp yuv422, rgb 565, no luck at all.
> > > > > > > On May 12, 3:44 pm, blindfold <seeingwithso...@gmail.com> wrote:
> Can u update the latest source and share or attach it.
> Thanks and Regards,
> HarishKumar.V
> On Wed, Jun 17, 2009 at 1:46 PM, Androidphan <niels.kee...@tass.nl> wrote:
> > A bit late, but that solved it.
> > I converted my YUYV to rgb 565 and it worked.
> > On May 13, 5:11 pm, Steve Fischer <steve2...@gmail.com> wrote:
> > > If you are producing RGB565 frames in your CameraHardwareInterface
> > > implementation, then you will likely need to make a format change in
> > > the "framework/base/camera/libcameraservice/CameraService.cpp" file.
> > > Specifically, in the "startPreview" function, the preview frame format
> > > is hardcoded to "YCbCr_420_SP", as in:
> > > You will need to change this hardcoded value to match the pixel format
> > > of the frames you are producing. I think in there are only a couple
> > > of supported format choices. I believe "RGB_565" is supported. Give
> > > it a try.
> > > Steve.
> > > On May 13, 8:21 am, blindfold <seeingwithso...@gmail.com> wrote:
> > > > Don't know why the Android team dropped color preview from the
> > > > emulator with recent SDKs. Color preview was still present and fully
> > > > functional in the SDK M5 RC15 emulator, but then it stopped working as
> > > > of SDK 0.9 beta even though the color info is still in the preview
> > > > callback data[] with the moving checkerboard. See my issue 822
> >http://code.google.com/p/android/issues/detail?id=822
> > > > I think you will have to write/adapt your own camera preview branch to
> > > > get color, either by fixing the emulator code or by adapting the G1
> > > > hardware code (or better still, submit a patch such that everybody
> > > > will benefit).
> > > > On May 13, 3:00 pm, Androidphan <niels.kee...@tass.nl> wrote:
> > > > > I'm porting Android to a x86 netbook. But why is color ignored? Can't
> > > > > I get this working?
> > > > > On May 13, 2:31 pm, blindfold <seeingwithso...@gmail.com> wrote:
> > > > > > I'm not sure what you are doing: the Android emulator code for
> > > > > > previewing for instance simply ignores all color data and displays
> > > > > > only the Y component, i.e., the first width * height bytes out of
> > the
> > > > > > 2 * width * height bytes in the YUV422 data[] in the preview
> > callback.
> > > > > > The G1 hardware code on the other hand does show the color preview,
> > > > > > but uses a quite different (YUV420) encoding with 3/2 * width *
> > height
> > > > > > bytes per preview frame.
> > > > > > On May 13, 11:43 am, Androidphan <niels.kee...@tass.nl> wrote:
> > > > > > > Thanks for the reply. But I already converted my yuyv frame into
> > > > > > > yuv420sp yuv422sp yuv422, rgb 565, no luck at all.
> > > > > > > On May 12, 3:44 pm, blindfold <seeingwithso...@gmail.com> wrote:
I downloaded and during compiling its showing errors,arget thumb C++:
libcamera <= frameworks/base/camera/libcameraservice/CameraHardware.cpp
In file included from
frameworks/base/camera/libcameraservice/CameraHardware.cpp:21:
frameworks/base/camera/libcameraservice/CameraHardware.h:28:21: error:
jpeglib.h: No such file or directory
In file included from
frameworks/base/camera/libcameraservice/CameraHardware.cpp:21:
frameworks/base/camera/libcameraservice/CameraHardware.h:42: error:
'recording_callback' has not been declared
frameworks/base/camera/libcameraservice/CameraHardware.cpp:162: error:
'android::status_t android::CameraHardware::startRecording' is not a static
member of 'class android::CameraHardware'
frameworks/base/camera/libcameraservice/CameraHardware.cpp:162: error:
'recording_callback' was not declared in this scope
frameworks/base/camera/libcameraservice/CameraHardware.cpp:162: error:
expected primary-expression before 'void'
frameworks/base/camera/libcameraservice/CameraHardware.cpp:162: error:
initializer expression list treated as compound expression
frameworks/base/camera/libcameraservice/CameraHardware.cpp:163: error:
expected ',' or ';' before '{' token
make: ***
[out/target/product/beagle/obj/SHARED_LIBRARIES/libcamera_intermediates/Cam eraHardware.o]
Error 1
On Tue, Jun 23, 2009 at 4:16 PM, Androidphan <niels.kee...@tass.nl> wrote:
> Was it useful?
> On Jun 21, 3:45 pm, Harishkumar V <harishpres...@gmail.com> wrote:
> > Hi AndroidPlan,
> > Can u update the latest source and share or attach it.
> > Thanks and Regards,
> > HarishKumar.V
> > On Wed, Jun 17, 2009 at 1:46 PM, Androidphan <niels.kee...@tass.nl>
> wrote:
> > > A bit late, but that solved it.
> > > I converted my YUYV to rgb 565 and it worked.
> > > On May 13, 5:11 pm, Steve Fischer <steve2...@gmail.com> wrote:
> > > > If you are producing RGB565 frames in your CameraHardwareInterface
> > > > implementation, then you will likely need to make a format change in
> > > > the "framework/base/camera/libcameraservice/CameraService.cpp" file.
> > > > Specifically, in the "startPreview" function, the preview frame
> format
> > > > is hardcoded to "YCbCr_420_SP", as in:
> > > > You will need to change this hardcoded value to match the pixel
> format
> > > > of the frames you are producing. I think in there are only a couple
> > > > of supported format choices. I believe "RGB_565" is supported. Give
> > > > it a try.
> > > > Steve.
> > > > On May 13, 8:21 am, blindfold <seeingwithso...@gmail.com> wrote:
> > > > > Don't know why the Android team dropped color preview from the
> > > > > emulator with recent SDKs. Color preview was still present and
> fully
> > > > > functional in the SDK M5 RC15 emulator, but then it stopped working
> as
> > > > > of SDK 0.9 beta even though the color info is still in the preview
> > > > > callback data[] with the moving checkerboard. See my issue 822
> > >http://code.google.com/p/android/issues/detail?id=822
> > > > > I think you will have to write/adapt your own camera preview branch
> to
> > > > > get color, either by fixing the emulator code or by adapting the G1
> > > > > hardware code (or better still, submit a patch such that everybody
> > > > > will benefit).
> > > > > On May 13, 3:00 pm, Androidphan <niels.kee...@tass.nl> wrote:
> > > > > > I'm porting Android to a x86 netbook. But why is color ignored?
> Can't
> > > > > > I get this working?
> > > > > > On May 13, 2:31 pm, blindfold <seeingwithso...@gmail.com> wrote:
> > > > > > > I'm not sure what you are doing: the Android emulator code for
> > > > > > > previewing for instance simply ignores all color data and
> displays
> > > > > > > only the Y component, i.e., the first width * height bytes out
> of
> > > the
> > > > > > > 2 * width * height bytes in the YUV422 data[] in the preview
> > > callback.
> > > > > > > The G1 hardware code on the other hand does show the color
> preview,
> > > > > > > but uses a quite different (YUV420) encoding with 3/2 * width *
> > > height
> > > > > > > bytes per preview frame.
> > > > > > > On May 13, 11:43 am, Androidphan <niels.kee...@tass.nl> wrote:
> > > > > > > > Thanks for the reply. But I already converted my yuyv frame
> into
> > > > > > > > yuv420sp yuv422sp yuv422, rgb 565, no luck at all.
> > > > > > > > On May 12, 3:44 pm, blindfold <seeingwithso...@gmail.com>
> wrote: