[Ffmpeg-devel] [PATCH] HD DVD subtitle decoding
Michael Niedermayer
michaelni
Mon Feb 19 00:50:46 CET 2007
Hi
On Tue, Feb 13, 2007 at 01:38:11PM +0000, Ian Caulfield wrote:
> Here's an updated version of the HD subtitle patch. Hopefully more
> palatable :)
[...]
> Index: libavcodec/dsputil.h
> ===================================================================
> --- libavcodec/dsputil.h (revision 7963)
> +++ libavcodec/dsputil.h (working copy)
> @@ -91,6 +91,9 @@
> void ff_gmc_c(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy,
> int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height);
>
> +/* YUV -> RGB colorspace conversion from imgconvert.c */
> +void ff_yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t *rgba, int num_values);
> +
> /* minimum alignment rules ;)
> if u notice errors in the align stuff, need more alignment for some asm code for some cpu
> or need to use a function with less aligned data then send a mail to the ffmpeg-dev list, ...
> Index: libavcodec/imgconvert.c
> ===================================================================
> --- libavcodec/imgconvert.c (revision 7963)
> +++ libavcodec/imgconvert.c (working copy)
> @@ -1237,6 +1237,23 @@
> static uint8_t c_ccir_to_jpeg[256];
> static uint8_t c_jpeg_to_ccir[256];
>
> +void ff_yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t *rgba, int num_values)
> +{
> + uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
> + uint8_t r, g, b;
> + int i, y, cb, cr;
> + int r_add, g_add, b_add;
> +
> + for (i = num_values; i > 0; i--) {
> + y = *ycbcr++;
> + cb = *ycbcr++;
> + cr = *ycbcr++;
> + YUV_TO_RGB1_CCIR(cb, cr);
> + YUV_TO_RGB2_CCIR(r, g, b, y);
> + *rgba++ = (*alpha++ << 24) | (r << 16) | (g << 8) | b;
> + }
> +}
iam more in favor of putting the YUV_TO_RGB*_CCIR into a header and
including this
what the function above does seems quite specific to dvdsubdec.c
so IMHO it should be there rather
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070219/a204906e/attachment.pgp>
More information about the ffmpeg-devel
mailing list