Commit 4691a77d authored by Andreas Öman's avatar Andreas Öman Committed by Guillaume Poirier

Add support for streams with different chroma_qp_index_offset

for Cr and Cb
Patch by Andreas Öman % andreas A olebyn P nu %
Original thread:
Date: Jun 26, 2007 8:48 PM
subject: [FFmpeg-devel] Color corruption and seeking errors with H264 disc sources

Originally committed as revision 9505 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 5084ed3a
This diff is collapsed.
...@@ -121,14 +121,15 @@ typedef struct PPS{ ...@@ -121,14 +121,15 @@ typedef struct PPS{
int weighted_bipred_idc; int weighted_bipred_idc;
int init_qp; ///< pic_init_qp_minus26 + 26 int init_qp; ///< pic_init_qp_minus26 + 26
int init_qs; ///< pic_init_qs_minus26 + 26 int init_qs; ///< pic_init_qs_minus26 + 26
int chroma_qp_index_offset; int chroma_qp_index_offset[2];
int deblocking_filter_parameters_present; ///< deblocking_filter_parameters_present_flag int deblocking_filter_parameters_present; ///< deblocking_filter_parameters_present_flag
int constrained_intra_pred; ///< constrained_intra_pred_flag int constrained_intra_pred; ///< constrained_intra_pred_flag
int redundant_pic_cnt_present; ///< redundant_pic_cnt_present_flag int redundant_pic_cnt_present; ///< redundant_pic_cnt_present_flag
int transform_8x8_mode; ///< transform_8x8_mode_flag int transform_8x8_mode; ///< transform_8x8_mode_flag
uint8_t scaling_matrix4[6][16]; uint8_t scaling_matrix4[6][16];
uint8_t scaling_matrix8[2][64]; uint8_t scaling_matrix8[2][64];
uint8_t chroma_qp_table[256]; ///< pre-scaled (with chroma_qp_index_offset) version of qp_table uint8_t chroma_qp_table[2][256]; ///< pre-scaled (with chroma_qp_index_offset) version of qp_table
int chroma_qp_diff;
}PPS; }PPS;
/** /**
...@@ -170,7 +171,7 @@ typedef struct H264Context{ ...@@ -170,7 +171,7 @@ typedef struct H264Context{
int got_avcC; ///< flag used to parse avcC data only once int got_avcC; ///< flag used to parse avcC data only once
int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4) int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4)
int chroma_qp; //QPc int chroma_qp[2]; //QPc
int prev_mb_skipped; int prev_mb_skipped;
int next_mb_skipped; int next_mb_skipped;
......
...@@ -807,7 +807,7 @@ static int svq3_decode_frame (AVCodecContext *avctx, ...@@ -807,7 +807,7 @@ static int svq3_decode_frame (AVCodecContext *avctx,
h->halfpel_flag = 1; h->halfpel_flag = 1;
h->thirdpel_flag = 1; h->thirdpel_flag = 1;
h->unknown_svq3_flag = 0; h->unknown_svq3_flag = 0;
h->chroma_qp = 4; h->chroma_qp[0] = h->chroma_qp[1] = 4;
if (MPV_common_init (s) < 0) if (MPV_common_init (s) < 0)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment