Projects
Essentials
libde265
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 7
View file
libde265.changes
Changed
@@ -1,4 +1,23 @@ ------------------------------------------------------------------- +Sun Jun 4 15:47:50 UTC 2023 - Luigi Baldoni <aloisio@gmx.com> + +- Update to version 1.0.11 + * fixed generation of pkgconfig file with autotools + * fixed crashes recently detected by fuzzing + version 1.0.10: + * This release fixes the known CVEs below, many of them are + actually caused by the same underlying issues that manifest + in different ways. + CVE-2020-21594 CVE-2020-21595 CVE-2020-21596 CVE-2020-21597 + CVE-2020-21598 CVE-2020-21599 CVE-2020-21600 CVE-2020-21601 + CVE-2020-21602 CVE-2020-21603 CVE-2020-21604 CVE-2020-21605 + CVE-2020-21606 CVE-2022-1253 CVE-2022-43236 CVE-2022-43237 + CVE-2022-43238 CVE-2022-43239 CVE-2022-43240 CVE-2022-43241 + CVE-2022-43242 CVE-2022-43243 CVE-2022-43244 CVE-2022-43245 + CVE-2022-43248 CVE-2022-43249 CVE-2022-43250 CVE-2022-43252 + CVE-2022-43253 CVE-2022-47655 + +------------------------------------------------------------------- Thu Jan 19 14:41:21 UTC 2023 - Bjørn Lie <zaitor@opensuse.org> - Update to version 1.0.9
View file
libde265.spec
Changed
@@ -1,7 +1,7 @@ # # spec file for package libde265 # -# Copyright (c) 2020 Packman Team <packman@links2linux.de> +# Copyright (c) 2023 Packman Team <packman@links2linux.de> # Copyright (c) 2017 Bjørn Lie, Bryne, Norway. # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ %define so_ver 0 Name: libde265 -Version: 1.0.9 +Version: 1.0.11 Release: 0 Summary: Open H.265 video codec implementation License: LGPL-3.0-only
View file
libde265-1.0.9.tar.gz/CMakeLists.txt -> libde265-1.0.11.tar.gz/CMakeLists.txt
Changed
@@ -2,7 +2,7 @@ project (libde265 LANGUAGES C CXX - VERSION 1.0.9 + VERSION 1.0.11 ) set(CMAKE_CXX_STANDARD 11) @@ -11,7 +11,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) # The version number. -set (NUMERIC_VERSION 0x01000800) +set (NUMERIC_VERSION 0x01001100) set (PACKAGE_VERSION ${PROJECT_VERSION}) include (${CMAKE_ROOT}/Modules/CheckCCompilerFlag.cmake) @@ -29,19 +29,11 @@ find_package(Threads REQUIRED) CHECK_INCLUDE_FILE(malloc.h HAVE_MALLOC_H) -CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) -CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H) CHECK_FUNCTION_EXISTS(posix_memalign HAVE_POSIX_MEMALIGN) if (HAVE_MALLOC_H) add_definitions(-DHAVE_MALLOC_H) endif() -if (HAVE_STDINT_H) - add_definitions(-DHAVE_STDINT_H) -endif() -if (HAVE_STDBOOL_H) - add_definitions(-DHAVE_STDBOOL_H) -endif() if (HAVE_POSIX_MEMALIGN) add_definitions(-DHAVE_POSIX_MEMALIGN) endif() @@ -64,10 +56,15 @@ include_directories ("${PROJECT_SOURCE_DIR}/libde265") if(MSVC) include_directories ("${PROJECT_SOURCE_DIR}/extra") - add_definitions(-DHAVE_STDINT_H) - add_definitions(-DHAVE_STDBOOL_H) endif() +option(ENABLE_DECODER "Enable Decoder" ON) +option(ENABLE_ENCODER "Enable Encoder" OFF) + add_subdirectory (libde265) -add_subdirectory (dec265) -add_subdirectory (enc265) +if (ENABLE_DECODER) + add_subdirectory (dec265) +endif() +if (ENABLE_ENCODER) + add_subdirectory (enc265) +endif()
View file
libde265-1.0.9.tar.gz/Makefile.am -> libde265-1.0.11.tar.gz/Makefile.am
Changed
@@ -22,7 +22,10 @@ EXTRA_DIST = \ autogen.sh \ build.bat \ + m4/ax_compare_version.m4 \ + m4/ax_cxx_compile_stdcxx_11.m4 \ m4/m4_ax_check_compile_flag.m4 \ + m4/visibility.m4 \ Makefile.vc7 \ CMakeLists.txt \ README.md \
View file
libde265-1.0.9.tar.gz/Makefile.in -> libde265-1.0.11.tar.gz/Makefile.in
Changed
@@ -398,7 +398,10 @@ EXTRA_DIST = \ autogen.sh \ build.bat \ + m4/ax_compare_version.m4 \ + m4/ax_cxx_compile_stdcxx_11.m4 \ m4/m4_ax_check_compile_flag.m4 \ + m4/visibility.m4 \ Makefile.vc7 \ CMakeLists.txt \ README.md \
View file
libde265-1.0.9.tar.gz/configure -> libde265-1.0.11.tar.gz/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for libde265 1.0.9. +# Generated by GNU Autoconf 2.71 for libde265 1.0.11. # # Report bugs to <dirk.farin@gmail.com>. # @@ -621,8 +621,8 @@ # Identity of this package. PACKAGE_NAME='libde265' PACKAGE_TARNAME='libde265' -PACKAGE_VERSION='1.0.9' -PACKAGE_STRING='libde265 1.0.9' +PACKAGE_VERSION='1.0.11' +PACKAGE_STRING='libde265 1.0.11' PACKAGE_BUGREPORT='dirk.farin@gmail.com' PACKAGE_URL='' @@ -1437,7 +1437,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libde265 1.0.9 to adapt to many kinds of systems. +\`configure' configures libde265 1.0.11 to adapt to many kinds of systems. Usage: $0 OPTION... VAR=VALUE... @@ -1509,7 +1509,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libde265 1.0.9:";; + short | recursive ) echo "Configuration of libde265 1.0.11:";; esac cat <<\_ACEOF @@ -1528,7 +1528,7 @@ speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") - --disable-encoder Do not build encoder. + --enable-encoder Build the encoder (experimental). --disable-sse disable SSE optimizations (default=no) --disable-arm disable ARM optimizations (default=no) --enable-thumb disable ARM THUMB instructions (default=no) @@ -1651,7 +1651,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libde265 configure 1.0.9 +libde265 configure 1.0.11 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2263,7 +2263,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libde265 $as_me 1.0.9, which was +It was created by libde265 $as_me 1.0.11, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3240,7 +3240,7 @@ ac_config_headers="$ac_config_headers config.h" -NUMERIC_VERSION=0x01000900 # Numeric representation of the version (A.B.C.D = 0xAABBCCDD) +NUMERIC_VERSION=0x01001100 # Numeric representation of the version (A.B.C.D = 0xAABBCCDD) # From https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html: @@ -3250,7 +3250,7 @@ # If any interfaces have been removed or changed since the last public release, then set age to 0. LIBDE265_CURRENT=1 -LIBDE265_REVISION=2 +LIBDE265_REVISION=4 LIBDE265_AGE=1 # --------------------------------------------------------------------------- @@ -17714,7 +17714,7 @@ # Define the identity of the package. PACKAGE='libde265' - VERSION='1.0.9' + VERSION='1.0.11' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -18297,12 +18297,6 @@ # Checks for header files. -ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = xyes -then : - printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h - -fi ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes then : @@ -19577,7 +19571,7 @@ enableval=$enable_encoder; fi -if eval "test x$enable_encoder = x" ; then enable_encoder=yes ; fi +if eval "test x$enable_encoder = x" ; then enable_encoder=no ; fi if test x"$enable_encoder" = x"yes"; then ENABLE_ENCODER_TRUE= @@ -21202,7 +21196,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libde265 $as_me 1.0.9, which was +This file was extended by libde265 $as_me 1.0.11, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21270,7 +21264,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libde265 config.status 1.0.9 +libde265 config.status 1.0.11 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\"
View file
libde265-1.0.9.tar.gz/configure.ac -> libde265-1.0.11.tar.gz/configure.ac
Changed
@@ -2,11 +2,11 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.68) -AC_INIT(libde265, 1.0.9, dirk.farin@gmail.com) +AC_INIT(libde265, 1.0.11, dirk.farin@gmail.com) AC_CONFIG_SRCDIR(libde265/de265.cc) AC_CONFIG_HEADERS(config.h) -NUMERIC_VERSION=0x01000900 # Numeric representation of the version (A.B.C.D = 0xAABBCCDD) +NUMERIC_VERSION=0x01001100 # Numeric representation of the version (A.B.C.D = 0xAABBCCDD) AC_SUBST(NUMERIC_VERSION) # From https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html: @@ -16,7 +16,7 @@ # If any interfaces have been removed or changed since the last public release, then set age to 0. LIBDE265_CURRENT=1 -LIBDE265_REVISION=2 +LIBDE265_REVISION=4 LIBDE265_AGE=1 # --------------------------------------------------------------------------- @@ -62,7 +62,7 @@ AM_CONDITIONAL(HAVE_VISIBILITY, test "x$HAVE_VISIBILITY" != "x0") # Checks for header files. -AC_CHECK_HEADERS(stdint.h stdlib.h string.h malloc.h signal.h setjmp.h stddef.h sys/time.h) +AC_CHECK_HEADERS(stdlib.h string.h malloc.h signal.h setjmp.h stddef.h sys/time.h) AC_LANG_PUSH(C++) OLD_CPPFLAGS="$CPPFLAGS" @@ -178,8 +178,8 @@ -AC_ARG_ENABLE(encoder, AS_HELP_STRING(--disable-encoder, Do not build encoder.)) -if eval "test x$enable_encoder = x" ; then enable_encoder=yes ; fi +AC_ARG_ENABLE(encoder, AS_HELP_STRING(--enable-encoder, Build the encoder (experimental).)) +if eval "test x$enable_encoder = x" ; then enable_encoder=no ; fi AM_CONDITIONAL(ENABLE_ENCODER, test x"$enable_encoder" = x"yes")
View file
libde265-1.0.9.tar.gz/dec265/CMakeLists.txt -> libde265-1.0.11.tar.gz/dec265/CMakeLists.txt
Changed
@@ -1,6 +1,6 @@ add_executable (dec265 dec265.cc) -target_link_libraries (dec265 PRIVATE ${PROJECT_NAME}) +target_link_libraries (dec265 PRIVATE de265) if(SDL_FOUND) target_sources(dec265 PRIVATE sdl.cc) @@ -22,7 +22,7 @@ # hdrcopy uses internal APIs that are not available when compiled for Windows add_executable (hdrcopy hdrcopy.cc) - target_link_libraries (hdrcopy PRIVATE ${PROJECT_NAME}) + target_link_libraries (hdrcopy PRIVATE de265) install (TARGETS hdrcopy DESTINATION ${CMAKE_INSTALL_BINDIR}) endif()
View file
libde265-1.0.9.tar.gz/dec265/dec265.cc -> libde265-1.0.11.tar.gz/dec265/dec265.cc
Changed
@@ -594,7 +594,7 @@ if (optind != argc-1 || show_help) { fprintf(stderr," dec265 v%s\n", de265_get_version()); - fprintf(stderr,"--------------\n"); + fprintf(stderr,"-----------------\n"); fprintf(stderr,"usage: dec265 options videofile.bin\n"); fprintf(stderr,"The video file must be a raw bitstream, or a stream with NAL units (option -n).\n"); fprintf(stderr,"\n");
View file
libde265-1.0.9.tar.gz/enc265/CMakeLists.txt -> libde265-1.0.11.tar.gz/enc265/CMakeLists.txt
Changed
@@ -10,6 +10,6 @@ ) endif() -target_link_libraries (enc265 PRIVATE ${PROJECT_NAME}) +target_link_libraries (enc265 PRIVATE de265) install (TARGETS enc265 DESTINATION ${CMAKE_INSTALL_BINDIR})
View file
libde265-1.0.9.tar.gz/libde265.pc.in -> libde265-1.0.11.tar.gz/libde265.pc.in
Changed
@@ -8,6 +8,6 @@ URL: https://github.com/strukturag/libde265 Version: @VERSION@ Requires: -Libs: -lde265 -L@libdir@ +Libs: -lde265 -L${libdir} Libs.private: @LIBS@ -lstdc++ -Cflags: -I@includedir@ +Cflags: -I${includedir}
View file
libde265-1.0.9.tar.gz/libde265/CMakeLists.txt -> libde265-1.0.11.tar.gz/libde265/CMakeLists.txt
Changed
@@ -76,6 +76,12 @@ vui.h ) +set (libde265_public_headers + de265.h + en265.h + ${CMAKE_CURRENT_BINARY_DIR}/de265-version.h +) + if(MSVC OR MINGW) set (libde265_sources ${libde265_sources} @@ -107,21 +113,39 @@ endif() endif() -add_library(${PROJECT_NAME} ${libde265_sources} ${ENCODER_OBJECTS} ${X86_OBJECTS}) -target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads) +add_library(de265 ${libde265_sources} ${ENCODER_OBJECTS} ${X86_OBJECTS}) +target_link_libraries(de265 PRIVATE Threads::Threads) +target_include_directories(de265 PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake COMPATIBILITY ExactVersion) +write_basic_package_version_file(libde265ConfigVersion.cmake COMPATIBILITY ExactVersion) -install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config +install(TARGETS de265 EXPORT libde265Config RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -install(FILES ${libde265_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/de265-version.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) +install(FILES ${libde265_public_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libde265) +install(EXPORT libde265Config DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libde265") + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libde265ConfigVersion.cmake DESTINATION + "${CMAKE_INSTALL_LIBDIR}/cmake/libde265") -install(EXPORT ${PROJECT_NAME}Config DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake DESTINATION - "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") +# --- pkg-config + +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix "\${prefix}") +if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}") + set(libdir "${CMAKE_INSTALL_LIBDIR}") +else() + set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") +endif() +if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}") + set(includedir "${CMAKE_INSTALL_INCLUDEDIR}") +else() + set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +endif() + +configure_file(../libde265.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libde265.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libde265.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
View file
libde265-1.0.9.tar.gz/libde265/Makefile.am -> libde265-1.0.11.tar.gz/libde265/Makefile.am
Changed
@@ -114,9 +114,7 @@ endif EXTRA_DIST = Makefile.vc7 \ - CMakeLists.txt \ - ../extra/stdbool.h \ - ../extra/stdint.h + CMakeLists.txt libde265_la_HEADERS = \ de265.h \
View file
libde265-1.0.9.tar.gz/libde265/Makefile.in -> libde265-1.0.11.tar.gz/libde265/Makefile.in
Changed
@@ -524,9 +524,7 @@ SUBDIRS = $(am__append_4) $(am__append_6) $(am__append_8) libde265_la_LIBADD = $(am__append_5) $(am__append_7) $(am__append_9) EXTRA_DIST = Makefile.vc7 \ - CMakeLists.txt \ - ../extra/stdbool.h \ - ../extra/stdint.h + CMakeLists.txt libde265_la_HEADERS = \ de265.h \
View file
libde265-1.0.9.tar.gz/libde265/alloc_pool.h -> libde265-1.0.11.tar.gz/libde265/alloc_pool.h
Changed
@@ -29,12 +29,7 @@ #include <vector> #include <cstddef> -#ifdef HAVE_STDINT_H -#include <stdint.h> -#endif -#ifdef HAVE_CSTDINT #include <cstdint> -#endif class alloc_pool
View file
libde265-1.0.9.tar.gz/libde265/bitstream.h -> libde265-1.0.11.tar.gz/libde265/bitstream.h
Changed
@@ -26,9 +26,6 @@ #endif #include <stdio.h> -#ifdef HAVE_STDBOOL_H -#include <stdbool.h> -#endif #include <stdint.h>
View file
libde265-1.0.9.tar.gz/libde265/cabac.cc -> libde265-1.0.11.tar.gz/libde265/cabac.cc
Changed
@@ -274,7 +274,8 @@ } - +// When we read past the end of the bitstream (which should only happen on faulty bitstreams), +// we will eventually only return zeros. int decode_CABAC_bypass(CABAC_decoder* decoder) { logtrace(LogCABAC,"%3d bypass r:%x v:%x\n",logcnt,decoder->range, decoder->value); @@ -288,6 +289,10 @@ decoder->bits_needed = -8; decoder->value |= *decoder->bitstream_curr++; } + else { + // we read past the end of the bitstream, fill with 0 + decoder->bits_needed = -8; + } } int bit; @@ -371,9 +376,9 @@ } -int decode_CABAC_FL_bypass(CABAC_decoder* decoder, int nBits) +uint32_t decode_CABAC_FL_bypass(CABAC_decoder* decoder, int nBits) { - int value=0; + uint32_t value=0; if (likely(nBits<=8)) { if (nBits==0) {
View file
libde265-1.0.9.tar.gz/libde265/cabac.h -> libde265-1.0.11.tar.gz/libde265/cabac.h
Changed
@@ -44,7 +44,7 @@ int decode_CABAC_bypass(CABAC_decoder* decoder); int decode_CABAC_TU_bypass(CABAC_decoder* decoder, int cMax); -int decode_CABAC_FL_bypass(CABAC_decoder* decoder, int nBits); +uint32_t decode_CABAC_FL_bypass(CABAC_decoder* decoder, int nBits); int decode_CABAC_TR_bypass(CABAC_decoder* decoder, int cRiceParam, int cTRMax); int decode_CABAC_EGk_bypass(CABAC_decoder* decoder, int k);
View file
libde265-1.0.9.tar.gz/libde265/contextmodel.cc -> libde265-1.0.11.tar.gz/libde265/contextmodel.cc
Changed
@@ -181,6 +181,8 @@ if (D) printf("%p (alloc)\n",this); model = new context_modelCONTEXT_MODEL_TABLE_LENGTH; + // Without initializing the model, we got an invalid model state during decoding (issue #236) + memset(model, 0, sizeof(context_model) * CONTEXT_MODEL_TABLE_LENGTH); refcnt= new int; *refcnt=1; }
View file
libde265-1.0.9.tar.gz/libde265/de265-version.h -> libde265-1.0.11.tar.gz/libde265/de265-version.h
Changed
@@ -28,9 +28,9 @@ #define LIBDE265_VERSION_H /* Numeric representation of the version */ -#define LIBDE265_NUMERIC_VERSION 0x01000900 +#define LIBDE265_NUMERIC_VERSION 0x01001100 /* Version string */ -#define LIBDE265_VERSION "1.0.9" +#define LIBDE265_VERSION "1.0.11" #endif
View file
libde265-1.0.9.tar.gz/libde265/de265.cc -> libde265-1.0.11.tar.gz/libde265/de265.cc
Changed
@@ -48,19 +48,24 @@ return (LIBDE265_NUMERIC_VERSION); } +static uint8_t bcd2dec(uint8_t v) +{ + return (v>>4) * 10 + (v & 0x0F); +} + LIBDE265_API int de265_get_version_number_major(void) { - return ((LIBDE265_NUMERIC_VERSION)>>24) & 0xFF; + return bcd2dec(((LIBDE265_NUMERIC_VERSION)>>24) & 0xFF); } LIBDE265_API int de265_get_version_number_minor(void) { - return ((LIBDE265_NUMERIC_VERSION)>>16) & 0xFF; + return bcd2dec(((LIBDE265_NUMERIC_VERSION)>>16) & 0xFF); } LIBDE265_API int de265_get_version_number_maintenance(void) { - return ((LIBDE265_NUMERIC_VERSION)>>8) & 0xFF; + return bcd2dec(((LIBDE265_NUMERIC_VERSION)>>8) & 0xFF); } @@ -159,6 +164,16 @@ return "collocated motion-vector is outside image area"; case DE265_WARNING_PCM_BITDEPTH_TOO_LARGE: return "PCM bit-depth too large"; + case DE265_WARNING_REFERENCE_IMAGE_BIT_DEPTH_DOES_NOT_MATCH: + return "Bit-depth of reference image does not match current image"; + case DE265_WARNING_REFERENCE_IMAGE_SIZE_DOES_NOT_MATCH_SPS: + return "Size of reference image does not match current size in SPS"; + case DE265_WARNING_CHROMA_OF_CURRENT_IMAGE_DOES_NOT_MATCH_SPS: + return "Chroma format of current image does not match chroma in SPS"; + case DE265_WARNING_BIT_DEPTH_OF_CURRENT_IMAGE_DOES_NOT_MATCH_SPS: + return "Bit-depth of current image does not match SPS"; + case DE265_WARNING_REFERENCE_IMAGE_CHROMA_FORMAT_DOES_NOT_MATCH: + return "Chroma format of reference image does not match current image"; default: return "unknown error"; }
View file
libde265-1.0.9.tar.gz/libde265/de265.h -> libde265-1.0.11.tar.gz/libde265/de265.h
Changed
@@ -70,6 +70,10 @@ // version of linked libde265 library LIBDE265_API const char *de265_get_version(void); + +// returns the version number as a BCD number. +// 0xAABBCCDD is interpreted as version AA.BB.CC. +// For example: 0x02143000 is version 2.14.30 LIBDE265_API uint32_t de265_get_version_number(void); LIBDE265_API int de265_get_version_number_major(void); @@ -136,7 +140,12 @@ DE265_WARNING_CANNOT_APPLY_SAO_OUT_OF_MEMORY=1024, DE265_WARNING_SPS_MISSING_CANNOT_DECODE_SEI=1025, DE265_WARNING_COLLOCATED_MOTION_VECTOR_OUTSIDE_IMAGE_AREA=1026, - DE265_WARNING_PCM_BITDEPTH_TOO_LARGE=1027 + DE265_WARNING_PCM_BITDEPTH_TOO_LARGE=1027, + DE265_WARNING_REFERENCE_IMAGE_BIT_DEPTH_DOES_NOT_MATCH=1028, + DE265_WARNING_REFERENCE_IMAGE_SIZE_DOES_NOT_MATCH_SPS=1029, + DE265_WARNING_CHROMA_OF_CURRENT_IMAGE_DOES_NOT_MATCH_SPS=1030, + DE265_WARNING_BIT_DEPTH_OF_CURRENT_IMAGE_DOES_NOT_MATCH_SPS=1031, + DE265_WARNING_REFERENCE_IMAGE_CHROMA_FORMAT_DOES_NOT_MATCH=1032 } de265_error; LIBDE265_API const char* de265_get_error_text(de265_error err);
View file
libde265-1.0.9.tar.gz/libde265/deblock.cc -> libde265-1.0.11.tar.gz/libde265/deblock.cc
Changed
@@ -296,6 +296,16 @@ slice_segment_header* shdrQ = img->get_SliceHeader(xDi ,yDi); if (shdrP && shdrQ) { + + if (mviP.refIdx0 > MAX_NUM_REF_PICS || + mviP.refIdx1 > MAX_NUM_REF_PICS || + mviQ.refIdx0 > MAX_NUM_REF_PICS || + mviQ.refIdx1 > MAX_NUM_REF_PICS) { + // we cannot return an error from here, so just set a valid boundaryStrength value and continue; + img->set_deblk_bS(xDi, yDi, 0); + continue; + } + int refPicP0 = mviP.predFlag0 ? shdrP->RefPicList0 mviP.refIdx0 : -1; int refPicP1 = mviP.predFlag1 ? shdrP->RefPicList1 mviP.refIdx1 : -1; int refPicQ0 = mviQ.predFlag0 ? shdrQ->RefPicList0 mviQ.refIdx0 : -1;
View file
libde265-1.0.9.tar.gz/libde265/decctx.cc -> libde265-1.0.11.tar.gz/libde265/decctx.cc
Changed
@@ -1425,8 +1425,9 @@ std::shared_ptr<const seq_parameter_set> current_sps = this->sps (int)current_pps->seq_parameter_set_id ; int idx = dpb.new_image(current_sps, this, 0,0, false); - assert(idx>=0); - //printf("-> fill with unavailable POC %d\n",POC); + if (idx<0) { + return idx; + } de265_image* img = dpb.get_image(idx); @@ -1450,7 +1451,7 @@ This function will mark pictures in the DPB as 'unused' or 'used for long-term reference' */ -void decoder_context::process_reference_picture_set(slice_segment_header* hdr) +de265_error decoder_context::process_reference_picture_set(slice_segment_header* hdr) { std::vector<int> removeReferencesList; @@ -1598,6 +1599,9 @@ // We do not know the correct MSB int concealedPicture = generate_unavailable_reference_picture(current_sps.get(), PocLtCurri, true); + if (concealedPicture<0) { + return (de265_error)(-concealedPicture); + } picInAnyList.resize(dpb.size(), false); // adjust size of array to hold new picture RefPicSetLtCurri = k = concealedPicture; @@ -1624,6 +1628,9 @@ else { int concealedPicture = k = generate_unavailable_reference_picture(current_sps.get(), PocLtFolli, true); + if (concealedPicture<0) { + return (de265_error)(-concealedPicture); + } picInAnyList.resize(dpb.size(), false); // adjust size of array to hold new picture RefPicSetLtFolli = concealedPicture; @@ -1655,6 +1662,9 @@ else { int concealedPicture = generate_unavailable_reference_picture(current_sps.get(), PocStCurrBeforei, false); + if (concealedPicture<0) { + return (de265_error)(-concealedPicture); + } RefPicSetStCurrBeforei = k = concealedPicture; picInAnyList.resize(dpb.size(), false); // adjust size of array to hold new picture @@ -1678,6 +1688,9 @@ else { int concealedPicture = generate_unavailable_reference_picture(current_sps.get(), PocStCurrAfteri, false); + if (concealedPicture<0) { + return (de265_error)(-concealedPicture); + } RefPicSetStCurrAfteri = k = concealedPicture; @@ -1721,6 +1734,8 @@ hdr->RemoveReferencesList = removeReferencesList; //remove_images_from_dpb(hdr->RemoveReferencesList); + + return DE265_OK; } @@ -2019,8 +2034,8 @@ int image_buffer_idx; bool isOutputImage = (!sps->sample_adaptive_offset_enabled_flag || param_disable_sao); image_buffer_idx = dpb.new_image(current_sps, this, pts, user_data, isOutputImage); - if (image_buffer_idx == -1) { - *err = DE265_ERROR_IMAGE_BUFFER_FULL; + if (image_buffer_idx < 0) { + *err = (de265_error)(-image_buffer_idx); return false; } @@ -2072,7 +2087,10 @@ // mark picture so that it is not overwritten by unavailable reference frames img->PicState = UsedForShortTermReference; - process_reference_picture_set(hdr); + *err = process_reference_picture_set(hdr); + if (*err != DE265_OK) { + return false; + } } img->PicState = UsedForShortTermReference;
View file
libde265-1.0.9.tar.gz/libde265/decctx.h -> libde265-1.0.11.tar.gz/libde265/decctx.h
Changed
@@ -513,9 +513,14 @@ int progress); void process_picture_order_count(slice_segment_header* hdr); + + /* + If there is no space for a new image, returns the negative value of an de265_error. + I.e. you can check for error by return_value<0, which is error (-return_value); + */ int generate_unavailable_reference_picture(const seq_parameter_set* sps, int POC, bool longTerm); - void process_reference_picture_set(slice_segment_header* hdr); + de265_error process_reference_picture_set(slice_segment_header* hdr); bool construct_reference_picture_lists(slice_segment_header* hdr);
View file
libde265-1.0.9.tar.gz/libde265/dpb.cc -> libde265-1.0.11.tar.gz/libde265/dpb.cc
Changed
@@ -210,7 +210,7 @@ // --- search for a free slot in the DPB --- - int free_image_buffer_idx = -1; + int free_image_buffer_idx = -DE265_ERROR_IMAGE_BUFFER_FULL; for (int i=0;i<dpb.size();i++) { if (dpbi->can_be_released()) { dpbi->release(); /* TODO: this is surely not the best place to free the image, but @@ -237,7 +237,7 @@ // create a new image slot if no empty slot remaining - if (free_image_buffer_idx == -1) { + if (free_image_buffer_idx == -DE265_ERROR_IMAGE_BUFFER_FULL) { free_image_buffer_idx = dpb.size(); dpb.push_back(new de265_image); } @@ -245,6 +245,10 @@ // --- allocate new image --- + if (free_image_buffer_idx<0) { + return free_image_buffer_idx; + } + de265_image* img = dpbfree_image_buffer_idx; int w = sps->pic_width_in_luma_samples; @@ -259,7 +263,10 @@ default: chroma = de265_chroma_420; assert(0); break; // should never happen } - img->alloc_image(w,h, chroma, sps, true, decctx, /*NULL,*/ pts, user_data, isOutputImage); + de265_error error = img->alloc_image(w,h, chroma, sps, true, decctx, /*NULL,*/ pts, user_data, isOutputImage); + if (error) { + return -error; + } img->integrity = INTEGRITY_CORRECT;
View file
libde265-1.0.9.tar.gz/libde265/dpb.h -> libde265-1.0.11.tar.gz/libde265/dpb.h
Changed
@@ -38,7 +38,9 @@ void set_norm_size_of_DPB(int n) { norm_images_in_DPB=n; } /* Alloc a new image in the DPB and return its index. - If there is no space for a new image, return -1. */ + If there is no space for a new image, returns the negative value of an de265_error. + I.e. you can check for error by return_value<0, which is error (-return_value); + */ int new_image(std::shared_ptr<const seq_parameter_set> sps, decoder_context* decctx, de265_PTS pts, void* user_data, bool isOutputImage);
View file
libde265-1.0.9.tar.gz/libde265/image.cc -> libde265-1.0.11.tar.gz/libde265/image.cc
Changed
@@ -445,7 +445,8 @@ // CTB info - if (ctb_info.data_size != sps->PicSizeInCtbsY) + if (ctb_info.width_in_units != sps->PicWidthInCtbsY || + ctb_info.height_in_units != sps->PicHeightInCtbsY) { delete ctb_progress;
View file
libde265-1.0.9.tar.gz/libde265/image.h -> libde265-1.0.11.tar.gz/libde265/image.h
Changed
@@ -30,9 +30,6 @@ #include <stdlib.h> #include <string.h> #include <memory> -#ifdef HAVE_STDBOOL_H -#include <stdbool.h> -#endif #include "libde265/de265.h" #include "libde265/sps.h" @@ -712,6 +709,10 @@ // address of first CTB in slice void set_SliceAddrRS(int ctbX, int ctbY, int SliceAddrRS) { + if (ctbX >= ctb_info.width_in_units || ctbY >= ctb_info.height_in_units) { + return; + } + int idx = ctbX + ctbY*ctb_info.width_in_units; ctb_infoidx.SliceAddrRS = SliceAddrRS; }
View file
libde265-1.0.9.tar.gz/libde265/motion.cc -> libde265-1.0.11.tar.gz/libde265/motion.cc
Changed
@@ -292,6 +292,19 @@ const pic_parameter_set* pps = shdr->pps.get(); const seq_parameter_set* sps = pps->sps.get(); + if (sps->BitDepth_Y != img->get_bit_depth(0) || + sps->BitDepth_C != img->get_bit_depth(1)) { + img->integrity = INTEGRITY_DECODING_ERRORS; + ctx->add_warning(DE265_WARNING_BIT_DEPTH_OF_CURRENT_IMAGE_DOES_NOT_MATCH_SPS, false); + return; + } + + if (sps->chroma_format_idc != img->get_chroma_format()) { + img->integrity = INTEGRITY_DECODING_ERRORS; + ctx->add_warning(DE265_WARNING_CHROMA_OF_CURRENT_IMAGE_DOES_NOT_MATCH_SPS, false); + return; + } + const int SubWidthC = sps->SubWidthC; const int SubHeightC = sps->SubHeightC; @@ -354,6 +367,21 @@ // TODO: fill predSamplesC with black or grey } + else if (refPic->get_width(0) != sps->pic_width_in_luma_samples || + refPic->get_height(0) != sps->pic_height_in_luma_samples || + img->get_chroma_format() != refPic->get_chroma_format()) { + img->integrity = INTEGRITY_DECODING_ERRORS; + ctx->add_warning(DE265_WARNING_REFERENCE_IMAGE_SIZE_DOES_NOT_MATCH_SPS, false); + } + else if (img->get_bit_depth(0) != refPic->get_bit_depth(0) || + img->get_bit_depth(1) != refPic->get_bit_depth(1)) { + img->integrity = INTEGRITY_DECODING_ERRORS; + ctx->add_warning(DE265_WARNING_REFERENCE_IMAGE_BIT_DEPTH_DOES_NOT_MATCH, false); + } + else if (img->get_chroma_format() != refPic->get_chroma_format()) { + img->integrity = INTEGRITY_DECODING_ERRORS; + ctx->add_warning(DE265_WARNING_REFERENCE_IMAGE_CHROMA_FORMAT_DOES_NOT_MATCH, false); + } else { // 8.5.3.2.2 @@ -376,21 +404,23 @@ refPic->get_luma_stride(), nPbW,nPbH, bit_depth_L); } - if (img->high_bit_depth(1)) { - mc_chroma(ctx, sps, vi->mvl.x, vi->mvl.y, xP,yP, - predSamplesC0l,nCS, (const uint16_t*)refPic->get_image_plane(1), - refPic->get_chroma_stride(), nPbW/SubWidthC,nPbH/SubHeightC, bit_depth_C); - mc_chroma(ctx, sps, vi->mvl.x, vi->mvl.y, xP,yP, - predSamplesC1l,nCS, (const uint16_t*)refPic->get_image_plane(2), - refPic->get_chroma_stride(), nPbW/SubWidthC,nPbH/SubHeightC, bit_depth_C); - } - else { - mc_chroma(ctx, sps, vi->mvl.x, vi->mvl.y, xP,yP, - predSamplesC0l,nCS, (const uint8_t*)refPic->get_image_plane(1), - refPic->get_chroma_stride(), nPbW/SubWidthC,nPbH/SubHeightC, bit_depth_C); - mc_chroma(ctx, sps, vi->mvl.x, vi->mvl.y, xP,yP, - predSamplesC1l,nCS, (const uint8_t*)refPic->get_image_plane(2), - refPic->get_chroma_stride(), nPbW/SubWidthC,nPbH/SubHeightC, bit_depth_C); + if (img->get_chroma_format() != de265_chroma_mono) { + if (img->high_bit_depth(1)) { + mc_chroma(ctx, sps, vi->mvl.x, vi->mvl.y, xP, yP, + predSamplesC0l, nCS, (const uint16_t*) refPic->get_image_plane(1), + refPic->get_chroma_stride(), nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C); + mc_chroma(ctx, sps, vi->mvl.x, vi->mvl.y, xP, yP, + predSamplesC1l, nCS, (const uint16_t*) refPic->get_image_plane(2), + refPic->get_chroma_stride(), nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C); + } + else { + mc_chroma(ctx, sps, vi->mvl.x, vi->mvl.y, xP, yP, + predSamplesC0l, nCS, (const uint8_t*) refPic->get_image_plane(1), + refPic->get_chroma_stride(), nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C); + mc_chroma(ctx, sps, vi->mvl.x, vi->mvl.y, xP, yP, + predSamplesC1l, nCS, (const uint8_t*) refPic->get_image_plane(2), + refPic->get_chroma_stride(), nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C); + } } } } @@ -441,12 +471,15 @@ if (predFlag0==1 && predFlag1==0) { ctx->acceleration.put_unweighted_pred(pixels0, stride0, predSamplesL0,nCS, nPbW,nPbH, bit_depth_L); - ctx->acceleration.put_unweighted_pred(pixels1, stride1, - predSamplesC00,nCS, - nPbW/SubWidthC,nPbH/SubHeightC, bit_depth_C); - ctx->acceleration.put_unweighted_pred(pixels2, stride2, - predSamplesC10,nCS, - nPbW/SubWidthC,nPbH/SubHeightC, bit_depth_C); + + if (img->get_chroma_format() != de265_chroma_mono) { + ctx->acceleration.put_unweighted_pred(pixels1, stride1, + predSamplesC00, nCS, + nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C); + ctx->acceleration.put_unweighted_pred(pixels2, stride2, + predSamplesC10, nCS, + nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C); + } } else { ctx->add_warning(DE265_WARNING_BOTH_PREDFLAGS_ZERO, false); @@ -476,12 +509,14 @@ ctx->acceleration.put_weighted_pred(pixels0, stride0, predSamplesL0,nCS, nPbW,nPbH, luma_w0, luma_o0, luma_log2WD, bit_depth_L); - ctx->acceleration.put_weighted_pred(pixels1, stride1, - predSamplesC00,nCS, nPbW/SubWidthC,nPbH/SubHeightC, - chroma0_w0, chroma0_o0, chroma_log2WD, bit_depth_C); - ctx->acceleration.put_weighted_pred(pixels2, stride2, - predSamplesC10,nCS, nPbW/SubWidthC,nPbH/SubHeightC, - chroma1_w0, chroma1_o0, chroma_log2WD, bit_depth_C); + if (img->get_chroma_format() != de265_chroma_mono) { + ctx->acceleration.put_weighted_pred(pixels1, stride1, + predSamplesC00, nCS, nPbW / SubWidthC, nPbH / SubHeightC, + chroma0_w0, chroma0_o0, chroma_log2WD, bit_depth_C); + ctx->acceleration.put_weighted_pred(pixels2, stride2, + predSamplesC10, nCS, nPbW / SubWidthC, nPbH / SubHeightC, + chroma1_w0, chroma1_o0, chroma_log2WD, bit_depth_C); + } } else { ctx->add_warning(DE265_WARNING_BOTH_PREDFLAGS_ZERO, false); @@ -508,12 +543,14 @@ int16_t* in10 = predSamplesC10; int16_t* in11 = predSamplesC11; - ctx->acceleration.put_weighted_pred_avg(pixels1, stride1, - in00,in01, nCS, - nPbW/SubWidthC, nPbH/SubHeightC, bit_depth_C); - ctx->acceleration.put_weighted_pred_avg(pixels2, stride2, - in10,in11, nCS, - nPbW/SubWidthC, nPbH/SubHeightC, bit_depth_C); + if (img->get_chroma_format() != de265_chroma_mono) { + ctx->acceleration.put_weighted_pred_avg(pixels1, stride1, + in00, in01, nCS, + nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C); + ctx->acceleration.put_weighted_pred_avg(pixels2, stride2, + in10, in11, nCS, + nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C); + } } else { // weighted prediction @@ -555,16 +592,18 @@ int16_t* in10 = predSamplesC10; int16_t* in11 = predSamplesC11; - ctx->acceleration.put_weighted_bipred(pixels1, stride1, - in00,in01, nCS, nPbW/SubWidthC, nPbH/SubHeightC, - chroma0_w0,chroma0_o0, - chroma0_w1,chroma0_o1, - chroma_log2WD, bit_depth_C); - ctx->acceleration.put_weighted_bipred(pixels2, stride2, - in10,in11, nCS, nPbW/SubWidthC, nPbH/SubHeightC, - chroma1_w0,chroma1_o0, - chroma1_w1,chroma1_o1, - chroma_log2WD, bit_depth_C); + if (img->get_chroma_format() != de265_chroma_mono) { + ctx->acceleration.put_weighted_bipred(pixels1, stride1, + in00, in01, nCS, nPbW / SubWidthC, nPbH / SubHeightC, + chroma0_w0, chroma0_o0, + chroma0_w1, chroma0_o1, + chroma_log2WD, bit_depth_C); + ctx->acceleration.put_weighted_bipred(pixels2, stride2, + in10, in11, nCS, nPbW / SubWidthC, nPbH / SubHeightC, + chroma1_w0, chroma1_o0, + chroma1_w1, chroma1_o1, + chroma_log2WD, bit_depth_C); + } } } else if (predFlag0==1 || predFlag1==1) { @@ -573,12 +612,15 @@ if (pps->weighted_bipred_flag==0) { ctx->acceleration.put_unweighted_pred(pixels0, stride0, predSamplesLl,nCS, nPbW,nPbH, bit_depth_L); - ctx->acceleration.put_unweighted_pred(pixels1, stride1, - predSamplesC0l,nCS, - nPbW/SubWidthC,nPbH/SubHeightC, bit_depth_C); - ctx->acceleration.put_unweighted_pred(pixels2, stride2, - predSamplesC1l,nCS, - nPbW/SubWidthC,nPbH/SubHeightC, bit_depth_C); + + if (img->get_chroma_format() != de265_chroma_mono) { + ctx->acceleration.put_unweighted_pred(pixels1, stride1, + predSamplesC0l, nCS, + nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C); + ctx->acceleration.put_unweighted_pred(pixels2, stride2, + predSamplesC1l, nCS, + nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C); + } } else { int refIdx = vi->refIdxl; @@ -599,14 +641,17 @@ ctx->acceleration.put_weighted_pred(pixels0, stride0, predSamplesLl,nCS, nPbW,nPbH, luma_w, luma_o, luma_log2WD, bit_depth_L);
View file
libde265-1.0.9.tar.gz/libde265/nal.h -> libde265-1.0.11.tar.gz/libde265/nal.h
Changed
@@ -26,9 +26,6 @@ #endif #include <stdint.h> -#ifdef HAVE_STDBOOL_H -#include <stdbool.h> -#endif #include "libde265/bitstream.h" #include "libde265/cabac.h"
View file
libde265-1.0.9.tar.gz/libde265/sao.cc -> libde265-1.0.11.tar.gz/libde265/sao.cc
Changed
@@ -217,7 +217,14 @@ if (bandShift >= 8) { bandIdx = 0; } else { - bandIdx = bandTable in_imgxC+i+(yC+j)*in_stride>>bandShift ; + int pixel = in_imgxC+i+(yC+j)*in_stride; + + // Note: the input pixel value should never exceed the valid range, but it seems that it still does, + // maybe when there was a decoding error and the pixels have not been filled in correctly. + // Thus, we have to limit the pixel range to ensure that we have no illegal table access. + pixel = Clip3(0,maxPixelValue, pixel); + + bandIdx = bandTable pixel>>bandShift ; } if (bandIdx>0) { @@ -245,7 +252,14 @@ if (bandShift >= 8) { bandIdx = 0; } else { - bandIdx = bandTable in_imgxC+i+(yC+j)*in_stride>>bandShift ; + int pixel = in_imgxC+i+(yC+j)*in_stride; + + // Note: the input pixel value should never exceed the valid range, but it seems that it still does, + // maybe when there was a decoding error and the pixels have not been filled in correctly. + // Thus, we have to limit the pixel range to ensure that we have no illegal table access. + pixel = Clip3(0,maxPixelValue, pixel); + + bandIdx = bandTable pixel>>bandShift ; } if (bandIdx>0) {
View file
libde265-1.0.9.tar.gz/libde265/sps.cc -> libde265-1.0.11.tar.gz/libde265/sps.cc
Changed
@@ -901,13 +901,16 @@ if (!scaling_list_pred_mode_flag) { int scaling_list_pred_matrix_id_delta = get_uvlc(br); - if (sizeId==3) { - // adapt to our changed matrixId for size 3 - scaling_list_pred_matrix_id_delta *= 3; - } - - if (scaling_list_pred_matrix_id_delta == UVLC_ERROR || - scaling_list_pred_matrix_id_delta > matrixId) { + if (scaling_list_pred_matrix_id_delta == UVLC_ERROR) { + return DE265_ERROR_CODED_PARAMETER_OUT_OF_RANGE; + } + + if (sizeId == 3) { + // adapt to our changed matrixId for size 3 + scaling_list_pred_matrix_id_delta *= 3; + } + + if (scaling_list_pred_matrix_id_delta > matrixId) { return DE265_ERROR_CODED_PARAMETER_OUT_OF_RANGE; }
View file
libde265-1.0.9.tar.gz/libde265/threads.h -> libde265-1.0.11.tar.gz/libde265/threads.h
Changed
@@ -27,10 +27,6 @@ #include "config.h" #endif -#ifdef HAVE_STDBOOL_H -#include <stdbool.h> -#endif - #include <deque> #include <string> #include <atomic>
View file
libde265-1.0.9.tar.gz/libde265/vps.h -> libde265-1.0.11.tar.gz/libde265/vps.h
Changed
@@ -25,10 +25,6 @@ #include <config.h> #endif -#ifdef HAVE_STDBOOL_H -#include <stdbool.h> -#endif - #include "libde265/bitstream.h" #include "libde265/de265.h" #include "libde265/cabac.h"
View file
libde265-1.0.11.tar.gz/m4/visibility.m4
Added
@@ -0,0 +1,52 @@ +# visibility.m4 serial 1 (gettext-0.15) +dnl Copyright (C) 2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Tests whether the compiler supports the command-line option +dnl -fvisibility=hidden and the function and variable attributes +dnl __attribute__((__visibility__("hidden"))) and +dnl __attribute__((__visibility__("default"))). +dnl Does *not* test for __visibility__("protected") - which has tricky +dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on +dnl MacOS X. +dnl Does *not* test for __visibility__("internal") - which has processor +dnl dependent semantics. +dnl Does *not* test for #pragma GCC visibility push(hidden) - which is +dnl "really only recommended for legacy code". +dnl Set the variable CFLAG_VISIBILITY. +dnl Defines and sets the variable HAVE_VISIBILITY. + +AC_DEFUN(gl_VISIBILITY, + + AC_REQUIRE(AC_PROG_CC) + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + AC_MSG_CHECKING(for simple visibility declarations) + AC_CACHE_VAL(gl_cv_cc_visibility, + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + AC_TRY_COMPILE( + extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void);, + , + gl_cv_cc_visibility=yes, + gl_cv_cc_visibility=no) + CFLAGS="$gl_save_CFLAGS") + AC_MSG_RESULT($gl_cv_cc_visibility) + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + AC_SUBST(CFLAG_VISIBILITY) + AC_SUBST(HAVE_VISIBILITY) + AC_DEFINE_UNQUOTED(HAVE_VISIBILITY, $HAVE_VISIBILITY, + Define to 1 or 0, depending whether the compiler supports simple visibility declarations.) +)
View file
libde265-1.0.9.tar.gz/tools/rd-curves.cc -> libde265-1.0.11.tar.gz/tools/rd-curves.cc
Changed
@@ -28,7 +28,7 @@ #include <sys/stat.h> #include <unistd.h> #include <assert.h> -#include <stdint.h> +#include <cstdint> #include <string.h> #include <getopt.h>
View file
libde265-1.0.9.tar.gz/extra/stdbool.h
Deleted
@@ -1,64 +0,0 @@ -/* Copyright (C) 1998-2013 Free Software Foundation, Inc. - -This file is part of GCC, modify by Min Chen. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* - * ISO C Standard: 7.16 Boolean type and values <stdbool.h> - */ - -#ifndef _STDBOOL_H -#define _STDBOOL_H - -#ifndef __cplusplus - -#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -#define bool _Bool -#define true 1 -#define false 0 - -#else /* not C99 */ - -typedef enum { - false = 0, - true = 1 -} bool; - -#endif /* not C99 */ - -#else /* __cplusplus */ - -#if !defined(_MSC_VER) - -/* Supporting <stdbool.h> in C++ is a GCC extension. */ -#define _Bool bool -#define bool bool -#define false false -#define true true - -#endif /* _MSC_VER */ - -#endif /* __cplusplus */ - -/* Signal that all the definitions are present. */ -#define __bool_true_false_are_defined 1 - -#endif /* stdbool.h */
View file
libde265-1.0.9.tar.gz/extra/stdint.h
Deleted
@@ -1,203 +0,0 @@ -/* ISO C9x 7.18 Integer types <stdint.h> - * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794) - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz> - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Date: 2000-12-02 - */ - - -#ifndef _STDINT_H -#define _STDINT_H -#define __need_wint_t -#define __need_wchar_t -#include <stddef.h> - -/* 7.18.1.1 Exact-width integer types */ -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef short int16_t; -typedef unsigned short uint16_t; -typedef int int32_t; -typedef unsigned uint32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; - -/* 7.18.1.2 Minimum-width integer types */ -typedef signed char int_least8_t; -typedef unsigned char uint_least8_t; -typedef short int_least16_t; -typedef unsigned short uint_least16_t; -typedef int int_least32_t; -typedef unsigned uint_least32_t; -typedef __int64 int_least64_t; -typedef unsigned __int64 uint_least64_t; - -/* 7.18.1.3 Fastest minimum-width integer types - * Not actually guaranteed to be fastest for all purposes - * Here we use the exact-width types for 8 and 16-bit ints. - */ -typedef char int_fast8_t; -typedef unsigned char uint_fast8_t; -typedef short int_fast16_t; -typedef unsigned short uint_fast16_t; -typedef int int_fast32_t; -typedef unsigned int uint_fast32_t; -typedef __int64 int_fast64_t; -typedef unsigned __int64 uint_fast64_t; - -/* 7.18.1.4 Integer types capable of holding object pointers */ -/*typedef int intptr_t; -typedef unsigned uintptr_t;*/ - -/* 7.18.1.5 Greatest-width integer types */ -typedef __int64 intmax_t; -typedef unsigned __int64 uintmax_t; - -/* 7.18.2 Limits of specified-width integer types */ -#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS) - -/* 7.18.2.1 Limits of exact-width integer types */ -#define INT8_MIN (-128) -#define INT16_MIN (-32768) -#define INT32_MIN (-2147483647 - 1) -#define INT64_MIN (-9223372036854775807LL - 1) - -#define INT8_MAX 127 -#define INT16_MAX 32767 -#define INT32_MAX 2147483647 -#define INT64_MAX 9223372036854775807LL - -#define UINT8_MAX 0xff /* 255U */ -#define UINT16_MAX 0xffff /* 65535U */ -#define UINT32_MAX 0xffffffff /* 4294967295U */ -#define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */ - -/* 7.18.2.2 Limits of minimum-width integer types */ -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST64_MIN INT64_MIN - -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MAX INT64_MAX - -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -/* 7.18.2.3 Limits of fastest minimum-width integer types */ -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST64_MIN INT64_MIN - -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MAX INT64_MAX - -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -/* 7.18.2.4 Limits of integer types capable of holding - object pointers */ -#if defined(_WIN64) || defined(__LP64__) -#define INTPTR_MIN INT64_MIN -#define INTPTR_MAX INT64_MAX -#define UINTPTR_MAX UINT64_MAX -#else -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#endif - -/* 7.18.2.5 Limits of greatest-width integer types */ -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -/* 7.18.3 Limits of other integer types */ -#if defined(_WIN64) || defined(__LP64__) -#define PTRDIFF_MIN INT64_MIN -#define PTRDIFF_MAX INT64_MAX -#else -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX -#endif - -#define SIG_ATOMIC_MIN INT32_MIN -#define SIG_ATOMIC_MAX INT32_MAX - -#ifndef SIZE_MAX -#if defined(_WIN64) || defined(__LP64__) -#define SIZE_MAX UINT64_MAX -#else -#define SIZE_MAX UINT32_MAX -#endif -#endif - -#ifndef WCHAR_MIN /* also in wchar.h */ -#define WCHAR_MIN 0 -#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */ -#endif - -/* - * wint_t is unsigned short for compatibility with MS runtime - */ -#define WINT_MIN 0 -#define WINT_MAX ((wint_t)-1) /* UINT16_MAX */ - -#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */ - - -/* 7.18.4 Macros for integer constants */ -#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS) - -/* 7.18.4.1 Macros for minimum-width integer constants - - Accoding to Douglas Gwyn <gwyn@arl.mil>: - "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC - 9899:1999 as initially published, the expansion was required - to be an integer constant of precisely matching type, which - is impossible to accomplish for the shorter types on most - platforms, because C99 provides no standard way to designate - an integer constant with width less than that of type int. - TC1 changed this to require just an integer constant - *expression* with *promoted* type." - - The trick used here is from Clive D W Feather. -*/ - -#define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val)) -#define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val)) -#define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val)) -#define INT64_C(val) (INT_LEAST64_MAX-INT_LEAST64_MAX+(val)) - -#define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val)) -#define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val)) -#define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val)) -#define UINT64_C(val) (UINT_LEAST64_MAX-UINT_LEAST64_MAX+(val)) - -/* 7.18.4.2 Macros for greatest-width integer constants */ -#define INTMAX_C(val) (INTMAX_MAX-INTMAX_MAX+(val)) -#define UINTMAX_C(val) (UINTMAX_MAX-UINTMAX_MAX+(val))
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.