From e6b2b8b7d0365a25885e57fbcb6c1b4797d2c022 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 20 Dec 2011 10:58:19 +0100 Subject: [PATCH] docs: update media design docs some more Add audio media type design doc --- docs/design/part-mediatype-audio-raw.txt | 64 +++++++++++++++++ docs/design/part-mediatype-video-raw.txt | 90 +++++++++++++----------- 2 files changed, 111 insertions(+), 43 deletions(-) create mode 100644 docs/design/part-mediatype-audio-raw.txt diff --git a/docs/design/part-mediatype-audio-raw.txt b/docs/design/part-mediatype-audio-raw.txt new file mode 100644 index 0000000000..b5826722c6 --- /dev/null +++ b/docs/design/part-mediatype-audio-raw.txt @@ -0,0 +1,64 @@ +Media Types +----------- + + audio/x-raw + + format, G_TYPE_STRING, mandatory + The format of the audio samples, see the Formats section for a list + of valid sample formats. + + rate, G_TYPE_INT, mandatory + The samplerate of the audio + + channels, G_TYPE_INT, mandatory + The number of channels + + channel-positions, G_TYPE_VALUE_ARRAY + An array with a channel position for each channel. The number of items in + this array must be the same as the channels property. + + +Formats +------- + + The following values can be used for the format string property. + + "S8" 8-bit signed PCM audio + "U8" 8-bit unsigned PCM audio + + "S16LE" 16-bit signed PCM audio + "S16BE" 16-bit signed PCM audio + "U16LE" 16-bit unsigned PCM audio + "U16BE" 16-bit unsigned PCM audio + + "S24_32LE" 24-bit signed PCM audio + "S24_32BE" 24-bit signed PCM audio + "U24_32LE" 24-bit unsigned PCM audio + "U24_32BE" 24-bit unsigned PCM audio + + "S32LE" 32-bit signed PCM audio + "S32BE" 32-bit signed PCM audio + "U32LE" 32-bit unsigned PCM audio + "U32BE" 32-bit unsigned PCM audio + + "S24LE" 24-bit signed PCM audio + "S24BE" 24-bit signed PCM audio + "U24LE" 24-bit unsigned PCM audio + "U24BE" 24-bit unsigned PCM audio + + "S20LE" 20-bit signed PCM audio + "S20BE" 20-bit signed PCM audio + "U20LE" 20-bit unsigned PCM audio + "U20BE" 20-bit unsigned PCM audio + + "S18LE" 18-bit signed PCM audio + "S18BE" 18-bit signed PCM audio + "U18LE" 18-bit unsigned PCM audio + "U18BE" 18-bit unsigned PCM audio + + "F32LE" 32-bit floating-point audio + "F32BE" 32-bit floating-point audio + "F64LE" 64-bit floating-point audio + "F64BE" 64-bit floating-point audio + + diff --git a/docs/design/part-mediatype-video-raw.txt b/docs/design/part-mediatype-video-raw.txt index e46e567b27..9f62a317f1 100644 --- a/docs/design/part-mediatype-video-raw.txt +++ b/docs/design/part-mediatype-video-raw.txt @@ -56,9 +56,13 @@ Media Types The pixel aspect ration of the video format, G_TYPE_STRING, mandatory - The format of the video + The format of the video, see the Formats section for a list of valid format + strings. - * "I420" planar 4:2:0 YUV +Formats +------- + + "I420" planar 4:2:0 YUV Component 0: Y depth: 8 @@ -86,7 +90,7 @@ Media Types size (component1) + size (component2) - * "YV12" planar 4:2:0 YUV + "YV12" planar 4:2:0 YUV Same as I420 but with U and V planes swapped @@ -116,7 +120,7 @@ Media Types size (component1) + size (component2) - * "YUY2" packed 4:2:2 YUV + "YUY2" packed 4:2:2 YUV +--+--+--+--+ +--+--+--+--+ |Y0|U0|Y1|V0| |Y2|U2|Y3|V2| ... @@ -142,7 +146,7 @@ Media Types default size: rstride (image) * height - * "YVYU" packed 4:2:2 YUV + "YVYU" packed 4:2:2 YUV Same as "YUY2" but with U and V planes swapped @@ -170,7 +174,7 @@ Media Types default size: rstride (image) * height - * "UYVY" packed 4:2:2 YUV + "UYVY" packed 4:2:2 YUV +--+--+--+--+ +--+--+--+--+ |U0|Y0|V0|Y1| |U2|Y2|V2|Y3| ... @@ -196,7 +200,7 @@ Media Types default size: rstride (image) * height - * "AYUV" packed 4:4:4 YUV with alpha channel + "AYUV" packed 4:4:4 YUV with alpha channel +--+--+--+--+ +--+--+--+--+ |A0|Y0|U0|V0| |A1|Y1|U1|V1| ... @@ -227,7 +231,7 @@ Media Types default size: rstride (image) * height - * "RGBx" sparse rgb packed into 32 bit, space last + "RGBx" sparse rgb packed into 32 bit, space last +--+--+--+--+ +--+--+--+--+ |R0|G0|B0|X | |R1|G1|B1|X | ... @@ -252,7 +256,7 @@ Media Types default rstride: width * 4 default size: rstride (image) * height - * "BGRx" sparse reverse rgb packed into 32 bit, space last + "BGRx" sparse reverse rgb packed into 32 bit, space last +--+--+--+--+ +--+--+--+--+ |B0|G0|R0|X | |B1|G1|R1|X | ... @@ -277,7 +281,7 @@ Media Types default rstride: width * 4 default size: rstride (image) * height - * "xRGB" sparse rgb packed into 32 bit, space first + "xRGB" sparse rgb packed into 32 bit, space first +--+--+--+--+ +--+--+--+--+ |X |R0|G0|B0| |X |R1|G1|B1| ... @@ -302,7 +306,7 @@ Media Types default rstride: width * 4 default size: rstride (image) * height - * "xBGR" sparse reverse rgb packed into 32 bit, space first + "xBGR" sparse reverse rgb packed into 32 bit, space first +--+--+--+--+ +--+--+--+--+ |X |B0|G0|R0| |X |B1|G1|R1| ... @@ -327,7 +331,7 @@ Media Types default rstride: width * 4 default size: rstride (image) * height - * "RGBA" rgb with alpha channel last + "RGBA" rgb with alpha channel last +--+--+--+--+ +--+--+--+--+ |R0|G0|B0|A0| |R1|G1|B1|A1| ... @@ -357,7 +361,7 @@ Media Types default rstride: width * 4 default size: rstride (image) * height - * "BGRA" reverse rgb with alpha channel last + "BGRA" reverse rgb with alpha channel last +--+--+--+--+ +--+--+--+--+ |B0|G0|R0|A0| |B1|G1|R1|A1| ... @@ -387,7 +391,7 @@ Media Types default rstride: width * 4 default size: rstride (image) * height - * "ARGB" rgb with alpha channel first + "ARGB" rgb with alpha channel first +--+--+--+--+ +--+--+--+--+ |A0|R0|G0|B0| |A1|R1|G1|B1| ... @@ -417,7 +421,7 @@ Media Types default rstride: width * 4 default size: rstride (image) * height - * "ABGR" reverse rgb with alpha channel first + "ABGR" reverse rgb with alpha channel first +--+--+--+--+ +--+--+--+--+ |A0|R0|G0|B0| |A1|R1|G1|B1| ... @@ -447,7 +451,7 @@ Media Types default rstride: width * 4 default size: rstride (image) * height - * "RGB" rgb + "RGB" rgb +--+--+--+ +--+--+--+ |R0|G0|B0| |R1|G1|B1| ... @@ -472,7 +476,7 @@ Media Types default rstride: RU4 (width * 3) default size: rstride (image) * height - * "BGR" reverse rgb + "BGR" reverse rgb +--+--+--+ +--+--+--+ |B0|G0|R0| |B1|G1|R1| ... @@ -497,7 +501,7 @@ Media Types default rstride: RU4 (width * 3) default size: rstride (image) * height - * "Y41B" planar 4:1:1 YUV + "Y41B" planar 4:1:1 YUV Component 0: Y depth: 8 @@ -525,7 +529,7 @@ Media Types size (component1) + size (component2) - * "Y42B" planar 4:2:2 YUV + "Y42B" planar 4:2:2 YUV Component 0: Y depth: 8 @@ -553,7 +557,7 @@ Media Types size (component1) + size (component2) - * "Y444" planar 4:4:4 YUV + "Y444" planar 4:4:4 YUV Component 0: Y depth: 8 @@ -581,7 +585,7 @@ Media Types size (component1) + size (component2) - * "v210" packed 4:2:2 10-bit YUV, complex format + "v210" packed 4:2:2 10-bit YUV, complex format Component 0: Y depth: 10 @@ -597,7 +601,7 @@ Media Types default size: rstride (image) * height - * "v216" packed 4:2:2 16-bit YUV, Y0-U0-Y1-V1 order + "v216" packed 4:2:2 16-bit YUV, Y0-U0-Y1-V1 order Component 0: Y depth: 16 @@ -618,7 +622,7 @@ Media Types default rstride: RU8 (width * 2) default size: rstride (image) * height - * "NV12" planar 4:2:0 YUV with interleaved UV plane + "NV12" planar 4:2:0 YUV with interleaved UV plane Component 0: Y depth: 8 @@ -643,7 +647,7 @@ Media Types default size: RU4 (width) * RU2 (height) * 3 / 2 - * "NV21" planar 4:2:0 YUV with interleaved VU plane + "NV21" planar 4:2:0 YUV with interleaved VU plane Component 0: Y depth: 8 @@ -667,8 +671,8 @@ Media Types Image default size: RU4 (width) * RU2 (height) * 3 / 2 - * "GRAY8" 8-bit grayscale - * "Y800" same as "GRAY8" + "GRAY8" 8-bit grayscale + "Y800" same as "GRAY8" Component 0: Y depth: 8 @@ -680,7 +684,7 @@ Media Types Image default size: size (component0) - * "GRAY16_BE" 16-bit grayscale, most significant byte first + "GRAY16_BE" 16-bit grayscale, most significant byte first Component 0: Y depth: 16 @@ -692,8 +696,8 @@ Media Types Image default size: size (component0) - * "GRAY16_LE" 16-bit grayscale, least significant byte first - * "Y16" same as "GRAY16_LE" + "GRAY16_LE" 16-bit grayscale, least significant byte first + "Y16" same as "GRAY16_LE" Component 0: Y depth: 16 @@ -705,7 +709,7 @@ Media Types Image default size: size (component0) - * "v308" packed 4:4:4 YUV + "v308" packed 4:4:4 YUV +--+--+--+ +--+--+--+ |Y0|U0|V0| |Y1|U1|V1| ... @@ -731,7 +735,7 @@ Media Types default size: rstride (image) * height - * "RGB16" rgb 5-6-5 bits per component + "RGB16" rgb 5-6-5 bits per component +--+--+--+ +--+--+--+ |R0|G0|B0| |R1|G1|B1| ... @@ -753,7 +757,7 @@ Media Types default rstride: RU4 (width * 2) default size: rstride (image) * height - * "BGR16" reverse rgb 5-6-5 bits per component + "BGR16" reverse rgb 5-6-5 bits per component +--+--+--+ +--+--+--+ |B0|G0|R0| |B1|G1|R1| ... @@ -775,7 +779,7 @@ Media Types default rstride: RU4 (width * 2) default size: rstride (image) * height - * "RGB15" rgb 5-5-5 bits per component + "RGB15" rgb 5-5-5 bits per component +--+--+--+ +--+--+--+ |R0|G0|B0| |R1|G1|B1| ... @@ -797,7 +801,7 @@ Media Types default rstride: RU4 (width * 2) default size: rstride (image) * height - * "BGR15" reverse rgb 5-5-5 bits per component + "BGR15" reverse rgb 5-5-5 bits per component +--+--+--+ +--+--+--+ |B0|G0|R0| |B1|G1|R1| ... @@ -819,7 +823,7 @@ Media Types default rstride: RU4 (width * 2) default size: rstride (image) * height - * "UYVP" packed 10-bit 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...) + "UYVP" packed 10-bit 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...) Component 0: Y depth: 10 @@ -834,7 +838,7 @@ Media Types default rstride: RU4 (width * 2 * 5) default size: rstride (image) * height - * "A420" planar 4:4:2:0 AYUV + "A420" planar 4:4:2:0 AYUV Component 0: Y depth: 8 @@ -871,7 +875,7 @@ Media Types size (component2) + size (component3) - * "RGB8_PALETTED" 8-bit paletted RGB + "RGB8_PALETTED" 8-bit paletted RGB Component 0: R depth: 8 @@ -887,7 +891,7 @@ Media Types default rstride: RU4 (width) default size: rstride (image) * height - * "YUV9" planar 4:1:0 YUV + "YUV9" planar 4:1:0 YUV Component 0: Y depth: 8 @@ -915,7 +919,7 @@ Media Types size (component1) + size (component2) - * "YVU9" planar 4:1:0 YUV (like YUV9 but UV planes swapped) + "YVU9" planar 4:1:0 YUV (like YUV9 but UV planes swapped) Component 0: Y depth: 8 @@ -943,7 +947,7 @@ Media Types size (component1) + size (component2) - * "IYU1" packed 4:1:1 YUV (Cb-Y0-Y1-Cr-Y2-Y3 ...) + "IYU1" packed 4:1:1 YUV (Cb-Y0-Y1-Cr-Y2-Y3 ...) +--+--+--+ +--+--+--+ |B0|G0|R0| |B1|G1|R1| ... @@ -968,7 +972,7 @@ Media Types default rstride: RU4 (RU4 (width) + RU4 (width) / 2) default size: rstride (image) * height - * "ARGB64" rgb with alpha channel first, 16 bits per channel + "ARGB64" rgb with alpha channel first, 16 bits per channel +--+--+--+--+ +--+--+--+--+ |A0|R0|G0|B0| |A1|R1|G1|B1| ... @@ -998,7 +1002,7 @@ Media Types default rstride: width * 8 default size: rstride (image) * height - * "AYUV64" packed 4:4:4 YUV with alpha channel, 16 bits per channel (A0-Y0-U0-V0 ...) + "AYUV64" packed 4:4:4 YUV with alpha channel, 16 bits per channel (A0-Y0-U0-V0 ...) +--+--+--+--+ +--+--+--+--+ |A0|Y0|U0|V0| |A1|Y1|U1|V1| ... @@ -1028,7 +1032,7 @@ Media Types default rstride: width * 8 default size: rstride (image) * height - * "r210" packed 4:4:4 RGB, 10 bits per channel + "r210" packed 4:4:4 RGB, 10 bits per channel +--+--+--+ +--+--+--+ |R0|G0|B0| |R1|G1|B1| ...