Abstract:
Embodiments of this application provide an encoding method, a decoding method, and an electronic device. The method includes: obtaining a current frame; obtaining a reconstructed picture corresponding to a reference frame of the current frame from an external reference list of an encoder, where the reference frame of the current frame is a frame encoded by the encoder, and the external reference list is independent of the encoder; performing, by the encoder, intra coding on the reconstructed picture; and performing, by the encoder, inter coding on the current frame based on a result of the intra coding, to obtain a bitstream corresponding to the current frame. In this way, the encoder may flexibly select a reference frame from the external reference list for encoding, thereby implementing cross-frame reference or cross-resolution reference, and improving flexibility of reference frame management of the encoder.
Abstract:
The present application discloses a link discovery method and apparatus. The method includes: when a network device receives a first LLDP packet sent by a directly connected device, determining a security level of the directly connected device according to an authentication TLV; if the security level of the directly connected device is secure, determining a device type of the directly connected device, and sending a second LLDP packet to the directly connected device according to a correspondence between the device type of the directly connected device and a TLV. In the present application, a corresponding TLV is selected according to the device type and sent, which avoids that all types of TLVs are sent to a directly connected device every time, and reduces a possibility of device information leakage. It is ensured that a sent LLDP packet is more proper, and a link overhead is reduced.
Abstract:
Embodiments of the present invention provide a method and a device for link aggregation control protocol (LACP) link switch. The method includes: monitoring state changes of interfaces in an LACP link aggregation group; when monitoring a state change occurs on an active interface in the aggregation group, determining whether the number of active interfaces in the aggregation group is smaller than a preset minimum active link number, if yes, keeping states of N interfaces among the interfaces on which a state change occurs being an active state, so that the number of active interfaces in the aggregation group is greater than or equal to the preset minimum active link number; and when monitoring a state change occurs on an inactive interface in the aggregation group, adjusting states of M interfaces among the N interfaces kept in the active state into an inactive state M being smaller than or equal to N.