Merge commit '9a07c1332cfe092b57b5758f22b686ca58806c60'

* commit '9a07c1332cfe092b57b5758f22b686ca58806c60':
  parser: Move Doxygen documentation to the header files
  PGS subtitles: Expose forced flag
  x86: PMINUB: port to cpuflags

Conflicts:
	libavcodec/avcodec.h
	libavcodec/pgssubdec.c
	libavcodec/version.h
	libavcodec/x86/ac3dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-03 14:13:45 +01:00
commit 1885ffb03d
9 changed files with 22 additions and 26 deletions

View File

@ -3389,6 +3389,8 @@ enum AVSubtitleType {
SUBTITLE_ASS,
};
#define AV_SUBTITLE_FLAG_FORCED 0x00000001
typedef struct AVSubtitleRect {
int x; ///< top left corner of pict, undefined when pict is not set
int y; ///< top left corner of pict, undefined when pict is not set
@ -3412,11 +3414,7 @@ typedef struct AVSubtitleRect {
*/
char *ass;
/**
* 1 indicates this subtitle is a forced subtitle.
* A forced subtitle should be displayed even when subtitles are hidden.
*/
int forced;
int flags;
} AVSubtitleRect;
typedef struct AVSubtitle {
@ -4213,6 +4211,10 @@ int av_parser_parse2(AVCodecParserContext *s,
int64_t pts, int64_t dts,
int64_t pos);
/**
* @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed
* @deprecated use AVBitstreamFilter
*/
int av_parser_change(AVCodecParserContext *s,
AVCodecContext *avctx,
uint8_t **poutbuf, int *poutbuf_size,

View File

@ -357,7 +357,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
sub_header->rects[0]->h = h;
sub_header->rects[0]->type = SUBTITLE_BITMAP;
sub_header->rects[0]->pict.linesize[0] = w;
sub_header->rects[0]->forced = is_menu;
sub_header->rects[0]->flags = is_menu ? AV_SUBTITLE_FLAG_FORCED : 0;
}
}
if (next_cmd_pos < cmd_pos) {

View File

@ -277,7 +277,8 @@ static const AVOption subtitle_rect_options[]={
{"w", "", SROFFSET(w), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{"h", "", SROFFSET(h), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{"type", "", SROFFSET(type), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
{"forced", "", SROFFSET(forced), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, 0},
{"flags", "", SROFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, 1, 0, "flags"},
{"forced", "", SROFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, 1, 0},
{NULL},
};

View File

@ -165,11 +165,6 @@ int av_parser_parse2(AVCodecParserContext *s,
return index;
}
/**
*
* @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed
* @deprecated use AVBitstreamFilter
*/
int av_parser_change(AVCodecParserContext *s,
AVCodecContext *avctx,
uint8_t **poutbuf, int *poutbuf_size,
@ -215,10 +210,6 @@ void av_parser_close(AVCodecParserContext *s)
/*****************************************************/
/**
* Combine the (truncated) bitstream to a complete frame.
* @return -1 if no complete frame could be created, AVERROR(ENOMEM) if there was a memory allocation error
*/
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
{
if(pc->overread){

View File

@ -39,6 +39,11 @@ typedef struct ParseContext{
#define END_NOT_FOUND (-100)
/**
* Combine the (truncated) bitstream to a complete frame.
* @return -1 if no complete frame could be created,
* AVERROR(ENOMEM) if there was a memory allocation error
*/
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size);
int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf,
int buf_size);

View File

@ -429,7 +429,7 @@ static int display_end_segment(AVCodecContext *avctx, void *data,
sub->rects[rect]->pict.data[1] = av_mallocz(AVPALETTE_SIZE);
/* Copy the forced flag */
sub->rects[rect]->forced = (ctx->presentation.objects[rect].composition & 0x40) != 0;
sub->rects[rect]->flags = (ctx->presentation.objects[rect].composition & 0x40) != 0 ? AV_SUBTITLE_FLAG_FORCED : 0;
if (!ctx->forced_subs_only || ctx->presentation.objects[rect].composition & 0x40)
memcpy(sub->rects[rect]->pict.data[1], ctx->clut, sub->rects[rect]->nb_colors * sizeof(uint32_t));

View File

@ -29,7 +29,7 @@
#include "libavutil/avutil.h"
#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 70
#define LIBAVCODEC_VERSION_MINOR 71
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \

View File

@ -63,12 +63,10 @@ cglobal ac3_exponent_min, 3, 4, 2, exp, reuse_blks, expn, offset
REP_RET
%endmacro
%define PMINUB PMINUB_MMX
%define LOOP_ALIGN
INIT_MMX mmx
AC3_EXPONENT_MIN
%if HAVE_MMXEXT_EXTERNAL
%define PMINUB PMINUB_MMXEXT
%define LOOP_ALIGN ALIGN 16
INIT_MMX mmxext
AC3_EXPONENT_MIN
@ -77,7 +75,6 @@ AC3_EXPONENT_MIN
INIT_XMM sse2
AC3_EXPONENT_MIN
%endif
%undef PMINUB
%undef LOOP_ALIGN
;-----------------------------------------------------------------------------

View File

@ -530,14 +530,14 @@
movh [%7+%8], %4
%endmacro
%macro PMINUB_MMX 3 ; dst, src, tmp
%macro PMINUB 3 ; dst, src, ignored
%if cpuflag(mmxext)
pminub %1, %2
%else ; dst, src, tmp
mova %3, %1
psubusb %3, %2
psubb %1, %3
%endmacro
%macro PMINUB_MMXEXT 3 ; dst, src, ignored
pminub %1, %2
%endif
%endmacro
%macro SPLATW 2-3 0