Mercurial > libavcodec.hg
comparison dnxhdenc.c @ 5970:e1ac22f75cf6 libavcodec
cosmetics, encode_variance -> encode_fast
author | bcoudurier |
---|---|
date | Sun, 02 Dec 2007 19:22:38 +0000 |
parents | c5d11f6f6a3d |
children | 405be936dac4 |
comparison
equal
deleted
inserted
replaced
5969:c5d11f6f6a3d | 5970:e1ac22f75cf6 |
---|---|
705 static int dnxhd_rc_cmp(const void *a, const void *b) | 705 static int dnxhd_rc_cmp(const void *a, const void *b) |
706 { | 706 { |
707 return ((RCCMPEntry *)b)->value - ((RCCMPEntry *)a)->value; | 707 return ((RCCMPEntry *)b)->value - ((RCCMPEntry *)a)->value; |
708 } | 708 } |
709 | 709 |
710 static int dnxhd_encode_variance(AVCodecContext *avctx, DNXHDEncContext *ctx) | 710 static int dnxhd_encode_fast(AVCodecContext *avctx, DNXHDEncContext *ctx) |
711 { | 711 { |
712 int max_bits = 0; | 712 int max_bits = 0; |
713 int ret, x, y; | 713 int ret, x, y; |
714 if ((ret = dnxhd_find_qscale(ctx)) < 0) | 714 if ((ret = dnxhd_find_qscale(ctx)) < 0) |
715 return -1; | 715 return -1; |
787 dnxhd_write_header(avctx, buf); | 787 dnxhd_write_header(avctx, buf); |
788 | 788 |
789 if (avctx->mb_decision == FF_MB_DECISION_RD) | 789 if (avctx->mb_decision == FF_MB_DECISION_RD) |
790 ret = dnxhd_encode_rdo(avctx, ctx); | 790 ret = dnxhd_encode_rdo(avctx, ctx); |
791 else | 791 else |
792 ret = dnxhd_encode_variance(avctx, ctx); | 792 ret = dnxhd_encode_fast(avctx, ctx); |
793 if (ret < 0) { | 793 if (ret < 0) { |
794 av_log(avctx, AV_LOG_ERROR, "picture could not fit ratecontrol constraints\n"); | 794 av_log(avctx, AV_LOG_ERROR, "picture could not fit ratecontrol constraints\n"); |
795 return -1; | 795 return -1; |
796 } | 796 } |
797 | 797 |