Skip to content

Commit

Permalink
libmpeg2: Cleanup CONV_LE_TO_BE using builtin_bswap32
Browse files Browse the repository at this point in the history
Bug: b/261228395
Test: Build
  • Loading branch information
vivekrj1806 committed Sep 20, 2023
1 parent 0358065 commit 778ad9a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
6 changes: 1 addition & 5 deletions common/arm/impeg2_platform_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
#define __IMPEG2_PLATFORM_MACROS_H__


#define CONV_LE_TO_BE(u4_temp2,u4_temp1) u4_temp2 = \
(u4_temp1 << 24) | \
((u4_temp1 & 0xff00) << 8) | \
((u4_temp1 & 0xff0000) >> 8) | \
(u4_temp1 >> 24);
#define CONV_LE_TO_BE(u4_temp2,u4_temp1) u4_temp2 = __builtin_bswap32(u4_temp1);

static __inline UWORD32 CLZ(UWORD32 u4_word)
{
Expand Down
6 changes: 1 addition & 5 deletions common/armv8/impeg2_platform_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
#ifndef __IMPEG2_PLATFORM_MACROS_H__
#define __IMPEG2_PLATFORM_MACROS_H__

#define CONV_LE_TO_BE(u4_temp2,u4_temp1) u4_temp2 = \
(u4_temp1 << 24) | \
((u4_temp1 & 0xff00) << 8) | \
((u4_temp1 & 0xff0000) >> 8) | \
(u4_temp1 >> 24);
#define CONV_LE_TO_BE(u4_temp2,u4_temp1) u4_temp2 = __builtin_bswap32(u4_temp1);

static __inline UWORD32 CLZ(UWORD32 u4_word)
{
Expand Down
6 changes: 2 additions & 4 deletions common/riscv/impeg2_platform_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
#define __IMPEG2_PLATFORM_MACROS_H__


#define CONV_LE_TO_BE(u4_temp2,u4_temp1) u4_temp2 = (u4_temp1 << 24) | \
((u4_temp1 & 0xff00) << 8) | \
((u4_temp1 & 0xff0000) >> 8) | \
(u4_temp1 >> 24);
#define CONV_LE_TO_BE(u4_temp2,u4_temp1) u4_temp2 = __builtin_bswap32(u4_temp1);

static __inline UWORD32 CLZ(UWORD32 u4_word)
{
if(u4_word)
Expand Down
6 changes: 2 additions & 4 deletions common/x86/impeg2_platform_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
#define __IMPEG2_PLATFORM_MACROS_H__


#define CONV_LE_TO_BE(u4_temp2,u4_temp1) u4_temp2 = (u4_temp1 << 24) | \
((u4_temp1 & 0xff00) << 8) | \
((u4_temp1 & 0xff0000) >> 8) | \
(u4_temp1 >> 24);
#define CONV_LE_TO_BE(u4_temp2,u4_temp1) u4_temp2 = __builtin_bswap32(u4_temp1);

static __inline UWORD32 CLZ(UWORD32 u4_word)
{
if(u4_word)
Expand Down

0 comments on commit 778ad9a

Please sign in to comment.