qtdemux: support uncompressed mono with component interleave
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8464>
This commit is contained in:
parent
6d849f5ee1
commit
c7367addb5
@ -12201,10 +12201,9 @@ qtdemux_get_format_from_uncv (GstQTDemux * qtdemux,
|
|||||||
|
|
||||||
|
|
||||||
switch (uncC->interleave_type) {
|
switch (uncC->interleave_type) {
|
||||||
case 1: // Pixel Interleaved
|
|
||||||
// Default Format
|
|
||||||
break;
|
|
||||||
case 0: // Component Interleaving (Planar)
|
case 0: // Component Interleaving (Planar)
|
||||||
|
case 1: // Pixel Interleaved
|
||||||
|
break;
|
||||||
case 2: // Mixed Interleaved
|
case 2: // Mixed Interleaved
|
||||||
case 3: // Row Interleaved
|
case 3: // Row Interleaved
|
||||||
case 4: // Tile Interleaved
|
case 4: // Tile Interleaved
|
||||||
@ -12213,7 +12212,6 @@ qtdemux_get_format_from_uncv (GstQTDemux * qtdemux,
|
|||||||
goto unsupported_feature;
|
goto unsupported_feature;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Padding */
|
/* Padding */
|
||||||
// TODO: Handle various padding configurations
|
// TODO: Handle various padding configurations
|
||||||
if (align_size) {
|
if (align_size) {
|
||||||
@ -12240,18 +12238,19 @@ qtdemux_get_format_from_uncv (GstQTDemux * qtdemux,
|
|||||||
switch (num_components) {
|
switch (num_components) {
|
||||||
case 1:
|
case 1:
|
||||||
if (cmpd->types[0] == COMPONENT_MONOCHROME) {
|
if (cmpd->types[0] == COMPONENT_MONOCHROME) {
|
||||||
|
// Single channel, we can handle this in any interleave
|
||||||
format = GST_VIDEO_FORMAT_GRAY8;
|
format = GST_VIDEO_FORMAT_GRAY8;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (cmpd->types[0] == COMPONENT_RED &&
|
if (cmpd->types[0] == COMPONENT_RED &&
|
||||||
cmpd->types[1] == COMPONENT_GREEN &&
|
cmpd->types[1] == COMPONENT_GREEN &&
|
||||||
cmpd->types[2] == COMPONENT_BLUE) {
|
cmpd->types[2] == COMPONENT_BLUE && uncC->interleave_type == 1) {
|
||||||
format = GST_VIDEO_FORMAT_RGB;
|
format = GST_VIDEO_FORMAT_RGB;
|
||||||
}
|
}
|
||||||
if (cmpd->types[0] == COMPONENT_BLUE &&
|
if (cmpd->types[0] == COMPONENT_BLUE &&
|
||||||
cmpd->types[1] == COMPONENT_GREEN &&
|
cmpd->types[1] == COMPONENT_GREEN &&
|
||||||
cmpd->types[2] == COMPONENT_RED) {
|
cmpd->types[2] == COMPONENT_RED && uncC->interleave_type == 1) {
|
||||||
format = GST_VIDEO_FORMAT_BGR;
|
format = GST_VIDEO_FORMAT_BGR;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -12259,13 +12258,13 @@ qtdemux_get_format_from_uncv (GstQTDemux * qtdemux,
|
|||||||
if (cmpd->types[0] == COMPONENT_RED &&
|
if (cmpd->types[0] == COMPONENT_RED &&
|
||||||
cmpd->types[1] == COMPONENT_GREEN &&
|
cmpd->types[1] == COMPONENT_GREEN &&
|
||||||
cmpd->types[2] == COMPONENT_BLUE &&
|
cmpd->types[2] == COMPONENT_BLUE &&
|
||||||
cmpd->types[3] == COMPONENT_ALPHA) {
|
cmpd->types[3] == COMPONENT_ALPHA && uncC->interleave_type == 1) {
|
||||||
format = GST_VIDEO_FORMAT_RGBA;
|
format = GST_VIDEO_FORMAT_RGBA;
|
||||||
}
|
}
|
||||||
if (cmpd->types[0] == COMPONENT_RED &&
|
if (cmpd->types[0] == COMPONENT_RED &&
|
||||||
cmpd->types[1] == COMPONENT_GREEN &&
|
cmpd->types[1] == COMPONENT_GREEN &&
|
||||||
cmpd->types[2] == COMPONENT_BLUE &&
|
cmpd->types[2] == COMPONENT_BLUE &&
|
||||||
cmpd->types[3] == COMPONENT_PADDING) {
|
cmpd->types[3] == COMPONENT_PADDING && uncC->interleave_type == 1) {
|
||||||
format = GST_VIDEO_FORMAT_RGBx;
|
format = GST_VIDEO_FORMAT_RGBx;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -12278,7 +12277,7 @@ qtdemux_get_format_from_uncv (GstQTDemux * qtdemux,
|
|||||||
goto unsupported_feature; // TODO - account for higher bit depths
|
goto unsupported_feature; // TODO - account for higher bit depths
|
||||||
} else if (uncC->sampling_type != 0) {
|
} else if (uncC->sampling_type != 0) {
|
||||||
goto unsupported_feature; // TODO - account for subsampling
|
goto unsupported_feature; // TODO - account for subsampling
|
||||||
} else if (uncC->interleave_type != 1) {
|
} else if (uncC->interleave_type != 0 && uncC->interleave_type != 1) {
|
||||||
goto unsupported_feature; // TODO - account for various interleave types
|
goto unsupported_feature; // TODO - account for various interleave types
|
||||||
}
|
}
|
||||||
stream->stride = entry->width * num_components; // TODO - account for non-zero row alignment
|
stream->stride = entry->width * num_components; // TODO - account for non-zero row alignment
|
||||||
|
Loading…
x
Reference in New Issue
Block a user