: --
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Many things in Java, especially graphics operations, are implemented
mainly by native code. I've traced 2D graphics calls all the way down
to very specific JNI calls for particular transformations or bitblit or
whatever. So, there's often little point in writing your own native
code to implement something that the libraries already do since often
they are well optimized. If you want to do something not already
included, then it can make sense to go native.
sdw
On Sun Dec 18 21:27:02 2011, s.rawat wrote:
> Hi Stephen, thanks for the reply,
> Can you Plz elaborate the "methods" and "this" in your last sentence --> "There are *fast built-in methods* to do *this* well,
A) I'd already answered essentially the same thing, but doesn't hurt to
say it again in a different way.
B) You mean the message that you cross-posted?
Date: Mon, 19 Dec 2011 06:49:21 -0800 (PST)
From: Streets Of Boston <flying...@gmail.com>
Reply-To: andro...@googlegroups.com
To: android-d...@googlegroups.com
Cc: andro...@googlegroups.com, android...@googlegroups.com
Message-ID:
<23786539.1588.1324306161440.JavaMail.geo-discussion-forums@vbxw7>
In-Reply-To:
<CALwa49tNdJaeu0-ef4PvfMSdwfHX6gkoud8DLj4r7A+WNVw9=w...@mail.gmail.com>
References:
<CALwa49tNdJaeu0-ef4PvfMSdwfHX6gkoud8DLj4r7A+WNVw9=w...@mail.gmail.com>
Subject: Re: SENDING YUV-TO-JPEG CONVERTED BUFFER AS A BITMAP from JNI
to
Android code...plzzz help...Not a Noob , Am i??
Problems in 'fill_plasma':
1. The raw data of the *pxl*-array can not contain JPEG encoded
data.
Instead it must be encoded as RGB_565, each 2 bytes having 5 bits of
red, 6
bits of green and 5 bits of blue.
2. You can not assign the bitmap's raw-data array address (*pxl*) to
your compressed buffer-address. Instead, you'll have to copy each
individual pixel from '*buf*' into '*pxl*'. Use a for-loop and copy
each
byte from the *buf*-array into *pxl*-array.
;-)
sdw