Multi-pass video encoding
AssigneeTexas Instruments Incorporated
InventorsArun Shankar Kudana, Soyeb Nagori
Life of this patent
Estimating the term…
Abstract
Systems, methods and computer readable mediums are presented for encoding a stream of input video frames, in which the input video frames are down sampled and the down sampled frames are encoded in a first encoding pass to generate a set of first pass coded frames forming a single first pass I frame and a plurality of first pass P frames formed into first pass sub-groups of pictures (SUB-GOPs). First pass encoding statistics are generated for individual first pass SUB-GOPs, and the statistics are used to encode the input video frames in a second encoding pass to generate a set of second pass coded frames.
Claims21
A method of encoding a video stream, comprising:
- down sampling input video frames, the down sampling performed spatially in two directions;
- encoding the down sampled frames in a first encoding pass using IPP coding to generate a set of first pass coded frames forming a first pass group of pictures (GOP) including a single first pass intra coded frame (I frame) encoded independently of the other first pass coded frames, and a plurality of first pass predictive coded frames (P frames);
- generating first pass encoding statistics for individual first pass sub-groups of pictures (SUB-GOPs) of the first pass P frames;
- and
- encoding the input video frames in a second encoding pass to generate a set of second pass coded frames including a single second pass I frame encoded independently of the remaining second pass coded frames, the remaining second pass coded frames grouped as a plurality of second pass SUB-GOPs, the second pass SUB-GOPs individually including an integer number N of the remaining second pass coded frames, the second pass SUB-GOPs individually including at least one second pass P frame;
- wherein encoding the input video frames in the second encoding pass includes encoding the individual second pass SUB-GOPs according to the first pass encoding statistics generated for the corresponding first pass SUB-GOP of the first pass P frames;
- and
- wherein the first pass encoding statistics used in the second encoding pass include:
- (i) a position of a frame of the first pass SUB-GOP that forms a first picture of a new scene,
- (ii) a count of intra coded macro-blocks in the individual first pass coded frames,
- (iii) variance values computed separately in the in two directions of all motion vectors associated with the individual first pass coded frames,
- (iv) a mean value of all motion vectors of the individual first pass coded frames, or
- (v) a mode value of all motion vectors of the individual first pass coded frames.
A system for encoding a video stream, comprising:
- an electronic memory to store video frame data;
- and
- a circuit configured to:
- down sample input video frames, the circuit configured to down sample the video frames spatially in two directions;
- encode the down sampled frames in a first encoding pass using IPP coding to generate a set of first pass coded frames forming a first pass group of pictures (GOP) including a single first pass intra coded frame (I frame) encoded independently of the other first pass coded frames, and a plurality of first pass predictive coded frames (P frames);
- generate first pass encoding statistics for individual first pass sub-groups of pictures (SUB-GOPs) of the first pass P frames;
- and
- encode the input video frames in a second encoding pass to generate a set of second pass coded frames including a single second pass I frame encoded independently of the remaining second pass coded frames, the remaining second pass coded frames grouped as a plurality of second pass SUB-GOPs, the second pass SUB-GOPs individually including an integer number N of the remaining second pass coded frames, the second pass SUB-GOPs individually including at least one second pass P frame;
- wherein the circuit is configured to encode the individual second pass SUB-GOPs according to the first pass encoding statistics generated for the corresponding first pass SUB-GOP of the first pass P frames;
- and
- wherein the first pass encoding statistics used in the second encoding pass include:
- (i) a position of a frame of the first pass SUB-GOP that forms a first picture of a new scene,
- (ii) a count of intra coded macro-blocks in the individual first pass coded frames,
- (iii) variance values computed separately in the in two directions of all motion vectors associated with the individual first pass coded frames,
- (iv) a mean value of all motion vectors of the individual first pass coded frames, or
- (v) a mode value of all motion vectors of the individual first pass coded frames.
A non-transitory computer readable medium, comprising computer executable instructions for encoding a video stream, that when executed by a processor, cause the processor to:
- down sample input video frames, the down sampling performed spatially in two directions;
- encode the down sampled frames in a first encoding pass using IPP coding to generate a set of first pass coded frames forming a first pass group of pictures (GOP) including a single first pass intra coded frame (I frame) encoded independently of the other first pass coded frames, and a plurality of first pass predictive coded frames (P frames);
- generate first pass encoding statistics for individual first pass sub-groups of pictures (SUB-GOPs) of the first pass P frames;
- and
- encode the input video frames in a second encoding pass to generate a set of second pass coded frames including a single second pass I frame encoded independently of the remaining second pass coded frames, the remaining second pass coded frames grouped as a plurality of second pass SUB-GOPs, the second pass SUB-GOPs individually including an integer number N of the remaining second pass coded frames, the second pass SUB-GOPs individually including at least one second pass P frame;
- wherein the computer executable instructions, when executed by a processor, cause the processor to encode the individual second pass SUB-GOPs in the second encoding pass according to the first pass encoding statistics generated for the corresponding first pass SUB-GOP of the first pass P frames;
- and
- wherein the first pass encoding statistics used in the second encoding pass include:
- (i) a position of a frame of the first pass SUB-GOP that forms a first picture of a new scene,
- (ii) a count of intra coded macro-blocks in the individual first pass coded frames,
- (iii) variance values computed separately in the in two directions of all motion vectors associated with the individual first pass coded frames,
- (iv) a mean value of all motion vectors of the individual first pass coded frames, or
- (v) a mode value of all motion vectors of the individual first pass coded frames.
Dependencies are inferred from the claim text.