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:
		
						commit
						1885ffb03d
					
				| @ -3389,6 +3389,8 @@ enum AVSubtitleType { | |||||||
|     SUBTITLE_ASS, |     SUBTITLE_ASS, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | #define AV_SUBTITLE_FLAG_FORCED 0x00000001 | ||||||
|  | 
 | ||||||
| typedef struct AVSubtitleRect { | typedef struct AVSubtitleRect { | ||||||
|     int x;         ///< top left corner  of pict, undefined when pict is not set
 |     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
 |     int y;         ///< top left corner  of pict, undefined when pict is not set
 | ||||||
| @ -3412,11 +3414,7 @@ typedef struct AVSubtitleRect { | |||||||
|      */ |      */ | ||||||
|     char *ass; |     char *ass; | ||||||
| 
 | 
 | ||||||
|     /**
 |     int flags; | ||||||
|      * 1 indicates this subtitle is a forced subtitle. |  | ||||||
|      * A forced subtitle should be displayed even when subtitles are hidden. |  | ||||||
|      */ |  | ||||||
|     int forced; |  | ||||||
| } AVSubtitleRect; | } AVSubtitleRect; | ||||||
| 
 | 
 | ||||||
| typedef struct AVSubtitle { | typedef struct AVSubtitle { | ||||||
| @ -4213,6 +4211,10 @@ int av_parser_parse2(AVCodecParserContext *s, | |||||||
|                      int64_t pts, int64_t dts, |                      int64_t pts, int64_t dts, | ||||||
|                      int64_t pos); |                      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, | int av_parser_change(AVCodecParserContext *s, | ||||||
|                      AVCodecContext *avctx, |                      AVCodecContext *avctx, | ||||||
|                      uint8_t **poutbuf, int *poutbuf_size, |                      uint8_t **poutbuf, int *poutbuf_size, | ||||||
|  | |||||||
| @ -357,7 +357,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, | |||||||
|                 sub_header->rects[0]->h = h; |                 sub_header->rects[0]->h = h; | ||||||
|                 sub_header->rects[0]->type = SUBTITLE_BITMAP; |                 sub_header->rects[0]->type = SUBTITLE_BITMAP; | ||||||
|                 sub_header->rects[0]->pict.linesize[0] = w; |                 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) { |         if (next_cmd_pos < cmd_pos) { | ||||||
|  | |||||||
| @ -277,7 +277,8 @@ static const AVOption subtitle_rect_options[]={ | |||||||
| {"w", "", SROFFSET(w), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0}, | {"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}, | {"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}, | {"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}, | {NULL}, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -165,11 +165,6 @@ int av_parser_parse2(AVCodecParserContext *s, | |||||||
|     return index; |     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, | int av_parser_change(AVCodecParserContext *s, | ||||||
|                      AVCodecContext *avctx, |                      AVCodecContext *avctx, | ||||||
|                      uint8_t **poutbuf, int *poutbuf_size, |                      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) | int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size) | ||||||
| { | { | ||||||
|     if(pc->overread){ |     if(pc->overread){ | ||||||
|  | |||||||
| @ -39,6 +39,11 @@ typedef struct ParseContext{ | |||||||
| 
 | 
 | ||||||
| #define END_NOT_FOUND (-100) | #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_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size); | ||||||
| int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf, | int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf, | ||||||
|                         int buf_size); |                         int buf_size); | ||||||
|  | |||||||
| @ -429,7 +429,7 @@ static int display_end_segment(AVCodecContext *avctx, void *data, | |||||||
|         sub->rects[rect]->pict.data[1] = av_mallocz(AVPALETTE_SIZE); |         sub->rects[rect]->pict.data[1] = av_mallocz(AVPALETTE_SIZE); | ||||||
| 
 | 
 | ||||||
|         /* Copy the forced flag */ |         /* 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) |         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)); |         memcpy(sub->rects[rect]->pict.data[1], ctx->clut, sub->rects[rect]->nb_colors * sizeof(uint32_t)); | ||||||
|  | |||||||
| @ -29,7 +29,7 @@ | |||||||
| #include "libavutil/avutil.h" | #include "libavutil/avutil.h" | ||||||
| 
 | 
 | ||||||
| #define LIBAVCODEC_VERSION_MAJOR 54 | #define LIBAVCODEC_VERSION_MAJOR 54 | ||||||
| #define LIBAVCODEC_VERSION_MINOR 70 | #define LIBAVCODEC_VERSION_MINOR 71 | ||||||
| #define LIBAVCODEC_VERSION_MICRO 100 | #define LIBAVCODEC_VERSION_MICRO 100 | ||||||
| 
 | 
 | ||||||
| #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | ||||||
|  | |||||||
| @ -63,12 +63,10 @@ cglobal ac3_exponent_min, 3, 4, 2, exp, reuse_blks, expn, offset | |||||||
|     REP_RET |     REP_RET | ||||||
| %endmacro | %endmacro | ||||||
| 
 | 
 | ||||||
| %define PMINUB PMINUB_MMX |  | ||||||
| %define LOOP_ALIGN | %define LOOP_ALIGN | ||||||
| INIT_MMX mmx | INIT_MMX mmx | ||||||
| AC3_EXPONENT_MIN | AC3_EXPONENT_MIN | ||||||
| %if HAVE_MMXEXT_EXTERNAL | %if HAVE_MMXEXT_EXTERNAL | ||||||
| %define PMINUB PMINUB_MMXEXT |  | ||||||
| %define LOOP_ALIGN ALIGN 16 | %define LOOP_ALIGN ALIGN 16 | ||||||
| INIT_MMX mmxext | INIT_MMX mmxext | ||||||
| AC3_EXPONENT_MIN | AC3_EXPONENT_MIN | ||||||
| @ -77,7 +75,6 @@ AC3_EXPONENT_MIN | |||||||
| INIT_XMM sse2 | INIT_XMM sse2 | ||||||
| AC3_EXPONENT_MIN | AC3_EXPONENT_MIN | ||||||
| %endif | %endif | ||||||
| %undef PMINUB |  | ||||||
| %undef LOOP_ALIGN | %undef LOOP_ALIGN | ||||||
| 
 | 
 | ||||||
| ;----------------------------------------------------------------------------- | ;----------------------------------------------------------------------------- | ||||||
|  | |||||||
| @ -530,14 +530,14 @@ | |||||||
|     movh  [%7+%8], %4 |     movh  [%7+%8], %4 | ||||||
| %endmacro | %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 |     mova     %3, %1 | ||||||
|     psubusb  %3, %2 |     psubusb  %3, %2 | ||||||
|     psubb    %1, %3 |     psubb    %1, %3 | ||||||
| %endmacro | %endif | ||||||
| 
 |  | ||||||
| %macro PMINUB_MMXEXT 3 ; dst, src, ignored |  | ||||||
|     pminub   %1, %2 |  | ||||||
| %endmacro | %endmacro | ||||||
| 
 | 
 | ||||||
| %macro SPLATW 2-3 0 | %macro SPLATW 2-3 0 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user