diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-03 17:13:45 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-03 17:13:45 +0400 |
commit | 1885ffb03d0af28e6bac2bcc8725fa15b93f6ac9 (patch) | |
tree | 192b6341b447e51b2121dc17509ce852fa36405b | |
parent | b91fa5fcca70bdf188b757084edd444d4d8530c9 (diff) | |
parent | 9a07c1332cfe092b57b5758f22b686ca58806c60 (diff) |
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>
-rw-r--r-- | libavcodec/avcodec.h | 12 | ||||
-rw-r--r-- | libavcodec/dvdsubdec.c | 2 | ||||
-rw-r--r-- | libavcodec/options.c | 3 | ||||
-rw-r--r-- | libavcodec/parser.c | 9 | ||||
-rw-r--r-- | libavcodec/parser.h | 5 | ||||
-rw-r--r-- | libavcodec/pgssubdec.c | 2 | ||||
-rw-r--r-- | libavcodec/version.h | 2 | ||||
-rw-r--r-- | libavcodec/x86/ac3dsp.asm | 3 | ||||
-rw-r--r-- | libavutil/x86/x86util.asm | 10 |
9 files changed, 22 insertions, 26 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index a80612798e..fe83fef5de 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -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, diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 90593d0833..9c2dd8cf05 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -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) { diff --git a/libavcodec/options.c b/libavcodec/options.c index 20e9495976..0da0db4806 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -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}, }; diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 127ba8bd3d..cd1bcbcee2 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -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){ diff --git a/libavcodec/parser.h b/libavcodec/parser.h index 69f1064fb7..7fe0e115b1 100644 --- a/libavcodec/parser.h +++ b/libavcodec/parser.h @@ -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); diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index d0d4dd6aff..2876c6ac32 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -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)); diff --git a/libavcodec/version.h b/libavcodec/version.h index 67ff16919d..ec874f4721 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -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, \ diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm index d97d8d3b0b..872d39e749 100644 --- a/libavcodec/x86/ac3dsp.asm +++ b/libavcodec/x86/ac3dsp.asm @@ -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 ;----------------------------------------------------------------------------- diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 89e8cd82f4..ade21c68bb 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -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 |