diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-06 16:45:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-06 16:51:23 +0100 |
commit | 30056fd0be8ace0754e0568787bb4c18ea49edeb (patch) | |
tree | 2fc504571e70381b06b8ab26a20eb0ad1375c7b5 /libavcodec/h264pred.c | |
parent | 64591f8f86f2dfeac13ee6b4e971d069675ca814 (diff) | |
parent | a03a642d5ceb5f2f7c6ebbf56ff365dfbcdb65eb (diff) | |
download | ffmpeg-30056fd0be8ace0754e0568787bb4c18ea49edeb.tar.gz |
Merge commit 'a03a642d5ceb5f2f7c6ebbf56ff365dfbcdb65eb'
* commit 'a03a642d5ceb5f2f7c6ebbf56ff365dfbcdb65eb':
h264: do not use 422 functions for monochrome
See: 07abf13da4a7c3d23ce6bc6542d72e6252161736
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264pred.c')
-rw-r--r-- | libavcodec/h264pred.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libavcodec/h264pred.c b/libavcodec/h264pred.c index 3a96654e3c..7045ca7688 100644 --- a/libavcodec/h264pred.c +++ b/libavcodec/h264pred.c @@ -482,7 +482,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, h->pred8x8l[TOP_DC_PRED ]= FUNCC(pred8x8l_top_dc , depth);\ h->pred8x8l[DC_128_PRED ]= FUNCC(pred8x8l_128_dc , depth);\ \ - if (chroma_format_idc == 1) {\ + if (chroma_format_idc <= 1) {\ h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x8_vertical , depth);\ h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x8_horizontal , depth);\ } else {\ @@ -490,7 +490,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x16_horizontal , depth);\ }\ if (codec_id != AV_CODEC_ID_VP8) {\ - if (chroma_format_idc == 1) {\ + if (chroma_format_idc <= 1) {\ h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\ } else {\ h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x16_plane , depth);\ @@ -498,7 +498,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, } else\ h->pred8x8[PLANE_PRED8x8]= FUNCD(pred8x8_tm_vp8);\ if(codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8){\ - if (chroma_format_idc == 1) {\ + if (chroma_format_idc <= 1) {\ h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\ h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\ h->pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc , depth);\ @@ -524,7 +524,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, h->pred8x8[DC_129_PRED8x8]= FUNCC(pred8x8_129_dc , depth);\ }\ }\ - if (chroma_format_idc == 1) {\ + if (chroma_format_idc <= 1) {\ h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x8_128_dc , depth);\ } else {\ h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x16_128_dc , depth);\ @@ -558,7 +558,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, h->pred4x4_add [ HOR_PRED ]= FUNCC(pred4x4_horizontal_add , depth);\ h->pred8x8l_add [VERT_PRED ]= FUNCC(pred8x8l_vertical_add , depth);\ h->pred8x8l_add [ HOR_PRED ]= FUNCC(pred8x8l_horizontal_add , depth);\ - if (chroma_format_idc == 1) {\ + if (chroma_format_idc <= 1) {\ h->pred8x8_add [VERT_PRED8x8]= FUNCC(pred8x8_vertical_add , depth);\ h->pred8x8_add [ HOR_PRED8x8]= FUNCC(pred8x8_horizontal_add , depth);\ } else {\ @@ -568,9 +568,6 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, h->pred16x16_add[VERT_PRED8x8]= FUNCC(pred16x16_vertical_add , depth);\ h->pred16x16_add[ HOR_PRED8x8]= FUNCC(pred16x16_horizontal_add , depth);\ - if(!chroma_format_idc) - chroma_format_idc = 1; - switch (bit_depth) { case 9: H264_PRED(9) |