1.
Normal shot.
Alps\mediatek\platform\mt6595\hardware\mtkcam\v1\adapter\scenario\shot\normalshot\normalshot.cpp,
bool
Normalshot::
Oncmd_capture ()
{
...
Add the following code
if (getopenid () = = 1 && bflip) {
Switch (mshotparam.mu4transform) {
Case ETRANSFORM_ROT_90:
Mshotparam.mu4transform = Etransform_flip_v | etransform_rot_90;
Break
Case ETRANSFORM_ROT_270:
Mshotparam.mu4transform = Etransform_flip_h | etransform_rot_90;
Break
Case ETRANSFORM_ROT_180:
Mshotparam.mu4transform = Etransform_flip_v;
Break
Default
Mshotparam.mu4transform = Etransform_flip_h;
Break
}
}
Plus code,end.
Shot param
Nscamshot::shotparam Rshotparam (
EIMGFMT_YUY2,//YUV format
Mshotparam.mi4picturewidth,//picutre width
Mshotparam.mi4pictureheight,//picture height
Mshotparam.mu4transform,//picture Transform
EPOSTVIEWFMT,//postview format
Mshotparam.mi4postviewwidth,//postview width
Mshotparam.mi4postviewheight,//postview height
0,//postview Transform
Mshotparam.mu4zoomratio//zoom
);
(2) Face Beauty,
Alps\mediatek\platform\mt6595\hardware\mtkcam\v1\adapter\scenario\shot\fbshot\facebeauty.cpp,
Mbool
Mhal_facebeauty::
CREATEJPEGIMG (Iimagebuffer const * Rsrcimgbufinfo
, Nscamshot::jpegparam const & Rjpgparm
, MUINT32 const U4transform
, Iimagebuffer const * Rjpgimgbufinfo
, MUINT32 & U4jpegsize)
{
...
Will
Pisimager->settransform (U4transform);
Replaced by
if (getopenid () = = 1 && bflip) {
MUINT32 mu4transform = 0;
Switch (u4transform) {
Case ETRANSFORM_ROT_90:
Mu4transform = Etransform_flip_v | etransform_rot_90;
Break
Case ETRANSFORM_ROT_270:
Mu4transform = Etransform_flip_h | etransform_rot_90;
Break
Case ETRANSFORM_ROT_180:
Mu4transform = Etransform_flip_v;
Break
Default
Mu4transform = Etransform_flip_h;
Break
}
Pisimager->settransform (Mu4transform);
}else
Pisimager->settransform (U4transform);
(3) Zsd shot,
Alps\mediatek\platform\mt6595\hardware\mtkcam\v1\adapter\scenario\shot\capbufshot\capbufshot.cpp,
bool
Capbufshot::
Oncmd_capture ()
{
...
Add the following code
if (getopenid () = = 1 && bflip) {
Switch (mshotparam.mu4transform) {
Case ETRANSFORM_ROT_90:
Mshotparam.mu4transform = Etransform_flip_v | etransform_rot_90;
Break
Case ETRANSFORM_ROT_270:
Mshotparam.mu4transform = Etransform_flip_h | etransform_rot_90;
Break
Case ETRANSFORM_ROT_180:
Mshotparam.mu4transform = Etransform_flip_v;
Break
Default
Mshotparam.mu4transform = Etransform_flip_h;
Break
}
}
Plus code,end.
Shot param
Nscamshot::shotparam Rshotparam (
EIMGFMT_YUY2,//YUV format
Mshotparam.mi4picturewidth,//picutre width
Mshotparam.mi4pictureheight,//picture height
Mshotparam.mu4transform,//picture Transform
EPOSTVIEWFMT,//postview format
Mshotparam.mi4postviewwidth,//postview width
Mshotparam.mi4postviewheight,//postview height
0,//postview Transform
Mshotparam.mu4zoomratio//zoom
);
2.
Alps/mediatek/platform/mt6595/hardware/mtkcam/core/
SingleShot.cpp
BurstShot.cpp
MultiShot.cpp
Pass2node.preview.cpp
Pass2node.capture.cpp
Search Etransform_rot_90,
Will
if (XX = = Etransform_rot_90 | |
XX = = etransform_rot_270)
Replaced by
if (XX & etransform_rot_90 | |
XX = = etransform_rot_270)
3.
(1) Alps/mediatek/platform/mt6595/hardware/mtkcam/core/iopipe/simager/imagetransform/imagetransform.cpp
Mbool
Imagetransform::
Converttransform (
MUINT32 Const U4transform,
MUINT32 & U4rotation,
MUINT32 & U4flip
)
{
。。。
Will
#define Transcase (trans, rot, flip) \
Case trans: \
U4rotation = (rot); \
U4flip = (flip); \
Break
Transcase (0, 0, 0)
Transcase (Etransform_flip_h, 180, 1)
Transcase (etransform_flip_v, 0, 1)
Transcase (etransform_rot_90, 90, 0)
Transcase (etransform_rot_180, 180, 0)
Transcase (etransform_rot_270, 270, 0)
Default
My_loge ("Not supported transform (0x%x)", u4transform);
u4rotation = 0;
U4flip = 0;
return mfalse;
Break
#undef transcase
Replaced by
#define Transcase (trans, rot, flip) \
Case trans: \
U4rotation = (rot); \
U4flip = (flip); \
Break
Transcase (0, 0, 0)
Transcase (etransform_flip_h, 0, 1)
Transcase (Etransform_flip_v, 180, 1)
Transcase (etransform_rot_90, 90, 0)
Transcase (etransform_rot_180, 180, 0)
Transcase (Etransform_flip_h|etransform_rot_90, 270, 1)
Transcase (Etransform_flip_v|etransform_rot_90, 90, 1)
Transcase (etransform_rot_270, 270, 0)
Default
My_loge ("Not supported transform (0x%x)", u4transform);
u4rotation = 0;
U4flip = 0;
return mfalse;
Break
#undef transcase
(2) Alps\mediatek\platform\mt6595\hardware\mtkcam\core\iopipe\postproc\halpipewrapper.cpp,
Will
Transformmapping mtransformmapping[transform_max]=
{
{0, nsimageio::nsispio::eimgrot_0, Nsimageio::nsispio::eimgflip_off},
{etransform_flip_h, nsimageio::nsispio::eimgrot_0, nsimageio::nsispio::eimgflip_on},
{etransform_flip_v, nsimageio::nsispio::eimgrot_0, nsimageio::nsispio::eimgflip_on},
{Etransform_rot_180,nsimageio::nsispio::eimgrot_180,nsimageio::nsispio::eimgflip_off},
{etransform_rot_90, nsimageio::nsispio::eimgrot_90, Nsimageio::nsispio::eimgflip_off},
{0, nsimageio::nsispio::eimgrot_0, Nsimageio::nsispio::eimgflip_off},
{0, nsimageio::nsispio::eimgrot_0, Nsimageio::nsispio::eimgflip_off},
{Etransform_rot_270,nsimageio::nsispio::eimgrot_270,nsimageio::nsispio::eimgflip_off}
};
Replaced by
Transformmapping mtransformmapping[transform_max]=
{
{0, nsimageio::nsispio::eimgrot_0, Nsimageio::nsispio::eimgflip_off},
{etransform_flip_h, nsimageio::nsispio::eimgrot_0, nsimageio::nsispio::eimgflip_on},
{etransform_flip_v, nsimageio::nsispio::eimgrot_180, nsimageio::nsispio::eimgflip_on},
{Etransform_rot_180,nsimageio::nsispio::eimgrot_180,nsimageio::nsispio::eimgflip_off},
{etransform_rot_90, nsimageio::nsispio::eimgrot_90, Nsimageio::nsispio::eimgflip_off},
{etransform_flip_h|etransform_rot_90, nsimageio::nsispio::eimgrot_270, nsimageio::nsispio::eimgflip_on},
{etransform_flip_v|etransform_rot_90, nsimageio::nsispio::eimgrot_90, nsimageio::nsispio::eimgflip_on},
{Etransform_rot_270,nsimageio::nsispio::eimgrot_270,nsimageio::nsispio::eimgflip_off}
};
Android KK, pre-camera, for normal, ZSD, facebeauty take pictures, realize mirror