int fourcc = pp_get_surface_fourcc(ctx, dst_surface);
VAStatus vaStatus;
- if (fourcc == VA_FOURCC('N', 'V', '1', '2')) {
+ switch (fourcc) {
+ case VA_FOURCC('N', 'V', '1', '2'):
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
PP_RGBX_LOAD_SAVE_NV12,
NULL);
intel_batchbuffer_flush(pp_context->batch);
- } else {
+ break;
+
+ default:
vaStatus = i965_image_plx_nv12_plx_processing(ctx,
i965_image_pl1_rgbx_processing,
src_surface,
src_rect,
dst_surface,
dst_rect);
+ break;
}
return vaStatus;
int fourcc = pp_get_surface_fourcc(ctx, dst_surface);
VAStatus vaStatus = VA_STATUS_ERROR_UNIMPLEMENTED;
- if (fourcc == VA_FOURCC('N', 'V', '1', '2')) {
+ switch (fourcc) {
+ case VA_FOURCC('N', 'V', '1', '2'):
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
PP_PL3_LOAD_SAVE_N12,
NULL);
intel_batchbuffer_flush(pp_context->batch);
- } else if (fourcc == VA_FOURCC('I', 'M', 'C', '1') ||
- fourcc == VA_FOURCC('I', 'M', 'C', '3') ||
- fourcc == VA_FOURCC('Y', 'V', '1', '2') ||
- fourcc == VA_FOURCC('I', '4', '2', '0')) {
+ break;
+
+ case VA_FOURCC('I', 'M', 'C', '1'):
+ case VA_FOURCC('I', 'M', 'C', '3'):
+ case VA_FOURCC('Y', 'V', '1', '2'):
+ case VA_FOURCC('I', '4', '2', '0'):
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
PP_PL3_LOAD_SAVE_PL3,
NULL);
intel_batchbuffer_flush(pp_context->batch);
- } else if (fourcc == VA_FOURCC('Y', 'U', 'Y', '2') ||
- fourcc == VA_FOURCC('U', 'Y', 'V', 'Y')) {
+ break;
+
+ case VA_FOURCC('Y', 'U', 'Y', '2'):
+ case VA_FOURCC('U', 'Y', 'V', 'Y'):
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
PP_PL3_LOAD_SAVE_PA,
NULL);
intel_batchbuffer_flush(pp_context->batch);
- }
- else {
+ break;
+
+ default:
vaStatus = i965_image_plx_nv12_plx_processing(ctx,
i965_image_pl3_processing,
src_surface,
src_rect,
dst_surface,
dst_rect);
+ break;
}
return vaStatus;
int fourcc = pp_get_surface_fourcc(ctx, dst_surface);
VAStatus vaStatus = VA_STATUS_ERROR_UNIMPLEMENTED;
- if (fourcc == VA_FOURCC('N', 'V', '1', '2')) {
+ switch (fourcc) {
+ case VA_FOURCC('N', 'V', '1', '2'):
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
dst_rect,
PP_NV12_LOAD_SAVE_N12,
NULL);
- } else if (fourcc == VA_FOURCC('I', 'M', 'C', '1') ||
- fourcc == VA_FOURCC('I', 'M', 'C', '3') ||
- fourcc == VA_FOURCC('Y', 'V', '1', '2') ||
- fourcc == VA_FOURCC('I', '4', '2', '0') ) {
+ break;
+
+ case VA_FOURCC('I', 'M', 'C', '1'):
+ case VA_FOURCC('I', 'M', 'C', '3'):
+ case VA_FOURCC('Y', 'V', '1', '2'):
+ case VA_FOURCC('I', '4', '2', '0'):
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
dst_rect,
PP_NV12_LOAD_SAVE_PL3,
NULL);
- } else if (fourcc == VA_FOURCC('Y', 'U', 'Y', '2') ||
- fourcc == VA_FOURCC('U', 'Y', 'V', 'Y')) {
+ break;
+
+ case VA_FOURCC('Y', 'U', 'Y', '2'):
+ case VA_FOURCC('U', 'Y', 'V', 'Y'):
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
dst_surface,
dst_rect,
PP_NV12_LOAD_SAVE_PA,
- NULL);
- } else if (fourcc == VA_FOURCC('B', 'G', 'R', 'X') ||
- fourcc == VA_FOURCC('B', 'G', 'R', 'A') ||
- fourcc == VA_FOURCC('R', 'G', 'B', 'X') ||
- fourcc == VA_FOURCC('R', 'G', 'B', 'A') ) {
+ NULL);
+ break;
+
+ case VA_FOURCC('B', 'G', 'R', 'X'):
+ case VA_FOURCC('B', 'G', 'R', 'A'):
+ case VA_FOURCC('R', 'G', 'B', 'X'):
+ case VA_FOURCC('R', 'G', 'B', 'A'):
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
dst_rect,
PP_NV12_LOAD_SAVE_RGBX,
NULL);
- } else {
+ break;
+
+ default:
return VA_STATUS_ERROR_UNIMPLEMENTED;
}
int fourcc = pp_get_surface_fourcc(ctx, dst_surface);
VAStatus vaStatus;
- if (fourcc == VA_FOURCC('N', 'V', '1', '2')) {
+ switch (fourcc) {
+ case VA_FOURCC('N', 'V', '1', '2'):
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
PP_PA_LOAD_SAVE_NV12,
NULL);
intel_batchbuffer_flush(pp_context->batch);
- } else if (fourcc == VA_FOURCC_YV12) {
+ break;
+
+ case VA_FOURCC('Y', 'V', '1', '2'):
vaStatus = i965_post_processing_internal(ctx, i965->pp_context,
src_surface,
src_rect,
PP_PA_LOAD_SAVE_PL3,
NULL);
intel_batchbuffer_flush(pp_context->batch);
- } else {
+ break;
+
+ default:
vaStatus = i965_image_plx_nv12_plx_processing(ctx,
i965_image_pl1_processing,
src_surface,
src_rect,
dst_surface,
dst_rect);
+ break;
}
return vaStatus;
dst_surface,
dst_rect);
break;
- case VA_FOURCC('Y', 'U', 'Y', '2'):
+ case VA_FOURCC('Y', 'U', 'Y', '2'):
case VA_FOURCC('U', 'Y', 'V', 'Y'):
status = i965_image_pl1_processing(ctx,
src_surface,