Mercurial > libavcodec.hg
changeset 11366:3f231ba93f80 libavcodec
Add initial support for 12-bit color mode.
Patch by Janusz Krzysztofik jkrzyszt tis icnet pl
Original thread:
Subject: [FFmpeg-devel] [PATCH v2] Add initial support for 12-bit color mode.
Date: Mon, 1 Mar 2010 02:05:07 +0100
author | benoit |
---|---|
date | Fri, 05 Mar 2010 08:26:23 +0000 |
parents | eb03ee2f7781 |
children | fec27e2a7570 |
files | imgconvert.c |
diffstat | 1 files changed, 45 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/imgconvert.c Fri Mar 05 00:50:13 2010 +0000 +++ b/imgconvert.c Fri Mar 05 08:26:23 2010 +0000 @@ -240,6 +240,18 @@ .pixel_type = FF_PIXEL_PACKED, .depth = 5, }, + [PIX_FMT_RGB444BE] = { + .nb_channels = 3, + .color_type = FF_COLOR_RGB, + .pixel_type = FF_PIXEL_PACKED, + .depth = 4, + }, + [PIX_FMT_RGB444LE] = { + .nb_channels = 3, + .color_type = FF_COLOR_RGB, + .pixel_type = FF_PIXEL_PACKED, + .depth = 4, + }, /* gray / mono formats */ [PIX_FMT_GRAY16BE] = { @@ -316,6 +328,18 @@ .pixel_type = FF_PIXEL_PACKED, .depth = 5, }, + [PIX_FMT_BGR444BE] = { + .nb_channels = 3, + .color_type = FF_COLOR_RGB, + .pixel_type = FF_PIXEL_PACKED, + .depth = 4, + }, + [PIX_FMT_BGR444LE] = { + .nb_channels = 3, + .color_type = FF_COLOR_RGB, + .pixel_type = FF_PIXEL_PACKED, + .depth = 4, + }, [PIX_FMT_RGB8] = { .nb_channels = 1, .color_type = FF_COLOR_RGB, @@ -529,10 +553,14 @@ break; case PIX_FMT_GRAY16BE: case PIX_FMT_GRAY16LE: + case PIX_FMT_BGR444BE: + case PIX_FMT_BGR444LE: case PIX_FMT_BGR555BE: case PIX_FMT_BGR555LE: case PIX_FMT_BGR565BE: case PIX_FMT_BGR565LE: + case PIX_FMT_RGB444BE: + case PIX_FMT_RGB444LE: case PIX_FMT_RGB555BE: case PIX_FMT_RGB555LE: case PIX_FMT_RGB565BE: @@ -626,10 +654,14 @@ case PIX_FMT_RGB48LE: case PIX_FMT_GRAY16BE: case PIX_FMT_GRAY16LE: + case PIX_FMT_BGR444BE: + case PIX_FMT_BGR444LE: case PIX_FMT_BGR555BE: case PIX_FMT_BGR555LE: case PIX_FMT_BGR565BE: case PIX_FMT_BGR565LE: + case PIX_FMT_RGB444BE: + case PIX_FMT_RGB444LE: case PIX_FMT_RGB555BE: case PIX_FMT_RGB555LE: case PIX_FMT_RGB565BE: @@ -699,10 +731,14 @@ pix_fmt == PIX_FMT_BGR565LE || pix_fmt == PIX_FMT_BGR555BE || pix_fmt == PIX_FMT_BGR555LE || + pix_fmt == PIX_FMT_BGR444BE || + pix_fmt == PIX_FMT_BGR444LE || pix_fmt == PIX_FMT_RGB565BE || pix_fmt == PIX_FMT_RGB565LE || pix_fmt == PIX_FMT_RGB555BE || - pix_fmt == PIX_FMT_RGB555LE) + pix_fmt == PIX_FMT_RGB555LE || + pix_fmt == PIX_FMT_RGB444BE || + pix_fmt == PIX_FMT_RGB444LE) w = width * 2; else if (pix_fmt == PIX_FMT_UYYVYY411) w = width + width/2; @@ -838,10 +874,14 @@ case PIX_FMT_RGB565LE: case PIX_FMT_RGB555BE: case PIX_FMT_RGB555LE: + case PIX_FMT_RGB444BE: + case PIX_FMT_RGB444LE: case PIX_FMT_BGR565BE: case PIX_FMT_BGR565LE: case PIX_FMT_BGR555BE: case PIX_FMT_BGR555LE: + case PIX_FMT_BGR444BE: + case PIX_FMT_BGR444LE: bits = 16; break; case PIX_FMT_UYYVYY411: @@ -958,10 +998,14 @@ case PIX_FMT_RGB565LE: case PIX_FMT_RGB555BE: case PIX_FMT_RGB555LE: + case PIX_FMT_RGB444BE: + case PIX_FMT_RGB444LE: case PIX_FMT_BGR565BE: case PIX_FMT_BGR565LE: case PIX_FMT_BGR555BE: case PIX_FMT_BGR555LE: + case PIX_FMT_BGR444BE: + case PIX_FMT_BGR444LE: bits = 16; break; case PIX_FMT_UYYVYY411: