Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
af6dd6de
Commit
af6dd6de
authored
12 years ago
by
Diego Biurrun
Browse files
Options
Downloads
Patches
Plain Diff
intreadwrite: Add AV_COPYxxU macros for copying to/from unaligned addresses
parent
aa91fe80
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavutil/intreadwrite.h
+27
-0
27 additions, 0 deletions
libavutil/intreadwrite.h
with
27 additions
and
0 deletions
libavutil/intreadwrite.h
+
27
−
0
View file @
af6dd6de
...
@@ -462,6 +462,33 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
...
@@ -462,6 +462,33 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
# define AV_WN64A(p, v) AV_WNA(64, p, v)
# define AV_WN64A(p, v) AV_WNA(64, p, v)
#endif
#endif
/*
* The AV_COPYxxU macros are suitable for copying data to/from unaligned
* memory locations.
*/
#define AV_COPYU(n, d, s) AV_WN##n(d, AV_RN##n(s));
#ifndef AV_COPY16U
# define AV_COPY16U(d, s) AV_COPYU(16, d, s)
#endif
#ifndef AV_COPY32U
# define AV_COPY32U(d, s) AV_COPYU(32, d, s)
#endif
#ifndef AV_COPY64U
# define AV_COPY64U(d, s) AV_COPYU(64, d, s)
#endif
#ifndef AV_COPY128U
# define AV_COPY128U(d, s) \
do { \
AV_COPY64U(d, s); \
AV_COPY64U((char *)(d) + 8, (const char *)(s) + 8); \
} while(0)
#endif
/* Parameters for AV_COPY*, AV_SWAP*, AV_ZERO* must be
/* Parameters for AV_COPY*, AV_SWAP*, AV_ZERO* must be
* naturally aligned. They may be implemented using MMX,
* naturally aligned. They may be implemented using MMX,
* so emms_c() must be called before using any float code
* so emms_c() must be called before using any float code
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment