# prepare your environment
make distclean
mkdir .build-topic
cd .build-topic
../configure
make -j 8
# expand the file you are interested on
make libavcodec/h264_parser.i
uncrustify -c ~/uncrustify-libav.cfg libavcodec/h264_parser.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void amf_dump(AVFormatContext *s) | |
{ | |
AVIOContext *pb = s->pb; | |
int v; | |
char buf[1024]; | |
if (pb->eof_reached) | |
return; | |
switch ((v = avio_r8(pb))) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static inline int get_ue_golomb(GetBitContext *gb) | |
{ | |
unsigned int buf; | |
unsigned int re_index = (gb)->index; | |
unsigned int __attribute__((unused)) re_cache = 0; | |
unsigned int re_size_plus8 = (gb)->size_in_bits_plus8; | |
re_cache = av_bswap32((((const union unaligned_32 *)((gb)->buffer + (re_index >> 3)))->l)) << (re_index & 7); | |
buf = ((uint32_t)re_cache); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define bistream_read_count(bb) ({\ | |
int _ret = bitstream_read_count(bb); \ | |
printf("%s:%d %s, read_count %d\n", __FILE__, __LINE__, __func__, _ret); \ | |
_ret; \ | |
}) | |
#define bistream_read_bit(bb) ({\ | |
int _ret = bitstream_read_bit(bb); \ | |
printf("%s:%d %s, read_bit %d\n", __FILE__, __LINE__, __func__, _ret); \ | |
_ret; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define get_bits_count(gb) \ | |
({ \ | |
int _ret = get_bits_count(gb); \ | |
printf("%s:%d %s, read_count %d\n", __FILE__, __LINE__, __func__, _ret); \ | |
_ret; \ | |
}) | |
#define get_bits1(gb) \ | |
({ \ | |
unsigned int _ret = get_bits1(gb); \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c | |
index 80bc46a..d651406 100644 | |
--- a/libavcodec/svq3.c | |
+++ b/libavcodec/svq3.c | |
@@ -75,6 +75,7 @@ typedef struct SVQ3Context { | |
H264Picture *cur_pic; | |
H264Picture *next_pic; | |
H264Picture *last_pic; | |
+ GetBitContext slice; | |
int halfpel_flag; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /tmp/apedec.S 2016-04-13 07:07:23.000000000 +0200 | |
+++ libavcodec/apedec.S 2016-04-13 07:08:39.000000000 +0200 | |
@@ -47815,7 +47815,7 @@ | |
.loc 18 1308 41 ## /Users/lu_zero/Sources/libav/libavcodec/apedec.c:1308:41 | |
andl $-2147483648, %eax ## imm = 0xFFFFFFFF80000000 | |
Ltmp4162: | |
- .loc 18 1308 56 is_stmt 0 ## /Users/lu_zero/Sources/libav/libavcodec/apedec.c:1308:56 | |
+ .loc 18 1308 53 is_stmt 0 ## /Users/lu_zero/Sources/libav/libavcodec/apedec.c:1308:53 | |
xorl $-1073741824, %eax ## imm = 0xFFFFFFFFC0000000 | |
.loc 18 1309 55 is_stmt 1 ## /Users/lu_zero/Sources/libav/libavcodec/apedec.c:1309:55 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c | |
index 820a7ae..51a1943 100644 | |
--- a/libavcodec/mpegaudiodec_template.c | |
+++ b/libavcodec/mpegaudiodec_template.c | |
@@ -33,6 +33,7 @@ | |
#include "internal.h" | |
#include "mathops.h" | |
#include "mpegaudiodsp.h" | |
+#include "bitstream_debug.h" | |
- install msys2 from https://msys2.github.io/
- use the MingW64 shell
- install
git
andmingw-w64-x86_64-gcc
usingpacman -S git mingw-w64-x86_64-gcc
- download the SDK from https://software.intel.com/en-us/media-sdk
- will update
PATH
andINTELMEDIASDKROOT
- will update
- optional download the code samples a https://software.intel.com/en-us/media-sdk-support/code-samples
- Install
mfx_dispatch
- download the repackaged mfx_dispatch using
git clone git://github.com/lu-zero/mfx_dispatch
- download the repackaged mfx_dispatch using
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fate .x86_32 # perf stat -r 30 ./avconv_old -v quiet -nostats -threads 1 -t 100 -i /tmp/test.mov -f null - | |
Performance counter stats for './avconv_old -v quiet -nostats -threads 1 -t 100 -i /tmp/test.mov -f null -' (30 runs): | |
33067.977078 task-clock (msec) # 0.999 CPUs utilized | |
2331 context-switches # 0.070 K/sec | |
13 cpu-migrations # 0.000 K/sec | |
8137 page-faults # 0.246 K/sec | |
125030253229 cycles # 3.778 GHz | |
25015097060 stalled-cycles-frontend # 20.02% frontend cycles idle |