Skip to content

Instantly share code, notes, and snippets.

View justinruggles's full-sized avatar

Justin Ruggles justinruggles

View GitHub Profile
diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c
index eb2d2f9..7547b9c 100644
--- a/libavfilter/af_resample.c
+++ b/libavfilter/af_resample.c
@@ -93,7 +93,11 @@ static int config_output(AVFilterLink *outlink)
if (inlink->channel_layout == outlink->channel_layout &&
inlink->sample_rate == outlink->sample_rate &&
- inlink->format == outlink->format)
+ (inlink->format == outlink->format ||
From 8965967b510ce7a6f86abbc4e3b9a16f7f02ff49 Mon Sep 17 00:00:00 2001
From: Justin Ruggles <[email protected]>
Date: Fri, 31 Aug 2012 22:57:12 -0400
Subject: [PATCH 6/6] lavfi: increase MAX_REGISTERED_AVFILTERS_NB to 128
---
libavfilter/avfilter.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
@justinruggles
justinruggles / gist:3506877
Created August 29, 2012 04:35
audio decoders - sample format
aac fltp, s16 [done]
aac_latm fltp, s16 [done]
ac3 fltp, s16 [done]
adpcm_4xm s16p
adpcm_adx s16p
adpcm_ct s16 [existing] natively interleaved
adpcm_ea s16 [existing] natively interleaved
adpcm_ea_maxis_xa s16 [existing] natively interleaved
adpcm_ea_r1 s16p
adpcm_ea_r2 s16p
@justinruggles
justinruggles / gist:3416858
Created August 21, 2012 16:05
flac 24-bit encoding
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 94e381d..3dcafb1 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -52,6 +52,7 @@ typedef struct CompressionOptions {
int prediction_order_method;
int min_partition_order;
int max_partition_order;
+ int bits_per_sample;
} CompressionOptions;
works:
palignr m1, m0, m3, 12
works:
mova m1, m3
mova m4, m0
pslldq m1, 4
psrldq m4, 12
por m1, m4
%if 1
; shuffle dwords:
pshufd m3, m3, q3120 ; m3 = 0, 1, 2, 3, 12, 13, 14, 15
pshufd m0, m0, q1302 ; m0 = 4, 5, 6, 7, 16, 17, 18, 19
pshufd m2, m2, q3120 ; m2 = 8, 9, 10, 11, 20, 21, 22, 23
movq [dstq ], m3
movq [dstq+ 8], m0
movq [dstq+16], m2
movhps [dstq+24], m3
movhps [dstq+32], m0
From 03f42e9e885ce8e5f29e3f04e2c98e5352f69df4 Mon Sep 17 00:00:00 2001
From: "Ronald S. Bultje" <[email protected]>
Date: Mon, 30 Jul 2012 13:00:04 -0700
Subject: [PATCH] fft: port FFT and IMDCT functions for 3dnow to yasm.
---
libavcodec/x86/Makefile | 2 -
libavcodec/x86/fft_3dn.c | 23 ------
libavcodec/x86/fft_3dn2.c | 173 --------------------------------------------
libavcodec/x86/fft_mmx.asm | 169 +++++++++++++++++++++++++++++++++++++++----
Dump of assembler code for function ff_imdct_half_3dnow.pre:
0x085df9e7 <+0>: mov 0x4(%esp),%ebp
0x085df9eb <+4>: movd (%edx,%ebx,4),%mm0
0x085df9ef <+8>: movd -0x4(%edi,%esi,4),%mm1
0x085df9f4 <+13>: punpckldq -0x4(%edx,%esi,4),%mm0
0x085df9f9 <+18>: punpckldq -0x4(%ebp,%esi,4),%mm1
0x085df9fe <+23>: movq %mm0,%mm2
0x085dfa01 <+26>: movq %mm1,%mm3
0x085dfa04 <+29>: psrlq $0x20,%mm3
0x085dfa08 <+33>: punpckldq %mm1,%mm3
Dump of assembler code for function ff_imdct_half_3dnow.pre:
0x085df9d7 <+0>: mov 0x4(%esp),%ebp
0x085df9db <+4>: movd -0x4(%edx,%esi,4),%mm0
0x085df9e0 <+9>: movd (%edi,%ebx,2),%mm1
0x085df9e4 <+13>: punpckldq (%edx,%ebx,4),%mm0
0x085df9e8 <+17>: punpckldq 0x0(%ebp,%ebx,2),%mm1
0x085df9ed <+22>: movq %mm0,%mm2
0x085df9f0 <+25>: movq %mm1,%mm3
0x085df9f3 <+28>: psrlq $0x20,%mm3
0x085df9f7 <+32>: punpckldq %mm1,%mm3
Program received signal SIGSEGV, Segmentation fault.
ff_imdct_half_3dnow.pre ()
at /home/justin/src/libav2/libavcodec/x86/fft_mmx.asm:1071
1071 DECL_IMDCT POSROTATESHUF_3DNOW
(gdb) disp/i $pc
1: x/i $pc
=> 0x85dfa1a <ff_imdct_half_3dnow.pre+67>: movq %mm0,0x0(%ebp)
(gdb) info all-registers
eax 0x8ee2940 149825856
ecx 0x8ee8d00 149851392