Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
73b78f93
Commit
73b78f93
authored
Nov 10, 2006
by
Christophe Mutricy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the alignment issue in ffmpeg. Based on patch by Thorsten Jordan. Almost closes #757
parent
e6e5f6b1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
0 deletions
+81
-0
extras/contrib/src/Makefile
extras/contrib/src/Makefile
+3
-0
extras/contrib/src/Patches/ffmpeg-alignment.patch
extras/contrib/src/Patches/ffmpeg-alignment.patch
+78
-0
No files found.
extras/contrib/src/Makefile
View file @
73b78f93
...
...
@@ -929,6 +929,9 @@ endif
ifdef
HAVE_WINCE
patch
-p
1 < Patches/ffmpeg-svn-wince.patch
endif
ifdef
HAVE_WIN32
(
cd
$@
;
patch
-p
0 < ../Patches/ffmpeg-alignment.patch
)
endif
ffmpeg-$(FFMPEG_VERSION).tar.gz
:
$(WGET)
$(FFMPEG_URL)
...
...
extras/contrib/src/Patches/ffmpeg-alignment.patch
0 → 100644
View file @
73b78f93
Index: libavcodec/vp3.c
===================================================================
--- libavcodec/vp3.c (revision 6957)
+++ libavcodec/vp3.c (working copy)
@@ -1503,7 +1503,14 @@
int x;
int m, n;
int16_t *dequantizer;
- DECLARE_ALIGNED_16(DCTELEM, block[64]);
+
+ // TJ: force alignment to 16.
+ //DCTELEM is short
+ //DECLARE_ALIGNED_16(DCTELEM, block[64]);
+ DCTELEM block_[64+8];
+ DCTELEM* block = (DCTELEM*)((((unsigned long)block_)+0xf)&~0xf);
+ // end force
+
int motion_x = 0xdeadbeef, motion_y = 0xdeadbeef;
int motion_halfpel_index;
uint8_t *motion_source;
Index: libavcodec/mpegvideo.c
===================================================================
--- libavcodec/mpegvideo.c (revision 6957)
+++ libavcodec/mpegvideo.c (working copy)
@@ -6087,7 +6087,14 @@
DCTELEM *block, int16_t *weight, DCTELEM *orig,
int n, int qscale){
int16_t rem[64];
- DECLARE_ALIGNED_16(DCTELEM, d1[64]);
+
+ // TJ: force alignment to 16.
+ //DCTELEM is short
+ //DECLARE_ALIGNED_16(DCTELEM, d1[64]);
+ DCTELEM d1_[64+8];
+ DCTELEM* d1 = (DCTELEM*)((((unsigned long)d1_)+0xf)&~0xf);
+ // end force
+
const int *qmat;
const uint8_t *scantable= s->intra_scantable.scantable;
const uint8_t *perm_scantable= s->intra_scantable.permutated;
Index: libavcodec/wmadec.c
===================================================================
--- libavcodec/wmadec.c (revision 6957)
+++ libavcodec/wmadec.c (working copy)
@@ -717,7 +717,22 @@
{
int n, v, a, ch, code, bsize;
int coef_nb_bits, total_gain, parse_exponents;
- DECLARE_ALIGNED_16(float, window[BLOCK_MAX_SIZE * 2]);
+
+ // TJ: force alignment to 16.
+ //float is 4 bytes.
+ //DECLARE_ALIGNED_16(float, window[BLOCK_MAX_SIZE * 2]);
+ float window_[BLOCK_MAX_SIZE * 2 + 4];
+ float* window = (float*)((((unsigned long)window_)+0xf)&~0xf);
+ // end force
+
+ // TJ: force alignment to 16.
+ // moved to this block, so alignment must not be done over and over again
+ // FFTSample is float
+ //DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]);
+ FFTSample output_[BLOCK_MAX_SIZE * 2 + 4];
+ FFTSample* output = (FFTSample*)((((unsigned long)output_)+0xf)&~0xf);
+ // end force
+
int nb_coefs[MAX_CHANNELS];
float mdct_norm;
@@ -1107,7 +1122,8 @@
for(ch = 0; ch < s->nb_channels; ch++) {
if (s->channel_coded[ch]) {
- DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]);
+/* moved to the top
+ * DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]);*/
float *ptr;
int n4, index, n;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment