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.

algorithm

 

hi

1.how to compress a sequence of images?

2. Given a huge binary file which contain content like the following:

0x11,0x90,0x40,0x00,0x00,0x40,0x00,0x00,0x0A,0XB4,0X16,0X80,0X28,0X28,0X10,0X12,0X05,0X84,0X02,0X41,0X00,0X00,0X00,0X01,0X11,0X90,0X04,0X00,0X00,0X40,0X00   ........

please write a efficient  algorithm  to search the pattern "0X00,0X00,0X00,0X01"      how to do?

tanglaibao

  • hi

    1.how to compress a sequence of images?

    2. Given a huge binary file which contain content like the following:

    0x11,0x90,0x40,0x00,0x00,0x40,0x00,0x00,0x0A,0XB4,0X16,0X80,0X28,0X28,0X10,0X12,0X05,0X84,0X02,0X41,0X00,0X00,0X00,0X01,0X11,0X90,0X04,0X00,0X00,0X40,0X00   ........

    please write a efficient  algorithm  to search the pattern "0X00,0X00,0X00,0X01"      how to do?

    tanglaibao

  • laibaotang said:
    1.how to compress a sequence of images?

    This is sort of a generic question, however in the case of a DM355 you would probably want to start with the encode demo and codec engine examples that are included with the DVSDK, as these exercise the MPEG4 codec on the DM355 and would be the optimal way to compress a sequence of images (video) on the DM355.

    laibaotang said:
    2. Given a huge binary file which contain content like the following:

    0x11,0x90,0x40,0x00,0x00,0x40,0x00,0x00,0x0A,0XB4,0X16,0X80,0X28,0X28,0X10,0X12,0X05,0X84,0X02,0X41,0X00,0X00,0X00,0X01,0X11,0X90,0X04,0X00,0X00,0X40,0X00   ........

    please write a efficient  algorithm  to search the pattern "0X00,0X00,0X00,0X01"      how to do?

    This is a bit too generic, unfortunately none of the TI example software includes examples of a search algorithm to implement something like this. Your best bet would be to search around the web to see if you can find something you could easily port to your needs, there are many ways of implementing this sort of capability, wikipedia has a decent article outlining search algorithms that may aid you in  your search.