chaoyuaw / pytorch-coviar

Compressed Video Action Recognition
https://www.cs.utexas.edu/~cywu/projects/coviar/
GNU Lesser General Public License v2.1
502 stars 126 forks source link

codecs #11

Closed Tylerjoe closed 6 years ago

Tylerjoe commented 6 years ago

how long will you show other codecs ? Thanks

chaoyuaw commented 6 years ago

If you're referring to supporting, e.g. H.264, I don't have a very concrete plan yet. But if you want to go ahead and implement it, maybe you can start with using https://github.com/chaoyuaw/pytorch-coviar/blob/master/data_loader/coviar_data_loader.c#L428 and https://github.com/chaoyuaw/pytorch-coviar/blob/master/data_loader/coviar_data_loader.c#L440 for decoding H.264.

RyanCV commented 6 years ago

@chaoyuaw Do we only need to uncomment those lines (// pCodec = avcodec_find_decoder(AV_CODEC_ID_H264); ) in coviar_data_loader.c in order to run H.264? Or any other places need to be modified? Thanks

chaoyuaw commented 6 years ago

H.264 uses B-frames, in addition to P- and I-frames. Our paper focuses on cases where only I-frames and P-frames are used. I think it's possible to modify the algorithm slightly (to accumulate MV and residuals in both directions) and make it work on B-frames, but we never really tried.

Tylerjoe commented 6 years ago

@chaoyuaw Thanks for your reply and patience