History

Define macro AV_NE() and use it in libavdevice.

Help further refactoring. Originally committed as revision 24814 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 4f2d2e41 parent 3f52a904 files · +10 −11Browse files

Unified · Split

4 files
  1. libavdevice/alsa-audio.h +1 −5
  2. libavdevice/oss_audio.c +1 −5
  3. libavutil/avutil.h +1 −1
  4. libavutil/common.h +7 −0
libavdevice/alsa-audio.h+1−5
@@ -37,11 +37,7 @@ · 36 unmodified lines
37/* XXX: we make the assumption that the soundcard accepts this format */37/* XXX: we make the assumption that the soundcard accepts this format */
38/* XXX: find better solution with "preinit" method, needed also in38/* XXX: find better solution with "preinit" method, needed also in
39 other formats */39 other formats */
40#if HAVE_BIGENDIAN40#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
41#define DEFAULT_CODEC_ID CODEC_ID_PCM_S16BE
42#else
43#define DEFAULT_CODEC_ID CODEC_ID_PCM_S16LE
44#endif
45 41
46typedef struct {42typedef struct {
47 snd_pcm_t *h;43 snd_pcm_t *h;
libavdevice/oss_audio.c+1−5
@@ -315,11 +315,7 @@ AVOutputFormat oss_muxer = { · 314 unmodified lines
315 /* XXX: we make the assumption that the soundcard accepts this format */315 /* XXX: we make the assumption that the soundcard accepts this format */
316 /* XXX: find better solution with "preinit" method, needed also in316 /* XXX: find better solution with "preinit" method, needed also in
317 other formats */317 other formats */
318#if HAVE_BIGENDIAN318 AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
319 CODEC_ID_PCM_S16BE,
320#else
321 CODEC_ID_PCM_S16LE,
322#endif
323 CODEC_ID_NONE,319 CODEC_ID_NONE,
324 audio_write_header,320 audio_write_header,
325 audio_write_packet,321 audio_write_packet,
libavutil/avutil.h+1−1
@@ -40,7 +40,7 @@ · 39 unmodified lines
40#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)40#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
41 41
42#define LIBAVUTIL_VERSION_MAJOR 5042#define LIBAVUTIL_VERSION_MAJOR 50
43#define LIBAVUTIL_VERSION_MINOR 2343#define LIBAVUTIL_VERSION_MINOR 24
44#define LIBAVUTIL_VERSION_MICRO 044#define LIBAVUTIL_VERSION_MICRO 0
45 45
46#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \46#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
libavutil/common.h+7−0
@@ -35,6 +35,13 @@ · 34 unmodified lines
35#include <stdlib.h>35#include <stdlib.h>
36#include <string.h>36#include <string.h>
37#include "attributes.h"37#include "attributes.h"
38#include "avconfig.h"
39
40#if AV_HAVE_BIGENDIAN
41# define AV_NE(be, le) be
42#else
43# define AV_NE(be, le) le
44#endif
38 45
39//rounded division & shift46//rounded division & shift
40#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))47#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t