...
 
Commits (162)
all : filtering horiz_filter
CFLAGS += -mssse3
filtering : filtering.c
horiz_filter : horiz_filter.c
.PHONY : clean
clean :
$(RM) filtering horiz_filter
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int i;
int height = 27;
int x_q4 = 8;
int x_step_q4 = 16;
const int subpel_bits = 4;
const int subpel_mask = (1 << subpel_bits) - 1;
if (3 != argc) {
printf("Usage: convolve <q4> <step_q4>\n");
return -1;
}
x_q4 = atoi(argv[1]);
x_step_q4 = atoi(argv[2]);
for (i = 0; i < height; ++i) {
printf("x_q4: 0x%X, sigidx: 0x%X, filidx: 0x%X\n",
x_q4, x_q4 >> subpel_bits, x_q4 & subpel_mask);
x_q4 += x_step_q4;
}
return 0;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#ifndef AV1_COMMON_LOOPFILTER_H_
#define AV1_COMMON_LOOPFILTER_H_
#include "aom_ports/mem.h"
#include "./aom_config.h"
#include "av1/common/blockd.h"
#include "av1/common/seg_common.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_LOOP_FILTER 63
#define MAX_SHARPNESS 7
#define SIMD_WIDTH 16
#define MAX_MODE_LF_DELTAS 2
enum lf_path {
LF_PATH_420,
LF_PATH_444,
LF_PATH_SLOW,
};
typedef struct { uint64_t bits[4]; } FilterMaskY;
typedef uint64_t FilterMaskUV;
// This structure holds bit masks for all 8x8 blocks in a 64x64 region.
// Each 1 bit represents a position in which we want to apply the loop filter.
// Left_ entries refer to whether we apply a filter on the border to the
// left of the block. Above_ entries refer to whether or not to apply a
// filter on the above border. Int_ entries refer to whether or not to
// apply borders on the 4x4 edges within the 8x8 block that each bit
// represents.
// Since each transform is accompanied by a potentially different type of
// loop filter there is a different entry in the array for each transform size.
typedef struct {
FilterMaskY left_y[TX_SIZES];
FilterMaskY above_y[TX_SIZES];
FilterMaskUV left_u[TX_SIZES];
FilterMaskUV above_u[TX_SIZES];
FilterMaskUV left_v[TX_SIZES];
FilterMaskUV above_v[TX_SIZES];
// Y plane vertical edge and horizontal edge filter level
uint8_t lfl_y_hor[MAX_MIB_SIZE / 2][MAX_MIB_SIZE / 2];
uint8_t lfl_y_ver[MAX_MIB_SIZE / 2][MAX_MIB_SIZE / 2];
// UV plane vertical edge and horizontal edge shares the same level
uint8_t lfl_u[MAX_MIB_SIZE / 4][MAX_MIB_SIZE / 4];
uint8_t lfl_v[MAX_MIB_SIZE / 4][MAX_MIB_SIZE / 4];
} LoopFilterMask;
// Loopfilter bit mask per super block
#define LOOP_FILTER_MASK_NUM 4
typedef struct {
LoopFilterMask lfm[LOOP_FILTER_MASK_NUM];
int is_setup;
} LpfMask;
struct loopfilter {
LpfMask *lfm;
// Neighbor block information for loopfilter bit mask setup
uint8_t *neighbor;
size_t lfm_num;
int lfm_stride;
unsigned int curr_frame_offset;
unsigned int neighbor_width;
unsigned int neighbor_height;
#if CONFIG_LOOPFILTER_LEVEL
int filter_level[2];
int filter_level_u;
int filter_level_v;
#else
int filter_level;
#endif
int sharpness_level;
int last_sharpness_level;
uint8_t mode_ref_delta_enabled;
uint8_t mode_ref_delta_update;
// 0 = Intra, Last, Last2+Last3,
// GF, BRF, ARF2, ARF
int8_t ref_deltas[TOTAL_REFS_PER_FRAME];
int8_t last_ref_deltas[TOTAL_REFS_PER_FRAME];
// 0 = ZERO_MV, MV
int8_t mode_deltas[MAX_MODE_LF_DELTAS];
int8_t last_mode_deltas[MAX_MODE_LF_DELTAS];
};
// Need to align this structure so when it is declared and
// passed it can be loaded into vector registers.
typedef struct {
DECLARE_ALIGNED(SIMD_WIDTH, uint8_t, mblim[SIMD_WIDTH]);
DECLARE_ALIGNED(SIMD_WIDTH, uint8_t, lim[SIMD_WIDTH]);
DECLARE_ALIGNED(SIMD_WIDTH, uint8_t, hev_thr[SIMD_WIDTH]);
} loop_filter_thresh;
typedef struct {
loop_filter_thresh lfthr[MAX_LOOP_FILTER + 1];
#if CONFIG_LOOPFILTER_LEVEL
uint8_t lvl[MAX_SEGMENTS][2][TOTAL_REFS_PER_FRAME][MAX_MODE_LF_DELTAS];
#else
uint8_t lvl[MAX_SEGMENTS][TOTAL_REFS_PER_FRAME][MAX_MODE_LF_DELTAS];
#endif
} loop_filter_info_n;
/* assorted loopfilter functions which get used elsewhere */
struct AV1Common;
struct macroblockd;
struct AV1LfSyncData;
// This function sets up the bit masks for the entire 64x64 region represented
// by mi_row, mi_col.
void av1_setup_mask(struct AV1Common *const cm, const int mi_row,
const int mi_col, MODE_INFO **mi_4x4,
const int mode_info_stride, LpfMask *lfm);
void av1_filter_block_plane_ss00_ver(struct AV1Common *const cm,
struct macroblockd_plane *const plane,
int mi_row, LoopFilterMask *lfm);
void av1_filter_block_plane_ss00_hor(struct AV1Common *const cm,
struct macroblockd_plane *const plane,
int mi_row, LoopFilterMask *lfm);
void av1_filter_block_plane_ss11_u_ver(struct AV1Common *const cm,
struct macroblockd_plane *const plane,
int mi_row, LoopFilterMask *lfm);
void av1_filter_block_plane_ss11_u_hor(struct AV1Common *const cm,
struct macroblockd_plane *const plane,
int mi_row, LoopFilterMask *lfm);
void av1_filter_block_plane_ss11_v_ver(struct AV1Common *const cm,
struct macroblockd_plane *const plane,
int mi_row, LoopFilterMask *lfm);
void av1_filter_block_plane_ss11_v_hor(struct AV1Common *const cm,
struct macroblockd_plane *const plane,
int mi_row, LoopFilterMask *lfm);
void av1_filter_block_plane_non420_ver(struct AV1Common *const cm,
struct macroblockd_plane *plane,
MODE_INFO **mi_8x8, int mi_row,
int mi_col, int pl);
void av1_filter_block_plane_non420_hor(struct AV1Common *const cm,
struct macroblockd_plane *plane,
MODE_INFO **mi_8x8, int mi_row,
int mi_col, int pl);
void av1_loop_filter_init(struct AV1Common *cm);
// Update the loop filter for the current frame.
// This should be called before av1_loop_filter_rows(),
// av1_loop_filter_frame()
// calls this function directly.
void av1_loop_filter_frame_init(struct AV1Common *cm, int default_filt_lvl,
int default_filt_lvl_r
#if CONFIG_LOOPFILTER_LEVEL
,
int plane
#endif
);
void av1_loop_filter_frame(YV12_BUFFER_CONFIG *frame, struct AV1Common *cm,
struct macroblockd *mbd, int filter_level,
#if CONFIG_LOOPFILTER_LEVEL
int filter_level_r,
#endif
int y_only, int partial_frame);
// Apply the loop filter to [start, stop) macro block rows in frame_buffer.
void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer,
struct AV1Common *cm,
struct macroblockd_plane *planes, int start, int stop,
int y_only);
typedef struct LoopFilterWorkerData {
YV12_BUFFER_CONFIG *frame_buffer;
struct AV1Common *cm;
struct macroblockd_plane planes[MAX_MB_PLANE];
int start;
int stop;
int y_only;
} LFWorkerData;
void av1_loop_filter_data_reset(LFWorkerData *lf_data,
YV12_BUFFER_CONFIG *frame_buffer,
struct AV1Common *cm,
const struct macroblockd_plane *planes);
// Operates on the rows described by 'lf_data'.
int av1_loop_filter_worker(LFWorkerData *const lf_data, void *unused);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // AV1_COMMON_LOOPFILTER_H_
#include <stdio.h>
#include <stdint.h>
//----------------------------------------------------------------------------
// Note:
// Establish 64x64 block, contructed by 256 (16x16) 4x4 sub-block.
// Every 4 rows would be represented by one uint64_t mask. Hence,
// there are 4 uint64_t bitmask[4] to represent the whole 64x64.
//
// Given a location by (idx, idy), This function returns the index
// 0, 1, 2, 3 to select which bitmask[] to use.
// Then the pointer y_shift contains the shift value in the bit mask.
// Function returns y_shift; y_index contains the index.
//
int get_y_index_shift(int idx, int idy, int *y_index) {
*y_index = idy >> 4;
const int y_idy = (idy >> 2) % 4;
return (y_idy << 4) + (idx >> 2);
}
// Note:
// For 4:2:0 format sampling, establish 32x32 block, constructed by
// 64 (8x8), 4x4 sub-block. We need one uint64_t bitmask to present
// all edge information
// Function returns uv_shift.
//
int get_uv_index_shift(int idx, int idy) {
return ((idy >> 3) << 3) + (idx >> 3);
}
//----------------------------------------------------------------------------
// AV1 has 4x4 coding block
// I use 4 uint64_t integer to describe block edge information by a bit mask
//
void get_y_shift_value(int size) {
int x, y;
for (y = 0; y < size; y += 4) {
for (x = 0; x < size; x += 4) {
printf("[%02d,%02d] ", x, y);
}
printf("\n");
}
printf("\n");
int v_index;
int y_shift;
for (y = 0; y < size; y += 4) {
for (x = 0; x < size; x += 4) {
// cb8x8
//int shift = ((y >> 3) << 3) + (x >> 3);
//printf("%02d ", shift);
// cb4x4
y_shift = get_y_index_shift(x, y, &v_index);
printf("%02d ", y_shift);
}
printf("Index %d\n", v_index);
}
}
void get_uv_shift_value(int size) {
int x, y;
int uv_shift = 0;
const int step = 4;
for (y = 0; y < size; y += step) {
for (x = 0; x < size; x += step) {
// cb8x8
// int uv_shift = ((y >> 3) << 2) + (x >> 3);
// cb4x4
uv_shift = get_uv_index_shift(x, y);
printf("%02d ", uv_shift);
}
printf("\n");
}
}
//---------------------------------------------------------------------------
int get_uv_shift(int idx, int idy) {
return (((idy - 2) >> 2) << 3) + (idx >> 2);
}
//---------------------------------------------------------------------------
// AV1: AV1=1
// VP9: AV1=0
#define AV1 1
#if AV1
#define MAX_MIB_SIZE_LOG2 (4)
const int num = 16;
typedef struct {
uint64_t bits[4];
} FilterMaskY;
#else
#define MAX_MIB_SIZE_LOG2 (3)
const int num = 8;
#endif
int main() {
get_y_shift_value(64);
printf("\n");
get_uv_shift_value(64);
printf("\n");
int y_index = 0;
const int x = 0;
int y;
int i;
// Remaining rows are 1, 2, ..., num - 1
// VP9 : 1-7
// AV1 : 1-15
for (i = 1; i < num; ++i) {
#if AV1
y = i << 2;
int y_shift = get_y_index_shift(x, y, &y_index);
int uv_shift = get_uv_shift(x >> 1, y >> 1);
printf("[%02d,%02d] index=%d y_shift=%02d uv_shift=%02d mask_y ",
x, y, y_index, y_shift, uv_shift);
FilterMaskY mask = {0, 0, 0, 0};
int j;
for (j = 0; j < y_index; ++j) {
mask.bits[j] = 0xffffffffffffffffULL;
}
mask.bits[y_index] = ((uint64_t)1 << y_shift) - 1;
for (j = 0; j < 4; ++j) {
printf("0x%016llx ", (unsigned long long int)mask.bits[j]);
}
uint64_t mask_uv = (((uint64_t)1 << (uv_shift + 8)) - 1);
if (uv_shift + 8 == 64) mask_uv = 0xffffffffffffffffULL;
printf("mask_uv 0x%016llx", (unsigned long long int)mask_uv);
printf("\n");
#else
const uint64_t mask_y = (((uint64_t)1 << (i << MAX_MIB_SIZE_LOG2)) - 1);
const uint16_t mask_uv =
(((uint16_t)1 << (((i + 1) >> 1) << (MAX_MIB_SIZE_LOG2 - 1))) - 1);
printf("mask_y=%016llx, mask_uv=%04x\n", (long long unsigned int)mask_y, mask_uv);
#endif
}
return 0;
}
This diff is collapsed.
#!/bin/sh
video=~/Dev/samples/videos/hevc/hd/BQTerrace_1920x1080_60.y4m
fps="60/1"
#!/bin/sh
video=~/Dev/samples/videos/midres/BasketballDrill_832x480_50.y4m
frames=60
bitrate=800
fps="50/1"
wide=
high=
#!/bin/sh
video=~/Dev/samples/videos/speed-set/BasketballDrive_1920x1080_50.y4m
wi=1920
he=1080
frames=150
bitrate=4000
fps="50/1"
#!/bin/sh
video=~/Dev/samples/videos/speed-set/BasketballDrive_1920x1080_50.y4m
fps="50/1"
#!/bin/sh
video=~/Dev/samples/videos/hevc/hd/ParkScene_1920x1080_24.y4m
fps="24/1"
#!/bin/sh
video=~/Dev/samples/videos/Netflix/Netflix_Aerial_4096x2160_60fps_8bit_420.y4m
wi=4096
he=2160
frames=150
bitrate=12000
fps="60/1"
#!/bin/sh
#set -x
root_dir=$1
build_dir=$root_dir/release
script_dir=~/Dev/sandbox/libvpx/scripts
exp_tool=
cd $build_dir
make clean > /dev/null
rm -fr ./*
$script_dir/aom_nightly_config.sh
make -j > /dev/null
if [ $? -ne 0 ]; then
echo "AV1 build failed!"
exit 1
fi
test_dir=~/Dev/nightly
cp -f ./aomenc $test_dir/.
cp -f ./aomdec $test_dir/.
#!/bin/sh
#set -x
libsrc=aom
test_dir=~/Dev/nightly
echo "cmake ../$libsrc -DCONFIG_UNIT_TESTS=0 -DENABLE_DOCS=0"
~/bin/cmake ../$libsrc -DCONFIG_UNIT_TESTS=0 -DENABLE_DOCS=0 > /dev/null 2>&1
# if [ $? -ne 0 ]; then
# echo "Error: cmake configure fails!" > $test_dir/aom_error_config.txt
# exit 1
# fi
#!/bin/sh
# File:
# nightly_speed.sh
# Decription:
# Configure, build, and run AV1 encoder/decoder for each experimental tool.
# Display the encoder/decode run time
# Preassumption:
# 1) Assume all script files are in ~/Dev/sandbox/libvpx/scripts
# Note:
# See encoder config output if set,
# verbose=-v
#set -x
if [ "$#" -ne 5 ]; then
root_dir=~/Dev/av1d
pdfps=1
petime=1
speed=0
html_log_file=log.html
else
root_dir=$1
pdfps=$2
petime=$3
speed=$4
html_log_file=$5
fi
log_path=~/Dev/log
if [ "$profile" == "2" ]; then
bitdepth="--bit-depth=10"
fi
if [ "$profile" == "0" ]; then
bitdepth=
fi
code_dir=$root_dir/aom
build_dir=$root_dir/release
test_dir=~/Dev/nightly
script_dir=~/Dev/sandbox/libvpx/scripts
. $script_dir/BasketballDrill_480p.sh
# General options
codec="--codec=av1"
verbose=
core_id=1
exp_tool=experimental
cd $root_dir/aom
commit=`git log --pretty=%h -1`
cd $test_dir
profile=0
tune_content=
col_num=0
laginframes=19
elog=av1enc_log_p_$profile.$speed.txt
dlog=av1dec_log_p_$profile.$speed.txt
bstream=av1_p_$profile.$speed.$commit.webm
taskset -c $core_id ./aomenc $verbose -o /dev/shm/"$bstream" $video $codec --limit=$frames --profile=$profile $bitdepth --fps=$fps $tune_content --target-bitrate=$bitrate --skip=0 -p 2 --cpu-used=$speed --lag-in-frames=$laginframes --min-q=0 --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0 --tile-columns=$col_num --psnr &>> $elog
# Note: $2 is the time unit, ms or us
etime=`cat $elog | awk 'NR==2 {NF-=3; print $NF}'`
# efps=`cat $elog | grep 'Pass 2/2' | grep 'fps)' | sed -e 's/^.*b\/s//' | awk '{print $3}'`
# efps=`echo $efps | sed 's/(//'`
psnr=`cat $elog | grep 'PSNR' | awk '{print $5, $6, $7, $8, $9}'`
tmp=`cat $elog | grep mismatch`
if [ "$?" -ne 0 ]; then
eflag=e_ok
else
eflag=mismatch
fi
echo "AV1: $(basename $video), profile=$profile bitrate=$bitrate frames=$frames speed=$speed"
taskset -c $core_id ./aomdec /dev/shm/"$bstream" $codec --i420 --noblit --summary 2>&1 &>> $dlog
if [ "$?" -ne 0 ]; then
dflag=fault
else
dflag=d_ok
fi
# Note: $8 is the time unit ms or us
dfps=`awk '{print $9}' < $dlog`
dfps=`echo $dfps | sed 's/(//'`
dpercent=`echo "($dfps - $pdfps) / $pdfps * 100" | bc -l`
dpercent=${dpercent:0:5}
epercent=`echo "($petime - $etime) / $petime * 100" | bc -l`
epercent=${epercent:0:5}
echo -e '\t'"Enc fps Dec fps PSNR"'\t\t\t\t'"Enc status Dec status dup(%) eup(%)"
echo -e '\t'$etime" "$dfps" "$psnr'\t'$eflag" "$dflag" "$dpercent" "$epercent
printf "\n"
# Output a html log file for email
echo "<p> AV1: $(basename $video), bitrate=$bitrate profile=$profile frames=$frames speed=$speed </p>" >> $log_path/$html_log_file
echo "<table style=\"width:100%\">" >> $log_path/$html_log_file
echo " <tr>" >> $log_path/$html_log_file
echo " <th>Enc Time (ms)</th>" >> $log_path/$html_log_file
echo " <th>Enc Speedup(%)</th>" >> $log_path/$html_log_file
echo " <th>Dec FPS</th>" >> $log_path/$html_log_file
echo " <th>Dec Speedup(%)</th>" >> $log_path/$html_log_file
echo " <th>PSNR</th>" >> $log_path/$html_log_file
echo " </tr>" >> $log_path/$html_log_file
echo " <tr>" >> $log_path/$html_log_file
echo " <td>$etime</td>" >> $log_path/$html_log_file
echo " <td>$epercent</td>" >> $log_path/$html_log_file
echo " <td>$dfps</td>" >> $log_path/$html_log_file
echo " <td>$dpercent</td>" >> $log_path/$html_log_file
echo " <td>$psnr</td>" >> $log_path/$html_log_file
echo " </tr>" >> $log_path/$html_log_file
echo "</table>" >> $log_path/$html_log_file
# Copy bitstream file to cns
fileutil cp /run/shm/"$bstream" /cns/yv-d/home/on2-prod/luoyi/Nightly/.
#!/bin/sh
git push https://aomedia-review.googlesource.com/aom HEAD:refs/for/master
#!/bin/sh
# Unique calling argument: frame number
#
#set -x
if [ "$#" -ne 1 ]; then
frames=25
else
frames=$1
fi
prof=0
if [ "$prof" == "2" ]; then
bitdepth="--bit-depth=10"
fi
if [ "$prof" == "0" ]; then
bitdepth=
fi
# In a release direcotry
cd ../aom
#git pull
commithash=`git log --pretty=%h -1`
cd ../release
#../aom/configure --disable-docs --disable-unit-tests
#make clean;make
rm -fr ./*
cmake ../aom -DCONFIG_UNIT_TESTS=0 -DENABLE_DOCS=0
make
date_str=`date +%b_%d_%Y`
bitstream=night_720p30_av1_$commithash.$date_str.f$frames.webm
fps=30
bitrate=2500
laginframes=19
taskset -c 0 ./aomenc -o /run/shm/$bitstream ~/Dev/samples/videos/speed-set/night_720p30.y4m --codec=av1 --fps=$fps/1 --skip=0 -p 2 --cpu-used=0 --target-bitrate=$bitrate --lag-in-frames=$laginframes --profile=$prof $bitdepth --limit=$frames --enable-cdef=0 --min-q=0 --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0 -t 1 --psnr --test-decode=warn -D
#!/bin/sh
#set -x
script_path=~/Dev/sandbox/libvpx/scripts
av1_code=~/Dev/av1d
log_path=~/Dev/log
date_str=`date -d tomorrow +%b_%d_%Y`
html_log_file=aomenc_$date_str.html
s0_log_file=av1_s0_$date_str.txt
s1_log_file=av1_s1_$date_str.txt
prev_date_str=`date +%b_%d_%Y`
prev_s0_log_file=av1_s0_$prev_date_str.txt
prev_s1_log_file=av1_s1_$prev_date_str.txt
test_dir=~/Dev/nightly
rm $test_dir/*
$script_path/gen_html_header.sh > $log_path/$html_log_file
echo "<p>" >> $log_path/$html_log_file
$script_path/sync_codebase.sh $av1_code/aom >> $log_path/$html_log_file 2>&1
echo "</p>" >> $log_path/$html_log_file
echo "<p>" >> $log_path/$html_log_file
$script_path/aom_conf_build.sh $av1_code >> $log_path/$html_log_file 2>&1
echo "</p>" >> $log_path/$html_log_file
pdfps=`cat $log_path/$prev_s0_log_file | grep e_ok | awk '{print $2}' | awk 'NR==1 {print $1}'`
petime=`cat $log_path/$prev_s0_log_file | grep e_ok | awk '{print $1}' | awk 'NR==1 {print $1}'`
speed=0
$script_path/aom_nightly_speed.sh $av1_code $pdfps $petime $speed $html_log_file >> $log_path/$s0_log_file 2>&1
pdfps=`cat $log_path/$prev_s1_log_file | grep e_ok | awk '{print $2}' | awk 'NR==1 {print $1}'`
petime=`cat $log_path/$prev_s1_log_file | grep e_ok | awk '{print $1}' | awk 'NR==1 {print $1}'`
speed=1
$script_path/aom_nightly_speed.sh $av1_code $pdfps $petime $speed $html_log_file >> $log_path/$s1_log_file 2>&1
# Send an email to coworkers
users=luoyi
host_name=`hostname`
sender=luoyi
cc_list="--cc=yunqingwang,vpx-eng"
$script_path/gen_html_footer.sh >> $log_path/$html_log_file
sendgmr --to=$users $cc_list --subject="AV1 Nightly Speed Report" --from=$sender --reply_to=$sender --html_file=/usr/local/google/home/luoyi/Dev/log/$html_log_file --body_file=/usr/local/google/home/luoyi/Dev/log/$html_log_file
#!/bin/sh
root_dir=$1
build_dir=$root_dir/release
script_dir=~/Dev/sandbox/libvpx/scripts
exp_tool=experimental
cd $build_dir
make clean > /dev/null
$script_dir/nightly_config.sh $exp_tool
make -j > /dev/null
if [ $? -ne 0 ]; then
echo "AV1 build failed on experiment: " $exp_tool
exit 1
fi
test_dir=~/Dev/nightly
cp -f ./aomenc $test_dir/.
cp -f ./aomdec $test_dir/.
#!/bin/sh
#set -x
if [ "$2" == "dbg" ]; then
debug="--enable-debug --disable-optimizations"
else
debug=
fi
tool=--enable-$1
platform=x86_64-linux-gcc
codec=--enable-av1
libsrc=aom
test_dir=~/Dev/info
script_dir=~/Dev/sandbox/libvpx/scripts
common="--disable-docs --enable-experimental"
#bd_config="--enable-lowbitdepth"
#--disable-highbitdepth"
. $script_dir/disabled_list.sh
echo ../$libsrc/configure $debug $common $disabled $tool
../$libsrc/configure $debug $common $disabled $tool > /dev/null
if [ $? -ne 0 ]; then
echo "Error: configure fails!" > $test_dir/error_config.txt
exit 1
fi
#!/bin/sh
video=~/Dev/samples/videos/speed-set/blue_sky_1080p30.y4m
fps="25/1"
Regular build
rm -rf ./* && cmake ../.. -DENABLE_WERROR=1 && make -j
Debug build without optimizations (can be used for Eclipse debugging):
(Implies --disable-optimizations)
rm -rf ./* && cmake ../.. -DENABLE_WERROR=1 -DCMAKE_BUILD_TYPE=Debug && make -j
Debug build with optimizations on (should be used for performance analysis):
rm -rf ./* && cmake ../.. -DENABLE_WERROR=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE='-O3 -g' -DCMAKE_CXX_FLAGS_RELEASE='-O3 -g' -DCMAKE_LD_FLAGS_RELEASE='-O3 -g' && make -j
Build with ASAN:
rm -rf ./* && cmake ../.. -DSANITIZE=address -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DENABLE_CCACHE=1 && make -j
Build with TSAN
rm -rf ./* && cmake ../.. -DSANITIZE=thread -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug && make -j
Build with UBSAN
rm -rf ./* && cmake ../.. -DSANITIZE=integer -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS=-O1 -DCMAKE_CXX_FLAGS=-O1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXE_LINKER_FLAGS=-Wl,--start-group -DENABLE_CCACHE=1 && make -j
rm -rf ./* && cmake ../.. -DSANITIZE=undefined -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS=-O1 -DCMAKE_CXX_FLAGS=-O1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXE_LINKER_FLAGS=-Wl,--start-group -DENABLE_CCACHE=1 && make -j
#!/bin/sh
root_dir=$1
dist_dir=$2
build_dir=$root_dir/$dist_dir
script_dir=~/Dev/sandbox/libvpx/scripts
exp_tool=experimental
cd $build_dir
make clean > /dev/null
$script_dir/av1_config.sh $exp_tool
make -j > /dev/null
if [ $? -ne 0 ]; then
echo "AV1 build failed on experiment: " $exp_tool
exit 1
fi
# test_dir=~/Dev/nightly
# cp -f ./aomenc $test_dir/.
# cp -f ./aomdec $test_dir/.
#!/bin/sh
# d2="--disable-ext_tx"
# d3="--disable-cdef --disable-cdef-singlepass --disable-ext_intra"
# d4="--disable-intra-edge --disable-mv_compress --disable-dual_filter"
# #--disable-motion_var --disable-warped_motion"
# #d5="--disable-wedge --disable-compound_segment"
# d6="--disable-interintra --disable-one_sided_compound"
# d7="--disable-convolve_round --disable-aom-qm --disable-dist_8x8"
# d8="--disable-loop_restoration"
# d9="--disable-ext-partition --disable-ext-partition-types"
# d91="--disable-new-multisymbol"
# d10="--disable-reference_buffer --disable-loopfiltering_across_tiles"
# d11="--disable-palette_throughput --disable-smooth_hv --disable-tempmv_signaling"
# d12="--disable-ext-comp-refs --disable-ext_delta_q --disable-parallel_deblocking"
# d13="--disable-simple_bwd_adapt --disable-loopfilter-level"
# d14="--disable-cfl --disable-deblock-13tap --disable-frame_marker --disable-kf_ctx"
#disabled="$d2 $d3 $d4 $d6 $d7 $d8 $d9 $91 $d10 $d11 $d12 $d13 $d14"
disabled="--disable-adopted-experiments"
#!/bin/sh
# File:
# encode_exp_bs.sh
# Decription:
# This script fixes a video sequence and loops around an experimental list
# defined by "exp_list"
# see "encode_video_seq_bs.sh
set -x
if [ "$#" -ne 1 ]; then
video_sequence=soccer_cif.sh
else
video_sequence=$1
fi
root_dir=~/Dev/av1w
code_dir=$root_dir/aom
build_dir=$root_dir/release
test_dir=~/Dev/field
script_dir=~/Dev/sandbox/libvpx/scripts
bitstream_dir=~/Dev/samples/bitstreams/routine
. $script_dir/$video_sequence
videoname=$(basename $video_sequence .sh)
# General options
Codec=av1
codec="--codec=$Codec"
verbose=
cd $code_dir
#git checkout -q master
#git pull -q
commit_hash=`git log -1 --oneline | awk '{print $1}'`
cd $test_dir
d1="chroma_sub8x8 filter_7bit reference_buffer"
d2="delta_q rect_tx global_motion ext_tx"
d3="cdef ext_intra mv_compress ext_refs"
d4="dual_filter motion_var warped_motion"
d5="ext_delta_q loopfiltering_across_tiles ec_smallmul"
d6="var_tx ext_inter wedge compound_segment"
d7="interintra one_sided_compound smooth_hv"
d8="parallel_deblocking rect_intra_pred convolve_round"
d9="palette_throughput tempmv_signaling ext-comp-refs"
exp_list="$d1 $d2 $d3 $d4 $d5 $d6 $d7 $d8 $d9"
#exp_list=experimental
constant_cmdline_options="--skip=0 -p 2 --good --cpu-used=0 --lag-in-frames=25 --min-q=0 --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0 --test-decode=warn --psnr"
wi=1920
he=1080
frames=150
bitrate=4000
for exp_tool in $exp_list
do
cd $build_dir
make clean > /dev/null
$script_dir/runconfig.sh $exp_tool
make -j > /dev/null
if [ $? -ne 0 ]; then
echo Build failed on experiment: $exp_tool
fi
cp ./aomenc $test_dir/.
cp ./aomdec $test_dir/.
cd $test_dir
if [ $exp_tool == intrabc ] || [ $exp_tool == palette ] || [ $exp_tool == palette_delta_encoding ] || [ $exp_tool == palette_throughput ]; then
tune_content="--tune-content=screen"
else
tune_content=
fi
if [ $exp_tool == ext_tile ]; then
col_num=1
else
col_num=0
fi
profile=0
bs="$Codec.$exp_tool.$videoname.$commit_hash.$profile.webm"
./aomenc $verbose -o $bitstream_dir/$bs $video $codec --limit=$frames --profile=$profile --fps=$fps $tune_content --target-bitrate=$bitrate --tile-columns=$col_num $constant_cmdline_options
profile=2
bs="$Codec.$exp_tool.$videoname.$commit_hash.$profile.webm"
./aomenc $verbose -o $bitstream_dir/$bs $video $codec --limit=$frames --profile=$profile --bit-depth=10 --fps=$fps $tune_content --target-bitrate=$bitrate --tile-columns=$col_num $constant_cmdline_options
rm ./aomenc ./aomdec
done
#!/bin/sh
# File:
# encode_video_seq_bs.sh
# Decription:
# This script fixes an experiment and loops around on video sequences defined by
# video_sequence_list.
# Also see encode_exp_bs.sh
set -x
if [ "$#" -ne 1 ]; then
exp_tool=experimental
else
exp_tool=$1
fi
root_dir=~/Dev/aomedia
code_dir=$root_dir/aom
build_dir=$root_dir/release
test_dir=~/Dev/field
script_dir=~/Dev/sandbox/libvpx/scripts
bitstream_dir=~/Dev/samples/bitstreams/routine
# General options
Codec=av1
codec="--codec=$Codec"
verbose=
cd $code_dir
#git checkout -q master
#git pull -q
commit_hash=`git log -1 --oneline | awk '{print $1}'`
cd $test_dir
# d1="chroma_sub8x8 filter_7bit reference_buffer"
# d2="delta_q rect_tx global_motion ext_tx"
# d3="cdef ext_intra mv_compress ext_refs"
# d4="dual_filter motion_var warped_motion"
# d5="ext_delta_q loopfiltering_across_tiles"
# d6="var_tx ext_inter wedge compound_segment"
# d7="interintra one_sided_compound smooth_hv"
# d8="parallel_deblocking rect_intra_pred convolve_round"
# d9="palette_throughput tempmv_signaling ext-comp-refs"
# Note: experimental list
#exp_list="$d1 $d2 $d3 $d4 $d5 $d6 $d7 $d8 $d9"
#exp_list=experimental
# Note: video sequence list
#video_sequence_list="BQTerrace_1080p60.sh BasketballDrive_1080p50.sh ParkScene_1080p24.sh"
#video_sequence_list="blue_sky_1080p25.sh rush_hour_1080p25.sh tennis_1080p24.sh"
video_sequence_list="aerial_4k.sh"
#video_sequence_list="BasketballDrive_1080p50.sh"
constant_cmdline_options="--skip=0 -p 2 --good --cpu-used=0 --lag-in-frames=25 --min-q=0 --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0 --test-decode=warn --psnr"
col_num=0
# Note:
# Here we have an overall chance to override the encoding input options
# wi=1920
# he=1080
# frames=2
# bitrate=4000
cd $build_dir
make clean > /dev/null
$script_dir/runconfig.sh $exp_tool
make -j > /dev/null
if [ $? -ne 0 ]; then
echo Build failed on experiment: $exp_tool
fi
cp ./aomenc $test_dir/.
cp ./aomdec $test_dir/.
cd $test_dir
for video_sequence in $video_sequence_list
do
. $script_dir/$video_sequence
videoname=$(basename $video_sequence .sh)
# Note:
# Here we have an chance to override the encoding input options per video sequence
frames=50
bitrate=14000
profile=0
bs="$Codec.$exp_tool.$videoname.$commit_hash.f$frames.$profile.webm"
./aomenc $verbose -o $bitstream_dir/$bs $video $codec --limit=$frames --profile=$profile --fps=$fps $tune_content --target-bitrate=$bitrate --tile-columns=$col_num $constant_cmdline_options
# profile=2
# bs="$Codec.$exp_tool.$videoname.$commit_hash.f$frames.$profile.webm"
# ./aomenc $verbose -o $bitstream_dir/$bs $video $codec --limit=$frames --profile=$profile --bit-depth=10 --fps=$fps $tune_content --target-bitrate=$bitrate --tile-columns=$col_num $constant_cmdline_options
done
#!/bin/sh
echo "</html>"
echo "</body>"
#!/bin/sh
echo "<!DOCTYPE html>"
echo "<html>"
echo "<head>"
echo "<style>"
echo "table, th, td {"
echo " border: 1px solid black;"
echo " border-collapse: collapse;"
echo "}"
echo "th, td {"
echo " padding: 5px;"
echo " text-align: left;"
echo "}"
echo "</style>"
echo "</head>"
echo "<body>"
#########################################################
# My personal GIT tips
#########################################################
(1) Squash several commit into one (consolitation)
# Note:
# Between HEAD and 3 is tilde sign
$ git rebase -i HEAD~3
# step 1: In pop-up editor (emacs), "pick" the earliest one and squash all the rest.
# step 2: In second pop-up editor, edit the commit message and save, exit.
(2) Pull the latest changes (sometime it is a fix/required) and put it under
# your working commit
$ git pull --rebase
# if there are any conflicts, you need edit the conflicted files manually. then
$ git add <conflict and edited files>
$ git rebase --continue
# Note: Don't do git commit between "git add" and "git rebase --continue",
if you did, then you need git rebase --abort and come over.
# Another way (?) from Su Hui
$ git fetch
$ git rebase -i origin/nextgenv2
# -i ?, the following works:
$ git rebase origin/nextgenv2
# if there are any conflicts, you need edit the conflicted files manually. Sometimes
# need to diff against change in another repos or blame the conflict file to see the
# change.
$ git add <conflict and edited file>
$ git rebase --continue
(3) Create a branch from a older commit
# Create a branch from the top and specify the targeted remote branch
# Typically I need to create a branch for new code construction
$ git checkout -b <branch_name> <origin/nextgenv2>
# Typically I need to create a branch for performance test base (seat)
$ git checkout -b <branch_name> <commit>
(4) Restore the local top to <commit>
# Delete the current top commit
$ git reset --hard <commit>
# Delete the current failed merge/modification
$ git reset --hard
(5) Diff a commit against its parent
$ git diff <commit>^!
# Diff HEAD agaist its parent
$ git diff HEAD^!
(6) Restore one file from previous commit and fix latest commit
$ git checkout <commit> <filename>
$ git commit --amend
(7) Merge a commit from master branch to another branch
$ git checkout <branch>
# use cherry pick. Please make sure the <branch> is clean and latest
$ git fetch https://chromium.googlesource.com/webm/libvpx refs/changes/18/336818/3 && git cherry-pick FETCH_HEAD
# if there is no conflict, it automatically merge (if successfull) with local. And
# the commit appears if do "git log"
# if there is conflict, need to merge manually and $ git commit -a --amend (i guess)
(8) Cherry pick
# This way we add an extra line (reference to the picked commit)
$ git cherry-pick -x <commit hash>
(9) Sandbox push
First ask Admin to create a sandbox (remote branch) for you.
# Work in local from git init, git commit ....
# Initial push:
# Here we use "head" instead of "for", "for" is for review board. Please note:
# we use -f
$ git push -f https://chromium-review.googlesource.com/webm/libvpx HEAD:refs/heads/sandbox/luoyi@google.com/convolve
$ git checkout -b sandbox/luoyi@google.com/convolve
# check it out:
$ git checkout -b codestore origin/sandbox/luoyi@google.com/convolve
# Push
# Run git push, then the error message would show you two ways. The first way works. See following:
$ git push origin HEAD:sandbox/luoyi@google.com/convolve
(10) Revert a change
$ git checkout <commit hash> <filename>
Revert a file at <commit hash> to index
(11) Diff current staged file (ready to commit) against a previous commit version
$ git diff --cached <commit hash> <path/file>
(12) Setup a branch for continuing work
# On a branch named: branch_name1,
$ git checkout -b <branch_name2>
$ git branch -u origin/nextgenv2
# latest commit may not be merged yet. So after local check-in, can we do
cherry-pick later from branch_name2 to branch_name1?
(13) Generate and Apply a patch
$ git diff --no-ext-diff > my.diff
$ git apply my.diff
(14) git log --pretty=format:"%h %an %cd %s" --date=short
git log --pretty=fuller
(15) git rebase -i origin/master
Remove current unwanted base patch
Pull in latest patches
########################################################
# Trivial tips now
########################################################
(1) Push for a review
$ git push https://chromium-review.googlesource.com/webm/libvpx HEAD:refs/for/nextgenv2
or
$ review_push.sh
(2) Show git remote repo
$ git remote show origin
(3) Check codebase's tag information
$ git tag
$ git rev-list -n1 v0.1.0
#!/bin/sh
video=~/Dev/samples/videos/midres/into_tree_480p.y4m
wide=
high=
frames=2
bitrate=600
fps="50/1"
#!/bin/sh
# File:
# list_exp_speed.sh
# Decription:
# Configure, build, and run encoder/decoder for each experimental tool.
# Display the encoder/decode run time
# Preassumption:
# 1) Assume all script files are in ~/Dev/sandbox/libvpx/scripts
# Note:
# See encoder config output if set,
# verbose=-v
#set -x
if [ "$#" -ne 1 ]; then
root_dir=~/Dev/av1w
else
root_dir=$1
fi
code_dir=$root_dir/aom
build_dir=$root_dir/release
test_dir=~/Dev/weekly
script_dir=~/Dev/sandbox/libvpx/scripts
. $script_dir/video_sequence_weekly.sh
# General options
bitstream_prefix=av1
codec="--codec=av1"
verbose=
# LBD or HBD
# Note:
# Standard bit depth:
# 1) profile=0
# 2) remove $bitdepth in encoder command line
# 3) Change runconfig.sh, bitdepth=
# High bit depth:
# 1) profile=2
# 2) Add $bitdepth in encoder command line, e.g. bitdepth="--bit-depth=10"
# 3) Change runconfig.sh, bitdepth=--enable-highbitdepth
profile=0
cd $test_dir
rm *.txt
for exp_tool in experimental chroma_sub8x8 reference_buffer rect_tx global_motion ext_tx cdef ext_intra mv_compress ext_refs dual_filter motion_var warped_motion var_tx wedge compound_segment interintra one_sided_compound ext-comp-refs smooth_hv parallel_deblocking convolve_round altref2 adapt_scan intra_edge ext_partition loop_restoration
# palette_throughput tempmv_signaling ext_delta_q ec_smallmul aom_qm dist_8x8 loop_restoration
do
cd $build_dir
make clean > /dev/null
$script_dir/runconfig.sh $exp_tool
make -j > /dev/null
if [ $? -ne 0 ]; then
echo Build failed on experiment: $exp_tool
fi
cp ./aomenc $test_dir/.
cp ./aomdec $test_dir/.
cd $test_dir
elog=e_$exp_tool.txt
dlog=d_$exp_tool.txt
bs=$bitstream_prefix.$exp_tool.webm
if [ $exp_tool == intrabc ] || [ $exp_tool == palette ] || [ $exp_tool == palette_delta_encoding ] || [ $exp_tool == palette_throughput ]; then
tune_content="--tune-content=screen"
else
tune_content=
fi
if [ $exp_tool == ext_tile ]; then
col_num=1
else
col_num=0
fi
taskset -c 3 ./aomenc $verbose -o /dev/shm/$bs $video $codec --limit=$frames --profile=$profile --fps=$fps $tune_content --target-bitrate=$bitrate --skip=0 -p 2 --good --cpu-used=0 --lag-in-frames=25 --min-q=0 --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0 --tile-columns=$col_num --test-decode=warn --psnr &>> $elog
# Note: $2 is the time unit, ms or us
#etime=`cat $elog | grep 'Pass 2/2' | grep 'fps)' | sed -e 's/^.*b\/s//' | awk '{print $1" "$2}'`
etime=`cat $elog | grep 'Pass 2/2' | grep 'fps)' | sed -e 's/^.*b\/s//' | awk '{print $1" "}'`
psnr=`cat $elog | grep 'PSNR' | awk '{print $5, $6, $7, $8, $9}'`
tmp=`cat $elog | grep mismatch`
if [ "$?" -ne 0 ]; then
eflag=e_ok
else
eflag=mismatch
fi
taskset -c 3 ./aomdec /dev/shm/$bs $codec --i420 --noblit --summary 2>&1 &>> $dlog
if [ "$?" -ne 0 ]; then
dflag=fault
else
dflag=d_ok
fi
# Note: $8 is the time unit ms or us
#dtime=`awk '{print $7" "$8}' < $dlog`
dtime=`awk '{print $7" "}' < $dlog`
echo -e $exp_tool '\t'$etime'\t'$dtime'\t'$psnr'\t'$eflag'\t'$dflag
rm ./aomenc ./aomdec
done
#!/bin/sh
# File:
# list_exp_speed.sh
# Decription:
# Configure, build, and run encoder/decoder for each experimental tool.
# Display the encoder/decode run time
# Note:
# See encoder config output if set,
# verbose=-v
root_dir=~/Dev/experiment
code_dir=$root_dir/aom
build_dir=$root_dir/release
test_dir=~/Dev/field
script_dir=~/Dev/sandbox/libvpx/scripts
# video=~/Dev/samples/videos/yaowu/soccer_cif.y4m
# wi=352
# he=288
# frames=5
# bitrate=500
# fps="30/1"
video=~/Videos/aom/park_joy/park_joy_360p_10.y4m
wi=640
he=360
frames=5
bitrate=800
fps="50/1"
# video=~/Dev/samples/videos/speed-set/touchdown_pass_480p.y4m
# wi=854
# he=480
# frames=100
# bitrate=1200
# fps="30000/1001"
# video=~/Dev/samples/videos/hbd/crowd_run_1080p_10.y4m
# wi=1920
# he=1080
# frames=100
# bitrate=8000
# fps="50/1"
bs=bs
codec="--codec=av1"
verbose=
# Note:
# Standard bit depth:
# 1) profile=0
# 2) remove $bitdepth in encoder command line
# 3) Change runconfig.sh, bitdepth=
# High bit depth:
# 1) profile=2
# 2) Add $bitdepth in encoder command line
# 3) Change runconfig.sh, bitdepth=--enable-aom-highbitdepth
profile=2
bitdepth="--bit-depth=10"
rm *.txt
# experimental ans var-tx entropy ext-intra filter-intra supertx ext-interp motion-var new-quant dual-filter ext-partition-types ext-partition ext-inter ext-tx ext-refs rect-tx global-motion loop-restoration
#for exp_tool in experimental var_tx tpl_mv dual_filter convolve_round ext_tx tx64x64 sub8x8_mc ext_intra intra_interp filter_intra ext_inter interintra wedge compound_segment ext_refs global_motion new_quant supertx ans new_tokenset loop_restoration ext_partition ext_partition_types unpoison_partition_ctx ext_tile motion_var ncobmc warped_motion entropy q_adapt_probs subframe_prob_update bitstream_debug rawbits pvq xiphrc cb4x4 chroma_2x2 frame_size parallel_deblocking parallel_deblocking_15tap loopfiltering_across_tiles ec_adapt tempmv_signaling coef_interleave entropy_stats masked_tx dependent_horztiles daala_dist tripred palette_throughput ref_adapt lv_map mv_compress frame_superres new_multisymbol
# loop-restoration new_tokenset (may have issues)
#compound-segment ncobmc warped_motion q_adapt_probs convolve_round var-tx ans entropy ext-intra filter-intra supertx motion-var new-quant dual-filter ext-partition-types ext-partition ext-inter ext-refs ext-tx
# experimental global-motion cb4x4 tpl-mv sub8x8_mc interintra wedge
for exp_tool in compound-segment ncobmc warped_motion q_adapt_probs convolve_round var-tx ans entropy ext-intra filter-intra supertx motion-var new-quant dual-filter ext-partition-types ext-partition ext-inter ext-refs ext-tx
do
cd $build_dir
make clean > /dev/null
$script_dir/runconfig_hbd.sh $exp_tool
make -j > /dev/null
if [ $? -ne 0 ]; then
echo Build failed on experiment: $exp_tool
fi
cp ./aomenc $test_dir/.
cp ./aomdec $test_dir/.
cd $test_dir
elog=e_$exp_tool.txt
dlog=d_$exp_tool.txt
bs=$bs_$exp_tool.webm
./aomenc -o $bs $video $codec --limit=$frames --skip=0 -p 2 --good --cpu-used=0 --target-bitrate=$bitrate --lag-in-frames=25 --min-q=0 --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0 --tile-columns=0 --profile=$profile $bitdepth --test-decode=warn $verbose --psnr &>> $elog
etime=`cat $elog | grep 'Pass 2/2' | grep 'fps' | sed -e 's/^.*b\/s//' | awk '{print $1" " $2}'`
psnr=`cat $elog | grep 'PSNR' | awk '{print $5, $6, $7, $8, $9}'`
./aomdec $bs $codec --i420 -o frm_%wx%h_$exp_tool.yuv %w $wi %h $he --summary 2>&1 &>> $dlog
dtime=`awk '{print $7" "$8}' < $dlog`
echo -e $exp_tool'\t'$etime '\t'$dtime'\t'$psnr
done
#!/bin/sh
# Note:
# - With any path, be very careful to type the report HTML file name.
# - Use prodcertstatus --show_expiration_time to see when ticket expires.
#
report_html=$1
report_path=/usr/local/google/home/luoyi/Dev/log
report_send=$report_path/$report_html
sendgmr --to=luoyi --cc=yunqingwang,vpx-eng --from=luoyi --reply_to=luoyi --subject="AV1 Nightly Speed Report" --html_file=$report_send --body_file=$report_send
#!/bin/sh
#set -x
platform=x86_64-linux-gcc
codec=--enable-av1
libsrc=aom
test_dir=~/Dev/nightly
script_dir=~/Dev/sandbox/libvpx/scripts
tool=--enable-$1
common="--disable-unit-tests --disable-docs --enable-experimental"
debug=
. $script_dir/disabled_list.sh
echo ../$libsrc/configure $debug $common $disabled $tool
../$libsrc/configure $debug $common $disabled $tool > /dev/null
if [ $? -ne 0 ]; then
echo "Error: configure fails!" > $test_dir/error_config.txt
exit 1
fi
#!/bin/sh
script_path=~/Dev/sandbox/libvpx/scripts
av1_code=~/Dev/av1d
vp9_code=~/Dev/vp9d
log_path=~/Dev/log
date_str=`date -d tomorrow +%b_%d_%Y`
log_file=report_$date_str.txt
html_log_file=report_$date_str.html
prev_date_str=`date +%b_%d_%Y`
prev_log_file=report_$prev_date_str.txt
test_dir=~/Dev/nightly
rm $test_dir/*
$script_path/gen_html_header.sh > $log_path/$html_log_file
# AV1
echo "<p>" >> $log_path/$html_log_file
$script_path/sync_codebase.sh $av1_code/aom >> $log_path/$html_log_file 2>&1
echo "</p>" >> $log_path/$html_log_file
echo "<p>" >> $log_path/$html_log_file
$script_path/av1_conf_build.sh $av1_code >> $log_path/$html_log_file 2>&1
echo "</p>" >> $log_path/$html_log_file
pdfps=`cat $log_path/$prev_log_file | grep e_ok | awk '{print $2}' | awk 'NR==1 {print $1}'`
$script_path/nightly_speed.sh $av1_code 0 $pdfps $html_log_file >> $log_path/$log_file 2>&1
pdfps=`cat $log_path/$prev_log_file | grep e_ok | awk '{print $2}' | awk 'NR==2 {print $1}'`
$script_path/nightly_speed.sh $av1_code 2 $pdfps $html_log_file >> $log_path/$log_file 2>&1
# VP9
echo "<p>" >> $log_path/$html_log_file