Thanks Jason! It came as a big surprise to me that the G1 uses 411
instead of the emulator's sole 422 format. That is most welcome
information that is not publicly documented anywhere as far as I know,
making it a recipe for misery in camera-based image processing. If you
run my app on the emulator and press key "g" for the green filter (my
default decoding is in grayscale to save CPU time), then you will see
that it shows a color preview where the SDK 1.0 r1's built-in emulator
only shows the Y (grayscale) component. Of course further work is now
needed to also decode the G1's 411 format (my app still assumes 422).
I must conclude that camera support with Android is currently too
immature for serious and sustainable work.

On Nov 3, 6:59 pm, Jason Proctor <[EMAIL PROTECTED]> wrote:
> >It is yuv422sp, which is equivalent to Android's YCbCr_422_SP.
>
> on the G1, Camera claims the preview format is number 16,
> YCbCr_422_SP, but it isn't. it's YCbCr, but in 411 format. hence
> smaller relative frame size than the emulator. it's close to YUV
> 411p, but the colour transform function is different for YUV than it
> is for YCbCr. in YUV the colour portion is absolute, whereas in YCbCr
> it's a correction from green.
>
> (i'm no expert, so feel free to correct any of the above!)
>
> >I've now done both, being forced to because the still image capture
> >was a near guarantee for OutOfMemoryError crashes, but it requires a
> >bit of reverse engineering. The SDK 1.0 r1 emulator only displays the
> >Y part, but the preview data also contains the color information for
> >the moving colored rectangle.
>
> this is interesting because i *think* i'm only getting b&w preview
> data on the emulator *and* the G1.
>
> on the emulator, i get straight-up b&w regardless of whether i add in
> the UV component. which makes sense, because the Y component is
> greyscale.
>
> on the G1, in my yuv411p decoder, if i leave out the CbCr portion, i
> get big time green, which is right. if i put them back in, i get a
> greyscale image, correcting the green. this makes sense, but i'm
> wondering why i'm not getting the colour i'm seeing on the screen.
>
> btw my G1 might be broken. the camera always displays previews in the
> wrong orientation. in portrait, i have to turn my head 90deg to see
> the image upright. in landscape, i can hold the camera in portrait
> and see the image fine. other G1s here don't have this problem...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to