Bug 1411883 - P2. Update resync documentation. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 26 Oct 2017 12:55:35 +0200
changeset 388421 3cc70231a4dc7eaca789bbe386a22846092359c7
parent 388420 10722a70033558fc04d5bba583fbf8289fc1eb8c
child 388422 2fa4b23d5e7e7fb2975de3082bf5ed3439427b7e
push id32750
push userarchaeopteryx@coole-files.de
push dateThu, 26 Oct 2017 21:56:27 +0000
treeherdermozilla-central@a6d7be4ac1e3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1411883
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1411883 - P2. Update resync documentation. r=gerald MozReview-Commit-ID: 9L6B8qPsUcR
media/ffvpx/FILES
media/ffvpx/README_MOZILLA
media/ffvpx/libavcodec/x86/h264_i386.h
--- a/media/ffvpx/FILES
+++ b/media/ffvpx/FILES
@@ -1,12 +1,13 @@
 ./COPYING.LGPLv2.1
 ./COPYING.LGPLv3
 ./compat/va_copy.h
 ./compat/w32pthreads.h
+./compat/atomics/win32/stdatomic.h
 ./libavcodec/audioconvert.c
 ./libavcodec/audioconvert.h
 ./libavcodec/avpicture.c
 ./libavcodec/bit_depth_template.c
 ./libavcodec/fdctdsp.h
 ./libavcodec/flacdata.c
 ./libavcodec/flacdata.h
 ./libavcodec/flacdsp_lpc_template.c
@@ -53,17 +54,16 @@
 ./libavcodec/x86/vp56_arith.h
 ./libavcodec/x86/vp9dsp_init.h
 ./libavcodec/x86/vp9dsp_init_10bpp.c
 ./libavcodec/x86/vp9dsp_init_12bpp.c
 ./libavcodec/x86/vp9intrapred.asm
 ./libavcodec/x86/vp9itxfm_16bpp.asm
 ./libavcodec/x86/vp9itxfm_template.asm
 ./libavcodec/x86/vp9mc_16bpp.asm
-./libavcodec/x86/h264_i386.h
 ./libavcodec/x86/vp9lpf.asm
 ./libavcodec/x86/vp9lpf_16bpp.asm
 ./libavcodec/x86/constants.h
 ./libavcodec/x86/flacdsp_init.c
 ./libavcodec/x86/h264_intrapred.asm
 ./libavcodec/x86/h264_intrapred_10bit.asm
 ./libavcodec/x86/h264_intrapred_init.c
 ./libavcodec/x86/videodsp.asm
@@ -77,17 +77,16 @@
 ./libavcodec/x86/vp9intrapred_16bpp.asm
 ./libavcodec/x86/vp9itxfm.asm
 ./libavcodec/x86/vp9mc.asm
 ./libavcodec/xiph.c
 ./libavcodec/xiph.h
 ./libavcodec/bsf.h
 ./libavcodec/h264dsp.h
 ./libavcodec/imgconvert.c
-./libavcodec/avcodec.symbols
 ./libavcodec/bsf.c
 ./libavcodec/decode.c
 ./libavcodec/decode.h
 ./libavcodec/hwaccel.h
 ./libavcodec/vp9block.c
 ./libavcodec/vp9data.c
 ./libavcodec/vp9dec.h
 ./libavcodec/vp9lpf.c
@@ -97,17 +96,16 @@
 ./libavcodec/vp9shared.h
 ./libavcodec/allcodecs.c
 ./libavcodec/avcodec.h
 ./libavcodec/avpacket.c
 ./libavcodec/bitstream.c
 ./libavcodec/blockdsp.h
 ./libavcodec/bytestream.h
 ./libavcodec/codec_desc.c
-./libavcodec/dummy_funcs.c
 ./libavcodec/error_resilience.h
 ./libavcodec/flac.c
 ./libavcodec/flac.h
 ./libavcodec/flac_parser.c
 ./libavcodec/flacdec.c
 ./libavcodec/flacdsp.c
 ./libavcodec/flacdsp.h
 ./libavcodec/flacdsp_template.c
@@ -167,22 +165,20 @@
 ./libavutil/bprint.h
 ./libavutil/bswap.h
 ./libavutil/color_utils.c
 ./libavutil/color_utils.h
 ./libavutil/colorspace.h
 ./libavutil/common.h
 ./libavutil/crc.c
 ./libavutil/dict.h
-./libavutil/display.c
 ./libavutil/error.c
 ./libavutil/error.h
 ./libavutil/eval.h
 ./libavutil/ffmath.h
-./libavutil/fftime.h
 ./libavutil/ffversion.h
 ./libavutil/fifo.c
 ./libavutil/fifo.h
 ./libavutil/fixed_dsp.c
 ./libavutil/fixed_dsp.h
 ./libavutil/integer.c
 ./libavutil/integer.h
 ./libavutil/intfloat.h
@@ -234,27 +230,25 @@
 ./libavutil/dynarray.h
 ./libavutil/log.h
 ./libavutil/mathematics.h
 ./libavutil/rational.h
 ./libavutil/samplefmt.c
 ./libavutil/samplefmt.h
 ./libavutil/timestamp.h
 ./libavutil/opt.c
-./libavutil/dummy_funcs.c
 ./libavutil/imgutils_internal.h
 ./libavutil/reverse.h
 ./libavutil/slicethread.c
 ./libavutil/slicethread.h
 ./libavutil/atomic_gcc.h
 ./libavutil/attributes.h
 ./libavutil/avstring.c
 ./libavutil/avstring.h
 ./libavutil/avutil.h
-./libavutil/avutil.symbols
 ./libavutil/buffer.c
 ./libavutil/buffer.h
 ./libavutil/buffer_internal.h
 ./libavutil/channel_layout.c
 ./libavutil/channel_layout.h
 ./libavutil/cpu.c
 ./libavutil/cpu.h
 ./libavutil/cpu_internal.h
--- a/media/ffvpx/README_MOZILLA
+++ b/media/ffvpx/README_MOZILLA
@@ -32,11 +32,18 @@ config_win32/64.h/asm:
 add to configure command: --toolchain=msvc
 
 Regenerate defaults_disabled.{h,asm} with:
 $ grep -E ".*_(INDEV|OUTDEV|DECODER|ENCODER|DEMUXER|MUXER|PARSER|FILTER|HWACCEL|PROTOCOL|ENCODERS|DECODERS|HWACCELS|INDEVS|OUTDEVS|FILTERS|DEMUXERS|MUXERS|PROTOCOLS) 0" config.h > ~/Work/Mozilla/mozilla-central/media/ffvpx/defaults_disabled.h
 $ grep -E ".*_(INDEV|OUTDEV|DECODER|ENCODER|DEMUXER|MUXER|PARSER|FILTER|HWACCEL|PROTOCOL|ENCODERS|DECODERS|HWACCELS|INDEVS|OUTDEVS|FILTERS|DEMUXERS|MUXERS|PROTOCOLS) 0" config.asm > ~/Work/Mozilla/mozilla-central/media/ffvpx/defaults_disabled.asm
 
 All new decoders/muxers/encoders/... should be added in the list of dummy functions found in libavcodec/dummy_funcs.c
 otherwise linkage will fail on Windows. On other platforms they are optimised out and aren't necessary.
+The GNU comm utility is a useful tool to compare and extract only the changes.
 
-To update the source tree, the files listed in FILES should typically be able to be copied as-is from ffmpeg tree.
+To update the source tree, perform a diff on the files listed in FILES.
+The diffs should typically apply to the ffvpx tree.
+e.g. something like this would do:
+Run in the ffmpeg original tree:
+$ for i in `cat $PATH_CENTRAL/media/ffvpx/FILES`; do diff $REV_LASTSYNC HEAD >> patch.diff; done
+Then apply patch.diff on the ffvpx tree.
+
 Compilation will reveal if any files are missing.
deleted file mode 100644
--- a/media/ffvpx/libavcodec/x86/h264_i386.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder
- * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file
- * H.264 / AVC / MPEG-4 part10 codec.
- * non-MMX i386-specific optimizations for H.264
- * @author Michael Niedermayer <michaelni@gmx.at>
- */
-
-#ifndef AVCODEC_X86_H264_I386_H
-#define AVCODEC_X86_H264_I386_H
-
-#include <stddef.h>
-
-#include "libavcodec/cabac.h"
-#include "cabac.h"
-
-#if HAVE_INLINE_ASM
-
-#if ARCH_X86_64
-#define REG64 "r"
-#else
-#define REG64 "m"
-#endif
-
-//FIXME use some macros to avoid duplicating get_cabac (cannot be done yet
-//as that would make optimization work hard)
-#if HAVE_7REGS && !BROKEN_COMPILER
-#define decode_significance decode_significance_x86
-static int decode_significance_x86(CABACContext *c, int max_coeff,
-                                   uint8_t *significant_coeff_ctx_base,
-                                   int *index, x86_reg last_off){
-    void *end= significant_coeff_ctx_base + max_coeff - 1;
-    int minusstart= -(intptr_t)significant_coeff_ctx_base;
-    int minusindex= 4-(intptr_t)index;
-    int bit;
-    x86_reg coeff_count;
-
-#ifdef BROKEN_RELOCATIONS
-    void *tables;
-
-    __asm__ volatile(
-        "lea   "MANGLE(ff_h264_cabac_tables)", %0      \n\t"
-        : "=&r"(tables)
-        : NAMED_CONSTRAINTS_ARRAY(ff_h264_cabac_tables)
-    );
-#endif
-
-    __asm__ volatile(
-        "3:                                     \n\t"
-
-        BRANCHLESS_GET_CABAC("%4", "%q4", "(%1)", "%3", "%w3",
-                             "%5", "%q5", "%k0", "%b0",
-                             "%c11(%6)", "%c12(%6)",
-                             AV_STRINGIFY(H264_NORM_SHIFT_OFFSET),
-                             AV_STRINGIFY(H264_LPS_RANGE_OFFSET),
-                             AV_STRINGIFY(H264_MLPS_STATE_OFFSET),
-                             "%13")
-
-        "test $1, %4                            \n\t"
-        " jz 4f                                 \n\t"
-        "add  %10, %1                           \n\t"
-
-        BRANCHLESS_GET_CABAC("%4", "%q4", "(%1)", "%3", "%w3",
-                             "%5", "%q5", "%k0", "%b0",
-                             "%c11(%6)", "%c12(%6)",
-                             AV_STRINGIFY(H264_NORM_SHIFT_OFFSET),
-                             AV_STRINGIFY(H264_LPS_RANGE_OFFSET),
-                             AV_STRINGIFY(H264_MLPS_STATE_OFFSET),
-                             "%13")
-
-        "sub  %10, %1                           \n\t"
-        "mov  %2, %0                            \n\t"
-        "movl %7, %%ecx                         \n\t"
-        "add  %1, %%"FF_REG_c"                  \n\t"
-        "movl %%ecx, (%0)                       \n\t"
-
-        "test $1, %4                            \n\t"
-        " jnz 5f                                \n\t"
-
-        "add"FF_OPSIZE"  $4, %2                 \n\t"
-
-        "4:                                     \n\t"
-        "add  $1, %1                            \n\t"
-        "cmp  %8, %1                            \n\t"
-        " jb 3b                                 \n\t"
-        "mov  %2, %0                            \n\t"
-        "movl %7, %%ecx                         \n\t"
-        "add  %1, %%"FF_REG_c"                  \n\t"
-        "movl %%ecx, (%0)                       \n\t"
-        "5:                                     \n\t"
-        "add  %9, %k0                           \n\t"
-        "shr $2, %k0                            \n\t"
-        : "=&q"(coeff_count), "+r"(significant_coeff_ctx_base), "+m"(index),
-          "+&r"(c->low), "=&r"(bit), "+&r"(c->range)
-        : "r"(c), "m"(minusstart), "m"(end), "m"(minusindex), "m"(last_off),
-          "i"(offsetof(CABACContext, bytestream)),
-          "i"(offsetof(CABACContext, bytestream_end))
-          TABLES_ARG
-        : "%"FF_REG_c, "memory"
-    );
-    return coeff_count;
-}
-
-#define decode_significance_8x8 decode_significance_8x8_x86
-static int decode_significance_8x8_x86(CABACContext *c,
-                                       uint8_t *significant_coeff_ctx_base,
-                                       int *index, uint8_t *last_coeff_ctx_base, const uint8_t *sig_off){
-    int minusindex= 4-(intptr_t)index;
-    int bit;
-    x86_reg coeff_count;
-    x86_reg last=0;
-    x86_reg state;
-
-#ifdef BROKEN_RELOCATIONS
-    void *tables;
-
-    __asm__ volatile(
-        "lea    "MANGLE(ff_h264_cabac_tables)", %0      \n\t"
-        : "=&r"(tables)
-        : NAMED_CONSTRAINTS_ARRAY(ff_h264_cabac_tables)
-    );
-#endif
-
-    __asm__ volatile(
-        "mov %1, %6                             \n\t"
-        "3:                                     \n\t"
-
-        "mov %10, %0                            \n\t"
-        "movzb (%0, %6), %6                     \n\t"
-        "add %9, %6                             \n\t"
-
-        BRANCHLESS_GET_CABAC("%4", "%q4", "(%6)", "%3", "%w3",
-                             "%5", "%q5", "%k0", "%b0",
-                             "%c12(%7)", "%c13(%7)",
-                             AV_STRINGIFY(H264_NORM_SHIFT_OFFSET),
-                             AV_STRINGIFY(H264_LPS_RANGE_OFFSET),
-                             AV_STRINGIFY(H264_MLPS_STATE_OFFSET),
-                             "%15")
-
-        "mov %1, %6                             \n\t"
-        "test $1, %4                            \n\t"
-        " jz 4f                                 \n\t"
-
-#ifdef BROKEN_RELOCATIONS
-        "movzb %c14(%15, %q6), %6\n\t"
-#else
-        "movzb "MANGLE(ff_h264_cabac_tables)"+%c14(%6), %6\n\t"
-#endif
-        "add %11, %6                            \n\t"
-
-        BRANCHLESS_GET_CABAC("%4", "%q4", "(%6)", "%3", "%w3",
-                             "%5", "%q5", "%k0", "%b0",
-                             "%c12(%7)", "%c13(%7)",
-                             AV_STRINGIFY(H264_NORM_SHIFT_OFFSET),
-                             AV_STRINGIFY(H264_LPS_RANGE_OFFSET),
-                             AV_STRINGIFY(H264_MLPS_STATE_OFFSET),
-                             "%15")
-
-        "mov %2, %0                             \n\t"
-        "mov %1, %6                             \n\t"
-        "mov %k6, (%0)                          \n\t"
-
-        "test $1, %4                            \n\t"
-        " jnz 5f                                \n\t"
-
-        "add"FF_OPSIZE"  $4, %2                 \n\t"
-
-        "4:                                     \n\t"
-        "add $1, %6                             \n\t"
-        "mov %6, %1                             \n\t"
-        "cmp $63, %6                            \n\t"
-        " jb 3b                                 \n\t"
-        "mov %2, %0                             \n\t"
-        "mov %k6, (%0)                          \n\t"
-        "5:                                     \n\t"
-        "addl %8, %k0                           \n\t"
-        "shr $2, %k0                            \n\t"
-        : "=&q"(coeff_count), "+"REG64(last), "+"REG64(index), "+&r"(c->low),
-          "=&r"(bit), "+&r"(c->range), "=&r"(state)
-        : "r"(c), "m"(minusindex), "m"(significant_coeff_ctx_base),
-          REG64(sig_off), REG64(last_coeff_ctx_base),
-          "i"(offsetof(CABACContext, bytestream)),
-          "i"(offsetof(CABACContext, bytestream_end)),
-          "i"(H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET) TABLES_ARG
-        : "%"FF_REG_c, "memory"
-    );
-    return coeff_count;
-}
-#endif /* HAVE_7REGS && BROKEN_COMPILER */
-
-#endif /* HAVE_INLINE_ASM */
-#endif /* AVCODEC_X86_H264_I386_H */