import { MessageEvent } from "@foxglove/studio-base/players/types";
import { EncodedFrame } from "../../../protobuf.generated/EncodedFrame.js";
import { ImgFrame } from "../../../protobuf.generated/ImgFrame.js";
import { ImgTransformation, Timestamp } from "../../../protobuf.generated/common.js";
export type TopicDecoders = Map<string, {
    decoder: VideoDecoder;
    timing: Map<number, Timestamp>;
    transformations: Map<number, ImgTransformation | undefined>;
}>;
export type PackedVideoPixelFormat = "RGBX" | "RGBA" | "BGRX" | "BGRA";
export type VideoPlaneLayout = Required<Pick<PlaneLayout, "offset" | "stride">>;
export declare function packedToI420(packed: Uint8Array, width: number, height: number, stride: number, format: PackedVideoPixelFormat, cropLeft?: number, cropTop?: number): Uint8Array;
export declare function convertNv12ToI420(nv12Buffer: Uint8Array, width: number, height: number, yStride: number, uvStride: number, yOffset?: number, uvOffset?: number, cropLeft?: number, cropTop?: number): Uint8Array;
export declare function repackI420(source: Uint8Array, width: number, height: number, yLayout: VideoPlaneLayout, uLayout: VideoPlaneLayout, vLayout: VideoPlaneLayout, cropLeft?: number, cropTop?: number): Uint8Array;
export declare function copyVideoFrameToI420(frame: VideoFrame, logPrefix: string): Promise<{
    data: Uint8Array;
    width: number;
    height: number;
}>;
type DeserializeEncodedFrameH264Args = {
    topic: string;
    message: EncodedFrame | ImgFrame;
    topicDecoders: TopicDecoders;
    callback: (event: MessageEvent) => void;
    onError: (error: Error) => void;
};
export declare function deserializeEncodedFrameH264({ topic, message, topicDecoders, callback, onError, }: DeserializeEncodedFrameH264Args): Promise<void>;
export {};
//# sourceMappingURL=h264.d.ts.map