xine-lib: xine-lib-1.2.13/src/xine-engine/bswap.h File Reference

xine-lib 1.2.13-20230125hg15249

Macros
bswap.h File Reference
`#include "ffmpeg_bswap.h"`

Go to the source code of this file.

## Macros
#define | always_inline inline
#define | _X_ABE_16(x) (be2me_16(*(const uint16_t*)(x)))
#define | _X_ABE_32(x) (be2me_32(*(const uint32_t*)(x)))
#define | _X_ABE_64(x) (be2me_64(*(const uint64_t*)(x)))
#define | _X_ALE_16(x) (le2me_16(*(const uint16_t*)(x)))
#define | _X_ALE_32(x) (le2me_32(*(const uint32_t*)(x)))
#define | _X_ALE_64(x) (le2me_64(*(const uint64_t*)(x)))
#define | _X_BE_16(x)
#define | _X_BE_24(x)
#define | _X_BE_32(x)
#define | _X_BE_64(x)
#define | _X_LE_16(x)
#define | _X_LE_24(x)
#define | _X_LE_32(x)
#define | _X_LE_64(x)
#define | _X_ME_16(x) _X_LE_16(x)
#define | _X_ME_32(x) _X_LE_32(x)
#define | _X_ME_64(x) _X_LE_64(x)
#define | _X_AME_16(x) _X_ALE_16(x)
#define | _X_AME_32(x) _X_ALE_32(x)
#define | _X_AME_64(x) _X_ALE_64(x)
#define | BE_FOURCC(ch0, ch1, ch2, ch3)
#define | LE_FOURCC(ch0, ch1, ch2, ch3)
#define | ME_FOURCC LE_FOURCC

## Detailed Description

byte swap.

## Macro Definition Documentation

## ◆ _X_ABE_16

#define _X_ABE_16 | ( |  | x | ) | (be2me_16(*(const uint16_t*)(x)))

## ◆ _X_ABE_32

#define _X_ABE_32 | ( |  | x | ) | (be2me_32(*(const uint32_t*)(x)))

Referenced by probe_mod_file().

## ◆ _X_ABE_64

#define _X_ABE_64 | ( |  | x | ) | (be2me_64(*(const uint64_t*)(x)))

## ◆ _X_ALE_16

#define _X_ALE_16 | ( |  | x | ) | (le2me_16(*(const uint16_t*)(x)))

## ◆ _X_ALE_32

#define _X_ALE_32 | ( |  | x | ) | (le2me_32(*(const uint32_t*)(x)))

## ◆ _X_ALE_64

#define _X_ALE_64 | ( |  | x | ) | (le2me_64(*(const uint64_t*)(x)))

## ◆ _X_AME_16

#define _X_AME_16 | ( |  | x | ) | _X_ALE_16(x)

## ◆ _X_AME_32

#define _X_AME_32 | ( |  | x | ) | _X_ALE_32(x)

## ◆ _X_AME_64

#define _X_AME_64 | ( |  | x | ) | _X_ALE_64(x)

## ◆ _X_BE_16

#define _X_BE_16 | ( |  | x | ) |

Value:
(((uint16_t)(((const uint8_t*)(x))[0]) << 8) | \
((uint16_t)((const uint8_t*)(x))[1]))

Referenced by _x_parse_flac_streaminfo_block(), bitplane_dlta_8_short(), bitplane_sdelta_opt_3(), bitplane_set_dlta_short(), demux_iff_send_chunk(), demux_pva_send_chunk(), demux_real_send_chunk(), ff_handle_header_buffer(), ff_handle_header_buffer(), flac_parse_frame_head(), id3v23_parse_frame_ext_header(), id3v23_parse_frame_header(), id3v24_parse_frame_header(), info_string_from_atom(), init_codec(), init_codec(), init_codec_dvbsub(), lex_convert(), nsv_read(), open_aiff_file(), open_film_file(), open_flac_file(), open_ra_file(), open_smjpeg_file(), parse_amf(), parse_int16(), parse_mpeg2_packet(), parse_reference_atom(), parse_trak_atom(), parse_vbri_header(), pnm_get_chunk(), pnm_get_stream_chunk(), process_alt_CLUT_segment(), process_CLUT_definition_segment(), process_display_definition_segment(), process_object_data_segment(), process_page_composition_segment(), process_region_composition_segment(), qtv_init_driver(), read_iff_chunk(), real_parse_audio_specific_data(), real_parse_headers(), real_parse_index(), real_parse_mdpr(), rmff_dump_cont(), rmff_dump_dataheader(), rmff_dump_fileheader(), rmff_dump_mdpr(), rmff_dump_prop(), select_mlti_data(), and spudec_decode_data().

## ◆ _X_BE_24

#define _X_BE_24 | ( |  | x | ) |

Value:
(((uint32_t)(((const uint8_t*)(x))[0]) << 16) | \
((uint32_t)(((const uint8_t*)(x))[1]) << 8) | \
((uint32_t)(((const uint8_t*)(x))[2])))

Referenced by _x_parse_flac_metadata_header(), _x_parse_flac_streaminfo_block(), id3v22_parse_frame_header(), parse_trak_atom(), and xine_base64_encode().

## ◆ _X_BE_32

#define _X_BE_32 | ( |  | x | ) |

Value:
(((uint32_t)(((const uint8_t*)(x))[0]) << 24) | \
((uint32_t)(((const uint8_t*)(x))[1]) << 16) | \
((uint32_t)(((const uint8_t*)(x))[2]) << 8) | \
((uint32_t)((const uint8_t*)(x))[3]))

Referenced by _mad_frame_size(), _x_parse_flac_streaminfo_block(), atom_scan(), bitplane_dlta_5(), bitplane_dlta_7_long(), bitplane_dlta_7_short(), bitplane_dlta_8_long(), bitplane_dlta_8_short(), bitplane_sdelta_opt_3(), bitplane_set_dlta_short(), build_frame_table(), decode_flac_header(), decode_opus_header(), demux_aac_apply_adts(), demux_aac_get_bits(), demux_aac_next(), demux_mve_seek(), demux_mve_send_chunk(), demux_pva_send_chunk(), demux_qt_load_fragment_index(), demux_real_send_chunk(), demux_smjpeg_send_chunk(), demux_ts_adaptation_field_parse(), demux_ts_parse_packet(), demux_ts_parse_pat(), demux_ts_parse_pat_pmt_packet(), demux_ts_parse_pes_header(), demux_ts_parse_pmt(), demux_ts_seek(), demux_vqa_send_chunk(), ebml_read_float(), ff_aac_mode_parse(), ff_handle_header_buffer(), ff_handle_header_buffer(), find_embedded_atoms(), find_mdat_atom(), flac_get_frame(), flac_parse_frame_head(), fragment_scan(), frametype_h264(), frametype_h265(), frametype_mpeg(), frametype_vc1(), id3v23_parse_frame_ext_header(), id3v23_parse_frame_header(), id3v24_parse_ext_header(), id3v24_parse_frame_header(), info_string_from_atom(), init_codec(), init_codec(), lex_convert(), load_moov_atom(), mpeg_get_pts(), nsf_decode_data(), open_aiff_file(), open_film_file(), open_flac_file(), open_iff_file(), open_mve_file(), open_plugin(), open_plugin(), open_plugin(), open_qt_file(), open_ra_file(), open_smjpeg_file(), open_snd_file(), open_vqa_file(), parse_amf(), parse_frame_header(), parse_frame_payload(), parse_moof_atom(), parse_moov_atom(), parse_mvex_atom(), parse_mvhd_atom(), parse_pack(), parse_pack_preview(), parse_reference_atom(), parse_traf_atom(), parse_trak_atom(), parse_vbri_header(), parse_xing_header(), pnm_get_chunk(), pnm_get_stream_chunk(), probe_aac_file(), probe_film_file(), process_alt_CLUT_segment(), qtv_init_driver(), read_flv_packet(), read_iff_chunk(), real_get_rdt_chunk(), real_parse_audio_specific_data(), real_parse_headers(), real_parse_index(), real_parse_mdpr(), rmff_dump_cont(), rmff_dump_dataheader(), rmff_dump_fileheader(), rmff_dump_mdpr(), rmff_dump_prop(), seek_flv_file(), select_mlti_data(), and sha160_trans().

## ◆ _X_BE_64

#define _X_BE_64 | ( |  | x | ) |

Value:
(((uint64_t)(((const uint8_t*)(x))[0]) << 56) | \
((uint64_t)(((const uint8_t*)(x))[1]) << 48) | \
((uint64_t)(((const uint8_t*)(x))[2]) << 40) | \
((uint64_t)(((const uint8_t*)(x))[3]) << 32) | \
((uint64_t)(((const uint8_t*)(x))[4]) << 24) | \
((uint64_t)(((const uint8_t*)(x))[5]) << 16) | \
((uint64_t)(((const uint8_t*)(x))[6]) << 8) | \
((uint64_t)((const uint8_t*)(x))[7]))

Referenced by _x_parse_flac_streaminfo_block(), build_frame_table(), ebml_read_float(), fragment_scan(), load_moov_atom(), open_flac_file(), parse_traf_atom(), and parse_trak_atom().

## ◆ _X_LE_16

#define _X_LE_16 | ( |  | x | ) |

Value:
(((uint16_t)(((const uint8_t*)(x))[1]) << 8) | \
((uint16_t)((const uint8_t*)(x))[0]))

Referenced by asf_header_parse_content_description(), asf_header_parse_file_properties(), asf_header_parse_metadata(), asf_header_parse_stream_bitrate_properties(), asf_header_parse_stream_extended_properties(), asf_header_parse_stream_properties(), asf_parse_packet_compressed_payload(), asf_parse_packet_payload(), asf_parse_packet_payload_common(), asf_parse_packet_payload_header(), asf_read_header(), decode_audio_header(), decode_dshow_header(), decode_video_header(), demux_asf_send_headers_common(), demux_aud_send_chunk(), demux_fli_send_chunk(), demux_ivf_send_headers(), demux_nsv_send_chunk(), demux_roq_send_chunk(), demux_str_send_chunk(), get_chunk_header(), get_packet_header(), iconv_internal(), lex_convert(), open_aud_file(), open_fli_file(), open_nsv_file(), open_plugin(), open_roq_file(), open_str_file(), open_vmd_file(), open_vqa_file(), osd_renderer_load_font(), probe_voc_file(), and process_ipmovie_chunk().

## ◆ _X_LE_24

#define _X_LE_24 | ( |  | x | ) |

Value:
(((uint32_t)(((const uint8_t*)(x))[2]) << 16) | \
((uint32_t)(((const uint8_t*)(x))[1]) << 8) | \
((uint32_t)(((const uint8_t*)(x))[0])))

Referenced by demux_vc1_es_next_smp(), and open_voc_file().

## ◆ _X_LE_32

#define _X_LE_32 | ( |  | x | ) |

Value:
(((uint32_t)(((const uint8_t*)(x))[3]) << 24) | \
((uint32_t)(((const uint8_t*)(x))[2]) << 16) | \
((uint32_t)(((const uint8_t*)(x))[1]) << 8) | \
((uint32_t)((const uint8_t*)(x))[0]))

Referenced by asf_header_new(), asf_header_parse_file_properties(), asf_header_parse_header_extension(), asf_header_parse_metadata(), asf_header_parse_stream_bitrate_properties(), asf_header_parse_stream_extended_properties(), asf_header_parse_stream_properties(), asf_parse_packet_compressed_payload(), asf_parse_packet_payload(), asf_parse_packet_payload_common(), asf_parse_packet_payload_header(), asf_read_header(), calc_response(), call_hash(), check_newpts(), config_register_serialized_entry(), decode_anxdata_header(), decode_audio_header(), decode_dshow_header(), decode_video_header(), demux_eawve_send_chunk(), demux_fli_send_chunk(), demux_fourxm_send_chunk(), demux_idcin_send_chunk(), demux_ivf_send_chunk(), demux_ivf_send_headers(), demux_mpc_send_chunk(), demux_mve_send_chunk(), demux_nsv_send_chunk(), demux_roq_send_chunk(), demux_str_send_chunk(), demux_vc1_es_next_smp(), find_chunk_by_tag(), get_chunk_header(), get_media_packet(), get_packet_command(), get_packet_header(), hash(), lex_convert(), open_ac3_file(), open_dts_file(), open_flac_file(), open_fli_file(), open_fourxm_file(), open_idcin_file(), open_mpc_file(), open_mve_file(), open_nsv_file(), open_plugin(), open_plugin(), open_roq_file(), open_vmd_file(), probe_fourxm_file(), process_header(), and process_ipmovie_chunk().

## ◆ _X_LE_64

#define _X_LE_64 | ( |  | x | ) |

Value:
(((uint64_t)(((const uint8_t*)(x))[7]) << 56) | \
((uint64_t)(((const uint8_t*)(x))[6]) << 48) | \
((uint64_t)(((const uint8_t*)(x))[5]) << 40) | \
((uint64_t)(((const uint8_t*)(x))[4]) << 32) | \
((uint64_t)(((const uint8_t*)(x))[3]) << 24) | \
((uint64_t)(((const uint8_t*)(x))[2]) << 16) | \
((uint64_t)(((const uint8_t*)(x))[1]) << 8) | \
((uint64_t)((const uint8_t*)(x))[0]))

Referenced by asf_header_new(), asf_header_parse_file_properties(), asf_header_parse_header_extension(), asf_header_parse_stream_extended_properties(), asf_header_parse_stream_properties(), asf_read_header(), decode_anxdata_header(), decode_audio_header(), decode_cmml_header(), decode_video_header(), and demux_ivf_send_chunk().

## ◆ _X_ME_16

#define _X_ME_16 | ( |  | x | ) | _X_LE_16(x)

## ◆ _X_ME_32

#define _X_ME_32 | ( |  | x | ) | _X_LE_32(x)

Referenced by demux_mpgaudio_next(), demux_ts_get_reg_desc(), detect_mpgaudio_file(), open_mpc_file(), open_nsv_file(), open_ra_file(), parse_trak_atom(), real_parse_audio_specific_data(), real_parse_headers(), and spudec_decode_data().

## ◆ _X_ME_64

#define _X_ME_64 | ( |  | x | ) | _X_LE_64(x)

## ◆ always_inline

#define always_inline inline

## ◆ BE_FOURCC

#define BE_FOURCC | ( |  | ch0,
|  |  | ch1,
|  |  | ch2,
|  |  | ch3 )

Value:
( (uint32_t)(unsigned char)(ch3) | \
( (uint32_t)(unsigned char)(ch2) << 8 ) | \
( (uint32_t)(unsigned char)(ch1) << 16 ) | \
( (uint32_t)(unsigned char)(ch0) << 24 ) )

Referenced by _x_formattag_to_buf_audio(), id3v22_interp_frame(), id3v23_interp_frame(), and id3v24_interp_frame().

## ◆ LE_FOURCC

#define LE_FOURCC | ( |  | ch0,
|  |  | ch1,
|  |  | ch2,
|  |  | ch3 )

Value:
( (uint32_t)(unsigned char)(ch0) | \
( (uint32_t)(unsigned char)(ch1) << 8 ) | \
( (uint32_t)(unsigned char)(ch2) << 16 ) | \
( (uint32_t)(unsigned char)(ch3) << 24 ) )

## ◆ ME_FOURCC

#define ME_FOURCC LE_FOURCC

Referenced by blend_yuv_grow_extra_data(), blend_yuy2_grow_extra_data(), decode_flac_header(), demux_real_send_chunk(), demux_ts_parse_pmt(), detect_ogg_content(), open_flac_file(), open_ra_file(), parse_track_entry(), real_parse_audio_specific_data(), and real_parse_headers().