buf_pos = data_bo_handle->ptr;
- if (stream->format == MM_PIXEL_FORMAT_ENCODED_H264) {
+ switch (stream->format) {
+ case MM_PIXEL_FORMAT_ENCODED_H264:
+ /* fall through */
+ case MM_PIXEL_FORMAT_ENCODED_MJPEG:
+ /* fall through */
+ case MM_PIXEL_FORMAT_ENCODED_VP8:
+ /* fall through */
+ case MM_PIXEL_FORMAT_ENCODED_VP9:
frame->data.encoded_plane.data = buf_pos;
frame->data.encoded_plane.size = stream->data.encoded.length_data;
frame->data.encoded_plane.is_delta_frame = (bool)stream->data.encoded.is_delta_frame;
total_size = stream->data.encoded.length_data;
- } else if (stream->format == MM_PIXEL_FORMAT_ENCODED_MJPEG) {
- frame->data.encoded_plane.data = buf_pos;
- frame->data.encoded_plane.size = stream->data.encoded.length_data;
- total_size = stream->data.encoded.length_data;
- } else if (stream->format == MM_PIXEL_FORMAT_INVZ) {
+ break;
+
+ case MM_PIXEL_FORMAT_INVZ:
frame->data.depth_plane.data = buf_pos;
frame->data.depth_plane.size = stream->data.depth.length_data;
total_size = stream->data.depth.length_data;
- } else if (stream->format == MM_PIXEL_FORMAT_RGBA ||
- stream->format == MM_PIXEL_FORMAT_ARGB) {
+ break;
+
+ case MM_PIXEL_FORMAT_RGBA:
+ /* fall through */
+ case MM_PIXEL_FORMAT_ARGB:
frame->data.rgb_plane.data = buf_pos;
frame->data.rgb_plane.size = stream->data.rgb.length_data;
total_size = stream->data.rgb.length_data;
- } else {
+ break;
+
+ default:
switch (stream->num_planes) {
case 1:
frame->data.single_plane.yuv = buf_pos;
default:
break;
}
+ break;
}
//LCOV_EXCL_STOP
} else {