Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (90)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (6220)

  • Accessibility Testing : Why It Matters and How to Get Started

    7 mai 2024, par Erin

    Nearly 96% of website homepages had failures with meeting web accessibility criteria in 2024. Aside from not complying with web accessibility laws and regulations, companies are failing a growing number of users with accessibility needs.

    With disabilities, chronic illnesses and ageing populations all rising, brands need to take accessibility more seriously. 

    In this article, we explain why accessibility testing is so important and how you can get started today.

    What is accessibility testing ?

    Accessibility testing optimises digital experiences to make them accessible for users with a range of disabilities and impairments. This includes users with vision impairments, hearing loss, neurodivergence, motor disabilities and cognitive conditions.

    The goal is to create inclusive experiences for everyone by implementing UX principles that address the usability needs of diverse audiences.

    To help developers create accessible experiences, the World Wide Web Consortium (W3C) created the Web Content Accessibility Guidelines (WCAG). The international WCAG standards define the Four Principles of Accessibility :

    • Perceivable : Information and user interface components must be presentable to users in ways they perceive.
    • Operable : User interface components and navigation must be operable.
    • Understandable : Information and the operation of user interfaces must be understandable.
    • Robust : Content must be robust enough to be interpreted reliably by various user agents, including assistive technologies.
    WCAG Four Principles of Accessibility

    The current version of WCAG (2.2) contains 86 success criteria with three grades representing conformance levels :

    • Level A is the minimum conformance rating, indicating that web content is accessible to most users.
    • Level AA is the recommended conformance level to make content accessible to almost everyone, including users with severe disabilities.
    • Level AAA is the highest conformance rating, making content accessible to everyone, regardless of disability.
    WCAG accessibility conformance levels

    Why is accessibility testing important ?

    With record numbers of lawsuits over online accessibility cases, it’s clear that companies underestimate the importance of accessibility testing. Here are seven key reasons you should pay more attention to it :

    1. Create inclusive experiences : Above all, accessibility testing creates inclusive experiences for all users.
    2. Adhere to accessibility regulations : Accessibility laws in most major markets — including the EU web accessibility policy — make it illegal for companies to discriminate against users with disabilities.
    3. Social responsibility : Companies have an ethical responsibility to cater to all users and consumers. 57% say they’re more loyal to brands that commit to addressing social inequities.
    4. Accessibility needs are growing : 16% of the world’s population (1 in 6) experience significant disability and the number will continue to grow as ageing populations rise.
    5. Improve experiences for everyone : Accessibility improves experiences for all users — for example, 80% of UK viewers aged 18-25 (2021) watch content with subtitles enabled.
    6. Maximise marketing reach : Platforms like Google prioritise accessibility yearly, making accessible content and experiences more visible.
    7. Accessibility is profitable : Inclusive companies earn 1.6x more revenue, 2.6x more net income and 2x more profit, according to Accenture (PDF).
    Accenture Accessibility is Profitable

    Who needs inclusive UX ?

    Accessibility testing starts with understanding the usability needs of audiences with disabilities and impairments. Here’s a quick summary of the most common impairments and some of the needs they have in common :

    • Visual impairments : Users may rely on screen readers, magnification software, braille displays, etc. or require certain levels of contrast, text sizes and colour combinations to aid visibility.
    • Hearing impairments : Users may rely on closed captions and subtitles for video content, transcripts for multimedia content and visual alerts/notifications for updates.
    • Motor or mobility impairments : Users might rely on adaptive keyboards, voice recognition and other assistive devices.
    • Cognitive and neurological impairments : Users may rely on technologies like text-to-speech software or require simplified user interfaces, contrast designs, etc., to aid comprehension.
    • Speech impairments : Users may rely on speech recognition and dictation software for any interaction that requires them to speak (e.g., automated customer service machines).

    While accessibility tools can alleviate certain accessibility challenges, inclusive design can remove much of the burden from users. This can involve using plenty of contrast, careful font selection, increasing whitespace and plenty of other design choices.

    Refer to the latest version of the WCAG for further guidance.

    How to run accessibility testing

    Now that we’ve emphasised the importance of accessibility, let’s explain how you can implement your own accessibility testing strategy.

    Create your accessibility testing plan

    Careful planning is crucial for making accessibility testing affordable and profitable. This starts with identifying the assets you need to test and optimise. This may include :

    • Website or web app
    • Mobile app
    • Videos
    • Podcasts and audio
    • PDFs
    • Marketing emails

    Map out all the assets your target audience interacts with and bring them into your accessibility testing plan. Optimising your website for screen readers is great, but you don’t want to forget your marketing emails and exclude vision-impaired users.

    Once you’ve got a complete list of assets, identify the elements and interactions with each one that require accessibility testing. For example, on your website, you should optimise navigation, user interfaces, layouts, web forms, etc.

    You also need to consider the impact of device types. For example, how touchscreens change the experience for motor impairments.

    Now that you know the scope of your testing strategy, it’s time to define your accessibility standards. Use external frameworks like WCAG guidelines and relevant legal requirements to create an internal set of standards.

    Once your accessibility standards are complete, train your staff at every level. This includes designers, developers, and content creators — everyone who works on assets is included in your accessibility testing strategy.

    Implement your accessibility standards throughout the design and development phases. Aim to create the most inclusive experiences possible before the accessibility testing stage.

    Implement accessibility practices at every level

    Treating accessibility as an afterthought is the biggest mistake you can make. Aside from neglecting the importance of accessibility, it’s simply not affordable to create assets and then optimise them for accessibility.

    Instead, you need to implement accessibility standards in every design and development stage. This way, you create inclusive assets from the beginning, and accessibility testing flags minor fixes rather than overhauls.

    By extension, you can take lessons from accessibility tests and update your accessibility standards to improve the quality of future assets.

    Set clear specifications in your accessibility standards for everyone to follow. For example, content publishers should be responsible for adding alt-text to all images. Make designers responsible for following contrast guidelines when optimising elements like CTA buttons.

    A comparison of CTA buttons

    Next, managers can review assets and check for accessibility standards before anything is signed off. This way, you achieve higher test accessibility scores, and most fixes should be minor.

    This is the key to making accessibility testing manageable and profitable.

    Automate accessibility testing

    Automation is the other big factor in making accessibility efficient. With the right tools, you can run tests periodically without any manual workload, collecting data and flagging potential issues at almost no cost.

    For example, you can run automated accessibility tests on your website every month to check for common issues. This might flag up pages without alt-text for images, colour issues on a new batch of landing pages or a sudden drop in mobile loading times.

    Every automated test you can run reduces the manual workload of optimising accessibility. This frees up more time for the manual tests that require the attention of accessibility experts. 

    • Free up time for accessibility tasks that require manual testing
    • Identify issues with new content, assets, code, etc. faster
    • Run automated accessibility testing on new CRO changes

    Schedule manual accessibility reviews

    While it’s important to automate as much accessibility testing as possible, most accessibility standards require some form of manual testing. If we use the WCAG standards as a guideline, more than 70% of success require manual review and verification, including :

    • Testing websites with a screen reader
    • Navigating apps by only using a keyword
    • Quality assessing closed captions and subtitles
    • Testing web forms for people using speech input
    • Checking conversion actions for users with mobility issues (CTAs, forms, payments, etc.)

    Yes, you can automatically check all images for alt-text, but simply providing alt-text isn’t enough. You also have to review alt-text to make sure they’re descriptive, accurate and informative about the experience.

    Once again, the best way to minimise your time spent on manual testing is to implement accessibility standards throughout design and development. Train your content publishers to create alt-text that meets your criteria and editors to review them before pieces are signed off. 

    This way, you should always have the required alt-text before the content reaches the accessibility testing stage. The same applies to video transcriptions, web forms, website navigation, etc.

    Building a culture of accessibility makes the testing process as efficient as possible.

    What tools do you need for accessibility testing ?

    Now that we’ve covered the key essentials of accessibility testing, let’s look at some of the best accessibility testing tools to help you implement your strategy.

    accessiBe : AI-powered accessibility testing automation

    accessiBe is an accessibility testing automation and management system. It incorporates two core products : accessWidget for automating UI accessibility and accessFlow as an all-in-one solution for developers.

    screenshot of accessiBe

    Key features :

    • Automated accessibility testing
    • Accessibility widget for easy optimisation
    • Product accessibility for web, mobile and native apps
    • AI-powered accessibility insights
    • Compliance with WCAG, EAA and more

    As explained earlier, automation is crucial for making accessibility testing efficient and profitable. With accessiBe, you can automate the first line of accessibility checks so testers only need to get involved when manual action is necessary.

    Maze : Intelligent usability testing software

    Maze is a usability testing system that uses AI and automation to enhance traditional qualitative testing. You can run automated tests on live websites, capture survey feedback and recruit users to test experiences with real people.

    screenshot of Maze

    Key features :

    • Live website testing
    • Feedback surveys
    • Usability interviews
    • Test recruitment
    • Automated analysis

    While traditional usability interviews can provide in-depth insights, they’re expensive, time-consuming and difficult to run at scale. Maze’s solution is a hybrid testing system that automates data capture and analysis while supporting real user testing in one system.

    Matomo : Empowering people with ethical web analytics

    Matomo is a web analytics solution that gives you 100% data ownership while respecting user privacy. Think of this as a Google Analytics alternative that doesn’t use your visitors’ data for advertising purposes.

    Matomo dashboard

    Key features :

    • Privacy-friendly and GDPR-compliant tracking
    • Conversion rate optimisation features like heatmaps, session recordings, A/B testing and more
    • Accurate, unsampled data – see 40-60% more data than other analytics tools that sample data
    • Open-source

    Accessibility starts with creating quality experiences for everyone. Matomo reliably captures 100% of the data you need to optimise experiences without losing their trust. Instead of handing their personal info to Google or other tech giants, you retain full data ownership — fully compliant with GDPR, CCPA, etc.

    Try Matomo free for 21-days (no credit card required), or speak to our sales team for more info on how Matomo can enhance your site’s user experience and support your accessibility testing strategy.

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    UserTesting : Video-based user testing software

    UserTesting is the more traditional system for running usability tests with real people. The platform helps you recruit users and manage usability tests with a series of sessions and video interviews.

    screenshot of UserTesting

    Key features :

    • Usability testing
    • Test recruitment
    • Live interviews
    • AI-powered insights
    • Usability services

    UserTesting is a slower, more expensive approach to testing experiences, but its video-based interviews allow you to have meaningful conversations with real users.

    Siteimprove : WCAG compliance testing

    Siteimprove automates website testing, accessibility and optimisation. It includes dedicated tools for checking WCAG and DCI compliance with an automated scoring system. This helps you keep track of scores and identify any accessibility and usability issues faster.

    screenshot of Siteimprove screenshot of Siteimprove

    Key features :

    • Automated accessibility checks
    • Inclusivity scores
    • Accessibility recommendations
    • Accessibility tracking
    • Marketing and revenue attribution
    • Usability insights

    Siteimprove provides a first line of accessibility testing with automated checks and practical recommendations. It also tracks accessibility scores, including ratings for all three WCAG compliance levels (A, AA and AAA).

    Find the value in accessibility testing

    Accessibility testing isn’t only a moral obligation ; it’s good business. Aside from avoiding fines and lawsuits, inclusive experiences are increasingly profitable. User bases with accessibility needs are only growing while non-disabled audiences are using accessibility resources like subtitles and transcripts in greater numbers.

    Accessibility improves everyone’s experiences, and this only does good things for conversion rates, revenue and profit.

    Start building your datasets for accessibility testing today with a Matomo 21-day free trial — no credit card required. Gain 100% ownership over your analytics data while complying with GDPR and other data privacy regulations.

  • Marketing Touchpoints : Examples, KPIs, and Best Practices

    11 mars 2024, par Erin

    The customer journey is rarely straightforward. Rather, each stage comprises numerous points of contact with your brand, known as marketing touchpoints. And each touchpoint is equally important to the customer experience. 

    This article will explore marketing touchpoints in detail, including how to analyse them with attribution models and which KPIs to track. It will also share tips on incorporating these touchpoints into your marketing strategy. 

    What are marketing touchpoints ? 

    Marketing touchpoints are the interactions that take place between brands and customers throughout the latter’s journey, either online or in person. 

    Omni-channel digital marketing illustration

    By understanding how customers interact with your brand before, during and after a purchase, you can identify the channels that contribute to starting, driving and closing buyer journeys. Not only that, but you’ll also learn how to optimise the customer experience. This can also help you : 

    • Promote customer loyalty through increased customer satisfaction
    • Improve your brand reputation and foster a more positive perception of your brand, supported by social proof 
    • Build brand awareness among prospective customers 
    • Reconnect with current customers to drive repeat business

    According to a 2023 survey, social media and video-sharing platforms are the leading digital touchpoints among US consumers.

    With the customer journey divided into three stages — awareness, consideration, and decision — we can group these interactions into three touchpoint segments, depending on whether they occur before, during or after a purchase. 

    Touchpoints before a purchase

    Touchpoints before a purchase are those initial interactions between potential customers and brands that occur during the awareness stage — before they’ve made a purchase decision. 

    Here are some key touchpoints at the pre-purchase stage : 

    • Customer reviews, forums, and testimonials 
    • Social media posts
    • Online ads 
    • Company events and product demos
    • Other digital touchpoints, like video content, blog posts, or infographics
    • Peer referral 

    In PwC’s 2024 Global Consumer Insights Pulse Survey, 54% of consumers listed search engines as their primary source of pre-purchase information, followed by Amazon (35%) and retailer websites (33%). 

    Here are the survey’s findings in Western Europe, specifically : 

    Social channels are another major pre-purchase touchpoint ; 25% of social media users aged 18 to 44 have made a purchase through a social media app over the past three months. 

    Touchpoints during a purchase

    Touchpoints during a purchase occur when the prospective customer has made their purchase decision. It’s the beginning of a (hopefully) lasting relationship with them. 

    It’s important to involve both marketing and sales teams here — and to keep track of conversion metrics

    Here are the main touchpoints at this stage : 

    • Company website pages 
    • Product pages and catalogues 
    • Communication between customers and sales reps 
    • Product packaging and labelling 
    • Point-of-sale (POS) — the final touchpoint the prospective customer will reach before making the final purchasing decision 

    Touchpoints after a purchase

    You can use touchpoints after a purchase to maintain a positive relationship and keep current customers engaged. Examples of touchpoints that contribute to a good post-purchase experience for the customer include the following : 

    • Thank-you emails 
    • Email newsletters 
    • Customer satisfaction surveys 
    • Cross-selling emails 
    • Renewal options 
    • Customer loyalty programs

    Email marketing remains significant across all touchpoint segments, with 44% of CMOs agreeing that it’s essential to their marketing strategy — and it also plays a particularly important role in the post-purchase experience. For 61.1% of marketing teams, email open rates are higher than 20%.

    Sixty-nine percent of consumers say they’ve stopped doing business with a brand following a bad experience, so the importance of customer service touchpoints shouldn’t be overlooked. Live chat, chatbots, self-service resources, and customer service teams are integral to the post-purchase experience.

    Attribution models : Assigning value to marketing touchpoints 

    Determining the most effective touchpoints — those that directly contribute to conversions — is a process known as marketing attribution. The goal here is to identify the specific channels and points of contact with prospective customers that result in revenue for the company.

    Illustration of the marketing funnel stages

    You can use these insights to understand — and maximise — marketing return on investment (ROI). Otherwise, you risk allocating your budget to the wrong channels. 

    It’s possible to group attribution models into two categories — single-touch and multi-touch — depending on whether you assign value to one or more contributing touchpoints.

    Single-touch attribution models, where you’re giving credit for the conversion to a single touchpoint, include the following :

    • First-touch attribution : This assigns credit for the conversion to the first interaction a customer had with a brand ; however, it fails to consider lower-funnel touchpoints.
    • Last-click attribution : This focuses only on bottom-of-funnel marketing and credits the last interaction the customer had with a brand before completing a purchase.
    • Last non-direct : Credits the touchpoint immediately preceding a direct touchpoint with all the credit.

    Multi-touch attribution models are more complex and distribute the credit for conversion across multiple relevant touchpoints throughout the customer journey :

    • Linear attribution : The simplest multi-touch attribution model assigns equal values to all contributing touchpoints.
    • Position-based or U-shaped attribution : This assigns the greatest value to the first and last touchpoint — with 40% of the conversion credit each — and then divides the remaining 20% across all the other touchpoints.
    • Time-decay attribution : This model assigns the most credit to the customer’s most recent interactions with a brand, assuming that the touchpoints that occur later in the journey have a bigger impact on the conversion.

    Consider the following when choosing the most appropriate attribution model for your business :

    • The length of your typical sales cycle
    • Your marketing goals : increasing awareness, lead generation, driving revenue, etc.
    • How many stages and touchpoints make up your sales funnel

    Sometimes, it even makes sense to measure marketing performance using more than one attribution model.

    With the sheer volume of data that’s constantly generated across numerous online touchpoints, from your website to social media channels, it’s practically impossible to collect and analyse it manually.

    You’ll need an advanced web analytics platform to identify key touchpoints and assign value to them.

    Matomo’s Marketing Attribution feature can accurately measure the performance of different touchpoints to ensure that you’re allocating resources to the right channels. This is done in a compliant manner, without the need of data sampling or requiring cookie consent screens (excluding in Germany and the UK), ensuring both accuracy and privacy compliance.

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    Customer journey KPIs for measuring marketing campaign performance 

    Measuring the impact of different touchpoints on marketing campaign performance can help you understand how customer interactions drive conversions — and how to optimise your future efforts. 

    Illustration of customer journey concept

    Clearly, this is not a one-time effort. You should continuously reevaluate the crucial touchpoints that drive the most engagement at different stages of the customer journey. 

    Web analytics platforms can provide valuable insights into ever-changing consumer behaviours and trends and help you make informed decisions. 

    At the moment, Google is the most popular solution in the web analytics industry, with a combined market share of more than 70%

    However, if privacy, data accuracy, and GDPR compliance are a priority for you, Matomo is an alternative worth considering

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    KPIs to track before a purchase 

    During the pre-purchase stage, focus on the KPIs that measure the effectiveness of marketing activities across various online touchpoints — landing pages, email campaigns, social channels and ad placement on SERPs, for instance. 

    KPIs to track during the consideration stage include the following : 

    • Cost-per-click (CPC) : The CPC, the total cost of paid online advertising divided by the number of clicks those ads get, indicates whether you’re getting a good ROI. In the UK, the average CPC for search advertising is $1.22. Globally, it averages $0.62.
    • Engagement rate : The engagement rate, which is the total number of interactions divided by the number of followers, is useful for measuring the performance of social media touchpoints. Customer engagement also applies to other channels, like tracking average time on-page, form conversions, bounce rates, and other website interactions. 
    • Click-through rate (CTR) : The CTR — or the number of clicks your ads receive compared to the number of times they’re shown — helps you measure the performance of CTAs, email newsletters and pay-per-click (PPC) advertising.

    KPIs to track during a purchase 

    As a potential customer moves further down the sales funnel and reaches the decision stage, where they’re ready to make the choice to purchase, you should be tracking the following : 

    • Conversion rate : This is the percentage of leads that convert into customers by completing the desired action relative to the total number of website visitors. It shows you whether you’re targeting the right people and providing a frictionless checkout experience.
    • Sales revenue : This refers to the quantity of products sold multiplied by the product’s price. It helps you track the company’s ability to generate profit. 
    • Cost per conversion : This KPI is the total cost of online advertising in relation to the number of conversions. It measures the effectiveness of different marketing channels and the costs of converting prospective customers into buyers. It also forecasts future ad spend.

    KPIs to track after purchase 

    At the post-purchase stage, your priority should be gathering feedback : 

    Customer feedback surveys are great for collecting insights into customers’ post-purchase experience, opinions about your brand, products and services, and needs and expectations. 

    In addition to measuring customer satisfaction, these insights can help you identify points of friction, forecast future growth and revenue and spot customers at risk of churning. 

    Focus on the following customer satisfaction and retention metrics : 

    • Customer Satisfaction Score (CSAT) : This metric, which is gathered through customer satisfaction surveys, helps you gauge satisfaction levels. After all, 77% of consumers consider great customer service an important driver of brand loyalty.
    • Net Promoter Score (NPS) : Based on single-question customer surveys, NPS indicates how likely a customer is to recommend your business.
    • Customer Lifetime Value (CLV) : The CLV is the profit you can expect to generate from one customer throughout their relationship with your company. 
    • Customer Health Score (CHS) : This score can assess how “healthy” the customer’s relationship with your brand is and identify at-risk customers.

    Marketing touchpoints : Tips and best practices 

    Customer experience is more important today than ever. 

    Illustration of marketing funnel optimisation

    Salesforce’s 2022 State of the Connected Consumer report indicated that, for 88% of customers, the experience the brand provides is just as important as the product itself. 

    Here’s how you can build your customer touchpoint strategy and use effective touchpoints to improve customer satisfaction, build a loyal customer base, deliver better digital experiences and drive growth : 

    Understand the customer’s end-to-end experience 

    The typical customer’s journey follows a non-linear path of individual experiences that shape their awareness and brand preference. 

    Seventy-three percent of customers expect brands to understand their needs. So, personalising each interaction and delivering targeted content at different touchpoint segments — supported by customer segmentation and tools like Matomo — should be a priority. 

    Try to put yourself in the prospective customer’s shoes and understand their motivation and needs, focusing on their end-to-end experience rather than individual interactions. 

    Create a customer journey map 

    Once you understand how prospective customers interact with your brand, it becomes easier to map their journey from the pre-purchase stage to the actual purchase and beyond. 

    By creating these visual “roadmaps,” you make sure that you’re delivering the right content on the right channels at the right times and to the right audience — the key to successful marketing.

    Identify best-performing digital touchpoints 

    You can use insights from marketing attribution to pinpoint areas that are performing well. 

    By analysing the data provided by Matomo’s Marketing Attribution feature, you can determine which digital touchpoints are driving the most conversions or engagement, allowing you to focus your resources on optimising these channels for even greater success. 

    This targeted approach helps maximise the effectiveness of your marketing efforts and ensures a higher return on investment.

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    Discover key marketing touchpoints with Matomo 

    The customer’s journey rarely follows a direct route. If you hope to reach more customers and improve their experience, you’ll need to identify and manage individual marketing touchpoints every step of the way.

    While this process looks different for every business, it’s important to remember that your customers’ experience begins long before they interact with your brand for the first time — and carries on long after they complete the purchase. 

    In order to find these touchpoints and measure their effectiveness across multiple marketing channels, you’ll have to rely on accurate data — and a powerful web analytics tool like Matomo can provide those valuable marketing insights. 

    Try Matomo free for 21-days. No credit card required.

  • Developing A Shader-Based Video Codec

    22 juin 2013, par Multimedia Mike — Outlandish Brainstorms

    Early last month, this thing called ORBX.js was in the news. It ostensibly has something to do with streaming video and codec technology, which naturally catches my interest. The hype was kicked off by Mozilla honcho Brendan Eich when he posted an article asserting that HD video decoding could be entirely performed in JavaScript. We’ve seen this kind of thing before using Broadway– an H.264 decoder implemented entirely in JS. But that exposes some very obvious limitations (notably CPU usage).

    But this new video codec promises 1080p HD playback directly in JavaScript which is a lofty claim. How could it possibly do this ? I got the impression that performance was achieved using WebGL, an extension which allows JavaScript access to accelerated 3D graphics hardware. Browsing through the conversations surrounding the ORBX.js announcement, I found this confirmation from Eich himself :

    You’re right that WebGL does heavy lifting.

    As of this writing, ORBX.js remains some kind of private tech demo. If there were a public demo available, it would necessarily be easy to reverse engineer the downloadable JavaScript decoder.

    But the announcement was enough to make me wonder how it could be possible to create a video codec which effectively leverages 3D hardware.

    Prior Art
    In theorizing about this, it continually occurs to me that I can’t possibly be the first person to attempt to do this (or the ORBX.js people, for that matter). In googling on the matter, I found various forums and Q&A posts where people asked if it were possible to, e.g., accelerate JPEG decoding and presentation using 3D hardware, with no answers. I also found a blog post which describes a plan to use 3D hardware to accelerate VP8 video decoding. It was a project done under the banner of Google’s Summer of Code in 2011, though I’m not sure which open source group mentored the effort. The project did not end up producing the shader-based VP8 codec originally chartered but mentions that “The ‘client side’ of the VP8 VDPAU implementation is working and is currently being reviewed by the libvdpau maintainers.” I’m not sure what that means. Perhaps it includes modifications to the public API that supports VP8, but is waiting for the underlying hardware to actually implement VP8 decoding blocks in hardware.

    What’s So Hard About This ?
    Video decoding is a computationally intensive task. GPUs are known to be really awesome at chewing through computationally intensive tasks. So why aren’t GPUs a natural fit for decoding video codecs ?

    Generally, it boils down to parallelism, or lack of opportunities thereof. GPUs are really good at doing the exact same operations over lots of data at once. The problem is that decoding compressed video usually requires multiple phases that cannot be parallelized, and the individual phases often cannot be parallelized. In strictly mathematical terms, a compressed data stream will need to be decoded by applying a function f(x) over each data element, x0 .. xn. However, the function relies on having applied the function to the previous data element, i.e. :

    f(xn) = f(f(xn-1))
    

    What happens when you try to parallelize such an algorithm ? Temporal rifts in the space/time continuum, if you’re in a Star Trek episode. If you’re in the real world, you’ll get incorrect, unusuable data as the parallel computation is seeded with a bunch of invalid data at multiple points (which is illustrated in some of the pictures in the aforementioned blog post about accelerated VP8).

    Example : JPEG
    Let’s take a very general look at the various stages involved in decoding the ubiquitous JPEG format :


    High level JPEG decoding flow

    What are the opportunities to parallelize these various phases ?

    • Huffman decoding (run length decoding and zig-zag reordering is assumed to be rolled into this phase) : not many opportunities for parallelizing the various Huffman formats out there, including this one. Decoding most Huffman streams is necessarily a sequential operation. I once hypothesized that it would be possible to engineer a codec to achieve some parallelism during the entropy decoding phase, and later found that On2′s VP8 codec employs the scheme. However, such a scheme is unlikely to break down to such a fine level that WebGL would require.
    • Reverse DC prediction : JPEG — and many other codecs — doesn’t store full DC coefficients. It stores differences in successive DC coefficients. Reversing this process can’t be parallelized. See the discussion in the previous section.
    • Dequantize coefficients : This could be very parallelized. It should be noted that software decoders often don’t dequantize all coefficients. Many coefficients are 0 and it’s a waste of a multiplication operation to dequantize. Thus, this phase is sometimes rolled into the Huffman decoding phase.
    • Invert discrete cosine transform : This seems like it could be highly parallelizable. I will be exploring this further in this post.
    • Convert YUV -> RGB for final display : This is a well-established use case for 3D acceleration.

    Crash Course in 3D Shaders and Humility
    So I wanted to see if I could accelerate some parts of JPEG decoding using something called shaders. I made an effort to understand 3D programming and its associated math throughout the 1990s but 3D technology left me behind a very long time ago while I got mixed up in this multimedia stuff. So I plowed through a few books concerning WebGL (thanks to my new Safari Books Online subscription). After I learned enough about WebGL/JS to be dangerous and just enough about shader programming to be absolutely lethal, I set out to try my hand at optimizing IDCT using shaders.

    Here’s my extremely high level (and probably hopelessly naive) view of the modern GPU shader programming model :


    Basic WebGL rendering pipeline

    The WebGL program written in JavaScript drives the show. It sends a set of vertices into the WebGL system and each vertex is processed through a vertex shader. Then, each pixel that falls within a set of vertices is sent through a fragment shader to compute the final pixel attributes (R, G, B, and alpha value). Another consideration is textures : This is data that the program uploads to GPU memory which can be accessed programmatically by the shaders).

    These shaders (vertex and fragment) are key to the GPU’s programmability. How are they programmed ? Using a special C-like shading language. Thought I : “C-like language ? I know C ! I should be able to master this in short order !” So I charged forward with my assumptions and proceeded to get smacked down repeatedly by the overall programming paradigm. I came to recognize this as a variation of the scientific method : Develop a hypothesis– in my case, a mental model of how the system works ; develop an experiment (short program) to prove or disprove the model ; realize something fundamental that I was overlooking ; formulate new hypothesis and repeat.

    First Approach : Vertex Workhorse
    My first pitch goes like this :

    • Upload DCT coefficients to GPU memory in the form of textures
    • Program a vertex mesh that encapsulates 16×16 macroblocks
    • Distribute the IDCT effort among multiple vertex shaders
    • Pass transformed Y, U, and V blocks to fragment shader which will convert the samples to RGB

    So the idea is that decoding of 16×16 macroblocks is parallelized. A macroblock embodies 6 blocks :


    JPEG macroblocks

    It would be nice to process one of these 6 blocks in each vertex. But that means drawing a square with 6 vertices. How do you do that ? I eventually realized that drawing a square with 6 vertices is the recommended method for drawing a square on 3D hardware. Using 2 triangles, each with 3 vertices (0, 1, 2 ; 3, 4, 5) :


    2 triangles make a square

    A vertex shader knows which (x, y) coordinates it has been assigned, so it could figure out which sections of coefficients it needs to access within the textures. But how would a vertex shader know which of the 6 blocks it should process ? Solution : Misappropriate the vertex’s z coordinate. It’s not used for anything else in this case.

    So I set all of that up. Then I hit a new roadblock : How to get the reconstructed Y, U, and V samples transported to the fragment shader ? I have found that communicating between shaders is quite difficult. Texture memory ? WebGL doesn’t allow shaders to write back to texture memory ; shaders can only read it. The standard way to communicate data from a vertex shader to a fragment shader is to declare variables as “varying”. Up until this point, I knew about varying variables but there was something I didn’t quite understand about them and it nagged at me : If 3 different executions of a vertex shader set 3 different values to a varying variable, what value is passed to the fragment shader ?

    It turns out that the varying variable varies, which means that the GPU passes interpolated values to each fragment shader invocation. This completely destroys this idea.

    Second Idea : Vertex Workhorse, Take 2
    The revised pitch is to work around the interpolation issue by just having each vertex shader invocation performs all 6 block transforms. That seems like a lot of redundant. However, I figured out that I can draw a square with only 4 vertices by arranging them in an ‘N’ pattern and asking WebGL to draw a TRIANGLE_STRIP instead of TRIANGLES. Now it’s only doing the 4x the extra work, and not 6x. GPUs are supposed to be great at this type of work, so it shouldn’t matter, right ?

    I wired up an experiment and then ran into a new problem : While I was able to transform a block (or at least pretend to), and load up a varying array (that wouldn’t vary since all vertex shaders wrote the same values) to transmit to the fragment shader, the fragment shader can’t access specific values within the varying block. To clarify, a WebGL shader can use a constant value — or a value that can be evaluated as a constant at compile time — to index into arrays ; a WebGL shader can not compute an index into an array. Per my reading, this is a WebGL security consideration and the limitation may not be present in other OpenGL(-ES) implementations.

    Not Giving Up Yet : Choking The Fragment Shader
    You might want to be sitting down for this pitch :

    • Vertex shader only interpolates texture coordinates to transmit to fragment shader
    • Fragment shader performs IDCT for a single Y sample, U sample, and V sample
    • Fragment shader converts YUV -> RGB

    Seems straightforward enough. However, that step concerning IDCT for Y, U, and V entails a gargantuan number of operations. When computing the IDCT for an entire block of samples, it’s possible to leverage a lot of redundancy in the math which equates to far fewer overall operations. If you absolutely have to compute each sample individually, for an 8×8 block, that requires 64 multiplication/accumulation (MAC) operations per sample. For 3 color planes, and including a few extra multiplications involved in the RGB conversion, that tallies up to about 200 MACs per pixel. Then there’s the fact that this approach means a 4x redundant operations on the color planes.

    It’s crazy, but I just want to see if it can be done. My approach is to pre-compute a pile of IDCT constants in the JavaScript and transmit them to the fragment shader via uniform variables. For a first order optimization, the IDCT constants are formatted as 4-element vectors. This allows computing 16 dot products rather than 64 individual multiplication/addition operations. Ideally, GPU hardware executes the dot products faster (and there is also the possibility of lining these calculations up as matrices).

    I can report that I actually got a sample correctly transformed using this approach. Just one sample, through. Then I ran into some new problems :

    Problem #1 : Computing sample #1 vs. sample #0 requires a different table of 64 IDCT constants. Okay, so create a long table of 64 * 64 IDCT constants. However, this suffers from the same problem as seen in the previous approach : I can’t dynamically compute the index into this array. What’s the alternative ? Maintain 64 separate named arrays and implement 64 branches, when branching of any kind is ill-advised in shader programming to begin with ? I started to go down this path until I ran into…

    Problem #2 : Shaders can only be so large. 64 * 64 floats (4 bytes each) requires 16 kbytes of data and this well exceeds the amount of shader storage that I can assume is allowed. That brings this path of exploration to a screeching halt.

    Further Brainstorming
    I suppose I could forgo pre-computing the constants and directly compute the IDCT for each sample which would entail lots more multiplications as well as 128 cosine calculations per sample (384 considering all 3 color planes). I’m a little stuck with the transform idea right now. Maybe there are some other transforms I could try.

    Another idea would be vector quantization. What little ORBX.js literature is available indicates that there is a method to allow real-time streaming but that it requires GPU assistance to yield enough horsepower to make it feasible. When I think of such severe asymmetry between compression and decompression, my mind drifts towards VQ algorithms. As I come to understand the benefits and limitations of GPU acceleration, I think I can envision a way that something similar to SVQ1, with its copious, hierarchical vector tables stored as textures, could be implemented using shaders.

    So far, this all pertains to intra-coded video frames. What about opportunities for inter-coded frames ? The only approach that I can envision here is to use WebGL’s readPixels() function to fetch the rasterized frame out of the GPU, and then upload it again as a new texture which a new frame processing pipeline could reference. Whether this idea is plausible would require some profiling.

    Using interframes in such a manner seems to imply that the entire codec would need to operate in RGB space and not YUV.

    Conclusions
    The people behind ORBX.js have apparently figured out a way to create a shader-based video codec. I have yet to even begin to reason out a plausible approach. However, I’m glad I did this exercise since I have finally broken through my ignorance regarding modern GPU shader programming. It’s nice to have a topic like multimedia that allows me a jumping-off point to explore other areas.