On Thu, Dec 29, 2016 at 12:32 PM, Слободенюк Александр Игоревич <[email protected]> wrote: > Greetings. Found strange thing in this code: > > static inline int decode_vui_parameters(H264Context *h, SPS *sps) > { > int aspect_ratio_info_present_flag; > unsigned int aspect_ratio_idc; > > aspect_ratio_info_present_flag = get_bits1(&h->gb); > > if (aspect_ratio_info_present_flag) { > aspect_ratio_idc = get_bits(&h->gb, 8); > if (aspect_ratio_idc == EXTENDED_SAR) { > sps->sar.num = get_bits(&h->gb, 16); > sps->sar.den = get_bits(&h->gb, 16); > .... > > "sps->sar.num" and "sps->sar.den" are 16-bit numerical values. This means > they have endianness: little or big. As we can see, they are not swapping. > So, the values "sps->sar.num" and "sps->sar.den" should read different on > little and big endian systems.. > Could you please explain if I'm wrong? >
get_bits handles all endianness concerns. - Hendrik _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
