{"id":402,"date":"2007-11-07T21:31:39","date_gmt":"2007-11-08T04:31:39","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/palette-communication\/"},"modified":"2007-11-07T21:31:39","modified_gmt":"2007-11-08T04:31:39","slug":"palette-communication","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/palette-communication\/","title":{"rendered":"Palette Communication"},"content":{"rendered":"<p>If there is one meager accomplishment I think I can claim in the realm of open source multimedia, it would be as the point-man on palette support in <a href=\"http:\/\/xinehq.de\/\">xine<\/a>, <a href=\"http:\/\/mplayerhq.hu\/\">MPlayer<\/a>, and <a href=\"http:\/\/ffmpeg.org\/\">FFmpeg<\/a>.<\/p>\n<p><center><br \/>\n<img decoding=\"async\" src=\"http:\/\/wiki.multimedia.cx\/images\/3\/34\/Noia_palette.png\" alt=\"Palette icon\" \/><br \/>\n<\/center><\/p>\n<p>Problem statement: Many multimedia formats &#8212; typically older formats &#8212; need to deal with color palettes alongside compressed video. There are generally three situations arising from paletted video codecs:<\/p>\n<ol>\n<li>The palette is encoded in the video codec&#8217;s data stream. This makes palette handling easy since the media player does not need to care about ferrying special data between layers. Examples: <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Flic_Video\">Autodesk FLIC<\/a> and <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=VQA\">Westwood VQA<\/a>.\n<\/li>\n<li>The palette is part of the transport container&#8217;s header data. Generally, a modular media player will need to communicate the palette from the file demuxer layer to the video decoder layer via an out-of-band\/extradata channel provided by the program&#8217;s architecture. Examples: <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=QuickTime_container\">QuickTime files<\/a> containing <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Apple_QuickTime_RLE\">Apple Animation (RLE)<\/a> or <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Apple_SMC\">Apple Video (SMC)<\/a> data.\n<\/li>\n<li>The palette is stored separately from the video data and must be transported between the demuxer and the video decoder. However, the palette could potentially change at any time during playback. This can provide a challenge if the media player is designed with the assumption that a palette would only occur at initialization. Examples: <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Microsoft_Audio\/Video_Interleaved\">AVI files<\/a> containing paletted video data (such as <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Microsoft_RLE\">MS RLE<\/a>) and <a href=\"http:\/\/wiki.multimedia.cx\/index.php?title=Wing_Commander_III_MVE\">Wing Commander III MVE<\/a>.\n<\/li>\n<\/ol>\n<p>Transporting the palette from the demuxer layer to the decoder layer is not the only be part of the battle. In some applications, such as FFmpeg, the palette data also needs to travel from the decoder layer to the video output layer, the part that creates a final video frame to either be displayed or converted. This used to cause a problem for the multithreaded ffplay component of FFmpeg. The original mechanism (that I put into place) was not thread-safe&#8211; palette changes ended up occurring sooner than they were supposed to. The primary ffmpeg command line conversion tool is single-threaded so it does not have the same problem. xine is multi-threaded but does not suffer from the ffplay problem because all data sent from the video decoder layer to the video output layer must be in a YUV format, thus paletted images are converted before leaving the layer. I&#8217;m not sure about MPlayer these days, but when I implemented a paletted format (FLIC), I rendered the data in higher bit depths in the decoder layer. I would be interested to know if MPlayer&#8217;s video output layer can handle palettes directly these days.<\/p>\n<p>I hope this has been educational from a practical multimedia hacking perspective.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If there is one meager accomplishment I think I can claim in the realm of open source multimedia, it would be as the point-man on palette support in xine, MPlayer, and FFmpeg. Problem statement: Many multimedia formats &#8212; typically older formats &#8212; need to deal with color palettes alongside compressed video. There are generally three [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,3],"tags":[58,60,59],"class_list":["post-402","post","type-post","status-publish","format-standard","hentry","category-codec-technology","category-open-source-multimedia","tag-colors","tag-multimedia","tag-palette"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"If there is one meager accomplishment I think I can claim in the realm of open source multimedia, it would be as the point-man on palette support in xine, MPlayer, and FFmpeg. Problem statement: Many multimedia formats -- typically older formats -- need to deal with color palettes alongside compressed video. There are generally three\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Multimedia Mike\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/multimedia.cx\/eggs\/palette-communication\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Palette Communication | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"If there is one meager accomplishment I think I can claim in the realm of open source multimedia, it would be as the point-man on palette support in xine, MPlayer, and FFmpeg. Problem statement: Many multimedia formats -- typically older formats -- need to deal with color palettes alongside compressed video. There are generally three\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/palette-communication\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2007-11-08T04:31:39+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2007-11-08T04:31:39+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Palette Communication | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"If there is one meager accomplishment I think I can claim in the realm of open source multimedia, it would be as the point-man on palette support in xine, MPlayer, and FFmpeg. Problem statement: Many multimedia formats -- typically older formats -- need to deal with color palettes alongside compressed video. There are generally three\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/#article\",\"name\":\"Palette Communication | Breaking Eggs And Making Omelettes\",\"headline\":\"Palette Communication\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"http:\\\/\\\/wiki.multimedia.cx\\\/images\\\/3\\\/34\\\/Noia_palette.png\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/#articleImage\"},\"datePublished\":\"2007-11-07T21:31:39-08:00\",\"dateModified\":\"2007-11-07T21:31:39-08:00\",\"inLanguage\":\"en-US\",\"commentCount\":3,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/#webpage\"},\"articleSection\":\"Codec Technology, Open Source Multimedia, colors, multimedia, palette\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/open-source-multimedia\\\/#listItem\",\"name\":\"Open Source Multimedia\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/open-source-multimedia\\\/#listItem\",\"position\":2,\"name\":\"Open Source Multimedia\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/open-source-multimedia\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/#listItem\",\"name\":\"Palette Communication\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/#listItem\",\"position\":3,\"name\":\"Palette Communication\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/open-source-multimedia\\\/#listItem\",\"name\":\"Open Source Multimedia\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/\",\"name\":\"Multimedia Mike\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Multimedia Mike\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/\",\"name\":\"Palette Communication | Breaking Eggs And Making Omelettes\",\"description\":\"If there is one meager accomplishment I think I can claim in the realm of open source multimedia, it would be as the point-man on palette support in xine, MPlayer, and FFmpeg. Problem statement: Many multimedia formats -- typically older formats -- need to deal with color palettes alongside compressed video. There are generally three\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/palette-communication\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2007-11-07T21:31:39-08:00\",\"dateModified\":\"2007-11-07T21:31:39-08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Palette Communication | Breaking Eggs And Making Omelettes","description":"If there is one meager accomplishment I think I can claim in the realm of open source multimedia, it would be as the point-man on palette support in xine, MPlayer, and FFmpeg. Problem statement: Many multimedia formats -- typically older formats -- need to deal with color palettes alongside compressed video. There are generally three","canonical_url":"https:\/\/multimedia.cx\/eggs\/palette-communication\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/palette-communication\/#article","name":"Palette Communication | Breaking Eggs And Making Omelettes","headline":"Palette Communication","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"image":{"@type":"ImageObject","url":"http:\/\/wiki.multimedia.cx\/images\/3\/34\/Noia_palette.png","@id":"https:\/\/multimedia.cx\/eggs\/palette-communication\/#articleImage"},"datePublished":"2007-11-07T21:31:39-08:00","dateModified":"2007-11-07T21:31:39-08:00","inLanguage":"en-US","commentCount":3,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/palette-communication\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/palette-communication\/#webpage"},"articleSection":"Codec Technology, Open Source Multimedia, colors, multimedia, palette"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/palette-communication\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","position":1,"name":"Home","item":"https:\/\/multimedia.cx\/eggs","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/#listItem","name":"Open Source Multimedia"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/#listItem","position":2,"name":"Open Source Multimedia","item":"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/palette-communication\/#listItem","name":"Palette Communication"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/palette-communication\/#listItem","position":3,"name":"Palette Communication","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/#listItem","name":"Open Source Multimedia"}}]},{"@type":"Organization","@id":"https:\/\/multimedia.cx\/eggs\/#organization","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","url":"https:\/\/multimedia.cx\/eggs\/"},{"@type":"Person","@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author","url":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/","name":"Multimedia Mike","image":{"@type":"ImageObject","@id":"https:\/\/multimedia.cx\/eggs\/palette-communication\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Multimedia Mike"}},{"@type":"WebPage","@id":"https:\/\/multimedia.cx\/eggs\/palette-communication\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/palette-communication\/","name":"Palette Communication | Breaking Eggs And Making Omelettes","description":"If there is one meager accomplishment I think I can claim in the realm of open source multimedia, it would be as the point-man on palette support in xine, MPlayer, and FFmpeg. Problem statement: Many multimedia formats -- typically older formats -- need to deal with color palettes alongside compressed video. There are generally three","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/palette-communication\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2007-11-07T21:31:39-08:00","dateModified":"2007-11-07T21:31:39-08:00"},{"@type":"WebSite","@id":"https:\/\/multimedia.cx\/eggs\/#website","url":"https:\/\/multimedia.cx\/eggs\/","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","inLanguage":"en-US","publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"}}]},"og:locale":"en_US","og:site_name":"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering","og:type":"article","og:title":"Palette Communication | Breaking Eggs And Making Omelettes","og:description":"If there is one meager accomplishment I think I can claim in the realm of open source multimedia, it would be as the point-man on palette support in xine, MPlayer, and FFmpeg. Problem statement: Many multimedia formats -- typically older formats -- need to deal with color palettes alongside compressed video. There are generally three","og:url":"https:\/\/multimedia.cx\/eggs\/palette-communication\/","article:published_time":"2007-11-08T04:31:39+00:00","article:modified_time":"2007-11-08T04:31:39+00:00","twitter:card":"summary","twitter:title":"Palette Communication | Breaking Eggs And Making Omelettes","twitter:description":"If there is one meager accomplishment I think I can claim in the realm of open source multimedia, it would be as the point-man on palette support in xine, MPlayer, and FFmpeg. Problem statement: Many multimedia formats -- typically older formats -- need to deal with color palettes alongside compressed video. There are generally three"},"aioseo_meta_data":{"post_id":"402","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-31 21:55:31","updated":"2025-12-31 18:41:31","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/\" title=\"Open Source Multimedia\">Open Source Multimedia<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPalette Communication\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"Open Source Multimedia","link":"https:\/\/multimedia.cx\/eggs\/category\/open-source-multimedia\/"},{"label":"Palette Communication","link":"https:\/\/multimedia.cx\/eggs\/palette-communication\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=402"}],"version-history":[{"count":0,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/402\/revisions"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}