這篇主要紀錄 CTS android.hardware.cts.CameraTest -- testVideoSnapshot  Video snapshot too small! Expected at least 1280 x 720 (0.9216 MP)  Fail 解決方式

如果你遇到以下 fail items
CTS fail item:
android.hardware.cts.CameraTest
-- testParameters
fail
junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:48)
-- testVideoSnapshot
fail
junit.framework.Ass ertionFailedError: Video snapshot too small! Expected at least 1280 x 720 (0.9216 MP) at junit.framework.Assert.fail(Assert.java:50) 

可以嘗試修改檔案
\vendor\qcom\proprietary\mm-camera\mm-camera2\media-controller\mct\pipeline\mct_pipeline.c

修改內容
因目前我的裝置是安裝 5 M的 camera module,某些不支援的解析度必須拿掉,留下 5M 支援的解析度就好。
--

static cam_dimension_t default_preview_sizes[] = {
 
 // { 4096, 2160},// true 4K
 // { 3840, 2160},// 4K
  { 1920, 1080}, //1080p
  { 1280, 960},
  { 1280, 720},  // 720P, reserved
  { 864, 480}, //FWVGA
  { 800, 480},   //  WVGA
  { 768, 432},
  { 720, 480},
  { 640, 480},   // VGA
  { 480, 640},   // VGA portrait
  { 576, 432},
  { 480, 360},   // HVGA
  { 384, 288},
  { 352, 288},   // CIF
  { 320, 240},   // QVGA
  { 240, 320},   // QVGA portrait
  { 240, 160},   // SQVGA
  { 176, 144},   // QCIF
  { 144, 176},    // QCIF portrait
  { 160, 120}
};

static cam_dimension_t default_picture_sizes[] = {

 // { 5248, 3936}, // 20MP
 // { 4608, 3456}, // 16MP
 // { 4160, 3120}, // 13MP
 // { 4000, 3000}, // 12MP
 // { 4096, 2160},// true 4K
 // { 3264, 2448}, // 8MP
  { 2592, 1944}, // 5MP
  { 2048, 1536}, // 3MP QXGA
  { 1920, 1080}, // HD1080
  { 1600, 1200}, // 2MP UXGA
  { 1280, 960},
  { 1280, 768},  // WXGA
  { 1280, 720},  // HD720
  { 1024, 768},  // 1MP XGA
  { 800, 600},   // SVGA
  { 800, 480},   // WVGA
  { 720, 480},   // 480p
  { 640, 480},   // VGA
  { 352, 288},   // CIF
  { 320, 240},   // QVGA
  { 176, 144},    // QCIF
  { 160, 120}
};

static cam_dimension_t default_liveshot_sizes[] = {

 // { 4128, 3096}, //4:3
 // { 4128, 2322}, //16:9
 // { 4000, 3000}, // 12MP
 // { 3264, 2448}, // 8MP
  { 2592, 1944}, // 5MP
  { 2048, 1536}, // 3MP QXGA
  { 1920, 1080}, // HD1080
  { 1600, 1200}, // 2MP UXGA
  { 1280, 960},
  { 1280, 768},  // WXGA
  { 1280, 720},  // HD720
  { 1024, 768},  // 1MP XGA
  { 800, 600},   // SVGA
  { 864, 480},   //FWVGA
  { 800, 480},   // WVGA
  { 720, 480},   // 480p
  { 640, 480},   // VGA
  { 352, 288},   // CIF
  { 320, 240},   // QVGA
  { 176, 144},    // QCIF
  { 160, 120}
};

static  cam_dimension_t default_video_sizes[] = {

 // { 4096, 2160},// true 4K
 // { 3840, 2160},// 4K
  { 1920, 1080},// 1080p
  { 1280, 960},
  { 1280, 720}, // 720p
  { 864, 480}, //FWVGA
  { 800, 480},  // WVGA
  { 720, 480},  // 480p
  { 640, 480},  // VGA
  { 480, 640},  // VGA portrait
  { 480, 360},  // HVGA
  { 352, 288},  // CIF
  { 320, 240},  // QVGA
  { 240, 320},  // QVGA portrait
  { 176, 144},  // QCIF
  { 144, 176},   // QCIF portrait
  { 160, 120}
};
arrow
arrow
    全站熱搜

    CuteParrot 發表在 痞客邦 留言(0) 人氣()