Skip to content

Commit

Permalink
ogg/openh264/libde265/thorのコードを最新化 (libvpxは #2 により更新見送り)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuki committed Oct 31, 2015
1 parent 143096a commit 609e653
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 60 deletions.
2 changes: 1 addition & 1 deletion native/libde265
Submodule libde265 updated 98 files
+17 −0 .travis.yml
+1 −1 CMakeLists.txt
+1 −1 Makefile.am
+17 −0 acceleration-speed/Makefile.am
+219 −0 acceleration-speed/acceleration-speed.cc
+65 −0 acceleration-speed/acceleration-speed.h
+33 −0 acceleration-speed/dct-scalar.cc
+158 −0 acceleration-speed/dct-scalar.h
+177 −0 acceleration-speed/dct-sse.cc
+144 −0 acceleration-speed/dct.cc
+111 −0 acceleration-speed/dct.h
+1 −0 configure.ac
+18 −8 dec265/dec265.cc
+1 −0 enc265/CMakeLists.txt
+1 −1 enc265/Makefile.am
+44 −11 enc265/enc265.cc
+110 −0 enc265/image-io-png.cc
+56 −0 enc265/image-io-png.h
+7 −11 libde265/CMakeLists.txt
+6 −3 libde265/Makefile.vc7
+7 −1 libde265/configparam.cc
+3 −2 libde265/configparam.h
+1 −1 libde265/contextmodel.cc
+2 −2 libde265/de265.cc
+65 −60 libde265/deblock.cc
+217 −232 libde265/decctx.cc
+21 −19 libde265/decctx.h
+1 −1 libde265/dpb.cc
+1 −1 libde265/dpb.h
+7 −8 libde265/encoder/CMakeLists.txt
+3 −2 libde265/encoder/Makefile.am
+4 −1 libde265/encoder/algo/CMakeLists.txt
+2 −0 libde265/encoder/algo/Makefile.am
+71 −0 libde265/encoder/algo/algo.cc
+31 −10 libde265/encoder/algo/algo.h
+16 −16 libde265/encoder/algo/cb-interpartmode.cc
+4 −1 libde265/encoder/algo/cb-interpartmode.h
+13 −9 libde265/encoder/algo/cb-intra-inter.cc
+2 −1 libde265/encoder/algo/cb-intra-inter.h
+30 −25 libde265/encoder/algo/cb-intrapartmode.cc
+7 −1 libde265/encoder/algo/cb-intrapartmode.h
+51 −14 libde265/encoder/algo/cb-mergeindex.cc
+2 −1 libde265/encoder/algo/cb-mergeindex.h
+18 −10 libde265/encoder/algo/cb-skip.cc
+4 −1 libde265/encoder/algo/cb-skip.h
+36 −13 libde265/encoder/algo/cb-split.cc
+4 −1 libde265/encoder/algo/cb-split.h
+76 −44 libde265/encoder/algo/coding-options.cc
+35 −18 libde265/encoder/algo/coding-options.h
+17 −9 libde265/encoder/algo/ctb-qscale.cc
+4 −2 libde265/encoder/algo/ctb-qscale.h
+18 −6 libde265/encoder/algo/pb-mv.cc
+0 −1 libde265/encoder/algo/pb-mv.h
+265 −258 libde265/encoder/algo/tb-intrapredmode.cc
+56 −40 libde265/encoder/algo/tb-intrapredmode.h
+46 −0 libde265/encoder/algo/tb-rateestim.cc
+101 −0 libde265/encoder/algo/tb-rateestim.h
+208 −356 libde265/encoder/algo/tb-split.cc
+14 −40 libde265/encoder/algo/tb-split.h
+254 −0 libde265/encoder/algo/tb-transform.cc
+86 −0 libde265/encoder/algo/tb-transform.h
+0 −289 libde265/encoder/encode.h
+44 −25 libde265/encoder/encoder-context.cc
+19 −5 libde265/encoder/encoder-context.h
+81 −24 libde265/encoder/encoder-core.cc
+10 −5 libde265/encoder/encoder-core.h
+8 −0 libde265/encoder/encoder-params.cc
+4 −2 libde265/encoder/encoder-params.h
+146 −398 libde265/encoder/encoder-syntax.cc
+102 −0 libde265/encoder/encoder-syntax.h
+766 −0 libde265/encoder/encoder-types.cc
+409 −0 libde265/encoder/encoder-types.h
+3 −3 libde265/encoder/sop.cc
+0 −2 libde265/fallback-dct.cc
+18 −0 libde265/image-io.cc
+3 −4 libde265/image-io.h
+47 −31 libde265/image.cc
+45 −22 libde265/image.h
+606 −200 libde265/intrapred.cc
+26 −4 libde265/intrapred.h
+228 −147 libde265/motion.cc
+32 −12 libde265/motion.h
+4 −2 libde265/pps.cc
+2 −0 libde265/pps.h
+0 −1 libde265/quality.cc
+34 −25 libde265/sao.cc
+1 −1 libde265/sei.cc
+159 −144 libde265/slice.cc
+5 −0 libde265/slice.h
+42 −10 libde265/sps.cc
+1 −1 libde265/sps.h
+47 −47 libde265/transform.cc
+17 −9 libde265/util.cc
+7 −3 libde265/util.h
+44 −38 libde265/visualize.cc
+3 −3 libde265/x86/CMakeLists.txt
+22 −4 sherlock265/VideoDecoder.cc
+0 −1 tools/Makefile.am
10 changes: 5 additions & 5 deletions native/libde265_binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ extern "C" {

void libde265_encoder_hack(encoder_context *ctx, int w, int h)
{
ctx->sps.set_defaults();
ctx->sps.set_resolution(w, h);
ctx->sps.compute_derived_values();
//ctx->sps.set_defaults();
//ctx->sps.set_resolution(w, h);
//ctx->sps.compute_derived_values();
}

de265_image *libde265_image_allocate(encoder_context *ctx, int w, int h)
{
de265_image *img = new de265_image;
img->alloc_image(w, h, de265_chroma_420, &ctx->sps, false,
NULL, ctx, 0, NULL, false);
//img->alloc_image(w, h, de265_chroma_420, &ctx->sps, false,
//NULL, ctx, 0, NULL, false);
return img;
}

Expand Down
2 changes: 1 addition & 1 deletion native/ogg
Submodule ogg updated from 9b2ba4 to 6c36ab
2 changes: 1 addition & 1 deletion native/openh264
Submodule openh264 updated 97 files
+4 −0 .gitignore
+3 −3 Makefile
+2 −1 README.md
+39 −0 RELEASES
+51 −0 build/Dockerfile
+0 −0 build/platform-bsd.mk
+1 −1 codec/api/svc/codec_def.h
+4 −4 codec/api/svc/codec_ver.h
+26 −0 codec/build/iOS/common/common.xcodeproj/project.pbxproj
+18 −6 codec/build/iOS/enc/welsenc/welsenc.xcodeproj/project.pbxproj
+24 −8 codec/build/win32/enc/WelsEncCore.vcproj
+168 −0 codec/common/inc/WelsCircleQueue.h
+233 −0 codec/common/inc/WelsList.h
+97 −0 codec/common/inc/WelsLock.h
+59 −0 codec/common/inc/WelsTask.h
+83 −0 codec/common/inc/WelsTaskThread.h
+105 −0 codec/common/inc/WelsThread.h
+4 −2 codec/common/inc/WelsThreadLib.h
+118 −0 codec/common/inc/WelsThreadPool.h
+1 −1 codec/common/inc/crt_util_safe_x.h
+5 −0 codec/common/inc/macros.h
+1 −1 codec/common/inc/mc.h
+6 −0 codec/common/inc/memory_align.h
+89 −0 codec/common/src/WelsTaskThread.cpp
+125 −0 codec/common/src/WelsThread.cpp
+43 −3 codec/common/src/WelsThreadLib.cpp
+273 −0 codec/common/src/WelsThreadPool.cpp
+5 −3 codec/common/src/crt_util_safe_x.cpp
+20 −20 codec/common/src/deblocking_common.cpp
+24 −24 codec/common/src/mc.cpp
+1 −1 codec/common/src/utils.cpp
+3 −0 codec/common/targets.mk
+1 −1 codec/decoder/core/inc/dec_golomb.h
+1 −1 codec/decoder/core/inc/decoder.h
+3 −0 codec/decoder/core/inc/error_code.h
+1 −1 codec/decoder/core/inc/wels_const.h
+32 −24 codec/decoder/core/src/au_parser.cpp
+4 −1 codec/decoder/core/src/cabac_decoder.cpp
+2 −2 codec/decoder/core/src/decode_slice.cpp
+19 −11 codec/decoder/core/src/decoder.cpp
+15 −15 codec/decoder/core/src/decoder_core.cpp
+11 −10 codec/decoder/core/src/error_concealment.cpp
+17 −2 codec/decoder/core/src/manage_dec_ref.cpp
+1 −1 codec/decoder/core/src/parse_mb_syn_cabac.cpp
+1 −1 codec/decoder/core/src/parse_mb_syn_cavlc.cpp
+2 −2 codec/decoder/core/src/rec_mb.cpp
+1 −1 codec/decoder/plus/inc/welsDecoderExt.h
+19 −10 codec/decoder/plus/src/welsDecoderExt.cpp
+1 −0 codec/encoder/core/inc/encoder.h
+3 −1 codec/encoder/core/inc/encoder_context.h
+2 −0 codec/encoder/core/inc/mt_defs.h
+2 −2 codec/encoder/core/inc/param_svc.h
+52 −10 codec/encoder/core/inc/set_mb_syn_cabac.h
+5 −0 codec/encoder/core/inc/slice_multi_threading.h
+3 −0 codec/encoder/core/inc/svc_enc_slice_segment.h
+4 −4 codec/encoder/core/inc/svc_motion_estimate.h
+1 −0 codec/encoder/core/inc/wels_common_basis.h
+30 −35 codec/encoder/core/inc/wels_task_base.h
+127 −0 codec/encoder/core/inc/wels_task_encoder.h
+128 −0 codec/encoder/core/inc/wels_task_management.h
+4 −4 codec/encoder/core/src/encode_mb_aux.cpp
+38 −12 codec/encoder/core/src/encoder.cpp
+21 −33 codec/encoder/core/src/encoder_ext.cpp
+0 −139 codec/encoder/core/src/property.cpp
+121 −70 codec/encoder/core/src/ref_list_mgr_svc.cpp
+81 −116 codec/encoder/core/src/set_mb_syn_cabac.cpp
+1 −1 codec/encoder/core/src/set_mb_syn_cavlc.cpp
+8 −1 codec/encoder/core/src/slice_multi_threading.cpp
+2 −2 codec/encoder/core/src/svc_mode_decision.cpp
+21 −21 codec/encoder/core/src/svc_motion_estimate.cpp
+30 −25 codec/encoder/core/src/svc_set_mb_syn_cabac.cpp
+55 −0 codec/encoder/core/src/wels_task_base.cpp
+208 −0 codec/encoder/core/src/wels_task_encoder.cpp
+213 −0 codec/encoder/core/src/wels_task_management.cpp
+1 −0 codec/encoder/plus/inc/welsEncoderExt.h
+26 −15 codec/encoder/plus/src/welsEncoderExt.cpp
+3 −1 codec/encoder/targets.mk
+117 −0 codec/processing/src/arm/down_sample_neon.S
+107 −1 codec/processing/src/arm64/down_sample_aarch64_neon.S
+33 −0 codec/processing/src/downsample/downsample.cpp
+32 −5 codec/processing/src/downsample/downsample.h
+47 −0 codec/processing/src/downsample/downsamplefuncs.cpp
+699 −0 codec/processing/src/x86/downsample_bilinear.asm
+1 −1 gmpopenh264.info
+4 −4 openh264.rc
+154 −12 test/api/encode_decode_api_test.cpp
+1 −1 test/api/encoder_test.cpp
+8 −0 test/build/win32/codec_ut/codec_unittest.vcproj
+196 −0 test/common/CWelsCircleQueue.cpp
+222 −0 test/common/CWelsListTest.cpp
+2 −0 test/common/targets.mk
+3 −3 test/decoder/DecUT_DeblockCommon.cpp
+25 −22 test/decoder/DecUT_ParseSyntax.cpp
+34 −0 test/encoder/EncUT_EncoderTaskManagement.cpp
+1 −0 test/encoder/targets.mk
+2 −2 test/encoder_binary_comparison/Scripts/run_BinarySHA1Comparison.sh
+88 −0 test/processing/ProcessUT_DownSample.cpp
2 changes: 1 addition & 1 deletion native/thor
Submodule thor updated 56 files
+3 −2 Makefile
+26 −22 build/Thor.sln
+167 −0 build/ThorDec/ThorDec.vcxproj
+117 −0 build/ThorDec/ThorDec.vcxproj.filters
+171 −0 build/ThorEnc/ThorEnc.vcxproj
+129 −0 build/ThorEnc/ThorEnc.vcxproj.filters
+16 −27 common/common_block.c
+1 −1 common/common_block.h
+210 −125 common/common_frame.c
+3 −0 common/common_frame.h
+650 −95 common/common_kernels.c
+8 −2 common/common_kernels.h
+21 −16 common/global.h
+338 −331 common/inter_prediction.c
+6 −3 common/inter_prediction.h
+202 −406 common/intra_prediction.c
+15 −11 common/intra_prediction.h
+14 −17 common/simd.h
+2 −0 common/simd/v128_intrinsics.h
+8 −0 common/simd/v128_intrinsics_arm.h
+8 −0 common/simd/v128_intrinsics_c.h
+34 −120 common/simd/v128_intrinsics_x86.h
+2 −0 common/simd/v64_intrinsics.h
+8 −0 common/simd/v64_intrinsics_arm.h
+21 −5 common/simd/v64_intrinsics_c.h
+27 −99 common/simd/v64_intrinsics_x86.h
+9 −4 common/snr.c
+1 −1 common/snr.h
+1,050 −0 common/temporal_interp.c
+7 −0 common/temporal_interp.h
+81 −37 common/transform.c
+56 −36 common/types.h
+43 −0 config_HDB_high_efficiency.txt
+43 −0 config_HDB_low_complexity.txt
+43 −0 config_HDB_medium_complexity.txt
+26 −0 config_LDB_high_efficiency.txt
+26 −0 config_LDB_low_complexity.txt
+26 −0 config_LDB_medium_complexity.txt
+19 −4 config_RA_high_efficiency.txt
+19 −5 config_RA_low_complexity.txt
+44 −0 config_RA_medium_complexity.txt
+362 −345 dec/decode_block.c
+44 −58 dec/decode_frame.c
+110 −479 dec/maindec.c
+4 −0 dec/maindec.h
+148 −104 dec/read_bits.c
+582 −11 enc/enc_kernels.c
+4 −0 enc/enc_kernels.h
+1,325 −633 enc/encode_block.c
+1 −1 enc/encode_block.h
+53 −76 enc/encode_frame.c
+270 −121 enc/mainenc.c
+69 −36 enc/mainenc.h
+37 −15 enc/strings.c
+159 −190 enc/write_bits.c
+1 −0 enc/write_bits.h
63 changes: 12 additions & 51 deletions native/thor.patch
Original file line number Diff line number Diff line change
@@ -1,52 +1,13 @@
commit 136fb23d432322978012e9b3198f50b9195ecc2e
Author: Kazuki Oikawa <[email protected]>
Date: Mon Jul 27 20:35:12 2015 +0900

Fix compile error when use SIMD C emulation mode

diff --git a/common/common_kernels.c b/common/common_kernels.c
index 04f43be..b5e1307 100644
--- a/common/common_kernels.c
+++ b/common/common_kernels.c
@@ -194,13 +194,13 @@ static void get_inter_prediction_luma_inner(int width, int height, int xoff, int

for (int y = 0; y < height; y++) {
int res;
- v128 ax = v128_unpacklo_u8_s16(v64_load_unaligned(ip - 2));
- v128 a0 = v128_mullo_s16(c0, v128_unpacklo_u8_s16(v64_load_unaligned(ip - 2 * istride - 2)));
- v128 a1 = v128_mullo_s16(c1, v128_unpacklo_u8_s16(v64_load_unaligned(ip - 1 * istride - 2)));
+ v128 ax = v128_unpack_u8_s16(v64_load_unaligned(ip - 2));
+ v128 a0 = v128_mullo_s16(c0, v128_unpack_u8_s16(v64_load_unaligned(ip - 2 * istride - 2)));
+ v128 a1 = v128_mullo_s16(c1, v128_unpack_u8_s16(v64_load_unaligned(ip - 1 * istride - 2)));
v128 a2 = v128_mullo_s16(c2, ax);
- v128 a3 = v128_mullo_s16(c3, v128_unpacklo_u8_s16(v64_load_unaligned(ip + 1 * istride - 2)));
- v128 a4 = v128_mullo_s16(c4, v128_unpacklo_u8_s16(v64_load_unaligned(ip + 2 * istride - 2)));
- v128 a5 = v128_mullo_s16(c5, v128_unpacklo_u8_s16(v64_load_unaligned(ip + 3 * istride - 2)));
+ v128 a3 = v128_mullo_s16(c3, v128_unpack_u8_s16(v64_load_unaligned(ip + 1 * istride - 2)));
+ v128 a4 = v128_mullo_s16(c4, v128_unpack_u8_s16(v64_load_unaligned(ip + 2 * istride - 2)));
+ v128 a5 = v128_mullo_s16(c5, v128_unpack_u8_s16(v64_load_unaligned(ip + 3 * istride - 2)));

for (int x = 0; x < 3; x++) {
res = (v128_dotp_s16(c, v128_add_16(v128_add_16(v128_add_16(v128_add_16(v128_add_16(a0, a1), a2), a3), a4), a5)) + v128_dotp_s16(c, ax) * 128 + 8192) >> 14;
@@ -315,7 +315,7 @@ static void get_inter_prediction_luma_centre(int width, int height,
const uint8_t *restrict ip, int istride)
{
if (width == 4) {
- v128 round = v128_dup_16(8);
+ v64 round = v64_dup_16(8);
for (int i = 0; i < height; i++) {
v64 r, s;
r = v64_add_16(v64_unpacklo_u8_s16(v64_from_32(0, u32_load_unaligned(ip - 1 * istride + 0))),
diff --git a/Makefile b/Makefile
index 5ca91df..6291a4b 100644
--- a/Makefile
+++ b/Makefile
diff --git a/common/temporal_interp.c b/common/temporal_interp.c
index c01747c..1209f38 100644
--- a/common/temporal_interp.c
+++ b/common/temporal_interp.c
@@ -1,7 +1,7 @@
ENCODER_PROGRAM = build/Thorenc
DECODER_PROGRAM = build/Thordec

-CFLAGS += -std=c99 -g -O6 -Wall -pedantic -I common
+CFLAGS += -std=c99 -g -O2 -Wall -pedantic -I common
LDFLAGS = -lm

ifeq ($(ARCH),neon)
#include <math.h>
#include <assert.h>
#include <string.h>
-#include "emmintrin.h"
+//#include "emmintrin.h"
#include "simd.h"
#include "global.h"
#include "temporal_interp.h"

0 comments on commit 609e653

Please sign in to comment.