mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
Merge commit '1c5805521c3e406886341d752ebf38f8d41e1d13'
* commit '1c5805521c3e406886341d752ebf38f8d41e1d13': PGS subtitles: Set AVSubtitle pts value configure: Refactor CPPFLAGS settings for glibc/uclibc configure: add basic support for ARM AArch64 build: set -U__STRICT_ANSI__ for newlib Conflicts: configure libavcodec/pgssubdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
4116151a4b
23
configure
vendored
23
configure
vendored
@ -1199,6 +1199,7 @@ THREADS_LIST='
|
|||||||
'
|
'
|
||||||
|
|
||||||
ARCH_LIST='
|
ARCH_LIST='
|
||||||
|
aarch64
|
||||||
alpha
|
alpha
|
||||||
arm
|
arm
|
||||||
avr32
|
avr32
|
||||||
@ -2738,6 +2739,9 @@ fi
|
|||||||
|
|
||||||
# Deal with common $arch aliases
|
# Deal with common $arch aliases
|
||||||
case "$arch" in
|
case "$arch" in
|
||||||
|
aarch64|arm64)
|
||||||
|
arch="aarch64"
|
||||||
|
;;
|
||||||
arm*|iPad*)
|
arm*|iPad*)
|
||||||
arch="arm"
|
arch="arm"
|
||||||
;;
|
;;
|
||||||
@ -2935,6 +2939,17 @@ elif enabled avr32; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
elif enabled aarch64; then
|
||||||
|
|
||||||
|
case $cpu in
|
||||||
|
armv*)
|
||||||
|
cpuflags="-march=$cpu"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
cpuflags="-mcpu=$cpu"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
add_cflags $cpuflags
|
add_cflags $cpuflags
|
||||||
@ -3148,7 +3163,6 @@ case $target_os in
|
|||||||
SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a'
|
SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a'
|
||||||
objformat="win32"
|
objformat="win32"
|
||||||
enable dos_paths
|
enable dos_paths
|
||||||
add_cppflags -U__STRICT_ANSI__
|
|
||||||
;;
|
;;
|
||||||
*-dos|freedos|opendos)
|
*-dos|freedos|opendos)
|
||||||
network_extralibs="-lsocket"
|
network_extralibs="-lsocket"
|
||||||
@ -3157,7 +3171,6 @@ case $target_os in
|
|||||||
add_cppflags -U__STRICT_ANSI__
|
add_cppflags -U__STRICT_ANSI__
|
||||||
;;
|
;;
|
||||||
linux)
|
linux)
|
||||||
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
|
|
||||||
enable dv1394
|
enable dv1394
|
||||||
;;
|
;;
|
||||||
irix*)
|
irix*)
|
||||||
@ -3190,10 +3203,9 @@ case $target_os in
|
|||||||
enable_weak os2threads
|
enable_weak os2threads
|
||||||
;;
|
;;
|
||||||
gnu/kfreebsd)
|
gnu/kfreebsd)
|
||||||
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
|
add_cppflags -D_BSD_SOURCE
|
||||||
;;
|
;;
|
||||||
gnu)
|
gnu)
|
||||||
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
|
|
||||||
;;
|
;;
|
||||||
qnx)
|
qnx)
|
||||||
add_cppflags -D_QNX_SOURCE
|
add_cppflags -D_QNX_SOURCE
|
||||||
@ -3241,8 +3253,10 @@ esac
|
|||||||
|
|
||||||
if check_cpp_condition features.h "defined __UCLIBC__"; then
|
if check_cpp_condition features.h "defined __UCLIBC__"; then
|
||||||
libc_type=uclibc
|
libc_type=uclibc
|
||||||
|
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
|
||||||
elif check_cpp_condition features.h "defined __GLIBC__"; then
|
elif check_cpp_condition features.h "defined __GLIBC__"; then
|
||||||
libc_type=glibc
|
libc_type=glibc
|
||||||
|
add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
|
||||||
elif check_header _mingw.h; then
|
elif check_header _mingw.h; then
|
||||||
libc_type=mingw
|
libc_type=mingw
|
||||||
check_cpp_condition _mingw.h \
|
check_cpp_condition _mingw.h \
|
||||||
@ -3256,6 +3270,7 @@ elif check_header _mingw.h; then
|
|||||||
fi
|
fi
|
||||||
elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
|
elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
|
||||||
libc_type=newlib
|
libc_type=newlib
|
||||||
|
add_cppflags -U__STRICT_ANSI__
|
||||||
elif check_func_headers stdlib.h _get_doserrno; then
|
elif check_func_headers stdlib.h _get_doserrno; then
|
||||||
libc_type=msvcrt
|
libc_type=msvcrt
|
||||||
add_compat strtod.o strtod=avpriv_strtod
|
add_compat strtod.o strtod=avpriv_strtod
|
||||||
|
@ -52,6 +52,7 @@ typedef struct PGSSubPresentation {
|
|||||||
int id_number;
|
int id_number;
|
||||||
int object_count;
|
int object_count;
|
||||||
PGSSubPictureReference *objects;
|
PGSSubPictureReference *objects;
|
||||||
|
int64_t pts;
|
||||||
} PGSSubPresentation;
|
} PGSSubPresentation;
|
||||||
|
|
||||||
typedef struct PGSSubPicture {
|
typedef struct PGSSubPicture {
|
||||||
@ -67,7 +68,6 @@ typedef struct PGSSubContext {
|
|||||||
PGSSubPresentation presentation;
|
PGSSubPresentation presentation;
|
||||||
uint32_t clut[256];
|
uint32_t clut[256];
|
||||||
PGSSubPicture pictures[UINT16_MAX];
|
PGSSubPicture pictures[UINT16_MAX];
|
||||||
int64_t pts;
|
|
||||||
int forced_subs_only;
|
int forced_subs_only;
|
||||||
} PGSSubContext;
|
} PGSSubContext;
|
||||||
|
|
||||||
@ -295,7 +295,8 @@ static void parse_palette_segment(AVCodecContext *avctx,
|
|||||||
* @todo TODO: Implement cropping
|
* @todo TODO: Implement cropping
|
||||||
*/
|
*/
|
||||||
static void parse_presentation_segment(AVCodecContext *avctx,
|
static void parse_presentation_segment(AVCodecContext *avctx,
|
||||||
const uint8_t *buf, int buf_size)
|
const uint8_t *buf, int buf_size,
|
||||||
|
int64_t pts)
|
||||||
{
|
{
|
||||||
PGSSubContext *ctx = avctx->priv_data;
|
PGSSubContext *ctx = avctx->priv_data;
|
||||||
|
|
||||||
@ -304,6 +305,8 @@ static void parse_presentation_segment(AVCodecContext *avctx,
|
|||||||
|
|
||||||
uint16_t object_index;
|
uint16_t object_index;
|
||||||
|
|
||||||
|
ctx->presentation.pts = pts;
|
||||||
|
|
||||||
av_dlog(avctx, "Video Dimensions %dx%d\n",
|
av_dlog(avctx, "Video Dimensions %dx%d\n",
|
||||||
w, h);
|
w, h);
|
||||||
if (av_image_check_size(w, h, 0, avctx) >= 0)
|
if (av_image_check_size(w, h, 0, avctx) >= 0)
|
||||||
@ -394,10 +397,10 @@ static int display_end_segment(AVCodecContext *avctx, void *data,
|
|||||||
* not been cleared by a subsequent empty display command.
|
* not been cleared by a subsequent empty display command.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pts = ctx->pts != AV_NOPTS_VALUE ? ctx->pts : sub->pts;
|
pts = ctx->presentation.pts != AV_NOPTS_VALUE ? ctx->presentation.pts : sub->pts;
|
||||||
memset(sub, 0, sizeof(*sub));
|
memset(sub, 0, sizeof(*sub));
|
||||||
sub->pts = pts;
|
sub->pts = pts;
|
||||||
ctx->pts = AV_NOPTS_VALUE;
|
ctx->presentation.pts = AV_NOPTS_VALUE;
|
||||||
|
|
||||||
// Blank if last object_count was 0.
|
// Blank if last object_count was 0.
|
||||||
if (!ctx->presentation.object_count)
|
if (!ctx->presentation.object_count)
|
||||||
@ -493,8 +496,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
parse_picture_segment(avctx, buf, segment_length);
|
parse_picture_segment(avctx, buf, segment_length);
|
||||||
break;
|
break;
|
||||||
case PRESENTATION_SEGMENT:
|
case PRESENTATION_SEGMENT:
|
||||||
parse_presentation_segment(avctx, buf, segment_length);
|
parse_presentation_segment(avctx, buf, segment_length, sub->pts);
|
||||||
ctx->pts = sub->pts;
|
|
||||||
break;
|
break;
|
||||||
case WINDOW_SEGMENT:
|
case WINDOW_SEGMENT:
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user