diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-09 00:44:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-09 01:27:12 +0100 |
commit | f2b20b7a8b6fcbcd8cc669f5211e4e2ed7d8e9f3 (patch) | |
tree | b21166497b8ac3b1e5f840d8b5d73bda7f77e3d5 /libavutil | |
parent | d8710228eaafbcf60aa72861de81fc849759ea0b (diff) | |
parent | 38d553322891c8e47182f05199d19888422167dc (diff) | |
download | ffmpeg-f2b20b7a8b6fcbcd8cc669f5211e4e2ed7d8e9f3.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
pixdesc: mark pseudopaletted formats with a special flag.
avconv: switch to avcodec_encode_video2().
libx264: implement encode2().
libx264: split extradata writing out of encode_nals().
lavc: add avcodec_encode_video2() that encodes from an AVFrame -> AVPacket
cmdutils: update copyright year to 2012.
swscale: sign-extend integer function argument to qword on x86-64.
x86inc: support yasm -f win64 flag also.
h264: manually save/restore XMM registers for functions using INIT_MMX.
x86inc: allow manual use of WIN64_SPILL_XMM.
aacdec: Use correct speaker order for 7.1.
aacdec: Remove incorrect comment.
aacdec: Simplify output configuration.
Remove Sun medialib glue code.
dsputil: set STRIDE_ALIGN to 16 for x86 also.
pngdsp: swap argument inversion.
Conflicts:
cmdutils.c
configure
doc/APIchanges
ffmpeg.c
libavcodec/aacdec.c
libavcodec/dsputil.h
libavcodec/libx264.c
libavcodec/mlib/dsputil_mlib.c
libavcodec/utils.c
libavfilter/vf_scale.c
libavutil/avutil.h
libswscale/mlib/yuv2rgb_mlib.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/audioconvert.h | 1 | ||||
-rw-r--r-- | libavutil/avutil.h | 2 | ||||
-rw-r--r-- | libavutil/imgutils.c | 9 | ||||
-rw-r--r-- | libavutil/pixdesc.c | 8 | ||||
-rw-r--r-- | libavutil/pixdesc.h | 6 | ||||
-rw-r--r-- | libavutil/x86/x86inc.asm | 11 |
6 files changed, 25 insertions, 12 deletions
diff --git a/libavutil/audioconvert.h b/libavutil/audioconvert.h index 29ec1cbc0a..6414d3c3a0 100644 --- a/libavutil/audioconvert.h +++ b/libavutil/audioconvert.h @@ -97,6 +97,7 @@ #define AV_CH_LAYOUT_7POINT0_FRONT (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) #define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) #define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) +#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) #define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT) #define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT) diff --git a/libavutil/avutil.h b/libavutil/avutil.h index c8427fd0bf..0725c7f2e2 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -155,7 +155,7 @@ #define LIBAVUTIL_VERSION_MAJOR 51 #define LIBAVUTIL_VERSION_MINOR 38 -#define LIBAVUTIL_VERSION_MICRO 100 +#define LIBAVUTIL_VERSION_MICRO 101 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index 3847c53aec..f45c373eae 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -116,7 +116,8 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh return AVERROR(EINVAL); size[0] = linesizes[0] * height; - if (desc->flags & PIX_FMT_PAL) { + if (desc->flags & PIX_FMT_PAL || + desc->flags & PIX_FMT_PSEUDOPAL) { size[0] = (size[0] + 3) & ~3; data[1] = ptr + size[0]; /* palette is stored here as 256 32 bits words */ return size[0] + 256 * 4; @@ -204,7 +205,8 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4], av_free(buf); return ret; } - if (av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_PAL) + if (av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_PAL || + av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_PSEUDOPAL) ff_set_systematic_pal2((uint32_t*)pointers[1], pix_fmt); return ret; @@ -251,7 +253,8 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], if (desc->flags & PIX_FMT_HWACCEL) return; - if (desc->flags & PIX_FMT_PAL) { + if (desc->flags & PIX_FMT_PAL || + desc->flags & PIX_FMT_PSEUDOPAL) { av_image_copy_plane(dst_data[0], dst_linesizes[0], src_data[0], src_linesizes[0], width, height); diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index c04ec3139e..8d4a27b8f9 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -327,7 +327,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { { 0, 0, 1, 3, 2 }, /* G */ { 0, 0, 1, 0, 2 }, /* R */ }, - .flags = PIX_FMT_PAL | PIX_FMT_RGB, + .flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL, }, [PIX_FMT_BGR4] = { .name = "bgr4", @@ -351,7 +351,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { { 0, 0, 1, 1, 1 }, /* G */ { 0, 0, 1, 0, 0 }, /* R */ }, - .flags = PIX_FMT_PAL | PIX_FMT_RGB, + .flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL, }, [PIX_FMT_RGB8] = { .name = "rgb8", @@ -363,7 +363,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { { 0, 0, 1, 3, 2 }, /* G */ { 0, 0, 1, 0, 2 }, /* B */ }, - .flags = PIX_FMT_PAL | PIX_FMT_RGB, + .flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL, }, [PIX_FMT_RGB4] = { .name = "rgb4", @@ -387,7 +387,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { { 0, 0, 1, 1, 1 }, /* G */ { 0, 0, 1, 0, 0 }, /* B */ }, - .flags = PIX_FMT_PAL | PIX_FMT_RGB, + .flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL, }, [PIX_FMT_NV12] = { .name = "nv12", diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h index 2175246785..0730f5bb21 100644 --- a/libavutil/pixdesc.h +++ b/libavutil/pixdesc.h @@ -89,6 +89,12 @@ typedef struct AVPixFmtDescriptor{ #define PIX_FMT_HWACCEL 8 ///< Pixel format is an HW accelerated format. #define PIX_FMT_PLANAR 16 ///< At least one pixel component is not in the first data plane #define PIX_FMT_RGB 32 ///< The pixel format contains RGB-like data (as opposed to YUV/grayscale) +/** + * The pixel format is "pseudo-paletted". This means that Libav treats it as + * paletted internally, but the palette is generated by the decoder and is not + * stored in the file. + */ +#define PIX_FMT_PSEUDOPAL 64 /** * The array of all the pixel format descriptors. diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index 2921ddb62a..908e1dacc9 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -40,6 +40,8 @@ %if ARCH_X86_64 %ifidn __OUTPUT_FORMAT__,win32 %define WIN64 1 + %elifidn __OUTPUT_FORMAT__,win64 + %define WIN64 1 %else %define UNIX64 1 %endif @@ -290,7 +292,11 @@ DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 56] push r5 %assign stack_offset stack_offset+16 %endif - WIN64_SPILL_XMM %3 + %if mmsize == 8 + %assign xmm_regs_used 0 + %else + WIN64_SPILL_XMM %3 + %endif LOAD_IF_USED 4, %1 LOAD_IF_USED 5, %1 LOAD_IF_USED 6, %1 @@ -299,9 +305,6 @@ DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 56] %macro WIN64_SPILL_XMM 1 %assign xmm_regs_used %1 - %if mmsize == 8 - %assign xmm_regs_used 0 - %endif ASSERT xmm_regs_used <= 16 %if xmm_regs_used > 6 sub rsp, (xmm_regs_used-6)*16+16 |