This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TDA2: what is /home/1920x1080_00.hdr

Part Number: TDA2


Tool/software: Linux

in  usecases\null_src_decode_display\chains_nullSrc_Display.c

        strncpy(pPrm->channelParams[chId].nameDataFile, "/home/1920x1080_00.h264", 260);     i  think  is  in  put  src  vedio
        strncpy(pPrm->channelParams[chId].nameIndexFile, "/home/1920x1080_00.hdr", 260);      but   what  is  this ?   for  what ?

  • Hi,
    .h264 file -> input src file
    .hdr file -> Index file (size of each frame of input src file)

    Regards
    Suryamani Jena
  • Hi Suryamani Jena
    but how can i get .hdr file ,i only have .h264 vedio
    Regards
    shuai
  • i think in the SDK should give some file as an example!
  • Hi shuai,
    You can generate .hdr file from .h264 file (follow below steps)

    Required software:
    FFmpeg

    -----------------------------------------
    Creating index file from input src file
    -----------------------------------------
    Create index file
    ffprobe.exe -show_packets input.h264 > index.idx

    On Linux machine:
    Extract just "Size" from above generated index file with sed command.

    PAT=size
    sed -n "/$PAT/p" index.idx | cut -d' ' -f3 >> size_extracted.txt

    Now generate binary file from size extracted file, with below command.
    Please note that " size_extracted.txt should not contain any string just numbers i.e size of frame "

    cat size_extracted.txt | perl -n -e 'printf("%08x\n",$_)' | sed 's/\(..\)\(..\)\(..\)\(..\)/0x\4\n0x\3\n0x\2\n0x\1/' | xxd -r -p > Size_test.bin && du -b Size_test.bin

    Rename Size_test.bin as input.hdr and use it as index file

    Regards
    Suryamani Jena