0

I have a doubt on x264 encoding.

If I have IP_1P_2P_3 IPPP some kind of this GOP from the x264 encoded output. Then in general, P_3 will be dependent on I, P_1 and P_2, P_2 will be dependent on I and P_1 (a cumulative encoding).

Can anyone please give me any ideas how can I support direct encoding so that all P_1, P_2, P_3 will be only dependent on the I frame?

Srini V
  • 11,045
  • 14
  • 66
  • 89
MSD Paul
  • 1,648
  • 3
  • 13
  • 31

1 Answers1

1

You can modify the x264 source code to add references frame invalidation to all non IDR frames. It’s already a supported and existing function in x264 It just need to be called on the P/B frames.

szatmary
  • 29,969
  • 8
  • 44
  • 57
  • Can you please tell me which functions I need to modify? or which exact parameters? if I make h->i_nal_ref_idc = 0 or i_nal_ref_idc = 0, does it make the P frames independent of I frame? – MSD Paul Feb 16 '18 at 15:45
  • No, I will not give you the exact modifications. Just look T the api, and the x264.h. It will be clear. – szatmary Feb 16 '18 at 15:51
  • Thanks a lot. can you please help me telling what i_nal_ref_idc parameter implies? About the encoder_invalidate_reference, it will invalidate a particular frame (especially applicable for frame loss), in that case, the encoder forgets (erase) the frame. But if I invoke invalidate_reference while doing P-frame encoding, then encoder will forget the previous P frames then. – MSD Paul Feb 16 '18 at 22:16