summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Bankoski <jimbankoski@google.com>2018-11-20 14:31:45 -0800
committerJames Bankoski <jimbankoski@google.com>2018-12-21 19:05:05 +0000
commitb616c1895809e3d388d3febc087b509a3a329b25 (patch)
tree339a68258924cfc71c453725b1d6632257efe448
parent50ead0db62a7229d8ba93b9c91676a2094bba966 (diff)
downloadlibvpx-bitstream-analyzer.tar.gz
inspector mv should be 0 for intra refbitstream-analyzer
Change-Id: I17fe801a9366de44a1fbc53b6cb6a8683f50263f
-rwxr-xr-xtools/build_inspector.sh8
-rw-r--r--vp9/decoder/inspection.c9
2 files changed, 13 insertions, 4 deletions
diff --git a/tools/build_inspector.sh b/tools/build_inspector.sh
index 4619b3436..dcd9fd889 100755
--- a/tools/build_inspector.sh
+++ b/tools/build_inspector.sh
@@ -28,21 +28,25 @@ if [ ! -d ".inspect" ]; then
cd .inspect && emconfigure ../../configure \
--disable-multithread \
--disable-runtime-cpu-detect \
+ --enable-vp9-highbitdepth \
--target=generic-gnu \
--disable-docs \
--disable-unit-tests \
--enable-inspection \
- --extra-cflags="-D_POSIX_SOURCE -s ALLOW_MEMORY_GROWTH=1"
+ --enable-debug \
+ --extra-cflags='-s ALLOW_MEMORY_GROWTH=1 -DEMCC_DEBUG=1'
+ #--extra-cflags="-D_POSIX_SOURCE -s ALLOW_MEMORY_GROWTH=1"
cd ..
fi
cd .inspect
-emmake make -j 8
+EMCC_DEBUG=1 emmake make -j 8
cp examples/inspect inspect.bc
emcc -O3 inspect.bc -o inspect.js \
-s TOTAL_MEMORY=134217728 \
-s MODULARIZE=1 \
-s EXPORT_NAME="'DecoderModule'" \
+ -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF8ToString"] \
-s ALLOW_MEMORY_GROWTH=1 \
--post-js "../inspect-post.js" \
--memory-init-file 0
diff --git a/vp9/decoder/inspection.c b/vp9/decoder/inspection.c
index 2be256933..75cd71f6d 100644
--- a/vp9/decoder/inspection.c
+++ b/vp9/decoder/inspection.c
@@ -64,8 +64,13 @@ int ifd_inspect(insp_frame_data *fd, void *decoder) {
// Segment
mi->segment_id = bmi->segment_id;
// Motion Vectors
- mi->mv[0].row = bmi->mv[0].as_mv.row;
- mi->mv[0].col = bmi->mv[0].as_mv.col;
+ if (bmi->ref_frame[0] > 0) {
+ mi->mv[0].row = bmi->mv[0].as_mv.row;
+ mi->mv[0].col = bmi->mv[0].as_mv.col;
+ } else {
+ mi->mv[0].row = 0;
+ mi->mv[0].col = 0;
+ }
if (bmi->ref_frame[1] == -1) {
mi->mv[1].row = 0;