mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 14:01:27 +00:00
Rename y400a to gray8a.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
52a81cd0e4
commit
e91946ed23
@ -473,7 +473,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
} else if (s->color_type == PNG_COLOR_TYPE_PALETTE) {
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
} else if (s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
|
||||
avctx->pix_fmt = PIX_FMT_Y400A;
|
||||
avctx->pix_fmt = PIX_FMT_GRAY8A;
|
||||
} else {
|
||||
goto fail;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = {
|
||||
{ PIX_FMT_YUV444P16LE, MKTAG('Y', '3', 0 , 16 ) },
|
||||
{ PIX_FMT_YUV444P16BE, MKTAG(16 , 0 , '3', 'Y') },
|
||||
{ PIX_FMT_YUVA420P, MKTAG('Y', '4', 11 , 8 ) },
|
||||
{ PIX_FMT_Y400A, MKTAG('Y', '2', 0 , 8 ) },
|
||||
{ PIX_FMT_GRAY8A, MKTAG('Y', '2', 0 , 8 ) },
|
||||
|
||||
/* quicktime */
|
||||
{ PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') },
|
||||
|
@ -861,8 +861,8 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
|
||||
.log2_chroma_h = 1,
|
||||
.flags = PIX_FMT_HWACCEL,
|
||||
},
|
||||
[PIX_FMT_Y400A] = {
|
||||
.name = "y400a",
|
||||
[PIX_FMT_GRAY8A] = {
|
||||
.name = "gray8a",
|
||||
.nb_components= 2,
|
||||
.comp = {
|
||||
{0,1,1,0,7}, /* Y */
|
||||
|
@ -132,7 +132,7 @@ enum PixelFormat {
|
||||
PIX_FMT_RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0
|
||||
PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
|
||||
PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1
|
||||
PIX_FMT_Y400A, ///< 8bit gray, 8bit alpha
|
||||
PIX_FMT_GRAY8A, ///< 8bit gray, 8bit alpha
|
||||
PIX_FMT_BGR48BE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian
|
||||
PIX_FMT_BGR48LE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian
|
||||
|
||||
@ -145,6 +145,8 @@ enum PixelFormat {
|
||||
PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
|
||||
};
|
||||
|
||||
#define PIX_FMT_Y400A PIX_FMT_GRAY8A
|
||||
|
||||
#if AV_HAVE_BIGENDIAN
|
||||
# define PIX_FMT_NE(be, le) PIX_FMT_##be
|
||||
#else
|
||||
|
@ -80,7 +80,7 @@ untested special converters
|
||||
(x)==PIX_FMT_PAL8 \
|
||||
|| (x)==PIX_FMT_YUYV422 \
|
||||
|| (x)==PIX_FMT_UYVY422 \
|
||||
|| (x)==PIX_FMT_Y400A \
|
||||
|| (x)==PIX_FMT_GRAY8A \
|
||||
|| isAnyRGB(x) \
|
||||
)
|
||||
|
||||
@ -1528,7 +1528,7 @@ static int palToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[],
|
||||
uint8_t *dstPtr= dst[0] + dstStride[0]*srcSliceY;
|
||||
const uint8_t *srcPtr= src[0];
|
||||
|
||||
if (srcFormat == PIX_FMT_Y400A) {
|
||||
if (srcFormat == PIX_FMT_GRAY8A) {
|
||||
switch (dstFormat) {
|
||||
case PIX_FMT_RGB32 : conv = gray8aToPacked32; break;
|
||||
case PIX_FMT_BGR32 : conv = gray8aToPacked32; break;
|
||||
@ -2017,7 +2017,7 @@ int sws_scale(SwsContext *c, const uint8_t* const src[], const int srcStride[],
|
||||
r= (i>>3 )*255;
|
||||
g= ((i>>1)&3)*85;
|
||||
b= (i&1 )*255;
|
||||
} else if(c->srcFormat == PIX_FMT_GRAY8 || c->srcFormat == PIX_FMT_Y400A) {
|
||||
} else if(c->srcFormat == PIX_FMT_GRAY8 || c->srcFormat == PIX_FMT_GRAY8A) {
|
||||
r = g = b = i;
|
||||
} else {
|
||||
assert(c->srcFormat == PIX_FMT_BGR4_BYTE);
|
||||
|
@ -392,7 +392,7 @@ const char *sws_format_name(enum PixelFormat format);
|
||||
)
|
||||
#define isGray(x) ( \
|
||||
(x)==PIX_FMT_GRAY8 \
|
||||
|| (x)==PIX_FMT_Y400A \
|
||||
|| (x)==PIX_FMT_GRAY8A \
|
||||
|| (x)==PIX_FMT_GRAY16BE \
|
||||
|| (x)==PIX_FMT_GRAY16LE \
|
||||
)
|
||||
@ -459,10 +459,10 @@ const char *sws_format_name(enum PixelFormat format);
|
||||
|| (x)==PIX_FMT_BGR32_1 \
|
||||
|| (x)==PIX_FMT_RGB32 \
|
||||
|| (x)==PIX_FMT_RGB32_1 \
|
||||
|| (x)==PIX_FMT_Y400A \
|
||||
|| (x)==PIX_FMT_GRAY8A \
|
||||
|| (x)==PIX_FMT_YUVA420P \
|
||||
)
|
||||
#define usePal(x) ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || (x) == PIX_FMT_Y400A)
|
||||
#define usePal(x) ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || (x) == PIX_FMT_GRAY8A)
|
||||
|
||||
extern const uint64_t ff_dither4[2];
|
||||
extern const uint64_t ff_dither8[2];
|
||||
|
@ -3032,7 +3032,7 @@ static void RENAME(sws_init_swScale)(SwsContext *c)
|
||||
case PIX_FMT_YUV420P16BE:
|
||||
case PIX_FMT_YUV422P16BE:
|
||||
case PIX_FMT_YUV444P16BE:
|
||||
case PIX_FMT_Y400A :
|
||||
case PIX_FMT_GRAY8A :
|
||||
case PIX_FMT_GRAY16BE : c->lumToYV12 = RENAME(yuy2ToY); break;
|
||||
case PIX_FMT_UYVY422 :
|
||||
case PIX_FMT_YUV420P16LE:
|
||||
@ -3067,12 +3067,12 @@ static void RENAME(sws_init_swScale)(SwsContext *c)
|
||||
case PIX_FMT_RGB32_1:
|
||||
case PIX_FMT_BGR32 :
|
||||
case PIX_FMT_BGR32_1: c->alpToYV12 = abgrToA; break;
|
||||
case PIX_FMT_Y400A : c->alpToYV12 = RENAME(yuy2ToY); break;
|
||||
case PIX_FMT_GRAY8A : c->alpToYV12 = RENAME(yuy2ToY); break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (srcFormat) {
|
||||
case PIX_FMT_Y400A :
|
||||
case PIX_FMT_GRAY8A :
|
||||
c->alpSrcOffset = 1;
|
||||
break;
|
||||
case PIX_FMT_RGB32 :
|
||||
|
@ -85,7 +85,7 @@ const char *swscale_license(void)
|
||||
|| (x)==PIX_FMT_RGB565 \
|
||||
|| (x)==PIX_FMT_RGB555 \
|
||||
|| (x)==PIX_FMT_GRAY8 \
|
||||
|| (x)==PIX_FMT_Y400A \
|
||||
|| (x)==PIX_FMT_GRAY8A \
|
||||
|| (x)==PIX_FMT_YUV410P \
|
||||
|| (x)==PIX_FMT_YUV440P \
|
||||
|| (x)==PIX_FMT_NV12 \
|
||||
|
Loading…
Reference in New Issue
Block a user