return GST_VIDEO_FORMAT_v210;
case GST_MAKE_FOURCC ('v', '2', '1', '6'):
return GST_VIDEO_FORMAT_v216;
+ case GST_MAKE_FOURCC ('N', 'V', '1', '2'):
+ return GST_VIDEO_FORMAT_NV12;
+ case GST_MAKE_FOURCC ('N', 'V', '2', '1'):
+ return GST_VIDEO_FORMAT_NV21;
default:
return GST_VIDEO_FORMAT_UNKNOWN;
}
return GST_MAKE_FOURCC ('v', '2', '1', '0');
case GST_VIDEO_FORMAT_v216:
return GST_MAKE_FOURCC ('v', '2', '1', '6');
+ case GST_VIDEO_FORMAT_NV12:
+ return GST_MAKE_FOURCC ('N', 'V', '1', '2');
+ case GST_VIDEO_FORMAT_NV21:
+ return GST_MAKE_FOURCC ('N', 'V', '2', '1');
default:
return 0;
}
case GST_VIDEO_FORMAT_Y444:
case GST_VIDEO_FORMAT_v210:
case GST_VIDEO_FORMAT_v216:
+ case GST_VIDEO_FORMAT_NV12:
+ case GST_VIDEO_FORMAT_NV21:
return FALSE;
case GST_VIDEO_FORMAT_RGBx:
case GST_VIDEO_FORMAT_BGRx:
case GST_VIDEO_FORMAT_Y444:
case GST_VIDEO_FORMAT_v210:
case GST_VIDEO_FORMAT_v216:
+ case GST_VIDEO_FORMAT_NV12:
+ case GST_VIDEO_FORMAT_NV21:
return TRUE;
case GST_VIDEO_FORMAT_RGBx:
case GST_VIDEO_FORMAT_BGRx:
case GST_VIDEO_FORMAT_Y444:
case GST_VIDEO_FORMAT_v210:
case GST_VIDEO_FORMAT_v216:
+ case GST_VIDEO_FORMAT_NV12:
+ case GST_VIDEO_FORMAT_NV21:
return FALSE;
case GST_VIDEO_FORMAT_AYUV:
case GST_VIDEO_FORMAT_RGBA:
return ((width + 47) / 48) * 128;
case GST_VIDEO_FORMAT_v216:
return GST_ROUND_UP_8 (width * 4);
+ case GST_VIDEO_FORMAT_NV12:
+ case GST_VIDEO_FORMAT_NV21:
+ return GST_ROUND_UP_4 (width);
default:
return 0;
}
} else {
return 8;
}
+ case GST_VIDEO_FORMAT_NV12:
+ case GST_VIDEO_FORMAT_NV21:
+ if (component == 0) {
+ return 1;
+ } else {
+ return 2;
+ }
default:
return 0;
}
case GST_VIDEO_FORMAT_RGB:
case GST_VIDEO_FORMAT_BGR:
case GST_VIDEO_FORMAT_Y444:
+ case GST_VIDEO_FORMAT_NV12:
+ case GST_VIDEO_FORMAT_NV21:
return width;
default:
return 0;
switch (format) {
case GST_VIDEO_FORMAT_I420:
case GST_VIDEO_FORMAT_YV12:
+ case GST_VIDEO_FORMAT_NV12:
+ case GST_VIDEO_FORMAT_NV21:
if (component == 0) {
return height;
} else {
if (component == 2)
return 6;
return 0;
+ case GST_VIDEO_FORMAT_NV12:
+ if (component == 0)
+ return 0;
+ if (component == 1)
+ return GST_ROUND_UP_4 (width) * GST_ROUND_UP_2 (height);
+ if (component == 2)
+ return GST_ROUND_UP_4 (width) * GST_ROUND_UP_2 (height) + 1;
+ case GST_VIDEO_FORMAT_NV21:
+ if (component == 0)
+ return 0;
+ if (component == 1)
+ return GST_ROUND_UP_4 (width) * GST_ROUND_UP_2 (height) + 1;
+ if (component == 2)
+ return GST_ROUND_UP_4 (width) * GST_ROUND_UP_2 (height);
default:
return 0;
}
return ((width + 47) / 48) * 128 * height;
case GST_VIDEO_FORMAT_v216:
return GST_ROUND_UP_8 (width * 4) * height;
+ case GST_VIDEO_FORMAT_NV12:
+ case GST_VIDEO_FORMAT_NV21:
+ return GST_ROUND_UP_4 (width) * GST_ROUND_UP_2 (height) * 3 / 2;
default:
return 0;
}